/* Einsatzbuch: Liquid-Glass-Oberfläche, Hell und Dunkel */

:root {
  color-scheme: light;
  --bg: #e9edf3;
  --text: #0f1420;
  --muted: #5b6474;
  --faint: #8a92a2;
  --line: rgba(15, 20, 32, 0.08);
  --fill: rgba(15, 20, 32, 0.05);
  --fill-strong: rgba(15, 20, 32, 0.09);

  --accent: #c8352a;          /* Feuerrot */
  --accent-ink: #ffffff;
  --accent-soft: rgba(200, 53, 42, 0.12);
  --blue: #2f6bff;            /* Blaulicht */
  --amber: #d98208;           /* offen */
  --amber-soft: rgba(232, 147, 12, 0.16);
  --ok: #1f8a4c;

  --cat-brand: #d6402f;
  --cat-th: #2f6bff;
  --cat-bma: #d98208;
  --cat-abc: #13a07a;
  --cat-sonstige: #9a62d8;

  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-bar: rgba(250, 251, 253, 0.74);
  --sheet-bg: rgba(244, 246, 250, 0.96);
  --glass-rim-1: rgba(255, 255, 255, 0.95);
  --glass-rim-2: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 10px 30px rgba(28, 38, 66, 0.10), 0 1px 2px rgba(28, 38, 66, 0.06);
  --glow-red: rgba(232, 76, 58, 0.30);
  --glow-blue: rgba(47, 107, 255, 0.22);

  --radius-xl: 28px;
  --radius-l: 22px;
  --radius-m: 16px;
  --radius-s: 12px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b16;
  --text: #eef1f7;
  --muted: #96a0b3;
  --faint: #6b7487;
  --line: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.06);
  --fill-strong: rgba(255, 255, 255, 0.11);

  --accent: #ff5a4e;
  --accent-ink: #1a0503;
  --accent-soft: rgba(255, 90, 78, 0.16);
  --blue: #6d97ff;
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, 0.15);
  --ok: #4cc27e;

  --cat-brand: #e0533f;
  --cat-th: #4f7ff0;
  --cat-bma: #bb7f18;
  --cat-abc: #22a37c;
  --cat-sonstige: #9468dc;

  --glass: rgba(30, 37, 56, 0.48);
  --glass-strong: rgba(34, 41, 62, 0.78);
  --glass-bar: rgba(22, 28, 44, 0.72);
  --sheet-bg: rgba(16, 21, 35, 0.97);
  --glass-rim-1: rgba(255, 255, 255, 0.26);
  --glass-rim-2: rgba(255, 255, 255, 0.04);
  --glass-shadow: 0 12px 34px rgba(0, 0, 0, 0.40), 0 1px 2px rgba(0, 0, 0, 0.30);
  --glow-red: rgba(255, 74, 58, 0.22);
  --glow-blue: rgba(60, 110, 255, 0.24);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 17px/1.4 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ---------- Hintergrund: Blaulicht und Feuerrot hinter Milchglas ---------- */

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.glow-red { width: 70vmax; height: 70vmax; right: -30vmax; top: -28vmax; background: radial-gradient(circle, var(--glow-red), transparent 65%); }
.glow-blue { width: 75vmax; height: 75vmax; left: -38vmax; bottom: -30vmax; background: radial-gradient(circle, var(--glow-blue), transparent 65%); }

/* ---------- Glas ---------- */

