/* Portal Klienta kancelarii (demo 3Perspective)
   Aesthetic: luxury legal — champagne gold on deep forest green, Cormorant
   Garamond display serif + Jost geometric sans, hairline gold rules, quiet grain. */

:root {
  --bg:        #0d1a13;
  --bg-1:      #112016;
  --bg-2:      #15271c;
  --bg-3:      #1c3324;
  --line:      rgba(200, 169, 106, 0.18);
  --line-2:    rgba(255, 255, 255, 0.06);
  --gold:      #c8a96a;
  --gold-br:   #e6cd92;
  --gold-dp:   #9c7d44;
  --text:      #f4f1ea;
  --text-dim:  #b3bcae;
  --text-mute: #7d877a;
  --ok:        #97c08a;
  --warn:      #e0b878;
  --danger:    #e0917f;

  /* Colour on top of a gold surface (gold buttons, unread badge). */
  --gold-ink:  #181307;
  /* Ink versions of the semantic colours — used where the colour is TEXT, not a
     fill. Identical to the base tokens in the dark theme; the light theme
     darkens them, because #e0b878 & co. are illegible on white. */
  --warn-ink:   var(--warn);
  --danger-ink: #f0c4ba;
  /* Second stop of the .panel gradient + assorted neutral fills that used to be
     hardcoded rgba(white/black) — they must invert with the theme. */
  --panel-grad-2: rgba(17, 19, 25, 0.6);
  --track:        rgba(255, 255, 255, 0.06);
  --cal-empty:    rgba(255, 255, 255, 0.012);
  --row-hover:    rgba(200, 169, 106, 0.03);
  --topbar-bg:    rgba(13, 26, 19, 0.74);
  --grain-opacity: 0.035;
  --glow-opacity:  1;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Jost", system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --maxw: 1140px;
  --shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.85);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* atmospheric gold glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(200, 169, 106, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(200, 169, 106, 0.05), transparent 55%);
  z-index: 0;
  opacity: var(--glow-opacity);
}

/* fine grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .topbar, .flashes { position: relative; z-index: 2; }

/* staging / test-environment banner — slim full-width strip (amber warning) */
.env-banner {
  width: 100%;
  position: relative; z-index: 6;
  background: var(--warn); color: #1c1408;
  text-align: center; padding: 5px 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; margin: 0; }

em { font-style: italic; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 40px 28px 80px; }

.muted { color: var(--text-dim); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- eyebrow / typography accents ---------- */
.eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--gold);
  font-weight: 500;
  margin: 0 0 10px;
}
.crumb { color: var(--text-mute); transition: color 0.2s; }
.crumb:hover { color: var(--gold); }

.page-title { font-size: 38px; line-height: 1.05; }
.display { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.02; font-weight: 600; }
.lede { color: var(--text-dim); font-size: 16px; max-width: 44ch; }

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  /* must outrank <main> (z-index: 2, and later in the DOM) — otherwise page
     content scrolls OVER the sticky topbar instead of under it. Stays below
     .flashes (60). */
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  display: block;
  width: 38px; height: 38px;
  object-fit: contain;
}
.brand-mark.lg { width: 60px; height: 60px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.16em; }
.brand-name.xl { font-size: 26px; }
.brand-tag { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-mute); }

.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 0; position: relative; transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--gold); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--gold);
}

.user-box { display: flex; align-items: center; gap: 12px; }
.user-chip {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px;
}
.user-email { font-size: 13px; color: var(--text-dim); }
.logout { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); transition: color 0.2s; }
.logout:hover { color: var(--danger); }

