/* Panel zespołu Interkoordynacje. Kolory i krój według księgi znaku v2 (jak na stronie). */
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url(fonts/jost-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url(fonts/jost-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  color-scheme: light;
  --ink: #132d4b; --ink-soft: #3b4d62; --muted: #56616e; --paper: #f2f5f8; --surface: #fff; --line: #d9e1ea;
  --navy: #132d4b; --night: #08131f; --on-navy: #f2f5f8; --steel: #c8d3df; --signal: #ff5a1f; --link: #1d4f86;
  --pos: #1f7a4d; --pos-bg: #e3f3ea; --neg: #b3261e; --neg-bg: #fbe7e5; --att: #8a5a00; --att-bg: #fdf1d8; --neu-bg: #e8eef5;
  --f: "Jost", "Futura", "Century Gothic", system-ui, sans-serif; --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark; --ink: #f2f5f8; --ink-soft: #c8d3df; --muted: #97a4b3; --paper: #08131f; --surface: #0f2033; --line: #22364d;
    --link: #8fbef0; --pos: #7fd6a6; --pos-bg: #12362a; --neg: #ff9a8f; --neg-bg: #3a1a18; --att: #ffcc70; --att-bg: #3a2c10; --neu-bg: #1a2e45;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.55 var(--f); color: var(--ink); background: var(--paper); }
a { color: var(--link); }
h1 { font-weight: 600; font-size: clamp(26px, 5vw, 34px); line-height: 1.15; margin: 8px 0 16px; }
h2 { font-weight: 600; font-size: 20px; margin: 0 0 12px; }
h3 { font-weight: 600; font-size: 16px; margin: 16px 0 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 16px; }
.small { font-size: 14px; } .muted { color: var(--muted); }
code { font-size: 14px; word-break: break-all; }

.top { background: var(--night); color: var(--on-navy); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-navy); text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand span { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; }
.nav a { color: var(--steel); text-decoration: none; padding: 8px 10px; border-radius: 6px; white-space: nowrap; font-weight: 500; font-size: 15px; }
.nav a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--signal); }
.logout { margin-left: auto; }
.logout .link { color: var(--steel); font-size: 14px; text-decoration: none; }
@media (max-width: 700px) { .nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 0; margin: 0 -6px; } .nav a { padding: 8px 6px; font-size: 14px; } .brand img { height: 22px; } }
.demo-bar { background: var(--att-bg); color: var(--att); text-align: center; font-size: 14px; padding: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 0 0 16px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.accent { border-left: 4px solid var(--signal); }
.card.narrow { max-width: 460px; margin: 0 auto 16px; }
details.card > summary { cursor: pointer; }
details.card[open] > summary { margin-bottom: 16px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.grid2 .card { margin: 0; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
a.tile:hover { border-color: var(--steel); }
.tile-label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tile-text { font-size: 15px; color: var(--ink-soft); }
progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 3px; background: var(--neu-bg); }
progress::-webkit-progress-bar { background: var(--neu-bg); border-radius: 3px; }
progress::-webkit-progress-value { background: var(--navy); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) progress::-webkit-progress-value { background: var(--steel); } }

.badge { display: inline-block; font-size: 13px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--neu-bg); color: var(--ink-soft); white-space: nowrap; align-self: flex-start; vertical-align: middle; }
.badge.positive { background: var(--pos-bg); color: var(--pos); } .badge.negative { background: var(--neg-bg); color: var(--neg); } .badge.attention { background: var(--att-bg); color: var(--att); }

