@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #1a4e8a;
  --navy-dark: #123a68;
  --wine: #8b2c3b;
  --ink: #1a1f2b;
  --muted: #5b6675;
  --bg: #f3f6fb;
  --bg-alt: #eef3f9;
  --card: #ffffff;
  --line: #e4ebf3;
  --field: #f5f8fc;
  --shadow: 0 6px 22px rgba(20, 40, 80, 0.07);
  --shadow-lg: 0 18px 50px rgba(20, 40, 80, 0.18);
  --radius: 16px;
  --grad: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 55%, var(--wine) 130%);

  --swim: #1f86c0;
  --bike: #1a4e8a;
  --run: #a8344a;
  --strength: #5c6474;
  --ems: #b7800c;
  --mobility: #7a8796;
  --cross: #7b4fb3;
  --race: #8b2c3b;

  --ok: #1d9a60;
  --ok-bg: #e6f6ee;
  --warn: #c98200;
  --warn-bg: #fdf3df;
  --bad: #c0392b;
  --bad-bg: #fbe9e7;
  --drop: #8a94a3;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf5;
    --muted: #9aa6b8;
    --bg: #0c1422;
    --bg-alt: #111c2e;
    --card: #152238;
    --line: #22324c;
    --field: #0f1a2c;
    --shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
    --swim: #4db0e6;
    --bike: #6f9fe0;
    --run: #e0677d;
    --strength: #9aa3b5;
    --ems: #e3aa2e;
    --mobility: #8e9bb0;
    --cross: #a988da;
    --ok: #3ec486;
    --ok-bg: #12301f;
    --warn: #eab044;
    --warn-bg: #33270e;
    --bad: #ef6b5c;
    --bad-bg: #3a1714;
    --drop: #6f7a8c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--navy); }
.i { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.2em; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--grad);
  color: #fff;
  padding: calc(var(--safe-top) + 10px) 18px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 4px 18px rgba(18, 36, 64, 0.25);
}
.topbar__brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.topbar__eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.topbar__title { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 700;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.view { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px); }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 2px 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine);
}
@media (prefers-color-scheme: dark) { .section-title { color: #e58a99; } }
.section-title small { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--muted); font-size: 0.8rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.pre { white-space: pre-line; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  border-radius: 20px; padding: 18px 18px 16px;
  box-shadow: 0 14px 34px rgba(26, 78, 138, 0.28);
}
.hero::after {
  content: ""; position: absolute; top: -60px; right: -50px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%); border-radius: 50%;
}
.hero__eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.hero__big { font-size: 2.6rem; font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; margin-top: 6px; }
.hero__big span { font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: 0.9; margin-left: 6px; }
.hero__sub { font-size: 0.9rem; opacity: 0.92; margin-top: 2px; }
.hero__note { margin-top: 12px; font-size: 0.85rem; background: rgba(255,255,255,0.12); border-radius: 12px; padding: 9px 11px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.2); overflow: hidden; position: relative; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: #fff; }
.hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; position: relative; z-index: 1; }
.hero__stat label { display: block; font-size: 0.72rem; opacity: 0.8; margin-bottom: 5px; }
.hero__stat b { font-size: 0.95rem; }

.bar--light { background: var(--bg-alt); }
.bar--light > i { background: var(--grad); }
.bar--light > i.plan { background: rgba(26, 78, 138, 0.22); }

/* ---------- Banner ---------- */
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 14px; padding: 13px 14px; margin-top: 12px;
  background: var(--warn-bg); color: var(--ink); border: 1px solid rgba(201,130,0,0.25);
  font-size: 0.9rem;
}
.banner .i { color: var(--warn); width: 1.3em; height: 1.3em; margin-top: 1px; }
.banner--info { background: var(--bg-alt); border-color: var(--line); }
.banner--info .i { color: var(--navy); }
.banner__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }

