:root {
  --bg: #f6f7f6; --surface: #ffffff; --surface-2: #f0f2f1; --text: #17201d; --muted: #5f6b67;
  --line: #e1e5e3; --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #e3f2ef;
  --warn: #b45309; --warn-soft: #fef3c7; --danger: #b91c1c; --danger-soft: #fee2e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light dark;
}
:root[data-theme="dark"] {
    --bg: #0e1412; --surface: #161e1b; --surface-2: #1d2723; --text: #e7eeeb; --muted: #95a39e;
    --line: #2a3632; --accent: #2dd4bf; --accent-ink: #062a26; --accent-soft: #123631;
    --warn: #fbbf24; --warn-soft: #3a2e0f; --danger: #f87171; --danger-soft: #3b1717;
    --shadow: none;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #161e1b; --surface-2: #1d2723; --text: #e7eeeb; --muted: #95a39e;
    --line: #2a3632; --accent: #2dd4bf; --accent-ink: #062a26; --accent-soft: #123631;
    --warn: #fbbf24; --warn-soft: #3a2e0f; --danger: #f87171; --danger-soft: #3b1717;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 650; }
@media (max-width: 420px) { .brand span { display: none; } }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.cur-switch select {
  appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 28px 6px 12px; font-weight: 650; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.icon-btn { border: 0; background: transparent; padding: 8px; border-radius: 10px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

main { max-width: 860px; overflow-x: hidden; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 4px 0 2px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sub { color: var(--muted); margin: 0 0 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; cursor: pointer; font-weight: 600;
  text-decoration: none; color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }
.fab {
  position: fixed; right: max(16px, calc(50% - 414px)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 4;
  border-radius: 999px; padding: 14px 20px; font-size: 16px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* trip list */
.trip-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.trip-card { text-decoration: none; color: inherit; display: block; transition: transform .1s; }
.trip-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.trip-card .name { font-weight: 650; font-size: 17px; }
.trip-card .dates { color: var(--muted); font-size: 13px; }
.trip-card .total { font-size: 22px; font-weight: 700; margin-top: 10px; }
.trip-card.archived { opacity: .65; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* progress */
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar.over > span { background: var(--danger); }
.bar.near > span { background: var(--warn); }
.bar-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 20px; font-weight: 700; margin-top: 2px; }
.stat .value.neg { color: var(--danger); }
.stat .hint { font-size: 12px; color: var(--muted); }

.two-col { display: grid; gap: 14px; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }

.breakdown { list-style: none; padding: 0; margin: 0; }
.breakdown li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; }
.breakdown li .track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.breakdown li .track span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.breakdown .muted { color: var(--muted); font-size: 13px; }

/* expenses */
.day-group + .day-group { margin-top: 18px; }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 4px 6px; }
.exp-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.exp {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 11px 14px;
  border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer;
}
.exp + .exp { border-top: 1px solid var(--line); }
.exp:hover { background: var(--surface-2); }
.exp .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 18px; }
.exp .desc { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp .meta { color: var(--muted); font-size: 13px; }
.exp .amt { text-align: right; }
.exp .amt .main { font-weight: 700; }
.exp .amt .orig { color: var(--muted); font-size: 13px; }
.exp .amt .bad { color: var(--warn); font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 40px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* dialog / forms */
dialog {
  border: 0; padding: 0; border-radius: 18px; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(0,0,0,.45); }
@media (max-width: 560px) {
  dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
#modalForm { padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amount-row { display: grid; grid-template-columns: 1fr 130px; gap: 8px; }
.amount-row input { font-size: 24px; font-weight: 700; padding: 10px 12px; }
.preview { font-size: 13px; color: var(--muted); min-height: 18px; margin: -6px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 11px; cursor: pointer; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
details.more { margin: 4px 0 12px; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
details.more[open] summary { margin-bottom: 10px; }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 18px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.radio-row { display: grid; gap: 8px; }
.radio-row label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-row small { display: block; color: var(--muted); }

/* login */
.login { max-width: 360px; margin: 12vh auto 0; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: .2s; z-index: 50; font-weight: 600; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loading { color: var(--muted); padding: 30px 0; text-align: center; }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple td { padding: 6px 0; border-top: 1px solid var(--line); }
table.simple td:last-child, table.simple td.r { text-align: right; }
table.simple tr:first-child td { border-top: 0; }

.app-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 8px; }

/* ---------- v2: planner ---------- */
.mini-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-stats span { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 15px; }
.mini-stats small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mini-stats .neg, .neg-text { color: var(--danger); }

.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; position: sticky; top: calc(57px + env(safe-area-inset-top)); z-index: 3; }
.tabs a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 650; font-size: 14px; }
.tabs a[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

details.menu { position: relative; }
details.menu summary { list-style: none; font-size: 18px; line-height: 1; padding: 6px 12px; }
details.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); min-width: 220px; padding: 6px; display: grid; }
.menu-list > * { text-align: left; padding: 10px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--text); text-decoration: none; cursor: pointer; font-weight: 600; }
.menu-list > *:hover { background: var(--surface-2); }

.day-head.today { color: var(--accent); }
.day-head b { color: var(--text); }
.item-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item-list.flat { border: 0; background: transparent; }
.item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start; width: 100%; text-align: left; border: 0; background: transparent; padding: 11px 14px; cursor: pointer; }
.item + .item, .item + .add-here, .add-here + .item { border-top: 1px solid var(--line); }
.item:hover { background: var(--surface-2); }
.item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 18px; }
.item .body { display: grid; gap: 1px; min-width: 0; }
.item .when { font-size: 13px; color: var(--accent); font-weight: 650; }
.item .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .amt { text-align: right; }
.item .amt .main { font-weight: 700; }
.item .amt .orig, .item .amt .paid { font-size: 12px; color: var(--muted); }
.item .amt .paid { color: var(--accent); font-weight: 650; }
.item.slim { grid-template-columns: 24px 1fr; padding: 7px 14px; font-size: 13px; color: var(--muted); align-items: center; background: var(--surface-2); }
.item.slim .ico { width: 24px; height: 24px; font-size: 14px; background: transparent; }
.add-here { display: block; width: 100%; border: 0; background: transparent; color: var(--accent); font-weight: 600; padding: 9px 14px; text-align: left; cursor: pointer; font-size: 14px; }
.add-here:hover { background: var(--surface-2); }
.planned-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.planned-row:first-child { border-top: 0; }
.muted { color: var(--muted); }

/* calendar */
.cal { padding: 12px; }
.cal + .cal { margin-top: 14px; }
.cal-title { margin: 2px 4px 10px; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; padding-bottom: 4px; text-transform: uppercase; }
.cal-cell { min-height: 76px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 3px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; cursor: pointer; overflow: hidden; color: var(--text); }
.cal-cell.blank { border: 0; background: transparent; cursor: default; }
.cal-cell.in-trip { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cal-cell.today { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-cell:hover { filter: brightness(.97); }
.cal-num { font-size: 12px; font-weight: 700; }
.cal-chip { display: flex; gap: 2px; font-size: 10.5px; line-height: 1.25; background: var(--surface); border-radius: 4px; padding: 1px 3px; overflow: hidden; white-space: nowrap; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-chip.stay { opacity: .7; }
.cal-more { font-size: 10px; color: var(--muted); }
.cal-spend { margin-top: auto; font-size: 10px; color: var(--muted); font-weight: 650; }
@media (min-width: 700px) { .cal-cell { min-height: 96px; padding: 5px; } .cal-chip { font-size: 12px; } }

/* map */
.map { height: min(68vh, 620px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; z-index: 0; }
.map-filter { margin-bottom: 10px; }
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.pin span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 700 13px/1 system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pop { font: 13px/1.45 system-ui, sans-serif; }
.map-note { position: absolute; z-index: 500; left: 50%; top: 12px; transform: translateX(-50%); background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); } }
.leaflet-container a { color: var(--accent); }

/* item form */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.grid-2.when { grid-template-columns: 1.3fr 1fr; }
.loc-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.loc-picked { font-size: 13px; color: var(--accent); margin-top: 4px; min-height: 0; }
.loc-results { display: grid; gap: 4px; margin-top: 6px; }
.loc-opt { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: grid; }
.loc-opt:hover { border-color: var(--accent); }
.loc-opt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0 0 0 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.mini-stats span { font-size: 14px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stats small { font-size: 10px; }
@media (max-width: 520px) {
  .cal-chip { justify-content: center; padding: 1px 0; }
  .cal-chip span { display: none; }
  .cal-grid { gap: 2px; }
  .cal-cell { min-height: 64px; }
}
@media (max-width: 520px) { .mini-stats { grid-template-columns: 1fr 1fr; } .mini-stats span { font-size: 15px; } }

/* ---------- searchable currency picker ---------- */
.cs { position: relative; display: block; min-width: 0; }
.cs.cs-compact { display: inline-block; }
.cs-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; }
.cs-btn {
  width: 100%; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 28px 10px 12px; min-height: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.cs-btn span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 14px; }
.cs-btn:focus-visible, .cs-btn[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-compact .cs-btn { background-color: var(--surface); border-radius: 999px; padding: 6px 28px 6px 12px; min-height: 0; width: auto; }
.cs-panel {
  position: fixed; z-index: 1000; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden;
}
.cs-search { border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 12px; outline: none; font-size: 16px; }
.cs-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.cs-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px 4px; }
.cs-opt { display: flex; gap: 8px; align-items: baseline; padding: 8px; border-radius: 8px; cursor: pointer; }
.cs-opt b { min-width: 38px; }
.cs-opt span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-opt.active { background: var(--surface-2); }
.cs-opt.selected b { color: var(--accent); }
.cs-empty { padding: 12px; color: var(--muted); font-size: 14px; }
.field .cs-panel input.cs-search, .cs-panel input.cs-search {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface);
  padding: 12px; font-size: 16px; font-weight: 400; box-shadow: none;
}

/* ---------- multi-flight legs ---------- */
.leg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin-bottom: 10px; background: var(--bg); }
.leg .field input, .leg .cs-btn { background: var(--surface); }
.leg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.leg-head .icon-btn { padding: 4px 8px; }
.add-leg { width: 100%; border-style: dashed; color: var(--accent); }
[hidden] { display: none !important; }

/* ---------- v3: auth pages ---------- */
.auth-wrap { max-width: 420px; margin: 6vh auto 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin: 0 4px 16px; }
.auth-brand img { border-radius: 14px; box-shadow: var(--shadow); }
.auth-brand b { display: block; font-size: 20px; letter-spacing: -.01em; }
.auth-brand span { color: var(--muted); font-size: 14px; }
.auth-card { padding: 22px; }
.auth-card h1 { font-size: 22px; margin: 0 0 4px; }
.auth-card .field { margin-bottom: 0; }
.auth-card .help { display: block; margin-top: 4px; }
.btn.big { width: 100%; padding: 12px 16px; font-size: 16px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.auth-links a { font-weight: 600; text-decoration: none; }
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.google-slot:empty { display: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ts-slot { display: flex; justify-content: center; min-height: 65px; }
.ts-slot:empty { display: none; }
.pw-row { position: relative; }
.pw-row input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--muted); border-radius: 7px; padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.alert { border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.alert.error { background: #b91c1c; color: #fff; }
.alert.ok { background: #0f766e; color: #fff; }
.alert-slot:empty { display: none; }
code { font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* account + admin */
.account-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.user-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.field input[type="radio"], .field input[type="checkbox"] { width: auto; padding: 0; margin-top: 3px; flex: none; box-shadow: none; }

.temp-pw { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px dashed var(--accent); border-radius: 12px; padding: 12px 14px; margin: 6px 0 10px; background: var(--accent-soft); }
.temp-pw code { font-size: 18px; font-weight: 700; background: none; padding: 0; letter-spacing: .02em; word-break: break-all; }

.user-email b, .who b { word-break: break-all; }