.rowlink { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.rowlink:first-of-type { border-top: 0; }
.rowlink span { color: var(--muted); font-size: 15px; grid-column: 1; }
.rowlink .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--link); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 16px var(--f); padding: 10px 18px; border-radius: 6px; border: 1px solid var(--navy); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn.primary { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { border-color: var(--steel); } :root:not([data-theme="light"]) .btn.primary { background: var(--steel); color: var(--night); } }
.btn.ghost { border-color: var(--line); }
.btn.small { font-size: 14px; padding: 6px 12px; min-height: 36px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.danger { color: var(--neg) !important; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.actions form { margin: 0; }

.form { display: grid; gap: 14px; }
.form h2 { margin-top: 12px; }
label { display: grid; gap: 4px; font-weight: 500; font-size: 15px; }
input, select, textarea { font: 400 16px var(--f); color: var(--ink); background: var(--surface); border: 1px solid var(--steel); border-radius: 6px; padding: 10px 12px; min-height: 44px; width: 100%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { border-color: #33506f; } }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
input[disabled] { opacity: .7; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--navy); }
label.check, label.opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.row2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 500; margin-bottom: 6px; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
form.inline input, form.inline select { width: auto; flex: 1 1 160px; }
form.inline label { flex: 1 1 200px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: end; }
.filters input, .filters select { width: auto; flex: 1 1 200px; }
.note { background: var(--neu-bg); border-radius: 6px; padding: 10px 12px; font-size: 15px; margin: 0; }

.flash { padding: 12px 14px; border-radius: 6px; margin: 0 0 16px; background: var(--pos-bg); color: var(--pos); }
.flash.warn { background: var(--att-bg); color: var(--att); }
.flash a { color: inherit; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.card:not(.flush) .table th, .card:not(.flush) .table td { padding-left: 0; }
@media (max-width: 640px) { .card.flush .table thead { display: none; } .card.flush .table tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; } .card.flush .table td { display: block; border: 0; padding: 4px 16px; } }
.hours { width: 90px; min-height: 36px; padding: 6px 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 15px; } .kv dd { margin: 0; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: grid; }
.stats strong { font-size: 26px; font-weight: 600; } .stats span { color: var(--muted); font-size: 14px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.subnav a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.subnav a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.crumbs { font-size: 14px; color: var(--muted); margin: 4px 0; }
.line { padding: 6px 0; }
.reveal { display: grid; gap: 6px; background: var(--att-bg); padding: 12px; border-radius: 6px; margin-bottom: 12px; }
.reveal div { display: flex; justify-content: space-between; gap: 12px; } .reveal span { color: var(--muted); }
.copy { display: flex; gap: 8px; } .copy input { flex: 1; }
.todo { padding-left: 20px; } .todo li { margin: 6px 0; }
.brief { white-space: normal; background: var(--paper); border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.bq { display: grid; gap: 6px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.bq .opt { align-items: center; } .bq .opt input[type=radio] { margin: 0; }

.modules { padding-left: 24px; margin: 0; } .modules li { padding: 6px 0; } .modules li.done a { color: var(--ink-soft); }
.tick { color: var(--pos); margin-left: 8px; font-weight: 600; }
.module { font-size: 17px; line-height: 1.65; max-width: 760px; }
.module h1 { margin-top: 0; }
.module ul, .module ol { padding-left: 22px; } .module li { margin: 6px 0; }
.module table { border-collapse: collapse; width: 100%; font-size: 15px; } .module td, .module th { border-top: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.module-next { max-width: 760px; display: flex; justify-content: flex-end; }
.rules { padding-left: 20px; margin: 12px 0 0; }
.cert-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.q legend { float: left; width: 100%; padding: 0; font-weight: 500; line-height: 1.4; margin-bottom: 10px; } .q legend + * { clear: both; } .qn { color: var(--muted); }
.q .opt { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.q .opt:has(input:checked) { border-color: var(--navy); background: var(--neu-bg); }
.score { font-size: 34px; font-weight: 600; margin: 0 0 8px; }
.ans { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; } .ans.ok { color: var(--pos); } .ans.bad { color: var(--neg); } .ans strong { color: var(--ink); font-weight: 500; }
.qr { display: flex; justify-content: center; margin: 12px 0; } .qr img, .qr svg { background: #fff; padding: 8px; border-radius: 4px; }

.doc { font-size: 15px; line-height: 1.6; } .doc h1 { font-size: 22px; } .doc h2 { font-size: 17px; margin-top: 18px; }
.doc table { border-collapse: collapse; } .doc td, .doc th { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.field { background: var(--neu-bg); padding: 0 4px; border-radius: 3px; } .field.empty { color: var(--muted); }
mark.draft-note { background: var(--att-bg); color: var(--att); padding: 0 4px; border-radius: 3px; }
.verify { border-radius: 8px; padding: 16px; margin: 12px 0; } .verify.ok { background: var(--pos-bg); } .verify.bad { background: var(--neg-bg); }
.verify-status { font-weight: 600; font-size: 20px; margin-bottom: 8px; } .verify.ok .verify-status { color: var(--pos); } .verify.bad .verify-status { color: var(--neg); }

.public { background: var(--paper); }
.auth { max-width: 520px; margin: 0 auto; padding: 32px 16px 16px; }
.auth-logo { display: block; text-align: center; margin-bottom: 24px; } .auth-logo img { height: 40px; width: auto; }
.foot { color: var(--muted); font-size: 13px; padding-top: 8px; padding-bottom: 32px; } .auth-foot { text-align: center; } .foot a { color: inherit; }
.steps { padding-left: 20px; }

/* dokumenty do druku i certyfikat */
.print-page { background: #e9eef3; color: #132d4b; }
.print-actions { display: flex; justify-content: space-between; gap: 8px; max-width: 900px; margin: 0 auto; padding: 16px; }
.doc-print { background: #fff; color: #132d4b; max-width: 820px; margin: 0 auto 32px; padding: 48px clamp(20px, 6vw, 64px); font-size: 14px; line-height: 1.6; }
.doc-print .field { background: none; font-weight: 500; }
.doc-logo { height: 32px; width: auto; margin-bottom: 16px; }
.doc-stamp { border-top: 1px solid #d9e1ea; margin-top: 32px; padding-top: 12px; font-size: 12px; color: #56616e; }
.certificate { max-width: 1000px; margin: 0 auto 32px; padding: 0 16px; }
.cert-inner { background: #fff; color: #132d4b; aspect-ratio: 1.414; border: 10px solid #132d4b; outline: 1px solid #ff5a1f; outline-offset: -18px; padding: clamp(20px, 5vw, 56px); display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: space-between; }
.cert-logo { height: clamp(24px, 4vw, 44px); width: auto; }
.cert-kicker { letter-spacing: .3em; text-transform: uppercase; font-weight: 500; font-size: clamp(11px, 1.4vw, 14px); color: #56616e; margin: 8px 0 0; }
.cert-title { font-size: clamp(22px, 4.2vw, 46px); margin: 0; letter-spacing: .02em; }
.cert-sub { margin: 0; color: #56616e; font-size: clamp(12px, 1.6vw, 16px); }
.cert-name { font-size: clamp(22px, 4vw, 40px); font-weight: 500; margin: 0; border-bottom: 2px solid #ff5a1f; padding: 0 24px 4px; }
.cert-text { margin: 0; font-size: clamp(12px, 1.6vw, 16px); max-width: 620px; }
.cert-meta { display: flex; gap: clamp(12px, 3vw, 40px); flex-wrap: wrap; justify-content: center; }
.cert-meta div { display: grid; } .cert-meta span { font-size: clamp(10px, 1.2vw, 12px); letter-spacing: .12em; text-transform: uppercase; color: #56616e; } .cert-meta strong { font-weight: 600; font-size: clamp(12px, 1.6vw, 16px); }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; }
.cert-sign { display: grid; text-align: left; font-size: clamp(11px, 1.3vw, 14px); } .cert-sign .sig { font-size: clamp(16px, 2.4vw, 24px); font-style: italic; border-bottom: 1px solid #c8d3df; padding-bottom: 2px; margin-bottom: 4px; }
.cert-qr { display: grid; justify-items: end; font-size: clamp(9px, 1.1vw, 11px); color: #56616e; } .cert-qr .qr { margin: 0; } .cert-qr .qr img { width: clamp(60px, 10vw, 110px); height: auto; padding: 0; }
@media print {
  @page { size: A4; margin: 0; }
  .no-print { display: none !important; }
  body.print-page { background: #fff; }
  .certificate { max-width: none; padding: 0; } .cert-inner { height: 100vh; aspect-ratio: auto; }
  .doc-print { margin: 0; max-width: none; padding: 16mm 18mm; }
}
@media print and (orientation: landscape) { @page { size: A4 landscape; } }
form.inline input[type=date] { flex: 0 0 auto; width: auto; }
.form > .btn { justify-self: start; }
@media (max-width: 640px) { .form > .btn { justify-self: stretch; } }

/* ---- czat ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--signal); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.nav-count { margin-left: 6px; vertical-align: 1px; }
.chat { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .chat { grid-template-columns: 320px minmax(0, 1fr); } .chat-list { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; } .chat-back { display: none; } }
@media (max-width: 899px) { .chat.has-current .chat-list { display: none; } .chat:not(.has-current) .chat-empty { display: none; } }
.chat-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 8px; min-width: 0; }
.chat-list-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 0 4px 8px; }
.chat-list-head h1 { margin: 0; font-size: 24px; }
.chat-list-tools { display: flex; gap: 6px; }
.chat-group { margin: 0 0 8px; }
.chat-group-label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 4px 4px; cursor: default; }
details.chat-group > summary { cursor: pointer; }
.chat-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 8px; border-radius: 6px; color: inherit; text-decoration: none; }
.chat-item:hover { background: var(--paper); }
.chat-item[aria-current] { background: var(--neu-bg); box-shadow: inset 3px 0 0 var(--signal); }
.chat-item-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.unread .chat-item-name { font-weight: 600; }
.chat-item-time { font-size: 12px; color: var(--muted); align-self: center; font-variant-numeric: tabular-nums; }
.chat-item .count { align-self: center; }
.chat-item-last { grid-column: 1 / -1; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 32px; text-align: center; }
.chat-head { display: flex; gap: 12px; align-items: center; }
.chat-back { font-size: 24px; text-decoration: none; padding: 4px 10px 4px 0; }
.chat-title { min-width: 0; } .chat-title h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; } .chat-title p { margin: 2px 0 0; }
.pin { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--signal); border-radius: var(--r); padding: 10px 14px; color: inherit; text-decoration: none; font-size: 15px; }
.pin summary { cursor: pointer; }
.pin[open] summary { margin-bottom: 10px; }
.pin .brief { margin: 10px 0; }
.chat-log { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.day, .new-line { align-self: center; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.new-line { color: var(--signal); align-self: stretch; text-align: center; border-top: 1px solid var(--signal); padding-top: 4px; }
.msg { position: relative; align-self: flex-start; max-width: min(640px, 86%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 36px 8px 12px; margin-top: 8px; }
.msg.grouped { margin-top: 2px; }
.msg.mine { align-self: flex-end; background: var(--neu-bg); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.msg-head { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; margin-bottom: 2px; }
.msg-head time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.small-badge { font-size: 11px; padding: 1px 8px; }
.msg-body p { margin: 0; overflow-wrap: anywhere; }
.msg-body p + .msg-img, .msg-body p + .msg-file { margin-top: 6px; }
.msg-img { display: block; } .msg-img img { display: block; max-width: 100%; max-height: 360px; border-radius: 8px; }
.msg-file { display: inline-block; overflow-wrap: anywhere; }
.msg.deleted { background: transparent; border-style: dashed; }
.msg-menu { position: absolute; top: 4px; right: 4px; }
.msg-menu summary { list-style: none; cursor: pointer; color: var(--muted); padding: 0 8px; border-radius: 4px; line-height: 1.6; }
.msg-menu summary::-webkit-details-marker { display: none; }
.msg-menu[open] summary { background: var(--paper); }
.msg-menu-items { position: absolute; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; display: grid; gap: 6px; white-space: nowrap; box-shadow: 0 4px 16px rgba(8, 19, 31, .15); }
.msg-menu-items form { margin: 0; }
.read-info { align-self: flex-end; margin: 4px 0 0; }
.older { text-align: center; margin: 4px 0 8px; }
.chat-hello { text-align: center; padding: 24px 8px; }
.composer { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: end; background: var(--paper); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.composer textarea { resize: none; min-height: 44px; max-height: 200px; line-height: 1.4; }
.composer .send { min-width: 80px; }
.attach { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--steel); border-radius: 6px; cursor: pointer; font-size: 20px; background: var(--surface); }
.attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attach:focus-within { outline: 2px solid var(--signal); outline-offset: 1px; }
.composer-file, .composer-err { grid-column: 1 / -1; margin: 0; }
.composer-off { text-align: center; padding: 12px; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people form { margin: 0; }
select[multiple] { min-height: 180px; padding: 4px; }
.opts-row { display: flex; gap: 16px; flex-wrap: wrap; } .opts-row legend { width: 100%; }

/* ---- raport po wydarzeniu ---- */
.head-actions { margin: 0 0 16px; }
.stack { display: grid; gap: 10px; }
.btn.choice { display: grid; justify-items: start; text-align: left; gap: 2px; padding: 14px 16px; }
.btn.choice span { font-size: 14px; font-weight: 400; color: var(--muted); }
.report-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.report-head h1 { margin-bottom: 4px; }
.hint { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.report textarea { min-height: 88px; line-height: 1.45; }
.team-row { border-top: 1px solid var(--line); padding: 12px 0; }
.team-row legend { float: left; width: 100%; margin-bottom: 8px; } .team-row legend + * { clear: both; }
.team-fields { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) 100px; }
.team-fields .wide { grid-column: 1 / -1; }
@media (min-width: 700px) { .team-fields { grid-template-columns: 180px 110px minmax(0, 1fr); } .team-fields .wide { grid-column: auto; } }
.media-add { display: flex; flex-wrap: wrap; gap: 8px; }
.media-add .btn { position: relative; overflow: hidden; }
.media-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.media-add .btn:focus-within { outline: 2px solid var(--signal); outline-offset: 1px; }
@media (max-width: 520px) { .media-add .btn { flex: 1 1 100%; } }
.upload-list { display: grid; gap: 6px; margin: 10px 0; }
.upload-row { display: grid; gap: 4px; font-size: 14px; } .upload-row.failed { color: var(--neg); } .upload-row.failed progress { display: none; }
.upload-row span { overflow-wrap: anywhere; }
.rules-box { margin: 8px 0 12px; } .rules-box ul { padding-left: 20px; margin: 8px 0; }
.media-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tile-media { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.tile-media.internal { border-style: dashed; opacity: .8; }
.tile-media img, .tile-media video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--night); }
.tile-media figcaption { padding: 8px; display: grid; gap: 6px; }
.tile-media figcaption input { min-height: 36px; padding: 6px 8px; font-size: 15px; }
.tile-media-actions { display: flex; justify-content: space-between; gap: 8px; }
.report-bar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; background: var(--paper); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); margin-top: 8px; }
.report-bar [data-save-state] { margin-right: auto; }
@media (max-width: 520px) { .report-bar .btn { flex: 1 1 auto; } }
.acct { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 2px 0; } .acct form { margin: 0; }

/* raport u klienta i do druku */
.report-page { background: var(--paper); }
.report-wrap { max-width: 900px; margin: 0 auto; padding: 16px; }
.report-actions { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.report-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 5vw, 48px); }
.report-doc-head { border-bottom: 2px solid var(--signal); padding-bottom: 16px; margin-bottom: 8px; }
.report-doc-head .doc-logo { height: 30px; }
.kicker { letter-spacing: .16em; text-transform: uppercase; font-size: 12px; font-weight: 500; color: var(--muted); margin: 8px 0 0; }
.report-doc h1 { margin: 4px 0 12px; }
.report-meta { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; }
.report-meta dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); } .report-meta dd { margin: 0; font-weight: 500; }
.report-sec { padding: 16px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.report-sec h2 { font-size: 18px; margin-bottom: 8px; } .report-sec p { margin: 0; } .report-sec ul { margin: 0; padding-left: 20px; }
.report-sec.lead p { font-size: 18px; }
.report-nums { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.report-nums div { display: grid; gap: 2px; border-left: 3px solid var(--signal); padding-left: 12px; }
.report-nums strong { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; } .report-nums span { font-size: 14px; color: var(--muted); }
.report-team { list-style: none; padding: 0 !important; margin-top: 8px !important; }
.report-media { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.report-media figure { margin: 0; display: grid; gap: 4px; }
.report-media img, .report-media video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--night); display: block; }
.report-media figcaption { font-size: 14px; }
.report-foot { font-size: 12px; color: var(--muted); padding-top: 16px; }
.print-only { display: none; }
@media print {
  .report-page { background: #fff; } .report-wrap { max-width: none; padding: 0; }
  .report-doc { border: 0; padding: 12mm 14mm; color: #132d4b; background: #fff; }
  .report-media { grid-template-columns: repeat(3, 1fr); } .report-media video { display: none; } .print-only { display: block; }
}

/* ---- Gwarancja obsady ---- */
.btn.big { min-height: 52px; font-size: 18px; padding: 12px 22px; width: 100%; max-width: 420px; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-cell form { margin: 0; }
.row-extra { margin: -4px 0 8px; }
.badge.level-standard { background: var(--neu-bg); color: var(--ink-soft); }
.badge.level-premium { background: #e6eefb; color: #1d4f86; }
.badge.level-vip { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.level-premium { background: #173150; color: #8fbef0; } :root:not([data-theme="light"]) .badge.level-vip { background: #f2f5f8; color: #132d4b; } }
.level-card { display: grid; gap: 4px; }
.level-card .level-name { font-size: 32px; font-weight: 600; margin: 0; line-height: 1.1; }
.level-card.level-vip { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.level-card.level-vip .tile-label, .level-card.level-vip .small { color: var(--steel); }
.big-num { font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.onsite .actions, .onsite form { margin-top: 10px; }
.drop { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.drop summary { color: var(--muted); cursor: pointer; font-size: 15px; }

.cal-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; margin-bottom: 8px; }
.cal-head h2 { margin: 0; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-day { margin: 0; }
.cal .day { width: 100%; aspect-ratio: 1; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font: 500 16px var(--f); font-variant-numeric: tabular-nums; cursor: pointer; position: relative; padding: 0; }
.cal .day.free { background: var(--pos-bg); border-color: var(--pos); color: var(--pos); }
.cal .day.busy { background: var(--neg-bg); border-color: var(--neg); color: var(--neg); text-decoration: line-through; }
.cal .day:disabled { opacity: .35; cursor: default; }
.cal .day i { position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--signal); }
.av-key { display: inline-block; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); }
.av-key.free { background: var(--pos-bg); color: var(--pos); border-color: var(--pos); }
.av-key.busy { background: var(--neg-bg); color: var(--neg); border-color: var(--neg); }

.board-sum { display: grid; gap: 10px; margin-bottom: 8px; }
.board-big { display: flex; align-items: baseline; gap: 10px; }
.board-big .num { font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.board-big span:last-child { font-size: 18px; color: var(--ink-soft); }
.board-bar { display: flex; height: 12px; border-radius: 999px; background: var(--neu-bg); overflow: hidden; }
.board-bar .seg { width: 0; transition: width .4s; }
.seg.here, .dot.here, .dot.done { background: var(--pos); }
.seg.coming, .dot.coming { background: #4a86c5; }
.seg.unconfirmed, .dot.unconfirmed, .dot.wait { background: #e0a82e; }
.dot.absent, .dot.dropped { background: var(--neg); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.board-legend .dot { margin: 0 4px 0 0; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.board-list li:first-child { border-top: 0; }
.board-list:not(.coord) li span:last-child { color: var(--muted); font-size: 15px; margin-left: auto; }
.board-list .who { display: grid; flex: 1 1 200px; min-width: 0; }
.board-list .who .small { color: var(--muted); }
.board-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.board-actions form { margin: 0; }
.board-list li.st-dropped .who strong, .board-list li.st-absent .who strong { text-decoration: line-through; color: var(--muted); }
.rate-table select { min-width: 56px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.file-btn { display: grid; gap: 6px; font-weight: 500; }
.file-btn input[type=file] { font: 400 15px var(--f); max-width: 100%; }
a.card.rowlink { display: grid; border-top: 1px solid var(--line); padding: 14px 16px; margin-bottom: 16px; }

/* ---- Asystent AI ---- */
.ai-note textarea { width: 100%; }
.ai-filled { box-shadow: 0 0 0 2px #4a86c5 inset; }
.msg .translate { margin-top: 2px; }
.msg .translation { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--steel); background: var(--paper); border-radius: 0 6px 6px 0; }

/* ---- Portal klienta ---- */
.order-roles { display: grid; gap: 8px; }
.order-role { display: grid; grid-template-columns: 1fr 88px; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-weight: 400; }
.order-role:first-child { border-top: 0; }
.order-role input { text-align: center; font-variant-numeric: tabular-nums; }
.quote-price { font-size: 30px; font-weight: 600; margin: 4px 0; font-variant-numeric: tabular-nums; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.team-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 16px; }
.team-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; }
.team-card h2 { margin: 0 0 4px; font-size: 20px; }
.team-card img, .avatar-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--neu-bg); color: var(--ink-soft); display: grid; place-items: center; font-size: 36px; font-weight: 600; }
.photo-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
.feedback fieldset { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.feedback legend { font-weight: 500; margin-bottom: 6px; padding: 0; }
.feedback fieldset label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .team-card, .photo-row { grid-template-columns: 64px minmax(0, 1fr); } .team-card img, .avatar, .avatar-img { width: 64px; height: 64px; font-size: 26px; } }
.codes { columns: 2; gap: 24px; padding-left: 24px; margin: 0; font-size: 18px; line-height: 1.9; }
.codes code { letter-spacing: .06em; }
