/* System PFŁS — arkusz stylów (panel, strony publiczne, odprawa mobilna) */
:root {
  --ink: #142230; --ink-2: #3c4e5e; --muted: #6b7c8b; --line: #dbe3ea; --line-2: #eef2f5;
  --bg: #f3f6f9; --card: #ffffff; --navy: #0a2e4a; --navy-2: #133d62; --teal: #386991; --teal-2: #e6eef6;
  --accent: #c72029; --sky: #6ea4d2;
  --red: #c72029; --red-bg: #fdecec; --green: #1f8a4c; --green-bg: #e7f6ed; --amber: #b7791f; --amber-bg: #fff6e0;
  --blue-bg: #e9f1f9; --radius: 10px; --shadow: 0 1px 2px rgba(16,40,60,.06), 0 4px 16px rgba(16,40,60,.06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--navy-2); }
a:hover { color: var(--teal); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
code, .mono { font-family: var(--mono); font-size: .9em; }
small, .small { font-size: .85em; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
:focus-visible { outline: 3px solid #6ea4d2; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Układ panelu ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: url(../img/card-header.png) top center / 260px auto no-repeat, var(--navy); color: #d6e4ee; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.brand-mark { width: 46px; height: 40px; border-radius: 8px; background: #fff; display: grid; place-items: center; flex: none; padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.brand-mark img { max-width: 100%; max-height: 100%; display: block; }
.side .brand { position: relative; padding-bottom: 22px; margin-bottom: 4px; }
.side .brand::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; background: var(--accent); border-radius: 2px; }
.brand b { display: block; font-size: 15px; }
.brand span { font-size: 11.5px; color: #b8cde0; }
.nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fb2d0; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #d6e4ee; text-decoration: none; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav .count { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.btn.menu-btn { display: none; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.offline-banner { background: var(--amber-bg); color: #6b4a10; border-bottom: 1px solid #f1d9a6; padding: 8px 24px; font-size: 13.5px; }

/* ---------- Elementy ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: .2em 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { min-height: 104px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.7rem; color: var(--navy); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13.5px; }
.stat.alert b { color: var(--red); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.25; min-height: 36px; }
.btn:hover { border-color: #b7c6d2; background: #f8fafb; color: var(--ink); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--red); border-color: #f0c4bf; }
.btn.danger:hover { background: var(--red-bg); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.success { background: var(--green); color: #fff; border-color: var(--green); }
.btn.small { padding: 4px 10px; min-height: 28px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--navy-2); padding: 0; min-height: 0; text-decoration: underline; }
.btn[disabled], .btn.loading { opacity: .6; cursor: not-allowed; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--blue-bg); color: var(--navy-2); }
.badge.teal { background: var(--teal-2); color: var(--teal); }
.dot { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: var(--muted); }
.dot.green { background: var(--green); } .dot.red { background: var(--red); } .dot.amber { background: var(--amber); }

/* ---------- Formularze ---------- */
.form label, label.f { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.form label > input, .form label > select, .form label > textarea, label.f > input, label.f > select, label.f > textarea { margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=tel], input[type=search],
input:not([type]), select, textarea {
  display: block; width: 100%; padding: 8px 10px; border: 1px solid #c9d5de; border-radius: 8px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 3px solid rgba(56,105,145,.18); }
/* większe pola wyboru — szybsza praca na listach */
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--navy); cursor: pointer; flex: none; vertical-align: middle; }
td.sel, th.sel { width: 44px; text-align: center; }
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--blue-bg); border: 1px solid #cfe0f3; border-radius: 9px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.bulkbar b { color: var(--navy); }
.form label.check, label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; }
label.check input { margin-top: 1px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 6px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; color: var(--navy); }
.field-error { color: var(--red); font-size: 12.5px; font-weight: 500; margin-top: 3px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f7f9fb; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: #f6fafc; }
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable::after { content: " ↕"; color: #c0ccd6; }
table.t tr.dim td { color: var(--muted); }
.table-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.table-tools input[type=search] { max-width: 300px; }
.table-tools select { width: auto; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; color: var(--muted); }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- Zakładki, okna, komunikaty ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button.active { border-bottom-color: var(--accent); color: var(--navy); font-weight: 600; }
.tabs button .count { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; margin-left: 4px; }
.modal-back { position: fixed; inset: 0; background: rgba(10,25,40,.45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 12px; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(1080px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal header h3 { margin: 0; }
.modal .body { padding: 18px; }
.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }
.x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 9px; box-shadow: var(--shadow); font-size: 14px; animation: fade .2s ease; }
.toast.ok { background: var(--green); } .toast.err { background: var(--red); } .toast.warn { background: var(--amber); }
.alert { padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.alert.info { background: var(--blue-bg); border-color: #cfe0f3; }
.alert.ok, .ok-box { background: var(--green-bg); border-color: #bfe5cd; color: #145c33; padding: 11px 14px; border-radius: 9px; }
.alert.err, .err-box { background: var(--red-bg); border-color: #f4c7c2; color: #8a2119; padding: 11px 14px; border-radius: 9px; }
.alert.warn { background: var(--amber-bg); border-color: #f1d9a6; color: #6b4a10; }
.alert ul { margin: .3em 0 0; padding-left: 1.2em; }
.loading-block { padding: 40px; text-align: center; color: var(--muted); }
.loading-block::before { content: ""; display: block; margin: 0 auto 10px; width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.photo { width: 120px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #e9eef2; }
.photo.lg { width: 180px; height: 225px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

/* ---------- Program zawodów ---------- */
.race { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; overflow: hidden; }
.race-head { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: #f7f9fb; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.race-no { font-weight: 800; color: var(--navy); min-width: 52px; }
.race-time { font-family: var(--mono); font-weight: 600; }
.race-title { font-weight: 600; }
.race.break .race-head { background: var(--amber-bg); }
.race.not_required { opacity: .55; }
.lanes { width: 100%; border-collapse: collapse; font-size: 14px; }
.lanes td { padding: 6px 12px; border-bottom: 1px solid var(--line-2); }
.lanes tr:last-child td { border-bottom: 0; }
.lane-no { width: 64px; white-space: nowrap; color: var(--muted); font-weight: 700; }
.rule { color: var(--muted); font-style: italic; font-size: 13px; }
.res-time { font-family: var(--mono); text-align: right; white-space: nowrap; }
.rank { font-weight: 800; color: var(--navy); width: 40px; }
.day-head { margin: 22px 0 10px; font-size: 1.05rem; color: var(--navy); border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* ---------- Wyniki — wprowadzanie ---------- */
.results-grid input { padding: 6px 8px; font-family: var(--mono); }
.results-grid td { vertical-align: middle; }
.results-grid select { padding: 6px 8px; }
.calc table td input { font-family: var(--mono); }

/* ---------- Odprawa (mobilna) ---------- */
.checkin { max-width: 640px; margin: 0 auto; }
.scanner { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.scan-result { border-radius: 14px; padding: 16px; margin: 12px 0; display: grid; grid-template-columns: 100px 1fr; gap: 14px; align-items: start; border: 3px solid transparent; }
.scan-result.green { background: var(--green-bg); border-color: var(--green); }
.scan-result.red { background: var(--red-bg); border-color: var(--red); }
.scan-result.amber { background: var(--amber-bg); border-color: var(--amber); }
.scan-result .verdict { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.scan-result.green .verdict { color: var(--green); } .scan-result.red .verdict { color: var(--red); } .scan-result.amber .verdict { color: var(--amber); }
.scan-result img { width: 100px; height: 125px; object-fit: cover; border-radius: 8px; background: #fff; }
.boat-progress { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.boat-progress > div { height: 100%; background: var(--teal); transition: width .3s; }
.boat-done { background: var(--green); color: #fff; text-align: center; font-weight: 800; font-size: 1.2rem; padding: 14px; border-radius: 12px; }
.crew-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.crew-list li { display: flex; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line-2); }
.crew-list li.ok { color: var(--green); }
.crew-list li.blocked { color: var(--red); font-weight: 600; }
.office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.boat-card { border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.boat-card.complete { border-color: var(--green); background: #f5fbf7; }
.boat-card.issue { border-color: var(--red); }

/* ---------- Licencja elektroniczna ---------- */
.license-card { width: 100%; max-width: 520px; aspect-ratio: 85.6/54; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #0b3a53 0%, #0f5e74 60%, #0f8b8d 100%);
  color: #fff; display: grid; grid-template-columns: 30% 1fr 30%; gap: 10px; padding: 16px; box-shadow: 0 12px 34px rgba(11,58,83,.35); position: relative; font-size: clamp(10px, 2.2vw, 13px); }
.license-card .lc-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; background: #dfe6ec; border: 2px solid rgba(255,255,255,.7); }
.license-card .lc-org { font-size: .82em; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.license-card .lc-title { font-weight: 800; font-size: 1.15em; margin-bottom: .5em; }
.license-card .lc-name { font-size: 1.35em; font-weight: 800; line-height: 1.15; margin-bottom: .4em; }
.license-card dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 0; font-size: .92em; }
.license-card dt { opacity: .75; }
.license-card dd { margin: 0; font-weight: 600; }
.license-card .lc-qr { background: #fff; border-radius: 10px; padding: 6px; align-self: center; }
.license-card .lc-qr img, .license-card .lc-qr svg, .license-card .lc-qr canvas { width: 100%; height: auto; display: block; }
.license-card .lc-num { position: absolute; bottom: 10px; right: 16px; font-family: var(--mono); font-weight: 700; font-size: 1.05em; }
.license-card .lc-valid { position: absolute; bottom: 10px; left: 16px; font-size: .85em; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.18); }

/* ---------- Kroki (formularze wieloetapowe) ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 13.5px; }
.steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-weight: 700; color: var(--navy); }
.steps li.done { background: var(--green-bg); color: var(--green); } .steps li.done::before { content: "✓"; background: var(--green); color: #fff; }
.steps li.active { background: var(--navy); color: #fff; } .steps li.active::before { background: var(--accent); color: #fff; }
.money { font-family: var(--mono); font-weight: 700; }
.sum-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.sum-box > div { background: #f7f9fb; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.sum-box b { display: block; font-size: 1.25rem; color: var(--navy); font-family: var(--mono); }
.sum-box .bad b { color: var(--red); } .sum-box .good b { color: var(--green); }
.thumb { width: 48px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: #e9eef2; }

/* ---------- Strony publiczne ---------- */
body.public { background: #fff; }
.pub { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.pub-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.pub-nav a { padding: 7px 12px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.pub-nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pub-head { display: flex; align-items: center; gap: 14px; background: #0a2e4a url(../img/card-header.png) center / 640px auto repeat; color: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; border-bottom: 4px solid var(--accent); }
.pub-head img { height: 46px; background: #fff; border-radius: 8px; padding: 4px; }
.pub-head b { display: block; font-size: 1.05rem; } .pub-head span { font-size: 13px; color: #c9d7e6; }
body.embedded .pub-head { display: none; }
body.embedded .pub-nav { display: none; }
body.embedded { background: transparent; }
.club-list .cal-item { grid-template-columns: 1fr; }
.cal-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.cal-date { text-align: center; background: var(--navy); color: #fff; border-radius: 10px; padding: 8px 4px; border-bottom: 3px solid var(--accent); }
.cal-date b { display: block; font-size: 1.5rem; line-height: 1; }
.cal-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.cal-ext .cal-date { background: var(--teal-2); color: var(--navy); border-bottom-color: var(--sky); }
.live-dot { display: inline-block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Strony proste (logowanie, weryfikacja, instalator) ---------- */
body.plain { background: var(--bg); }
.narrow { max-width: 760px; margin: 0 auto; padding: 32px 16px; }
.narrow.install .grid2 { margin-bottom: 4px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #0a2e4a url(../img/card-header.png) center / 640px auto repeat; }
.login-card { border-top: 5px solid var(--accent); }
.login-card .brand-mark { width: 62px; height: 52px; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card .brand { color: var(--navy); padding: 0 0 18px; }
.login-card .brand span { color: var(--muted); }
.verify { text-align: center; border-radius: 16px; padding: 30px 18px; border: 3px solid; background: #fff; }
.verify.good { border-color: var(--green); } .verify.good h1 { color: var(--green); }
.verify.bad { border-color: var(--red); } .verify.bad h1 { color: var(--red); }
.verify .big { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; }
.org { text-align: center; color: var(--muted); font-weight: 600; }
.checks { list-style: none; padding: 0; columns: 2; font-size: 14px; }
.checks li.ok { color: var(--green); } .checks li.bad { color: var(--red); font-weight: 600; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: -270px; width: 260px; z-index: 50; transition: left .2s; }
  .shell.nav-open .side { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .btn.menu-btn { display: inline-flex; }
  .content { padding: 14px; }
  .topbar { padding: 8px 14px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .cal-item { grid-template-columns: 70px 1fr; }
  .cal-item > :last-child { grid-column: 1 / -1; }
  .checks { columns: 1; }
}
@media print {
  .side, .topbar, .no-print, .toasts, .pub-nav, .offline-banner { display: none !important; }
  .shell { display: block; } .content { padding: 0; } .card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
  .license-card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .race { break-inside: avoid; }
}
table.t tr.selected td { background: #eef5fb; }
