* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; background: #f1f5f9; color: #0f172a; }

.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #0b1f33; color: #cbd5e1; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px; font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #0891b2); color: #fff; font-size: 14px; font-weight: 800; }
.logo-sub { padding: 0 18px 14px; font-size: 12px; color: #7c93ab; margin-top: -6px; }
.sidebar nav { flex: 1; padding: 10px 8px; }
.sidebar nav a { display: block; padding: 10px 12px; margin: 2px 0; border-radius: 8px; color: #cbd5e1; text-decoration: none; font-size: 14px; }
.sidebar nav a:hover { background: #15324d; color: #fff; }
.sidebar nav a.active { background: linear-gradient(90deg, #1e40af, #2563eb); color: #fff; }
.side-foot { padding: 14px 18px; font-size: 11px; line-height: 1.5; color: #5d7390; border-top: 1px solid #15324d; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; background: #fff; border-bottom: 1px solid #e2e8f0; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.userbox span { color: #64748b; }

.content { padding: 24px 26px; }
.content > .panel, .content > .cards, .content > .two-col, .content > .three-col, .content > .form-grid, .content > .total-line, .content > form, .content > .inline-form { margin-bottom: 20px; }

.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; }
.card .num { font-size: 26px; font-weight: 800; color: #1e40af; }
.card .lbl { color: #64748b; font-size: 12px; margin-top: 3px; }
.card .delta { font-size: 12px; margin-top: 6px; font-weight: 600; }
.card .delta.up { color: #16a34a; }
.card .delta.down { color: #dc2626; }
.card.alt .num { color: #0e7490; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 2px solid #e2e8f0; }
td { padding: 10px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
tr:hover td { background: #f8fafc; }
td.empty { text-align: center; color: #94a3b8; padding: 26px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.btn { display: inline-block; background: #1d4ed8; color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: #1e40af; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 12px 30px; font-size: 15px; }
.btn-outline { background: transparent; color: #1d4ed8; border: 1px solid #1d4ed8; }
.btn-outline:hover { background: #eff4ff; }
.btn-ghost { background: #f1f5f9; color: #334155; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; }
.btn-success:hover { background: #15803d; }

.flash { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }

.badge { display: inline-block; color: #fff; border-radius: 999px; padding: 3px 11px; font-size: 12px; white-space: nowrap; vertical-align: middle; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #334155; font-weight: 600; }
label input, label select, label textarea, .stack input, .stack select { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #fff; font-weight: 400; }
label textarea { resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.info-grid div span { display: block; font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.info-grid div { font-size: 14px; }

.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } .sidebar { position: static; width: 100%; height: auto; } .app { flex-direction: column; } }

.table-svg { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(14, 34, 51, .35); }
.table-wrap { background: #0e2233; border-radius: 14px; padding: 6px; }

.sev-minor { color: #2563eb; }
.sev-major { color: #f59e0b; }
.sev-critical { color: #dc2626; }

.bar { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; }

.stat-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eef2f6; font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 12px; color: #475569; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #0b1f33 0%, #123a5e 55%, #0e7490 100%); padding: 24px; }
.login-card { background: #fff; border-radius: 18px; padding: 34px; width: 100%; max-width: 470px; box-shadow: 0 24px 60px rgba(2, 12, 24, .45); }
.login-logo { width: 58px; height: 58px; border-radius: 16px; background: linear-gradient(135deg, #2563eb, #0891b2); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: #fff; font-size: 24px; font-weight: 800; }
.login-card h1 { text-align: center; margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.login-card .muted { text-align: center; margin-bottom: 20px; line-height: 1.5; }
.login-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.demo-btn { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 11px; padding: 13px 15px; cursor: pointer; font-size: 14px; font-family: inherit; }
.demo-btn:hover { border-color: #2563eb; background: #eff4ff; }
.demo-btn span { color: #64748b; font-size: 12px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #94a3b8; font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input { padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; }
.login-form .btn { padding: 12px; font-size: 15px; }
.small { font-size: 12px; }
.muted { color: #64748b; }

.conf { display: inline-block; min-width: 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.conf.hi { color: #16a34a; }
.conf.mid { color: #d97706; }

.metric-tile { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.metric-tile .m-num { font-size: 24px; font-weight: 800; color: #0f172a; }
.metric-tile .m-lbl { font-size: 12px; color: #64748b; margin-top: 3px; }