/* ---------- page head ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(165deg, var(--gold-br), var(--gold) 55%, var(--gold-dp));
  color: var(--gold-ink); border-color: var(--gold-dp);
  box-shadow: 0 12px 28px -16px rgba(200, 169, 106, 0.7);
}
.btn-gold:hover { box-shadow: 0 16px 34px -14px rgba(200, 169, 106, 0.85); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(200, 169, 106, 0.06); }
.btn-sm { padding: 9px 15px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.link-gold { color: var(--gold); font-size: 13px; letter-spacing: 0.04em; transition: opacity 0.2s; }
.link-gold:hover { opacity: 0.78; }
.link-danger { color: var(--danger); font-size: 13px; letter-spacing: 0.04em; transition: opacity 0.2s; }
.link-danger:hover { opacity: 0.78; }
.as-button { background: none; border: none; cursor: pointer; font-family: var(--sans); padding: 0; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(224,145,127,0.4); }
.btn-danger:hover { border-color: var(--danger); background: rgba(224,145,127,0.08); }
.row-actions { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }

/* ---------- panels / cards ---------- */
.panel {
  background: linear-gradient(180deg, var(--bg-1), var(--panel-grad-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 26px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.panel-flat {
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 22px;
}
.panel-title { font-size: 21px; margin-bottom: 16px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title-row .panel-title { margin-bottom: 0; }
.mt { margin-top: 18px; }

/* ---------- flashes ---------- */
.flashes {
  position: fixed; top: 18px; right: 18px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 13px 15px; border-radius: 5px; box-shadow: var(--shadow);
  font-size: 14px; animation: slidein 0.35s ease;
}
.flash-success { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--danger); }
.flash-x { background: none; border: none; color: var(--text-mute); cursor: pointer; font-size: 18px; line-height: 1; }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-wide { max-width: 720px; }
.form-row { display: block; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); font-weight: 500;
}
.req { color: var(--gold); font-style: normal; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, .select {
  font-family: var(--sans); font-size: 15px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 11px 13px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--text-mute); }
input:focus, textarea:focus, .select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.16);
}
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.hint { font-size: 12.5px; color: var(--text-mute); }
.info {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--gold); font-size: 9px; font-style: italic; cursor: help;
}
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }

/* ---------- auth ---------- */
body.auth { display: flex; flex-direction: column; }
.auth-wrap { width: 100%; max-width: none; margin: 0; padding: 0; min-height: 100vh; }
.auth-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; }
.auth-aside {
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 420px at 20% 10%, rgba(200, 169, 106, 0.12), transparent 60%),
    linear-gradient(180deg, #0b1710, #0f2017);
}
.auth-logo { width: 100%; max-width: 440px; height: auto; display: block; }
.auth-aside-top { display: flex; align-items: center; gap: 16px; }
.auth-aside-mid { margin: 40px 0; }
.auth-aside-mid .display em { color: var(--gold); }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-size: 14px; }
.auth-points .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(200,169,106,0.7); }

.auth-panel { display: grid; place-items: center; padding: 40px; background: var(--bg); }
.auth-form-card { width: 100%; max-width: 380px; }
.auth-h2 { font-size: 34px; margin: 4px 0 6px; }
.auth-form-card .form { margin-top: 26px; }
.auth-foot { margin-top: 22px; font-size: 13px; }

