/* ==========================================================================
   Kolory (bez zmian) + dark mode
   ========================================================================== */
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #fbf9f6;
  --ink: #1a1714;
  --muted: #6f675e;
  --line: #e7e0d6;
  --line-strong: #d6cdc0;
  --accent: #a3271f;
  --accent-ink: #ffffff;
  --accent-soft: #f7e6e3;
  --soft: #f1ebe3;
  --ok: #2f7a43;
  --ok-bg: #e8f3ea;
  --ok-ink: #22592f;
  --warn-bg: #fbeee0;
  --warn-ink: #8a4b0f;
  --err-bg: #fbe9e7;
  --err-ink: #8f1d15;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(26 23 20 / 0.05), 0 8px 28px rgb(26 23 20 / 0.06);
  --shadow-lift: 0 2px 4px rgb(26 23 20 / 0.06), 0 12px 32px rgb(26 23 20 / 0.1);
  --bottomnav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1d1a17;
    --surface-2: #221f1b;
    --ink: #f1ece5;
    --muted: #a39a8f;
    --line: #322d28;
    --line-strong: #463f38;
    --accent: #e0574b;
    --accent-ink: #160e0d;
    --accent-soft: #3a1f1c;
    --soft: #27231f;
    --ok: #7cc68e;
    --ok-bg: #1d3323;
    --ok-ink: #a9dcb4;
    --warn-bg: #3a2a17;
    --warn-ink: #f2c38c;
    --err-bg: #3c1d1a;
    --err-ink: #f4b2aa;
    --shadow: none;
    --shadow-lift: 0 0 0 1px var(--line-strong);
    color-scheme: dark;
  }
}

/* ==========================================================================
   Podstawy
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
/* Bez przybliżania podwójnym stuknięciem (gest szczypania dalej działa). */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
.icon { flex: none; vertical-align: -0.15em; }

.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.wide { max-width: 1080px; }

h1, .h2, .h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: 1.9rem; font-weight: 800; }
.h2 { font-size: 1.35rem; font-weight: 750; }
.h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow { margin: 0 0 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.accent { color: var(--accent); }
.nowrap { white-space: nowrap; }
.one-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 0.95em; word-break: break-all; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Układ
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > * { margin: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.stack-lg > * { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ==========================================================================
   Formularze
   ========================================================================== */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
label, .label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .label { display: block; }
legend.label { padding: 0; margin-bottom: 8px; }
label small, .field small { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
label .muted, .label .muted { font-weight: 400; }

input:not([type="checkbox"], [type="radio"], [type="file"]), select, textarea {
  width: 100%;
  font: inherit;
  /* iOS Safari przybliża stronę przy polach < 16 px – dlatego zawsze min. 16 px. */
  font-size: max(16px, 1rem);
  font-weight: 400;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: 46px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
textarea { resize: vertical; min-height: 0; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; flex: none; margin: 2px 0 0; }

.prefix-input, .suffix-input { display: flex; align-items: stretch; }
.prefix-input > span, .suffix-input > span { display: flex; align-items: center; padding: 0 12px; background: var(--soft); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500; }
.prefix-input > span { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.prefix-input input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
.suffix-input > span { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.suffix-input input { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }

.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }

/* chipsy – podpowiedzi, które wpisują wartość do pola */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 0.85rem; font-weight: 550;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--muted); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* pigułki radio */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px 9px 12px; font-weight: 550; cursor: pointer; background: var(--surface); }
.pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* kafelki rozmiaru */
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.size-card {
  position: relative; align-items: center; text-align: center; gap: 2px;
  padding: 12px 6px 10px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer;
  background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.size-card input { position: absolute; opacity: 0; pointer-events: none; }
.size-card:hover { border-color: var(--muted); }
.size-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.size-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.size-visual { height: 34px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.size-visual span { display: block; border-radius: 50%; border: 2px solid currentColor; }
.size-visual[data-scale="1"] span { width: 10px; height: 10px; }
.size-visual[data-scale="2"] span { width: 18px; height: 18px; }
.size-visual[data-scale="3"] span { width: 26px; height: 26px; }
.size-visual[data-scale="4"] span { width: 32px; height: 32px; border-style: dashed; }
.size-card:has(input:checked) .size-visual { color: var(--accent); }
.size-label { font-weight: 700; font-size: 0.9rem; }
.size-hint { font-weight: 400; font-size: 0.75rem; color: var(--muted); }

/* przełączniki z opisem */
.toggle-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 520px) { .toggle-list { grid-template-columns: 1fr 1fr; } }
.toggle { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; font-weight: 400; background: var(--surface); }
.toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* upload zdjęć */
.dropzone {
  flex-direction: row; align-items: center; gap: 14px;
  padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: 14px;
  background: var(--surface-2); cursor: pointer; font-weight: 400;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent); border: 1px solid var(--line); flex: none; }
.previews { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.previews:empty { display: none; }
.preview { position: relative; aspect-ratio: 1; }
.preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.preview button {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--ink); color: var(--bg); cursor: pointer;
  display: grid; place-items: center; padding: 0;
}

/* ==========================================================================
   Przyciski
   ========================================================================== */
.btn {
  display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 0.95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 10px 16px; min-height: 44px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, filter 0.15s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--soft); border-color: transparent; }
.btn-danger { color: var(--err-ink); border-color: color-mix(in srgb, var(--err-ink) 35%, transparent); }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err-ink); }
.btn-small { padding: 6px 12px; min-height: 36px; font-size: 0.85rem; gap: 6px; }
.btn-tiny { padding: 3px 8px; min-height: 28px; font-size: 0.8rem; gap: 4px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--ink); }
.inline-form { display: inline-flex; margin: 0; }
.btn-block + .inline-form, .inline-form:has(.btn-block) { display: flex; }