.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.glass::after {
  /* lichtbrechende Kante */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(155deg, var(--glass-rim-1), var(--glass-rim-2) 38%, var(--glass-rim-2) 62%, var(--glass-rim-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* ---------- Grundgerüst ---------- */

.app {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 14px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 40px);
}
.boot { display: grid; place-items: center; min-height: 70vh; }
.boot-icon { width: 64px; height: 64px; border-radius: 16px; background: url(icons/icon-192.png) center/cover; opacity: .9; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 4px 18px; }
.view-title { font: 700 34px/1.1 var(--font); letter-spacing: -0.02em; margin: 0; }
.view-sub { color: var(--muted); font-size: 15px; margin: 2px 0 0; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 6px 10px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.section-link { color: var(--accent); font-size: 15px; font-weight: 500; background: none; border: 0; padding: 4px; }

.card { border-radius: var(--radius-l); padding: 18px; }

/* ---------- Übersicht: Jahreszähler ---------- */

.tally { padding: 22px 22px 20px; border-radius: var(--radius-xl); }
.tally-line { display: flex; align-items: baseline; gap: 12px; }
.tally-num {
  font: 700 88px/0.9 var(--font-round);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.tally-label { font-size: 19px; font-weight: 600; line-height: 1.2; }
.tally-label small { display: block; color: var(--muted); font-size: 15px; font-weight: 500; }
.tally-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.fact b { display: block; font: 650 22px/1.1 var(--font-round); font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 13px; }

/* ---------- Offene Einsätze ---------- */

.open-list { display: grid; gap: 12px; }
.open-card { border-radius: var(--radius-l); padding: 16px 16px 14px; overflow: hidden; }
.open-card::before {
  /* Warnlicht-Kante: zeigt, dass hier noch etwas fehlt */
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
  animation: beacon 2.4s ease-in-out infinite;
}
@keyframes beacon { 50% { opacity: .35; box-shadow: 0 0 2px var(--amber); } }
.open-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.open-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; font-size: 13px; }
.open-kw { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 4px; line-height: 1.25; }
.open-meta { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.open-meta span { display: inline-flex; align-items: center; gap: 5px; }
.open-meta svg { width: 16px; height: 16px; }
.open-actions { display: flex; gap: 10px; margin-top: 14px; }

.empty { text-align: center; padding: 26px 20px; border-radius: var(--radius-l); color: var(--muted); }
.empty-icon { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--ok); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 2px; }
.empty p { margin: 0; font-size: 15px; }

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 600;
  background: var(--fill-strong); color: var(--text);
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--accent-soft), inset 0 1px 0 rgba(255,255,255,.28); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-danger { background: transparent; color: var(--accent); }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--fill); }

/* ---------- Listen ---------- */

.list { border-radius: var(--radius-l); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; min-height: 64px;
  position: relative; width: 100%; text-align: left;
  background: none; border: 0;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 1px; background: var(--line); }