/* ---------- case cards (client) ---------- */
.card-list { display: flex; flex-direction: column; gap: 14px; }
.case-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 24px; background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--radius); transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.case-card:hover { border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow); }
.case-id { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.case-title { font-size: 22px; }
.case-sub { color: var(--text-dim); font-size: 13.5px; margin: 5px 0 0; }
.case-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; text-align: right; }
.meta-line { font-size: 12.5px; color: var(--text-mute); }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  padding: 5px 11px; border-radius: 999px; border: 1px solid transparent;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.st-new      { color: #cdb988; background: rgba(200,169,106,0.10); border-color: rgba(200,169,106,0.25); }
.st-draft    { color: #9b9890; background: rgba(255,255,255,0.05); border-color: var(--line-2); }
.st-approved { color: #8ab6c9; background: rgba(138,182,201,0.10); border-color: rgba(138,182,201,0.28); }
.st-review   { color: var(--warn); background: rgba(224,184,120,0.10); border-color: rgba(224,184,120,0.25); }
.st-done     { color: var(--ok); background: rgba(151,192,138,0.10); border-color: rgba(151,192,138,0.25); }
.st-closed   { color: #9b9890; background: rgba(255,255,255,0.05); border-color: var(--line-2); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 80px 24px; }
.empty-mark { font-family: var(--serif); font-size: 72px; color: var(--gold); opacity: 0.5; line-height: 1; margin-bottom: 12px; }
.empty h3 { font-size: 26px; margin-bottom: 8px; }
.empty .btn { margin-top: 20px; }

/* ---------- stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px;
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; top: 0; left: 0; width: 36px; height: 2px; background: var(--gold); }
.stat-num { display: block; font-family: var(--serif); font-size: 42px; font-weight: 600; line-height: 1; color: var(--text); }
.stat-lbl { display: block; margin-top: 8px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead th {
  text-align: left; font-family: var(--sans); font-weight: 500; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
  padding: 0 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody td { padding: 15px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tbody tr:hover { background: var(--row-hover); }
.t-title { color: var(--text); font-size: 14.5px; }
.t-sub { color: var(--text-mute); font-size: 12.5px; margin-top: 2px; }
.t-actions { text-align: right; white-space: nowrap; }
.row-off { opacity: 0.5; }

/* ---------- detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.detail-side .panel { margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-mute); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.kv dd { margin: 0; color: var(--text); }
.kv dd.pre { white-space: pre-wrap; }

/* ---------- document list ---------- */
.doc-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; }
.doc-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2);
}
.doc-item:last-child { border-bottom: none; }
.doc-ico {
  flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line-2); border-radius: 5px; font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-dim); background: var(--bg-2);
}
.doc-ico.gold { color: var(--gold); border-color: var(--line); }
.doc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.doc-meta { color: var(--text-mute); font-size: 12.5px; white-space: nowrap; }
.doc-dl { color: var(--gold); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.doc-dl:hover { text-decoration: underline; }
.doc-kind-tag {
  flex-shrink: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap;
}
.doc-kind-select { flex-shrink: 0; margin: 0; }
.doc-kind-select select {
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 5px 26px 5px 9px; font-family: var(--sans); font-size: 12.5px; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c8a96a' stroke-width='1.4' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.doc-kind-select select:hover { border-color: var(--gold); color: var(--text); }

/* Category lists: one grid for the whole <ul> so the kind column lines up
   exactly across rows. Each row is a `subgrid` — NOT `display: contents` —
   so the padding + separator sit on the <li> itself and every cell is
   vertically centred against the row. The column count must match the number
   of cells a row renders: add `with-komplet` for the admin list, which has the
   extra „w komplecie" checkbox. Too few columns and rows wrap into each other. */
.doc-list.cats {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) max-content max-content;
  column-gap: 14px;
}
.doc-list.cats.with-komplet {
  grid-template-columns: 38px minmax(0, 1fr) max-content max-content max-content;
}
.doc-list.cats .doc-item {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.doc-list.cats .doc-item:last-child { border-bottom: none; }
.doc-list.cats .doc-item > * { min-width: 0; }
/* filename + size/date stacked in ONE cell: the panel is only ~670px wide, so a
   separate meta column starved the name down to ~37px (0px at 1100px viewport). */
.doc-list.cats .doc-file { display: block; min-width: 0; }
.doc-list.cats .doc-name,
.doc-list.cats .doc-file .doc-meta {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-list.cats .doc-file .doc-meta { margin-top: 1px; }
.doc-list.cats .doc-kind-select,
.doc-list.cats .doc-kind-select select,
.doc-list.cats .doc-kind-tag { width: 100%; }
.doc-list.cats .doc-dl { white-space: nowrap; }

/* „w komplecie" toggle — keep the label on one line next to its checkbox */
.doc-komplet { margin: 0; }
.doc-komplet label {
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; cursor: pointer;
  font-size: 12.5px; color: var(--text-dim);
}
.doc-komplet input[type="checkbox"] { flex-shrink: 0; margin: 0; accent-color: var(--gold); cursor: pointer; }
.doc-komplet label:hover { color: var(--text); }

/* ---------- dropzone ---------- */
.dropzone {
  display: block; border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: rgba(200, 169, 106, 0.025); padding: 34px 24px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s; text-align: center;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(200, 169, 106, 0.07); }
.dropzone.compact { padding: 22px; margin-top: 18px; }
.dz-icon { font-size: 26px; color: var(--gold); margin-bottom: 8px; }
.dropzone-inner p { margin: 4px 0; }
.dz-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dz-list li { font-size: 13px; color: var(--text-dim); display: flex; gap: 8px; align-items: center; justify-content: center; }
.dz-list li::before { content: "•"; color: var(--gold); }
.inline-upload { margin-top: 8px; }
.inline-upload .btn { margin-top: 14px; }

/* ---------- notices ---------- */
.notice {
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; font-size: 14px;
  border: 1px solid var(--line-2); border-left: 3px solid var(--gold); background: var(--bg-1);
}
.notice-error { border-left-color: var(--danger); color: var(--danger-ink); }
.notice-info { border-left-color: var(--gold); color: var(--text-dim); }
.notice-warn { border-left-color: var(--warn); color: var(--warn-ink); }

/* faktura-korygująca / verification alerts on the admin case view */
.panel-warn { border-left: 3px solid var(--warn); }
.panel-warn .panel-title { color: var(--warn-ink); }
.warn-list li::before { color: var(--warn); }

/* ---------- szablon generator ---------- */
.szablon-form { display: block; }
.szablon-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.faktura-row { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; background: var(--bg-2); }
.faktura-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.faktura-no { font-family: var(--serif); font-size: 17px; color: var(--gold); }
.faktura-del { background: none; border: none; color: var(--text-mute); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: color 0.2s; }
.faktura-del:hover { color: var(--danger); }
.faktura-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sticky-actions {
  position: sticky; bottom: 0; margin-top: 22px; padding: 16px 0;
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
}

/* ---------- processing / progress ---------- */
.proc-panel { border-left: 3px solid var(--gold); }
.progress {
  margin-top: 18px; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--track); position: relative;
}
.progress-bar {
  position: absolute; top: 0; left: 0; height: 100%; width: 38%; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-br), var(--gold), transparent);
  animation: indeterminate 1.4s ease-in-out infinite;
}
@keyframes indeterminate {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ---------- summary totals ---------- */
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sum-item {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.sum-item::after { content: ""; position: absolute; top: 0; left: 0; width: 28px; height: 2px; background: var(--gold); }
.sum-lbl { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.sum-val { display: block; margin-top: 8px; font-family: var(--serif); font-size: 25px; font-weight: 600; color: var(--text); line-height: 1.1; }
.sum-words { margin-top: 16px; font-size: 14px; }
.count-pill {
  font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--gold);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; margin-left: 8px; vertical-align: middle;
}
.recompute-form { margin-top: 14px; }

/* ---------- approve + danger zone ---------- */
.approve-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-left: 3px solid var(--gold);
}
.approve-panel .btn { font-size: 14px; padding: 14px 30px; letter-spacing: 0.12em; }
.danger-zone { border: 1px solid rgba(224,145,127,0.25); }
.danger-zone .panel-title { color: var(--danger); }

/* ---------- pozew download row (admin) ---------- */
.pozew-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pozew-meta { display: flex; align-items: center; gap: 14px; }
.notes-list {
  margin: 14px 0 0; padding: 12px 14px; list-style: none;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2);
  font-size: 12.5px; color: var(--text-dim); display: flex; flex-direction: column; gap: 6px;
}
.notes-list li { padding-left: 14px; position: relative; }
.notes-list li::before { content: "·"; position: absolute; left: 4px; color: var(--gold); }

