:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --sidebar: #f5f5f6;
  --panel: #ffffff;
  --hover: #f4f4f5;
  --active: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --accent: #2357d9;
  --accent-soft: #eef3fe;
  --accent-text: #ffffff;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --red: #c42b1c;
  --red-soft: #fef2f2;
  --violet: #6d28d9;
  --violet-soft: #f5f3ff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.18);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1e;
    --bg-soft: #202023;
    --sidebar: #232326;
    --panel: #1c1c1e;
    --hover: #2a2a2e;
    --active: #333338;
    --border: #2f2f33;
    --border-strong: #3f3f45;
    --text: #f4f4f5;
    --text-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #71717a;
    --accent: #5b8cff;
    --accent-soft: #1f2a44;
    --green: #4ade80;
    --green-soft: #15291d;
    --amber: #fbbf24;
    --amber-soft: #2e2510;
    --red: #f87171;
    --red-soft: #321a1a;
    --violet: #a78bfa;
    --violet-soft: #251f3a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
    color-scheme: dark;}
}
:root[data-theme="dark"] {
  --bg: #1c1c1e;
  --bg-soft: #202023;
  --sidebar: #232326;
  --panel: #1c1c1e;
  --hover: #2a2a2e;
  --active: #333338;
  --border: #2f2f33;
  --border-strong: #3f3f45;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #5b8cff;
  --accent-soft: #1f2a44;
  --green: #4ade80;
  --green-soft: #15291d;
  --amber: #fbbf24;
  --amber-soft: #2e2510;
  --red: #f87171;
  --red-soft: #321a1a;
  --violet: #a78bfa;
  --violet-soft: #251f3a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  color-scheme: dark;}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font: 13px/1.45 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 216px 1fr; height: 100vh; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 10px 10px; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 16px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: -.02em;
}
.brand-name { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px;
  color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--hover); }
.nav a.active { background: var(--active); color: var(--text); }
.nav svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.nav a.active svg { color: var(--text); }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 10px 6px 0; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600;
}
.avatar.other { background: var(--violet-soft); color: var(--violet); }
.avatar.sys { background: var(--hover); color: var(--muted); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.topbar h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.topbar .crumb { color: var(--muted); font-weight: 500; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.content { flex: 1; overflow: auto; padding: 20px 24px 40px; }
.content.flush { padding: 0; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background .1s, border-color .1s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.icon { padding: 0; width: 30px; justify-content: center; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; height: 30px; }
.seg button { border: 0; background: var(--panel); padding: 0 11px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--active); color: var(--text); }

.input, select.input, textarea.input {
  height: 30px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--panel); outline: none; width: 100%; min-width: 0;
}
textarea.input { height: auto; padding: 7px 9px; resize: vertical; min-height: 64px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.num { text-align: right; }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.search { position: relative; }
.search svg { position: absolute; left: 9px; top: 8px; width: 14px; height: 14px; color: var(--faint); }
.search .input { padding-left: 29px; width: 240px; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.check input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px; border-radius: 10px;
  font-size: 11px; font-weight: 600; background: var(--hover); color: var(--text-2); white-space: nowrap;
}
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.count { background: var(--red); color: #fff; min-width: 19px; justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.blue { background: var(--accent); }

/* ---------- cards & stats ---------- */
.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.two { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 13px; font-weight: 600; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.card-body { padding: 14px 16px; }
.stat { padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat .value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.section-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 22px 0 8px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 7px; border: 1px solid; font-size: 12.5px; }
.alert + .alert { margin-top: 6px; }
.alert.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--text); }
.alert.error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--text); }
.alert.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--text); }
.alert .dot { margin-top: 5px; flex: none; }
.alert.warn .dot { background: var(--amber); } .alert.error .dot { background: var(--red); } .alert.info .dot { background: var(--accent); }
.alert a { margin-left: auto; white-space: nowrap; font-weight: 500; }