/* ==========================================================================
   Komunikaty
   ========================================================================== */
.alert, .notice { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-weight: 550; }
.alert { background: var(--err-bg); color: var(--err-ink); }
.notice { background: var(--ok-bg); color: var(--ok-ink); }
.card .notice { margin: 0; }

/* ==========================================================================
   Panel: górny pasek i dolna nawigacja
   ========================================================================== */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; font-size: 1.05rem; margin-right: auto; }
.logo-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 0.85rem; }
.big-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 1.3rem; margin-bottom: 14px; }
.topnav { display: none; gap: 4px; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.topnav a:hover { color: var(--ink); background: var(--soft); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.topbar-actions { display: flex; gap: 6px; }

.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; }
.bottomnav a[aria-current="page"] { color: var(--accent); }
.is-panel .wrap { padding-bottom: calc(var(--bottomnav-h) + 40px); }

@media (max-width: 759px) {
  .hide-mobile { display: none !important; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 6px 10px; }
}
@media (min-width: 760px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  .is-panel .wrap { padding-bottom: 64px; }
  .logo { margin-right: 8px; }
  .topnav { margin-right: auto; }
}

.page-head { margin: 8px 0 20px; }
.page-head h1 { font-size: 1.75rem; }
.page-head p { margin: 6px 0 0; font-size: 1.02rem; }
.back { margin: 0 0 14px; }
.back a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.back a:hover { color: var(--ink); }

/* ==========================================================================
   Pulpit
   ========================================================================== */
.onboarding { margin-bottom: 20px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.checklist { list-style: none; margin: 14px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.checklist li:first-child { border-top: 0; }
.check-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.8rem; font-weight: 700; background: var(--soft); color: var(--muted); }
.checklist li.is-done .check-num { background: var(--ok-bg); color: var(--ok); }
.checklist li.is-done .checklist-title { color: var(--muted); text-decoration: line-through; }
.checklist-title { flex: 1; min-width: 180px; font-weight: 550; }
.onboarding-done { margin: 0; }
.onboarding-done .link { font-size: 0.85rem; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px;
  padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s;
}
.tile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.tile-num { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; grid-row: 1; grid-column: 1; }
.tile-icon { grid-row: 1; grid-column: 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.tile-label { grid-row: 2; grid-column: 1 / -1; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.tile.is-hot { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile.is-hot .tile-num { color: var(--accent); }
.tile.is-hot .tile-icon { background: var(--accent-soft); color: var(--accent); }

.section { margin-bottom: 28px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.section-hint { margin: -4px 0 10px; }
.empty-line { margin: 0; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 32px 20px; }
.empty p { margin: 0; }
.empty .btn { margin-top: 8px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin: 0 auto 6px; }

.dash-grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
@media (min-width: 880px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.archive-link a { color: var(--muted); }

/* karta nowego zgłoszenia */
.req-list, .row-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.req-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.req-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.req-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.req-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.req-name { font-weight: 700; }
.req-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.req-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .req-card { grid-template-columns: 64px 1fr auto; }
  .req-side { grid-column: auto; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; padding-top: 0; border-top: 0; }
}
.waiting { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.waiting.is-late { color: var(--warn-ink); background: var(--warn-bg); padding: 2px 8px; border-radius: 999px; }

.avatar { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--soft); flex: none; }
@media (min-width: 760px) { .req-card .avatar { width: 64px; height: 64px; } }
.avatar-letter { display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: var(--muted); }
.avatar-sm { width: 42px; height: 42px; border-radius: 12px; font-size: 1rem; }
.avatar-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 1.4rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 550; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* wiersze: zadatki, sesje, listy */
.row-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 10px 10px; box-shadow: var(--shadow); }
.row-card:hover { border-color: var(--line-strong); }
.row-card.is-today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.row-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main .small { overflow: hidden; text-overflow: ellipsis; }
.row-chevron { color: var(--muted); display: flex; }

.date-block { width: 46px; height: 50px; border-radius: 12px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--soft); line-height: 1; }
.date-day { font-size: 1.25rem; font-weight: 800; }
.date-month { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-top: 3px; letter-spacing: 0.04em; }
.is-today .date-block { background: var(--accent); color: var(--accent-ink); }
.is-today .date-month { color: inherit; opacity: 0.85; }
.date-block.is-empty { color: var(--muted); }

/* zakładki */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem; border: 1px solid var(--line); background: var(--surface); }
.tab:hover { color: var(--ink); border-color: var(--line-strong); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.count { font-size: 0.75rem; font-weight: 700; opacity: 0.7; }

/* statusy */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-new { background: var(--accent-soft); color: var(--accent); }
.badge-accepted { background: var(--warn-bg); color: var(--warn-ink); }
.badge-booked { background: var(--ok-bg); color: var(--ok-ink); }

/* ==========================================================================
   Szczegóły zgłoszenia
   ========================================================================== */
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-title { flex: 1; min-width: 180px; }
.detail-title p { margin: 4px 0 0; }
.detail-title a { color: inherit; font-weight: 600; }

.stepper { list-style: none; margin: 0 0 20px; padding: 0; display: flex; }
.stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.stepper li:not(:first-child)::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--ink); }
.step-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line-strong); color: var(--bg); }
.stepper li.is-done .step-dot { background: var(--ink); border-color: var(--ink); }
.stepper li.is-current .step-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper li.is-current .step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.step-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.stepper li.is-current .step-label { color: var(--ink); font-weight: 750; }
@media (min-width: 520px) { .step-label { font-size: 0.8rem; } }

