/* ImmoPilot – Design-System (mobile-first, hell/dunkel) */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f6;
  --text: #0f1728;
  --text-2: #4b5768;
  --text-3: #7b8794;
  --border: #e3e8ef;
  --border-2: #cfd7e1;

  --accent: #0f766e;
  --accent-2: #4f46e5;
  --accent-soft: #e0f2f1;
  --accent-text: #0b5a54;
  --grad: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%);

  --ok: #15803d;      --ok-soft: #dcfce7;
  --warn: #b45309;    --warn-soft: #fef3c7;
  --bad: #b91c1c;     --bad-soft: #fee2e2;
  --info: #1d4ed8;    --info-soft: #dbeafe;

  --radius: 16px; --radius-s: 10px; --radius-xs: 7px;
  --shadow: 0 1px 2px rgba(15,23,40,.05), 0 6px 20px -8px rgba(15,23,40,.12);
  --shadow-2: 0 10px 40px -10px rgba(15,23,40,.25);
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121a2b; --surface-2: #172134; --surface-3: #1e293b;
    --text: #e6ebf2; --text-2: #aab6c6; --text-3: #7d8ba0; --border: #22304a; --border-2: #33425e;
    --accent: #2dd4bf; --accent-2: #818cf8; --accent-soft: #113b3a; --accent-text: #8ff0e4;
    --ok: #4ade80; --ok-soft: #12321f; --warn: #fbbf24; --warn-soft: #3a2a08; --bad: #f87171; --bad-soft: #3b1414; --info: #93c5fd; --info-soft: #14233f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -10px rgba(0,0,0,.6);
    --shadow-2: 0 10px 40px -10px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121a2b; --surface-2: #172134; --surface-3: #1e293b;
  --text: #e6ebf2; --text-2: #aab6c6; --text-3: #7d8ba0; --border: #22304a; --border-2: #33425e;
  --accent: #2dd4bf; --accent-2: #818cf8; --accent-soft: #113b3a; --accent-text: #8ff0e4;
  --ok: #4ade80; --ok-soft: #12321f; --warn: #fbbf24; --warn-soft: #3a2a08; --bad: #f87171; --bad-soft: #3b1414; --info: #93c5fd; --info-soft: #14233f;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .7em; }
small, .muted { color: var(--text-2); }
.tiny { font-size: .8rem; color: var(--text-3); }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
kbd, code { font-family: var(--mono); font-size: .85em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; max-width: 1120px; margin: 0 auto; padding: 0 14px 24px; width: 100%; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) 0 10px; margin: 0 -14px 12px; padding-left: 14px; padding-right: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.page-title { font-size: 1.3rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.icon-btn svg { width: 1.3em; height: 1.3em; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: .68rem; font-weight: 600; letter-spacing: .01em; }
.tabbar a:hover { text-decoration: none; }
.tabbar a svg { width: 1.5rem; height: 1.5rem; }
.tabbar a.active { color: var(--accent-text); }
.tabbar .fab { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 8px 20px -6px rgba(79,70,229,.6); margin-top: -18px; }
.tabbar .fab svg { width: 1.45rem; height: 1.45rem; }
.tabbar .fab-tab.active .fab { box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 20px -6px rgba(79,70,229,.6); }

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; width: 232px; flex: none; position: sticky; top: 0; height: 100vh; padding: 18px 12px; border-right: 1px solid var(--border); background: var(--surface); }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); padding: 4px 8px 18px; letter-spacing: -.02em; }
  .brand:hover { text-decoration: none; }
  .brand img { border-radius: 10px; }
  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .93rem; }
  .sidenav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
  .sidenav a.active { background: var(--accent-soft); color: var(--accent-text); }
  .sidenav a svg { width: 1.25rem; height: 1.25rem; }
  .sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px; }
  .me { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
  .me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 0 28px 40px; }
  .topbar { margin: 0 -28px 18px; padding-left: 28px; padding-right: 28px; }
  .page-title { font-size: 1.5rem; }
}

