:root {
    color-scheme: dark;
    --bg: #060a12;
    --panel: rgba(14, 21, 34, .72);
    --panel-strong: rgba(18, 27, 43, .92);
    --border: rgba(150, 172, 212, .12);
    --border-bright: rgba(129, 233, 255, .2);
    --text: #eef4ff;
    --muted: #7f8da8;
    --cyan: #50e9ff;
    --cyan-rgb: 80, 233, 255;
    --violet: #9f7bff;
    --violet-rgb: 159, 123, 255;
    --pink: #ff6fd8;
    --pink-rgb: 255, 111, 216;
    --lime: #a9ef62;
    --lime-rgb: 169, 239, 98;
    --danger: #ff6b85;
    --success: #68edb0;
    --radius: 18px;
    --sidebar: 248px;
    --shadow: 0 22px 60px rgba(0, 0, 0, .3);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 85% -10%, #19274b 0, transparent 32%), linear-gradient(145deg, #050810 0%, #08101d 55%, #070b13 100%); overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
a { color: var(--cyan); }
.hidden { display: none !important; }
.glass { background: linear-gradient(145deg, rgba(19, 29, 47, .78), rgba(9, 15, 26, .7)); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,.025), var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .18; }
.ambient-one { width: 460px; height: 460px; background: #245bff; top: -230px; right: -120px; }
.ambient-two { width: 380px; height: 380px; background: #8339ba; bottom: -220px; left: 26%; }
.brand { height: 74px; display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.brand b { color: var(--cyan); font-weight: 750; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #4edff6, #4777ff); color: #04101c; font-weight: 900; box-shadow: 0 0 25px rgba(var(--cyan-rgb), .28); }
.brand-large { font-size: 19px; }
.brand-large .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.live-dot, .status-orb { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px rgba(104, 237, 176, .7); }

/* Authentication */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); padding: 26px; gap: 24px; }
.auth-showcase { padding: clamp(30px, 5vw, 76px); border-radius: 28px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 68% 40%, rgba(53, 112, 255, .2), transparent 28%), linear-gradient(145deg, rgba(8, 17, 31, .9), rgba(7, 12, 21, .75)); border: 1px solid rgba(140, 173, 220, .1); }
.auth-showcase::after { content: ""; position: absolute; width: 440px; height: 440px; right: -70px; top: 19%; border-radius: 50%; border: 1px solid rgba(80,233,255,.1); box-shadow: inset 0 0 60px rgba(80,233,255,.05), 0 0 90px rgba(81,89,255,.09); }
.auth-showcase::before { content: ""; position: absolute; width: 320px; height: 320px; right: -10px; top: 25%; border-radius: 50%; border: 1px dashed rgba(169,239,98,.14); animation: rotate 40s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.showcase-copy { max-width: 690px; position: relative; z-index: 1; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-size: 10px; font-weight: 750; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; }
.showcase-copy h1 { margin: 0; font-size: clamp(46px, 6vw, 90px); letter-spacing: -.065em; line-height: .97; font-weight: 760; }
.showcase-copy h1 span { background: linear-gradient(90deg, var(--cyan), #8da4ff 55%, var(--violet)); -webkit-background-clip: text; color: transparent; }
.showcase-copy > p { max-width: 580px; color: #94a4bf; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.65; }
.showcase-metrics { display: flex; gap: 42px; margin-top: 45px; }
.showcase-metrics div { display: flex; flex-direction: column; gap: 5px; }
.showcase-metrics strong { font-size: 22px; }
.showcase-metrics span { font-size: 12px; color: var(--muted); }
.auth-card { border-radius: 28px; padding: clamp(32px, 5vw, 68px); display: flex; flex-direction: column; justify-content: center; max-width: 620px; width: 100%; justify-self: center; }
.mobile-brand { display: none; }
.auth-heading h2 { margin: 10px 0 8px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }
.auth-heading p { margin: 0 0 32px; color: var(--muted); }
form label { display: grid; gap: 9px; color: #aebbd0; font-size: 12px; font-weight: 600; margin-bottom: 18px; }
input, textarea, select { width: 100%; border: 1px solid rgba(138, 163, 201, .16); background: rgba(4, 9, 17, .72); color: var(--text); border-radius: 11px; padding: 13px 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, textarea:focus, select:focus { border-color: rgba(var(--cyan-rgb), .52); box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), .08); background: rgba(5, 12, 22, .9); }
textarea { resize: vertical; line-height: 1.5; }
.form-error { color: var(--danger); min-height: 18px; margin: -5px 0 12px; font-size: 12px; }
.btn { border: 1px solid transparent; padding: 11px 17px; border-radius: 11px; font-weight: 700; font-size: 12px; display: inline-flex; gap: 10px; justify-content: center; align-items: center; transition: transform .2s, filter .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary { background: linear-gradient(135deg, #53e6f8, #5578f3); color: #06101d; box-shadow: 0 9px 28px rgba(68, 174, 255, .17); }
.btn-secondary { background: rgba(116, 140, 183, .08); color: #c4d0e2; border-color: var(--border); }
.btn-danger { background: rgba(255, 86, 120, .1); color: #ff8da2; border-color: rgba(255, 86, 120, .18); }
.btn-wide { width: 100%; min-height: 47px; justify-content: space-between; padding-left: 20px; padding-right: 18px; }
.btn-wide i { font-size: 20px; font-style: normal; }
.auth-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; display: flex; gap: 8px; justify-content: center; }
.auth-note span { color: var(--cyan); }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); padding: 0 18px 18px; background: rgba(5, 9, 16, .88); border-right: 1px solid var(--border); backdrop-filter: blur(22px); display: flex; flex-direction: column; }
.sidebar .brand { padding-left: 10px; }
.main-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 18px; }
.nav-item { border: 1px solid transparent; background: transparent; height: 43px; border-radius: 10px; display: flex; align-items: center; gap: 12px; padding: 0 13px; color: #7988a3; text-align: left; }
.nav-item span { width: 22px; font-size: 18px; text-align: center; font-weight: 400; }
.nav-item b { font-size: 12px; font-weight: 650; }
.nav-item:hover { color: #c6d3e8; background: rgba(114, 142, 189, .05); }
.nav-item.active { color: var(--cyan); background: linear-gradient(90deg, rgba(var(--cyan-rgb), .12), rgba(var(--cyan-rgb), .025)); border-color: rgba(var(--cyan-rgb), .1); box-shadow: inset 3px 0 var(--cyan); }
.nav-label { margin: 23px 13px 8px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #49566b; font-weight: 800; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 16px 7px 0; display: flex; align-items: center; gap: 8px; }
.agent-health { min-width: 0; display: flex; align-items: center; gap: 10px; flex: 1; }
.agent-health > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.agent-health b { font-size: 10px; color: #b8c5d9; }
.agent-health small { color: #5d6b82; font-size: 9px; }
.icon-button, .menu-button, .avatar, .modal-close { border: 1px solid var(--border); background: rgba(116, 140, 183, .055); border-radius: 10px; width: 37px; height: 37px; display: grid; place-items: center; color: #94a4bc; }
.icon-button:hover, .menu-button:hover, .modal-close:hover { border-color: var(--border-bright); color: var(--cyan); }
.main-content { margin-left: var(--sidebar); padding: 0 clamp(18px, 3vw, 38px) 44px; min-width: 0; }
.topbar { height: 86px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.menu-button { display: none; }
.page-title { min-width: 0; }
.page-title span { font-size: 9px; color: #526178; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.page-title h1 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.02em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.server-picker { width: 215px; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border-radius: 11px; border: 1px solid var(--border); background: rgba(9, 15, 26, .8); }
.server-picker select { border: 0; background: transparent; padding: 0; height: 100%; font-size: 11px; font-weight: 650; min-width: 0; appearance: none; }
.server-picker i { color: var(--muted); font-style: normal; }
.avatar { color: #07101d; border-color: transparent; background: linear-gradient(135deg, var(--cyan), #7f7cff); font-weight: 850; }
.notice { margin: 0 0 18px; border: 1px solid rgba(var(--cyan-rgb), .2); background: rgba(var(--cyan-rgb), .075); border-radius: 11px; padding: 12px 15px; color: #bdeef6; font-size: 12px; }
.view { display: none; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }

/* Overview */
.hero { min-height: 204px; border-radius: var(--radius); padding: clamp(24px, 3vw, 34px); display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 360px; height: 360px; right: -90px; top: -160px; background: radial-gradient(circle, rgba(var(--cyan-rgb), .13), transparent 65%); }
.server-line { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; background: rgba(104, 237, 176, .08); border: 1px solid rgba(104, 237, 176, .15); border-radius: 999px; color: var(--success); text-transform: uppercase; letter-spacing: .09em; font-weight: 800; font-size: 8px; }
.status-pill i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; box-shadow: 0 0 9px currentColor; }
.status-pill.offline { color: var(--danger); background: rgba(255,107,133,.08); border-color: rgba(255,107,133,.15); }
.hero h2 { margin: 13px 0 5px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.hero-copy > p { margin: 0; color: var(--muted); font-size: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 28px; }
.hero-facts > div { display: grid; gap: 4px; min-width: 120px; position: relative; }
.hero-facts small { color: #65738a; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.hero-facts strong { font-size: 12px; color: #c9d5e8; font-variant-numeric: tabular-nums; }
.reveal-button { position: absolute; left: 0; top: 31px; border: 0; background: none; color: var(--cyan); font-size: 8px; padding: 0; }
.health-ring { --score: 0; flex: 0 0 132px; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cyan) calc(var(--score) * 1%), rgba(122, 145, 177, .08) 0); box-shadow: 0 0 35px rgba(var(--cyan-rgb), .08); position: relative; }
.health-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0b1220; border: 1px solid var(--border); }
.health-ring div { position: relative; display: flex; flex-direction: column; align-items: center; }
.health-ring strong { font-size: 32px; letter-spacing: -.06em; }
.health-ring span { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.metric-card { min-width: 0; border-radius: var(--radius); padding: 19px; overflow: hidden; position: relative; }
.metric-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; top: -70px; right: -35px; background: rgba(var(--accent), .1); filter: blur(20px); }
.accent-cyan { --accent: var(--cyan-rgb); --accent-color: var(--cyan); }
.accent-violet { --accent: var(--violet-rgb); --accent-color: var(--violet); }
.accent-pink { --accent: var(--pink-rgb); --accent-color: var(--pink); }
.accent-lime { --accent: var(--lime-rgb); --accent-color: var(--lime); }
.metric-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.metric-card > header > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.metric-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 34px; font-size: 8px; font-weight: 900; color: var(--accent-color); background: rgba(var(--accent), .08); border: 1px solid rgba(var(--accent), .13); }
.metric-card h3 { margin: 0 0 3px; font-size: 12px; }
.metric-card header p { margin: 0; font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card header > strong { color: var(--accent-color); font-size: 19px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sparkline { width: 100%; height: 76px; display: block; margin: 14px 0 10px; }
.metric-stats { border-top: 1px solid var(--border); padding-top: 11px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.metric-stats div { min-width: 0; display: grid; gap: 4px; }
.metric-stats span { font-size: 8px; color: #5e6d84; }
.metric-stats b { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.network-card { border-radius: var(--radius); padding: 22px; margin-top: 14px; }
.section-header, .content-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-header > div:first-child { display: flex; align-items: center; gap: 11px; }
.section-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(var(--cyan-rgb), .08); border: 1px solid rgba(var(--cyan-rgb), .13); font-size: 19px; }
.section-header h2, .content-header h2 { margin: 0 0 4px; font-size: 15px; }
.section-header p, .content-header p { margin: 0; color: var(--muted); font-size: 9px; }
.live-badge { font-size: 8px; text-transform: uppercase; letter-spacing: .1em; color: var(--success); border: 1px solid rgba(104,237,176,.13); background: rgba(104,237,176,.06); border-radius: 999px; padding: 6px 9px; }
.live-badge span { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px currentColor; }
.network-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .75fr); gap: 24px; margin-top: 15px; }
.network-chart-wrap { min-width: 0; }
.big-chart { width: 100%; height: 160px; display: block; }
.chart-legend { display: flex; gap: 17px; color: var(--muted); font-size: 8px; }
.chart-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
.legend-down { background: var(--cyan); }.legend-up { background: var(--violet); }
.network-readings { border-left: 1px solid var(--border); padding-left: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.speed { min-width: 0; display: flex; gap: 9px; align-items: center; padding: 11px; border-radius: 12px; background: rgba(102, 126, 164, .04); border: 1px solid var(--border); }
.speed > span { flex: 0 0 29px; width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; }
.speed.download > span { color: var(--cyan); background: rgba(var(--cyan-rgb), .08); }.speed.upload > span { color: var(--violet); background: rgba(var(--violet-rgb), .08); }
.speed div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.speed small { color: var(--muted); font-size: 8px; }.speed strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.speed em { color: #58677d; font-size: 7px; font-style: normal; }
.network-totals { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.network-totals div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 3px; border-bottom: 1px solid rgba(126,151,189,.07); }
.network-totals span { font-size: 8px; color: var(--muted); }.network-totals b { font-size: 9px; }

/* Secondary views */
.content-header { margin: 6px 0 20px; }
.content-header h2 { font-size: 20px; letter-spacing: -.025em; }
.period-picker, .subtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: rgba(7, 12, 21, .7); border: 1px solid var(--border); border-radius: 11px; }
.period-picker button, .subtabs button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 7px 9px; font-size: 9px; font-weight: 700; }
.period-picker button.active, .subtabs button.active { background: rgba(var(--cyan-rgb), .11); color: var(--cyan); }
.history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.history-chart { border-radius: var(--radius); padding: 19px; min-width: 0; }
.history-chart header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.history-chart header div { display: flex; align-items: center; gap: 8px; }
.history-chart h3 { margin: 0; font-size: 12px; }.history-chart header strong { color: var(--muted); font-size: 9px; }
.history-chart canvas { width: 100%; height: 190px; display: block; }
.dot { width: 6px; height: 6px; border-radius: 50%; }.dot.cyan { background: var(--cyan); }.dot.violet { background: var(--violet); }.dot.lime { background: var(--lime); }.dot.pink { background: var(--pink); }
.server-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.server-card { border-radius: var(--radius); padding: 19px; }
.server-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.server-card h3 { margin: 0 0 5px; font-size: 14px; }.server-card p { margin: 0; color: var(--muted); font-size: 9px; min-height: 30px; }
.server-card .server-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: rgba(var(--cyan-rgb), .07); color: var(--cyan); border: 1px solid rgba(var(--cyan-rgb), .12); }
.server-card-main { display: flex; gap: 10px; min-width: 0; }
.server-card .card-state { color: var(--success); font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }.server-card .card-state.offline { color: var(--danger); }
.server-mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 17px 0; }
.server-mini-metrics div { background: rgba(105, 128, 165, .04); border: 1px solid rgba(130,154,190,.07); border-radius: 9px; padding: 9px; display: grid; gap: 4px; }
.server-mini-metrics span { color: var(--muted); font-size: 7px; }.server-mini-metrics b { font-size: 11px; }
.server-card footer { display: flex; gap: 7px; }.server-card footer .btn { flex: 1; padding: 8px; font-size: 9px; }
.log-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; min-height: 570px; }
.log-files, .log-console { border-radius: var(--radius); overflow: hidden; }
.log-files { padding: 10px; }
.log-file { border: 1px solid transparent; background: transparent; width: 100%; text-align: left; padding: 11px; border-radius: 9px; color: var(--muted); display: grid; gap: 4px; }
.log-file span { font-size: 10px; color: #bdc9dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.log-file small { font-size: 8px; }
.log-file.active { background: rgba(var(--cyan-rgb), .08); border-color: rgba(var(--cyan-rgb), .1); }.log-file.active span { color: var(--cyan); }
.log-console { display: flex; flex-direction: column; min-width: 0; }
.log-console header { height: 50px; padding: 0 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.log-console header div { display: flex; gap: 13px; align-items: center; min-width: 0; }.log-console header b { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-dots { color: #64738a; letter-spacing: 4px; font-size: 7px; }.terminal-dots::first-letter { color: var(--danger); }
.copy-button { border: 0; background: transparent; color: var(--cyan); font-size: 9px; }
.log-console pre, .config-modal pre { margin: 0; padding: 18px; white-space: pre-wrap; overflow: auto; color: #a8d6c2; font: 10px/1.7 "Cascadia Mono", Consolas, monospace; flex: 1; background: rgba(3, 8, 14, .35); }
.search-field { margin: 0; width: 230px; display: flex; gap: 8px; align-items: center; padding-left: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 10px; background: rgba(5,10,18,.7); }
.search-field input { border: 0; padding: 10px 10px 10px 0; background: transparent; box-shadow: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 690px; }
th { padding: 13px 16px; text-align: left; color: #5f6e86; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; background: rgba(6, 11, 20, .35); }
td { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 10px; color: #aebbd0; }
td strong { color: #dce6f5; }.table-empty { text-align: center; color: var(--muted); padding: 50px; }
.state-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--success); }.state-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }.state-chip.stopped { color: var(--danger); }
.docker-status { font-size: 9px; color: var(--muted); }.docker-status span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--muted); }.docker-status.online { color: var(--success); }.docker-status.online span { background: var(--success); box-shadow: 0 0 8px currentColor; }
.subtabs { width: max-content; margin-bottom: 14px; }
.docker-panel { display: none; }.docker-panel.active { display: block; }
.docker-grid, .compose-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.container-card, .compose-card { border-radius: var(--radius); padding: 17px; }
.container-card header, .compose-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }.container-card h3, .compose-card h3 { font-size: 12px; margin: 0 0 4px; }.container-card header p, .compose-card header p { color: var(--muted); font-size: 8px; margin: 0; }
.container-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }.container-stats div { padding: 9px; background: rgba(111,135,171,.04); border-radius: 8px; display: grid; gap: 3px; }.container-stats span { color: var(--muted); font-size: 7px; }.container-stats b { font-size: 10px; }
.container-meta { color: #67758b; font-size: 8px; line-height: 1.6; word-break: break-word; }.compose-members { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }.compose-members span { font-size: 8px; color: #a9b8cd; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; }

/* Modals */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; background: rgba(1, 4, 9, .72); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(590px, 100%); max-height: 92vh; overflow: auto; border-radius: 20px; padding: 23px; }
.modal > header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 21px; }.modal h2 { margin: 7px 0 0; font-size: 21px; }.modal-close { border: 0; background: transparent; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.hint { color: #59677c; font-weight: 400; }
.modal footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal-note { color: var(--muted); font-size: 10px; line-height: 1.6; }.modal-note code { color: var(--cyan); }
.config-modal { width: min(760px, 100%); }.config-modal pre { max-height: 55vh; border-radius: 11px; border: 1px solid var(--border); }

/* Readability and interaction polish */
html { font-size: 16px; }
body {
    font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
}
:root {
    --panel: rgba(14, 22, 36, .9);
    --panel-strong: rgba(17, 27, 44, .96);
    --border: rgba(157, 179, 215, .18);
    --border-bright: rgba(129, 233, 255, .34);
    --muted: #9aa8bf;
    --shadow: 0 18px 46px rgba(0, 0, 0, .26);
}
.glass {
    background: linear-gradient(145deg, rgba(21, 32, 51, .94), rgba(10, 17, 29, .9));
    border-color: var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055), var(--shadow);
    backdrop-filter: blur(10px) saturate(115%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
}
.sidebar { background: rgba(5, 10, 18, .96); backdrop-filter: blur(12px); }
.brand { font-size: 17px; }
.nav-item { min-height: 46px; color: #99a8c0; }
.nav-item b { font-size: 14px; }
.nav-label { font-size: 10.5px; color: #718099; }
.agent-health b { font-size: 12px; }
.agent-health small { font-size: 10.5px; color: #8190a7; }
.icon-button, .menu-button, .avatar, .modal-close { width: 40px; height: 40px; font-size: 16px; transition: transform .18s, border-color .18s, color .18s, background .18s; }
.icon-button:active, .menu-button:active, .btn:active { transform: translateY(1px) scale(.98); }
.page-title span { font-size: 10.5px; color: #8290a8; }
.page-title h1 { font-size: 24px; }
.server-picker { width: 236px; height: 42px; }
.server-picker select { font-size: 13px; }
.notice { font-size: 13px; }
.server-line { font-size: 12px; }
.status-pill { font-size: 10px; padding: 6px 10px; }
.hero-copy > p { font-size: 14px; }
.hero-facts small { font-size: 10.5px; color: #8492aa; }
.hero-facts strong { font-size: 14px; }
.reveal-button { top: 35px; font-size: 10px; }
.health-ring span { font-size: 10px; }
.metric-card { padding: 22px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.metric-card::after { opacity: .62; }
.metric-icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 10px; }
.metric-card h3 { font-size: 15px; }
.metric-card header p { font-size: 11.5px; }
.metric-card header > strong { font-size: 25px; }
.sparkline { height: 108px; margin: 18px 0 13px; }
.metric-stats span { font-size: 10.5px; color: #8795ad; }
.metric-stats b { font-size: 13px; }
.network-card { padding: 25px; }
.section-header h2, .content-header h2 { font-size: 18px; }
.section-header p, .content-header p { font-size: 12.5px; }
.section-icon { width: 40px; height: 40px; }
.live-badge {
    --mode-color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 142px;
    padding: 7px 11px;
    color: var(--mode-color);
    border-color: color-mix(in srgb, var(--mode-color) 25%, transparent);
    background: color-mix(in srgb, var(--mode-color) 7%, transparent);
    text-transform: none;
    letter-spacing: normal;
}
.live-badge > span { width: 7px; height: 7px; margin: 0; flex: 0 0 7px; background: var(--mode-color); box-shadow: 0 0 10px var(--mode-color); }
.live-badge > div { display: grid; gap: 1px; }
.live-badge b { font-size: 10.5px; line-height: 1.1; text-transform: uppercase; letter-spacing: .08em; }
.live-badge em { font-size: 9.5px; line-height: 1.2; color: #a6b4c9; font-style: normal; white-space: nowrap; }
.live-badge.mode-ws { --mode-color: var(--success); }
.live-badge.mode-ajax { --mode-color: var(--cyan); }
.live-badge.mode-syncing { --mode-color: #ffd56a; }
.live-badge.mode-offline { --mode-color: var(--danger); }
.live-badge.mode-ws > span { animation: live-pulse 1.7s ease-out infinite; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mode-color) 45%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.refresh-button span { display: block; font-size: 21px; line-height: 1; }
.refresh-button.is-loading span { animation: refresh-spin .72s linear infinite; }
.refresh-button:disabled { cursor: wait; opacity: .82; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.big-chart { height: 215px; }
.chart-legend { font-size: 11px; }
.chart-legend i { width: 8px; height: 8px; }
canvas { image-rendering: auto; cursor: crosshair; touch-action: pan-y; border-radius: 8px; outline: none; }
canvas:focus-visible { box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), .18); }
.speed small { font-size: 10.5px; }
.speed strong { font-size: 17px; }
.speed em { font-size: 9.5px; color: #8391a8; }
.network-totals span { font-size: 10.5px; }
.network-totals b { font-size: 12px; }
.content-header h2 { font-size: 25px; }
.period-picker button, .subtabs button { padding: 8px 11px; font-size: 11px; }
.history-chart { padding: 22px; }
.history-chart h3 { font-size: 14px; }
.history-chart header strong { font-size: 11.5px; }
.history-chart canvas { height: 235px; }
.server-card { padding: 22px; transition: transform .2s ease, border-color .2s ease; }
.server-card h3 { font-size: 16px; }
.server-card p { font-size: 11.5px; }
.server-card .card-state { font-size: 9.5px; }
.server-mini-metrics span { font-size: 9.5px; }
.server-mini-metrics b { font-size: 13px; }
.server-card footer .btn { font-size: 10.5px; }
.log-file span { font-size: 12px; }
.log-file small { font-size: 10px; }
.log-console header b { font-size: 12px; }
.copy-button { font-size: 11px; }
.log-console pre, .config-modal pre { font-size: 12px; }
th { font-size: 10.5px; }
td { font-size: 12.5px; }
.docker-status { font-size: 11.5px; }
.container-card h3, .compose-card h3 { font-size: 14px; }
.container-card header p, .compose-card header p { font-size: 10.5px; }
.container-stats span { font-size: 9.5px; }
.container-stats b { font-size: 12px; }
.container-meta, .compose-members span { font-size: 10.5px; }
form label { font-size: 13px; }
input, textarea, select { font-size: 14px; }
.btn { font-size: 13px; }
.modal-note { font-size: 12px; }
.chart-tooltip {
    position: fixed;
    z-index: 500;
    width: max-content;
    min-width: 210px;
    max-width: min(330px, calc(100vw - 20px));
    padding: 12px 13px;
    border: 1px solid rgba(var(--cyan-rgb), .28);
    border-radius: 12px;
    background: rgba(6, 13, 24, .98);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .48), inset 0 1px rgba(255,255,255,.05);
    pointer-events: none;
}
.chart-tooltip > strong { display: block; margin-bottom: 9px; color: #eaf3ff; font-size: 11px; font-weight: 650; }
.tooltip-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; padding: 3px 0; }
.tooltip-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--tooltip-color); box-shadow: 0 0 8px var(--tooltip-color); }
.tooltip-row i.tooltip-cyan { --tooltip-color: var(--cyan); }
.tooltip-row i.tooltip-violet { --tooltip-color: var(--violet); }
.tooltip-row i.tooltip-pink { --tooltip-color: var(--pink); }
.tooltip-row i.tooltip-lime { --tooltip-color: var(--lime); }
.tooltip-row span { color: #9facbf; font-size: 11px; }
.tooltip-row b { color: #f2f7ff; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
    .metric-card:hover, .server-card:hover { transform: translateY(-2px); border-color: rgba(var(--cyan-rgb), .26); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 22px 52px rgba(0,0,0,.31); }
}

/* Responsive */
@media (max-width: 1180px) {
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .server-cards, .docker-grid, .compose-grid { grid-template-columns: 1fr 1fr; }
    .auth-showcase { padding: 42px; }
}
@media (max-width: 900px) {
    :root { --sidebar: 220px; }
    .auth-shell { grid-template-columns: 1fr; padding: 16px; }
    .auth-showcase { display: none; }
    .auth-card { min-height: calc(100vh - 32px); max-width: 540px; }
    .mobile-brand { display: flex; margin-bottom: 60px; }
    .sidebar { transform: translateX(-101%); transition: transform .25s ease; box-shadow: 30px 0 80px rgba(0,0,0,.45); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding-left: 18px; padding-right: 18px; }
    .menu-button { display: grid; }
    .network-body { grid-template-columns: 1fr; }
    .network-readings { border-left: 0; border-top: 1px solid var(--border); padding: 18px 0 0; }
    .history-grid { grid-template-columns: 1fr; }
    .log-layout { grid-template-columns: 1fr; }.log-files { display: flex; overflow-x: auto; }.log-file { min-width: 190px; }.log-console { min-height: 480px; }
}
@media (max-width: 650px) {
    .topbar { height: auto; min-height: 78px; flex-wrap: wrap; padding: 14px 0; }
    .page-title { flex: 1; }.topbar-actions { order: 3; width: 100%; }.server-picker { flex: 1; width: auto; }.avatar { display: none; }
    .hero { align-items: flex-start; }.health-ring { width: 92px; height: 92px; flex-basis: 92px; }.health-ring strong { font-size: 23px; }
    .hero-facts { gap: 22px; }.hero-facts > div { min-width: 100px; }
    .metrics-grid { grid-template-columns: 1fr; }
    .server-cards, .docker-grid, .compose-grid { grid-template-columns: 1fr; }
    .content-header { align-items: flex-start; flex-direction: column; }.content-header > .btn, .search-field { width: 100%; }
    .period-picker { width: 100%; overflow-x: auto; flex-wrap: nowrap; }.period-picker button { flex: 0 0 auto; }
    .network-readings { grid-template-columns: 1fr; }.network-totals { grid-column: auto; }
    .form-grid { grid-template-columns: 1fr; }.modal { padding: 18px; }
    .section-header { align-items: flex-start; }
    .live-badge { min-width: 0; }
    .big-chart { height: 190px; }
    .history-chart canvas { height: 210px; }
}
@media (max-width: 430px) {
    .hero { padding: 21px; }.hero h2 { font-size: 25px; }.health-ring { display: none; }
    .hero-facts { display: grid; grid-template-columns: 1fr 1fr; }.hero-facts > div:last-child { grid-column: 1 / -1; }
    .metric-card { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