/* kolejność kart: na telefonie jedna kolumna (akcja na górze, jeśli trzeba), na komputerze dwie */
.detail-flow { display: flex; flex-direction: column; gap: 16px; }
.detail-flow .detail-main, .detail-flow .detail-side { display: contents; }
.o-request { order: 2; }
.o-next { order: 3; }
.action-first .o-next { order: 1; }
.o-notes { order: 4; }
.o-link { order: 5; }
.o-reject { order: 6; }
.o-reject:empty { display: none; }
@media (min-width: 880px) {
  .detail-flow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .detail-flow .detail-main, .detail-flow .detail-side { display: flex; flex-direction: column; gap: 16px; }
}
.detail-grid:not(.detail-flow) { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 880px) { .detail-grid:not(.detail-flow) { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; } }

.description { white-space: pre-line; font-size: 1.08rem; line-height: 1.55; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos.is-single { grid-template-columns: minmax(0, 320px); }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; transition: opacity 0.15s; }
.photos a:hover img { opacity: 0.9; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
/* długie e-maile i linki zawijają się zamiast wychodzić poza kafelek */
.facts dd, .req-desc, .row-main, .description, .link-box code { overflow-wrap: anywhere; }
.facts dt { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 650; }

.next-step { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); display: flex; flex-direction: column; gap: 14px; }
.next-step > * { margin: 0; }
.step-kicker { font-size: 0.72rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: -8px !important; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.mini-steps li { display: flex; align-items: center; gap: 8px; }
.mini-steps span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 0.72rem; font-weight: 750; }
.money { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.money-amount { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.session-hero { display: flex; align-items: center; gap: 14px; }
.session-hero .date-block { width: 58px; height: 62px; background: var(--ink); color: var(--bg); }
.session-hero .date-day { font-size: 1.5rem; }
.session-hero .date-month { color: inherit; opacity: 0.8; }
.session-hero p { margin: 0; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.edit-quote { border-top: 1px solid var(--line); padding-top: 12px; }
.edit-quote > summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.edit-quote > summary:hover { color: var(--ink); }
.edit-quote[open] > summary { margin-bottom: 14px; color: var(--ink); }
.reject > summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.88rem; color: var(--muted); padding: 4px 0; }
.reject > summary:hover { color: var(--err-ink); }
.reject-body { margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }

.client-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 4px; }
.client-link .muted { display: inline-flex; align-items: center; gap: 4px; }
.client-link a { max-width: 220px; }

/* czat */
.chat { display: flex; }
.bubble {
  max-width: 100%; white-space: pre-line; overflow-wrap: anywhere; font-size: 0.92rem; line-height: 1.45;
  padding: 10px 14px; border-radius: 18px 18px 4px 18px; margin-left: auto;
  background: var(--ink); color: var(--bg);
}
.bubble.is-incoming { margin-left: 0; margin-right: auto; border-radius: 18px 18px 18px 4px; background: var(--soft); color: var(--ink); }

.link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.link-box > :first-child { flex: 1; min-width: 0; }
.link-box code { background: none; padding: 0; font-size: 0.92rem; }
.howto { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.howto strong { color: var(--ink); }

/* ==========================================================================
   Logowanie
   ========================================================================== */
.is-auth .wrap { max-width: 420px; padding-top: 10vh; }
.brand { margin: 8px 0 20px; }
.brand.center { display: flex; flex-direction: column; align-items: center; }

/* ==========================================================================
   Strony klienta
   ========================================================================== */
.artist-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.artist-head h1 { font-size: 1.7rem; }
.artist-head a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; margin-top: 2px; }
.artist-mark {
  width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line-strong);
}
.artist-head.is-compact h1 { font-size: 1.3rem; }
.artist-head.is-compact .artist-mark { width: 44px; height: 44px; font-size: 1.1rem; }
.intro { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.intro p { margin: 0; }

.form-step { padding: 20px 18px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.1rem; font-weight: 750; letter-spacing: -0.01em; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 0.85rem; font-weight: 800; flex: none; }
.hint-line { margin-top: -6px !important; }
.consents { padding: 4px 4px 0; gap: 12px; }
.consents .check { font-size: 0.9rem; }

.success { padding: 28px 20px; }
.success-icon, .state-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--ok-bg); color: var(--ok); }
.state-icon { background: var(--soft); color: var(--muted); }
.state-icon.is-ok { background: var(--ok-bg); color: var(--ok); }
.status-card { padding: 24px 20px; }
.status-card > .h2, .status-card > p { text-align: center; }
.quote { display: flex; flex-direction: column; gap: 12px; }
.quote-price { display: flex; flex-direction: column; align-items: center; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.quote-price strong { font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1.15; }
.quote-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quote-facts li { display: flex; align-items: flex-start; gap: 10px; }
.quote-facts .icon { margin-top: 3px; color: var(--muted); }
.deposit-box { padding: 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.deposit-box p { margin: 0; }
.deposit-box .link-box { background: var(--surface); }
.copy-field { display: flex; flex-direction: column; gap: 4px; }
.tips { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tips p { margin: 0 0 4px; }
.tips ul { margin: 0; padding-left: 18px; color: var(--muted); }
.is-public .stepper { margin-bottom: 16px; }

/* polityka prywatności */
.legal { display: flex; flex-direction: column; gap: 10px; line-height: 1.6; }
.legal h2 { margin-top: 12px; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.consents a { color: inherit; font-weight: 600; }

/* panel administratora */
.tile-label .muted { font-weight: 500; }
.admin .tile, .tiles .tile:not([href]) { cursor: default; }
.funnel { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 12px; font-size: 0.9rem; }
.funnel-label { font-weight: 600; }
.funnel-bar { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.funnel-num { font-weight: 700; white-space: nowrap; }
.table-wrap { padding: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lead form { margin: 0; }

/* ==========================================================================
   Strona główna inkdm.pl – zawsze ciemny motyw
   ========================================================================== */
.is-landing {
  --bg: #0e0c0b;
  --surface: #181514;
  --surface-2: #1f1b19;
  --ink: #f3eee8;
  --muted: #a69d93;
  --line: #2b2623;
  --line-strong: #3d3632;
  --accent: #e0574b;
  --accent-ink: #160e0d;
  --accent-soft: #3a1f1c;
  --soft: #24201d;
  --ok: #7cc68e;
  --ok-bg: #1d3323;
  --ok-ink: #a9dcb4;
  --err-bg: #3c1d1a;
  --err-ink: #f4b2aa;
  --shadow: none;
  color-scheme: dark;
  background:
    radial-gradient(700px 420px at 85% -80px, rgb(224 87 75 / 0.16), transparent 70%),
    var(--bg);
}
.is-landing .wrap { padding-top: 0; padding-bottom: 32px; }
.is-landing main { overflow-x: clip; }

.lp-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lp-nav-inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.is-landing .logo-mark { background: var(--ink); color: var(--bg); }
.lp-links { display: flex; align-items: center; gap: 18px; }
.lp-links > a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.lp-links > a:not(.btn):hover { color: var(--ink); }

/* hero */
.lp-hero { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; padding: 36px 0 8px; }
.lp-hero h1 { font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 0.98; letter-spacing: -0.045em; margin: 8px 0 18px; }
.lp-lead { font-size: 1.08rem; line-height: 1.6; color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.lp-cta { display: flex; flex-direction: column; gap: 10px; }
.lp-cta .btn { width: 100%; }
.lp-points { margin: 18px 0 0; text-align: center; }

/* telefony: przedni w normalnym układzie, tylny w tle – kontener sam dopasowuje wysokość */
.lp-hero-visual { position: relative; width: 100%; max-width: 340px; margin: 0 auto; padding-top: 36px; }
.lp-hero-visual .phone { width: 196px; }
.lp-hero-visual .phone-front { position: relative; z-index: 1; transform: rotate(-3deg); }
.lp-hero-visual .phone-back { position: absolute; top: 0; right: 0; transform: rotate(4deg); opacity: 0.9; }

.phone { margin: 0; border-radius: 32px; padding: 7px; background: #000; box-shadow: 0 0 0 1px var(--line-strong), 0 28px 60px rgb(0 0 0 / 0.55); width: 220px; }
.phone img { border-radius: 26px; width: 100%; height: auto; display: block; background: #f6f3ee; }

/* sekcje – ten sam rytm odstępów wszędzie */
.lp-section { padding: 44px 0 0; }
.lp-section > .eyebrow { margin-bottom: 6px; }
.lp-h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin: 0 0 20px; }
.lp-grid-3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lp-problem { display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.lp-problem p { margin: 0; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 44px; }
.lp-step { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
.lp-step-copy { display: flex; flex-direction: column; gap: 10px; max-width: 30em; }
.lp-step-copy .h2 { font-size: 1.3rem; }
.lp-step-copy p { margin: 0; font-size: 1.02rem; line-height: 1.6; }
.lp-step-visual { display: flex; justify-content: center; }
.lp-chat { max-width: 340px; }
.lp-chat + .lp-chat { margin-top: -2px; }
.is-landing .bubble:not(.is-incoming) { background: var(--accent); color: #fff; }

.lp-features { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lp-feature { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.lp-feature h3, .lp-feature p { grid-column: 2; }
.lp-feature .tile-icon { grid-column: 1; grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.lp-feature h3, .lp-feature p { margin: 0; }

.lp-beta { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 24px 18px; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.lp-beta .lp-h2 { margin-bottom: 16px; }
.lp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; }
.lp-checks li { display: flex; align-items: flex-start; gap: 10px; }
.lp-checks .icon { color: var(--ok); margin-top: 3px; }
.lp-thanks { padding: 20px 0; }

.lp-faq { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.lp-faq .lp-h2 { margin-bottom: 12px; }
.lp-faq details { padding: 0; }
.lp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 650; }
.lp-faq summary .icon { color: var(--muted); transition: transform 0.15s; flex: none; }
.lp-faq details[open] summary .icon { transform: rotate(90deg); }
.lp-faq details p { margin: 0; padding: 0 18px 16px; }

.lp-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px 0 8px; border-top: 1px solid var(--line); margin-top: 48px; }
.lp-footer .logo { margin-right: 0; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lp-footer-links a { color: var(--muted); }

@media (min-width: 600px) {
  .lp-features { grid-template-columns: repeat(2, 1fr); }
  .lp-cta { flex-direction: row; }
  .lp-cta .btn { width: auto; }
  .lp-points { text-align: left; }
}
@media (min-width: 760px) {
  .lp-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .lp-footer { flex-direction: row; align-items: center; gap: 10px 20px; }
  .lp-footer-links { margin-left: auto; }
}
@media (min-width: 900px) {
  .lp-hero { grid-template-columns: 1.1fr 1fr; padding: 72px 0 24px; gap: 48px; }
  .lp-hero-visual { max-width: 440px; }
  .lp-hero-visual .phone { width: 256px; }
  .lp-section { padding-top: 88px; }
  .lp-h2 { margin-bottom: 28px; }
  .lp-steps { gap: 72px; }
  .lp-step { grid-template-columns: 1fr 1fr; gap: 56px; }
  .lp-step:nth-child(odd) .lp-step-visual { order: -1; }
  .lp-step.is-text { grid-template-columns: 1fr; }
  .lp-step-copy .h2 { font-size: 1.5rem; }
  .lp-features { grid-template-columns: repeat(3, 1fr); }
  .lp-beta { grid-template-columns: 1fr 1fr; padding: 40px; gap: 48px; }
  .lp-footer { margin-top: 88px; }
}

/* ==========================================================================
   Wysyłanie formularzy: spinner na przycisku i pasek postępu zdjęć
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

.btn.is-loading { pointer-events: none; opacity: 0.92; }
.btn.is-loading .icon { display: none; }
.btn.is-loading::before {
  content: ""; width: 1.05em; height: 1.05em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
form.is-sending fieldset, form.is-sending .form-step, form.is-sending .consents { opacity: 0.55; pointer-events: none; transition: opacity 0.2s; }

.submit-area { display: flex; flex-direction: column; gap: 10px; }
.upload-progress[hidden] { display: none; }
.upload-progress { display: flex; flex-direction: column; gap: 8px; }
.upload-progress p { margin: 0; }
.upload-bar { position: relative; height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.upload-bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.2s ease-out; }
/* Przed pierwszym odczytem postępu (albo bez zdjęć) – pasek „pływa”. */
.upload-bar.is-indeterminate span { width: 40%; animation: pulse-bar 1.1s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::before, .upload-bar.is-indeterminate span { animation-duration: 2.5s; }
}

/* Kafelki rozmiaru – równa wysokość w każdym rzędzie */
.size-grid { grid-auto-rows: 1fr; }

/* Karty ułożone jedna pod drugą bez kontenera nie mogą się stykać */
main.wrap > .card + .card,
main.wrap > section.card + section.card { margin-top: 16px; }

/* Wycena: wybór terminu */
.date-field { gap: 10px; }
.date-field legend.label { margin-bottom: 0; }
.date-field.is-tbd .date-inputs { opacity: 0.45; }
.date-inputs input[type="date"] { min-height: 46px; }

/* ==========================================================================
   Zdjęcie profilowe i portfolio
   ========================================================================== */
img.artist-mark { object-fit: cover; padding: 0; }
.logo-avatar { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.avatar-xl { width: 88px; height: 88px; border-radius: 50%; font-size: 2rem; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.avatar-edit form { margin: 0; }

.portfolio-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .portfolio-edit { grid-template-columns: repeat(5, 1fr); } }
.portfolio-edit figure { position: relative; margin: 0; aspect-ratio: 1; }
.portfolio-edit figure img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.portfolio-edit figure form { position: absolute; top: 6px; right: 6px; margin: 0; }
.pf-remove {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 0; background: rgb(0 0 0 / 0.6); color: #fff; backdrop-filter: blur(4px);
}
.pf-add { margin: 0; aspect-ratio: 1; }
.pf-add label {
  height: 100%; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 0.82rem;
}
.pf-add label:hover { border-color: var(--accent); color: var(--accent); }
.pf-add.is-busy label { pointer-events: none; opacity: 0.6; }
.pf-add.is-busy label::before { content: ""; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.pf-add.is-busy label .icon { display: none; }

/* pasek prac nad formularzem klienta – przewijany palcem w bok */
.portfolio-strip { margin: -4px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.portfolio-strip .label { margin: 0; }
.pf-scroll { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.pf-scroll::-webkit-scrollbar { display: none; }
.pf-scroll a { flex: none; width: 116px; aspect-ratio: 1; scroll-snap-align: start; }
.pf-scroll img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

/* powiększenie zdjęcia */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.85); }
.lightbox img { max-width: min(92vw, 900px); max-height: 86vh; border-radius: 12px; display: block; }
.lightbox button { position: fixed; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 1.4rem; cursor: pointer; }

.notify-client { font-size: 0.9rem; }
.settings-grid { margin-top: 16px; }

/* ==========================================================================
   Kalendarz
   ========================================================================== */
.page-head.row-between { align-items: center; }
.cal-card { padding: 14px 12px 16px; }
.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.cal-nav h2 { flex: 1; text-align: center; }
.cal-nav .btn-ghost { font-size: 1.3rem; padding: 4px 12px; }
.cal-today { order: -1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 4px; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; padding: 6px 2px;
  border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; min-width: 0;
}
.cal-day:hover { background: var(--soft); }
.cal-day.is-other { color: var(--muted); opacity: 0.5; }
.cal-num { font-weight: 650; font-size: 0.92rem; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--accent); color: var(--accent-ink); }
.cal-day.is-selected { border-color: var(--ink); background: var(--surface-2); }
.cal-dots { display: flex; gap: 3px; min-height: 6px; }
.cal-dots i, .cal-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot-booked { background: var(--ok); }
.dot-accepted { background: var(--warn-ink); }
.dot-quoted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.dot-own { background: var(--accent); }
.dot-done { background: var(--line-strong); }
.cal-chips { display: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

@media (min-width: 760px) {
  .cal-day { align-items: stretch; min-height: 96px; padding: 6px; border-color: var(--line); }
  .cal-num { width: 26px; height: 26px; font-size: 0.85rem; }
  .cal-dots { display: none; }
  .cal-chips { display: flex; flex-direction: column; gap: 3px; }
  .cal-chip { font-size: 0.72rem; line-height: 1.3; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--soft); }
  .cal-chip.kind-booked { background: var(--ok-bg); color: var(--ok-ink); }
  .cal-chip.kind-accepted { background: var(--warn-bg); color: var(--warn-ink); }
  .cal-chip.kind-quoted { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
  .cal-chip.kind-own { background: var(--accent-soft); color: var(--accent); }
  .cal-chip.kind-done { color: var(--muted); }
}

.cal-day-head { margin: 14px 0 8px; font-weight: 700; font-size: 0.9rem; }
.cal-day-head:first-of-type { margin-top: 0; }
.cal-list { margin-bottom: 4px; }
.cal-item a { display: flex; align-items: center; gap: 12px; width: 100%; color: inherit; text-decoration: none; }
.cal-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.cal-item.kind-booked { border-left-color: var(--ok); }
.cal-item.kind-accepted { border-left-color: var(--warn-ink); }
.cal-item.kind-own { border-left-color: var(--accent); }
.cal-item.kind-quoted { border-left-style: dashed; }
.cal-time { flex: none; width: 64px; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cal-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow-wrap: anywhere; }

.cal-form { margin-top: 8px; }
.cal-form > summary { cursor: pointer; }
.cal-form[open] > summary { margin-bottom: 8px; }
.cal-form > p { margin: 0 0 14px; }
.section-link { margin: 10px 0 0; }

.reject-body .inline-form { flex-direction: column; align-items: flex-start; gap: 10px; }
.reject-mail { font-size: 0.88rem; }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cal-time { width: 72px; white-space: nowrap; }
.cal-time.is-allday { font-size: 0.75rem; font-weight: 650; color: var(--muted); }

/* Pola daty/godziny na iPhonie: Safari nadaje im własną szerokość i wysokość – wyrównujemy do reszty pól. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.5;
  text-align: left;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { text-align: left; min-height: 1.5em; margin: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; }
/* Elementy siatki i etykiety nie mogą rozpychać kolumn */
.grid-2 > *, label, .field { min-width: 0; }

/* Kalendarz: odstępy między siatką, listą dni i formularzem */
.cal-card + .section { margin-top: 24px; }
#dzien .section-head { margin-bottom: 12px; }
.cal-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.cal-day-head { margin: 22px 0 10px; }
#dzien .cal-day-head:first-of-type { margin-top: 4px; }
.cal-form { margin-top: 24px; }

/* Jednakowa wysokość pól i list na każdym telefonie (Safari ignoruje padding w natywnych listach) */
input:not([type="checkbox"], [type="radio"], [type="file"]), select { height: 48px; min-height: 48px; }
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8178' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
input[type="date"] { padding-top: 0; padding-bottom: 0; line-height: 46px; }
input[type="date"]::-webkit-datetime-edit { padding: 0; line-height: 46px; }

/* Dokumenty prawne */
.legal ol { padding-left: 22px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.legal-links { margin-top: 14px; }
.legal-links a, .legal-inline a { color: var(--muted); }
.legal-docs { list-style: none; padding: 0; margin: 0; gap: 8px; }
.legal-docs a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.legal-inline { margin: 0; line-height: 1.6; }

/* Admin: pozyskiwanie i zaproszenia */
.admin-tabs { margin-bottom: 8px; }
.prospect-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.prospect { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.prospect.is-followup { border-color: color-mix(in srgb, var(--warn-ink) 45%, var(--line)); }
.prospect-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.prospect-head .req-name { color: var(--ink); text-decoration: none; }
.prospect-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.prospect p { margin: 0; }
.warn-line { display: flex; align-items: center; gap: 6px; color: var(--warn-ink); font-weight: 600; }
.prospect .edit-quote { padding-top: 10px; }
.delete-prospect { margin-top: 10px; }
.search-city { display: flex; gap: 8px; margin: 0; }
.search-city input { flex: 1; }
.chip-row a.chip { text-decoration: none; }
.new-invite { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.new-invite .big code { font-size: 1.4rem; letter-spacing: 0.08em; }
.invite-row { flex-wrap: wrap; }
.invite-row code { letter-spacing: 0.05em; }

.card + .section, form.card + .section { margin-top: 20px; }
