:root {
  --bg: #06090d;
  --bg-2: #0b1118;
  --panel: rgba(14, 19, 27, 0.92);
  --panel-2: rgba(10, 14, 20, 0.94);
  --panel-3: rgba(18, 24, 34, 0.95);
  --line: rgba(150, 180, 210, 0.12);
  --line-strong: rgba(150, 180, 210, 0.22);
  --text: #edf4fb;
  --muted: #91a0b2;
  --accent: #ff7a1a;
  --accent-2: #ffb15c;
  --blue: #74b7ff;
  --green: #43e59a;
  --yellow: #ffd76a;
  --red: #ff6b81;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(116, 183, 255, 0.08), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(255, 122, 26, 0.10), transparent 25%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.015), rgba(255,255,255,0.015)),
    repeating-linear-gradient(0deg, transparent 0 36px, rgba(255,255,255,0.018) 36px 37px),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(255,255,255,0.018) 36px 37px);
  opacity: 0.55;
}
a { color: inherit; text-decoration: none; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 0.22em; margin-bottom: 12px; text-transform: uppercase; }
.login-card h1 { margin: 0 0 10px; }
.login-card p { color: var(--muted); margin: 0 0 24px; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.login-form input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); }
.login-form button, .logout-btn, .nav-pill { appearance: none; border: 0; border-radius: 14px; padding: 12px 14px; background: linear-gradient(135deg, #ff7a1a, #ff9a4d); color: #111; font-weight: 800; cursor: pointer; }
.login-error { margin-bottom: 16px; color: var(--red); }
.app-shell { max-width: 1680px; margin: 0 auto; padding: 22px; display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.sidebar { position: sticky; top: 20px; height: calc(100vh - 40px); background: linear-gradient(180deg, rgba(18,24,34,0.96), rgba(12,17,24,0.92)); border: 1px solid var(--line); border-radius: 28px; padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(18px); display: flex; flex-direction: column; gap: 18px; }
.brand-block { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand-block h1 { margin: 8px 0 8px; font-size: 28px; line-height: 1; }
.brand-block p { margin: 0; color: var(--muted); font-size: 14px; }
.nav-list { display: grid; gap: 10px; }
.nav-item { width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; color: var(--muted); border: 1px solid transparent; background: rgba(255,255,255,0.015); cursor: pointer; font: inherit; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease; }
.nav-item:hover { transform: translateX(2px); color: var(--text); border-color: rgba(116,183,255,0.15); }
.nav-item.active { color: var(--text); border-color: rgba(255,122,26,0.22); background: linear-gradient(90deg, rgba(255,122,26,0.15), rgba(255,255,255,0.02)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 10px 30px rgba(255,122,26,0.08); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; color: #b7c6d6; font-size: 13px; }
.status-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 6px rgba(67,229,154,0.12); }
.main { min-width: 0; display: grid; gap: 18px; }
.topbar-title h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
.route-header { position: relative; overflow: hidden; padding: 24px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255,122,26,0.10), rgba(116,183,255,0.08), rgba(255,255,255,0.02)); box-shadow: var(--shadow); }
.route-header::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 999px; background: radial-gradient(circle, rgba(255,177,92,0.18), transparent 68%); }
.route-kicker { color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; margin-bottom: 8px; }
.route-subtext { color: var(--muted); max-width: 860px; margin-top: 10px; }
.metric-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.metric-chip { padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: #d2dcea; font-size: 12px; }
.tab-chip { cursor: pointer; }
.tab-chip.active { border-color: rgba(255,122,26,0.28); background: rgba(255,122,26,0.12); color: #ffd2aa; }
.filter-bar { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.filter-input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); }
.filter-select { max-width: 220px; }
.filter-clear { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer; }
.layout-grid { display: grid; grid-template-columns: 1.3fr 0.8fr; gap: 18px; }
.stack { display: grid; gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(18px); position: relative; overflow: hidden; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.card:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, 0.22); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52); }
.card::after { content: ""; position: absolute; inset: auto -10% 100% auto; width: 180px; height: 180px; background: radial-gradient(circle, rgba(255,122,26,0.12), transparent 68%); pointer-events: none; }
.card h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hero { min-height: 380px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; }
.hero-panel { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.hero-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.hero-title h1 { margin: 0; font-size: clamp(28px, 4vw, 46px); line-height: 0.95; }
.hero-title p { margin: 10px 0 0; color: var(--muted); max-width: 680px; }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: linear-gradient(180deg, rgba(17,24,33,0.98), rgba(12,17,24,0.94)); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi .value { margin-top: 8px; font-size: 28px; font-weight: 800; }
.kpi .sub { margin-top: 4px; color: #b7c6d6; font-size: 12px; }
.command-strip { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.pill { border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: #c9d5e2; padding: 10px 12px; border-radius: 999px; font-size: 12px; }
.ops-stage { min-height: 270px; position: relative; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(circle at center, rgba(116,183,255,0.08), transparent 30%), repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 48px), repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 48px), #0d141c; }
.ops-node { position: absolute; min-width: 132px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(12, 18, 25, 0.96); transition: transform 150ms ease, box-shadow 150ms ease; }
.ops-node:hover { transform: translateY(-2px) scale(1.01); }
.ops-node.active { box-shadow: 0 0 0 1px rgba(255,122,26,0.35), 0 0 32px rgba(255,122,26,0.18); }
.ops-node .name { font-weight: 800; }
.ops-node .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stage-line { position: absolute; background: linear-gradient(90deg, rgba(116,183,255,0.16), rgba(255,122,26,0.22)); height: 1px; transform-origin: left center; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel-list { display: grid; gap: 10px; }
.row-item { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); transition: border-color 140ms ease, background 140ms ease, transform 140ms ease; }
.row-item:hover { border-color: rgba(116,183,255,0.18); background: rgba(255,255,255,0.03); transform: translateY(-1px); }
.row-item.pending { opacity: 0.65; border-color: rgba(255,177,92,0.30); }
.row-item strong { font-size: 14px; }
.row-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.small { color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.badge.open { background: rgba(255, 215, 106, 0.14); color: #ffe08f; }
.badge.done { background: rgba(67,229,154,0.14); color: #8af0bd; }
.badge.live { background: rgba(116,183,255,0.16); color: #aad0ff; }
.badge.blocked { background: rgba(255,107,129,0.14); color: #ff9dad; }
.badge.route { background: rgba(255,122,26,0.14); color: #ffc38e; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.timeline-dot { width: 12px; height: 12px; border-radius: 999px; margin-top: 4px; background: var(--accent); box-shadow: 0 0 0 8px rgba(255,122,26,0.10); }
.timeline-content { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.clickable { cursor: pointer; }
.clickable:hover { border-color: rgba(255,122,26,0.18); background: rgba(255,255,255,0.03); }
.detail-card { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.02); overflow: hidden; }
.detail-card summary { cursor: pointer; list-style: none; padding: 12px 14px; font-weight: 700; }
.detail-card summary::-webkit-details-marker { display: none; }
.detail-card-body { padding: 0 14px 14px; }
.trend-bar { display: grid; gap: 6px; margin-top: 8px; }
.trend-done, .trend-reopen, .trend-live, .trend-cost, .trend-velocity { height: 8px; border-radius: 999px; }
.trend-done { background: linear-gradient(90deg, rgba(67,229,154,0.95), rgba(67,229,154,0.35)); }
.trend-reopen { background: linear-gradient(90deg, rgba(255,107,129,0.95), rgba(255,107,129,0.35)); }
.trend-live { background: linear-gradient(90deg, rgba(116,183,255,0.95), rgba(116,183,255,0.35)); }
.trend-cost { background: linear-gradient(90deg, rgba(255,177,92,0.95), rgba(255,177,92,0.35)); }
.trend-velocity { background: linear-gradient(90deg, rgba(67,229,154,0.95), rgba(116,183,255,0.35)); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; line-height: 1.48; color: #d4deea; white-space: pre-wrap; word-break: break-word; }
.telemetry-box { max-height: 260px; overflow: auto; padding-right: 6px; }
.toast-host { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 9999; }
.toast { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(17,24,33,0.96); box-shadow: var(--shadow); }
.toast.success { border-color: rgba(67,229,154,0.28); }
.toast.error { border-color: rgba(255,107,129,0.28); }
@media (max-width: 1200px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: relative; top: 0; height: auto; } .layout-grid, .hero, .section-grid { grid-template-columns: 1fr; } .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .live-grid { grid-template-columns: 1fr; } .filter-bar { flex-direction: column; align-items: stretch; } .filter-select { max-width: none; } .toast-host { left: 12px; right: 12px; } }