/* ===========================================================================
   CRM modules added later: tasks, calendar, messenger, repository, analytics.
   Everything below is NEW markup only — no rule above this line was changed,
   so existing pages render exactly as before.
   =========================================================================== */

/* ---------- topbar: unread badge + „Więcej” dropdown ---------- */
.nav-dot {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px;
  margin-left: 6px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink);
  font-size: 10px; font-weight: 600; letter-spacing: 0; line-height: 1;
  vertical-align: middle;
}
.nav-more { position: relative; }
.nav-more > summary {
  list-style: none; cursor: pointer;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 0; transition: color 0.2s;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: " ▾"; }
.nav-more > summary:hover { color: var(--text); }
.nav-more[open] > summary { color: var(--gold); }
.nav-more-menu {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 200px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px;
  box-shadow: var(--shadow); padding: 6px 0; z-index: 40;
  display: flex; flex-direction: column;
}
.nav-more-menu a {
  padding: 9px 16px; font-size: 13px; letter-spacing: 0.04em;
  text-transform: none; color: var(--text-dim); transition: background 0.15s, color 0.15s;
}
.nav-more-menu a:hover { background: rgba(200, 169, 106, 0.08); color: var(--gold); }

/* ---------- tabs (task views) ---------- */
.tabs {
  display: flex; gap: 22px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line-2); padding-bottom: 12px; flex-wrap: wrap;
}
.tabs a {
  font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); position: relative; padding-bottom: 12px; transition: color 0.2s;
}
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--gold); }
.tabs a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 1px; background: var(--gold);
}
.tab-count {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 10.5px; color: var(--gold);
}

