/* ============================================================
   Thurform Time – Stylesheet (Mobile First, Light/Dark)
   ============================================================ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6eb;
  --text: #16191f;
  --muted: #667085;
  --primary: #0f766e;
  --primary-hover: #0b5f58;
  --primary-soft: #e6f4f2;
  --primary-text: #ffffff;
  --danger: #c2410c;
  --danger-soft: #fdeee6;
  --success: #15803d;
  --success-soft: #e8f6ed;
  --warning: #a16207;
  --warning-soft: #fdf6e3;
  --info-soft: #eaf1fb;
  --info: #1d4ed8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1f242c; --border: #2a3039;
  --text: #e8eaee; --muted: #98a2b3; --primary: #2dd4bf; --primary-hover: #5eead4; --primary-soft: #11302d;
  --primary-text: #062a26; --danger: #fb923c; --danger-soft: #3a2116; --success: #4ade80; --success-soft: #13301e;
  --warning: #facc15; --warning-soft: #33290d; --info: #93c5fd; --info-soft: #172338;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1f242c; --border: #2a3039;
    --text: #e8eaee; --muted: #98a2b3; --primary: #2dd4bf; --primary-hover: #5eead4; --primary-soft: #11302d;
    --primary-text: #062a26; --danger: #fb923c; --danger-soft: #3a2116; --success: #4ade80; --success-soft: #13301e;
    --warning: #facc15; --warning-soft: #33290d; --info: #93c5fd; --info-soft: #172338;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }
.pre { white-space: pre-wrap; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Layout ---------- */
.main { padding: calc(56px + var(--safe-top) + 12px) 14px calc(var(--nav-h) + var(--safe-bottom) + 24px); max-width: 1240px; margin: 0 auto; }
.no-nav .main { padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px); }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: calc(56px + var(--safe-top)); padding: var(--safe-top) 12px 0;
  display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 1.05rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sm img { border-radius: 8px; display: block; }
