:root {
  --hub-bg: #0b0f19;
  --hub-surface: #111827;
  --hub-surface-2: #161f32;
  --hub-border: #1f2937;
  --hub-border-strong: #334155;
  --hub-text: #f1f5f9;
  --hub-muted: #cbd5e1;
  --hub-subtle: #94a3b8;
  --hub-primary: #6366f1;
  --hub-primary-hover: #4f46e5;
  --hub-ok: #34d399;
  --hub-warn: #fbbf24;
  --hub-bad: #f87171;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: var(--hub-bg);
  color: var(--hub-text);
  font-size: 13.5px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.hub-auth-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.hub-auth-box { width: 100%; max-width: 420px; background: var(--hub-surface); border: 1px solid var(--hub-border); border-radius: 12px; padding: 24px; }
.hub-auth-box h1 { margin: 0 0 8px; font-size: 19px; }
.hub-error-msg { color: var(--hub-bad); font-size: 12.5px; min-height: 18px; margin: 6px 0; }
.hub-subtle { color: var(--hub-subtle); font-size: 12px; }
.hub-shell { display: flex; min-height: 100vh; }
.hub-sidebar { width: 240px; flex-shrink: 0; background: var(--hub-surface); border-right: 1px solid var(--hub-border); display: flex; flex-direction: column; }
.hub-brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hub-border); }
.hub-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--hub-primary); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.hub-brand-sub { font-size: 11px; color: var(--hub-subtle); }
.hub-nav { padding: 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hub-nav-group { padding: 10px 8px 4px; font-size: 11px; color: var(--hub-subtle); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-nav-item { text-align: left; background: transparent; border: 0; color: var(--hub-muted); padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.hub-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.hub-nav-item.active { background: rgba(99,102,241,0.18); color: #fff; font-weight: 600; border-left: 3px solid var(--hub-primary); }
.hub-sidebar-footer { padding: 12px; border-top: 1px solid var(--hub-border); }
.hub-check-inline { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--hub-subtle); cursor: pointer; }
.hub-main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hub-topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 18px; background: var(--hub-surface); border-bottom: 1px solid var(--hub-border); position: sticky; top: 0; z-index: 20; }
.hub-topbar-left { display: flex; align-items: center; gap: 10px; }
.hub-topbar-title { font-weight: 700; font-size: 15px; }
.hub-topbar-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hub-multi-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.hub-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; background: var(--hub-surface-2); border: 1px solid var(--hub-border-strong); font-size: 11.5px; cursor: pointer; }
.hub-content { padding: 18px; max-width: 1460px; width: 100%; }
.hub-card { background: var(--hub-surface); border: 1px solid var(--hub-border); border-radius: 10px; padding: 16px; margin-bottom: 16px; min-width: 0; }
.hub-section-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.hub-section-title { margin: 0; font-size: 15px; font-weight: 600; }
.hub-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hub-kpi-grid .hub-card { margin-bottom: 0; padding: 13px 15px; }
.hub-kpi-label { font-size: 12px; color: var(--hub-subtle); margin-bottom: 4px; }
.hub-kpi-val { font-size: 20px; font-weight: 700; color: #fff; }
.hub-kpi-sub { font-size: 11.5px; color: var(--hub-subtle); margin-top: 4px; }
.hub-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.hub-table-wrap { overflow-x: auto; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hub-table th, .hub-table td { padding: 8px 10px; border-bottom: 1px solid var(--hub-border); text-align: left; vertical-align: top; }
.hub-table th { color: var(--hub-subtle); font-weight: 600; white-space: nowrap; }
.hub-input, .hub-select, .hub-textarea { background: var(--hub-bg); color: var(--hub-text); border: 1px solid var(--hub-border-strong); border-radius: 7px; padding: 6px 10px; font-size: 13px; }
.hub-textarea { width: 100%; min-height: 110px; font-family: ui-monospace, monospace; }
.hub-btn { background: var(--hub-surface-2); color: var(--hub-text); border: 1px solid var(--hub-border-strong); border-radius: 7px; padding: 6px 11px; cursor: pointer; font-size: 12.5px; }
.hub-btn:hover { background: #1e293b; }
.hub-btn-primary { background: var(--hub-primary); border-color: var(--hub-primary); color: #fff; }
.hub-btn-primary:hover { background: var(--hub-primary-hover); }
.hub-btn-sm { padding: 4px 9px; font-size: 12px; }
.hub-btn.active { background: var(--hub-primary); border-color: var(--hub-primary); color: #fff; }
.hub-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(255,255,255,0.08); color: var(--hub-muted); white-space: nowrap; }
.hub-pill.ok { background: rgba(16,185,129,0.18); color: var(--hub-ok); }
.hub-pill.warn { background: rgba(245,158,11,0.18); color: var(--hub-warn); }
.hub-pill.bad { background: rgba(239,68,68,0.18); color: var(--hub-bad); }
.hub-empty { padding: 22px; text-align: center; color: var(--hub-subtle); border: 1px dashed var(--hub-border-strong); border-radius: 8px; }
.hub-bar-list { display: flex; flex-direction: column; gap: 8px; }
.hub-bar-meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.hub-bar-track { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.hub-bar-fill { height: 100%; background: var(--hub-primary); }
.hub-wizard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.hub-field label { display: block; font-size: 12px; color: var(--hub-subtle); margin-bottom: 4px; }
.hub-field input, .hub-field select, .hub-field textarea { width: 100%; }
.hub-step-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hub-step-pill { padding: 4px 9px; border-radius: 6px; font-size: 11.5px; background: var(--hub-surface-2); border: 1px solid var(--hub-border-strong); color: var(--hub-muted); }
.hub-step-pill.done { border-color: var(--hub-ok); color: var(--hub-ok); }
.hub-toast { position: fixed; right: 18px; bottom: 18px; padding: 10px 14px; border-radius: 8px; background: #1e293b; border: 1px solid var(--hub-border-strong); color: #fff; font-size: 13px; display: none; z-index: 60; }
.hub-toast.open { display: block; }
@media (max-width: 900px) {
  .hub-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 40; transition: left 0.2s ease; visibility: hidden; }
  .hub-shell.mobile-nav-open .hub-sidebar { left: 0; visibility: visible; }
  .hub-grid-2 { grid-template-columns: 1fr; }
}
