/* ───────────────────────── Nexo design system ─────────────────────────
   Three neutral surfaces, one chroma (indigo) with separate text/fill roles,
   colour only for state, one glow (the ember) reserved for the brain. */
:root {
  color-scheme: light;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --surface-0: #f6f6f8;
  --surface-1: #ffffff;
  --surface-2: #ffffff;
  --bg-hover: #f3f4f7;
  --line: #e6e7ec;
  --line-2: #d4d6de;
  --text: #15171e;
  --text-2: #4b5060;
  --text-3: #6b7182;
  --brand: #4f46e5;
  --brand-fill: #5b5fe6;
  --brand-fill-hover: color-mix(in srgb, var(--brand-fill) 88%, black);
  --on-brand: #ffffff;
  --brand-soft: #eceefe;
  --green: #15803d;
  --red: #dc2626;
  --amber: #b45309;
  --blue: #2563eb;
  --green-soft: color-mix(in srgb, var(--green) 12%, var(--surface-1));
  --red-soft: color-mix(in srgb, var(--red) 12%, var(--surface-1));
  --amber-soft: color-mix(in srgb, var(--amber) 12%, var(--surface-1));
  --blue-soft: color-mix(in srgb, var(--blue) 12%, var(--surface-1));
  --ember-1: #fbbf24;
  --ember-2: #f97316;
  --ember-glow: 0 0 24px color-mix(in srgb, #f97316 55%, transparent);
  --map-bg: #0b0d14;
  --input-bg: #ffffff;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
  --shadow-1: 0 1px 2px rgba(20, 22, 30, 0.06);
  --shadow-2: 0 8px 24px -8px rgba(20, 22, 30, 0.16);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --pill: 999px;
  --sidebar: 240px;
  --topbar: 56px;
  --bottombar: 56px;
  /* aliases for older selectors */
  --bg: var(--surface-0);
  --bg-2: var(--surface-1);
  --bg-3: var(--surface-2);
  --brand-2: var(--brand-fill-hover);
  --brand-text: var(--brand);
  --me: var(--brand-fill);
  --shadow: var(--shadow-1);
  --shadow-lg: var(--shadow-2);
  --radius: var(--r-lg);
  --radius-sm: var(--r);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --surface-0: #0e1015;
  --surface-1: #15181f;
  --surface-2: #1b1f28;
  --bg-hover: #20242e;
  --line: #262a35;
  --line-2: #343947;
  --text: #eceef2;
  --text-2: #a6abb8;
  --text-3: #7d8494;
  --brand: #8b93f8;
  --brand-fill: #5b5fe6;
  --on-brand: #ffffff;
  --brand-soft: #1d2142;
  --green: #4ade80;
  --red: #f87171;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --input-bg: var(--surface-0);
  --shadow-1: none;
  --shadow-2: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--surface-0); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h1 { font-size: 20px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--text-3); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.bad { color: var(--red); }
.good { color: var(--green); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.gap-2 { gap: 16px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-title, .form-section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.section-title { margin: 14px 0 6px; }
.form-section { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; cursor: pointer; user-select: none; background: none; border: 0; padding: 0; width: 100%; }
.form-section::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-section .count { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* boot */
.boot { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-2); }
.boot-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-fill); color: var(--on-brand); font-weight: 700; font-family: var(--font-display); font-size: 28px; display: grid; place-items: center; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.92); opacity: 0.7; } }

/* icons */
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.xs { width: 12px; height: 12px; }
.icon.sm { width: 14px; height: 14px; }
.icon.md { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }

/* ───────────── layout ───────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; background: var(--surface-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; }
.sidebar nav { overflow-y: auto; flex: 1; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-fill); color: var(--on-brand); font-weight: 700; font-family: var(--font-display); display: grid; place-items: center; font-size: 16px; flex: none; }
.brand-name { font-weight: 700; font-family: var(--font-display); font-size: 16px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -2px; }
.nav a, .nav button.navitem { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 36px; border-radius: var(--r); color: var(--text-2); font-weight: 500; cursor: pointer; transition: background 0.12s, color 0.12s; width: 100%; border: 0; background: none; text-align: left; }
.nav a:hover, .nav button.navitem:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav a .badge-n { margin-left: auto; }
.nav .more-head { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 32px; margin-top: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); cursor: pointer; border: 0; background: none; width: 100%; }
.nav .more-head .icon { margin-left: auto; }
.ember-dot { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--ember-1), var(--ember-2)); box-shadow: var(--ember-glow); margin-left: 6px; flex: none; }
.ember-dot.pulse { animation: emberPulse 1.2s ease-in-out 3; }
@keyframes emberPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.8); } }
.sidebar-foot { padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--pill); font-size: 12px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.status-pill.ok .dot { background: var(--green); }
.status-pill.warn .dot { background: var(--amber); }
.status-pill.bad .dot { background: var(--red); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--surface-0) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 15px; font-weight: 600; font-family: var(--font); letter-spacing: -0.01em; }
.topbar .search { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r); color: var(--text-3); cursor: text; text-align: left; }
.kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text-3); background: var(--surface-2); }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.content.full { max-width: none; padding: 0; height: calc(100dvh - var(--topbar)); }

.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 12px; flex: none; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }

/* bottom nav (mobile) */
.nav-bottom { display: none; }

/* ───────────── buttons & inputs ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s; }
.btn:hover { background: var(--bg-hover); }
.btn:disabled, .btn[aria-busy='true'] { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-fill-hover); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line-2)); }
.btn.danger:hover { background: var(--red-soft); }
.btn.success { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line-2)); }
.btn.success:hover { background: var(--green-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: var(--r-sm); }
.btn.icon-only { padding: 0; width: 36px; }
.btn.icon-only.sm { width: 30px; }
.btn.icon-only.xs { width: 24px; }
.btn.wide { width: 100%; }
.btn.tonal { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--text-3); }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); outline: none; transition: border-color 0.12s, box-shadow 0.12s; }
.input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); outline: none; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7182' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.input.error { border-color: var(--red); }
.input.filled { background: var(--brand-soft); transition: background 1.5s; }
.err-text { color: var(--red); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-fill); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .span { grid-column: 1 / -1; }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background 0.15s; flex: none; border: 0; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.switch.on { background: var(--brand-fill); }
.switch.on::after { transform: translateX(18px); }

/* ───────────── cards, badges, tables ───────────── */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.clickable { cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.card.clickable:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.card-b { padding: 20px; }
.card-b.tight { padding: 8px 12px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.kpi .label { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .label .icon { color: var(--text-3); }
.kpi .value { font-size: 24px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--text-3); }

.badge { --c: var(--text-2); display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--pill); font-size: 11px; font-weight: 600; line-height: 20px; background: color-mix(in srgb, var(--c) 12%, transparent); color: color-mix(in srgb, var(--c) 78%, var(--text)); white-space: nowrap; }
.badge.brand { --c: var(--brand); }
.badge.green { --c: var(--green); }
.badge.red { --c: var(--red); }
.badge.amber { --c: var(--amber); }
.badge.blue { --c: var(--blue); }
.badge.purple { --c: #7c3aed; }
.badge-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pill); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--brand-fill); color: var(--on-brand); font-variant-numeric: tabular-nums; }
.badge-n.muted { background: transparent; color: var(--text-3); font-weight: 500; font-size: 12px; }
.badge-n.red { background: var(--red); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; transition: background 0.1s; }
.tbl tbody tr.clickable:hover { background: var(--bg-hover); }
.tbl .num { text-align: right; }
.tbl .actions { opacity: 0; transition: opacity 0.12s; }
.tbl tr:hover .actions, .tbl tr:focus-within .actions { opacity: 1; }
.empty { padding: 32px 16px; text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.empty .t { font-weight: 600; color: var(--text); }
.empty .x { font-size: 13px; max-width: 34ch; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; background: var(--surface-1); border: 1px solid var(--line-2); border-radius: var(--r); min-width: 220px; box-shadow: var(--shadow-1); }
.toolbar .search-box input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--surface-1); font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--bg-hover); }
.chip.active { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.chip[style*='--c'].active { background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--text)); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.chip.solid.active { background: var(--c, var(--brand-fill)); color: #fff; border-color: transparent; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .title p { color: var(--text-2); margin: 0; font-size: 13px; }
.page-head .title h1 { margin-bottom: 2px; }

/* ───────────── modal / drawer / popover ───────────── */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 24, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; backdrop-filter: blur(2px); animation: fade 0.12s ease-out; }
.modal { width: 100%; max-width: 640px; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); animation: rise 0.16s ease-out; display: flex; flex-direction: column; }
:root[data-theme='dark'] .modal { border-color: var(--line-2); }
.modal.lg { max-width: 860px; }
.modal.sm { max-width: 440px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-h h2 { flex: 1; }
.modal-b { padding: 20px; }
.modal-f { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.modal-bg.drawer { justify-content: flex-end; padding: 0; align-items: stretch; }
.modal-bg.drawer .modal { max-width: 720px; width: 92vw; height: 100dvh; border-radius: 0; border: 0; border-left: 1px solid var(--line); animation: slide 0.16s ease-out; overflow: hidden; }
.modal-bg.drawer .modal-b { flex: 1; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.popover-wrap { position: relative; display: inline-block; }
.popover { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 200px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; animation: rise 0.12s ease-out; }
.popover.left { right: auto; left: 0; }
.popover.wide { min-width: 300px; padding: 14px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; text-align: left; color: var(--text); font-weight: 500; }
.menu-item:hover { background: var(--bg-hover); }
.menu-item.danger { color: var(--red); }
.menu-item .icon { color: var(--text-3); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ───────────── toasts & strips ───────────── */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); padding: 10px 12px; border-radius: var(--r-lg); box-shadow: var(--shadow-2); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: rise 0.18s ease-out; border-left-width: 4px; }
.toast.info { border-left-color: var(--brand); }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast .t-body { white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: hidden; flex: 1; }
.toast .t-act { color: var(--brand); font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; white-space: nowrap; }
.toast .t-x { background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 0; line-height: 1; }
.status-strip { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; margin-bottom: 16px; border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--line)); font-size: 13px; }
.status-strip .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); flex: none; }
.status-strip .act { margin-left: auto; }