/* ---------- form helpers used by the new panels ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
input[type="date"], input[type="time"] {
  font-family: var(--sans); font-size: 15px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 10px 13px; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="date"]:focus, input[type="time"]:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.16);
}
.check-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-dim); cursor: pointer;
}
.check-line input[type="checkbox"] { accent-color: var(--gold); cursor: pointer; margin: 0; }
.check-line:hover { color: var(--text); }

/* ---------- compact lists embedded in existing panels ---------- */
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.mini-row:last-child { border-bottom: none; }
.mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-size: 14.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { font-size: 12.5px; color: var(--text-mute); }
.mini-when { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }

/* ---------- tasks ---------- */
.task-list { display: flex; flex-direction: column; }
.task-card { border-left: 3px solid var(--line); }
.task-card.is-overdue { border-left-color: var(--danger); }
.task-title { font-size: 20px; margin-bottom: 8px; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 12.5px; color: var(--text-mute); }
.task-who { color: var(--text-dim); }
.task-case { color: var(--gold); }
.task-case:hover { text-decoration: underline; }
.task-due.is-overdue { color: var(--danger); }
.task-prio { color: var(--text-dim); }
.task-prio.prio-wysoki { color: var(--warn-ink); }
.task-desc { margin: 14px 0 0; color: var(--text-dim); font-size: 14px; white-space: pre-wrap; }
.task-note {
  margin: 12px 0 0; padding: 10px 14px; font-size: 13.5px;
  border: 1px solid var(--line-2); border-left: 3px solid var(--warn);
  border-radius: var(--radius); background: var(--bg-2);
}
.task-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2);
}
.task-review { display: flex; align-items: center; gap: 8px; }
.task-note-input { width: 200px; padding: 8px 11px !important; font-size: 13px !important; }
.task-edit { width: 100%; }
.task-edit > summary { list-style: none; cursor: pointer; }
.task-edit > summary::-webkit-details-marker { display: none; }
.task-edit > summary::after { content: " ▾"; }

