:root {
  --navy: #0b3a5b;
  --sea: #1572a8;
  --sea-2: #1e8fc9;
  --sky: #e6f3fa;
  --sky-2: #f3f9fd;
  --teal: #17a2b8;
  --red: #d42a2a;
  --red-bg: #fdecec;
  --green: #18864b;
  --green-bg: #e8f6ee;
  --amber: #b86e00;
  --amber-bg: #fff4e0;
  --text: #14243a;
  --muted: #5b6b80;
  --line: #d6e2ec;
  --bg: #f4f8fb;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 58, 91, .06), 0 4px 14px rgba(11, 58, 91, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sea); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; color: var(--navy); }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- nagłówek ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: #fff; border-bottom: 3px solid var(--sea);
  box-shadow: 0 2px 8px rgba(11,58,91,.06);
}
.topbar .nav { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.topbar .title { font-weight: 700; color: var(--navy); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .tools { display: flex; gap: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-align: right; flex-shrink: 0; }
.brand .logo { width: 42px; height: 42px; flex-shrink: 0; }
.brand .name { font-weight: 800; color: var(--navy); font-size: 1.02rem; letter-spacing: .2px; line-height: 1.1; }
.brand .name span { color: var(--sea); }
.brand .who { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.brand .who b { color: var(--sea); font-weight: 600; }

.iconbtn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; min-width: 40px; height: 40px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--navy);
}
.iconbtn:hover { background: var(--sky); }
.iconbtn svg { width: 20px; height: 20px; }

main { padding: 20px; max-width: 1500px; margin: 0 auto; }

/* ---------- zakładki ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: 0; background: transparent; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0;
}
.tabs button:hover { color: var(--sea); background: var(--sky-2); }
.tabs button.active { color: var(--sea); border-bottom-color: var(--sea); }
.tabs .badge { margin-left: 6px; }

/* ---------- kafelki startowe ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; border-radius: 16px; cursor: pointer; text-decoration: none;
  background: linear-gradient(160deg, #fff 0%, var(--sky) 100%); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--navy);
  transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(21,114,168,.15); }
.tile svg { width: 46px; height: 46px; color: var(--sea); }
.tile .t { font-size: 1.3rem; font-weight: 800; }
.tile .d { color: var(--muted); font-size: .9rem; }
.tile .alert { color: var(--red); font-weight: 700; font-size: .9rem; }

/* ---------- karty / układ ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sea); border-radius: 10px; padding: 12px 14px; }
.kpi .l { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.kpi .v { font-size: 1.35rem; font-weight: 800; color: var(--navy); margin-top: 2px; }
.kpi .s { font-size: .82rem; color: var(--muted); }
.kpi.red { border-left-color: var(--red); } .kpi.red .v { color: var(--red); }
.kpi.green { border-left-color: var(--green); } .kpi.green .v { color: var(--green); }

/* ---------- netto / brutto ---------- */
.nb { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: right; }
.nb .g { font-weight: 700; }
.nb .n { font-size: .78rem; color: var(--muted); font-weight: 400; }
.nb.big .g { font-size: 1.6rem; color: var(--navy); }
.nb.big .n { font-size: .95rem; }

/* ---------- tabele ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--sky); color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--sky-2); }
tr.click { cursor: pointer; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: var(--sky-2); }
tr.danger td { background: var(--red-bg); }

/* ---------- formularze ---------- */
label.f { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
label.f > span.hint { font-weight: 400; font-size: .78rem; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #b9cbd9; border-radius: 9px; background: #fff; color: var(--text); font-size: 1rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(30,143,201,.25); border-color: var(--sea-2); }
textarea { min-height: 70px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--sea); background: var(--sea); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--sea); }
.btn.ghost:hover { background: var(--sky); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: #a91d1d; }
.btn.green { background: var(--green); border-color: var(--green); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .88rem; border-radius: 8px; }
.btn.xl { min-height: 64px; font-size: 1.15rem; padding: 0 22px; border-radius: 14px; }
.btn svg { width: 20px; height: 20px; }

/* ---------- znaczniki ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--sky); color: var(--sea); white-space: nowrap; }
.badge.red { background: var(--red); color: #fff; }
.badge.redl { background: var(--red-bg); color: var(--red); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.gray { background: #eef1f4; color: var(--muted); }
.alertbox { border-radius: 10px; padding: 12px 14px; border: 1px solid; display: block; }
.alertbox.red { background: var(--red-bg); border-color: #f3b4b4; color: #8f1616; }
.alertbox.red b { color: var(--red); }
.alertbox.info { background: var(--sky); border-color: #b5d8ec; color: var(--navy); }
.alertbox.green { background: var(--green-bg); border-color: #b6e0c7; color: #0f5a32; }
.txt-red { color: var(--red) !important; font-weight: 700; }
.txt-green { color: var(--green) !important; font-weight: 700; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.scan { display: flex; gap: 8px; }
.scan input { font-size: 1.15rem; min-height: 54px; border: 2px solid var(--sea-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; color: var(--navy); }
.chip.active, .chip:hover { background: var(--sea); color: #fff; border-color: var(--sea); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: calc(100vh - 330px); overflow-y: auto; padding: 2px; }
.pbtn {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; cursor: pointer; min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.pbtn:hover { border-color: var(--sea-2); background: var(--sky-2); }
.pbtn .pn { font-weight: 700; color: var(--navy); font-size: .93rem; line-height: 1.2; }
.pbtn .pp { font-weight: 800; color: var(--sea); }
.pbtn .ps { font-size: .76rem; color: var(--muted); }
.pbtn.low { border-color: #f0b3b3; }
.pbtn.low .ps { color: var(--red); font-weight: 700; }
.cart { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.cart .lines { overflow-y: auto; flex: 1; min-height: 120px; margin: 0 -16px; }
.cline { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.cline .nm { font-weight: 600; }
.cline .meta { font-size: .78rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--sky); cursor: pointer; font-weight: 800; color: var(--sea); font-size: 1.1rem; }
.qty input { width: 62px; min-height: 36px; height: 36px; border: 0; text-align: center; padding: 0 4px; border-radius: 0; }
.totals { border-top: 2px solid var(--line); padding-top: 12px; margin-top: 4px; }
.totals .tr { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); }
.totals .tr.big { color: var(--navy); font-size: 1.6rem; font-weight: 800; padding-top: 6px; }
.paybtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.paybtns .btn { flex-direction: column; gap: 2px; min-height: 70px; }
.receipt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; white-space: pre; background: #fffdf5; border: 1px dashed #c8b98a; padding: 14px; border-radius: 6px; overflow-x: auto; }

/* ---------- terminarz ---------- */
.cal { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.calgrid { display: grid; min-width: max-content; }
.calgrid .hc { position: sticky; left: 0; z-index: 2; background: var(--sky); font-weight: 700; color: var(--navy); padding: 6px 10px; border-bottom: 1px solid var(--line); border-right: 2px solid var(--line); white-space: nowrap; display: flex; align-items: center; }
.calgrid .dh { font-size: .72rem; text-align: center; padding: 4px 0; background: var(--sky); border-bottom: 1px solid var(--line); color: var(--navy); }
.calgrid .dh b { display: block; font-size: .9rem; }
.calgrid .dh.we { background: #d8ebf6; }
.calgrid .dh.today { background: var(--sea); color: #fff; }
.calgrid .cell { border-bottom: 1px solid var(--line); border-right: 1px solid #eef3f7; min-height: 42px; cursor: pointer; }
.calgrid .cell:hover { background: var(--sky-2); }
.calgrid .cell.we { background: #f7fbfe; }
.calgrid .cell.today { background: #eaf5fc; }
.resv {
  margin: 4px 0; border-radius: 3px; padding: 3px 8px; font-size: .78rem; font-weight: 700; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: pointer; z-index: 1; align-self: center; height: 34px; display: flex; flex-direction: column; justify-content: center; line-height: 1.1;
}
.resv small { font-weight: 500; opacity: .9; }
.resv.booked { background: var(--sea-2); }
.resv.checked_in { background: var(--navy); }
.resv.checked_out { background: #8aa4b8; }
.resv.energy-due { box-shadow: inset 0 0 0 3px var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 10px; }
.legend { align-items: center; }
.calgrid .hc { z-index: 4; }
.todayline { position: relative; z-index: 3; justify-self: center; width: 2px; background: var(--red); pointer-events: none; border-radius: 1px; }
.todayline::before { content: ''; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.todaylabel { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); }
.todaylabel i { width: 3px; height: 18px; background: var(--red); border-radius: 2px; }
.todaylabel b { text-transform: none; }
.legend .legcat { font: inherit; color: inherit; background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 3px 8px; cursor: pointer; }
.legend .legcat:hover { border-color: var(--sea); color: var(--sea); }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }

/* ---------- podpis / zdjęcie ---------- */
.sigpad { border: 2px dashed #9fbcd0; border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 160px; display: block; cursor: crosshair; }
.sigpad.signed { border-style: solid; border-color: var(--green); }
.photo { width: 100%; aspect-ratio: 4/3; border: 2px dashed #9fbcd0; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--sky-2); overflow: hidden; cursor: pointer; color: var(--muted); text-align: center; }
.photo img { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- okna modalne ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11, 38, 60, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 980px; }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .mh h2 { margin: 0; }
.modal .mb { padding: 18px 20px; }
.modal .mf { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- komunikaty ---------- */
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: calc(100vw - 36px); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 600; max-width: 420px; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

/* ---------- logowanie ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(170deg, var(--sky) 0%, #cfe8f6 55%, #b7dcf0 100%); }
.login .box { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 30px 28px; box-shadow: 0 20px 50px rgba(11,58,91,.15); }
.login .brand { justify-content: center; text-align: left; margin-bottom: 22px; }
.login .brand .logo { width: 56px; height: 56px; }
.login .brand .name { font-size: 1.3rem; }

/* ---------- wykres słupkowy ---------- */
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar { display: grid; grid-template-columns: 130px 1fr 120px; gap: 10px; align-items: center; font-size: .88rem; }
.bar .track { background: var(--sky); border-radius: 6px; height: 18px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--sea-2); border-radius: 6px; }

.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- telefon / tablet ---------- */
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .pgrid { max-height: 360px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  main { padding: 12px 16px; }
  .topbar { padding: 8px 12px; gap: 6px 8px; flex-wrap: wrap; }
  .topbar .brand { order: -1; width: 100%; justify-content: flex-end; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .topbar .nav { min-width: 0; }
  .iconbtn { min-width: 38px; height: 38px; padding: 0 8px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .pbtn { min-height: 84px; padding: 10px; }
  .topbar .title { font-size: 1rem; }
  .brand .name { font-size: .82rem; }
  .brand .logo { width: 34px; height: 34px; }
  .brand .who { font-size: .7rem; }
  .topbar .tools .lbl { display: none; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs button { padding: 9px 12px; white-space: nowrap; }
  .modal-bg { padding: 10px; }
  .bar { grid-template-columns: 90px 1fr 90px; }
  .paybtns .btn { min-height: 60px; font-size: 1rem; }
}

/* ---------- wydruk ---------- */
@media print {
  .topbar, .tabs, .noprint, #toasts, .modal-bg .mf { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .tablewrap { border: 0; overflow: visible; }
  th { position: static; }
  .modal-bg { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: none; }
  body.printing-modal main { display: none; }
}
.invoice { max-width: 860px; margin: 0 auto; background: #fff; padding: 30px; color: #000; }
.invoice h1 { color: #000; font-size: 1.5rem; }
.invoice table th { background: #eef3f7; color: #000; position: static; }
.invoice .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 20px 0; }
.invoice .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 60px; text-align: center; font-size: .8rem; }
.invoice .sig div { border-top: 1px solid #000; padding-top: 4px; }

/* ikony w nagłówkach i polach zdjęć */
h1 svg, h2 svg, h3 svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; color: var(--sea); }
.photo svg { width: 46px; height: 46px; color: var(--sea); }
.btn .badge { flex-shrink: 0; }

/* wybór roli na ekranie logowania */
.roles { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.role { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left;
  padding: 18px; border: 2px solid var(--line); border-radius: 14px; background: linear-gradient(160deg, #fff 0%, var(--sky) 100%); cursor: pointer; color: var(--navy); }
.role:hover, .role:focus-visible { border-color: var(--sea); box-shadow: 0 6px 18px rgba(21,114,168,.15); outline: none; }
.role svg { grid-row: 1 / 3; width: 40px; height: 40px; color: var(--sea); }
.role b { font-size: 1.2rem; }
.role span { font-size: .85rem; color: var(--muted); }
.badge svg { width: 14px; height: 14px; vertical-align: -2px; }

/* terminarz: dzisiejsze wyjazdy i przyjazdy */
.todaybox { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.todaybox .tb { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--sea); border-radius: 10px; padding: 10px 14px; }
.todaybox .tb.dep { border-left-color: var(--red); }
.todaybox .tb.arr { border-left-color: var(--green); }
.todaybox .tbh { font-weight: 800; color: var(--navy); letter-spacing: .02em; }
.todaybox .tbh b { font-size: 1.5rem; margin-left: 4px; vertical-align: -2px; }
.todaybox .tb.dep .tbh b { color: var(--red); }
.todaybox .tb.arr .tbh b { color: var(--green); }
.todaybox .tbl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: .85rem; }
.todaybox .tbl span { background: var(--sky); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.todaybox .tbl span:hover { background: var(--sky-2); }
.todaybox .tbl em { color: var(--muted); }

/* terminarz: ciągła oś czasu */
.calnav { position: relative; display: flex; height: 34px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; user-select: none; touch-action: none; }
.calnav .nm { min-width: 0; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--muted); border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.calnav .nm:first-child { border-left: 0; }
.calnav .nm.ny { border-left: 2px solid var(--sea); color: var(--navy); }
.calnav .navthumb { position: absolute; top: 2px; bottom: 2px; min-width: 14px; background: rgba(21, 114, 168, .22); border: 2px solid var(--sea); border-radius: 8px; cursor: grab; }
.calnav.drag .navthumb { cursor: grabbing; background: rgba(21, 114, 168, .32); }
.calnav .navtoday { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); pointer-events: none; }
.calgrid .mh { grid-row: 1; background: var(--sky); border-bottom: 1px solid var(--line); border-left: 2px solid var(--sea); font-weight: 800; color: var(--navy); font-size: .85rem; padding: 5px 0; text-transform: capitalize; cursor: grab; user-select: none; }
.calgrid .mh span { position: sticky; left: 128px; padding: 0 8px; }
.calgrid .mhc { font-size: .75rem; color: var(--muted); font-weight: 600; }
.calgrid .dh { cursor: grab; user-select: none; }
.calgrid.panning, .calgrid.panning .mh, .calgrid.panning .dh { cursor: grabbing; }
.calgrid .dh.m1, .calgrid .cell.m1 { border-left: 2px solid var(--sea); }

.gotodate { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); }
.gotodate input { width: auto; min-height: 40px; padding: 6px 8px; }
.calgrid .dh.goto { background: #f4b400; color: #0b2236; }
.calgrid .cell.goto { background: #fff4cc; }

.alertbox.amber { background: #fff6e0; border-color: #f1d08a; color: #6b4a00; }
details.card > summary { cursor: pointer; list-style: revert; }
.catpick { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); }
.catpick select { width: auto; min-height: 38px; padding: 4px 8px; }
.catpick i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
/* terminarz: wiersz cen doby */
.calgrid .dp { grid-row: 3; font-size: .84rem; font-weight: 800; text-align: center; padding: 6px 0; letter-spacing: -.3px; background: #fbfdff; border-bottom: 2px solid var(--line); color: var(--muted); white-space: nowrap; }
.calgrid .dp.season { color: var(--sea); }
.calgrid .dp.chg { background: #fff6e0; color: #8a5a00; }
.calgrid .dp.m1 { border-left: 2px solid var(--sea); }
.calgrid .hc.prc { font-size: .75rem; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); }
/* rabat w formularzu rezerwacji */
details.disc { border: 2px dashed var(--green); background: var(--green-bg); }
details.disc[open] { border-style: solid; }
details.disc > summary { font-size: 1.05rem; }
details.disc table input { padding: 6px 8px; min-height: 36px; }
details.disc tfoot td { font-weight: 700; }
.calgrid .dp { cursor: pointer; }
.calgrid .dp:hover { background: var(--sky-2); color: var(--sea-d, #0b3a5b); }
/* informacje o rezerwacji: czerwona ikonka „i” */
.rinfo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 15px; height: 15px; margin-right: 4px; border-radius: 50%; background: var(--red); color: #fff; font: italic 700 11px/1 Georgia, serif; box-shadow: 0 0 0 1.5px #fff; vertical-align: -2px; }
.rinfo.big { width: 22px; height: 22px; font-size: 15px; margin-right: 6px; vertical-align: -3px; }
.infocard textarea { width: 100%; margin-top: 8px; }
.infocard:not(.has) .rinfo { background: var(--muted); }
.infocard.has { border-left: 4px solid var(--red); }
/* telefony gościa z przyciskiem „Połącz” */
.phonerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.phonerow span { font-weight: 700; }
.phonerow .btn { text-decoration: none; }
#phbox { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
#phbox .row { flex-wrap: nowrap; }
#phbox .row input { flex: 1; min-width: 0; }
.resv .rn { display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; }
.calgrid .dp.long { font-size: .7rem; letter-spacing: -.5px; }
