:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #111827;
  --panel-2: #172033;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --accent-2: #34d399;
  --danger: #f59e0b;
  --border: #273449;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, sans-serif; }
button { font: inherit; color: inherit; }
.app-shell { min-height: 100svh; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 14px; background: var(--panel); border-bottom: 1px solid var(--border); }
.icon-button { display: none; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .14em; }
h1 { margin: 2px 0 0; font-size: 20px; }
.status-dot { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.sidebar { padding: 18px 12px; background: #0f172a; border-right: 1px solid var(--border); }
.tree-group { margin-bottom: 18px; }
.tree-label { padding: 8px 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.tree-link { width: 100%; display: block; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.tree-link:hover, .tree-link.active { background: var(--panel-2); color: var(--accent); }
.main-content { min-width: 0; padding: 18px clamp(16px, 4vw, 42px) 86px; max-width: 1100px; width: 100%; }
.breadcrumbs { margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.content { display: grid; gap: 16px; }
.hero, .card { padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.hero h2, .card h2, .card h3 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.action { min-height: 100px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); cursor: pointer; text-align: left; }
.action:hover { border-color: var(--accent); }
.action strong { color: var(--accent); }
.meta { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #173b34; color: var(--accent-2); font-size: 12px; }
.warning { border-left: 3px solid var(--danger); }
.bottom-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 14px; border-radius: 10px; background: #1f2937; border: 1px solid var(--border); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 700px) {
  .app-shell { display: block; }
  .topbar { position: sticky; top: 0; z-index: 3; }
  .icon-button { display: block; }
  .sidebar { position: fixed; z-index: 2; inset: 57px auto 0 0; width: min(82vw, 290px); transform: translateX(-105%); transition: transform .2s; box-shadow: 8px 0 24px #0008; }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 14px 14px calc(76px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: #111827ee; backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
  .bottom-nav button { display: grid; gap: 2px; justify-items: center; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
  .bottom-nav span { font-size: 10px; }
}
