/* Winnerz Booking - system wizualny. Kolor marki z logo: #1a4708 */
:root {
  --ground: #f4f6f1; --surface: #ffffff; --sunk: #eaeee5; --ink: #151b12; --muted: #5c6857; --faint: #7d8878;
  --line: #dce2d6; --accent: #1a4708; --accent-ink: #ffffff; --accent-soft: #e3ecd9;
  --warn: #9a5c08; --warn-soft: #fbefd9; --crit: #b3261e; --crit-soft: #f9e1de;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px;
  color-scheme: light;
}
/* ciemny motyw: z ustawienia systemu (gdy konto nie wymusza jasnego) albo z wyboru w koncie */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d100c; --surface: #151a13; --sunk: #10140f; --ink: #eaf0e4; --muted: #9ba697; --faint: #7f8a7b;
    --line: #262d23; --accent: #a6d67c; --accent-ink: #0d100c; --accent-soft: #1f2b18;
    --warn: #e3a847; --warn-soft: #2b2213; --crit: #f0877d; --crit-soft: #2e1714;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0d100c; --surface: #151a13; --sunk: #10140f; --ink: #eaf0e4; --muted: #9ba697; --faint: #7f8a7b;
  --line: #262d23; --accent: #a6d67c; --accent-ink: #0d100c; --accent-soft: #1f2b18;
  --warn: #e3a847; --warn-soft: #2b2213; --crit: #f0877d; --crit-soft: #2e1714;
  color-scheme: dark;
}
/* "Grafit i zloto": ciemny grafit z akcentem jak zlota plyta; ostrzezenia pomaranczowe, zeby nie zlaly sie z akcentem */
:root[data-theme="gold"] {
  --ground: #0e0e10; --surface: #17171a; --sunk: #111113; --ink: #f2efe8; --muted: #a8a397; --faint: #878276;
  --line: #2a2a2f; --accent: #e3b449; --accent-ink: #15120a; --accent-soft: #2d2413;
  --warn: #f08c4f; --warn-soft: #2e1c11; --crit: #f0877d; --crit-soft: #2e1714;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--faint); }
.quiet { color: var(--muted); font-size: 14px; }
.warn-text { color: var(--warn); }

.logo { display: block; background: var(--accent); -webkit-mask: url("/static/img/logo-light.png") center / contain no-repeat; mask: url("/static/img/logo-light.png") center / contain no-repeat; }

/* przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; max-width: 100%; }
/* przycisk szerszy niz kolumna lamie tekst zamiast wystawac (np. w waskiej kolumnie karty koncertu) */
.panel .btn, .card .btn { white-space: normal; text-align: center; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* formularze */
.form { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.narrow { max-width: 440px; }
.field { display: grid; gap: 6px; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field label, .field legend { font-size: 13px; color: var(--muted); font-weight: 500; padding: 0; }
.field input, .field select { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-error { background: var(--crit-soft); color: var(--crit); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0; }
ul.form-error { padding-left: 28px; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-size: 14px; }

/* logowanie */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
/* strona podpisu umowy dla organizatora (bez logowania) */
.signature-preview { display: block; max-width: 220px; max-height: 80px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.esign { max-width: 640px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 16px; }
.esign-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.esign-brand .logo { width: 40px; height: 48px; }
.esign-card { display: grid; gap: 12px; padding: 20px; }
.esign-card h1 { font-size: 24px; font-weight: 600; }
.esign-card h2 { font-size: 18px; font-weight: 600; }
.esign-card .form { display: grid; gap: 12px; }
/* pole podpisu: jasne jak kartka w obu motywach, touch-action none - palec rysuje zamiast przewijac strone */
.sig-field .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.sig-pad { display: block; width: 100%; height: 180px; background: #fbfaf6; border: 1px dashed #9a9486; border-radius: 10px; touch-action: none; cursor: crosshair; }
.sig-tools { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.sig-tools [hidden] { display: none; }
.sig-pad.is-locked { touch-action: auto; pointer-events: none; cursor: default; border-style: solid; border-color: var(--accent); }
.sig-mini { display: grid; gap: 8px; }
.sig-mini[hidden] { display: none; }
.sig-mini-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #fff; color: #222; border: 1px solid var(--line); border-radius: 8px; padding: 14px 10px 12px; }
.sig-mini-party { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 11px; min-width: 0; }
.sig-mini-party b { font-size: 11px; letter-spacing: .02em; }
.sig-mini-party small { font-size: 9px; color: #666; overflow-wrap: anywhere; }
.sig-mini-slot { height: 48px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.sig-mini-slot img { max-width: 90%; max-height: 46px; }
.sig-mini-dots { width: 80%; border-bottom: 1.5px dotted #444; }
.login-brand { background: var(--accent); color: var(--accent-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-brand .logo { width: 120px; height: 120px; background: var(--accent-ink); }
.login-brand-text { display: grid; gap: 14px; }
.login-brand h1 { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 7vw, 88px); line-height: .9; text-transform: uppercase; letter-spacing: .02em; }
.login-brand p { max-width: 34ch; opacity: .82; }
.login-form { padding: 48px 24px; display: flex; flex-direction: column; justify-content: center; gap: 20px; width: 100%; max-width: 400px; margin-inline: auto; }
.login-form h2 { font-size: 24px; font-weight: 600; }

/* powloka */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail { border-right: 1px solid var(--line); background: var(--surface); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail-top { display: flex; align-items: center; gap: 12px; padding-inline: 4px; text-decoration: none; }
.rail-top .logo { width: 46px; height: 46px; flex: none; }
.rail-top .brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-family: var(--display); line-height: 1.1; }
.rail-top .brand b { display: block; font-weight: 600; font-size: 13px; letter-spacing: .06em; white-space: nowrap; }
.rail-top .brand small { display: block; font-weight: 500; font-size: 12px; letter-spacing: .08em; color: var(--muted); }

/* listy wyboru spojne z reszta interfejsu (bez natywnej ramki systemu) */
.field select, .inline-status select, .inline-fill select, .filters select {
  -webkit-appearance: none; appearance: none; background-color: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field select:hover, .inline-status select:hover, .filters select:hover { border-color: var(--faint); }
.inline-status select { padding: 6px 30px 6px 10px; font-size: 13px; font-weight: 500; min-width: 170px; }
.status-select { box-shadow: inset 3px 0 0 var(--line); }
.status-select.status-signed, .status-select.status-advance_paid, .status-select.status-settled { box-shadow: inset 3px 0 0 var(--accent); }
.status-select.status-draft { box-shadow: inset 3px 0 0 var(--warn); }
.status-select.status-played { box-shadow: inset 3px 0 0 var(--ink); }
.status-select.status-cancelled { box-shadow: inset 3px 0 0 var(--crit); }

/* kwoty i finanse */
.money { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.money .cur { font-family: var(--body); font-size: .72em; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.fin { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.fin-grid { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(96px, 1fr)); min-width: 520px; }
.fin-grid > * { padding: 9px 14px; }
.fin-grid .c { text-align: right; }
.fin-colhead { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.fin-fee { font-weight: 600; background: var(--sunk); }
.fin-group { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; padding-top: 14px; padding-bottom: 4px; border-top: 1px solid var(--line); }
.fin-group b { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 15px; }
.fin-group small { color: var(--faint); font-size: 12px; }
.fin-sub { color: var(--muted); font-size: 14px; }
.fin-net { font-weight: 600; }
.fin-net .money { font-size: 17px; color: var(--accent); }
.table.finance tr.is-strong td { font-weight: 600; }
.table.finance tr.is-muted td { color: var(--muted); }
.table.finance tr.is-head td { font-weight: 600; background: var(--sunk); }
.table.finance tr.is-group td { border-top: 2px solid var(--line); }
.doc-cell { display: grid; gap: 2px; font-size: 13px; white-space: nowrap; }
.quiet-link { color: var(--faint); }
.inline-status { display: flex; gap: 6px; align-items: center; margin: 0; }
.organizers-table td small a { color: inherit; }
.event-form:has(#e-allday:checked) .only-timed { display: none; }
a.chip-google:hover { border-color: #4285f4; color: var(--ink); }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.is-active { color: var(--ink); }
.note-cell { font-size: 13px; color: var(--muted); max-width: 260px; white-space: pre-line; }
.status-help { font-size: 13px; }
.status-help summary { cursor: pointer; color: var(--muted); }
.status-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; }
.status-help dt { font-weight: 600; }
.status-help dd { margin: 0; color: var(--muted); }
.artist { display: flex; align-items: center; gap: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; margin: 0; }
.artist-empty { justify-content: center; font-size: 14px; font-weight: 600; text-decoration: none; }
.artist-settings { margin-top: -10px; padding: 4px 10px; font-size: 13px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.artist-settings:hover, .artist-settings[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.artist-text { display: grid; min-width: 0; flex: 1; }
.artist-text small, .artist-text label { font-size: 12px; color: var(--muted); line-height: 1.2; }
.artist-text b { font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-text select { background: transparent; border: 0; padding: 0; font-weight: 600; width: 100%; cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 15px; flex: none; }
.avatar-muted { background: var(--sunk); color: var(--ink); border: 1px solid var(--line); }
.avatar-sm { width: 26px; height: 26px; font-size: 13px; border-radius: 6px; }
.nav { display: grid; gap: 2px; }
.nav a, .nav-soon { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav-soon { color: var(--faint); cursor: default; }
.nav-soon small { font-size: 11px; }
.nav-label { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 14px; padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.nav > .nav-label:first-child { margin-top: 0; padding-top: 4px; border-top: 0; }
.rail-foot { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; padding: 12px 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.who { display: grid; min-width: 0; }
.who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--faint); }
.foot-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot-actions a { color: var(--muted); }
.theme-switch { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 8px; }
.theme-option { flex: 1; padding: 5px 6px; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.theme-option:hover { color: var(--ink); background: var(--sunk); }
.theme-option.is-current { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.foot-actions form { margin: 0; }

/* zapytania koncertowe z poczty */
.inquiry-list { display: grid; gap: 12px; }
.inquiry { display: grid; gap: 10px; }
.inquiry-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.inquiry-date { display: grid; justify-items: end; text-align: right; flex: none; padding: 6px 12px; border-radius: 10px; background: var(--sunk); }
.inquiry-date b { font-family: var(--mono); font-size: 15px; }
.inquiry-date small { font-size: 12px; color: var(--muted); }
.inquiry-date.is-free { background: var(--accent-soft); }
.inquiry-date.is-busy small { color: var(--warn); font-weight: 600; }
.inquiry-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: grid; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; }
.fact small { font-weight: 500; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.inquiry-notes { display: grid; gap: 2px; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--warn-soft);
  border-radius: 0 8px 8px 0; font-size: 14px; white-space: pre-line; }
.inquiry-notes small { font-size: 12px; color: var(--muted); }
.inquiry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.from-mail-note { border-left: 3px solid var(--accent); display: grid; gap: 4px; }

/* menu: liczniki spraw czekajacych na reakcje */
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font: 600 12px/18px var(--body); text-align: center; }
/* karta artysty z zebatka profilu */
.artist-row { display: flex; gap: 8px; align-items: stretch; }
.artist-row > .artist, .artist-row > .artist-switch { flex: 1; min-width: 0; }
.artist-gear { flex: none; width: 44px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sunk); color: var(--muted);
  display: grid; place-items: center; text-decoration: none; }
.artist-gear:hover, .artist-gear[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
/* status koncertu klikany w naglowku */
.status-menu { position: relative; }
.status-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.status-menu > summary::-webkit-details-marker { display: none; }
.status-chevron { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.status-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 2px; min-width: 230px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 40px -20px rgb(0 0 0 / .6); }
.status-options-label { font-size: 12px; color: var(--faint); padding: 4px 8px; }
.status-options button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.status-options button:hover { background: var(--sunk); }
.status-options button.is-current { background: var(--accent-soft); font-weight: 600; }

.offer-actions form { display: inline-block; margin: 0 0 0 8px; }

/* ustawienia konta i agencji: wspolny naglowek z zakladkami */
.settings-top { display: grid; gap: 10px; }
.settings-kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--muted); }
.settings-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; background: var(--surface); }
.settings-tabs a:hover { color: var(--ink); border-color: var(--faint); }
.settings-tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); border-color: transparent; font-weight: 600; }
/* stopka menu: ustawienia konta i wylogowanie w stylu pozycji menu */
.foot-actions .rail-account, .mobile-account .rail-account { width: 100%; font-size: 15px; }
.nav-form { margin: 0; }
.nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.nav-btn:hover { background: var(--sunk); color: var(--ink); }

.main { padding: 28px 32px 48px; display: grid; gap: 22px; align-content: start; min-width: 0; max-width: 1280px; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.head h1 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.head p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* zakladki (tabs.js): ukryta sekcja naprawde znika, a pasek zostaje na gorze przy przewijaniu */
section[hidden], .panel[hidden] { display: none !important; }
.seg-tabs { position: sticky; top: 0; z-index: 5; overflow-x: auto; scrollbar-width: none; }
.seg-tabs a { white-space: nowrap; }
.empty { display: grid; gap: 14px; justify-items: start; padding: 28px; border: 1px dashed var(--line); border-radius: var(--r); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat { padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat small { color: var(--muted); font-size: 12px; }
.stat b { font-family: var(--mono); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 12px; color: var(--faint); }

.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; min-width: 0; }
.panel { display: grid; gap: 10px; min-width: 0; align-content: start; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel-h h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 17px; }

.alerts { display: grid; gap: 8px; }
.alert { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 10px 0; overflow: hidden; }
.alert::before { content: ""; align-self: stretch; margin-block: -10px; }
.alert.crit::before { background: var(--crit); }
.alert.warn::before { background: var(--warn); }
.alert b { font-weight: 600; }
.alert p { font-size: 13px; color: var(--muted); }
.alert .amt { font-family: var(--mono); font-size: 14px; text-align: right; white-space: nowrap; }

.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.stage { display: grid; gap: 6px; min-width: 0; }
.stage i { height: 6px; border-radius: 3px; background: var(--line); }
.stage.on i { background: var(--accent); }
.stage small { font-size: 11px; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.stage b { font-family: var(--mono); font-weight: 500; font-size: 18px; }

.gigs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.gig { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; }
.gig + .gig { border-top: 1px solid var(--line); }
.date { display: grid; justify-items: center; line-height: 1; font-family: var(--display); text-transform: uppercase; }
.date b { font-size: 30px; font-weight: 600; }
.date small { font-size: 12px; letter-spacing: .12em; color: var(--muted); margin-top: 3px; }
.gig-t { min-width: 0; }
.gig-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gig-t span { display: block; font-size: 13px; color: var(--muted); }
.gig-t .leg { font-size: 12px; color: var(--faint); }
.gig-t .leg.is-far { color: var(--warn); font-weight: 500; }
.gig-r { display: grid; justify-items: end; gap: 4px; }
.gig-r .num { font-size: 13px; color: var(--muted); }
.gig-r .gig-net { font-size: 12px; color: var(--faint); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-signed, .p-advance_paid, .p-settled { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.p-played { color: var(--ink); }
.p-hold, .p-inquiry { color: var(--faint); border-style: dashed; }
.p-cancelled { color: var(--crit); background: var(--crit-soft); border-color: transparent; }
.p-role::before { display: none; }

/* mapa (SVG, bez stylow inline - CSP) */
.map { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.map-grid { fill: var(--line); }
.map-route { stroke: var(--faint); stroke-width: 2.5; stroke-dasharray: 8 8; }
.map-halo { fill: var(--accent-soft); }
.map-pin { fill: var(--accent); }
.map-home { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.map-label { fill: var(--ink); font: 500 28px var(--body); }
.map-label-muted { fill: var(--faint); }

/* pulpit artysty */
.next { display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--accent); color: var(--accent-ink); border-radius: 14px; overflow: hidden; }
.next-date { padding: 22px 28px; display: grid; align-content: center; justify-items: center; border-right: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent); font-family: var(--display); text-transform: uppercase; line-height: .9; }
.next-date small { font-size: 14px; letter-spacing: .14em; opacity: .8; }
.next-date b { font-size: 84px; font-weight: 600; }
.next-body { padding: 20px 24px; display: grid; gap: 14px; min-width: 0; }
.next-body h2 { font-size: 24px; font-weight: 600; text-wrap: balance; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; opacity: .82; }
.sheet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.sheet div { display: grid; gap: 1px; min-width: 0; }
.sheet small { font-size: 12px; opacity: .74; }
.sheet b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* tabele */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  position: relative; } /* ukryte etykiety .sr-only w komorkach (absolute) nie wychodza poza ramke - inaczej poszerzaly strone na telefonie i rozjezdzal sie dolny pasek */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--faint); font-size: 12px; }
.table tr.is-off td { color: var(--faint); }
.cell-artist { display: inline-flex; align-items: center; gap: 10px; }
.executor { display: grid; gap: 4px; padding: 12px 14px; }

/* koncerty, organizatorzy, formularze */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-danger { background: var(--crit); color: #fff; }
.kicker { font-size: 13px; color: var(--muted); }
.gig-link { text-decoration: none; }
.gig-link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.gig-t .gig-nav { display: inline-block; margin-top: 4px; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.gig-t .gig-nav:hover { text-decoration: underline; text-underline-offset: 3px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.field-inline { min-width: 180px; }
.field-inline.grow { flex: 1; max-width: 520px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.table .right { text-align: right; }
.table .nowrap { white-space: nowrap; }
/* historia koncertow w waskiej kolumnie: miejsce dostaje cala szerokosc, kwota i status jeden pod drugim */
.history-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "date venue fee" "date venue status";
  column-gap: 14px; row-gap: 4px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.history-table tr:last-child { border-bottom: 0; }
.history-table td { padding: 0; border: 0; }
.history-table td:nth-child(1) { grid-area: date; }
.history-table td:nth-child(2) { grid-area: venue; min-width: 0; }
.history-table td:nth-child(3) { grid-area: fee; }
.history-table td:nth-child(4) { grid-area: status; justify-self: end; }
.table tfoot td { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 0; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.booking-form { gap: 18px; max-width: 980px; }
.form-section { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.form-section h2, .section-h h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 17px; }
.section-h { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.inline-fill { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-fill select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; max-width: 280px; }
.has-suggest { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% - 2px); z-index: 30; }
.suggest:empty { display: none; }
.suggest-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 14px 34px rgb(0 0 0 / .16); max-height: 360px; overflow-y: auto; min-width: min(100%, 320px); }
.suggest-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 8px 4px; margin: 0; }
.suggest-item { display: grid; gap: 2px; text-align: left; background: none; border: 0; border-radius: 7px; padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit; min-height: 44px; }
.suggest-item:hover, .suggest-item:focus-visible { background: var(--accent-soft); outline: none; }
.suggest-main { font-weight: 600; font-size: 14px; }
.suggest-meta { font-size: 12.5px; color: var(--muted); }
.suggest-item mark { background: none; color: var(--accent); font-weight: 700; }
.org-pick { display: grid; gap: 10px; }
.venue-find { display: grid; gap: 6px; justify-items: start; }
.venue-lookup { display: grid; gap: 8px; width: 100%; }
.venue-lookup:empty { display: none; }
.venue-results { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; width: 100%; }
.venue-research { display: grid; gap: 10px; padding: 12px 14px; justify-items: start; }

.org-chosen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--accent-soft);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.org-chosen[hidden] { display: none; }
.grid-2, .grid-3 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.field textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; }
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; position: sticky; bottom: 0; padding-block: 12px; background: linear-gradient(transparent, var(--ground) 30%); }
.form-warn { background: var(--warn-soft); color: var(--ink); border-left: 4px solid var(--warn); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; font-size: 14px; }
.form-warn ul { margin: 0; padding-left: 20px; }
.client-fields { display: grid; gap: 12px; }
.seg-radio { display: inline-flex; gap: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 3px; justify-self: start; }
.seg-radio label { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); }
.seg-radio input { accent-color: var(--accent); margin: 0; }
.seg-radio label:has(input:checked) { background: var(--surface); color: var(--ink); }
.client-fields:has(input[name="client_type"][value="person"]:checked) .only-company { display: none; }
.client-fields:not(:has(input[name="client_type"][value="person"]:checked)) .only-person { display: none; }
.dl { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.dl.card { padding: 16px 18px; }
.dl dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.dl dd { margin: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.stack-sm { display: grid; gap: 12px; }
.prewrap { white-space: pre-line; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.doc-list li:first-child { border-top: 0; }
.doc-list li > span:first-child { display: grid; gap: 2px; }
.doc-actions { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.doc-actions form { margin: 0; }
.divider { height: 1px; background: var(--line); }
.sub-h { font-weight: 600; }
.executor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.card-dashed { border-style: dashed; }
.num-text { font-family: var(--mono); font-size: 13px; }
.panel[id] { scroll-margin-top: 16px; }
.input-action { display: flex; gap: 8px; align-items: center; }
.input-action input { flex: 1; min-width: 0; }
.error-text { color: var(--crit); font-size: 13px; }
.mail-body { font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* zadania */
.task-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; }
.task + .task { border-top: 1px solid var(--line); }
.task form { margin: 0; }
.task-check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--faint); background: var(--surface); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; font-size: 13px; margin-top: 1px; }
.task-check:hover { border-color: var(--accent); }
.task.is-done .task-check { background: var(--accent); border-color: var(--accent); }
.task.is-done .task-body b { text-decoration: line-through; color: var(--faint); }
.task.is-high { box-shadow: inset 3px 0 0 var(--crit); }
.task-body { display: grid; gap: 2px; min-width: 0; }
.task-body a { text-decoration: none; }
.task-body a:hover b { text-decoration: underline; }
.task-notes { font-size: 13px; color: var(--muted); white-space: pre-line; margin-top: 4px; }
.narrow-wide { max-width: 760px; }

/* kalendarz */
.month { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.month-head, .month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head span { padding: 8px 10px; font-size: 12px; color: var(--muted); font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; border-bottom: 1px solid var(--line); }
.day { min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.month-row .day:first-child { border-left: 0; }
.month-row:first-of-type .day { border-top: 0; }
.day.is-other { background: var(--sunk); }
.day.is-other .day-num { color: var(--faint); }
.day-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.day.is-today .day-num { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.chip { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; text-decoration: none; background: var(--sunk); color: var(--ink); border-left: 3px solid var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.chip:hover { filter: brightness(.96); }
.chip-signed, .chip-advance_paid { background: var(--accent-soft); border-left-color: var(--accent); }
.chip-played, .chip-settled { border-left-color: var(--ink); }
.chip-hold, .chip-inquiry { border-left-style: dashed; }
.chip-draft { border-left-color: var(--warn); }
.chip-cancelled { text-decoration: line-through; color: var(--faint); }
.chip-task { background: transparent; border: 1px dashed var(--line); border-left: 3px solid var(--warn); color: var(--muted); }
.day-top { display: flex; justify-content: space-between; align-items: center; }
.day-add { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; text-decoration: none; color: var(--faint); font-weight: 600; opacity: 0; }
.day:hover .day-add, .day-add:focus-visible { opacity: 1; background: var(--sunk); color: var(--ink); }
@media (hover: none) { .day-add { opacity: .7; } }
.day.is-weekend:not(.is-other) { background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface)); }
.day.is-holiday .day-num { color: var(--crit); font-weight: 600; }
.day-holiday, .day-eve { font-size: 11px; line-height: 1.25; color: var(--crit); }
.day-eve { color: var(--warn); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--sunk); border-left: 3px solid var(--faint); }
.sw-hold { border-left-style: dashed; }
.sw-draft { border-left-color: var(--warn); }
.sw-signed { background: var(--accent-soft); border-left-color: var(--accent); }
.sw-played { border-left-color: var(--ink); }
.sw-task { background: transparent; border: 1px dashed var(--line); border-left: 3px solid var(--warn); }
.sw-holiday { background: var(--crit-soft); border-left-color: var(--crit); }
.sw-google { background: transparent; border: 1px solid var(--line); border-left: 3px solid #4285f4; }
.chip-google { background: transparent; border: 1px solid var(--line); border-left: 3px solid #4285f4; color: var(--muted); }
.free-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.free-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 14px; border-top: 1px solid var(--line); }
.free-list li:first-child { border-top: 0; }
.free-list li a { margin-left: auto; font-size: 13px; }
.agenda { display: none; }
.agenda-day { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.agenda-items { display: grid; gap: 6px; }
.agenda .chip { white-space: normal; font-size: 14px; padding: 6px 8px; }
@media (max-width: 760px) {
  .agenda { display: block; }
}

.error-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.error-page .logo { width: 56px; height: 56px; }
.error-code { color: var(--faint); font-size: 14px; }
.error-page h1 { font-size: 22px; font-weight: 600; max-width: 32ch; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-soon { display: none; }
  .nav-label { flex-basis: 100%; padding: 6px 10px 0; }
  .rail-foot { margin-top: 0; }
  .cols { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; min-height: 0; }
}
@media (max-width: 640px) {
  .main { padding: 20px 16px 40px; }
  /* przyciski w naglowku strony: po dwa w rzedzie, rownej szerokosci; ostatni nieparzysty na cala szerokosc */
  .head { align-items: stretch; }
  .head > div:first-child { width: 100%; }
  .head .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .head .actions > .btn { white-space: normal; text-align: center; }
  .head .actions > :only-child, .head .actions:has(> :nth-child(5):last-child) > :last-child { grid-column: 1 / -1; }
  /* trzy przyciski (np. status, Edytuj, Usun na karcie koncertu) - jeden rzad, zeby "Usun" nie byl na cala szerokosc */
  .head .actions:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .head .actions:has(> .status-menu:first-child):has(> :nth-child(3):last-child) { grid-template-columns: max-content repeat(2, minmax(0, 1fr)); }
  /* zakladki: jeden rzad przewijany w bok zamiast kilku rzedow */
  .seg-tabs { display: flex; flex-wrap: nowrap; max-width: 100%; }
  /* tabela jako kafelki (np. faktury na karcie koncertu): bez przewijania w bok */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-stack td { padding: 2px 0; border: 0; text-align: left; }
  .table-stack td[data-label] { display: flex; justify-content: space-between; gap: 12px; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--faint); font: 13px var(--body); }
  .table-stack td:first-child { font-weight: 600; margin-bottom: 4px; }
  .table-stack td.offer-actions { margin-top: 8px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
  .next { grid-template-columns: 1fr; }
  .next-date { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent); grid-auto-flow: column; gap: 12px; justify-content: start; align-items: baseline; }
  .next-date b { font-size: 56px; }
  .sheet, .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .gig { grid-template-columns: 48px minmax(0, 1fr); }
  .gig-r { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; gap: 10px; }
  .gig-r .gig-net { grid-column: 1 / -1; grid-row: 2; }
  .login-brand, .login-form { padding: 28px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: background-color .15s, border-color .15s, filter .15s; }
}

/* Info na miejscu */
.note-list { list-style: none; margin: 0; padding: 0; display: grid; }
.note { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; padding-top: 0; }
.note summary { display: grid; gap: 4px; cursor: pointer; list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note details[open] summary { margin-bottom: 10px; }
.next-link { color: inherit; font-size: 14px; font-weight: 600; text-underline-offset: 3px; justify-self: start; }

/* Zarobki ekipy */
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .stats-3 { grid-template-columns: minmax(0, 1fr); }
  .stats-3 .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* Lista w karcie (np. zarobki per miesiac): .doc-list zeruje padding, oddajemy odstep karty */
.doc-list.card { padding: 6px 18px; }
.doc-list.card li { padding: 12px 0; }
.doc-list.card li > span.num { white-space: nowrap; }

/* Mapa trasy: kontur Polski i dojazd z miasta bazowego */
.map-land { fill: color-mix(in srgb, var(--accent) 9%, var(--surface)); stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 2.5; stroke-linejoin: round; }
.map-start { stroke: var(--faint); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; opacity: .7; }

/* Asystent poczty */
.mail-body { font-size: 14px; max-height: 520px; overflow: auto; overflow-wrap: anywhere; }
.mail-preview { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; line-height: 1.55; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.alert p + p { margin-top: 2px; }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* Szybkie akcje w Wymaga uwagi + zakladki Booking Assistant */
.alert { grid-template-columns: 4px minmax(0, 1fr) auto auto; }
.alert-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.alert-actions .btn-sm { padding: 4px 9px; font-size: 12px; }
@media (max-width: 640px) {
  .alert { grid-template-columns: 4px minmax(0, 1fr); }
  .alert .amt, .alert-actions { grid-column: 2; justify-content: flex-start; text-align: left; }
}
.nav .nav-sub { padding-left: 28px; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-soft); font-size: 12px; text-align: center; }

/* Kreator ridera */
.rider-section-h { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; }
.rider-section-h .field { flex: 1; }
.rider-section textarea { font-size: 14px; line-height: 1.5; }
.rider-actions { position: sticky; bottom: 0; z-index: 2; }

/* Mapa trasy (Leaflet + OpenStreetMap); bez JS widac mape SVG */
.tourmap-canvas { display: none; height: 420px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #f2efe9;
  position: relative; z-index: 0; isolation: isolate; }
.tourmap.is-live .tourmap-canvas { display: block; }
.tourmap.is-live .tourmap-fallback { display: none; }
.tourmap .leaflet-container { font: 13px var(--body); }
.tourmap .tourmap-label { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; padding: 2px 6px; font-weight: 600; }
.tourmap .tourmap-label::before { display: none; }
.tourmap .leaflet-control-attribution { font-size: 11px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tourmap .leaflet-control-attribution { background: rgba(20, 22, 18, .8); color: #b9c2b0; }
  :root:not([data-theme="light"]) .tourmap .leaflet-control-attribution a { color: #cfe3bf; }
}
:root[data-theme="dark"] .tourmap .leaflet-control-attribution, :root[data-theme="gold"] .tourmap .leaflet-control-attribution { background: rgba(20, 22, 18, .8); color: #b9c2b0; }
:root[data-theme="dark"] .tourmap .leaflet-control-attribution a { color: #cfe3bf; }
:root[data-theme="gold"] .tourmap .leaflet-control-attribution a { color: #f0d9a4; }
@media (max-width: 640px) { .tourmap-canvas { height: 320px; } }
/* podpis OSM musi byc wyraznie widoczny (zasady tile.openstreetmap.org) */
.tourmap .leaflet-container .leaflet-control-attribution { background: var(--surface); color: var(--muted); padding: 2px 8px; border-top-left-radius: 6px; }
.tourmap .leaflet-container .leaflet-control-attribution a { color: var(--ink); }
.tourmap .tm-pin-wrap { background: none; border: 0; }
.tourmap .tm-pin { width: 30px; height: 30px; border-radius: 50%; background: var(--pin); color: #fff; border: 2px solid #fff;
  display: grid; place-items: center; font: 700 13px/1 var(--body); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .12s; }
.tourmap .tm-pin:hover { transform: scale(1.12); }
.tourmap .tm-home { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.tourmap .tm-tip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); padding: 3px 8px; font-weight: 600; }
.tourmap .tm-tip::before { display: none; }
.tourmap .tm-popup .leaflet-popup-content-wrapper { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.tourmap .tm-popup .leaflet-popup-tip { background: var(--surface); }
.tourmap .tm-popup .leaflet-popup-content { margin: 14px 16px; font: 14px/1.4 var(--body); }
.tourmap .tm-popup a.leaflet-popup-close-button { color: var(--muted); }
.tm-card-h { display: flex; gap: 10px; align-items: flex-start; padding-right: 12px; }
.tm-card-h b { display: block; font-size: 15px; }
.tm-card-h small { color: var(--muted); }
.tm-card-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--pin); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.tm-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.tm-card-status { background: var(--sunk); color: var(--ink); border-radius: 999px; padding: 1px 8px; }
.tm-card-leg { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tm-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.tourmap .tm-card-actions a.btn-primary { color: var(--accent-ink); }
.tourmap .tm-card-actions a.btn-ghost { color: var(--ink); }
.tm-legend { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; max-width: 260px; }
.tm-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.tm-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--pin); }
.tm-fit { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 600 12px var(--body); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.tm-fit:hover { border-color: var(--accent); }
.tourmap .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }
@media (max-width: 640px) { .tm-legend { display: none; } }

/* Niedostepnosc ekipy w kalendarzu */
.chip-block { background: transparent; border: 1px solid var(--line); border-left: 3px solid var(--crit); color: var(--muted); }
.chip-absent { background: transparent; border: 1px dashed var(--line); border-left: 3px solid var(--warn); color: var(--muted); }

/* Przelacznik artysty: wlasne menu zamiast systemowej listy (spojne z ciemnym UI) */
.artist-switch { position: relative; }
.artist-switch > summary { list-style: none; cursor: pointer; transition: border-color .15s; }
.artist-switch > summary::-webkit-details-marker { display: none; }
.artist-switch > summary:hover { border-color: var(--faint); }
.artist-switch[open] > summary { border-color: var(--accent); }
.artist-chevron { width: 8px; height: 8px; margin: -4px 6px 0 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex: none; }
.artist-switch[open] .artist-chevron { transform: rotate(-135deg); margin-top: 4px; }
.artist-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.artist-menu form { margin: 0; }
.artist-menu-label { padding: 4px 8px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.artist-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.artist-option:hover, .artist-option:focus-visible { background: var(--sunk); }
.artist-option.is-current { background: var(--accent-soft); }
.artist-option-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-option-check { color: var(--accent); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .artist-chevron, .artist-switch > summary { transition: none; } }

/* Podpowiedz stawki w formularzu koncertu */
.fee-hint { display: grid; gap: 2px; }
.fee-hint:empty { display: none; }
.city-rel-slot:not(:has(*)) { display: none; }
.city-rel ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.fee-hint b { color: var(--ink); font-weight: 600; }

/* Rozwinieta lista wyboru w stylu aplikacji (Chrome/Edge 135+: appearance base-select).
   Przegladarki bez wsparcia pomijaja ten blok i zostaja przy systemowej liscie. */
@supports (appearance: base-select) {
/* tylko mysz/touchpad: na telefonie (Chrome Android) wlasna lista psula wybor, zostaje systemowy panel wyboru */
@media (pointer: fine) {
  .field select, .inline-status select, .inline-fill select, .filters select {
    appearance: base-select; background-image: none; padding-right: 12px; display: flex; align-items: center; gap: 8px;
  }
  .field select::picker-icon, .inline-status select::picker-icon, .inline-fill select::picker-icon, .filters select::picker-icon {
    content: ""; width: 7px; height: 7px; margin: -3px 2px 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .15s;
  }
  .field select:open::picker-icon, .inline-status select:open::picker-icon, .inline-fill select:open::picker-icon, .filters select:open::picker-icon {
    transform: rotate(-135deg); margin-top: 4px;
  }
  .field select:open, .inline-status select:open, .inline-fill select:open, .filters select:open { border-color: var(--accent); }
  ::picker(select) {
    appearance: base-select; margin-block: 6px; padding: 6px; background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  }
  select option { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
  select option:hover, select option:focus-visible { background: var(--sunk); outline: none; }
  select option:checked { background: var(--accent-soft); font-weight: 600; }
  select option::checkmark { order: 1; margin-left: auto; color: var(--accent); }
}
}
@media (prefers-reduced-motion: reduce) { select::picker-icon { transition: none; } }

/* Zdjecia profilowe */
img.avatar { object-fit: cover; display: block; padding: 0; background: var(--sunk); }
.avatar-xl { width: 112px; height: 112px; border-radius: 24px; font-size: 38px; }
.photo-card { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.photo-actions { flex: 1; min-width: 240px; }
.rail-foot .avatar-link { display: block; border-radius: 8px; flex: none; }
.rail-foot .avatar-link:hover img, .rail-foot .avatar-link:hover span { outline: 2px solid var(--accent); outline-offset: 1px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > span { display: grid; }

/* Telefon i tablet: gorny pasek + rozwijane menu zamiast bocznego panelu nad trescia */
.mobile-bar { display: none; }
@media (max-width: 980px) {
  .rail { display: none; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 50; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-logo { flex: none; display: block; }
  .mobile-logo .logo { width: 34px; height: 34px; }
  .mobile-artist { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
  .mobile-artist b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-profile { flex: none; display: block; border-radius: 8px; }
  .mobile-menu { flex: none; }
  .mobile-menu > summary { list-style: none; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); font-weight: 600; cursor: pointer; user-select: none; }
  .mobile-menu[open] .mobile-menu-btn { border-color: var(--accent); }
  .burger, .burger::before, .burger::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .15s, background .15s; }
  .burger { position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -5px; }
  .burger::after { top: 5px; }
  /* otwarte menu zaslania caly ekran: tlo pod panelem, niezaleznie od wysokosci gornego paska (inaczej na dole przebijala strona) */
  .mobile-menu[open]::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--surface); }
  .mobile-menu[open] .burger { background: transparent; }
  .mobile-menu[open] .burger::before { top: 0; transform: rotate(45deg); }
  .mobile-menu[open] .burger::after { top: 0; transform: rotate(-45deg); }
  .mobile-panel { position: absolute; left: 0; right: 0; top: 100%; display: grid; gap: 14px; padding: 14px 16px 24px; max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
  .mobile-who { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .mobile-artists { display: grid; gap: 4px; }
  .mobile-artists form { margin: 0; }
  .mobile-artists .nav-label, .nav.mobile-nav .nav-label { padding: 10px 12px 4px; }
  .mobile-panel .artist-settings { margin-top: 0; padding: 8px 12px; }
  .nav.mobile-nav { display: grid; gap: 2px; }
  .nav.mobile-nav a { min-height: 46px; padding: 10px 12px; font-size: 16px; }
  .mobile-account { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
  .mobile-account a { color: var(--muted); }
  .mobile-account form { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .burger, .burger::before, .burger::after { transition: none; } }
/* kolumna 1fr nie moze byc wezsza niz najszersza zawartosc (np. tabela finansow 520 px) - na telefonie rozpychala cala strone */
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .mobile-bar, .main { min-width: 0; }
}

/* Analityka YouTube / Spotify */
.analytics-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .analytics-cols { grid-template-columns: minmax(0, 1fr); } }
.view-as-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.view-as-bar.is-edit { background: #5a2a1a; color: #fff; }
.view-as-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.view-as-actions form { margin: 0; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.row-actions form { margin: 0; }
.code-input {font-size: 22px; letter-spacing: 0.3em; max-width: 12em; }
.login-form .link-button { padding: 0; }
.legal-page {max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.6; }
.legal-page h1 { margin: 24px 0 4px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 6px; }
.legal-page ul { padding-left: 20px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.legal-nav a[aria-current="page"] { font-weight: 600; text-decoration: none; }
#youtube-analytics > .stats,#youtube-analytics > .analytics-cols, #youtube-analytics > .table-wrap { margin-top: 14px; }
.share-list li { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) 4em; align-items: center; gap: 10px; padding: 6px 0; }
.share-list progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.share-list progress::-webkit-progress-bar { background: var(--line); }
.share-list progress::-webkit-progress-value { background: var(--accent); }
.share-list progress::-moz-progress-bar { background: var(--accent); }
.delta-up { color: var(--accent); font-weight: 600; }
.delta-down { color: var(--crit); font-weight: 600; }
.stat b.genres { font-family: var(--body); font-size: 14px; white-space: normal; line-height: 1.3; }
.spark { margin: 0; }
.spark svg { width: 100%; height: auto; display: block; }
.spark-grid { stroke: var(--line); stroke-width: 1; }
.spark-line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark-end { fill: var(--accent); }
.spark-label { fill: var(--muted); font: 12px var(--body); }

/* Analityka TikTok */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-y, .chart-x { fill: var(--faint); font: 11px var(--body); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--accent); opacity: .12; }
.chart-dot { fill: transparent; }
.chart-dot:hover { fill: var(--accent); }
.chart-end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart-bar rect { fill: var(--accent); opacity: .45; transition: opacity .12s; }
.chart-bar.is-top rect { opacity: 1; }
.chart-bar:hover rect { opacity: .9; }
.tt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.tt-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--line); }
.tt-avatar-empty { display: grid; place-items: center; background: var(--sunk); font: 600 26px var(--display); color: var(--muted); text-transform: uppercase; }
.tt-who { flex: 1 1 240px; min-width: 0; }
.tt-who h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: .02em; }
.tt-who p { color: var(--muted); font-size: 14px; }
@media (min-width: 641px) {
  .tt-stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .tt-stats .stat:nth-child(4) { border-left: 0; }
}
.tt-page { display: grid; gap: 22px; min-width: 0; }
.tt-h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.tt-insight { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.tt-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tt-tabs > label { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.tt-tabs > input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tt-tabs > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.tt-tab { display: none; flex-basis: 100%; margin-top: 10px; }
#tt-tab-views:checked ~ .tt-tab-views, #tt-tab-er:checked ~ .tt-tab-er, #tt-tab-new:checked ~ .tt-tab-new { display: block; }
.tt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.tt-card { display: grid; gap: 8px; min-width: 0; }
.tt-play { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--sunk); border: 1px solid var(--line); color: #fff; text-decoration: none; }
.tt-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tt-play:hover img { transform: scale(1.04); }
.tt-nocover { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; color: var(--faint); }
.tt-rank { position: absolute; top: 8px; left: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: rgb(0 0 0 / .62); display: grid; place-items: center; font: 600 13px var(--body); }
.tt-dur { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px; background: rgb(0 0 0 / .62); font: 12px var(--mono); }
.tt-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 10px 10px; background: linear-gradient(transparent, rgb(0 0 0 / .78)); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.tt-overlay b { font: 600 15px var(--mono); }
.tt-playicon { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.tt-meta { min-width: 0; }
.tt-title { font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-sub { font-size: 12px; color: var(--faint); }
.tt-counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 12px var(--mono); color: var(--muted); }
.tt-all summary { cursor: pointer; list-style: none; }
.tt-all summary::-webkit-details-marker { display: none; }
.tt-all summary h2 { display: inline; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: 17px; }
.tt-all summary::after { content: " ▾"; color: var(--muted); }
.tt-all[open] summary { margin-bottom: 10px; }
.tt-all td a.tt-play { display: inline; position: static; aspect-ratio: auto; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; border-radius: 0; }
.tt-dialog { padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); max-width: min(760px, calc(100vw - 24px)); width: 100%; box-shadow: 0 24px 60px rgb(0 0 0 / .35); }
.tt-dialog::backdrop { background: rgb(0 0 0 / .7); }
.tt-dialog-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.tt-player-frame { background: #000; aspect-ratio: 9 / 16; max-height: 86vh; }
.tt-player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.tt-dialog-info { position: relative; padding: 20px; display: grid; gap: 10px; align-content: start; }
.tt-dialog-title { font-weight: 600; padding-right: 32px; }
.tt-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.tt-dialog-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.tt-dialog-stats div { background: var(--sunk); border-radius: 8px; padding: 8px 10px; }
.tt-dialog-stats dt { font-size: 12px; color: var(--muted); }
.tt-dialog-stats dd { margin: 0; font: 500 17px var(--mono); }
@media (max-width: 640px) {
  .tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tt-dialog-body { grid-template-columns: minmax(0, 1fr); }
  .tt-player-frame { max-height: 70vh; aspect-ratio: auto; height: 70vh; }
}

/* Wyszukiwarka (Ctrl+K) */
.search-trigger { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); color: var(--muted); text-decoration: none; font-weight: 500; transition: border-color .15s, color .15s; }
.search-trigger:hover, .search-trigger[aria-current="page"] { border-color: var(--accent); color: var(--ink); }
.search-trigger span { flex: 1; }
.search-kbd, .search-foot kbd, .search-tips kbd, .search-esc { font: 500 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.mobile-search { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); }
.search-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(640px, calc(100vh - 48px)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .35), 0 0 0 1px rgb(0 0 0 / .02); overflow: hidden; }
.search-dialog[open] { display: flex; flex-direction: column; animation: search-in .14s ease-out; }
.search-dialog::backdrop { background: rgb(8 12 6 / .55); backdrop-filter: blur(3px); }
@keyframes search-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .search-dialog[open] { animation: none; } }
.search-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-logo { width: 30px; height: 30px; flex: none; }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 18px var(--body); padding: 6px 0; }
.search-input::placeholder { color: var(--faint); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-esc { cursor: pointer; }
.search-results { overflow-y: auto; padding: 6px 8px 10px; min-height: 120px; }
.search-group { padding-top: 6px; }
.search-group-h { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 4px; font: 600 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.search-group-h a { font: 500 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.search-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.search-hit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.search-hit:hover, .search-hit.is-active { background: var(--accent-soft); }
.search-hit.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.search-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--sunk); color: var(--muted); }
.search-hit.is-active .search-ico { background: var(--accent); color: var(--accent-ink); }
.search-main { min-width: 0; display: grid; }
.search-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 26px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; }
.search-tips { font-size: 13px; color: var(--faint); max-width: 460px; margin: 0 auto; line-height: 1.7; }
.search-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--sunk); font-size: 12px; color: var(--faint); }
.search-foot kbd { margin-right: 3px; }
.search-foot-brand { margin-left: auto; font: 600 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.search-page-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-width: 760px; }
.search-page-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-page-icon { color: var(--muted); display: grid; }
.search-page-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 17px var(--body); }
.search-results-page { max-width: 760px; margin-top: 12px; padding: 4px 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
@media (max-width: 640px) {
  .search-dialog { margin-top: 12px; max-height: calc(100vh - 24px); }
  .search-foot { display: none; }
  .search-hit { grid-template-columns: auto minmax(0, 1fr); }
  .search-hit .pill { grid-column: 2; justify-self: start; }
}

/* Organizator z maila */
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.crm-worth { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 999px;
  font: 600 12px var(--mono); background: var(--sunk); color: var(--muted); border: 1px solid var(--line); flex: none; }
.crm-worth.is-high { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.crm-worth.is-low { opacity: .7; }
.crm-worth-panel ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.bulk-col { width: 34px; text-align: center; }
.bulk-col input { width: 18px; height: 18px; accent-color: var(--accent); }
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px;
  margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.bulk-bar.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bulk-form { display: grid; gap: 14px; }
.bulk-item { display: grid; gap: 10px; padding: 16px; }
.bulk-item.has-errors { border-color: var(--warn); }
.bulk-item-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bulk-item-body { display: grid; gap: 10px; }
.bulk-item:has(input[name$="_include"]:not(:checked)) .bulk-item-body { display: none; }
.bulk-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-summary td small { display: block; color: var(--muted); }
.crm-attach { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 14px; display: grid; gap: 10px; margin: 0; }
.crm-attach legend { font-weight: 600; padding: 0 6px; }
.crm-attach-offer { display: grid; gap: 10px; padding-left: 26px; }
.crm-attach:has(input[name$="with_offer"]:not(:checked)) .crm-attach-offer { display: none; }
.crm-attach-offer:has(input[value="hidden"]:checked) .field:has(input[name$="offer_fee"]) { opacity: .5; }
.notice.from-mail ul { margin: 6px 0 0; padding-left: 18px; }

/* Oferty i stawki */
.rate-group { display: grid; gap: 8px; margin-bottom: 10px; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rate-row > input[name="label"] { flex: 1 1 180px; min-width: 0; }
.rate-row select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 13px; }
.rate-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.rate-row input:not([type="checkbox"]) { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.rate-num { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.rate-num input { width: 92px !important; }
.rate-add { border-top: 1px dashed var(--line); padding-top: 8px; }
.track-table td { padding: 6px 8px; }
.track-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .7fr) 110px auto; align-items: center; gap: 8px; }
.track-row input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.offer-rates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.rate-chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px; font: 500 13px var(--body); cursor: pointer; }
.rate-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.rate-chip.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.booking-form:has([data-no-advance]:checked) .adv-only { display: none; }
.booking-form:not(:has([data-no-advance]:checked)) .noadv-only { display: none; }

.offer-tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.offer-tracks label.check { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.offer-tracks small { color: var(--muted); }
.offer-views { color: var(--muted); font-size: 13px; }
tr.is-secondary td { opacity: .7; }
@media (max-width: 640px) {
  .rate-row > input[name="label"] { flex-basis: 100%; }
  .track-row { grid-template-columns: 1fr; }
}
.offer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.offer-item { display: grid; gap: 6px; padding: 12px 14px; }
.offer-item-top { display: flex; justify-content: space-between; gap: 10px; }
.offer-item .pill { justify-self: start; white-space: normal; }
.offer-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.offer-item-actions form { margin: 0 0 0 auto; }
.song-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .6fr) 70px 70px 76px auto; align-items: center; gap: 8px; }
.song-row input:not([type="checkbox"]) { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
#numery form.actions { align-items: end; }
#numery .field.grow { flex: 1; min-width: 240px; }
#zrodla summary { cursor: pointer; }
@media (max-width: 640px) { .song-row { grid-template-columns: 1fr 1fr 1fr; } .song-row > input { grid-column: 1 / -1; } }

/* Zdjecia do ofert */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-tile { display: grid; gap: 6px; }
.photo-tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); border: 2px solid var(--line); display: block; background: var(--sunk); }
.photo-tile.is-default img { border-color: var(--accent); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.photo-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-option { position: relative; cursor: pointer; }
.photo-option input { position: absolute; opacity: 0; }
.photo-option img, .photo-option span { width: 120px; height: 160px; object-fit: cover; border-radius: var(--r); border: 2px solid var(--line); display: block; }
.photo-option span { display: grid; place-content: center; text-align: center; gap: 4px; background: #0b0e0f; color: #e8ece6; font-weight: 600; font-size: 13px; }
.photo-option span small { color: #8b958f; font-weight: 400; }
.photo-option input:checked + img, .photo-option input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.photo-option input:focus-visible + img, .photo-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Strony publiczne - panel */
.clip-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.clip-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.clip-add { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; border-top: 1px dashed var(--line); padding-top: 10px; }
.clip-row input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
@media (max-width: 640px) { .clip-row, .clip-add { grid-template-columns: 1fr; } }
.fans-bar { display: grid; grid-template-columns: minmax(80px, 1fr) auto; align-items: center; gap: 10px; }
.fans-bar progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.fans-bar progress::-webkit-progress-bar { background: var(--line); }
.fans-bar progress::-webkit-progress-value { background: var(--accent); }
.fans-bar progress::-moz-progress-bar { background: var(--accent); }

.next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.next-nav { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: #0d100c; color: #f4f6f1; font-weight: 600; text-decoration: none; }
.next-nav::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #a6d67c; transform: rotate(-45deg); }
.next-nav:hover { background: #1a2316; }
:root[data-theme="gold"] .next-nav::before { border-left-color: var(--accent); }
:root[data-theme="gold"] .next-nav:hover { background: #221d12; }

/* Moje sety (DJ) */
.sets-stats { margin-bottom: 18px; }
.set-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.set-item { display: grid; gap: 8px; padding: 14px 16px; }
.set-item.is-unpaid { box-shadow: inset 3px 0 0 var(--warn); }
.set-top { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.set-date, .set-where, .set-num { display: grid; min-width: 0; }
.set-date small, .set-where small, .set-num small { color: var(--muted); font-size: 13px; }
.set-where b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-num { text-align: right; }
.set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.set-actions form { margin: 0; }
.set-edit { flex-basis: 100%; }
.set-edit summary { cursor: pointer; list-style: none; display: inline; }
.set-edit summary::-webkit-details-marker { display: none; }
.set-edit[open] summary { margin-bottom: 10px; display: inline-block; }
.table td small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .set-top { grid-template-columns: 1fr auto; } .set-date { grid-column: 1 / -1; } }
.org-matches li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 6px 0; }
.org-matches li small { display: block; }

/* edytor tresci umowy */
.ce-form textarea { width: 100%; font: inherit; line-height: 1.5; }
.ce-sec { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ce-sec.card { padding: 14px; border-bottom: 0; }
.ce-sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ce-sec.is-removed textarea { opacity: .45; }
.ce-sec.is-edited textarea { border-color: var(--warn); }
.ce-summary ul { margin: 6px 0 0; padding-left: 18px; }
.ce-actions { flex-wrap: wrap; gap: 12px; align-items: center; }
.contract-changes { display: grid; gap: 8px; justify-items: start; }
.ce-ai { display: grid; gap: 12px; }
.ce-prop { display: grid; gap: 8px; }
.ce-prop.is-accepted, .ce-prop.is-rejected { opacity: .7; }
.ce-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 0 10px 10px 0; font-style: italic; }
.ce-quote small { display: block; margin-top: 4px; font-style: normal; }
.ce-current { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 6px 0 0; padding: 10px 12px; background: var(--sunk); border-radius: 10px; max-height: 260px; overflow: auto; }

/* porownanie umowy organizatora */
.rv-item { display: grid; gap: 8px; border-left: 3px solid var(--line); }
.rv-risk { border-left-color: var(--crit); }
.rv-missing, .rv-different { border-left-color: var(--warn); }
.rv-ok { color: var(--accent); }
.rv-warn { color: var(--warn); }
.rv-pill-risk { background: var(--crit-soft); color: var(--crit); }
.rv-pill-missing, .rv-pill-different { background: var(--warn-soft); color: var(--warn); }
.rv-pill-ok { background: var(--accent-soft); color: var(--accent); }
.rv-suggest { margin: 0; padding: 10px 12px; background: var(--sunk); border-radius: 10px; }
#odpowiedz textarea { width: 100%; font: inherit; }

/* mapa zgloszen fanow */
.fansmap-canvas { height: 460px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #f2efe9;
  position: relative; z-index: 0; isolation: isolate; }
@media (max-width: 640px) { .fansmap-canvas { height: 340px; } }
.fansmap-legend { margin-top: 8px; }
.fm-dot, .fm-gig { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; }
.fm-dot { border-radius: 50%; background: #58a55c; }
.fm-gig { border-radius: 3px; background: #1f2a33; border: 2px solid #fff; box-shadow: 0 0 0 1px #1f2a33; }
.fm-gig-pin { width: 14px; height: 14px; border-radius: 4px; background: var(--pin, #1f2a33); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .4); }
.fm-card { display: grid; gap: 4px; min-width: 190px; font: 13px/1.4 var(--sans, inherit); }
.fm-card b { font-size: 15px; }

.fans-emails { max-height: 360px; overflow: auto; }

/* aplikacja na telefon (PWA) */
.pwa-box .pwa-when { display: none; }
.pwa-box[data-pwa-state="installed"] .pwa-installed, .pwa-box[data-pwa-state="android"] .pwa-android,
.pwa-box[data-pwa-state="ios"] .pwa-ios, .pwa-box[data-pwa-state="other"] .pwa-other { display: grid; gap: 10px; justify-items: start; }
.pwa-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
/* w zainstalowanej aplikacji na iPhonie: miejsce na pasek statusu */
@media (display-mode: standalone) { .mobile-bar { padding-top: env(safe-area-inset-top); } }

/* powiadomienia na telefon */
.push-box .push-when { display: none; }
.push-box[data-push="off"] .push-off, .push-box[data-push="on"] .push-on,
.push-box[data-push="denied"] .push-denied, .push-box[data-push="unsupported"] .push-unsupported { display: grid; gap: 10px; justify-items: start; }
.push-devices li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.push-devices li small { display: block; }

/* Telefon: gorny pasek tylko z logo, artysta i szukaniem; nawigacja w dolnym pasku (jak w aplikacjach) */
.tabbar { display: none; }
@media (max-width: 980px) {
  .mobile-bar { gap: 12px; padding: 8px 16px; }
  .mobile-logo .logo { width: 30px; height: 30px; }
  .mobile-artist { gap: 10px; padding: 4px 10px 4px 4px; margin-left: -4px; border-radius: 12px; color: inherit; text-decoration: none; }
  a.mobile-artist:active { background: var(--sunk); }
  .mobile-artist .avatar-sm { width: 32px; height: 32px; border-radius: 8px; }
  .mobile-artist-text { display: grid; min-width: 0; line-height: 1.15; }
  .mobile-artist-text small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
  .mobile-search { width: 38px; height: 38px; }

  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar-links { display: contents; }
  .tabbar .tabbar-links a, .tabbar .mobile-menu-btn { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 54px; padding: 6px 2px 4px; border: 0; border-radius: 10px; background: none; color: var(--muted);
    font-size: 11px; font-weight: 500; line-height: 1.1; white-space: nowrap; box-shadow: none; }
  .tabbar .tabbar-links a::before { width: 22px; height: 22px; margin: 0; }
  .tabbar .tabbar-links a[aria-current="page"] { background: none; box-shadow: none; color: var(--ink); font-weight: 600; }
  .tabbar .tabbar-links a[aria-current="page"]::after { content: ""; position: absolute; top: -5px; left: 50%; width: 28px; height: 3px; margin-left: -14px;
    border-radius: 0 0 3px 3px; background: var(--accent); }
  .mobile-artists .nav-label { border-top: 0; padding-top: 2px; }
  .tabbar .tabbar-links a[aria-current="page"]::before { background: var(--accent); opacity: 1; }
  .tabbar .tabbar-links .nav-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; margin: 0;
    font-size: 10px; line-height: 17px; }
  .tabbar .mobile-menu { flex: 1; display: flex; min-width: 0; }
  .tabbar .mobile-menu > summary { width: 100%; }
  .tabbar .burger { margin: 10px 0 7px; }
  .tabbar .mobile-menu[open] .mobile-menu-btn { color: var(--ink); font-weight: 600; }
  /* otwarte menu: caly ekran nad trescia, dolny pasek zostaje (przycisk Menu zamyka) */
  .tabbar .mobile-panel { position: fixed; top: 0; left: 0; right: 0; bottom: calc(63px + env(safe-area-inset-bottom, 0px)); max-height: none;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px; border: 0; box-shadow: none; overscroll-behavior: contain; }
  .mobile-artists .nav a { min-height: 46px; padding: 10px 12px; font-size: 16px; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 980px) and (prefers-reduced-motion: no-preference) { .tabbar { view-transition-name: tabbar; } }

/* zakladki sekcji (np. profil artysty) na waskim ekranie: jeden przewijany rzad zamiast zawijanej "banki" */
@media (max-width: 640px) {
  .seg { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; border-radius: 12px; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { flex: none; white-space: nowrap; border-radius: 9px; }
}

/* lista ofert: karty zamiast tabeli (na telefonie tabela sie nie miescila) */
.offer-list { display: grid; gap: 10px; }
.offer-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.offer-main { display: grid; gap: 3px; min-width: 0; }
.offer-main b { font-weight: 600; overflow-wrap: anywhere; }
.offer-main b a { color: inherit; }
.offer-main small { color: var(--muted); font-size: 13px; }
.offer-main .offer-meta { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.offer-fee { font-weight: 600; white-space: nowrap; }
.offer-card .offer-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.offer-card .offer-actions form { margin: 0; }
.btn-danger-text { color: var(--crit); }

/* kreator ridera: obrazek sekcji */
.rider-image { display: grid; gap: 8px; }
.rider-image img { max-width: 360px; width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; }

/* telefon: nic nie moze byc szersze niz ekran - inaczej Chrome poszerza strone i dolny pasek rozjezdza sie w bok.
   Sprawdzone 19.09: dlugi przycisk na karcie koncertu (433 px), lista wyboru w edytorze umowy (604 px), formularze skrzynki artysty. */
@media (max-width: 980px) {
  .main, .panel, .form, .form-section { grid-template-columns: minmax(0, 1fr); }
  .main > *, .panel > *, .form > *, .form-section > * { min-width: 0; }
  select, input, textarea { max-width: 100%; min-width: 0; }
  .btn { white-space: normal; text-align: center; max-width: 100%; }
}
.tourmap .tm-card-approx { margin-top: 6px; font-size: 12px; color: var(--warn); }

/* kreator ridera w profilu artysty (sekcja Ridery) */
.rider-builder { display: grid; gap: 12px; }
.rider-builder > summary { list-style: none; justify-self: start; cursor: pointer; }
.rider-builder > summary::-webkit-details-marker { display: none; }
.rider-builder[open] > summary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.rider-part { display: grid; gap: 10px; padding-top: 6px; }
.rider-part-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (max-width: 980px) { .rider-actions { position: static; } } /* telefon: przyklejony blok zaslanial pol ekranu - przyciski na koncu formularza */

/* filtry listy koncertow w jednym rzedzie na komputerze (wczesniej "Filtruj" spadal sam do drugiej linii) */
.filters-row { flex-wrap: wrap; }
.filters-row .seg { flex: none; align-self: flex-end; }
.filters-row .field-inline { min-width: 0; }
.filters-row .f-grow { flex: 1 1 200px; }
.filters-row .f-status { flex: 0 0 170px; }
.filters-row .f-date { flex: 0 0 150px; }
@media (max-width: 640px) { .filters-row .f-status, .filters-row .f-date { flex: 1 1 140px; } }
/* etykiety zrodla w "Wymaga uwagi" (z poczty, biznes, umowa) - zwykla etykieta zamiast czcionki kwot */
.alert .amt .alert-tag { font: 500 12px/1.4 var(--body); letter-spacing: 0; }
.intaxo-test { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }

/* oferty: status negocjacji i kwota dogadana */
.offer-deal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.offer-deal select { min-width: 160px; }
.offer-deal input { max-width: 190px; }
.offer-deal-sum { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); }
.offer-deal-sum b { color: var(--ink); }
.org-places { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.pay-doc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ===== kalendarz 26.09.2026: jak w Winnerz Real Estate - pelny miesiac zawsze, panel wybranego dnia ===== */
.cal-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.cal-kicker { font: 600 12px var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0; }
.cal-title { font: 700 clamp(38px, 6vw, 60px)/.95 var(--display); margin: 6px 0 8px; text-transform: none; letter-spacing: .01em; }
.cal-title span { color: var(--accent); font-weight: 600; }
.cal-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cal-arrows { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.cal-round { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 22px; }
.cal-round:hover { background: var(--sunk); color: var(--accent); }
.cal-today { padding: 8px 16px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-bottom: 22px; }
.cal-layout .month { border-radius: 18px; box-shadow: 0 24px 50px -32px rgb(0 0 0 / .55); }
.month-head span.is-weekend { color: var(--accent); }
.cal-layout .day { cursor: pointer; transition: background .2s; }
.cal-layout .day:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.cal-layout .day.is-selected { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.cal-layout .day-num { text-decoration: none; font-weight: 600; }
.cal-layout .day.is-today .day-num { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.day-chips { display: grid; gap: 4px; min-width: 0; }
.day-dots { display: none; }
.cal-side { position: sticky; top: 16px; }
.day-panel { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--surface);
  animation: day-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes day-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.day-panel-name { font: 600 12px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0; }
.day-panel-date { font: 700 40px/1 var(--display); margin: 6px 0 10px; }
.day-panel-items { display: grid; gap: 8px; margin: 12px 0; }
.day-card { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--sunk); border: 1px solid var(--line); border-left-width: 4px; transition: transform .2s; }
a.day-card:hover { transform: translateY(-2px); }
.day-card.chip-hold, .day-card.chip-inquiry { border-left-style: dashed; }
.day-card-time { font: 600 18px var(--display); color: var(--muted); border-right: 1px solid var(--line); padding-right: 8px; }
.day-card-body { display: grid; gap: 2px; min-width: 0; }
.day-card-body small { font: 600 11px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.day-card-body b { overflow-wrap: anywhere; }
.day-card-body span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.day-empty { color: var(--muted); padding: 16px 0; text-align: center; border: 1px dashed var(--line); border-radius: 14px; margin: 0; }
.day-panel-add { width: 100%; justify-content: center; }
@media (max-width: 980px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; }
}
@media (max-width: 760px) {
  .agenda { display: none; }
  .cal-layout .month { display: block; border-radius: 16px; }
  .cal-layout .month-head span { padding: 8px 0; text-align: center; letter-spacing: .06em; font-size: 11px; }
  .cal-layout .day { min-height: 56px; padding: 6px 2px; align-items: center; gap: 3px; }
  .cal-layout .day-top { justify-content: center; }
  .cal-layout .day-num { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 999px; font-size: 14px; }
  .cal-layout .day.is-today .day-num { padding: 0; }
  .cal-layout .day-add, .cal-layout .day-chips, .cal-layout .day-holiday, .cal-layout .day-eve { display: none; }
  .cal-layout .day.is-holiday:not(.is-today) .day-num { background: var(--crit-soft); }
  .day-dots { display: flex; gap: 3px; justify-content: center; }
  .day-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
  .day-dots .dot-signed { background: var(--accent); } .day-dots .dot-draft { background: var(--warn); } .day-dots .dot-played { background: var(--ink); }
  .day-dots .dot-google { background: #4285f4; } .day-dots .dot-task { background: var(--warn); opacity: .6; } .day-dots .dot-block { background: var(--crit); }
  .day-dots .dot-hold { background: transparent; border: 1px solid var(--muted); width: 4px; height: 4px; }
  .cal-layout .day.is-selected { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .day-panel { animation: none; } }

/* plansza "AI mysli" (29.09.2026, aiwait.js) */
.ai-wait { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ai-wait-card { width: min(420px, 100%); padding: 28px 24px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); display: grid; justify-items: center; gap: 8px; text-align: center; }
.ai-wait-orb { position: relative; width: 64px; height: 64px; margin-bottom: 8px; }
.ai-wait-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ai-ring 2.4s ease-out infinite; }
.ai-wait-orb i:nth-child(2) { animation-delay: .8s; } .ai-wait-orb i:nth-child(3) { animation-delay: 1.6s; }
.ai-wait-orb::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--accent); animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-ring { from { transform: scale(.35); opacity: .9; } to { transform: scale(1); opacity: 0; } }
@keyframes ai-pulse { 50% { transform: scale(.7); opacity: .6; } }
.ai-wait-step { margin: 0; font: 600 18px/1.3 var(--display); letter-spacing: .03em; color: var(--ink); min-height: 1.3em; }
.ai-wait-time { margin: 0; color: var(--accent); font-size: 14px; min-height: 1.2em; font-variant-numeric: tabular-nums; }
.ai-wait-note { margin: 0; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .ai-wait-orb i, .ai-wait-orb::after { animation: none; } .ai-wait-orb i:first-child { opacity: .6; } }

/* BAZA (CRM) */
#baza-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; } /* szeroka tabela przewija sie w sobie, nie rozpycha strony */
.baza-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.baza-stats b a { color: inherit; text-decoration: none; }
.baza-funnel { margin: 12px 0; }
.baza-funnel .num { color: var(--faint); margin-left: 4px; }
.baza-filters { margin-bottom: 12px; }
.baza-filters .field-inline { flex: 0 1 170px; }
.baza-filters .f-grow { flex: 1 1 240px; }
.baza-table td:nth-child(2) { min-width: 260px; }
.baza-table td small { overflow-wrap: anywhere; }
.baza-pages { align-self: center; justify-self: center; align-items: center; gap: 8px; }
.baza-pages span { padding: 6px 10px; color: var(--muted); font-size: 14px; }
.baza-target { scroll-margin-top: 16px; }
.baza-pipeline { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.baza-history li { position: relative; }
.baza-history .link-form { display: inline; }
@media (max-width: 980px) { .baza-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .baza-stats .stat:nth-child(3) { border-left: 0; } }
.baza-stats span a { color: inherit; }
.baza-table td:nth-child(2) { min-width: 240px; max-width: 380px; }
.baza-table td.bulk-col, .baza-table th.bulk-col { width: 1%; min-width: 0; padding-inline: 10px 4px; }
.baza-table .inline-status select { min-width: 140px; }

/* BAZA: znaczniki priorytetu i statusu */
.crm-prio { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; font: 600 13px/1 var(--mono); border: 1px solid var(--line); color: var(--muted); background: var(--sunk); }
.crm-prio-A { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.crm-prio-B { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.crm-prio-none { opacity: .4; }
.crm-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.crm-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.crm-written, .crm-replied { color: var(--ink); }
.crm-replied { border-color: var(--accent); }
.crm-offer, .crm-negotiation { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.crm-contract, .crm-played { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.crm-rejected { color: var(--crit); border-color: var(--crit-soft); }
.crm-later { color: var(--faint); border-style: dashed; }
.status-select.crm-written, .status-select.crm-replied { box-shadow: inset 3px 0 0 var(--ink); }
.status-select.crm-offer, .status-select.crm-negotiation { box-shadow: inset 3px 0 0 var(--warn); }
.status-select.crm-contract, .status-select.crm-played { box-shadow: inset 3px 0 0 var(--accent); }
.status-select.crm-rejected { box-shadow: inset 3px 0 0 var(--crit); }
.crm-meta { display: block; color: var(--muted); font-size: 13px; }
.crm-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.crm-chip-ok { color: var(--ink); border-color: var(--accent); }
.crm-chip-warn { color: var(--warn); border-color: var(--warn); }

/* BAZA: lista */
.crm-row-name { display: flex; gap: 10px; align-items: flex-start; }
.crm-row-name > div { min-width: 0; }
.crm-row-contact small a { color: inherit; }
.crm-grali { color: var(--muted); }
.crm-menu { position: relative; }
.crm-menu > summary { list-style: none; cursor: pointer; }
.crm-menu > summary::-webkit-details-marker { display: none; }
.crm-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgb(0 0 0 / .18); }
.crm-menu-list a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.crm-menu-list a:hover { background: var(--sunk); }

/* BAZA: karta organizatora */
.crm-hero { display: grid; gap: 10px; margin-bottom: 16px; }
.crm-hero h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.crm-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; margin-bottom: 12px; border-radius: var(--r); background: var(--sunk); border: 1px solid var(--line); border-left: 4px solid var(--muted); }
.crm-next.is-due { border-left-color: var(--warn); background: var(--warn-soft); }
.crm-next-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.crm-next .inline-form { margin-left: auto; }
.crm-cols { align-items: start; }
.crm-target { display: grid; gap: 14px; scroll-margin-top: 16px; }
.crm-target-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.crm-target-h h2 { font-size: 20px; font-weight: 600; line-height: 1.25; text-transform: none; letter-spacing: 0; font-family: var(--body); }
.crm-target-badges { display: flex; gap: 6px; align-items: center; flex: none; }
.crm-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.crm-fact { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); min-width: 0; }
.crm-fact small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.crm-fact b { font: 600 15px/1.3 var(--mono); overflow-wrap: anywhere; }
.crm-fact span { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.crm-why-box { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.crm-profile h3, .crm-message h3, .crm-pipeline h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.crm-profile p { font-size: 15px; line-height: 1.6; max-width: 72ch; }
.crm-message { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); }
.crm-message-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.crm-message-h h3 { margin: 0; }
.crm-to { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.crm-message-subject { font-weight: 600; }
.crm-message-body { font-size: 14px; color: var(--muted); line-height: 1.55; max-height: 12em; overflow: hidden; }
.crm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crm-pipeline { border-top: 1px solid var(--line); padding-top: 12px; }
.crm-more > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }
.crm-more[open] > summary { margin-bottom: 8px; }
.crm-call { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
.crm-call > summary { cursor: pointer; font-weight: 500; }
.crm-call-form { display: grid; gap: 10px; margin-top: 10px; }
.crm-call-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crm-call-fields input[name="note"] { flex: 1 1 220px; }
.crm-call-day { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.crm-outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-contact-card { display: grid; gap: 10px; }
.crm-person { display: grid; }
.crm-person span { font-size: 13px; color: var(--muted); }
.crm-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.crm-links a { display: grid; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); text-decoration: none; color: var(--ink); min-height: 44px; }
.crm-links a:hover { outline: 1px solid var(--line); }
.crm-links span, .crm-company > span:first-child { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.crm-links b { font-weight: 500; overflow-wrap: anywhere; }
.crm-company { display: grid; gap: 2px; font-size: 14px; }
.crm-company small { color: var(--faint); }
.crm-timeline { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.crm-timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 8px 0; border-left: 2px solid var(--line); margin-left: 5px; }
.crm-timeline li > div { padding-left: 4px; min-width: 0; }
.crm-timeline p { margin: 2px 0; overflow-wrap: anywhere; }
.crm-tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); margin-left: -7px; margin-top: 4px; }
.crm-tl-in .crm-tl-dot { border-color: var(--accent); background: var(--accent); }
.crm-change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crm-change-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: var(--sunk); }
.crm-change-list li.is-undone { opacity: .55; }
.crm-change-list q { display: block; margin-top: 4px; font-style: italic; color: var(--muted); font-size: 13px; }
.crm-change-list small { display: block; }
.crm-src { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
.crm-src-ai { border-color: var(--accent); }
.crm-src-cadence { border-color: var(--warn); }
.inline-form { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 0; }

/* BAZA: ekran Dzis */
.crm-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 4px 0 18px; }
.crm-step { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.crm-step b { font: 600 24px/1 var(--mono); color: var(--faint); }
.crm-step.has { color: var(--ink); border-color: var(--accent); }
.crm-step.has b { color: var(--ink); }
.crm-day-section { margin-bottom: 22px; scroll-margin-top: 16px; }
.crm-day-h { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: baseline; margin-bottom: 10px; }
.crm-day-h h2 { font-size: 18px; font-weight: 600; }
.crm-day-h p { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: 0; }
.crm-count { font: 600 13px/1 var(--mono); padding: 3px 8px; border-radius: 999px; background: var(--sunk); }
.crm-day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.crm-item { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.crm-item-reply { border-left: 4px solid var(--accent); }
.crm-item-due, .crm-item-call { border-left: 4px solid var(--warn); }
.crm-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.crm-item-title { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.crm-item-title a { color: var(--ink); text-decoration: none; }
.crm-item-title b { overflow-wrap: anywhere; }
.crm-why { margin: 0; font-size: 14px; }
.crm-contact { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.crm-empty { margin-bottom: 18px; }
.crm-changes { margin-top: 8px; }
.crm-confirm { display: grid; gap: 14px; }
.crm-confirm .mail-preview { max-height: 50vh; overflow: auto; padding: 14px; border-radius: 10px; background: var(--sunk); font-size: 14px; line-height: 1.55; }
.crm-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.crm-ai-form { margin-top: 10px; }

@media (max-width: 980px) {
  .crm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .crm-step span { white-space: nowrap; font-size: 13px; }
  .crm-step { padding: 10px; }
  .crm-step b { font-size: 20px; }
  .crm-hero h1 { font-size: 24px; }
  .crm-next .inline-form { margin-left: 0; }
  .crm-change-list li { grid-template-columns: 1fr; }
  .crm-menu-list { right: auto; left: 0; }
}

/* Duze ekrany (27" QHD, ultrawide 21:9, 4K, telewizor): tresc szersza, a od 2200 px caly interfejs proporcjonalnie wiekszy.
   Reguly tylko min-width - telefon i laptop bez zmian. zoom z kompensacja wysokosci panelu (sticky 100vh). */
@media (min-width: 1600px) {
  .shell { grid-template-columns: 256px minmax(0, 1fr); }
  .main { max-width: 1720px; padding: 32px 44px 56px; }
  .booking-form { max-width: 1180px; }
}
@media (min-width: 2200px) {
  .main { zoom: 1.15; max-width: 1900px; }
  .rail { zoom: 1.15; height: calc(100vh / 1.15); }
  .shell { grid-template-columns: calc(256px * 1.15) minmax(0, 1fr); }
  /* mapy Leaflet licza pozycje myszy bez zoomu przodka - mapa w skali 1:1 (bez szwow kafelkow i przesuniecia klikniec) */
  .main .leaflet-container { zoom: calc(1 / 1.15); }
}
@media (min-width: 3000px) {
  .main { zoom: 1.35; max-width: 2400px; }
  .rail { zoom: 1.35; height: calc(100vh / 1.35); }
  .shell { grid-template-columns: calc(256px * 1.35) minmax(0, 1fr); }
  .main .leaflet-container { zoom: calc(1 / 1.35); }
}
/* telefon: menu "Wiecej" w BAZIE rozwija sie pod przyciskiem na cala szerokosc (wczesniej wystawalo za prawa krawedz) */
@media (max-width: 640px) {
  .crm-menu { flex: 1 1 100%; }
  .crm-menu > summary { width: 100%; }
  .crm-menu-list { position: static; min-width: 0; margin-top: 6px; box-shadow: none; }
}

/* Dopnij trase (28.10.2026) */
.tour-days { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tour-days li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line); min-width: 0; }
.tour-days li.is-free { border-color: var(--accent); background: var(--accent-soft); }
.tour-days li.is-busy span { color: var(--muted); }
.tour-fill { display: grid; gap: 10px; }
.tour-fill .doc-list li { align-items: center; }
.tour-pick { display: flex; gap: 10px; align-items: flex-start; min-width: 0; cursor: pointer; }
.tour-pick input { margin-top: 3px; flex: none; }
.tour-pick > span { display: flex; flex-direction: column; min-width: 0; }
.tour-fit { color: var(--accent); font-weight: 600; }
