:root {
    --bg: #07101f;
    --panel: #0c1728;
    --panel-2: #111f33;
    --line: rgba(255,255,255,.09);
    --text: #eef4ff;
    --muted: #8fa3bf;
    --blue: #3287ff;
    --blue-soft: rgba(50,135,255,.14);
    --green: #39d98a;
    --shadow: 0 18px 50px rgba(0,0,0,.28);
    --sidebar: 270px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.os-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.os-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg,#081321,#07101d); border-right: 1px solid var(--line); padding: 22px 16px; z-index: 30; }
.os-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid var(--line); }
.os-brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 22px; background: linear-gradient(145deg,#2a7fff,#65a6ff); box-shadow: 0 9px 25px rgba(50,135,255,.35); }
.os-brand-name { font-weight: 900; letter-spacing: .16em; }
.os-brand-version { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.os-navigation { padding-top: 16px; }
.nav-section + .nav-section { margin-top: 21px; }
.nav-heading { margin: 0 10px 8px; color: #607895; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; text-decoration: none; color: #aebed2; font-size: 14px; font-weight: 650; transition: .18s ease; }
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; transform: translateX(2px); }
.nav-link.active { background: var(--blue-soft); color: #fff; box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }
.os-main { min-width: 0; }
.os-topbar { min-height: 86px; display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 16px 28px; background: rgba(7,16,31,.85); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.os-topbar h1 { margin: 0; font-size: 24px; }
.os-topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(57,217,138,.12); }
#currentTime { margin-left: 10px; color: #d7e5f7; }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #fff; cursor: pointer; }
.os-workspace { min-height: calc(100vh - 86px); padding: 28px; background: radial-gradient(circle at 90% 0%,rgba(50,135,255,.08),transparent 34%),var(--bg); }
.route-loading { display: grid; place-items: center; min-height: 45vh; color: var(--muted); }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-intro h2 { margin: 0; font-size: 28px; }
.page-intro p { margin: 7px 0 0; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: rgba(57,217,138,.1); color: #7bedb4; font-size: 12px; font-weight: 750; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.kpi-card, .panel, .module-card { background: linear-gradient(145deg,rgba(17,31,51,.96),rgba(10,22,38,.96)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.kpi-card { padding: 19px; border-radius: 15px; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { margin-top: 10px; font-size: 30px; font-weight: 850; }
.kpi-note { margin-top: 7px; color: #7890ac; font-size: 12px; }
.content-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.panel { padding: 20px; border-radius: 15px; }
.panel h3 { margin: 0 0 16px; font-size: 17px; }
.module-list { display: grid; gap: 11px; }
.module-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; border-radius: 13px; text-decoration: none; }
.module-card:hover { border-color: rgba(50,135,255,.5); }
.module-card strong { display: block; margin-bottom: 4px; }
.module-card span { color: var(--muted); font-size: 13px; }
.module-arrow { color: var(--blue) !important; font-size: 20px !important; }
.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.action-button { display: grid; place-items: center; min-height: 88px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); text-decoration: none; text-align: center; font-weight: 750; }
.action-button:hover { background: var(--blue-soft); border-color: rgba(50,135,255,.45); }
.empty-module { min-height: 390px; display: grid; place-items: center; text-align: center; padding: 40px; }
.empty-module .icon { font-size: 48px; }
.empty-module h2 { margin: 14px 0 8px; }
.empty-module p { max-width: 600px; margin: 0 auto 20px; color: var(--muted); line-height: 1.6; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border-radius: 10px; background: var(--blue); color: #fff; text-decoration: none; border: 0; font-weight: 750; }
.sidebar-overlay { display: none; }
@media (max-width: 1050px) { .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .content-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
    .os-shell { display: block; }
    .os-sidebar { position: fixed; left: 0; transform: translateX(-105%); width: min(86vw,var(--sidebar)); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.45); }
    body.sidebar-open .os-sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25; }
    body.sidebar-open .sidebar-overlay { display: block; }
    .menu-button { display: inline-grid; place-items: center; flex: 0 0 auto; }
    .os-topbar { padding: 13px 16px; }
    .topbar-status span:not(.status-dot), #currentTime { display: none; }
    .os-workspace { padding: 18px 14px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .page-intro { align-items: flex-start; flex-direction: column; }
}