.list-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .meta { color: var(--muted); font-size: 11.5px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; background: var(--panel); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.t th {
  position: sticky; top: 0; z-index: 1; background: var(--bg-soft); text-align: left; font-weight: 600;
  color: var(--muted); font-size: 11.5px; padding: 7px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap; user-select: none;
}
table.t th.sortable { cursor: pointer; }
table.t th.sortable:hover { color: var(--text); }
table.t th .arrow { font-size: 9px; margin-left: 3px; }
table.t td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: var(--hover); }
table.t tbody tr.dim td { color: var(--faint); }
table.t tfoot td { font-weight: 600; background: var(--bg-soft); border-top: 1px solid var(--border); padding: 7px 10px; }
table.t .title-cell { max-width: 300px; min-width: 160px; }
table.t td { white-space: nowrap; }
table.t td .diff { white-space: normal; }
.table-foot { display: flex; align-items: center; gap: 10px; padding: 8px 2px; color: var(--muted); font-size: 12px; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.28); display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 20px 20px; z-index: 50; animation: fade .12s ease-out;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } }
.modal {
  background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column; animation: pop .14s ease-out; border: 1px solid var(--border);
}
.modal.wide { width: 860px; }
.modal.xwide { width: 1100px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); align-items: center; }
.modal-foot .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tabs button {
  border: 0; background: none; padding: 9px 10px; cursor: pointer; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.tabs.page { padding: 0; margin-bottom: 16px; }

.form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 12px; }
.field { display: flex; flex-direction: column; gap: 5px; grid-column: span 3; min-width: 0; }
.field.s1 { grid-column: span 1; } .field.s2 { grid-column: span 2; } .field.s3 { grid-column: span 3; } .field.s4 { grid-column: span 4; } .field.s6 { grid-column: span 6; }
.field > label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.form-section { grid-column: span 6; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 0; font-size: 12.5px; }
.kv > div { padding: 5px 0; border-bottom: 1px solid var(--border); }
.kv > div:nth-child(odd) { color: var(--text-2); }
.kv > div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.kv .total { font-weight: 600; color: var(--text) !important; border-bottom: 0; border-top: 1.5px solid var(--text); }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 92px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg);
  max-width: 420px; font-size: 12.5px; animation: pop .15s ease-out;
}
.toast.error { background: var(--red); color: #fff; }
.toast.warn { background: var(--amber); color: #fff; }

/* ---------- login ---------- */
.login { height: 100vh; display: grid; place-items: center; background: var(--bg-soft); }
.login-box { width: 340px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); }
.login-box h1 { font-size: 17px; margin: 14px 0 2px; }
.login-box p { margin: 0 0 20px; color: var(--muted); }
.login-box .field { margin-bottom: 12px; }
.login-box .btn { width: 100%; justify-content: center; height: 34px; margin-top: 6px; }
.login-err { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 10px; }

/* ---------- misc ---------- */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 26px; text-align: center; color: var(--muted);
  cursor: pointer; transition: border-color .1s, background .1s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone strong { color: var(--text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.diff { font-size: 11.5px; color: var(--muted); }
.diff b { color: var(--text-2); font-weight: 500; }
.diff .old { text-decoration: line-through; color: var(--faint); }
.log-day { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.log-item { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.log-item:last-child { border-bottom: 0; }
.log-item.unread { background: var(--violet-soft); }
.log-item .time { color: var(--muted); font-size: 12px; width: 42px; flex: none; padding-top: 3px; font-variant-numeric: tabular-nums; }
.log-item .body { flex: 1; min-width: 0; }
.log-item .who { font-weight: 600; }
.log-changes { margin-top: 6px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.log-changes table { width: 100%; border-collapse: collapse; font-size: 12px; }
.log-changes td { padding: 4px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.log-changes tr:last-child td { border-bottom: 0; }
.log-changes td:first-child { color: var(--muted); width: 34%; }
.waterfall { display: grid; grid-template-columns: 1fr auto; font-size: 12.5px; }
.waterfall > div { padding: 5px 0; border-bottom: 1px solid var(--border); }
.waterfall > div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.waterfall .sum { font-weight: 600; border-top: 1.5px solid var(--text); border-bottom: 0; }
.status-line { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.inline-edit { display: flex; gap: 6px; align-items: center; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; display: flex; justify-content: center; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }

/* ---------- landing page ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr; } }
.hero {
  position: relative; border-radius: 14px; overflow: hidden; min-height: 300px; color: #fff;
  box-shadow: var(--shadow); isolation: isolate;
}
.hero svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero .hello { padding: 22px 24px 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
  text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.hero .today { padding: 6px 24px 0; font-size: 13px; opacity: .9; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero .chips { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.hero .chip {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: rgba(10, 14, 30, .42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14); color: #fff;
}
.hero .chip b { font-weight: 650; }
.hero .chip .r { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero.light-sky .hello, .hero.light-sky .today { color: #10203a; text-shadow: 0 1px 10px rgba(255,255,255,.5); }

.chart-card { padding: 18px 20px 12px; display: flex; flex-direction: column; min-height: 300px; }
.chart-card .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.chart-card h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.chart-card .sub { color: var(--muted); font-size: 12.5px; }
.chart-card .head .ctrl { margin-left: auto; display: flex; gap: 8px; }
.chart-wrap { position: relative; flex: 1; min-height: 210px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-wrap .axis text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-wrap .grid line { stroke: var(--border); }
.chart-wrap .avg { stroke: var(--faint); stroke-dasharray: 5 5; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 150px;
  transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; z-index: 2;
}
.chart-tip .t { font-weight: 600; margin-bottom: 3px; }
.chart-tip .row { display: flex; gap: 10px; justify-content: space-between; color: var(--text-2); }
.chart-tip .row b { color: var(--text); font-variant-numeric: tabular-nums; }
.viz { --series-1: #2a78d6; --series-1-fill: rgba(42,120,214,.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .viz { --series-1: #3987e5; --series-1-fill: rgba(57,135,229,.20); } }
:root[data-theme="dark"] .viz { --series-1: #3987e5; --series-1-fill: rgba(57,135,229,.20); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { padding: 14px 16px; }
.tile .tl { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tile .tl .range { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); margin-left: auto; }
.tile .big { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.tile .kv2 { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 12.5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.tile .kv2 > :nth-child(odd) { color: var(--muted); }
.tile .kv2 > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }

.fact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.fact .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.fact .ico svg { width: 18px; height: 18px; }
.fact .ft { font-size: 13.5px; line-height: 1.45; transition: opacity .25s; }
.fact .lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.fact .nav { margin-left: auto; }

.theme-btn svg { width: 15px; height: 15px; }
.breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1200px) { .breakdown { grid-template-columns: 1fr 1fr; } }
.breakdown .card-body { padding: 12px 16px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.bar-row .bar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* ---------- motivation ---------- */
.mot-hero { position: relative; border-radius: 14px; overflow: hidden; min-height: 170px; color: #fff; padding: 22px 26px;
  background: linear-gradient(120deg, #0d1b3a 0%, #1f3a66 55%, #c4648a 100%); box-shadow: var(--shadow); }
.mot-hero h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.mot-hero p { margin: 6px 0 0; opacity: .85; max-width: 560px; }
.mot-hero .pts { margin-top: 16px; display: inline-flex; gap: 10px; align-items: baseline; padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.mot-hero .pts b { font-size: 20px; font-variant-numeric: tabular-nums; }
.mot-hero svg.plane { position: absolute; right: 26px; top: 18px; width: 230px; opacity: .9; }
.gallery { position: relative; border-radius: 14px; overflow: hidden; height: 300px; background: var(--hover); box-shadow: var(--shadow); }
.gallery a.slide { position: absolute; inset: 0; color: #fff; opacity: 0; transition: opacity .8s; display: block; }
.gallery a.slide.on { opacity: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.gallery .cap .src { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.gallery .cap .tt { font-size: 17px; font-weight: 650; line-height: 1.3; margin-top: 3px; }
.gallery .dots { position: absolute; top: 12px; right: 14px; display: flex; gap: 5px; }
.gallery .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.gallery .dots i.on { background: #fff; }
.cabins { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cabin { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.cabin .art { height: 92px; position: relative; }
.cabin .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cabin .body { padding: 12px 14px 14px; }
.cabin .al { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cabin .pr { font-weight: 650; font-size: 14.5px; margin: 2px 0 4px; }
.cabin .hl { font-size: 12.5px; color: var(--text-2); }
.cabin .prog { margin-top: 10px; }
.deal { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: inherit; }
.deal:last-child { border-bottom: 0; }
.deal:hover { background: var(--hover); }
.deal .th { width: 96px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--hover); }
.deal .tt { font-weight: 600; line-height: 1.35; }
.deal .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.deal .sm { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.joke { font-size: 15px; font-weight: 500; text-align: center; padding: 18px; }

/* ---------- background emblem: helmeted head with guilloche rosette (original artwork) ---------- */
.main { position: relative; isolation: isolate; }
.main::after {
  content: ""; position: absolute; right: -60px; top: 50%; width: 680px; height: 680px; transform: translateY(-46%);
  z-index: -1; pointer-events: none; opacity: var(--emblem-opacity, .12);
  background: no-repeat center / contain var(--emblem, url("/static/centurion.svg"));
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .main::after { opacity: var(--emblem-opacity-dark, .17); } }
:root[data-theme="dark"] .main::after { opacity: var(--emblem-opacity-dark, .17); }
.content { background: transparent; }

/* ---------- product thumbnails ---------- */
.thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--border); display: block; }
.thumb.ph { display: grid; place-items: center; color: var(--faint); background: var(--hover); }
.thumb.ph svg { width: 16px; height: 16px; }
.prod-head { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.prod-head img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--border); }
.prod-head .mk { margin-left: auto; text-align: right; font-size: 12.5px; }
.prod-head .mk b { font-size: 16px; }

/* ---------- collapsible nav group (admin view of Linus' area) ---------- */
.nav-group { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 8px 4px; border: 0; background: none;
  color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; text-align: left; }
.nav-group .chev { display: inline-block; transition: transform .15s; font-size: 13px; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-sub a { padding-left: 14px; }

/* ---------- cabin & lounge showcase ---------- */
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.sc-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); cursor: pointer;
  transition: transform .15s, box-shadow .15s; text-align: left; padding: 0; color: inherit; }
.sc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sc-card .ph { height: 150px; position: relative; background: var(--hover); overflow: hidden; }
.sc-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-card .ph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-card .ph .more { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
  padding: 3px 8px; border-radius: 10px; backdrop-filter: blur(6px); }
.sc-card .body { padding: 12px 14px 14px; }
.sc-card .al { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sc-card .pr { font-weight: 650; font-size: 14.5px; margin: 2px 0 4px; }
.sc-card .hl { font-size: 12.5px; color: var(--text-2); }
.slideshow { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
@media (max-width: 1000px) { .slideshow { grid-template-columns: 1fr; } }
.stage { position: relative; background: #0b0b0d; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; }
.stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage .nav-b { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.85); color: #111; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.stage .nav-b.l { left: 10px; } .stage .nav-b.r { right: 10px; }
.stage .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 10px; color: #fff; font-size: 12.5px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.stage .cap .cr { opacity: .75; font-size: 11px; margin-top: 2px; }
.stage .cap a { color: #cfe0ff; }
.strip { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.strip img { width: 76px; height: 50px; object-fit: cover; border-radius: 6px; opacity: .55; cursor: pointer; border: 2px solid transparent; flex: none; }
.strip img.on { opacity: 1; border-color: var(--accent); }
.art-list a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); color: inherit; }
.art-list a:last-child { border-bottom: 0; }
.art-list img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--hover); }
.art-list .t { font-weight: 600; font-size: 12.5px; line-height: 1.3; }
.art-list .m { font-size: 11px; color: var(--muted); }

/* Membership-Rewards-Punktestand (Motivation) */
.pts-card { margin-top: 16px; }
.pts-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.pts-big { font-size: 44px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0;
  background: linear-gradient(90deg, var(--accent), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pts-side { display: flex; gap: 22px; flex-wrap: wrap; }
.pts-side > div { display: flex; flex-direction: column; gap: 2px; }
.pts-side b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pts-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--hover); margin: 16px 0 10px; }
.pts-bar i { display: block; height: 100%; min-width: 3px; }
.pts-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.pts-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pts-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pts-legend b { font-variant-numeric: tabular-nums; }
.pts-ms { margin-top: 14px; }
.pts-ms .bar { height: 6px; border-radius: 3px; background: var(--hover); margin-top: 6px; overflow: hidden; }
.pts-ms .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--violet)); border-radius: 3px; }
.pts-tl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.pts-tl > div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pts-tl b { font-variant-numeric: tabular-nums; color: var(--green); }

/* Monatsabschluss */
.closing .card-head { gap: 12px; }
.cl-progress { flex: 0 0 140px; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.cl-progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .4s; }
.closing.all-done .card-head h3::after { content: " ✓"; color: var(--green); }
.cl-steps { list-style: none; margin: 0; padding: 0; counter-reset: cl; }
.cl-steps > li { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.cl-steps > li:first-child { border-top: 0; padding-top: 0; }
.cl-steps > li.wait { opacity: .6; }
.cl-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-top: 1px; }
.cl-mark svg { width: 14px; height: 14px; stroke-width: 2.6; }
.cl-mark.done { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.cl-mark.todo { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.cl-mark.wait { border: 2px solid var(--border); }
.cl-title { font-weight: 600; }
.cl-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cl-fix { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg-soft); }
.cl-fix-h { font-weight: 600; font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.cl-dev { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px dashed var(--border); }
.cl-dev:first-of-type { border-top: 0; }
.cl-dev-num { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cl-miss { display: grid; grid-template-columns: 80px 170px 1fr auto auto; gap: 10px; align-items: center; padding: 4px 0; }
@media (max-width: 760px) {
  .cl-steps > li { grid-template-columns: 26px 1fr; }
  .cl-act { grid-column: 2; justify-content: flex-start; }
  .cl-miss { grid-template-columns: 1fr auto; }
  .cl-dev { flex-direction: column; }
  .cl-dev-num { align-items: flex-start; text-align: left; }
}

/* EK: Einkaufskarten */
.ek-tabs button svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.ek-inbox-hint { margin-bottom: 14px; }
.pcards { display: flex; flex-direction: column; gap: 10px; }
.pcard { display: grid; grid-template-columns: 88px minmax(0, 2.3fr) minmax(130px, .8fr) minmax(150px, .9fr) minmax(170px, 1fr); gap: 18px;
  align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.pcard.dim { opacity: .55; }
.pc-img { width: 88px; height: 88px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.pc-img img { width: 100%; height: 100%; object-fit: contain; }
.pc-img .ph { color: var(--faint); } .pc-img .ph svg { width: 28px; height: 28px; }
.pc-title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-ids { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.pc-ids .sep { margin: 0 4px; color: var(--faint); }
.pc-tags { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 8px; }
.pc-q, .pc-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.7; }
.pc-q span, .pc-kv span { color: var(--muted); }
.pc-q b, .pc-kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-bar { height: 5px; border-radius: 3px; background: var(--hover); margin-top: 6px; overflow: hidden; }
.pc-bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.pc-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-res { border-left: 1px solid var(--border); padding-left: 16px; }
.mk-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mk-tag.shop { font-weight: 500; color: var(--violet); }
button.copy { border: 0; background: none; padding: 2px; margin: 0 2px; color: var(--faint); cursor: pointer; display: inline-grid; place-items: center; border-radius: 4px; vertical-align: middle; }
button.copy:hover { color: var(--accent); background: var(--accent-soft); }
button.copy svg { width: 13px; height: 13px; }
@media (max-width: 1100px) {
  .pcard { grid-template-columns: 72px minmax(0, 1fr) minmax(140px, .7fr); }
  .pc-img { width: 72px; height: 72px; }
  .pc-price { grid-column: 2; } .pc-res { grid-column: 3; border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .pcard { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 12px; }
  .pc-img { width: 64px; height: 64px; }
  .pc-qty, .pc-price, .pc-res { grid-column: 1 / -1; }
}

/* EK: Zu erfassen */
.mk-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
  cursor: pointer; font: inherit; color: inherit; text-align: left; min-width: 200px; }
.mk-chip.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mk-chip .fl { font-size: 22px; line-height: 1; }
.mk-chip > span:nth-child(2) { display: flex; flex-direction: column; }
.mk-chip .amt { margin-left: auto; font-variant-numeric: tabular-nums; }
.inbox-src { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 10px; }
.row-act { display: inline-flex; gap: 2px; }
.row-act .btn svg { width: 15px; height: 15px; }
.isel { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

.ab-steps { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; font-size: 13px; }
.ab-steps li { margin-bottom: 4px; }

/* Zugang: Login-Alternativen, Einrichtung */
.login-or { text-align: center; color: var(--faint); font-size: 12px; margin: 12px 0 8px; }
.login-quick .btn { width: 100%; justify-content: center; }
.login-quick .btn svg { width: 16px; height: 16px; }
.setup h1 { margin-top: 6px; }
.setup .btn { width: 100%; justify-content: center; margin-top: 8px; }
.setup .btn svg { width: 16px; height: 16px; }
.setup-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.setup-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.setup-dots i.on { background: var(--accent); }
.setup-list { text-align: left; font-size: 13px; line-height: 1.6; padding-left: 18px; margin: 14px 0; }

/* To-do-Blase */
.todo-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 56px; height: 56px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: #e5484d; box-shadow: 0 8px 24px rgba(229,72,77,.45); }
.todo-bubble svg { width: 24px; height: 24px; }
.todo-bubble .todo-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #fff; color: #e5484d; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.todo-bubble.blink { animation: todo-blink 1.6s ease-in-out infinite; }
.todo-bubble.blink::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #e5484d; animation: todo-ring 1.6s ease-out infinite; }
.todo-bubble.calm { background: var(--green); box-shadow: 0 8px 24px rgba(21,128,61,.35); }
.todo-bubble.calm .todo-count { color: var(--green); }
@keyframes todo-blink { 0%, 100% { background: #e5484d; } 50% { background: #b4232a; } }
@keyframes todo-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .todo-bubble.blink, .todo-bubble.blink::before { animation: none; } }
.todo-panel { position: fixed; right: 22px; bottom: 90px; z-index: 95; width: min(400px, calc(100vw - 32px)); max-height: min(72vh, 640px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.todo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 8px; }
.todo-progress { position: relative; height: 6px; margin: 4px 16px 10px; border-radius: 3px; background: var(--hover); }
.todo-progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e5484d, var(--green)); transition: width .4s; }
.todo-progress span { position: absolute; top: -9px; transform: translateX(-50%) rotate(-8deg); color: var(--accent); }
.todo-progress span svg { width: 18px; height: 18px; }
.todo-list { overflow: auto; padding: 0 8px 8px; }
.todo-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; }
.todo-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; padding: 8px; border-radius: 10px; }
.todo-item:hover { background: var(--hover); }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: none; display: grid; place-items: center;
  color: #fff; cursor: pointer; padding: 0; margin-top: 1px; }
.todo-check:disabled { cursor: default; }
.todo-item.done .todo-check { background: var(--green); border-color: var(--green); }
.todo-check svg { width: 13px; height: 13px; stroke-width: 3; }
.todo-title { font-weight: 600; font-size: 13.5px; }
.todo-go { font-size: 20px; line-height: 1; color: var(--muted); padding: 0 4px; }
.todo-foot { border-top: 1px solid var(--border); padding: 10px 16px; font-size: 13px; }

/* Rundgang */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(8,12,24,.66); transition: all .35s ease; pointer-events: none;
  outline: 2px solid rgba(255,255,255,.85); outline-offset: 2px; }
.tour-hole[style*="opacity:0"] { box-shadow: 0 0 0 9999px rgba(8,12,24,.66); }
.tour-card { position: fixed; width: 380px; background: var(--panel); color: var(--text); border-radius: 16px; padding: 18px 20px 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45); transition: left .35s ease, top .35s ease; animation: tour-in .3s ease; }
.tour-card.center { width: min(460px, calc(100vw - 32px)); }
.tour-card h3 { margin: 4px 0 8px; font-size: 18px; letter-spacing: -.01em; }
.tour-step { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tour-text { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.tour-text ol { padding-left: 18px; margin: 8px 0; }
.tour-track { position: relative; height: 4px; border-radius: 2px; background: var(--hover); margin: 16px 0 14px; }
.tour-track i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width .35s; }
.tour-track span { position: absolute; top: -9px; transform: translateX(-50%) rotate(-8deg); color: var(--accent); transition: left .35s; }
.tour-track span svg { width: 18px; height: 18px; }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-actions a { font-size: 12.5px; color: var(--muted); }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } }
.tour-card.center { animation: none; }
.login-forgot { display: block; text-align: center; margin-top: 12px; }
.tour.dim { background: rgba(8,12,24,.66); }
.tour-card.loading { opacity: .55; }
.tour-card .tour-text ol { margin: 6px 0 10px; }

/* Einkauf-Dialog: Amazon vs. anderer Shop */
.form[data-mode="shop"] .mode-amazon, .form[data-mode="shop"] .mode-amazon-t { display: none; }
.form[data-mode="amazon"] .mode-shop, .form[data-mode="amazon"] .mode-shop-t { display: none; }
#pmode { display: inline-flex; }
.form-more { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.form-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.form-more[open] > summary { margin-bottom: 10px; }

/* Einkauf schnell erfassen */
.qp-search { display: flex; gap: 8px; }
.qp-search .search { flex: 1; }
.qp-search .search.big .input { height: 42px; font-size: 15px; }
.qp-hits { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.qp-hit { display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.qp-hit:hover { border-color: var(--accent); }
.qp-hit img, .qp-hit .ph, .qp-prod img, .qp-prod .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: contain; background: #fff;
  border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--faint); }
.qp-hit > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qp-prod { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; background: var(--bg-soft); }
.qp-prod img, .qp-prod .ph { width: 72px; height: 72px; }
.qp-prod-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qp-prod-t .input { font-weight: 600; }
.money-toggle { position: relative; display: flex; }
.money-toggle .input { flex: 1; padding-right: 64px; }
.money-toggle .input { height: 40px; }
.mt-switch { position: absolute; right: 3px; top: 3px; bottom: 3px; display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; width: 54px; }
.mt-switch button { flex: 1; border: 0; font-size: 10px; line-height: 1; font-weight: 600; cursor: pointer; background: var(--hover); color: var(--muted); padding: 0; }
.mt-switch button.on { background: var(--green); color: #fff; }
.qp-pay { border-top: 1px solid var(--border); padding-top: 10px; }
.qp-pay-x { margin-top: 10px; }
.asin-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--faint); }
.asin-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
#softrefresh.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Eingangsrechnungen abhaken */
.rcpt .card-head { flex-wrap: wrap; gap: 10px; }
.rcpt .seg { flex-wrap: wrap; height: auto; }
.rcpt .seg button { height: 30px; }
.rcpt-bar { flex: 0 0 120px; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.rcpt-bar i { display: block; height: 100%; background: var(--green); }
.rcpt-list { padding: 4px 8px 8px; }
.rcpt-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.rcpt-item:hover { background: var(--hover); }
.rcpt-item input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--green); cursor: pointer; }
.rcpt-item.done .rcpt-items { text-decoration: line-through; color: var(--muted); }
.rcpt-main { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.rcpt-items { flex-basis: 100%; font-size: 13px; }
