/* Rubin — ITOps theme.
   The memorable part is the navigation: a floating panel where every icon sits on a small tile and the current page
   lights its tile in ruby. The rest is quiet: cool neutrals, generous spacing, 6:1+ contrast by day and by night. */
:root{
  --primary:#8c1d4e; --primary-ink:#fff; --secondary:#4b5d9a; --focus:#8c1d4e;
  --bg:#f3f2f6; --surface:#fff; --surface-2:#f6f5f9; --border:#e2dfe8; --text:#1e1b26; --muted:#5e5969;
  --ok:#2d7a4b; --warn:#95660f; --bad:#b3263a; --info:#3b5f9a;
  --radius:14px; --radius-sm:9px; --shadow:0 1px 2px rgba(30,27,38,.04),0 2px 8px rgba(30,27,38,.04); --shadow-lg:0 18px 44px rgba(30,27,38,.2);
  --font:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Noto Sans",Ubuntu,sans-serif;
  --tile:#ece9f1; --tile-icon:#4a4556; --active-bg:#f6e8ef; --panel:#fff;
}
[data-theme=dark]{
  --primary:#ec8db5; --primary-ink:#1a0b12; --secondary:#9fb0e8; --focus:#f2a9c8;
  --bg:#141218; --surface:#1c1922; --surface-2:#221e29; --border:#2e2936; --text:#e7e2ec; --muted:#a39dac;
  --ok:#7ccb97; --warn:#e0b25a; --bad:#f08a95; --info:#9fb8e8; --shadow:none; --shadow-lg:0 18px 44px rgba(0,0,0,.55);
  --tile:#26222d; --tile-icon:#c9c2d2; --active-bg:#2c1f28; --panel:#1c1922;
}
@media (prefers-color-scheme:dark){[data-theme=auto]{
  --primary:#ec8db5; --primary-ink:#1a0b12; --secondary:#9fb0e8; --focus:#f2a9c8;
  --bg:#141218; --surface:#1c1922; --surface-2:#221e29; --border:#2e2936; --text:#e7e2ec; --muted:#a39dac;
  --ok:#7ccb97; --warn:#e0b25a; --bad:#f08a95; --info:#9fb8e8; --shadow:none; --shadow-lg:0 18px 44px rgba(0,0,0,.55);
  --tile:#26222d; --tile-icon:#c9c2d2; --active-bg:#2c1f28; --panel:#1c1922;}}

body{line-height:1.55}
h1{font-size:1.5rem;font-weight:680;letter-spacing:-.015em}
h2{font-weight:640}

/* header blends into the canvas */
.app-header{background:var(--bg);border-bottom-color:transparent}
.brand .logo{background:var(--primary);color:var(--primary-ink);border-radius:10px}
.header-search input{background:var(--surface);border-color:var(--border)}
.header-search input:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}

/* navigation panel with icon tiles */
.sidebar{background:var(--panel)}
.nav{padding:0 .55rem}
.nav a,.nav .nav-head{min-height:44px;border-radius:12px;color:var(--text);gap:.7rem;padding:0 .5rem}
.nav a .icon{width:32px;height:32px;padding:7px;border-radius:10px;background:var(--tile);color:var(--tile-icon);transition:background .15s,color .15s}
.nav a:hover{background:var(--surface-2)}
.nav a.active{background:var(--active-bg);color:var(--primary);font-weight:650}
.nav a.active .icon{background:var(--primary);color:var(--primary-ink)}
.nav li.expanded>a:not(.active){font-weight:650}
.nav li.expanded>a:not(.active) .icon{color:var(--primary)}
/* children: no tiles, hang on a guide line */
.nav ul{margin:.1rem 0 .4rem 1.55rem;padding:0 0 0 .7rem;border-left:2px solid var(--border)}
.nav ul a{min-height:38px;font-size:.94em;padding:0 .55rem}
.nav ul a .icon{width:18px;height:18px;padding:0;background:none;color:var(--muted)}
.nav ul a.active .icon{background:none;color:var(--primary)}
.nav .toggle{top:6px;border-radius:9px;color:var(--muted)}
.nav .toggle:hover{background:var(--surface-2)}
.nav .section{text-transform:none;letter-spacing:0;font-size:.82rem;font-weight:650;color:var(--muted);padding:1.1rem .6rem .3rem}
.nav .badge{background:var(--tile);color:var(--tile-icon);font-variant-numeric:tabular-nums}
.nav .badge.alert{background:var(--bad);color:#fff}
[data-theme=dark] .badge.alert,[data-theme=dark] .dot{color:#22080d}
@media (prefers-color-scheme:dark){[data-theme=auto] .badge.alert,[data-theme=auto] .dot{color:#22080d}}

/* content */
.card{border-color:var(--border)}
.kpi{padding:1rem 1.1rem}
.kpi b{font-variant-numeric:tabular-nums;font-size:1.75rem;font-weight:680;letter-spacing:-.02em}
.table td,.table th{font-variant-numeric:tabular-nums}
.btn{border-radius:var(--radius-sm)}
.btn.primary:hover{filter:none;background:color-mix(in srgb,var(--primary) 85%,var(--text))}
.chips a{border-radius:var(--radius-sm)}
input,select,textarea{border-radius:var(--radius-sm)}
input:focus,select:focus,textarea:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}
.fab{border-radius:18px}
@media (min-width:768px){.table td:first-child,.table th:first-child{white-space:nowrap}}

/* desktop: the panel floats on the canvas */
@media (min-width:1200px){
  .sidebar{inset:calc(var(--header-h) + 4px) auto 14px 14px;width:calc(var(--sidebar-w) - 22px);border:1px solid var(--border);border-radius:18px;padding:.6rem 0 1rem;box-shadow:var(--shadow)}
  .shell{margin-left:calc(var(--sidebar-w) - 4px)}
}
@media print{.sidebar{display:none}}