.row:active { background: var(--fill); }
.nr {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  font: 650 16px/1 var(--font-round); font-variant-numeric: tabular-nums;
  background: var(--fill); position: relative;
}
.nr::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--cat, var(--cat-sonstige)); border: 2px solid var(--bg); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { color: var(--muted); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.row-end .pill-open { color: var(--amber); font-weight: 600; }
.row .chev { color: var(--faint); width: 16px; height: 16px; }

.month-head { margin: 22px 8px 8px; font-size: 15px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 999px; }
.search input { border: 0; background: none; outline: none; width: 100%; font-size: 16px; }
.search svg { color: var(--muted); width: 18px; height: 18px; }

.years { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px 4px; }
.years::-webkit-scrollbar { display: none; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.seg button[aria-pressed="true"] { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* ---------- Statistik ---------- */

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { border-radius: var(--radius-l); padding: 16px; }
.kpi b { display: block; font: 700 32px/1.05 var(--font-round); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.trend-up { color: var(--accent); }
.trend-down { color: var(--ok); }

.chart-card { border-radius: var(--radius-l); padding: 18px 16px 14px; margin-top: 12px; }
.chart-title { font-weight: 650; font-size: 16px; margin: 0 0 2px; }
.chart-note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; align-items: end; height: 150px; }
.mbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.mbar i { display: block; width: 100%; max-width: 22px; min-height: 2px; border-radius: 6px 6px 3px 3px; background: var(--accent); opacity: .9; }
.mbar.zero i { background: var(--fill-strong); }
.mbar.now i { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.mbar em { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mbar b { font: 600 11px/1 var(--font-round); color: var(--text); font-variant-numeric: tabular-nums; min-height: 11px; }

.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 48%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { display: block; height: 10px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 6px; background: var(--bar, var(--accent)); }
.hbar-val { font: 600 14px/1 var(--font-round); font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }

.split { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; margin-bottom: 14px; }
.split i { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend b { margin-left: auto; font: 600 14px/1 var(--font-round); font-variant-numeric: tabular-nums; }

/* ---------- Einstellungen ---------- */

.group-title { margin: 26px 8px 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.group { border-radius: var(--radius-l); overflow: hidden; }
.cell { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 52px; position: relative; width: 100%; text-align: left; background: none; border: 0; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.cell-main { flex: 1; min-width: 0; }
.cell-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cell-value { color: var(--muted); font-size: 15px; }
.cell.danger { color: var(--accent); }
.select-inline { border: 0; background: none; color: var(--muted); font-size: 15px; text-align: right; text-align-last: right; padding: 4px 0; max-width: 55%; -webkit-appearance: none; appearance: none; outline: none; }
.cell .chev { color: var(--faint); width: 16px; height: 16px; }
.cell-stack { display: block; }
.mono { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--muted); background: var(--fill); padding: 10px 12px; border-radius: var(--radius-s); margin-top: 8px; user-select: all; -webkit-user-select: all; }
.group-foot { color: var(--muted); font-size: 13px; margin: 8px 16px 0; line-height: 1.45; }

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill-strong); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--blue); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--fill);
  font-size: 15px; font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.chip.suggested:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.chip .x { width: 14px; height: 14px; opacity: .7; }
.chip-add { color: var(--accent); border-style: dashed; background: none; }

/* ---------- Editor-Blatt ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 8, 16, 0.32); opacity: 0; transition: opacity .28s ease; }
.sheet-backdrop.in { opacity: 1; }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0;
  max-width: 640px; margin: 0 auto;
  height: calc(100dvh - var(--safe-top) - 10px);
  border-radius: 30px 30px 0 0;
  background: var(--sheet-bg);
  display: flex; flex-direction: column;
  transform: translateY(104%);
  transition: transform .38s cubic-bezier(.2, .9, .25, 1);
}
.sheet.in { transform: none; }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 10px 8px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 650; text-align: center; }
.sheet-head .left { justify-self: start; }
.sheet-head .right { justify-self: end; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 20px; overscroll-behavior: contain; }
.sheet-foot { flex: none; padding: 10px 16px calc(var(--safe-bottom) + 12px); display: grid; gap: 8px; border-top: 1px solid var(--line); }

.field { margin-top: 18px; }
.field > label, .field-label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 4px 8px; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: var(--fill);
  border-radius: var(--radius-m); padding: 12px 14px; font-size: 17px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: color-mix(in srgb, var(--blue) 60%, transparent); background: var(--glass-strong); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.pair { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.pair .input { text-align: center; font-variant-numeric: tabular-nums; min-height: 48px; }
.time-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 4px 0; color: var(--muted); font-size: 14px; }
.duration { font: 650 15px/1 var(--font-round); color: var(--text); font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: 6px; }
.quick button { border: 0; border-radius: 999px; background: var(--fill-strong); padding: 6px 12px; font-size: 14px; font-weight: 600; }

.info-box { border-radius: var(--radius-m); background: var(--fill); padding: 12px 14px; margin-top: 18px; font-size: 15px; }
.info-box dt { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 8px; }
.info-box dt:first-child { margin-top: 0; }
.info-box dd { margin: 2px 0 0; }
.info-box a { color: var(--blue); }

.toggle-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-m); background: var(--fill); }
.toggle-row svg { color: var(--muted); }
.toggle-row .grow { flex: 1; }
.toggle-row small { display: block; color: var(--muted); font-size: 13px; }

.form-error { color: var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: var(--radius-m); font-size: 15px; }

/* ---------- Tableiste ---------- */

.tabbar {
  position: fixed; z-index: 30;
  left: 0; right: 0; bottom: calc(var(--safe-bottom) + 10px);
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 0 14px; pointer-events: none;
}
.tabbar-pill { display: flex; border-radius: 999px; padding: 5px; pointer-events: auto; }
.tabbar .glass { background: var(--glass-bar); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 72px; height: 54px; padding: 0 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--accent); background: var(--fill-strong); }
.fab {
  width: 64px; height: 64px; border-radius: 50%; pointer-events: auto;
  display: grid; place-items: center; color: var(--accent);
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.2; }
.tab-badge { position: absolute; transform: translate(12px, -14px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #fff; font: 700 11px/18px var(--font-round); text-align: center; }
.tab { position: relative; }

/* ---------- Anmeldung ---------- */

.login { min-height: 78vh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 380px; border-radius: var(--radius-xl); padding: 28px 22px 22px; text-align: center; }
.login-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 14px; background: url(icons/icon-192.png) center/cover; box-shadow: 0 8px 24px var(--accent-soft); }
.login h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.01em; }
.login p { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.login form { display: grid; gap: 10px; text-align: left; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--safe-top) + 10px);
  transform: translate(-50%, -140%); transition: transform .35s cubic-bezier(.2, .9, .25, 1);
  border-radius: 999px; padding: 11px 18px; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
}
.toast.in { transform: translate(-50%, 0); }
.toast svg { color: var(--ok); width: 20px; height: 20px; }
.toast.error svg { color: var(--accent); }

.offline-note { text-align: center; color: var(--amber); font-size: 13px; font-weight: 600; margin: -4px 0 12px; }

/* ---------- Import ---------- */

.import-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.import-table td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.import-table .err { color: var(--accent); }
.import-table .dup { color: var(--muted); }

@media (min-width: 700px) {
  .app { padding-top: calc(var(--safe-top) + 34px); }
  .sheet { bottom: 20px; border-radius: 30px; height: min(860px, calc(100dvh - 40px)); }
}

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

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

.tab-lens { display: none; }
