/* Riggle Console: command center. Colors come from the Riggle logo: midnight navy, blue #4fa3ff, orange #ff8a3d.
   Green / yellow / red are kept only for status (always paired with a word and a symbol). */
:root {
  --bg-0: #03080f; --bg: #060e1a; --bg-2: #0a1626; --panel: #0b1a2d; --panel-2: #0f223a; --panel-3: #132a47;
  --line: rgba(79, 163, 255, .26); --line-2: rgba(79, 163, 255, .12); --glow: rgba(79, 163, 255, .16);
  --blue: #4fa3ff; --blue-2: #8cc4ff; --orange: #ff8a3d; --orange-2: #ffb07a; --orange-ink: #1a0d02;
  --text: #c3d2e4; --dim: #8aa6c4; --white: #fff;
  --good: #3ecf8e; --warn: #f5c451; --bad: #ff6b6b;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace; --display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif; --body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --side-w: 250px; --radius: 10px;
}
* { box-sizing: border-box; }
html { background: var(--bg-0); }
body { margin: 0; background: radial-gradient(1200px 600px at 75% -10%, rgba(79,163,255,.10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(255,138,61,.06), transparent 60%), var(--bg); background-attachment: fixed; color: var(--text); font: 14px/1.55 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--white); }
h1, h2, h3 { font-family: var(--display); color: var(--white); margin: 0; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
code { font-family: var(--mono); font-size: 12px; background: rgba(79,163,255,.1); padding: 1px 5px; border-radius: 3px; color: var(--white); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--dim); }
.small { font-size: 12px; }
.bad { color: var(--bad); }
.good { color: var(--good); }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.right { margin-left: auto; }
small { display: block; font-size: 12px; }
.ic { flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell: sidebar + top bar ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: linear-gradient(180deg, #071224 0%, #050c18 100%); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(0,0,0,.35); z-index: 40; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line-2); }
.side-brand svg { filter: drop-shadow(0 0 8px rgba(79,163,255,.45)); }
.side-brand span { display: flex; flex-direction: column; line-height: 1; }
.side-brand b { font: 700 22px var(--display); color: var(--white); letter-spacing: .02em; }
.side-brand i { font: 500 11px var(--mono); font-style: normal; color: var(--orange); letter-spacing: .42em; margin-top: 5px; }
.side-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14.5px; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.side-link:hover { color: var(--white); background: rgba(79,163,255,.08); }
.side-link .ic { color: var(--dim); }
.side-link:hover .ic { color: var(--blue); }
.side-link.on { color: var(--white); background: linear-gradient(90deg, rgba(79,163,255,.24), rgba(79,163,255,.06)); border-color: rgba(79,163,255,.45); box-shadow: 0 0 18px rgba(79,163,255,.22), inset 3px 0 0 var(--orange); }
.side-link.on .ic { color: var(--blue-2); }
.side-link.sub { padding: 6px 12px 6px 44px; font-size: 13px; color: var(--dim); }
.side-link.sub.on { background: rgba(255,138,61,.10); border-color: transparent; box-shadow: inset 3px 0 0 var(--orange); color: var(--white); }
.count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--orange); color: var(--orange-ink); font: 700 11px/20px var(--body); font-style: normal; text-align: center; }
.side-foot { margin-top: auto; padding: 18px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
.side-foot b { font: 700 12px var(--display); color: var(--white); letter-spacing: .14em; }
.side-foot span { font: 500 9.5px var(--mono); color: var(--dim); letter-spacing: .3em; }
.rack { width: 120px; height: 64px; margin-bottom: 10px; opacity: .9; }
.rack-u { fill: #0b1a2d; stroke: rgba(79,163,255,.35); stroke-width: 1; }
.rack-slot { fill: #050c18; }
.led { fill: var(--blue); animation: blink 3.2s infinite; }
.led-1 { fill: var(--orange); animation-delay: .8s; }
.led-2 { fill: var(--blue-2); animation-delay: 1.9s; }
@keyframes blink { 0%, 100% { opacity: .35; } 45% { opacity: 1; } }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 24px; background: rgba(5, 11, 21, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-title { min-width: 0; margin-right: auto; }
.top-title h1 { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.35; }
.top-search { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; width: clamp(250px, 30vw, 380px); padding: 0 14px; height: 40px; border-radius: 99px; background: rgba(10,22,38,.9); border: 1px solid var(--line); color: var(--dim); }
.top-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,163,255,.15); }
.top-search input { border: 0; background: transparent; padding: 0; height: 100%; font-size: 13.5px; }
.top-search input:focus { border: 0; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { color: var(--white); background: rgba(79,163,255,.1); border-color: var(--line-2); }
.bell em { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--orange); color: var(--orange-ink); font: 700 10.5px/18px var(--body); font-style: normal; text-align: center; box-shadow: 0 0 10px rgba(255,138,61,.6); }
.menu-btn { display: none; }
.me { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 3px 10px 3px 3px; border-radius: 99px; border: 1px solid transparent; }
.me:hover { border-color: var(--line); color: var(--white); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); color: var(--white); background: radial-gradient(circle at 30% 30%, #2a6fbf, #0f2f5a); border: 2px solid rgba(79,163,255,.6); box-shadow: 0 0 12px rgba(79,163,255,.35); }
.me-text { display: flex; flex-direction: column; line-height: 1.2; }
.me-text b { color: var(--white); font-size: 13.5px; }
.me-text small { color: var(--dim); font-size: 11.5px; }
.content { padding: 20px 24px 32px; flex: 1; }
.side-scrim { display: none; }

/* No-shell pages (sign-in) */
main.wrap { padding-top: 20px; padding-bottom: 40px; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-top p { margin: 0; }
.page-top h2 { font-size: 19px; }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--white); font: 600 13px var(--body); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--blue); color: var(--white); box-shadow: 0 0 12px rgba(79,163,255,.25); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.btn-primary:hover { color: var(--orange-ink); border-color: var(--orange-2); box-shadow: 0 0 14px rgba(255,138,61,.45); }
.btn-danger { border-color: rgba(255,107,107,.5); color: #ffb3b3; background: transparent; }
.btn-danger:hover { border-color: var(--bad); color: var(--white); box-shadow: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.linkish { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.linkish:hover { color: var(--white); }
.form { display: grid; gap: 12px; }
.form.narrow { max-width: 420px; margin-top: 12px; }
.form.compact { display: flex; gap: 6px; margin-top: 6px; }
.form label { display: grid; gap: 5px; font-size: 12px; color: var(--dim); font-weight: 500; }
.form label small { display: inline; color: var(--dim); font-weight: 400; }
input, select, textarea { width: 100%; padding: 9px 11px; background: #050c17; color: var(--white); border: 1px solid var(--line); border-radius: 8px; font: 14px var(--body); }
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
input:disabled { opacity: .6; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- Notes ---------- */
.note { padding: 10px 14px; border: 1px solid; border-radius: 8px; margin-bottom: 14px; }
.note-success { border-color: rgba(62,207,142,.5); background: rgba(62,207,142,.08); color: #b5f0d4; }
.note-err { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.08); color: #ffc9c9; }
.note-info { border-color: var(--line); background: rgba(79,163,255,.06); color: var(--text); }

/* ---------- Sign-in ---------- */
.auth { min-height: 78vh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 0 40px rgba(79,163,255,.12); }
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-card .form { margin: 16px 0 10px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.auth-brand b { display: block; color: var(--white); font-family: var(--display); font-size: 17px; }
.auth-brand span { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Panels ---------- */
.panel { position: relative; background: linear-gradient(180deg, rgba(15,34,58,.92), rgba(9,21,37,.92)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; min-width: 0; box-shadow: 0 0 0 1px rgba(79,163,255,.04) inset, 0 0 26px rgba(79,163,255,.07), 0 10px 30px rgba(0,0,0,.25); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; }
.panel-head h2 .ic { color: var(--blue); filter: drop-shadow(0 0 6px rgba(79,163,255,.5)); }
.panel-head > a, .panel-head .more { font-size: 13px; font-weight: 600; }
.panel-head.sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.cols > .panel, .grid-3 > .panel, .grid-2-1 > .panel, .grid-1-2 > .panel { margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, rgba(19,42,71,.95), rgba(9,21,37,.95)); box-shadow: 0 0 22px rgba(79,163,255,.09); color: var(--text); min-width: 0; transition: border-color .15s, box-shadow .15s; }
a.kpi:hover { color: var(--text); border-color: var(--blue); box-shadow: 0 0 26px rgba(79,163,255,.25); }
.kpi-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: rgba(79,163,255,.1); border: 1px solid rgba(79,163,255,.3); box-shadow: 0 0 14px rgba(79,163,255,.2) inset; }
.kpi-ic .ic { width: 26px; height: 26px; filter: drop-shadow(0 0 6px rgba(79,163,255,.6)); }
.kpi.k-orange .kpi-ic { color: var(--orange); background: rgba(255,138,61,.1); border-color: rgba(255,138,61,.35); box-shadow: 0 0 14px rgba(255,138,61,.18) inset; }
.kpi.k-orange .kpi-ic .ic { filter: drop-shadow(0 0 6px rgba(255,138,61,.6)); }
.kpi.k-bad { border-color: rgba(255,107,107,.55); }
.kpi.k-bad .kpi-ic { color: var(--bad); background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.4); }
.kpi-body { min-width: 0; display: flex; flex-direction: column; }
.kpi-num { font: 700 26px/1.1 var(--display); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-label { font-size: 13px; color: var(--text); }
.kpi-sub { font-size: 12px; color: var(--dim); line-height: 1.35; }

/* Old tiles (kept for any page still using them) */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-size: 12px; color: var(--dim); font-weight: 500; }
.tile-num { font-family: var(--display); font-size: 28px; color: var(--white); line-height: 1.1; font-weight: 700; }
.tile-sub { font-size: 12px; color: var(--dim); }

/* ---------- Five live indicators ---------- */
.inds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.ind { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15,34,58,.95), rgba(7,17,31,.95)); color: var(--text); overflow: hidden; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.ind::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--dim); }
a.ind:hover { color: var(--text); box-shadow: 0 0 26px rgba(79,163,255,.2); }
.ind.s-ok { border-color: rgba(62,207,142,.4); box-shadow: 0 0 22px rgba(62,207,142,.10); }
.ind.s-ok::before { background: var(--good); box-shadow: 0 0 12px var(--good); }
.ind.s-watch { border-color: rgba(245,196,81,.45); }
.ind.s-watch::before { background: var(--warn); box-shadow: 0 0 12px var(--warn); }
.ind.s-bad { border-color: rgba(255,107,107,.6); box-shadow: 0 0 22px rgba(255,107,107,.15); }
.ind.s-bad::before { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.ind-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ind-kind { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ind-name { display: flex; align-items: center; gap: 8px; font: 700 15px var(--display); color: var(--white); }
.ind-name .ic { color: var(--blue); }
.ind-big { font: 700 28px/1.05 var(--display); color: var(--white); }
.ind-sub { font-size: 12.5px; color: var(--dim); }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.state.s-ok { color: var(--good); }
.state.s-watch { color: var(--warn); }
.state.s-bad { color: var(--bad); }
.state.s-none { color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.s-ok .dot, .live .dot { animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Product lines ---------- */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 110px 70px; gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.plist li:last-child { border-bottom: 0; }
.plist img { width: 34px; height: 34px; border-radius: 8px; }
.plist b { color: var(--white); display: block; font-size: 14.5px; }
.plist small { color: var(--dim); }
.plist .pnum { text-align: right; font-variant-numeric: tabular-nums; color: var(--white); font-weight: 600; white-space: nowrap; }
.plist .pnum small { font-weight: 400; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.pill.s-ok { color: var(--good); border-color: rgba(62,207,142,.45); background: rgba(62,207,142,.1); }
.pill.s-bad { color: var(--bad); border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.1); }
.pill.s-watch { color: var(--warn); border-color: rgba(245,196,81,.45); background: rgba(245,196,81,.1); }
.pill.s-none { color: var(--dim); border-color: var(--line); background: transparent; }
.spark { width: 110px; height: 30px; display: block; overflow: visible; }
.spark .sl { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(79,163,255,.6)); }
.spark .sa { fill: url(#sparkfill); }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pcard .pc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pcard .pc-head img { width: 44px; height: 44px; border-radius: 10px; }
.pcard .pc-head div { min-width: 0; flex: 1; }
.pcard .pc-head b { color: var(--white); font: 700 17px var(--display); display: block; }
.pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.pc-stats div { background: rgba(5,12,23,.6); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; }
.pc-stats dt { font-size: 11px; color: var(--dim); }
.pc-stats dd { margin: 0; font: 700 18px var(--display); color: var(--white); }
.pc-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Infrastructure ---------- */
.infra { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: center; }
.rackviz { width: 100%; max-width: 230px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 0 18px rgba(79,163,255,.35)); }
.rackviz .frame { fill: #071326; stroke: rgba(79,163,255,.6); stroke-width: 1.5; }
.rackviz .unit { fill: #0c1d34; stroke: rgba(79,163,255,.35); stroke-width: 1; }
.rackviz .vent { stroke: rgba(79,163,255,.25); stroke-width: 1; }
.rackviz .lbl { fill: var(--dim); font: 8.5px var(--mono); }
.rackviz .l-ok { fill: var(--good); filter: drop-shadow(0 0 3px var(--good)); animation: blink 2.6s infinite; }
.rackviz .l-bad { fill: var(--bad); filter: drop-shadow(0 0 4px var(--bad)); animation: blink 1s infinite; }
.rackviz .l-none { fill: #34506f; }
.rackviz .l-act { fill: var(--blue); animation: blink 1.7s infinite; }
.rackviz .base { fill: url(#rackglow); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(5,12,23,.55); }
.checks li .c-name { color: var(--white); font-weight: 500; }
.checks li .c-val { margin-left: auto; font-weight: 600; white-space: nowrap; text-align: right; }
.checks li small { color: var(--dim); font-size: 11.5px; }
.ok-ic, .bad-ic, .warn-ic, .none-ic { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--body); border: 1.5px solid; }
.ok-ic { color: var(--good); border-color: var(--good); }
.bad-ic { color: var(--bad); border-color: var(--bad); }
.warn-ic { color: var(--warn); border-color: var(--warn); }
.none-ic { color: var(--dim); border-color: var(--dim); }

/* Gauges */
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 120px; height: auto; display: block; margin: 0 auto; }
.gauge .g-track { fill: none; stroke: rgba(79,163,255,.12); stroke-width: 9; }
.gauge .g-val { fill: none; stroke: var(--blue); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(79,163,255,.7)); }
.gauge.g-orange .g-val { stroke: var(--orange); filter: drop-shadow(0 0 6px rgba(255,138,61,.7)); }
.gauge .g-num { fill: var(--white); font: 700 21px var(--display); }
.gauge .g-unit { fill: var(--dim); font: 10px var(--mono); }
.gauge b { display: block; color: var(--white); font-size: 13px; margin-top: 4px; }
.gauge small { color: var(--dim); }

/* Mini stat boxes */
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; container-type: inline-size; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 6px; min-width: 0; text-align: center; background: rgba(5,12,23,.6); }
.stat span { display: block; font-size: 11.5px; color: var(--dim); }
.stat b { display: block; font: 700 clamp(14px, 6.5cqi, 22px) var(--display); white-space: nowrap; color: var(--white); margin-top: 4px; }
.stat.s-ok { border-color: rgba(62,207,142,.5); box-shadow: 0 0 16px rgba(62,207,142,.12) inset; }
.stat.s-ok b { color: var(--good); }

/* ---------- Feeds, alerts, logs ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.feed li:last-child { border-bottom: 0; }
.feed .f-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--blue); background: rgba(79,163,255,.1); }
.feed .f-ic.o { color: var(--orange); background: rgba(255,138,61,.1); }
.feed .f-ic.g { color: var(--good); background: rgba(62,207,142,.1); }
.feed .f-ic.r { color: var(--bad); background: rgba(255,107,107,.1); }
.feed .f-ic.y { color: var(--warn); background: rgba(245,196,81,.1); }
.feed .f-main { min-width: 0; flex: 1; }
.feed .f-main b { color: var(--white); font-weight: 500; }
.feed .f-main small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.feed .f-when { color: var(--dim); font-size: 12px; white-space: nowrap; }
.sev { display: inline-flex; align-items: center; gap: 5px; font: 700 11px var(--body); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.sev-critical { color: #fff; background: rgba(255,107,107,.85); }
.sev-warning { color: #1e1600; background: var(--warn); }
.sev-info { color: var(--white); background: rgba(79,163,255,.25); }
.sev-ok { color: #022515; background: var(--good); }
.empty-ok { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid rgba(62,207,142,.4); border-radius: 10px; background: rgba(62,207,142,.06); color: #b5f0d4; }
.empty-ok .big-ok { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--good); color: var(--good); display: grid; place-items: center; font: 700 22px var(--body); box-shadow: 0 0 18px rgba(62,207,142,.35); flex: none; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters a { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); font-size: 12.5px; }
.filters a.on { background: rgba(255,138,61,.14); border-color: var(--orange); color: var(--white); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: rgba(79,163,255,.04); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t td b { color: var(--white); font-weight: 600; }
.t .url { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-cell { display: flex; gap: 10px; align-items: flex-start; min-width: 200px; }
.prod-cell img { flex: none; border-radius: 6px; }
.prod-cell small { display: block; line-height: 1.35; margin-top: 1px; }
.ext { margin-left: 8px; font-size: 12px; white-space: nowrap; }
.t td:last-child:has(.ext) { white-space: nowrap; }

/* Status: color always paired with a symbol and a word */
.status { font-weight: 600; white-space: nowrap; }
.status.up { color: var(--good); }
.status.down { color: var(--bad); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(79,163,255,.14); color: var(--text); white-space: nowrap; }
.badge-ok { background: rgba(62,207,142,.14); color: var(--good); }
.badge-warn { background: rgba(245,196,81,.14); color: var(--warn); }
.badge-hot { background: var(--orange); color: var(--orange-ink); }
.beads { display: flex; gap: 2px; align-items: center; height: 18px; }
.beads i { width: 5px; height: 16px; border-radius: 2px; background: var(--good); opacity: .85; cursor: default; }
.beads i.no { background: var(--bad); opacity: 1; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: rgba(79,163,255,.12); stroke-width: 1; }
.chart .axis { fill: var(--dim); font: 10px var(--mono); }
.chart .bar { fill: var(--blue); pointer-events: none; }
.chart .bar.o { fill: var(--orange); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar { fill: var(--blue-2); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(79,163,255,.6)); }
.chart .line.o { stroke: var(--orange); filter: drop-shadow(0 0 4px rgba(255,138,61,.6)); }
.chart .area { fill: url(#areafill); }
.chart .pt { fill: var(--bg); stroke: var(--blue); stroke-width: 2; }
.chart .pt.o { stroke: var(--orange); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: #040a14; color: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.5), 0 0 12px rgba(79,163,255,.2); }
.table-view { margin-top: 8px; }
.table-view summary, details > summary.linkish { cursor: pointer; color: var(--blue); font-size: 12px; }
.table-view table { margin-top: 8px; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li a b { color: var(--white); }
.list.tight li { padding: 0; border: 0; }
.list.tight a { display: block; padding: 7px 10px; border-radius: 6px; width: 100%; }
.list.tight a.on { background: rgba(255,138,61,.12); box-shadow: inset 2px 0 0 var(--orange); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 0; }
.facts dt { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.facts dd { margin: 2px 0 0; color: var(--white); }

/* ---------- Tasks ---------- */
.task-add { display: grid; grid-template-columns: 1fr 130px 140px auto; gap: 6px; margin-bottom: 10px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.tasks li.done .task-title { text-decoration: line-through; color: var(--dim); }
.check { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--blue); background: transparent; color: var(--good); cursor: pointer; font-weight: 700; line-height: 1; padding: 0; flex: none; }
.task-title { color: var(--white); }

/* ---------- Mail ---------- */
.mail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.mail-side h3 { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 8px; }
.mail-side h3 + .list { margin-bottom: 14px; }
.mail-side small { display: block; }
.search { display: flex; gap: 6px; margin-bottom: 12px; }
.msgs { list-style: none; margin: 0; padding: 0; }
.msgs li a { display: grid; grid-template-columns: 200px minmax(0, 1fr) 70px; gap: 12px; padding: 9px 8px; border-bottom: 1px solid var(--line-2); color: var(--text); }
.msgs li a:hover { background: rgba(79,163,255,.06); }
.msgs li.unread a { color: var(--white); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.m-from, .m-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-date { text-align: right; color: var(--dim); font-size: 12px; font-weight: 400; }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.msg-subject { font-size: 20px; margin-bottom: 10px; }
.msg-head { display: grid; gap: 3px; margin: 0 0 12px; font-size: 13px; }
.msg-head div { display: flex; gap: 8px; }
.msg-head dt { color: var(--dim); width: 44px; flex: none; }
.msg-head dd { margin: 0; color: var(--white); word-break: break-word; }
.msg-body { white-space: pre-wrap; word-break: break-word; font: 13px/1.6 var(--mono); background: #050c17; border: 1px solid var(--line-2); border-radius: 8px; padding: 14px; margin: 0; max-height: 70vh; overflow: auto; color: var(--text); }
.atts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.att { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; }
.att small { display: inline; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.lead.handled { opacity: .6; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 6px; margin: 4px 0 10px; }
.qr svg { display: block; }
.key { letter-spacing: .08em; }
.inline-details summary { list-style: none; }
.foot { color: var(--dim); font-size: 12px; padding: 16px 24px 24px; border-top: 1px solid var(--line-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1400px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid-3 > :last-child { grid-column: 1 / -1; }
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .inds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols, .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .me-text { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; }
  .menu-btn { display: grid; }
  .top-search { display: none; }
  .topbar { padding: 10px 14px; gap: 6px; }
  .content { padding: 16px 14px 24px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .infra { grid-template-columns: minmax(0, 1fr); }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { padding: 14px; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-ic { width: 38px; height: 38px; }
  .kpi-ic .ic { width: 20px; height: 20px; }
  .kpi-num { font-size: 21px; }
  .inds { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .ind-big { font-size: 22px; }
  .pcards { grid-template-columns: minmax(0, 1fr); }
  .plist li { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .plist .spark, .plist .pnum.wide { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-num { font-size: 22px; }
  .mail { grid-template-columns: minmax(0, 1fr); }
  .msgs li a { grid-template-columns: minmax(0, 1fr) 60px; }
  .m-subj { grid-column: 1 / -1; grid-row: 2; }
  .task-add { grid-template-columns: 1fr 1fr; }
  .task-add input[name=title] { grid-column: 1 / -1; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .top-title h1 { font-size: 18px; }
  .top-title p { display: none; }
  .stats3 { gap: 6px; }
  .stat b { font-size: clamp(14px, 6.5cqi, 18px); }
}

/* Big status ring (email health) */
.ring-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ring { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; font: 700 26px var(--body); color: var(--dim); }
.ring.s-ok { color: var(--good); box-shadow: 0 0 18px rgba(62,207,142,.35); }
.ring.s-watch { color: var(--warn); box-shadow: 0 0 18px rgba(245,196,81,.3); }
.ring.s-bad { color: var(--bad); box-shadow: 0 0 18px rgba(255,107,107,.35); }

/* Fit inside a third-width panel */
.grid-3 .infra { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.checks li { min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.checks li .c-name { white-space: nowrap; }
.plist li { grid-template-columns: 34px minmax(0, 1fr) auto 84px 52px; gap: 10px; }
.plist small { display: block; line-height: 1.35; }
.plist > li > div { min-width: 0; }
.spark { width: 84px; }
@media (max-width: 1400px) { .grid-3 .infra { grid-template-columns: 150px minmax(0, 1fr); } }
@media (max-width: 960px) { .grid-3 .infra { grid-template-columns: minmax(0, 1fr); } .grid-3 .rackviz { max-width: 170px; } }

/* Progress meter (engagement, conversion) */
.meter { height: 8px; border-radius: 99px; background: rgba(79,163,255,.12); overflow: hidden; margin: 4px 0 3px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--blue); box-shadow: 0 0 8px rgba(79,163,255,.6); }
.meter.o i { background: var(--orange); box-shadow: 0 0 8px rgba(255,138,61,.6); }

.c-val a, .btn .ic { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.c-val a .ic { display: inline-block; }

/* Phone fixes (kept last so they win over the panel-fit rules above) */
@media (max-width: 720px) {
  .ind-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .plist li { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .plist .spark, .plist .pnum.wide { display: none; }
  .grid-3 .rackviz { max-width: 150px; }
  .kpi-label { line-height: 1.25; }
}

/* Product Lines rows: status pill sits beside the name so the description gets the full width */
.plist li { grid-template-columns: 34px minmax(0, 1fr) 84px 56px; }
.plist .p-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.plist .p-top b { display: inline; }
.plist .p-top .pill { padding: 1px 8px; font-size: 11px; }
@media (max-width: 720px) { .plist li { grid-template-columns: 34px minmax(0, 1fr); } }

/* Modern scrollbars: thin, rounded, in the console colors */
* { scrollbar-width: thin; scrollbar-color: rgba(79,163,255,.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(79,163,255,.28); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(79,163,255,.55); }
::-webkit-scrollbar-button { display: none; }

/* Six headline numbers in one row only when each card has room for its text */
@media (max-width: 1700px) and (min-width: 721px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Inbox: unread count beside each mailbox */
.list.tight a.mbox { display: flex; align-items: center; gap: 10px; }
.mbox-name { flex: 1; min-width: 0; }
.mbox-name small { overflow-wrap: anywhere; }
.ucount { flex: none; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; font: 700 12px var(--body); color: #1a0c02; background: var(--orange); box-shadow: 0 0 10px rgba(255,138,61,.45); }
.ucount.u-zero { color: var(--dim); background: transparent; border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
.ucount.u-err { color: var(--bad); background: transparent; border: 1px solid rgba(255,107,107,.5); box-shadow: none; }

/* Four headline numbers (Email & Domains, Users & Access): 4 across, 2 across on smaller screens */
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Email: long subjects, addresses, links, IDs and file names wrap instead of running off a phone screen */
.mail > * { min-width: 0; }
.mail-main { overflow-wrap: anywhere; }
.msg-subject { overflow-wrap: anywhere; word-break: normal; }
.msg-head div { min-width: 0; }
.msg-head dd { min-width: 0; overflow-wrap: anywhere; }
.msg-body { overflow-wrap: anywhere; word-break: normal; max-width: 100%; }
.atts { min-width: 0; }
.att { max-width: 100%; overflow-wrap: anywhere; }
.mail-main input, .mail-main textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 720px) {
  .msg-subject { font-size: 17px; }
  .msg-body { font-size: 12.5px; padding: 12px; }
  .msg-actions .btn { flex: 1 1 auto; text-align: center; }
}
/* Phone: while reading or writing an email, show it first (the Back button returns to the mailbox list) */
@media (max-width: 720px) { .mail.reading .mail-side { display: none; } }

/* Phones (and phones with a larger text setting): nothing may run out of its card */
.kpi-body, .kpi-label, .kpi-sub, .ind, .checks li, .plist li > div { overflow-wrap: break-word; }
.checks li .c-name { white-space: normal; min-width: 0; flex: 1 1 auto; overflow-wrap: break-word; }
.checks li .c-addr { display: block; color: var(--dim); font-weight: 400; font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .top-title h1 { font-size: 18px; }
  .checks li .c-val { white-space: normal; }
}
/* Small phones: headline cards one per row so the words have room */
@media (max-width: 520px) {
  .kpis, .kpis.k4 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kpi { padding: 12px 14px; }
}
/* Mailbox rows on phones: status goes under the address so the address stays in one piece */
@media (max-width: 720px) {
  .checks li:has(.c-addr) .c-val { flex-basis: 100%; margin-left: 0; padding-left: 30px; text-align: left; }
  .checks li .c-addr { overflow-wrap: break-word; }
}

/* Phones: tables as stacked cards (labels come from console.js), so nothing scrolls sideways */
@media (max-width: 720px) {
  table.t.stackable, table.t.stackable tbody, table.t.stackable tr, table.t.stackable td { display: block; width: auto; }
  table.t.stackable thead { display: none; }
  table.t.stackable tr { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; background: rgba(5,12,23,.55); }
  table.t.stackable td { display: block; padding: 5px 0; border: 0; text-align: left; white-space: normal; overflow-wrap: break-word; min-width: 0; max-width: none; }
  table.t.stackable td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; text-align: left; color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  table.t.stackable td:first-child { display: block; text-align: left; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
  table.t.stackable td:first-child::before { display: none; }
  table.t.stackable td[colspan] { display: block; text-align: left; }
  table.t.stackable td:empty { display: none; }
  table.t.stackable td > * { min-width: 0; }
  .table-wrap:has(table.stackable) { overflow: visible; }
}
/* To-do rows wrap on phones: title takes the row, the product, due date and Delete go underneath */
.tasks li { flex-wrap: wrap; min-width: 0; }
.task-title { flex: 1 1 160px; min-width: 0; overflow-wrap: break-word; }
.tasks .inline.right { margin-left: auto; }
@media (max-width: 520px) { .task-add { grid-template-columns: minmax(0, 1fr); } .task-add > * { min-width: 0; } }

/* Same stacked cards for any table too wide for its panel (tablets, narrow windows); console.js adds .stacked */
table.t.stacked, table.t.stacked tbody, table.t.stacked tr, table.t.stacked td { display: block; width: auto; }
table.t.stacked thead { display: none; }
table.t.stacked tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
table.t.stacked tr { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; background: rgba(5,12,23,.55); }
table.t.stacked td { padding: 5px 0; border: 0; text-align: left; white-space: normal; overflow-wrap: break-word; min-width: 0; max-width: none; }
table.t.stacked td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
table.t.stacked td:first-child { padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
table.t.stacked td:first-child::before { display: none; }
table.t.stacked td:empty { display: none; }
table.t.stacked td[colspan] { grid-column: 1 / -1; }
.table-wrap:has(table.stacked) { overflow: visible; }
@media (max-width: 720px) { table.t.stacked tbody { display: block; } table.t.stacked tr { margin-bottom: 8px; } }

/* Inside a stacked card, short values sit in a small grid (label above value); long ones take the full row */
table.t.stackable tr, table.t.stacked tr { column-gap: 14px; }
@media (max-width: 720px) {
  table.t.stackable tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  table.t.stackable td:first-child, table.t.stackable td.wide, table.t.stackable td[colspan] { grid-column: 1 / -1; }
}
table.t.stacked tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); align-content: start; }
table.t.stacked td:first-child, table.t.stacked td.wide, table.t.stacked td[colspan] { grid-column: 1 / -1; }
