:root {
  color-scheme: dark;
  --accent: #7c8cff;
  --mint: #45d6bd;
  --bg: #10131c;
  --sidebar: #0c0f17;
  --panel: #171b27;
  --panel-raised: #1c2130;
  --line: rgba(165, 176, 205, .12);
  --text: #edf0f7;
  --muted: #8d96aa;
  --soft: #b7bfd0;
  --danger: #ff6d82;
  --shadow: 0 14px 40px rgba(0, 0, 0, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 1.8; }
body[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5fa;
  --sidebar: #fff;
  --panel: #fff;
  --panel-raised: #f7f8fc;
  --line: rgba(40, 50, 75, .12);
  --text: #202538;
  --muted: #737d92;
  --soft: #505b72;
  --shadow: 0 12px 35px rgba(32, 45, 80, .07);
}
body[data-theme="spring"] {
  --accent: #f08ca9;
  --mint: #83d6a1;
  --bg: #17151c;
  --sidebar: #111118;
  --panel: #211e28;
  --panel-raised: #2a2632;
  --line: rgba(224, 184, 205, .14);
}
body[data-theme="summer"] {
  --accent: #ffc857;
  --mint: #4bd7c5;
  --bg: #17171b;
  --sidebar: #111216;
  --panel: #22232a;
  --panel-raised: #2c2d34;
  --line: rgba(233, 207, 142, .14);
}
body[data-theme="autumn"] {
  --accent: #e99a55;
  --mint: #c5b36c;
  --bg: #191512;
  --sidebar: #120f0d;
  --panel: #241e19;
  --panel-raised: #30271f;
  --line: rgba(224, 172, 125, .14);
}
body[data-theme="winter"] {
  --accent: #8bc9f5;
  --mint: #80dfd4;
  --bg: #12171d;
  --sidebar: #0c1117;
  --panel: #19212a;
  --panel-raised: #202b36;
  --line: rgba(164, 205, 235, .15);
}
body[data-theme="halloween"] {
  --accent: #ff8a36;
  --mint: #b7dc64;
  --bg: #17121a;
  --sidebar: #100d14;
  --panel: #211923;
  --panel-raised: #2b202f;
  --line: rgba(223, 148, 88, .16);
}
body[data-theme="christmas"] {
  --accent: #e66c73;
  --mint: #61cf91;
  --bg: #141816;
  --sidebar: #0d1210;
  --panel: #1b2420;
  --panel-raised: #24302a;
  --line: rgba(152, 205, 171, .15);
}
body[data-theme="valentines"] {
  --accent: #f17fa8;
  --mint: #ce8bd2;
  --bg: #19131a;
  --sidebar: #110d13;
  --panel: #241b26;
  --panel-raised: #302333;
  --line: rgba(226, 158, 194, .15);
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: 250px; flex-direction: column; padding: 27px 16px 18px; background: var(--sidebar); border-right: 1px solid var(--line); transition: transform .24s ease; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 48px; font-size: 16px; font-weight: 750; letter-spacing: -.5px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; color: white; border-radius: 12px; background: linear-gradient(140deg, #8b8bff, #626ee7); box-shadow: 0 6px 18px #666be644; }
.brand-mark svg { width: 21px; height: 21px; }
.brand-light { color: var(--accent); }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.nav-caption, .eyebrow { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 1.35px; }
.nav-caption { padding: 0 12px 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; color: var(--muted); border: 0; border-radius: 9px; background: transparent; text-align: left; font-size: 12px; transition: background .18s, color .18s; }
.nav-link:hover { color: var(--text); background: var(--panel-raised); }
.nav-link.active { color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 2px 0 var(--accent); }
body[data-theme="light"] .nav-link.active { color: #5353c9; }
.nav-link.active svg { color: var(--accent); }
.nav-link svg { width: 17px; height: 17px; }
.nav-lock { margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .5px; }
.sidebar-bottom { display: grid; gap: 12px; margin-top: auto; }
.server-mini { display: flex; align-items: center; gap: 11px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.server-mini b, .server-mini small { display: block; }
.server-mini b { font-size: 11px; font-weight: 650; }
.server-mini small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #e6a84b; box-shadow: 0 0 0 4px #e6a84b1c; }
.online .status-dot, .server-mini.online .status-dot { background: #48cf9a; box-shadow: 0 0 0 4px #48cf9a20; }
.offline .status-dot { background: var(--danger); box-shadow: 0 0 0 4px #ff6d821d; }
.logout-button { width: 100%; }
.main-column { width: calc(100% - 250px); min-width: 0; margin-left: 250px; }
.topbar { position: sticky; z-index: 10; top: 0; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); }
.breadcrumbs { color: var(--muted); font-size: 11px; }
.breadcrumbs span { margin: 0 9px; color: #555d70; }
.breadcrumbs b { color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.connection-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: 10px; }
.connection-pill .status-dot { width: 6px; height: 6px; }
.connection-pill.online { color: var(--mint); }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; color: var(--soft); border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.icon-button:hover { color: var(--text); border-color: #7778ec77; }
.icon-button svg { width: 16px; height: 16px; }
.mobile-menu { display: none; }
.avatar { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #8787ff44; border-radius: 50%; color: #c3c4ff; background: #7778ec22; font-size: 9px; font-weight: 700; }
.content { width: min(1380px, 100%); margin: 0 auto; padding: 35px 38px 25px; }
.page-heading { display: flex; min-height: 96px; align-items: flex-end; justify-content: space-between; margin-bottom: 23px; }
.page-heading .eyebrow { margin: 0 0 9px; color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 31px); font-weight: 680; letter-spacing: -1.1px; }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.updated-label { color: var(--muted); font-size: 10px; }
.updated-label b { margin-left: 5px; color: var(--soft); font-weight: 550; }
.toast { position: fixed; z-index: 40; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 17px; transform: translateY(12px); border: 1px solid var(--line); border-radius: 10px; opacity: 0; color: var(--text); background: var(--panel-raised); box-shadow: var(--shadow); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #ff6d8250; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 16px; }
.card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); }
.metric-card { position: relative; min-height: 137px; overflow: hidden; }
.metric-card::after { position: absolute; right: -25px; bottom: -48px; width: 125px; height: 100px; border-radius: 50%; background: var(--glow, #8584ff); content: ""; filter: blur(52px); opacity: .14; }
.metric-card.purple { --glow: #8d80ff; }
.metric-card.mint { --glow: #45d6bd; }
.metric-card.blue { --glow: #5da9ff; }
.metric-card.orange { --glow: #ffae67; }
.metric-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric-head svg { color: var(--accent); }
.metric-card strong { display: block; margin: 17px 0 5px; font-size: clamp(20px, 2vw, 26px); font-weight: 680; letter-spacing: -.7px; }
.metric-card small { color: var(--muted); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.wide { grid-column: span 2; }
.chart-card { min-height: 230px; }
.chart-card.wide { min-height: 284px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-heading h2 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: -.15px; }
.card-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.live-tag { display: flex; align-items: center; gap: 6px; color: var(--mint); font-size: 8px; font-weight: 750; letter-spacing: .9px; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.chart-wrap { position: relative; height: 135px; }
.chart-wrap.tall { height: 260px; }
.progress-row { margin-top: 17px; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.progress-label b { color: var(--soft); font-weight: 550; }
.progress-track { height: 6px; overflow: hidden; border-radius: 8px; background: var(--panel-raised); }
.progress-track span { display: block; height: 100%; min-width: 1px; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #b195ff); transition: width .4s ease; }
.split-stats { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.split-stats b { display: block; margin-top: 4px; color: var(--text); font-weight: 550; }
.network-stats { display: flex; flex-wrap: wrap; gap: 20px; padding: 3px 0 16px; color: var(--muted); font-size: 10px; }
.network-stats span { display: flex; align-items: center; gap: 7px; }
.network-stats b { color: var(--text); font-size: 12px; }
.download-icon, .upload-icon { font-size: 16px; font-style: normal; color: var(--mint); }
.upload-icon { color: #8c8dff; }
.interface-list { display: grid; gap: 10px; }
.interface-list span, .system-facts span, .detail-list span, .volume-meta span { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.interface-list b, .system-facts b, .detail-list b, .volume-meta b { color: var(--soft); font-weight: 550; text-align: right; }
.system-card, .storage-card { min-height: 195px; }
.health-pill, .count-pill { padding: 6px 9px; border: 1px solid #45d6bd35; border-radius: 20px; color: var(--mint); background: #45d6bd0d; font-size: 9px; white-space: nowrap; }
.system-facts { display: grid; gap: 13px; }
.text-link { color: var(--accent); font-size: 10px; }
.empty-note { padding: 12px 0; color: var(--muted); font-size: 11px; }
.footer { display: flex; justify-content: center; gap: 8px; margin-top: 26px; padding: 15px 0; color: var(--muted); font-size: 9px; }
.core-card { grid-column: span 2; }
.core-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
.core-item > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.core-item b { color: var(--soft); font-weight: 550; }
.table-card { padding: 22px; }
.table-toolbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.search-box { display: flex; width: min(360px, 100%); height: 39px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--panel-raised); }
.search-box svg { width: 15px; height: 15px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.sort-select { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; }
.sort-select select, select, input:not([type="checkbox"]):not([type="color"]), textarea { color: var(--text); }
.sort-select select, .field select, .field input:not([type="checkbox"]):not([type="color"]), .field textarea { min-height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--panel-raised); }
select option { color: var(--text); background: var(--panel); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; }
td { padding: 13px 12px; color: var(--soft); border-bottom: 1px solid var(--line); font-size: 11px; }
tr:last-child td { border-bottom: 0; }
.process-name { max-width: 340px; color: var(--text); font-weight: 560; }
.state-chip { padding: 4px 7px; border-radius: 5px; color: var(--muted); background: var(--panel-raised); font-size: 9px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; color: var(--muted); font-size: 10px; }
.pagination div { display: flex; gap: 7px; }
.pagination button, .secondary-button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--soft); background: var(--panel-raised); font-size: 10px; }
.pagination button:disabled, button:disabled { cursor: not-allowed; opacity: .5; }
.info-card { padding: 24px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.info-item { display: grid; gap: 7px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-item span { color: var(--muted); font-size: 10px; }
.info-item b { overflow-wrap: anywhere; color: var(--text); font-size: 12px; font-weight: 550; }
.volume-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.volume-card { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); }
.volume-title { display: flex; align-items: center; gap: 10px; }
.volume-title > svg { color: var(--accent); }
.volume-title span { display: grid; flex: 1; gap: 4px; }
.volume-title b { font-size: 11px; font-weight: 600; }
.volume-title small { color: var(--muted); font-size: 9px; }
.volume-title strong { color: var(--soft); font-size: 10px; }
.volume-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; }
.subheading { margin: 25px 0 10px; font-size: 12px; }
.device-list { display: grid; gap: 8px; }
.device-list > div { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.device-list span { color: var(--text); }
.device-list b { margin-left: auto; color: var(--muted); font-weight: 500; }
.device-list small { color: var(--soft); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.settings-card { display: grid; align-content: start; gap: 15px; }
.settings-card .card-heading { margin-bottom: 2px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 85px; padding: 10px; resize: vertical; }
.inline-field { display: flex; align-items: center; justify-content: space-between; }
.field input[type="checkbox"], fieldset input[type="checkbox"] { accent-color: var(--accent); }
fieldset.field { padding: 0; border: 0; }
fieldset.field legend { margin-bottom: 9px; }
fieldset.field label { display: inline-flex; align-items: center; gap: 6px; margin: 0 13px 8px 0; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input, .field input[type="color"] { width: 39px; height: 34px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-raised); }
#accent-preview { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; }
.form-actions { display: flex; grid-column: 1 / -1; gap: 10px; }
.primary-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 0; border-radius: 8px; color: #fff; background: linear-gradient(110deg, #7778ea, #6869ce); box-shadow: 0 7px 18px #7778ea26; font-size: 11px; font-weight: 650; }
.primary-button:hover:not(:disabled) { filter: brightness(1.09); }
.primary-button svg { width: 15px; height: 15px; }
.global-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; border-color: #7778ea30; }
.global-banner h2 { margin: 8px 0 5px; font-size: 15px; }
.global-banner p { max-width: 670px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.global-banner .eyebrow { color: var(--accent); }
.locked { opacity: .62; }
.locked input, .locked select, .locked textarea, .locked button { pointer-events: none; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 26px; background: var(--bg); }
.login-card { z-index: 2; width: min(430px, 100%); padding: 41px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 24px 90px #0005; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; }
.login-brand b { font-size: 16px; }
.login-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.login-card .eyebrow { margin-bottom: 9px; color: var(--accent); }
.login-card h1 { margin: 0 0 9px; font-size: 29px; letter-spacing: -1px; }
.login-copy { margin-bottom: 28px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap svg { position: absolute; left: 12px; color: var(--muted); }
.password-wrap input { width: 100%; min-height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--panel-raised); }
.password-wrap input:focus { border-color: var(--accent); }
.login-error { min-height: 18px; margin: 8px 0; color: var(--danger); font-size: 10px; }
.login-submit { width: 100%; min-height: 44px; justify-content: space-between; padding: 0 15px; }
.login-foot { display: flex; align-items: center; gap: 9px; margin-top: 28px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.login-foot .status-dot { width: 6px; height: 6px; background: var(--mint); box-shadow: 0 0 0 4px #45d6bd20; }
.login-decoration { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: #696ce933; filter: blur(80px); }
.orb-one { top: -190px; right: -130px; }
.orb-two { bottom: -270px; left: -120px; background: #45d6bd15; }
.decoration-lines { position: absolute; inset: 0; background-image: linear-gradient(#ffffff07 1px, transparent 1px), linear-gradient(90deg, #ffffff07 1px, transparent 1px); background-size: 58px 58px; mask-image: radial-gradient(ellipse at 75% 55%, black, transparent 65%); }
.login-caption { position: absolute; right: 9%; bottom: 11%; color: #9da5ba; font-size: 10px; line-height: 2; letter-spacing: 1.7px; }
.login-caption strong { display: block; color: #f1f2ff; font-size: 34px; font-weight: 580; letter-spacing: -1px; }
.login-caption span { display: block; margin-top: 7px; color: #939bb0; font-size: 11px; letter-spacing: 0; }
.spinner { width: 15px; height: 15px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fatal-error { display: grid; min-height: 100vh; align-content: center; justify-items: center; padding: 30px; text-align: center; }
.fatal-error p { color: var(--muted); }
body[data-density="compact"] .card { padding: 15px; }
body[data-density="compact"] .metric-card { min-height: 120px; }
@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .main-column { width: calc(100% - 220px); margin-left: 220px; }
  .content { padding: 28px 25px 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 0 25px; }
  .login-caption { right: 4%; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-column { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { height: 59px; justify-content: flex-start; gap: 14px; padding: 0 16px; }
  .breadcrumbs { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .top-actions { gap: 9px; }
  .connection-pill { padding: 6px 7px; }
  .connection-pill span { display: none; }
  .avatar { display: none; }
  .content { padding: 25px 16px 18px; }
  .page-heading { min-height: 84px; align-items: flex-start; gap: 10px; }
  .updated-label { padding-top: 27px; white-space: nowrap; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .wide, .core-card { grid-column: auto; }
  .chart-card.wide { min-height: 245px; }
  .chart-wrap.tall { height: 210px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .form-actions { grid-column: auto; }
  .core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid, .volume-grid { grid-template-columns: minmax(0, 1fr); }
  .login-caption { display: none; }
}
@media (max-width: 480px) {
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 123px; padding: 14px; }
  .metric-card strong { font-size: 21px; }
  .card { padding: 16px; }
  .page-heading { display: block; }
  .updated-label { padding-top: 10px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .sort-select { justify-content: space-between; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .global-banner { align-items: flex-start; flex-direction: column; }
  .login-card { padding: 30px 24px; }
  .device-list > div { align-items: flex-start; flex-direction: column; gap: 6px; }
  .device-list b { margin-left: 0; }
}