/* ---------- Ampel ---------- */
.ampel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ampel button {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 6px 9px;
  background: var(--field); display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.86rem; transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.ampel button:active { transform: scale(0.97); }
.ampel .dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.15); }
.ampel .g .dot { background: #22b573; }
.ampel .y .dot { background: #f2b01e; }
.ampel .r .dot { background: #e0473a; }
.ampel .g.on { border-color: #22b573; background: var(--ok-bg); }
.ampel .y.on { border-color: #f2b01e; background: var(--warn-bg); }
.ampel .r.on { border-color: #e0473a; background: var(--bad-bg); }
.ampel__hint { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.ampel__hint b { color: var(--ink); }

/* ---------- Session card ---------- */
.sess { position: relative; padding: 14px 14px 12px; }
.sess__head { display: flex; gap: 12px; align-items: flex-start; }
.badge-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  background: var(--c, var(--navy));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--c, var(--navy)) 35%, transparent);
}
.badge-ico .i { width: 22px; height: 22px; }
.badge-ico.sm { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; box-shadow: none; }
.badge-ico.sm .i { width: 17px; height: 17px; }
.sess__meta { font-size: 0.78rem; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sess__title { font-size: 1.05rem; font-weight: 750; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted);
}
.pill--key { background: color-mix(in srgb, var(--wine) 14%, transparent); color: var(--wine); }
@media (prefers-color-scheme: dark) { .pill--key { color: #f0a0ad; } }
.pill--opt { background: var(--bg-alt); color: var(--muted); }
.pill--rec { background: var(--ok-bg); color: var(--ok); }
.pill--zone { background: color-mix(in srgb, var(--c, var(--navy)) 12%, transparent); color: var(--c, var(--navy)); }
.adapt {
  display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; font-size: 0.8rem; font-weight: 600;
  color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 7px 9px;
}
.adapt .i { margin-top: 2px; }
.sess__actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px; border-radius: 12px; font-weight: 700; font-size: 0.86rem;
  background: var(--field); border: 1px solid var(--line); transition: transform .12s ease;
}
.act:active { transform: scale(0.97); }
.act--done { background: var(--ok); border-color: var(--ok); color: #fff; }
.act--part { color: var(--warn); }
.act--skip { color: var(--bad); }
.sess__status {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 9px 11px; border-radius: 12px; font-size: 0.86rem; font-weight: 600;
}
.st-done { background: var(--ok-bg); color: var(--ok); }
.st-partial { background: var(--warn-bg); color: var(--warn); }
.st-skipped { background: var(--bad-bg); color: var(--bad); }
.st-dropped { background: var(--bg-alt); color: var(--drop); }
.sess.is-dropped .sess__title { text-decoration: line-through; color: var(--drop); }
.sess.is-dropped .badge-ico { filter: grayscale(1); opacity: 0.55; }
.link-btn { font-weight: 700; font-size: 0.82rem; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Week ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--field); border: 1px solid var(--line);
}
.iconbtn:disabled { opacity: 0.35; }
.day { margin-top: 14px; }
.day__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; font-weight: 750; font-weight: 700; font-size: 0.9rem; }
.day__head .muted { font-weight: 600; }
.day.is-today .day__head { color: var(--navy); }
@media (prefers-color-scheme: dark) { .day.is-today .day__head { color: #8fb6ec; } }
.day.is-today .day__list { border-color: color-mix(in srgb, var(--navy) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 12%, transparent), var(--shadow); }
.day__list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.srow { display: flex; align-items: center; gap: 11px; padding: 11px 12px; width: 100%; text-align: left; }
.srow + .srow { border-top: 1px solid var(--line); }
.srow__main { flex: 1; min-width: 0; }
.srow__title { display: block; font-weight: 650; font-weight: 600; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow__sub { display: block; font-size: 0.76rem; color: var(--muted); }
.srow.is-dropped .srow__title { text-decoration: line-through; color: var(--drop); }
.srow.is-opt .srow__title { color: var(--muted); }
.stat-ico { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.stat-ico .i { width: 15px; height: 15px; }
.stat-ico.done { background: var(--ok); color: #fff; }
.stat-ico.partial { background: var(--warn); color: #fff; }
.stat-ico.skipped { background: var(--bad); color: #fff; }
.stat-ico.dropped { background: var(--bg-alt); color: var(--drop); }
.stat-ico.open { border: 2px dashed var(--warn); color: var(--warn); }
.stat-ico.planned { border: 2px solid var(--line); }
.rdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.rdot.green { background: #22b573; } .rdot.yellow { background: #f2b01e; } .rdot.red { background: #e0473a; }

/* ---------- Plan ---------- */
.phase { margin-top: 14px; }
.phase__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 6px; }
.phase__head b { font-size: 0.95rem; }
.wrow { display: grid; grid-template-columns: 58px 1fr 54px; align-items: center; gap: 10px; padding: 8px 12px; width: 100%; text-align: left; }
.wrow + .wrow { border-top: 1px solid var(--line); }
.wrow__lab { font-size: 0.78rem; font-weight: 700; line-height: 1.2; }
.wrow__lab small { display: block; font-weight: 500; color: var(--muted); }
.wrow__val { font-size: 0.78rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.wrow.is-cur { background: color-mix(in srgb, var(--navy) 8%, transparent); }
.wbar { position: relative; height: 10px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.wbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.wbar i.p { background: color-mix(in srgb, var(--navy) 28%, transparent); }
.wbar i.p.rec { background: color-mix(in srgb, var(--ok) 35%, transparent); }
.wbar i.d { background: var(--grad); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.tbl th, .tbl td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.6rem; font-weight: 850; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.kpi span { font-size: 0.78rem; color: var(--muted); }
.kpi--feature { background: var(--grad); color: #fff; border: 0; }
.kpi--feature span { color: rgba(255,255,255,0.85); }
.sbar { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; margin-top: 10px; font-size: 0.85rem; }
.sbar .wbar { height: 8px; }

details.acc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.acc + details.acc { margin-top: 10px; }
details.acc summary { list-style: none; padding: 14px 16px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .i.chev { transition: transform .2s ease; color: var(--muted); }
details.acc[open] summary .i.chev { transform: rotate(90deg); }
details.acc .acc__body { padding: 0 16px 16px; font-size: 0.9rem; }
ol.rules { padding-left: 1.2rem; margin: 0; }
ol.rules li { margin: 6px 0; }

/* ---------- Forms ---------- */
.field { display: block; margin-top: 12px; }
.field > span { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.input {
  width: 100%; font-size: 16px; padding: 12px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--field); outline: none;
}
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
textarea.input { min-height: 74px; resize: vertical; }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; gap: 8px; }
.stepper .input { text-align: center; font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  background: var(--field); border: 1px solid var(--line); transition: transform .12s ease, opacity .2s ease;
  text-decoration: none; color: inherit;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; }
.btn--primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 22px rgba(26,78,138,0.28); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 13px; font-size: 0.82rem; }
.btn--ghost-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--danger { color: var(--bad); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.seg button { padding: 10px 4px; border-radius: 10px; font-weight: 700; font-size: 0.86rem; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); }
.seg button.on[data-v="done"] { background: var(--ok); color: #fff; }
.seg button.on[data-v="partial"] { background: var(--warn); color: #fff; }
.seg button.on[data-v="skipped"] { background: var(--bad); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 12px; border-radius: 999px; font-size: 0.84rem; font-weight: 650; font-weight: 600;
  background: var(--field); border: 1px solid var(--line);
}
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.rpe { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rpe button { aspect-ratio: 1; border-radius: 10px; font-weight: 800; font-size: 0.85rem; background: var(--field); border: 1px solid var(--line); }
.rpe button.on { color: #fff; border-color: transparent; background: var(--rc); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 2px; font-weight: 600; font-size: 0.92rem; }
.switch input { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; background: var(--line); border-radius: 99px; position: relative; transition: background .2s; flex: 0 0 46px; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25); transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 16, 30, 0.45); z-index: 90; opacity: 0; transition: opacity .25s ease; backdrop-filter: blur(2px); }
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  padding: 8px 18px calc(var(--safe-bottom) + 22px);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-width: 640px; margin: 0 auto;
}
.sheet.show { transform: translateY(0); }
.sheet__grab { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.details-box { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 0.88rem; margin-top: 12px; }
.opt-list { display: grid; gap: 8px; margin-top: 12px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); text-align: left; width: 100%; font-weight: 700; }
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.opt:disabled { opacity: 0.55; }
.opt.go { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 0.68rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.tabbar a .i { width: 23px; height: 23px; }
.tabbar a.on { color: var(--navy); }
@media (prefers-color-scheme: dark) { .tabbar a.on { color: #8fb6ec; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; transition: all .25s ease;
  background: #13213a; color: #fff; border: 1px solid rgba(255,255,255,0.14); padding: 11px 16px; border-radius: 14px; font-size: 0.88rem; font-weight: 600;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); width: max-content;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.login__hero {
  background: var(--grad); color: #fff; padding: calc(var(--safe-top) + 48px) 24px 70px; position: relative; overflow: hidden;
}
.login__hero::after { content: ""; position: absolute; right: -60px; top: -40px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%); }
.login__hero h1 { margin: 10px 0 6px; font-size: 2.3rem; line-height: 1.02; font-weight: 900; letter-spacing: -0.02em; }
.login__hero p { margin: 0; opacity: 0.9; }
.login__card { margin: -44px 16px 24px; position: relative; z-index: 2; }
.login__foot { text-align: center; font-size: 0.8rem; margin-top: auto; padding: 0 16px calc(var(--safe-bottom) + 20px); }
.err { color: var(--bad); font-size: 0.86rem; font-weight: 600; margin-top: 10px; min-height: 1.2em; }

.empty { text-align: center; padding: 24px 12px; }
.empty .i { width: 34px; height: 34px; color: var(--navy); }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-alt), var(--card), var(--bg-alt)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (min-width: 700px) {
  .view { padding-top: 24px; }
}

.tc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tc-row .input { width: 110px; flex: 0 0 110px; padding: 9px 12px; }
