:root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --line: #dfe6ee;
    --ink: #172033;
    --muted: #66758a;
    --ok: #198754;
    --warn: #b7791f;
    --crit: #c03221;
    --orange: #c45f10;
    --offline: #5f6b7a;
}

body { background: var(--bg); color: var(--ink); font-size: 14px; }
a { text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: #101827; color: #dce7f5; border-right: 1px solid #0c1320; }
.brand-block { display: flex; align-items: center; gap: 12px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: #2f80ed; color: #fff; font-weight: 700; }
.brand-title { font-weight: 700; letter-spacing: .2px; }
.brand-subtitle { color: #93a4ba; font-size: 12px; }
.sidebar-nav { padding: 12px; gap: 3px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 10px; color: #b8c6d8; border-radius: 7px; padding: 9px 10px; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-panel { flex: 1; min-width: 0; }
.topbar { min-height: 72px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.topbar h1 { font-size: 20px; line-height: 1.2; margin: 0; font-weight: 700; }
.topbar-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 13px; }
.content-wrap { padding: 22px 24px 32px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card, .noc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 1px 2px rgba(16,24,39,.04); }
.kpi-card { padding: 14px; position: relative; overflow: hidden; }
.kpi-card.compact { padding: 12px 14px; }
.kpi-card.compact .kpi-value { font-size: 22px; }
.secondary-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -6px; }
.kpi-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 28px; font-weight: 750; line-height: 1.1; margin-top: 8px; }
.kpi-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.noc-card { margin-bottom: 16px; }
.noc-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.noc-card-title { font-size: 14px; font-weight: 700; margin: 0; }
.table-noc { margin: 0; font-size: 13px; }
.table-noc th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; background: #f8fafc; }
.table-noc td, .table-noc th { padding: 9px 10px; vertical-align: middle; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; background: #fbfcfe; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; margin-right: 6px; }
.status-ok { background: #e8f5ee; color: var(--ok); }
.status-warning { background: #fff7e6; color: var(--warn); }
.status-critical { background: #fdecea; color: var(--crit); }
.status-orange { background: #fff0e1; color: var(--orange); }
.status-offline { background: #eef1f5; color: var(--offline); }
.badge-soft { border-radius: 999px; padding: 5px 8px; font-weight: 700; font-size: 11px; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 14px; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 13px; }
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 22px; font-weight: 750; margin-top: 4px; }
.auth-bg { min-height: 100vh; display: flex; align-items: center; background: #eef3f8; }
.login-panel { max-width: 420px; margin: 0 auto; }
@media (max-width: 1100px) { .kpi-grid, .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sidebar { width: 210px; } }
@media (max-width: 760px) { .app-shell { display: block; } .sidebar { width: 100%; } .topbar { align-items: flex-start; gap: 12px; flex-direction: column; } .kpi-grid, .metric-row { grid-template-columns: 1fr; } }