/* Karten & Listen */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 10px 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-hero { background: var(--grad); color: #fff; border: 0; }
.card-hero .muted, .card-hero .tiny { color: rgba(255,255,255,.8); }
.card-hero a { color: #fff; text-decoration: underline; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.section-title h2 { font-size: 1.02rem; margin: 0; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); color: inherit; }
.row:last-child { border-bottom: 0; }
.row:hover { text-decoration: none; background: var(--surface-2); margin: 0 -8px; padding-left: 12px; padding-right: 12px; border-radius: var(--radius-s); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: .85rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--text-3); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.right { text-align: right; }
.center { text-align: center; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .85rem; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar.grad { background: var(--grad); color: #fff; }

/* Stat-Kacheln */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); color: inherit; display: block; }
.stat:hover { text-decoration: none; border-color: var(--border-2); }
.stat .k { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { font-size: .8rem; color: var(--text-2); margin-top: 2px; }
.stat.hot .k { color: var(--bad); } .stat.warn .k { color: var(--warn); } .stat.good .k { color: var(--ok); } .stat.accent .k { color: var(--accent-text); }

/* Chips / Badges */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip svg { width: .95em; height: .95em; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip.outline { background: transparent; border: 1px solid var(--border-2); }
.chip-link:hover { text-decoration: none; filter: brightness(.95); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.accent { background: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; line-height: 1.2; text-decoration: none; transition: transform .05s ease, background .15s ease; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px rgba(79,70,229,.6); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: 6px 11px; font-size: .84rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn .spin { display: none; }
.htmx-request .btn .spin, .btn.htmx-request .spin { display: inline-block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick a { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.quick a:hover { text-decoration: none; border-color: var(--accent); }
.quick .ic { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.quick .ic svg { width: 1.25rem; height: 1.25rem; }

/* Formulare */
label.field { display: block; margin-bottom: 12px; }
label.field > span, .field-label { display: block; font-size: .8rem; font-weight: 700; color: var(--text-2); margin-bottom: 5px; letter-spacing: .02em; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span { grid-column: 1 / -1; } }
.help { font-size: .8rem; color: var(--text-3); margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--border-2); position: relative; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.searchbar { position: relative; margin-bottom: 12px; }
.searchbar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.searchbar input { padding-left: 38px; }
.textarea-wrap { position: relative; }
.mic-btn { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mic-btn.on { background: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.5);} 70% { box-shadow: 0 0 0 12px rgba(185,28,28,0);} 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0);} }

/* Alerts / Notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); background: var(--info-soft); color: var(--info); font-size: .9rem; margin-bottom: 12px; }
.notice svg { margin-top: 2px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.neutral { background: var(--surface-3); color: var(--text-2); }
.empty { text-align: center; color: var(--text-3); padding: 28px 12px; }
.empty svg { width: 2rem; height: 2rem; margin-bottom: 8px; opacity: .6; }

/* Phasen-Stepper */
.stepper { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: 1 0 auto; min-width: 84px; text-align: center; font-size: .72rem; font-weight: 700; color: var(--text-3); position: relative; padding-top: 16px; }
.step::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--surface-3); }
.step.done::before { background: var(--accent); opacity: .55; }
.step.current::before { background: var(--grad); }
.step.current { color: var(--accent-text); }
.step.done { color: var(--text-2); }

/* Antwort-Panel & Fundstellen */
.answer { font-size: .98rem; }
.answer h3, .answer h4 { margin-top: 1em; }
.answer ul { padding-left: 1.2em; margin: .3em 0 .8em; }
.answer li { margin: .2em 0; }
.answer p { margin: 0 0 .75em; }
a.cite, .cite { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: .74rem; font-weight: 700; vertical-align: middle; margin: 0 2px; text-decoration: none; }
a.cite:hover { filter: brightness(.95); }
.hints { background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: var(--radius-s); padding: 10px 12px; font-size: .88rem; }
.hints ul { margin: 0; padding-left: 1.1em; }
.sources { display: flex; flex-direction: column; gap: 8px; }
.source { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface-2); font-size: .85rem; color: inherit; }
.source:hover { text-decoration: none; border-color: var(--accent); }
.source .n { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .75rem; }
.source .q { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cursor::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; height: 14px; margin: 8px 0; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.page-view { white-space: pre-wrap; font-family: var(--mono); font-size: .8rem; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 12px; max-height: 60vh; overflow: auto; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 12px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { flex: 1; text-align: center; padding: 8px 10px; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--text-2); border: 0; background: transparent; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs a.active, .tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs a:hover { text-decoration: none; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Fortschritt oben, Toasts */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; opacity: 0; transition: opacity .2s; pointer-events: none; }
.progress div { height: 100%; width: 40%; background: var(--grad); animation: slide 1s infinite ease-in-out; }
.progress.htmx-request { opacity: 1; }
@keyframes slide { 0% { transform: translateX(-100%);} 100% { transform: translateX(250%);} }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-2); font-size: .9rem; animation: up .2s ease; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Modal / Sheet */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; width: 100vw; margin: 0; max-height: 100vh; }
dialog.sheet::backdrop { background: rgba(6,10,20,.55); backdrop-filter: blur(3px); }
dialog.sheet .sheet-body { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 20px 20px 0 0; padding: 14px 16px calc(16px + var(--safe-b)); max-height: 88vh; overflow: auto; box-shadow: var(--shadow-2); }
@media (min-width: 720px) { dialog.sheet .sheet-body { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); border-radius: 20px; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border-2); margin: 0 auto 12px; }
@media (min-width: 720px) { .sheet-handle { display: none; } }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, rgba(13,148,136,.25), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(79,70,229,.25), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-2); border: 1px solid var(--border); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand img { border-radius: 14px; }
.auth-brand b { font-size: 1.25rem; letter-spacing: -.02em; }

/* Utilities */
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; } .mt-s { margin-top: 6px; } .mb-0 { margin-bottom: 0; }
.w-100 { width: 100%; } .nowrap { white-space: nowrap; } .num { font-variant-numeric: tabular-nums; }
.hide-mobile { display: none; } @media (min-width: 720px) { .hide-mobile { display: initial; } .hide-desktop { display: none !important; } }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pill-row::-webkit-scrollbar { display: none; }
.pill-row a { flex: none; }
.htmx-swapping { opacity: .5; transition: opacity .15s; }
@media print { .tabbar, .sidebar, .topbar-actions, .btn { display: none !important; } body { padding: 0; background: #fff; } .card { box-shadow: none; } }