/* skeleton */
.skeleton { background: var(--surface-2); border-radius: var(--r-sm); position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 5%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.sk-row { height: 44px; margin: 6px 0; }
.sk-card { height: 72px; margin: 8px 0; }
.sk-kpi { height: 84px; }
@media (prefers-reduced-motion: reduce) { .skeleton::after, .ember-dot.pulse, .boot-logo { animation: none; } }

/* ───────────── auth ───────────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 55% 1fr; }
.auth-art { background: var(--map-bg); color: #eceef2; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; position: relative; overflow: hidden; }
.auth-art .word { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -0.03em; }
.auth-art .tag { color: rgba(236, 238, 242, 0.7); margin-top: 4px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-form .inner { width: 100%; max-width: 380px; }
.auth-form .input, .auth-form .btn { height: 44px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth .card.wide { max-width: 760px; width: 100%; }
.auth.setup { display: grid; place-items: center; grid-template-columns: 1fr; padding: 20px; }
.setup-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setup-col { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-0); }
.setup-col h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.constellation { display: block; }
.constellation.breathe { animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) { .constellation.breathe { animation: none; } }

/* ───────────── kanban ───────────── */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: stretch; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; position: relative; }
.kcol { background: color-mix(in srgb, var(--surface-0) 70%, var(--surface-1)); border-radius: var(--r-xl); padding: 8px; min-height: 60vh; display: flex; flex-direction: column; gap: 8px; transition: background 0.12s, outline 0.12s; scroll-snap-align: start; }
.kcol.over { outline: 2px dashed var(--brand); background: var(--brand-soft); }
.kcol.collapsed { padding: 8px 4px; min-height: 160px; align-items: center; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; font-weight: 600; font-size: 13px; }
.kcol-h .dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; display: inline-block; }
.kcol-h .count { font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kcol-v { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; padding-top: 4px; }
.kcol-v .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kcol-v .vlabel { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.kcol .dropzone { border: 1px dashed var(--line-2); border-radius: var(--r); min-height: 72px; }
.tcard { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: grab; box-shadow: var(--shadow-1); position: relative; transition: border-color 0.12s, background 0.12s; }
.tcard:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface-2); }
.tcard.dragging { opacity: 0.45; }
.tcard .t-title { font-weight: 600; line-height: 1.35; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 24px; }
.tcard .t-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.tcard.done .t-title { text-decoration: line-through; color: var(--text-3); }
.tcard .t-menu { position: absolute; top: 8px; right: 8px; opacity: 0; }
.tcard:hover .t-menu, .tcard:focus-within .t-menu { opacity: 1; }
.due.over { color: var(--red); font-weight: 600; }
.due.soon { color: var(--amber); font-weight: 600; }
.dropbar { position: sticky; bottom: 8px; display: flex; gap: 10px; margin-top: 12px; z-index: 5; }
.dropbar .target { flex: 1; height: 56px; border-radius: var(--r-lg); display: grid; place-items: center; font-weight: 600; border: 2px dashed transparent; }
.dropbar .won { background: var(--green-soft); color: var(--green); }
.dropbar .lost { background: var(--surface-2); color: var(--text-2); }
.dropbar .target.over { border-color: currentColor; }
.task-list .trow { display: grid; grid-template-columns: 28px 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.task-list .trow:hover { background: var(--bg-hover); }
.task-list .trow:last-child { border-bottom: 0; }
.checkbox-round { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; color: #fff; cursor: pointer; background: none; padding: 0; }
.checkbox-round.on { background: var(--green); border-color: var(--green); }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.status-steps .chip { --c: var(--text-2); }
.status-steps .chip.active { background: var(--c); color: #fff; border-color: transparent; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment .c-body { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; flex: 1; }
.comment .c-meta { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.editable-title { font-size: 20px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; border: 1px solid transparent; border-radius: var(--r-sm); padding: 4px 8px; width: 100%; background: transparent; }
.editable-title:hover, .editable-title:focus { border-color: var(--line-2); background: var(--surface-1); outline: none; }
.sheet-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); padding: 0 8px; }
.sheet-tabs { display: flex; gap: 6px; margin: 12px 0; }

/* ───────────── todo list (Hoje) ───────────── */
.todo { display: flex; flex-direction: column; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.todo-row:last-child { border-bottom: 0; }
.todo-row:hover { background: var(--bg-hover); }
.todo-row .ic { --c: var(--text-2); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); flex: none; }
.todo-row .tt { font-weight: 500; }
.todo-row .tx { font-size: 12px; color: var(--text-3); }
.todo-row .acts { display: flex; gap: 4px; opacity: 0; transition: opacity 0.12s; }
.todo-row:hover .acts, .todo-row:focus-within .acts { opacity: 1; }
.checklist .item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checklist .item .ic { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: #fff; }
.checklist .item.done .ic { background: var(--green); border-color: var(--green); }

/* ───────────── chat ───────────── */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: 100%; min-height: 0; }
.chat-h { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface-1); }
.chat-h .name { font-size: 15px; font-weight: 600; }
.chat-body { overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-0); position: relative; }
.day-sep { align-self: center; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-1); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin: 10px 0 6px; }
.bubble { max-width: min(680px, 72%); padding: 10px 14px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--line); position: relative; word-break: break-word; }
.bubble.mine { align-self: flex-end; background: var(--brand-fill); color: var(--on-brand); border-color: var(--brand-fill); border-bottom-right-radius: 4px; }
.bubble.mine a { color: #fff; text-decoration: underline; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--surface-2); border-color: var(--line); border-left: 2px solid var(--brand); max-width: min(720px, 84%); }
.bubble.pending { opacity: 0.6; }
.bubble .b-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.bubble .b-text { white-space: pre-wrap; line-height: 1.45; }
.bubble .b-meta { display: flex; align-items: center; gap: 5px; justify-content: flex-end; font-size: 12px; color: var(--text-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
.bubble.mine .b-meta { color: rgba(255, 255, 255, 0.8); }
.bubble .b-media { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.08); }
.bubble .b-media img { max-height: 220px; border-radius: 8px; display: block; }
.link-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 22px; border-radius: var(--pill); background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: 12px; font-weight: 600; text-decoration: none !important; }
.bubble.mine .link-chip { background: rgba(255, 255, 255, 0.2); color: #fff; }
.chat-f { padding: 12px 20px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-1); position: relative; }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 160px; resize: none; }
.chat-f .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.cmd-hint { position: absolute; bottom: 100%; left: 20px; right: 20px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; margin-bottom: 6px; max-height: 300px; overflow-y: auto; z-index: 10; }
.cmd-hint .group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 8px 10px 2px; }
.cmd-hint .item { padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.cmd-hint .item:hover, .cmd-hint .item.sel { background: var(--bg-hover); }
.cmd-hint b { font-family: ui-monospace, monospace; font-weight: 600; }
.new-msgs { position: sticky; bottom: 8px; align-self: center; }

/* ───────────── brain (page = map) ───────────── */
.brainmap { position: relative; height: 100%; min-height: calc(100dvh - var(--topbar)); background: var(--map-bg); overflow: hidden; color: #eceef2; }
.brainmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.bm-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; pointer-events: none; }
.bm-top > * { pointer-events: auto; }
.bm-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--pill); background: rgba(21, 24, 31, 0.8); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); width: 360px; max-width: 100%; color: #eceef2; }
.bm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 14px; }
.bm-search input::placeholder { color: rgba(203, 213, 225, 0.55); }
.bm-stats { margin-left: auto; font-size: 12px; color: rgba(203, 213, 225, 0.75); display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.bm-btn { height: 36px; padding: 0 12px; border-radius: var(--pill); background: rgba(21, 24, 31, 0.8); border: 1px solid rgba(255, 255, 255, 0.12); color: #eceef2; backdrop-filter: blur(10px); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; }
.bm-btn:hover { background: rgba(40, 44, 56, 0.9); }
.bm-legend { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 32px); pointer-events: none; }
.bm-legend > * { pointer-events: auto; }
.bm-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--pill); font-size: 12px; background: rgba(21, 24, 31, 0.75); border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; color: #eceef2; backdrop-filter: blur(6px); transition: opacity 0.15s; }
.bm-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.bm-chip b { color: rgba(255, 255, 255, 0.7); font-weight: 600; font-variant-numeric: tabular-nums; }
.bm-chip.off { opacity: 0.4; }
.bm-chip.off i { box-shadow: none; background: #475569; }
.bm-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 300px; padding: 10px 14px; border-radius: var(--r-lg); background: rgba(12, 16, 34, 0.92); border: 1px solid var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); backdrop-filter: blur(8px); color: #eceef2; }
.bm-tip.fixed { pointer-events: auto; }
.bm-kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c); font-weight: 700; }
.bm-title { font-weight: 600; margin: 2px 0; }
.bm-sub { font-size: 12px; color: rgba(203, 213, 225, 0.85); }
.bm-hint { font-size: 11px; color: rgba(203, 213, 225, 0.5); margin-top: 4px; }
.bm-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: rgba(203, 213, 225, 0.8); font-size: 15px; gap: 12px; pointer-events: none; }
.bm-empty > * { pointer-events: auto; }
.bm-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 360px; max-width: 100%; background: var(--surface-1); color: var(--text); border-left: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; flex-direction: column; z-index: 6; animation: slide 0.16s ease-out; }
.bm-drawer .tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.bm-drawer .body { flex: 1; overflow-y: auto; padding: 12px; }
.ask { display: flex; flex-direction: column; gap: 10px; }
.ask .msgs { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.ask .q { align-self: flex-end; background: var(--brand-fill); color: var(--on-brand); padding: 9px 13px; border-radius: 14px 14px 4px 14px; max-width: 85%; }
.ask .a { align-self: flex-start; background: var(--surface-2); border-left: 2px solid var(--brand); padding: 10px 14px; border-radius: 4px 14px 14px 14px; max-width: 92%; line-height: 1.5; }
.hit { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.hit:hover { background: var(--bg-hover); }
.hit:last-child { border-bottom: 0; }
.hit .h-kind { flex: none; }
.hit .h-title { font-weight: 600; }
.hit .h-snip { color: var(--text-2); font-size: 13px; }
.hit mark { background: color-mix(in srgb, var(--amber) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 9px; top: 24px; bottom: -8px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.tl-dot.create { background: var(--green-soft); color: var(--green); }
.tl-dot.update { background: var(--blue-soft); color: var(--blue); }
.tl-dot.delete { background: var(--red-soft); color: var(--red); }
.tl-dot.comment { background: var(--brand-soft); color: var(--brand); }
.tl-text { font-size: 13px; }
.tl-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kcard { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.kcard:hover { background: var(--bg-hover); }
.kcard:last-child { border-bottom: 0; }
.kcard .k-subject { font-weight: 600; }
.kcard .k-fact { margin: 3px 0; }
.tags .badge { margin-right: 4px; }

/* ───────────── charts & misc ───────────── */
.chart { width: 100%; height: 140px; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .base { stroke: var(--line); }
.chart .grid { stroke: var(--line); stroke-dasharray: 2 3; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-top: 6px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.hbar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--brand); border-radius: 99px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.pipeline { display: flex; gap: 8px; flex-wrap: wrap; }
.pipeline .step { flex: 1; min-width: 110px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.pipeline .step b { font-size: 18px; display: block; font-variant-numeric: tabular-nums; }
.pipeline .step span { font-size: 12px; color: var(--text-2); }
.qr-box { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); }
.qr-box img { width: 260px; height: 260px; image-rendering: pixelated; }
.day-group h3 { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 16px 0 8px; }
.event { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.event:hover { background: var(--bg-hover); }
.event .time { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.drop { border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 20px; text-align: center; color: var(--text-3); cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.menu-btn { display: none; }
.palette { position: fixed; inset: 0; z-index: 70; background: rgba(8, 12, 24, 0.5); display: flex; justify-content: center; padding: 80px 16px 16px; }
.palette .box { width: 100%; max-width: 640px; height: fit-content; max-height: 70vh; display: flex; flex-direction: column; background: var(--surface-1); border-radius: var(--r-xl); box-shadow: var(--shadow-2); border: 1px solid var(--line-2); overflow: hidden; }
.palette .box .in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.palette .box .in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; }
.palette .results { overflow-y: auto; }
.printable { display: none; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.4); }

@media (pointer: coarse) {
  .btn.xs, .btn.sm, .chip, .btn.icon-only.sm, .checkbox-round { min-height: 40px; }
  .btn.icon-only.sm, .btn.icon-only.xs { min-width: 40px; }
  .input, select.input { height: 44px; }
  .tbl .actions, .tcard .t-menu, .todo-row .acts { opacity: 1; }
}
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: repeat(5, 260px); }
  .hbar { grid-template-columns: 100px 1fr 60px; }
}
@media (max-width: 859px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform 0.18s; box-shadow: var(--shadow-2); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .topbar .search { display: none; }
  .content { padding: 16px; padding-bottom: calc(var(--bottombar) + 16px + env(safe-area-inset-bottom)); }
  .content.full { height: calc(100dvh - var(--topbar) - var(--bottombar)); }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .setup-cols { grid-template-columns: 1fr; }
  .task-list .trow { grid-template-columns: 28px 1fr auto; }
  .task-list .trow .hide-m { display: none; }
  .modal-bg { padding: 0; align-items: stretch; }
  .modal, .modal-bg.drawer .modal { max-width: none; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .modal-b { flex: 1; overflow-y: auto; }
  .kanban { grid-template-columns: repeat(5, 85vw); }
  .chat-h .sub, .chat-h .status-pill { display: none; }
  .chat-h .dot-status { display: inline-block; }
  .chat-body, .chat-f { padding-left: 12px; padding-right: 12px; }
  .chat-f .hint { display: none; }
  .bubble { max-width: 92%; }
  .bm-search { width: auto; flex: 1; }
  .bm-stats { display: none; }
  .bm-drawer { width: 100%; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 220px; padding: 24px; }
  .toasts { bottom: calc(var(--bottombar) + 12px + env(safe-area-inset-bottom)); right: 12px; left: 12px; max-width: none; }
  .nav-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface-1); border-top: 1px solid var(--line); }
  .nav-bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--text-3); position: relative; }
  .nav-bottom a.active { color: var(--brand); }
  .nav-bottom a .icon { width: 22px; height: 22px; }
  .nav-bottom a .badge-n { position: absolute; top: 6px; left: calc(50% + 6px); }
  .page-head { margin-bottom: 14px; }
}
.chat-h .dot-status { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.chat-h .dot-status.ok { background: var(--green); }
@media print {
  .sidebar, .topbar, .toasts, .btn, .toolbar, .nav-bottom { display: none !important; }
  .shell { display: block; }
  .content { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
