:root {
  --bg: #08111f;
  --bg-soft: #0d1728;
  --panel: rgba(18, 31, 50, 0.92);
  --panel-2: rgba(24, 40, 63, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f4f7fb;
  --muted: #9aacc2;
  --accent: #4d9cff;
  --accent-2: #67e8f9;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;
  --unknown: #94a3b8;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% 0%, #10284b 0, transparent 35%), linear-gradient(180deg, #07101e 0%, #0a1423 100%); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 48px; align-items: center; padding: clamp(28px, 6vw, 88px); max-width: 1500px; margin: 0 auto; }
.login-brand { max-width: 760px; }
.brand-mark { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; background: linear-gradient(145deg, var(--accent), #3455d1); font-weight: 800; letter-spacing: -.05em; box-shadow: 0 14px 36px rgba(77, 156, 255, .28); }
.brand-mark.compact { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.eyebrow { color: var(--accent-2); font-size: 11px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }
.login-brand h1 { font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.055em; margin: 26px 0 24px; max-width: 800px; }
.lead { color: #c5d2e2; font-size: 19px; line-height: 1.7; max-width: 700px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.principles article { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); }
.principles strong, .principles span { display: block; }
.principles span { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.login-card { border: 1px solid var(--line); border-radius: 28px; background: rgba(13, 24, 42, .94); padding: 32px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-card h2 { font-size: 28px; margin-bottom: 8px; }
.login-card > div > p:not(.eyebrow), .security-note { color: var(--muted); line-height: 1.55; }
#login-form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 7px; color: #cad5e3; font-size: 12px; font-weight: 650; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: rgba(5, 13, 25, .72); color: var(--text); outline: none; }
input:focus, select:focus { border-color: rgba(77, 156, 255, .8); box-shadow: 0 0 0 3px rgba(77,156,255,.12); }
.primary-button, .ghost-button { border-radius: 11px; padding: 10px 14px; border: 1px solid transparent; font-weight: 700; color: white; }
.primary-button { background: linear-gradient(135deg, var(--accent), #5372e8); box-shadow: 0 8px 25px rgba(77,156,255,.18); }
.ghost-button { background: rgba(255,255,255,.04); border-color: var(--line); color: #dce6f2; }
.compact-button { align-self: end; min-height: 41px; }
.form-error { color: #fecdd3; background: rgba(244,63,94,.10); border: 1px solid rgba(244,63,94,.25); border-radius: 10px; padding: 10px 12px; margin: 0; }
.security-note { margin: 20px 0 0; font-size: 12px; }
.app-shell { display: grid; grid-template-columns: 260px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: 22px 16px; background: rgba(7, 16, 30, .96); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 20px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand small { color: var(--muted); margin-top: 2px; font-size: 11px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; text-align: left; padding: 10px 11px; border-radius: 10px; border: 0; background: transparent; color: #aebdd0; font-size: 13px; }
.nav-item span { display: inline-block; width: 24px; color: #7f9bbb; }
.nav-item:hover { background: rgba(255,255,255,.045); color: white; }
.nav-item.active { background: rgba(77,156,255,.14); color: #f8fbff; box-shadow: inset 0 0 0 1px rgba(77,156,255,.22); }
.sidebar-foot { display: flex; gap: 9px; align-items: center; margin: 20px 6px 0; padding: 14px 12px; border-radius: 13px; background: rgba(74,222,128,.06); border: 1px solid rgba(74,222,128,.14); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { color: var(--muted); margin-top: 2px; font-size: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(74,222,128,.10); }
.workspace { min-width: 0; }
.workspace-header { position: sticky; top: 0; z-index: 10; min-height: 82px; padding: 17px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(8,17,31,.88); backdrop-filter: blur(18px); }
.workspace-header h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chip, .badge, .status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(77,156,255,.12); color: #b9d8ff; border: 1px solid rgba(77,156,255,.18); }
.chip.subtle { background: rgba(255,255,255,.04); color: #aebdd0; border-color: var(--line); text-transform: none; }
.badge.good, .status.healthy { color: #a7f3d0; border-color: rgba(74,222,128,.24); background: rgba(74,222,128,.08); }
.status.monitor { color: #fde68a; border-color: rgba(251,191,36,.24); background: rgba(251,191,36,.08); }
.status.attention { color: #fecdd3; border-color: rgba(251,113,133,.24); background: rgba(251,113,133,.08); }
.status.unknown { color: #cbd5e1; border-color: rgba(148,163,184,.22); background: rgba(148,163,184,.08); }
.workspace-body { padding: 26px; max-width: 1660px; margin: 0 auto; }
.notice { position: sticky; top: 92px; z-index: 9; margin-bottom: 16px; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line); background: #111f33; color: #dce7f5; font-size: 12px; }
.notice[data-tone="bad"] { border-color: rgba(251,113,133,.35); color: #fecdd3; }
.notice[data-tone="good"] { border-color: rgba(74,222,128,.28); color: #bbf7d0; }
.view-section { display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: linear-gradient(180deg, rgba(20,34,54,.92), rgba(12,23,39,.92)); box-shadow: 0 10px 35px rgba(0,0,0,.10); }
.panel h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel h3 { margin-bottom: 6px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.hero p:not(.eyebrow) { max-width: 850px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat span, .stat small, .metric span, .metric small { color: var(--muted); font-size: 11px; }
.stat strong { display: block; font-size: 28px; margin: 7px 0 3px; letter-spacing: -.04em; }
.two-column { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 18px; }
.stack-list { display: grid; gap: 9px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 13px; }
.row-card, .fleet-card, .attention-card, .performance-card { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); padding: 14px; }
.row-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.row-head strong { display: block; }
.row-head small, .row-card small, .fleet-card small { color: var(--muted); }
.row-card p { color: #bac8d9; margin: 9px 0 0; font-size: 12px; line-height: 1.5; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 10px; margin: 14px 0; }
.metric { padding: 13px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 12px; }
.metric strong { display: block; margin-top: 5px; font-size: 20px; }
.chart { width: 100%; min-height: 260px; background: rgba(2,8,18,.28); border-radius: 14px; border: 1px solid rgba(148,163,184,.10); }
.terminal-select { min-width: 230px; max-width: 420px; }
.inline-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-grid { display: grid; grid-template-columns: minmax(220px,2fr) minmax(140px,1fr) minmax(180px,1fr) auto; gap: 10px; align-items: end; }
.usage-bars { display: grid; grid-template-columns: repeat(auto-fit,minmax(14px,1fr)); gap: 4px; min-height: 230px; align-items: end; padding: 18px 4px 0; }
.usage-bar { min-height: 3px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #67e8f9, #4d9cff); position: relative; }
.usage-bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #06101d; border: 1px solid var(--line); padding: 6px 8px; border-radius: 8px; white-space: nowrap; font-size: 10px; z-index: 5; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.55; }
.reason-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reason { padding: 4px 7px; border-radius: 999px; font-size: 10px; color: #b9c8da; background: rgba(255,255,255,.045); }
.attention-actions, .admin-actions, .report-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.report-controls label { min-width: 220px; }
.timeline { display: grid; gap: 10px; margin-top: 16px; }
.timeline-entry { position: relative; padding: 13px 15px 13px 22px; border-left: 2px solid rgba(77,156,255,.35); background: rgba(255,255,255,.025); border-radius: 0 12px 12px 0; }
.timeline-entry::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; left: -5px; top: 17px; background: var(--accent); }
.timeline-entry.workflow::before { background: var(--warn); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #96a9c0; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { color: #d9e3ef; }
.empty { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.admin-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); margin-top: 14px; align-items: end; }
.scope-list { color: var(--muted); font-size: 11px; margin-top: 6px; }
.danger-note { color: #fecdd3; }
.download-link { display: inline-flex; text-decoration: none; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; padding: 24px; }
  .principles { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-header { position: static; display: block; padding: 18px; }
  .header-actions { margin-top: 12px; justify-content: flex-start; }
  .workspace-body { padding: 16px; }
  .summary-grid, .filter-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column; }
  .terminal-select { min-width: 0; max-width: none; }
}