/* ---------- calendar ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.cal-wd {
  background: var(--bg-2); padding: 9px 8px; text-align: center;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
}
.cal-day { background: var(--bg-1); min-height: 96px; padding: 7px 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-day.is-empty { background: var(--cal-empty); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--gold); }
.cal-num { font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.cal-day.is-today .cal-num { color: var(--gold); font-weight: 500; }
.cal-ev {
  display: block; font-size: 11.5px; line-height: 1.35; color: var(--text-dim);
  background: var(--bg-3); border-left: 2px solid var(--gold);
  border-radius: 3px; padding: 3px 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-ev b { color: var(--gold); font-weight: 500; }
.cal-ev.is-task { border-left-color: var(--warn); }
.cal-ev.is-task:hover { color: var(--text); }
.feed-url {
  width: 100%; margin-top: 12px; font-family: var(--sans); font-size: 12px; color: var(--gold);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px;
}

/* ---------- messenger ---------- */
.thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.thread-row { border-bottom: 1px solid var(--line-2); }
.thread-row:last-child { border-bottom: none; }
.thread-link { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 15px 4px; transition: background 0.15s; }
.thread-link:hover { background: rgba(200, 169, 106, 0.03); }
.thread-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.thread-subject { font-size: 15.5px; color: var(--text); }
.thread-row.is-unread .thread-subject { color: var(--gold); font-weight: 500; }
.thread-sub { font-size: 12.5px; color: var(--text-mute); }
.thread-preview { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch; }
.thread-when { font-size: 12.5px; color: var(--text-mute); white-space: nowrap; }

.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.is-mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 74%; background: var(--bg-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--line); border-radius: var(--radius); padding: 12px 15px;
}
.msg.is-mine .msg-bubble { border-left-color: var(--gold); background: var(--bg-3); }
.msg-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 5px; }
.msg-who { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.msg-when { font-size: 11.5px; color: var(--text-mute); }
.msg-body { margin: 0; font-size: 14.5px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.msg-form { border-top: 1px solid var(--line-2); padding-top: 18px; }

/* ---------- repository ---------- */
.repo-search { display: flex; gap: 8px; align-items: center; }
.repo-search input[type="text"] { width: 220px; padding: 8px 12px; font-size: 13.5px; }

/* ---------- analytics ---------- */
.dash-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar-val { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; min-height: 16px; }
.bar {
  width: 100%; min-height: 2px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--gold-br), var(--gold-dp));
}
.bar-lbl { font-size: 10.5px; color: var(--text-mute); white-space: nowrap; }

/* ---------- calendar sync help (collapsible how-to under the feed URL) ---------- */
.sync-help { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.sync-help > summary {
  list-style: none; cursor: pointer;
  font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); transition: opacity 0.2s;
}
.sync-help > summary::-webkit-details-marker { display: none; }
.sync-help > summary::after { content: " ▾"; }
.sync-help[open] > summary::after { content: " ▴"; }
.sync-help > summary:hover { opacity: 0.78; }
.sync-steps {
  margin: 12px 0 8px; padding-left: 20px;
  font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 7px;
}
.sync-steps strong { color: var(--text); font-weight: 500; }

