/* Apple-style system: SF type, grouped cards, translucent bars, system colours.
   Follows the device's light / dark setting. */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7;               /* page */
  --bg-2: #ffffff;            /* grouped card */
  --panel: rgba(120, 120, 128, 0.12);   /* tertiary fill: buttons, inputs, chips */
  --panel-2: rgba(120, 120, 128, 0.2);
  --line: rgba(60, 60, 67, 0.16);
  --line-2: rgba(60, 60, 67, 0.29);
  --text: #000000;
  --muted: rgba(60, 60, 67, 0.62);
  --dim: rgba(60, 60, 67, 0.5);
  --accent: #007aff;           /* interactive (links, focus, selection) */
  --accent-ink: #ffffff;
  --accent-wash: rgba(0, 122, 255, 0.12);
  --mint: #1f8f3a;             /* income / positive */
  --mint-ink: #ffffff;
  --mint-wash: rgba(52, 199, 89, 0.15);
  --c-left: #248a3d;
  --c-pension: #007aff;
  --c-charges: #b86e00;
  --c-tax: #d6336c;
  --c-costs: #8944ab;
  --c-time: #8e8e93;
  --danger: #d70015;
  --warn: #a15c00;
  --material: rgba(249, 249, 249, 0.78);
  --hero-a: #1f8f3a; --hero-b: #0a9b86;
  --glow-a: rgba(0, 122, 255, .16); --glow-b: rgba(52, 199, 89, .18);
  --card-sheen: none; --card-edge: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .1);
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rail: 244px;
  --gutter: 16px;
  font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #1c1c1e;
    --panel: rgba(120, 120, 128, 0.24);
    --panel-2: rgba(120, 120, 128, 0.36);
    --line: rgba(84, 84, 88, 0.55);
    --line-2: rgba(84, 84, 88, 0.8);
    --text: #ffffff;
    --muted: rgba(235, 235, 245, 0.62);
    --dim: rgba(235, 235, 245, 0.5);
    --accent: #0a84ff;
    --accent-wash: rgba(10, 132, 255, 0.2);
    --mint: #30d158;
    --mint-ink: #000000;
    --mint-wash: rgba(48, 209, 88, 0.18);
    --c-left: #1da97a;
    --c-pension: #3987e5;
    --c-charges: #c98500;
    --c-tax: #d55181;
    --c-costs: #9085e9;
    --c-time: #8e8e93;
    --danger: #ff6961;
    --warn: #ffb340;
    --material: rgba(28, 28, 30, 0.78);
    --hero-a: #30d158; --hero-b: #64e8c8;
    --glow-a: rgba(10, 132, 255, .28); --glow-b: rgba(48, 209, 88, .22);
    --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 90px);
    --card-edge: inset 0 .5px 0 rgba(255, 255, 255, .09), 0 0 0 .5px rgba(255, 255, 255, .04);
    --shadow: 0 8px 32px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; min-height: 100vh; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.boot { min-height: 100vh; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.rail { display: none; }
.main { padding: 18px var(--gutter) 108px; max-width: 1240px; width: 100%; margin: 0 auto; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-title { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; font-size: 17px; }
.brand svg { width: 30px; height: 30px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(9, 14, 28, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; font-size: 11.5px; color: var(--muted); background: none; border: 0; border-radius: 10px; text-decoration: none; }
.bottombar [aria-current="page"] { color: var(--mint); }
.bottombar svg { width: 22px; height: 22px; }

@media (min-width: 1040px) {
  .shell { grid-template-columns: var(--rail) 1fr; }
  .rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
  .main { padding: 30px 36px 60px; }
  .bottombar { display: none; }
  :root { --gutter: 36px; }
}
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; }
.rail nav a svg { width: 19px; height: 19px; flex: none; }
.rail nav a:hover { background: var(--panel); color: var(--text); }
.rail nav a[aria-current="page"] { background: var(--mint-wash); color: var(--mint); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.rail-foot .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }

/* ---------- Primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.btn.primary:hover { background: #62ebbb; }
.btn.danger { color: var(--danger); border-color: rgba(255, 133, 151, 0.35); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel); }
.btn.sm { min-height: 32px; padding: 4px 11px; font-size: 13.5px; border-radius: 9px; }
.btn.icon { width: 38px; padding: 0; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--dim); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-variant-numeric: tabular-nums; }
.input:focus { outline: 2px solid var(--mint); outline-offset: 0; border-color: var(--mint); }
.input::placeholder { color: var(--dim); }
textarea.input { min-height: 70px; resize: vertical; }
.input[type="time"], .input[type="date"] { min-width: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mint { color: var(--mint); }
.neg { color: var(--danger); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.mint { background: var(--mint-wash); color: var(--mint); }
.chip.warn { background: rgba(240, 182, 74, 0.13); color: var(--warn); }
.chip.bad { background: rgba(255, 133, 151, 0.13); color: var(--danger); }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.seg { display: inline-flex; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg .sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .track { background: var(--c-left); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Panels use dividers instead of nested boxes */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel > h2, .section-h { font-size: 15px; font-weight: 650; letter-spacing: -0.005em; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel > h2 .sub, .section-h .sub { color: var(--muted); font-weight: 500; font-size: 13px; }
.divide > * + * { border-top: 1px solid var(--line); }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cols.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .cols.even { grid-template-columns: 1fr 1fr; } }

/* Period switcher */
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager .label { min-width: 142px; text-align: center; font-weight: 650; font-size: 15px; text-transform: capitalize; }
.pager button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-items: center; }
.pager button:hover { background: var(--panel-2); }
.pager svg { width: 17px; height: 17px; }

/* ---------- Dashboard ---------- */
.hero { display: grid; gap: 22px; margin-bottom: 22px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.hero-fig .label { color: var(--muted); font-size: 14px; }
.hero-fig .big { font-size: clamp(40px, 9vw, 64px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.05; color: var(--mint); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.hero-fig .big small { font-size: 0.38em; color: var(--muted); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.hero-fig .of { color: var(--muted); font-size: 14.5px; }

.krona { margin-top: 20px; }
.krona-bar { display: flex; gap: 3px; height: 34px; }
.krona-bar .seg-k { border: 0; padding: 0; border-radius: 6px; min-width: 3px; transition: opacity .15s, transform .15s; }
.krona-bar .seg-k:first-child { border-top-left-radius: 11px; border-bottom-left-radius: 11px; }
.krona-bar .seg-k:last-child { border-top-right-radius: 11px; border-bottom-right-radius: 11px; }
.krona-bar.dim-others .seg-k:not(.on) { opacity: .35; }
.krona-legend { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 14px; }
@media (min-width: 640px) { .krona-legend { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.krona-legend .item { display: grid; grid-template-columns: 12px 1fr auto 52px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.krona-legend .item .pc { color: var(--dim); text-align: right; font-size: 13px; }
.krona-legend .item.on { color: #fff; }

.timer-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.timer-card .clock { font-size: 44px; font-weight: 250; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-card.live { border-color: rgba(70, 224, 172, 0.55); }
.timer-card .live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.timer-big { display: flex; flex-direction: column; gap: 18px; }
.timer-big .clock { font-size: clamp(54px, 14vw, 96px); }

.stats-line { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
@media (min-width: 700px) { .stats-line { grid-template-columns: repeat(4, 1fr); } }
.stats-line > div { padding: 12px 16px 12px 0; }
.stats-line .k { color: var(--muted); font-size: 13px; }
.stats-line .v { font-size: 21px; font-weight: 500; letter-spacing: -0.015em; margin-top: 2px; }

.list .li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list .li:last-child { border-bottom: 0; }
.list .li .t { font-weight: 550; }
.list .li .s { color: var(--muted); font-size: 13px; }
.bar-track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 7px; }
.bar-fill { height: 100%; border-radius: 3px; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
.tbl tfoot td, .tbl tr.total td { font-weight: 650; border-top: 1px solid var(--line-2); border-bottom: 0; }
.tbl tr.sub td { color: var(--muted); font-size: 13.5px; }
.tbl tr.group td { padding-top: 16px; font-weight: 650; border-bottom: 1px solid var(--line-2); }
.tbl tr.fade td { color: var(--dim); }
.tscroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
@media (max-width: 719px) {
  .tbl.stackm thead { display: none; }
  .tbl.stackm, .tbl.stackm tbody, .tbl.stackm tfoot { display: block; }
  .tbl.stackm tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .tbl.stackm td { display: flex; justify-content: space-between; gap: 8px; border: 0; padding: 2px 0; text-align: right; }
  .tbl.stackm td::before { content: attr(data-l); color: var(--dim); font-size: 12.5px; text-align: left; }
  .tbl.stackm td.full { grid-column: 1 / -1; }
  .tbl.stackm td.nolabel::before { content: none; }
  .tbl.stackm tr.total, .tbl.stackm tfoot tr { border-top: 1px solid var(--line-2); border-bottom: 0; }
}

/* Statement ("Áætlaðar tölur") */
.stmt { display: flex; flex-direction: column; }
.stmt .ln { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stmt .ln .op { color: var(--dim); text-align: center; font-weight: 600; }
.stmt .ln .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stmt .ln .nm .rate { color: var(--dim); font-size: 13px; }
.stmt .ln.sum { border-top: 1px solid var(--line-2); }
.stmt .ln.sum .nm, .stmt .ln.sum .v { font-weight: 650; }
.stmt .ln.final { background: var(--mint-wash); border-radius: 12px; border: 0; padding: 14px 12px; margin-top: 8px; }
.stmt .ln.final .v { color: var(--mint); font-size: 19px; font-weight: 600; }
.stmt .ln.head { color: var(--muted); font-size: 13px; padding-top: 16px; border-bottom: 1px solid var(--line-2); }
.stmt .ln.indent .nm { padding-left: 4px; color: var(--muted); }
.pct-input { width: 70px; min-height: 28px; padding: 2px 8px; font-size: 13px; text-align: right; border-radius: 7px; background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.pct-input:hover { border-color: var(--muted); }
.pct-input:focus { background: var(--bg); border-style: solid; color: var(--text); }
.note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.note.warn { border-color: rgba(240, 182, 74, 0.4); }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis-x text { text-anchor: middle; }
.chart .axis-y text { text-anchor: end; }
.chart .bar-g { cursor: default; }
.chart .bar-g rect.hit { fill: transparent; }
.chart .bar-g:hover rect.vis, .chart .bar-g:focus rect.vis { filter: brightness(1.18); }
.chart .bar-g:focus { outline: none; }
.chart .bar-g:focus-visible .hit { stroke: var(--mint); stroke-width: 1.5; rx: 6; }
.chart text.now { fill: var(--text); font-weight: 650; }
.tip { position: fixed; z-index: 80; pointer-events: none; background: #1a2744; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; min-width: 170px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.tip .th { font-weight: 650; margin-bottom: 6px; text-transform: capitalize; }
.tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 1.5px 0; }
.tip .tr .l { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Modal / sheet / toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(2, 5, 12, 0.7); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(18px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .overlay { align-items: center; } .modal { border-radius: 22px; padding-bottom: 22px; } }
.modal h2 { font-size: 19px; font-weight: 650; margin-bottom: 16px; letter-spacing: -0.01em; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 1040px) { .toasts { bottom: 28px; } }
.toast { background: #1a2744; border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; font-weight: 550; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); animation: rise .18s ease-out; }
.toast.err { border-color: rgba(255, 133, 151, .5); color: var(--danger); }
.form-err { color: var(--danger); font-size: 13.5px; min-height: 18px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; }
.auth-card .brand { font-size: 22px; }
.auth-card .brand svg { width: 38px; height: 38px; }
.auth-card h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.qr { width: 190px; height: 190px; border-radius: 12px; background: #fff; display: block; }
.code-box { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; font-size: 15px; background: var(--bg); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes .code-box { text-align: center; }
.otp { font-size: 26px; letter-spacing: .35em; text-align: center; font-weight: 500; }

/* ---------- Misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 34px 12px; }
.empty .btn { margin-top: 14px; }
.pill-timer { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--mint-wash); color: var(--mint); font-weight: 650; border: 1px solid rgba(70, 224, 172, .4); text-decoration: none; font-variant-numeric: tabular-nums; }
.pill-timer:hover { text-decoration: none; background: rgba(70, 224, 172, .18); }
.pill-timer .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s infinite; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 6px; font-weight: 650; border-bottom: 1px solid var(--line-2); }
.day-head .d { text-transform: capitalize; }
.day-head .tot { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.shift { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
.shift:hover { background: rgba(255, 255, 255, .02); }
.shift .when { font-weight: 600; font-size: 16px; }
.shift .meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.shift .amt { text-align: right; font-weight: 600; }
.shift .hrs { text-align: right; color: var(--muted); font-size: 13px; }
.settings-nav { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.session { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.session .ua { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; }
.swatches button[aria-pressed="true"] { border-color: #fff; }
.more-sheet a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 550; }
.more-sheet a svg { width: 20px; height: 20px; color: var(--muted); }

.time-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .time-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "timer sum" "list sum"; align-items: start; }
  .a-timer { grid-area: timer; } .a-sum { grid-area: sum; position: sticky; top: 20px; } .a-list { grid-area: list; }
}
@media (min-width: 1040px) { [data-mobile-only] { display: none !important; } }

.stmt .ln .nm { flex-wrap: nowrap; }
.stmt .ln .nm > :first-child { min-width: 0; }
.a-sum .stats-line { grid-template-columns: 1fr 1fr; }
.stats-line .v { white-space: nowrap; }
@media (max-width: 639px) { .page-sub { display: none; } .topbar .page-title { font-size: 24px; } .pager .label { min-width: 118px; } }
.tbl.nw td, .tbl.nw th { white-space: nowrap; }
.tbl.nw td.wrap { white-space: normal; min-width: 120px; }
.stmt .ln.final .nm { flex-wrap: wrap; }


/* ============ Apple look ============ */
body { font-size: 16px; line-height: 1.4; letter-spacing: -0.011em; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent-wash); outline-offset: 1px; box-shadow: 0 0 0 1.5px var(--accent); }

/* Large titles */
.page-title { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.page-sub { font-size: 15px; }
.brand { font-weight: 600; }

/* Sidebar (macOS style) and tab bar (iOS style): translucent material */
.bottombar { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-top: .5px solid var(--line-2); }
.bottombar a, .bottombar button { font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.bottombar [aria-current="page"] { color: var(--accent); }
@media (min-width: 1040px) {
  .rail { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); border-right: .5px solid var(--line-2); padding: 26px 12px 18px; }
}
.rail nav a { padding: 7px 10px; border-radius: 8px; font-weight: 500; font-size: 15px; color: var(--text); }
.rail nav a svg { color: var(--accent); }
.rail nav a:hover { background: var(--panel); color: var(--text); }
.rail nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.rail nav a[aria-current="page"] svg { color: var(--accent-ink); }

/* Buttons */
.btn { min-height: 44px; border: 0; border-radius: 12px; background: var(--panel); color: var(--accent); font-weight: 600; font-size: 16px; }
.btn:hover { background: var(--panel-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.danger { color: var(--danger); border: 0; }
.btn.ghost { background: none; color: var(--accent); }
.btn.ghost:hover { background: var(--panel); color: var(--accent); }
.btn.sm { min-height: 32px; border-radius: 9px; font-size: 14px; }
.btn.icon { width: 40px; }
.rail-foot .btn { color: var(--muted); }

/* Fields */
.field > label, .field > .lbl { font-size: 13px; font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input { min-height: 44px; background: var(--panel); border: 0; border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.input:focus { outline: 0; box-shadow: 0 0 0 3px var(--accent-wash), 0 0 0 1.5px var(--accent); border-color: transparent; }
.input::placeholder { color: var(--dim); }
.pct-input { border: 0; background: var(--panel); color: var(--text); }
.pct-input:focus { background: var(--panel); box-shadow: 0 0 0 1.5px var(--accent); }

/* Segmented control and switch */
.seg { background: var(--panel); border: 0; border-radius: 9px; padding: 2px; gap: 0; }
.seg button { border-radius: 7px; padding: 5px 14px; font-size: 14px; font-weight: 500; color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--bg-2); box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .04); color: var(--text); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: #636366; } }
.toggle .track { width: 51px; height: 31px; background: var(--panel-2); }
.toggle .track::after { top: 2px; left: 2px; width: 27px; height: 27px; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .22s cubic-bezier(.3, 1.2, .4, 1); }
.toggle input:checked + .track { background: #34c759; }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--accent-wash); box-shadow: 0 0 0 1.5px var(--accent); }

/* Cards: grouped, borderless */
.panel { background: var(--bg-2); border: 0; border-radius: var(--r-lg); padding: 20px; }
.panel > h2, .section-h { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.chip { background: var(--panel); font-weight: 500; }
.chip.mint { color: var(--mint); }
.note { background: var(--panel); border: 0; border-radius: 12px; }
.note.warn { box-shadow: inset 0 0 0 1px rgba(255, 159, 10, .5); }
.timer-card { background: var(--bg-2); border: 0; border-radius: 22px; }
.timer-card.live { box-shadow: 0 0 0 2px var(--mint); }
.timer-card .clock { font-weight: 200; }

.pager button { border: 0; background: var(--panel); color: var(--accent); border-radius: 50%; }
.pager button:hover { background: var(--panel-2); }
.pager .label { font-weight: 600; }

/* Dashboard */
.hero-fig .big { font-weight: 600; letter-spacing: -0.045em; }
.krona-bar { height: 28px; gap: 2px; }
.krona-bar .seg-k { border-radius: 4px; }
.krona-bar .seg-k:first-child { border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.krona-bar .seg-k:last-child { border-top-right-radius: 9px; border-bottom-right-radius: 9px; }
.krona-legend .item.on { color: var(--text); font-weight: 600; }
.stats-line .v { font-weight: 600; }
.bar-track { background: var(--panel); }

/* Lists and tables: hairlines */
.tbl th { border-bottom: .5px solid var(--line-2); font-weight: 500; }
.tbl td { border-bottom: .5px solid var(--line); }
.tbl tr.click:hover td, .shift:hover { background: var(--panel); }
.tbl tfoot td, .tbl tr.total td, .tbl tr.group td { border-color: var(--line-2); }
.list .li, .stmt .ln, .session, .shift, .more-sheet a { border-bottom-width: .5px; }
.day-head { border-bottom-width: .5px; }
.stmt .ln.final { background: var(--mint-wash); border-radius: 14px; }
.stmt .ln.final .v { color: var(--mint); }

/* Charts */
.chart .grid line { stroke-width: .5; }
.chart text { font-size: 11px; }
.tip { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: .5px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }

/* Sheets, dialogs, toasts */
.overlay { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal { background: var(--bg-2); border: 0; border-radius: 28px 28px 0 0; box-shadow: var(--shadow); }
@media (min-width: 640px) { .modal { border-radius: 24px; } }
.modal::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--panel-2); margin: -10px auto 14px; }
@media (min-width: 640px) { .modal::before { display: none; } }
.modal h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; }
.toast { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: .5px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); font-weight: 500; }
.toast.err { color: var(--danger); }

/* Sign-in */
.auth-card { background: var(--bg-2); border-radius: 28px; padding: 34px 28px; max-width: 440px; }
.auth-card h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.code-box { background: var(--panel); border: 0; }
.pill-timer { border: 0; color: var(--mint); }
.swatches button[aria-pressed="true"] { border-color: var(--text); }
.more-sheet a svg { color: var(--accent); }

/* Hours overview (Tímar / Taxti / Tíma-Tekju tafla) */
.ov { padding: 8px 8px 6px; overflow: hidden; }
.ov-tbl { font-size: 16px; }
.ov-tbl th { padding: 10px 14px; font-size: 13px; }
.ov-tbl td { padding: 12px 14px; border-bottom: 0; }
.ov-tbl tbody td:nth-child(2) { font-weight: 700; }
.ov-tbl tr.ov-reg td { background: rgba(10, 132, 255, .10); }
.ov-tbl tr.ov-dbl td { background: rgba(255, 204, 0, .16); }
.ov-tbl tr.ov-total td { background: var(--mint-wash); border-top: 0; font-weight: 700; font-size: 17px; }
.ov-tbl tr.zero td { color: var(--muted); }
.ov-tbl tr.zero td:nth-child(2) { font-weight: 500; }
.ov-tbl tbody tr:first-child td:first-child, .ov-tbl tbody tr:first-child td:last-child { border-radius: 12px 0 0 0; }
.ov-tbl tbody tr:first-child td:last-child { border-radius: 0 12px 0 0; }
.ov-tbl tfoot td:first-child { border-radius: 0 0 0 12px; }
.ov-tbl tfoot td:last-child { border-radius: 0 0 12px 0; }
@media (max-width: 480px) { .ov-tbl { font-size: 14.5px; } .ov-tbl td, .ov-tbl th { padding: 10px 8px; } }
.stmt .ln { grid-template-columns: 22px minmax(0, 1fr) auto; }
.stmt .ln .nm { flex-wrap: wrap; min-width: 0; }
.stmt .ln .toggle { font-size: 14px; }


/* ============ Polish ============ */
/* Cards: soft depth in light mode, top-lit edge in dark mode */
.panel, .timer-card { background-image: var(--card-sheen); box-shadow: var(--card-edge); }
.timer-card.live { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 2px var(--mint), 0 0 0 transparent; } 50% { box-shadow: 0 0 0 2px var(--mint), 0 0 34px var(--mint-wash); } }

/* Hero: the figure sits on an ambient glow */
.hero-fig { position: relative; padding: 26px 26px 14px; border-radius: 28px; background:
  radial-gradient(70% 90% at 0% 0%, var(--glow-b), transparent 62%),
  radial-gradient(60% 80% at 100% 100%, var(--glow-a), transparent 62%), var(--bg-2); box-shadow: var(--card-edge); overflow: hidden; }
.hero-fig .label { font-size: 15px; font-weight: 500; }
.hero-fig .big { font-size: clamp(44px, 9vw, 72px); font-weight: 700; letter-spacing: -0.045em; background-image: linear-gradient(120deg, var(--hero-a), var(--hero-b)); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; max-width: 100%; }
.krona-bar { height: 30px; }
.krona-bar .seg-k:hover { filter: brightness(1.1); }
@media (max-width: 639px) { .hero-fig { padding: 20px 18px 8px; border-radius: 24px; } }

/* Sidebar: coloured icon tiles, like the Settings app */
@media (min-width: 1040px) {
  .rail nav a { gap: 10px; padding: 5px 8px; }
  .rail nav a svg { width: 28px; height: 28px; padding: 6px; border-radius: 7px; color: #fff; background: var(--tile, #8e8e93); }
  .rail nav a[aria-current="page"] svg { color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); }
  .rail nav a[data-nav="home"] { --tile: #0a84ff; }
  .rail nav a[data-nav="time"] { --tile: #ff9f0a; }
  .rail nav a[data-nav="month"] { --tile: #ff453a; }
  .rail nav a[data-nav="year"] { --tile: #30b350; }
  .rail nav a[data-nav="expenses"] { --tile: #e5446d; }
  .rail nav a[data-nav="diary"] { --tile: #8e5cd6; }
  .rail nav a[data-nav="vat"] { --tile: #14a39a; }
  .rail nav a[data-nav="settings"] { --tile: #8e8e93; }
}

/* A single gentle crossfade when you change page */
.route-anim .main > :last-child { animation: fadein .22s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Sign-in: ambient background and a material card */
.auth { background: radial-gradient(55% 45% at 15% 8%, var(--glow-a), transparent 65%), radial-gradient(50% 45% at 88% 92%, var(--glow-b), transparent 65%), var(--bg); }
.auth-card { background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow); }
.auth-card .brand svg { width: 48px; height: 48px; }

/* Tables and lists breathe a little more */
.tbl td { padding: 11px 10px; }
.list .li { padding: 13px 0; }
.chip { padding: 3px 10px; }

/* Home hero: two headline figures, detail line beneath each in smaller type */
.hero-figs { display: grid; gap: 18px 28px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .hero-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-figs .fig { min-width: 0; }
.hero-figs .big { font-size: clamp(34px, 7.5vw, 56px); white-space: nowrap; }
@media (min-width: 900px) { .hero-figs .big { font-size: clamp(30px, 3.4vw, 46px); } }
.hero-figs .of { font-size: 14px; line-height: 1.5; }
.hero-figs .of b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-figs + .krona { margin-top: 26px; }


/* ============ Warm ============ */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/inter-Bold.woff") format("woff"); }
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #f7f2ea; --bg-2: #fffdf9;
  --panel: rgba(110, 80, 50, 0.09); --panel-2: rgba(110, 80, 50, 0.16);
  --line: rgba(80, 55, 30, 0.14); --line-2: rgba(80, 55, 30, 0.26);
  --text: #211c17; --muted: rgba(60, 45, 30, 0.66); --dim: rgba(60, 45, 30, 0.52);
  --accent: #d9541e; --accent-wash: rgba(217, 84, 30, 0.12);
  --material: rgba(255, 251, 245, 0.8);
  --hero-a: #1f8f3a; --hero-b: #0f9d7a;
  --glow-a: rgba(217, 84, 30, .13); --glow-b: rgba(235, 170, 60, .2);
  --card-edge: 0 0 0 .5px rgba(90, 60, 30, .07), 0 1px 2px rgba(90, 60, 30, .05), 0 12px 32px rgba(90, 60, 30, .08);
  --shadow: 0 1px 2px rgba(90, 60, 30, .06), 0 10px 30px rgba(90, 60, 30, .14);
  font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141110; --bg-2: #1e1a17;
    --panel: rgba(255, 235, 210, 0.09); --panel-2: rgba(255, 235, 210, 0.15);
    --line: rgba(255, 235, 210, 0.12); --line-2: rgba(255, 235, 210, 0.22);
    --text: #f6efe6; --muted: rgba(246, 236, 224, 0.64); --dim: rgba(246, 236, 224, 0.5);
    --accent: #ff7a3d; --accent-wash: rgba(255, 122, 61, 0.2);
    --material: rgba(30, 26, 23, 0.8);
    --hero-a: #4cd37a; --hero-b: #f2b84b;
    --glow-a: rgba(255, 122, 61, .2); --glow-b: rgba(242, 184, 75, .16);
    --shadow: 0 8px 32px rgba(0, 0, 0, .55);
  }
}
body { font-family: var(--font); }
.rail nav a[data-nav="home"] { --tile: #e8672a; }

/* Brand: the mirrored S from ylska.is */
.logo-s { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: linear-gradient(140deg, #f08a4b, #d9541e); box-shadow: 0 1px 2px rgba(120, 50, 10, .3), inset 0 .5px 0 rgba(255, 255, 255, .35); }
.logo-s span { display: block; transform: scaleX(-1); font-weight: 700; font-size: 18px; line-height: 1; color: #fff8f0; }
.auth-card .brand .logo-s { width: 48px; height: 48px; border-radius: 14px; }
.auth-card .brand .logo-s span { font-size: 29px; }
.sig { margin-top: 6px; padding: 0 4px; font-weight: 700; font-size: 11px; letter-spacing: .14em; color: var(--dim); }
.sig .flip { display: inline-block; transform: scaleX(-1); }

/* Greeting */
.greeting .page-title { font-size: clamp(26px, 4.2vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.greeting .page-sub { max-width: 54ch; font-size: 15px; line-height: 1.4; margin-top: 4px; }

/* Empty states */
.empty-art { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); }
@media (max-width: 639px) {
  .topbar:has(.greeting) { flex-wrap: wrap; }
  .greeting { flex: 1 1 100%; }
  .greeting .page-sub { display: block; font-size: 14px; }
  .greeting .page-title { font-size: 26px; }
}

/* Receipts on expenses */
.rec-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rec-item { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 .5px var(--line-2); }
.rec-item a { display: block; width: 100%; height: 100%; color: inherit; text-decoration: none; }
.rec-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-item .pdf { display: grid; place-content: center; justify-items: center; gap: 2px; width: 100%; height: 100%; color: var(--accent); }
.rec-item .pdf small { font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.rec-item .x { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; }
.rec-add { display: grid; place-content: center; justify-items: center; gap: 3px; width: 72px; height: 72px; padding: 4px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: none; color: var(--accent); font-size: 11px; line-height: 1.15; text-align: center; }
.rec-add:hover { background: var(--accent-wash); }
.clip { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--accent); font-size: 12.5px; font-weight: 600; vertical-align: 1px; }

/* Tax summary */
.rail nav a[data-nav="tax"] { --tile: #5e8c3a; }
.tax-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tax-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.tax-block h2 { font-size: 16px; margin-bottom: 8px; }
.tax-tbl { width: 100%; border-collapse: collapse; }
.tax-tbl td { padding: 9px 0; border-bottom: .5px solid var(--line); }
.tax-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tax-tbl tr.sub td { color: var(--muted); font-size: 14px; }
.tax-tbl tr.strong td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--line-2); padding-top: 11px; }
.tax-left .k { color: var(--muted); font-size: 14px; }
.tax-left .big { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--mint); margin-top: 2px; }
.ok-line, .tax-block .note { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ok-line { color: var(--mint); }
.tax-disclaimer { font-size: 12.5px; max-width: 70ch; }
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body, .main, .shell { background: #fff !important; color: #000 !important; }
  .rail, .bottombar, .no-print, .topbar, [data-mobile-only] { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .tax-head { margin-bottom: 10px; }
  .tax-head h1 { font-size: 24px; margin: 0 0 4px; }
  .panel { box-shadow: none !important; background: #fff !important; border: .5px solid #bbb; break-inside: avoid; }
  .tax-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tax-left .big, .ok-line { color: #000; }
}

/* Brand: the YLSKA wordmark replaces the old icon + name */
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/inter-ExtraBold.woff") format("woff"); }
.brand { font-size: 20px; }
.wordmark { font-weight: 800; letter-spacing: .05em; line-height: 1; padding-left: .02em; }
.wordmark .flip { display: inline-block; transform: scaleX(-1); letter-spacing: 0; margin: 0 .03em 0 -.04em; }
.auth-card .brand { font-size: 28px; justify-content: center; }


/* ============ Sidebar v2 and friendlier details ============ */
.rail { gap: 16px; }
.rail .brand { padding: 4px 8px 2px; }
.rail-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 14px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 650; font-size: 15px; box-shadow: 0 1px 2px rgba(120, 50, 10, .25), 0 6px 16px -6px var(--accent); transition: transform .12s, filter .15s; }
.rail-add:hover { filter: brightness(1.06); }
.rail-add:active { transform: scale(.98); }
.rail-add svg { width: 18px; height: 18px; }
.rail > nav { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 0 10px 4px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.rail nav a { position: relative; transition: background .15s, color .15s; }
.rail nav a .lbl { flex: 1; min-width: 0; }
.rail nav a[aria-current="page"] { background: var(--accent-wash); color: var(--text); font-weight: 650; }
.rail nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.rail nav a[aria-current="page"] svg { color: #fff; box-shadow: none; }
.nav-live { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.nav-live .live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); animation: pulse 1.6s ease-in-out infinite; }
.rail-foot { gap: 10px; padding-top: 12px; border-top: .5px solid var(--line-2); }
.rail-foot nav { display: flex; flex-direction: column; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0 6px; }
.avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg, #f08a4b, #d9541e); color: #fff; font-weight: 700; font-size: 14px; }
.user-chip .who { flex: 1; min-width: 0; padding: 0; font-size: 13px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--panel); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* Phone: a raised "+" in the middle of the tab bar */
.bottombar { grid-template-columns: repeat(5, 1fr); align-items: center; }
.bottombar .fab { display: grid; place-items: center; width: 54px; height: 54px; margin: -22px auto 0; padding: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 8px 20px -4px var(--accent), 0 0 0 5px var(--bg); transition: transform .12s; }
.bottombar .fab:active { transform: scale(.94); }
.bottombar .fab svg { width: 26px; height: 26px; }

/* Calmer, friendlier details everywhere */
::selection { background: var(--accent-wash); }
.btn { transition: background .15s, transform .12s, filter .15s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.panel { border-radius: 22px; }
.panel > h2 { letter-spacing: -0.015em; }
.list .li, .tbl tr.click, .shift { transition: background .15s; }
.list .li:hover, .tbl tr.click:hover { background: var(--panel); }
.tbl tr.click { cursor: pointer; }
@media (hover: hover) { .panel { transition: box-shadow .2s; } .panel:hover { box-shadow: var(--card-edge), 0 14px 36px -18px rgba(90, 60, 30, .22); } }
.rail > nav::-webkit-scrollbar { width: 0; }

/* Phone: the tab bar's background continues below it, so no dark strip shows between it and Safari's toolbar */
html { background: var(--bg); }
.bottombar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 160px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); pointer-events: none; }

/* Shift plan (embedded Airtable calendar) */
.rail nav a[data-nav="plan"] { --tile: #2f8f9d; }
.plan-frame { display: block; width: 100%; height: calc(100dvh - 210px); min-height: 560px; border: 0; border-radius: 20px; background: var(--bg-2); box-shadow: var(--card-edge); }
@media (max-width: 639px) { .plan-frame { height: calc(100dvh - 250px); min-height: 480px; border-radius: 16px; } }