.sidebar { display: none; }
.page-head { display: none; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; color: var(--muted); padding: 6px 0; min-height: 48px; justify-content: center; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav .icon { width: 24px; height: 24px; }
.bottom-nav .bn-add { justify-self: center; width: 52px; height: 52px; min-height: 0; border-radius: 50%; background: var(--primary); color: var(--primary-text); box-shadow: 0 4px 14px rgba(15, 118, 110, .35); }
.bottom-nav .bn-add .icon { width: 26px; height: 26px; }

/* Mobile: Seitentitel-Aktionen unter Topbar anzeigen */
@media (max-width: 959px) {
  .page-head { display: flex; justify-content: flex-end; margin-bottom: 10px; }
  .page-head > div:first-child { display: none; }
  .page-head:not(:has(.page-actions)) { display: none; }
  .page-actions .btn { padding: 8px 12px; font-size: .9rem; }
}

@media (min-width: 960px) {
  .topbar, .bottom-nav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 248px; padding: 20px 14px;
    background: var(--surface); border-right: 1px solid var(--border); z-index: 20;
  }
  .brand { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; color: var(--text); padding: 4px 8px 20px; }
  .brand img { border-radius: 9px; }
  .brand:hover { text-decoration: none; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
  .sidebar nav a.active { background: var(--primary-soft); color: var(--primary); }
  .sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
  .has-nav .main { margin-left: 248px; padding: 28px 32px 40px; }
  .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
  .page-head h1 { margin: 0; }
  .back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; margin-bottom: 4px; }
}

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.narrow { max-width: 720px; }
.card.empty { text-align: center; padding: 40px 20px; }
.empty-icon { width: 40px; height: 40px; color: var(--muted); margin-bottom: 10px; }
.onboarding { max-width: 640px; margin: 20px auto; }
.dash-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.dash-grid > * { min-width: 0; }
.dash-grid > .card { margin-bottom: 0; }
@media (min-width: 960px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .span-2 { grid-column: span 2; }
  .timer-card { grid-column: span 1; }
}
.two-col { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.two-col > * { min-width: 0; }
@media (min-width: 960px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; align-content: start; }
.dash-grid .kpis { margin-bottom: 0; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px; min-width: 0; }
.kpi-value .money { overflow-wrap: anywhere; white-space: normal; }
.kpi-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.kpi-value { font-size: 1.45rem; font-weight: 650; letter-spacing: -.02em; }
.kpi-value-sm { font-size: 1.05rem; display: flex; flex-direction: column; }
.kpi-link { color: inherit; }
.kpi-link:hover { text-decoration: none; border-color: var(--primary); }

/* ---------- Timer ---------- */
.timer-card { border-width: 1px; }
.timer-card[data-state="running"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timer-card[data-state="paused"] { border-color: var(--warning); }
.timer-head { display: flex; justify-content: space-between; align-items: baseline; }
.timer-display { display: flex; flex-direction: column; align-items: center; padding: 6px 0 10px; }
.timer-time { font-size: clamp(2.6rem, 14vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer-project { text-align: center; margin-bottom: 4px; }
.timer-desc { text-align: center; color: var(--muted); }
.timer-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 12px 0; }
.timer-edit summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: 6px 0; }
.timer-edit .form { margin-top: 8px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); display: inline-block; box-shadow: 0 0 0 4px var(--success-soft); }
.live-dot.paused { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.timer-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .9rem; }
.timer-pill.is-hidden { display: none; }
.timer-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.timer-pill[data-status="paused"] .dot { background: var(--warning); }
.timer-pill[data-status="stopped"] .dot { background: var(--danger); }
.timer-pill:hover { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); background: var(--danger); }
.btn-danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn-lg { min-height: 50px; padding: 12px 20px; font-size: 1rem; }
.btn-xl { min-height: 58px; font-size: 1.1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.link-btn { background: none; border: 0; padding: 8px 0; font: inherit; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-btn.danger { color: var(--danger); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .875rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"],
input[type="search"], input[type="tel"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px; /* verhindert Zoom in iOS Safari */
  -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667085' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type="date"], input[type="time"] { display: block; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; min-height: 32px; }
.check-lg { min-height: 46px; font-weight: 600; }
.field-error { color: var(--danger); font-size: .85rem; margin: 0; }
.grid-2, .grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.align-end { align-items: end; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fieldset legend { font-weight: 650; padding: 0 6px; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.inline-form input { flex: 1; }
.radio-cards { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio-cards legend { font-weight: 600; margin-bottom: 8px; }
.radio-card { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.meta-foot { margin-top: 14px; }
.logo-preview { display: flex; gap: 14px; align-items: center; }
.logo-preview img { max-height: 56px; max-width: 200px; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--border); }
textarea.code { font-family: var(--mono); font-size: 13px; }

/* ---------- Alerts & Badges ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid transparent; font-size: .95rem; }
.alert .check { margin-top: 8px; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.alert .check, .alert ul { color: var(--text); }
.dup-list { margin: 8px 0; padding-left: 18px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-billed { background: var(--success-soft); color: var(--success); }
.badge-open { background: var(--warning-soft); color: var(--warning); }
.badge-status-active { background: var(--success-soft); color: var(--success); }
.badge-status-planned { background: var(--info-soft); color: var(--info); }
.badge-status-paused { background: var(--warning-soft); color: var(--warning); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 600; margin-right: 4px; }
.offline-banner { position: fixed; z-index: 50; top: var(--safe-top); left: 0; right: 0; background: var(--danger); color: #fff; text-align: center; padding: 8px 12px; font-size: .9rem; font-weight: 600; }

/* ---------- Lists ---------- */
.entry-list { display: flex; flex-direction: column; }
.entry-day { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 14px 0 6px; border-bottom: 1px solid var(--border); }
.entry-day:first-child { padding-top: 0; }
.entry-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.entry-row:last-child { border-bottom: 0; }
.entry-row.is-billed .entry-main { opacity: .85; }
.entry-check { padding-top: 2px; }
.entry-main { flex: 1; min-width: 0; color: inherit; }
.entry-main:hover { text-decoration: none; }
.entry-main:hover strong { color: var(--primary); }
.entry-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-desc { font-size: .9rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.entry-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.entry-figures { text-align: right; white-space: nowrap; }
.entry-dur { font-weight: 650; }
.entry-amount { font-size: .85rem; color: var(--muted); }
.card-list { display: flex; flex-direction: column; gap: 10px; }
.list-card { display: flex; align-items: center; gap: 12px; justify-content: space-between; color: inherit; margin: 0; }
.list-card:hover { text-decoration: none; border-color: var(--primary); }
.list-card .grow { flex: 1; min-width: 0; }
.is-archived { opacity: .6; }
.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.simple-list li:last-child { border-bottom: 0; }
.simple-list a { display: flex; flex-direction: column; color: inherit; min-width: 0; }
.simple-list li > span { white-space: nowrap; flex: none; }
.simple-list a:hover strong { color: var(--primary); }
.simple-list a:hover { text-decoration: none; }
.menu-list { padding: 4px 0; }
.menu-list a { display: flex; gap: 12px; align-items: center; padding: 16px; color: var(--text); border-bottom: 1px solid var(--border); font-weight: 500; }
.menu-list a:last-child { border-bottom: 0; }
.center-form { margin: 14px 0; }
.toggle-line { text-align: right; font-size: .9rem; }
.cat-list { display: flex; flex-direction: column; gap: 8px; }
.cat-row { display: flex; gap: 6px; align-items: center; }
.cat-form { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.cat-form input[type="text"] { flex: 1; min-width: 140px; }
.w-sort { width: 80px !important; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- Charts ---------- */
.vbars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 150px; }
.vbar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.vbar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.vbar-fill { width: 100%; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 0; }
.vbar span { font-size: .7rem; color: var(--muted); }
.vbar.weekend span { opacity: .6; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-label { display: flex; gap: 4px; align-items: baseline; font-size: .9rem; margin-bottom: 4px; }
.hbar-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-label b { margin-left: auto; white-space: nowrap; }
.hbar-track, .progress { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.hbar-fill, .progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress { width: 100%; min-width: 80px; margin-top: 6px; }
.progress-lg { height: 10px; }
.progress.over > span { background: var(--danger); }
.mini-bar { display: block; height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 4px; max-width: 220px; }
.mini-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
.table tfoot th { color: var(--text); font-size: .92rem; text-transform: none; letter-spacing: 0; border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 12px; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; text-align: right; }
.dl dd.full { grid-column: span 2; }

/* ---------- Filters ---------- */
.filters { padding: 14px; }
.filter-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.filter-grid > .more-filters { grid-column: 1 / -1; }
@media (min-width: 960px) { .filter-grid { grid-template-columns: repeat(5, 1fr); } }
.more-filters summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: 4px 0 8px; }
.filter-actions { display: flex; gap: 8px; margin-top: 12px; }
.summary-strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.summary-strip > div { flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; display: flex; flex-direction: column; min-width: 110px; }
.summary-strip span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; position: sticky; top: calc(56px + var(--safe-top) + 6px); z-index: 10; }
@media (min-width: 960px) { .bulk-bar { top: 10px; } }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; }

/* ---------- Review / Auth ---------- */
.review-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 14px; }
@media (min-width: 640px) { .review-summary { grid-template-columns: repeat(4, 1fr); } }
.review-summary .big { font-size: 1.3rem; font-weight: 700; }
.auth-wrap { min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; padding: 28px 22px; }
.install-card { width: 100%; max-width: 640px; padding: 24px 20px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { border-radius: 14px; margin-bottom: 8px; }
.auth-brand h1 { font-size: 1.5rem; margin: 0; font-weight: 500; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; font-size: .92rem; }
.checklist li { padding: 3px 0; }
.checklist .ok { color: var(--success); }
.checklist .fail { color: var(--danger); }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 6px; }

/* ---------- Dialog ---------- */
.confirm-dialog { border: 0; border-radius: var(--radius); padding: 22px; max-width: 420px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.confirm-dialog::backdrop { background: rgba(10, 14, 20, .45); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

@media print {
  .sidebar, .topbar, .bottom-nav, .page-actions, .filters, .bulk-bar { display: none !important; }
  .has-nav .main { margin: 0; padding: 0; }
}