@media (max-width: 1080px) {
  /* Keep the wider staff nav on one line before the 640px stacking kicks in. */
  .nav { gap: 16px; }
  .user-email { display: none; }
}
@media (max-width: 900px) {
  .dash-cols { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .thread-preview { max-width: 40ch; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cal-day { min-height: 68px; padding: 5px 4px; }
  .cal-ev { font-size: 10px; padding: 2px 4px; }
  .msg-bubble { max-width: 90%; }
  .task-note-input { width: 100%; }
  .repo-search { width: 100%; }
  .repo-search input[type="text"] { width: 100%; }
  .bars { height: 150px; gap: 5px; }
  .bar-lbl { font-size: 9px; transform: rotate(-60deg); transform-origin: center; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .sum-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-aside { border-right: none; border-bottom: 1px solid var(--line); padding: 40px 32px; }
  .faktura-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 14px; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .user-box { margin-left: auto; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 30px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .sum-grid { grid-template-columns: 1fr; }
  .faktura-grid { grid-template-columns: 1fr; }
  .container { padding: 28px 18px 60px; }
  /* document rows: too many columns for a phone — stack the controls under the
     filename instead of squeezing every column onto one line. */
  .doc-list.cats,
  .doc-list.cats.with-komplet { display: block; }
  .doc-list.cats .doc-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px 14px;
  }
  .doc-list.cats .doc-kind-select,
  .doc-list.cats .doc-kind-tag,
  .doc-list.cats .doc-komplet,
  .doc-list.cats .doc-dl { grid-column: 2; }
}

/* ===========================================================================
   MOTYW JASNY (2026-08, prośba kancelarii: „poniżej górnej stopki lepiej biel")
   ---------------------------------------------------------------------------
   Cały arkusz powyżej jest oparty na tokenach, więc jasny motyw to przede
   wszystkim inny zestaw wartości — nie druga wersja komponentów. Zasady:

   1. `data-theme` siedzi na <html>, ustawiany serwerowo z ciasteczka (bez
      mignięcia ciemnym tłem przy wczytaniu) i przełączany w topbarze.
   2. Topbar i ekran logowania ZOSTAJĄ ciemne — to nośnik marki, a kancelaria
      prosiła o rozjaśnienie obszaru pracy, nie identyfikacji. Realizuje to
      przedeklarowanie tokenów na `.topbar` / `body.auth`: własności
      niestandardowe są dziedziczone, więc cała zawartość tych wysp dostaje
      ciemną paletę bez ruszania pojedynczych reguł.
   3. Złoto #c8a96a na bieli ma kontrast ~1.9:1 (nieczytelne). W jasnym motywie
      `--gold` schodzi do brązu #8a6a2f — na ciemnym topbarze pozostaje złotem,
      bo tam obowiązuje wyspa z punktu 2.
   =========================================================================== */
:root[data-theme="light"] {
  --bg:        #f4f2ec;
  --bg-1:      #ffffff;
  --bg-2:      #f7f5f0;
  --bg-3:      #f2eee6;
  --line:      rgba(138, 106, 47, 0.30);
  --line-2:    rgba(13, 26, 19, 0.11);
  /* Wartości dobrane pod kontrast WCAG AA (4.5:1) na bieli, tle strony i
     wypełnieniu --bg-3; jaśniejszy brąz nie przechodził. */
  --gold:      #7d5f28;
  --gold-br:   #8f6d2f;
  --gold-dp:   #6b5122;
  --gold-ink:  #fffdf6;
  --text:      #17251c;
  --text-dim:  #4d5a50;
  --text-mute: #646f61;
  --ok:        #3f7a33;
  --warn:      #9a6b12;
  --danger:    #a83c28;
  --warn-ink:   #7d5709;
  --danger-ink: #8f3220;

  --panel-grad-2: #ffffff;
  --track:        rgba(13, 26, 19, 0.08);
  --cal-empty:    rgba(13, 26, 19, 0.025);
  --row-hover:    rgba(138, 106, 47, 0.055);
  /* topbar stays dark — see note 2 */
  --topbar-bg:    rgba(13, 26, 19, 0.96);
  --grain-opacity: 0.014;
  --glow-opacity:  0.30;
  --shadow: 0 12px 32px -24px rgba(13, 26, 19, 0.45);

  color-scheme: light;
}

/* --- ciemne wyspy: topbar + logowanie ------------------------------------ */
:root[data-theme="light"] .topbar,
:root[data-theme="light"] body.auth {
  --bg:        #0d1a13;
  --bg-1:      #112016;
  --bg-2:      #15271c;
  --bg-3:      #1c3324;
  --line:      rgba(200, 169, 106, 0.18);
  --line-2:    rgba(255, 255, 255, 0.06);
  --gold:      #c8a96a;
  --gold-br:   #e6cd92;
  --gold-dp:   #9c7d44;
  --gold-ink:  #181307;
  --text:      #f4f1ea;
  --text-dim:  #b3bcae;
  --text-mute: #7d877a;
  --ok:        #97c08a;
  --warn:      #e0b878;
  --danger:    #e0917f;
  --warn-ink:   #e0b878;
  --danger-ink: #f0c4ba;
  --shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.85);
  color: var(--text);
  color-scheme: dark;
}

/* --- poprawki komponentów, których nie da się załatwić samym tokenem -----
   Selektory rozpisane płasko, bez zagnieżdżania CSS — kancelaria pracuje na
   Macu i iPhonie, a zagnieżdżanie działa dopiero od Safari 16.5. */

/* Pasek środowiska testowego ma zostać krzykliwie bursztynowy w obu motywach —
   w jasnym `--warn` jest ciemny, więc kolory podane wprost. */
:root[data-theme="light"] .env-banner { background: #e0b878; color: #1c1408; }

/* Odznaki statusów: w ciemnym motywie miały wpisane na sztywno jasne hexy. */
:root[data-theme="light"] .st-new      { color: #7a5c1f;          background: rgba(138,106,47,0.10); border-color: rgba(138,106,47,0.30); }
:root[data-theme="light"] .st-draft    { color: #6b7268;          background: rgba(13,26,19,0.05);   border-color: var(--line-2); }
:root[data-theme="light"] .st-approved { color: #2c5f75;          background: rgba(44,95,117,0.10);  border-color: rgba(44,95,117,0.28); }
:root[data-theme="light"] .st-review   { color: var(--warn-ink);  background: rgba(154,107,18,0.10); border-color: rgba(154,107,18,0.28); }
:root[data-theme="light"] .st-done     { color: var(--ok);        background: rgba(63,122,51,0.10);  border-color: rgba(63,122,51,0.28); }
:root[data-theme="light"] .st-closed   { color: #6b7268;          background: rgba(13,26,19,0.05);   border-color: var(--line-2); }

/* Elementy z zaszytą przezroczystą bielą / jasnym złotem. */
:root[data-theme="light"] .btn-danger        { border-color: rgba(168,60,40,0.40); }
:root[data-theme="light"] .danger-zone       { border-color: rgba(168,60,40,0.28); }
:root[data-theme="light"] .thread-link:hover { background: var(--row-hover); }
:root[data-theme="light"] .dropzone          { background: rgba(138,106,47,0.05); }
:root[data-theme="light"] .dropzone:hover,
:root[data-theme="light"] .dropzone.drag     { background: rgba(138,106,47,0.11); }
:root[data-theme="light"] .empty-mark        { opacity: 0.7; }
/* strzałka w selektorze kategorii dokumentu (kolor zapisany w URL-u SVG) */
:root[data-theme="light"] .doc-kind-select select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d5f28' stroke-width='1.4' fill='none'/%3E%3C/svg%3E");
}

/* --- przełącznik motywu w topbarze ---------------------------------------- */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--gold); font-size: 13px; line-height: 1; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold-br); }
.theme-toggle .ico-dark { display: none; }
:root[data-theme="light"] .theme-toggle .ico-light { display: none; }
:root[data-theme="light"] .theme-toggle .ico-dark  { display: inline; }

/* ---------- stoper czasu pracy (pasek w topbarze + panel na sprawie) ---------- */
.timer-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 6px 4px 11px; border-radius: 999px;
  border: 1px solid var(--gold); background: rgba(200, 169, 106, 0.10);
  max-width: 260px;
}
.timer-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  flex-shrink: 0; animation: timer-pulse 2s ease-in-out infinite;
}
@keyframes timer-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.timer-label {
  font-size: 12px; color: var(--text-dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
.timer-clock { font-size: 12.5px; color: var(--gold); font-weight: 500; }
.timer-stop {
  background: var(--gold); color: var(--gold-ink); border: none; cursor: pointer;
  font-family: var(--sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.timer-stop:hover { background: var(--gold-br); }

.time-edit > summary { list-style: none; cursor: pointer; font-size: 12.5px; }
.time-edit > summary::-webkit-details-marker { display: none; }
.time-edit-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px;
}

@media (max-width: 1080px) {
  /* w topbarze robi się ciasno — zostaje sam licznik i Stop */
  .timer-label { display: none; }
}

/* Demo: login hint box + reset page */
.demo-creds { margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--gold, #c8a96a); border-radius: 8px; font-size: 14px; }
.demo-creds p { margin: 4px 0; }
.demo-creds code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; padding: 1px 6px; border-radius: 4px; background: rgba(200,169,106,0.12); }
