/* Work Log - vlastni CSS bez frameworku. Mobil prvni (375 px), systemove pismo, svetly i tmavy motiv.
   Pravidla R7: pevne vysky, tabular-nums, scrollbar-gutter, hlasky jako prekryv. */

:root {
  --orange: #ff851b;
  --orange-strong: #e06a00;
  --on-orange: #1e1e1e;
  --bg: #f4f2ef;
  --surface: #ffffff;
  --surface-2: #f0ede9;
  --text: #1e1f22;
  --muted: #62656b;
  --line: #e2ded8;
  --accent-text: #b34f00;
  --ok: #1f8a4c;
  --err: #c62828;
  --err-bg: #fdecea;
  --warn-bg: #fff4e5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
  --radius: 14px;
  --top-h: 52px;
  --tab-h: 60px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --kb: 0px;
  --vvh: 100dvh;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #17181a;
  --surface: #222326;
  --surface-2: #2b2d31;
  --text: #ececec;
  --muted: #a3a6ad;
  --line: #36383d;
  --accent-text: #ffa04d;
  --ok: #4cc27f;
  --err: #ff6b6b;
  --err-bg: #3a2222;
  --warn-bg: #3a2e1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
#app { height: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 17px; }
h3 { font-size: 15px; margin-top: 16px; }
p { margin: 0 0 8px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.err-text { color: var(--err); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Logo podle motivu */
.logo-d { display: none; }
[data-theme="dark"] .logo-l { display: none; }
[data-theme="dark"] .logo-d { display: inline-block; }

.splash { height: 100%; display: grid; place-items: center; }

/* --- Shell ---------------------------------------------------------------- */
.shell {
  height: 100%;
  display: grid;
  grid-template-rows: calc(var(--top-h) + var(--safe-t)) 1fr calc(var(--tab-h) + var(--safe-b));
}
.top {
  padding-top: var(--safe-t);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-in, .screen-in, .tabbar-in {
  max-width: 720px;
  margin: 0 auto;
}
.top-in {
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
}
.top-title { font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.pill-ico { display: inline-flex; width: 18px; height: 18px; }
.pill[data-state="ok"] .pill-ico { color: var(--ok); }
.pill[data-state="pend"] { color: var(--accent-text); border-color: var(--orange); }
.pill[data-state="err"] { color: var(--err); border-color: var(--err); }
.pill.is-syncing .pill-ico { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.screens { position: relative; overflow: hidden; }
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.screen-in { padding: 12px 12px 24px; display: flex; flex-direction: column; gap: 12px; }
.screen-list.selecting { padding-bottom: 130px; }

.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  max-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tab-h);
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  border: 0;
  background: none;
  cursor: pointer;
}
.tab.on { color: var(--accent-text); font-weight: 600; }
.tab-add { color: var(--on-orange); }
.add-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.tab-add:active .add-circle { transform: scale(.95); }

/* --- Karty a radky ------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-accent { border-left: 4px solid var(--orange); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.big { font-size: 30px; font-weight: 700; line-height: 1.15; height: 36px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { display: flex; flex-direction: column; min-height: 44px; }
.stat-l { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 17px; font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--orange); border-radius: 4px; transition: width .3s; }
.is-done .bar-fill { background: var(--ok); }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.rows > .row:first-child { border-top: 0; }
.row-btn {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.card > .row-btn:first-of-type { border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-s { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-a { font-weight: 600; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.row-acts { display: flex; gap: 6px; }
.row-unres { align-items: flex-start; }
.row-unres .row-s { white-space: normal; }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--orange); color: var(--on-orange); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center;
}
.goal { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rows > .goal:first-child { border-top: 0; }
.goal-head, .goal-foot { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
/* Zalohy (PLAN R9) */
.adv { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rows > .adv:first-child { border-top: 0; }
.adv-head { display: flex; align-items: center; gap: 8px; }
.adv-open {
  flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center;
  background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.adv-open .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-rest { font-weight: 600; color: var(--accent-text); }
.is-over .bar-fill { background: var(--err); }
.is-over .adv-rest { color: var(--err); }
.adv-detail { display: flex; flex-direction: column; gap: 8px; }
.adv-detail h3 { margin: 8px 0 0; font-size: 15px; }
.unpaid-adv { margin: 0; }
.adv-more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.chart { display: block; height: 160px; }
.chart-b { fill: var(--line); }
.chart-b.cur { fill: var(--orange); }
.chart-l { fill: var(--muted); font-size: 11px; }
.empty { text-align: center; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
details.arch summary { min-height: 44px; display: flex; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); }

/* --- Tlacitka a vstupy ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn-primary { background: var(--orange); border-color: var(--orange-strong); color: var(--on-orange); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger-text { color: var(--err); }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.on { border-color: var(--orange); color: var(--accent-text); }
.btn.is-busy { color: transparent !important; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--muted);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon, .btn-step {
  width: 44px; height: 44px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer;
}
.btn-step { background: var(--surface-2); }
.btn-icon.on { color: var(--accent-text); background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; }

.inp {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* iOS jinak priblizuje */
  font-variant-numeric: tabular-nums;
}
textarea.inp { resize: vertical; min-height: 64px; }
select.inp { appearance: auto; }
.inp:disabled { opacity: .5; }
.inp:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(255, 133, 27, .25); }
.has-err .inp { border-color: var(--err); }

.form { display: flex; flex-direction: column; gap: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.field-row { display: flex; align-items: center; gap: 6px; }
.field-err { min-height: 18px; font-size: 13px; color: var(--err); line-height: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline-form { display: flex; gap: 8px; align-items: flex-start; }
.inline-form .field { flex: 1; }
.inline-form .btn { margin-top: 22px; }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 12px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.chip.on { border-color: var(--orange); background: var(--warn-bg); color: var(--accent-text); font-weight: 600; }

.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.chk { width: 22px; height: 22px; accent-color: var(--orange); margin: 0; flex-shrink: 0; }
.switch {
  appearance: none; width: 48px; height: 28px; border-radius: 14px; margin: 0;
  background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.switch:checked { background: var(--orange); }
.switch:checked::after { transform: translateX(20px); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1; min-height: 44px; display: grid; place-items: center; cursor: pointer;
  font-size: 14px; border-left: 1px solid var(--line); color: var(--text); font-weight: 400;
}
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label { background: var(--orange); color: var(--on-orange); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--orange); outline-offset: -2px; }

.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.days .chip { min-width: 44px; padding: 0 8px; }
.days input:checked + .chip { border-color: var(--orange); background: var(--warn-bg); color: var(--accent-text); font-weight: 600; }
.days input:disabled + .chip { opacity: .5; }
.days input:focus-visible + .chip { outline: 2px solid var(--orange); }

/* --- Spodni panel (dialog) ------------------------------------------------ */
.sheet {
  position: fixed;
  inset: auto 0 var(--kb) 0;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  max-height: calc(var(--vvh) - var(--safe-t) - 12px);
  padding: 0;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, .25);
  animation: sheet-in .2s ease-out;
  overflow: hidden;
}
.sheet::backdrop { background: rgba(0, 0, 0, .45); animation: fade-in .2s; }
.sheet.closing { animation: sheet-out .18s ease-in forwards; }
.sheet.closing::backdrop { opacity: 0; transition: opacity .18s; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-in {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 56px; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.sheet-title { font-size: 18px; }
.sheet-body { padding: 12px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet-foot {
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
  padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface);
}
.sheet-foot .btn-primary { flex: 1; max-width: 260px; }
.sheet-foot .btn-wide { max-width: none; }
.menu { display: flex; flex-direction: column; }
.menu .row { gap: 12px; }
.report { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

@media (min-width: 700px) {
  .sheet { inset: 0; margin: auto; border-radius: 18px; max-height: min(86vh, 760px); height: fit-content; }
  .sheet-small { max-width: 440px; }
  @keyframes sheet-in { from { transform: translateY(16px); opacity: 0; } }
  @keyframes sheet-out { to { transform: translateY(16px); opacity: 0; } }
  .sheet-foot { padding-bottom: 10px; }
}

/* --- Zapis smeny ---------------------------------------------------------- */
.entry { display: flex; flex-direction: column; gap: 2px; }
.entry-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-bottom: 4px; }
.entry .field-row .inp[type="date"] { flex: 1; min-width: 0; }
.times { display: grid; grid-template-columns: 1fr; gap: 0; }
.field-time .inp-time { flex: 1; text-align: center; min-width: 0; }
.next-day { width: 52px; font-size: 12px; color: var(--accent-text); font-weight: 600; flex-shrink: 0; }
.field-time:first-child .field-row::after { content: ""; width: 52px; flex-shrink: 0; }
.live {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  height: 52px; padding: 0 14px; margin: 2px 0 14px;
  border-radius: 12px; background: var(--warn-bg);
}
.live-h { color: var(--muted); font-size: 15px; }
.live-a { font-size: 22px; color: var(--accent-text); }
.addons { display: flex; flex-direction: column; gap: 6px; }
.addon-row { display: flex; gap: 6px; align-items: center; }
.addon-row select { flex: 1; min-width: 0; }
.inp-qty { width: 72px; flex-shrink: 0; text-align: center; }
.warn-box { min-height: 44px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.warn-box p, p.warn-box {
  display: flex; gap: 8px; align-items: flex-start; margin: 0;
  padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--accent-text); font-size: 14px;
}
.warn-box p .ico { flex-shrink: 0; margin-top: 2px; }

@media (min-width: 420px) {
  .times { grid-template-columns: 1fr 1fr; gap: 12px; }
  .field-time:first-child .field-row::after { display: none; }
  .next-day { width: auto; }
}

/* --- Seznam smen ------------------------------------------------------------ */
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter-row { display: flex; gap: 6px; align-items: center; }
.filter-row select { flex: 1; min-width: 0; }
.filter-row .inp[type="date"] { flex: 1; min-width: 0; padding: 8px 6px; }
.list-sum { height: 20px; font-size: 13px; padding: 0 4px; }
.shift-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shift-list:empty { display: none; }
.month-h {
  height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--muted);
}
.month-h > span:first-child { text-transform: capitalize; }
.shift { height: 64px; display: flex; align-items: stretch; border-top: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 64px; }
.month-h + .shift { border-top: 0; }
.shift-main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 8px;
  padding: 0 4px 0 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; position: relative;
}
.shift-c1, .shift-c2, .shift-c3 { display: flex; flex-direction: column; min-width: 0; }
.shift-c3 { align-items: flex-end; }
.shift-d { font-weight: 600; font-size: 14px; white-space: nowrap; }
.shift-tm, .shift-h { font-size: 13px; color: var(--muted); }
.shift-p { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-n { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 18px; }
.shift-a { font-weight: 700; font-size: 15px; }
.pend-dot { position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--orange); opacity: 0; }
.is-pending .pend-dot { opacity: 1; }
.paid-btn {
  width: 52px; flex-shrink: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--line);
}
.paid-btn .ico { width: 30px; height: 30px; padding: 4px; border-radius: 50%; border: 2px solid currentColor; }
.is-paid .paid-btn { color: var(--ok); }
.is-paid .shift-a { color: var(--ok); }
.selecting .paid-btn { color: var(--muted); }
.selecting .paid-btn .ico { border-radius: 6px; stroke: transparent; }
.selecting .is-sel .paid-btn { color: var(--orange); }
.selecting .is-sel .paid-btn .ico { background: var(--orange); stroke: var(--on-orange); }
.selecting .is-sel { background: var(--warn-bg); }

.bulk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: var(--surface); border-top: 2px solid var(--orange); box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);
  display: flex; flex-direction: column; gap: 6px;
}
.bulk-head, .bulk-acts { display: flex; gap: 6px; align-items: center; max-width: 720px; width: 100%; margin: 0 auto; }
.bulk-head > span { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; line-height: 1.25; }
.bulk-head .btn { padding: 0 8px; flex: none; }
.bulk-acts { display: grid; grid-template-columns: repeat(4, 1fr); }
.bulk-acts .btn { padding: 0 4px; font-size: 13px; }

/* --- Hlasky ------------------------------------------------------------------ */
.toast-host {
  position: fixed; left: 0; right: 0; z-index: 1000; pointer-events: none;
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  display: flex; justify-content: center; padding: 0 12px;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  max-width: 520px; width: 100%; min-height: 48px; padding: 6px 6px 6px 16px;
  border-radius: 12px; background: #2b2d31; color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s;
}
[data-theme="dark"] .toast { background: #3a3c42; }
.toast.show { opacity: 1; transform: none; }
.toast-err { background: var(--err) !important; }
.toast-msg { flex: 1; font-size: 15px; }
.toast-act { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--orange); font: inherit; font-weight: 700; cursor: pointer; }
.toast-err .toast-act { color: #fff; }

.update-banner {
  position: fixed; z-index: 900; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-t) + 6px); display: flex; align-items: center; gap: 12px;
  padding: 4px 4px 4px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid var(--orange); font-size: 14px; white-space: nowrap;
}

.sync-head { font-weight: 600; font-size: 17px; }

/* --- Prihlaseni ------------------------------------------------------------- */
.auth { height: 100%; overflow-y: auto; scrollbar-gutter: stable; position: relative; background: var(--bg); }
.auth-in {
  max-width: 420px; margin: 0 auto;
  padding: calc(var(--safe-t) + 40px) 16px calc(var(--safe-b) + 24px);
  display: flex; flex-direction: column; gap: 24px;
}
.logo { text-align: center; height: 80px; }
.logo img { max-width: 100%; height: 80px; width: auto; }
.auth-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; }
.auth-card h1 { font-size: 20px; margin-bottom: 12px; }
.auth-card .check-row { margin-bottom: 8px; }
.auth-msg { min-height: 40px; margin-top: 8px; font-size: 14px; display: flex; align-items: center; }
.auth-msg[data-kind="err"] { color: var(--err); }
.auth-msg[data-kind="ok"] { color: var(--ok); }
.auth-msg[data-kind="info"] { color: var(--accent-text); }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.auth-lang { display: flex; justify-content: center; gap: 8px; }
.theme-btn { position: absolute; top: calc(var(--safe-t) + 8px); right: 8px; }
.pw-eye { margin-left: -4px; }
.auth-overlay { position: fixed; inset: 0; z-index: 800; background: var(--bg); }
.overlay-x { position: absolute; z-index: 1; top: calc(var(--safe-t) + 8px); left: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
