:root {
  color-scheme: dark;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: #090d13;
  color: #e8edf5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #090d13;
  --panel: rgba(17, 24, 34, 0.72);
  --line: rgba(159, 181, 210, 0.12);
  --muted: #788493;
  --cyan: #62e2d3;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.dashboard-body { background: var(--bg); overflow-x: hidden; }
.ambient { position: fixed; z-index: -1; width: 35rem; height: 35rem; border-radius: 50%; filter: blur(130px); opacity: .14; pointer-events: none; }
.ambient-one { top: -20rem; left: 18rem; background: #11cdb4; }
.ambient-two { top: 28rem; right: -24rem; background: #6835f2; opacity: .12; }
.dashboard-shell { display: flex; min-height: 100vh; margin: auto; }
.glass { border: 1px solid var(--line); background: linear-gradient(140deg, rgba(22, 31, 43, .81), rgba(13, 19, 28, .76)); box-shadow: 0 16px 48px rgba(0, 0, 0, .16), inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(18px); }

.sidebar { position: sticky; top: 0; display: flex; flex: 0 0 232px; flex-direction: column; height: 100vh; padding: 27px 17px 18px; border-width: 0 1px 0 0; background: rgba(12, 17, 25, .75); }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 0 54px 7px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(98,226,211,.4); border-radius: 12px; background: rgba(98,226,211,.08); color: #d9fffa; font-size: 19px; font-weight: 700; box-shadow: 0 0 24px rgba(98,226,211,.08); }
.brand-mark span { color: var(--cyan); }
.brand-copy { display: grid; gap: 4px; }
.brand-copy strong { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }
.brand-copy strong span { color: var(--cyan); }
.brand-copy small, .nav-caption, .micro-label, .eyebrow, .meta-label, .breadcrumb, .metric-state, .archive-heading, .panel-counter, .section-note, .activity-lock, .footer { font-family: var(--mono); }
.brand-copy small { color: #667481; font-size: 8px; letter-spacing: 1.6px; }
.nav-caption { padding-left: 10px; color: #566371; font-size: 9px; letter-spacing: 1.2px; }
.side-nav { display: grid; gap: 6px; margin-top: 15px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; color: #84909e; font-size: 12px; text-decoration: none; transition: .2s ease; }
.nav-link:hover { color: #dfe9f3; background: rgba(255,255,255,.035); }
.nav-link.active { border-color: rgba(98,226,211,.12); background: linear-gradient(90deg, rgba(98,226,211,.10), rgba(98,226,211,.025)); color: #d7fff9; }
.nav-link.active::before { position: absolute; top: 10px; bottom: 10px; left: -18px; width: 2px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); content: ''; }
.nav-icon { width: 17px; color: #72808f; font-size: 16px; text-align: center; }
.nav-link.active .nav-icon { color: var(--cyan); }
.nav-count { margin-left: auto; color: #60707e; font-family: var(--mono); font-size: 9px; }
.sidebar-spacer { flex: 1; }
.sidebar-server { display: flex; align-items: center; gap: 10px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); }
.server-orbit { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(130,152,175,.22); border-radius: 50%; }
.server-orbit span { width: 7px; height: 7px; border-radius: 50%; background: #7d8996; }
.sidebar-server div { display: grid; flex: 1; gap: 4px; }
.sidebar-server small { color: #657280; font: 8px var(--mono); letter-spacing: .5px; }
.sidebar-server strong { color: #bac5d0; font: 9px var(--mono); letter-spacing: .2px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #788493; }
.status-dot.muted { background: #6d7885; }
.status-dot.good { background: #56d8a2; box-shadow: 0 0 9px rgba(86,216,162,.45); }
.status-dot.bad { background: #ff6d82; box-shadow: 0 0 9px rgba(255,109,130,.4); }
.logout-button { margin-top: 10px; padding: 10px; border: 0; background: transparent; color: #77828f; font-size: 11px; text-align: left; }
.logout-button:hover { color: #ff8995; }
.logout-button span { margin-right: 8px; }

.main-content { flex: 1; min-width: 0; padding: 0 24px 16px; }
.topbar { display: flex; min-height: 69px; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(159,181,210,.08); }
.breadcrumb { color: #9aa8b6; font-size: 9px; letter-spacing: .9px; }
.breadcrumb span { color: #687584; }
.breadcrumb i { margin: 0 9px; color: #394450; font-style: normal; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.live-pill { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(143,159,179,.14); border-radius: 5px; color: #8995a2; font: 8px var(--mono); letter-spacing: .4px; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #d5a656; box-shadow: 0 0 8px rgba(213,166,86,.5); }
.pipeline-widget { position: relative; z-index: 8; font: 8px var(--mono); }
.pipeline-widget summary { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgba(143,159,179,.14); border-radius: 5px; color: #8995a2; cursor: pointer; list-style: none; }
.pipeline-widget summary::-webkit-details-marker { display: none; }
.pipeline-widget summary svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.pipeline-widget summary strong { color: #bdc7d2; font-weight: 400; }
.pipeline-widget[open] summary { border-color: rgba(67,216,255,.35); color: var(--cyan); }
.pipeline-popover { position: absolute; top: calc(100% + 9px); right: 0; z-index: 12; width: 310px; max-height: 380px; overflow-y: auto; padding: 12px; border: 1px solid rgba(112,155,190,.25); border-radius: 8px; background: rgba(8,15,24,.97); box-shadow: 0 14px 35px rgba(0,0,0,.4), 0 0 18px rgba(67,216,255,.08); backdrop-filter: blur(18px); }
.pipeline-popover-heading { display: flex; align-items: center; justify-content: space-between; color: #c9d5e0; font-size: 9px; }
.pipeline-popover-heading span { color: #657587; font-size: 7px; letter-spacing: .7px; }
.pipeline-popover > p { margin: 8px 0; color: #8092a2; font: 8px/1.5 var(--mono); }
.pipeline-list { display: grid; }
.pipeline-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(159,181,210,.08); }
.pipeline-row-details { display: grid; min-width: 0; gap: 3px; }
.pipeline-row a { overflow: hidden; color: #aab8c5; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.pipeline-row a:hover, .pipeline-row a:focus-visible { color: var(--cyan); }
.pipeline-row small { overflow: hidden; color: #68798a; font: 7px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.pipeline-row span { flex: 0 0 auto; color: #8d9ba9; font-size: 7px; }
.pipeline-row.pipeline-success span { color: #64e6b3; }
.pipeline-row.pipeline-failed span, .pipeline-row.pipeline-canceled span, .pipeline-row.pipeline-blocked span { color: #ff8293; }
.pipeline-row.pipeline-running span, .pipeline-row.pipeline-pending span, .pipeline-row.pipeline-preparing span, .pipeline-row.pipeline-created span { color: #edc46f; }
.pipeline-error summary strong { color: #ff8293; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); }
.user-label { color: #aab5c2; font-size: 11px; }
.avatar { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(98,226,211,.25); border-radius: 50%; background: rgba(98,226,211,.08); color: var(--cyan); font: 11px var(--mono); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 31px 1px 20px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #87949f; font-size: 8px; letter-spacing: 1.1px; }
.eyebrow-line { display: inline-block; width: 15px; height: 1px; background: var(--cyan); }
h1 { margin: 9px 0 3px; font-family: var(--mono); font-size: clamp(24px, 3vw, 32px); font-weight: 500; letter-spacing: -1.15px; }
.heading-period { color: var(--cyan); }
.page-subtitle { margin: 0; color: #7c8997; font-size: 12px; }
.heading-meta { display: grid; justify-items: end; gap: 4px; padding-bottom: 2px; }
.meta-label { color: #586574; font-size: 8px; letter-spacing: .8px; }
.heading-meta strong { color: #c7d2dd; font: 14px var(--mono); }
.heading-meta > span:last-child { color: #74808d; font-size: 9px; }

.hardware-strip { display: flex; min-height: 76px; align-items: center; gap: 24px; padding: 13px 19px; border-radius: 9px; animation: rise-in .55s both; }
.hardware-intro, .hardware-item { display: flex; align-items: center; gap: 10px; }
.hardware-intro { min-width: 142px; }
.hardware-icon { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid rgba(98,226,211,.17); border-radius: 7px; background: rgba(98,226,211,.055); color: var(--cyan); font-size: 17px; }
.hardware-intro div, .hardware-item div { display: grid; gap: 4px; }
.micro-label { color: #697684; font-size: 8px; letter-spacing: .6px; }
.hardware-intro strong { font-size: 11px; font-weight: 500; }
.hardware-divider { width: 1px; height: 35px; background: var(--line); }
.hardware-item { flex: 1; min-width: 120px; }
.hardware-symbol { color: #83b9c3; font-size: 17px; }
.hardware-item strong { color: #e1e9f1; font: 12px var(--mono); }
.hardware-item strong small { color: #8593a1; font-size: 9px; }
.hardware-note { display: flex; align-items: center; gap: 7px; color: #697683; font-size: 9px; white-space: nowrap; }

.section-title-row { display: flex; align-items: center; justify-content: space-between; margin: 24px 1px 11px; }
.section-title-row > div, .panel-heading > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.section-index { color: var(--cyan); font: 9px var(--mono); }
h2 { display: inline; margin: 0; color: #dfe6ee; font-size: 13px; font-weight: 500; }
.section-note { display: flex; align-items: center; gap: 7px; color: #606e7b; font-size: 8px; letter-spacing: .5px; }
.tiny-square { width: 5px; height: 5px; border: 1px solid #707b85; transform: rotate(45deg); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { position: relative; min-height: 151px; overflow: hidden; padding: 13px 15px 11px; border-radius: 8px; animation: rise-in .6s both; }
.metric-card:nth-child(2) { animation-delay: .06s; }
.metric-card:nth-child(3) { animation-delay: .12s; }
.metric-card:nth-child(4) { animation-delay: .18s; }
.metric-card::after { position: absolute; top: -33px; right: -29px; width: 100px; height: 100px; border: 1px solid currentColor; border-radius: 50%; opacity: .05; content: ''; }
.metric-cyan { color: #64dcca; }
.metric-violet { color: #ae9dff; }
.metric-blue { color: #72aef6; }
.metric-orange { color: #f0ad6c; }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid currentColor; border-radius: 6px; background: rgba(255,255,255,.025); font-size: 13px; opacity: .9; }
.metric-state { padding: 4px 5px; border: 1px solid rgba(143,159,179,.12); border-radius: 3px; color: #74808c; font-size: 7px; letter-spacing: .3px; }
.metric-state.metric-live { border-color: rgba(98,226,211,.2); color: #74dfca; }
.metric-name { margin-top: 9px; color: #bdc8d3; font-size: 10px; }
.metric-name span { margin-left: 4px; color: #6c7987; font: 8px var(--mono); }
.metric-value { margin-top: 0; color: #eef2f6; font: 27px var(--mono); letter-spacing: -1.7px; line-height: 1.25; }
.metric-value small { margin-left: 2px; color: #8e9ba8; font-size: 11px; }
.metric-foot { display: flex; justify-content: space-between; margin-top: 3px; color: #7e8b99; font-size: 8px; }
.metric-foot strong { color: #aab6c2; font: 8px var(--mono); }
.metric-track { height: 2px; margin-top: 9px; overflow: hidden; background: rgba(160,177,196,.1); }
.metric-track span { display: block; width: 12%; height: 100%; background: currentColor; opacity: .35; animation: breathe 2s infinite ease-in-out; }
.network-values { display: flex; gap: 20px; margin: 6px 0 2px; }
.network-values div { display: grid; gap: 1px; }
.network-values small { color: #73808e; font: 7px var(--mono); }
.network-values strong { color: #edf2f7; font: 15px var(--mono); }
.network-values i { color: #8492a0; font-size: 8px; font-style: normal; }

.charts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 13px; }
.chart-panel { min-width: 0; overflow: hidden; padding: 14px 16px 10px; border-radius: 9px; }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.chart-heading > div { display: grid; gap: 4px; }
.chart-heading h2 { font-size: 11px; }
.chart-heading > div > span, .chart-window { color: #687784; font: 7px var(--mono); letter-spacing: .55px; }
.chart-window { padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; }
.chart-legend { position: relative; display: flex; align-items: center; gap: 13px; min-height: 23px; margin-top: 3px; color: #8c99a6; font: 7px var(--mono); }
.chart-legend > span:not(.chart-empty) { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 0 6px currentColor; }
.legend-cpu { color: #64e6d1; }
.legend-memory { color: #af91ff; }
.legend-rx { color: #70dcce; }
.legend-tx { color: #74aafb; }
.chart-empty { color: #84909d; }
.line-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-gridline { fill: none; stroke: rgba(160,177,196,.11); stroke-width: 1; stroke-dasharray: 2 5; }
.chart-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: line-glow 2.8s ease-in-out infinite alternate; transition: opacity .6s ease; }
.docker-log-legend { height: 18px; min-height: 18px; max-height: 18px; flex-wrap: nowrap; gap: 5px 10px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; }
.docker-log-legend > span { min-width: 0; max-width: 120px; flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docker-log-legend > span::before { width: 7px; height: 2px; flex: 0 0 auto; border-radius: 2px; background: currentColor; box-shadow: 0 0 6px currentColor; content: ''; }
.docker-log-line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px currentColor); animation: line-glow 2.8s ease-in-out infinite alternate; }
#docker-log-chart { padding: 10px 12px 7px; }
#docker-log-status { height: 10px; overflow: hidden; font-size: 7px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.cpu-line { stroke: #64e6d1; filter: drop-shadow(0 0 4px rgba(100,230,209,.75)) drop-shadow(0 0 10px rgba(100,230,209,.35)); }
.memory-line { stroke: #af91ff; filter: drop-shadow(0 0 4px rgba(175,145,255,.75)) drop-shadow(0 0 10px rgba(175,145,255,.35)); }
.rx-line { stroke: #70dcce; filter: drop-shadow(0 0 4px rgba(112,220,206,.75)) drop-shadow(0 0 10px rgba(112,220,206,.35)); }
.tx-line { stroke: #74aafb; filter: drop-shadow(0 0 4px rgba(116,170,251,.75)) drop-shadow(0 0 10px rgba(116,170,251,.35)); }
.chart-axis { display: flex; justify-content: space-between; padding-top: 3px; color: #566371; font: 7px var(--mono); }
.pulse-dot.connected { background: #56d8a2; box-shadow: 0 0 9px rgba(86,216,162,.7); animation: pulse 1.8s infinite; }

.content-columns { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.45fr); gap: 13px; margin-top: 22px; align-items: start; }
.content-panel, .activity-panel { min-width: 0; border-radius: 9px; }
.content-panel { padding: 17px 17px 12px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading > div:first-child { flex-wrap: wrap; row-gap: 4px; }
.panel-heading h2 { font-size: 13px; }
.panel-subtitle { flex-basis: 100%; margin-left: 28px; color: #778391; font-size: 9px; }
.panel-counter { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; color: #6f7d8b; font-size: 7px; white-space: nowrap; }
.panel-counter strong { margin-right: 3px; color: #a9b5c1; font-weight: 400; }
.service-list { margin-top: 14px; max-height: 420px; overflow-y: auto; }
.service-row { display: flex; min-height: 42px; align-items: center; gap: 10px; border-top: 1px solid rgba(159,181,210,.07); }
.service-logo { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; font: 11px var(--mono); }
.logo-seerr { color: #f18b68; background: rgba(241,139,104,.09); }
.logo-plex { color: #f0b949; background: rgba(240,185,73,.09); }
.logo-ollama { color: #dce4ec; background: rgba(220,228,236,.08); }
.logo-openwebui { color: #78cdbd; background: rgba(120,205,189,.09); }
.logo-comfy { color: #bd9cfb; background: rgba(189,156,251,.1); }
.logo-database { color: #77aaf4; background: rgba(119,170,244,.1); }
.logo-app { color: var(--cyan); background: rgba(98,226,211,.09); }
.service-info { display: grid; flex: 1; gap: 2px; min-width: 0; }
.service-info strong { color: #d2dbe4; font-size: 10px; font-weight: 500; }
.service-info small { color: #75818e; font-size: 8px; }
.service-status { display: flex; align-items: center; gap: 6px; color: #84909c; font-size: 8px; white-space: nowrap; }
.service-status .status-dot { width: 5px; height: 5px; }
.service-row:has(.service-actions) { flex-wrap: wrap; padding: 8px 0; }
.service-actions { display: flex; flex: 1 0 100%; gap: 5px; flex-wrap: wrap; padding-left: 32px; }
.service-actions button, .docker-dialog button { border: 1px solid var(--line); background: rgba(26, 50, 65, .65); color: #b7e9f2; padding: 5px 8px; cursor: pointer; font: inherit; }
.service-actions button:disabled { opacity: .5; cursor: wait; }
.docker-dialog { width: min(850px, 90vw); max-height: 85vh; color: #d2dbe4; padding: 18px; }
.docker-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.docker-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.docker-dialog-heading h2 { font-size: 15px; }
.docker-output { height: min(50vh, 480px); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #070d13; border: 1px solid var(--line); padding: 12px; font: 12px/1.5 monospace; }
.docker-console-form { display: flex; gap: 6px; }
.docker-console-form[hidden] { display: none; }
.docker-console-form input { flex: 1; min-width: 0; color: #d2dbe4; background: #070d13; border: 1px solid var(--line); padding: 8px; }
#docker-dialog-status { color: #e2b486; font-size: 11px; }
.service-footnote { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(159,181,210,.07); color: #71808e; font-size: 8px; line-height: 1.5; }
.service-footnote span { color: #8a9cac; }

.assistant-panel { padding-bottom: 14px; }
.local-device-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.local-device-presence { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; font: 7px var(--mono); white-space: nowrap; }
.local-device-presence.connected { color: #64e6b3; }
.local-device-presence.disconnected { color: #ff8293; }
.eco-plug-panel { margin-top: 13px; padding-top: 10px; border-top: 1px solid rgba(98,226,211,.13); }
.eco-plug-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.eco-plug-panel-heading h3 { margin: 0; color: #b7cbd4; font: 9px var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.eco-plug-panel-heading > span { color: #688b93; font: 7px var(--mono); letter-spacing: .6px; }
.eco-plug-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.eco-plug-row { display: grid; gap: 8px; min-width: 0; padding: 9px; border: 1px solid rgba(159,181,210,.1); border-radius: 5px; background: rgba(255,255,255,.018); }
.eco-plug-row strong { overflow-wrap: anywhere; color: #d3edf6; font: 8px var(--mono); }
.eco-plug-state { color: #8ca5b4; font: 8px var(--mono); }
.eco-plug-state.on { color: #64e6b3; }
.eco-plug-state.off { color: #ffb37c; }
.eco-plug-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.eco-plug-action { padding: 5px 8px; border: 1px solid rgba(98,226,211,.2); border-radius: 4px; background: rgba(98,226,211,.06); color: #9de4dc; font: 8px var(--mono); cursor: pointer; }
.eco-plug-action:hover:not(:disabled) { background: rgba(98,226,211,.15); }
.eco-plug-action:disabled { opacity: .4; cursor: not-allowed; }
.eco-plug-error { color: #ff9aab; font: 8px var(--mono); }
.local-badge { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid rgba(98,226,211,.14); border-radius: 4px; color: #9abdb9; font: 8px var(--mono); letter-spacing: .5px; }
.local-badge .status-dot { width: 5px; height: 5px; }
@media (max-width: 700px) { .eco-plug-list { grid-template-columns: 1fr; } }
.assistant-model { display: flex; align-items: center; gap: 9px; margin-top: 15px; padding: 9px 10px; border: 1px solid rgba(159,181,210,.09); border-radius: 6px; background: rgba(255,255,255,.018); }
.model-orb, .welcome-orb { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(98,226,211,.2); border-radius: 8px; background: rgba(98,226,211,.07); color: var(--cyan); }
.assistant-model > div { display: grid; flex: 1; gap: 3px; }
.assistant-model strong { color: #b7c4d0; font-size: 9px; font-weight: 500; }
.new-chat-button { width: 27px; height: 27px; border: 1px solid rgba(98,226,211,.2); border-radius: 5px; background: rgba(98,226,211,.07); color: var(--cyan); font-size: 17px; line-height: 1; }
.new-chat-button:hover { background: rgba(98,226,211,.16); }
.chat-layout { display: grid; grid-template-columns: 134px minmax(0,1fr); gap: 11px; margin-top: 11px; }
.chat-archive { min-height: 243px; padding: 9px 8px; border: 1px solid rgba(159,181,210,.08); border-radius: 6px; background: rgba(5,9,14,.18); }
.archive-heading { display: flex; justify-content: space-between; padding: 1px 2px 8px; color: #758391; font-size: 8px; letter-spacing: .6px; }
.archive-heading span { color: #64717e; }
.conversation-list { display: grid; gap: 4px; max-height: 205px; overflow-y: auto; }
.conversation-item { width: 100%; overflow: hidden; padding: 7px 6px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #909ba7; font-size: 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item:hover, .conversation-item.selected { border-color: rgba(98,226,211,.12); background: rgba(98,226,211,.055); color: #d5e7e5; }
.archive-empty { margin: 14px 2px; color: #687582; font-size: 8px; line-height: 1.6; }
.chat-main { display: flex; min-width: 0; flex-direction: column; }
.chat-messages { display: flex; min-height: 147px; max-height: 193px; flex: 1; flex-direction: column; gap: 8px; overflow-y: auto; padding: 10px 9px; border: 1px solid rgba(159,181,210,.08); border-radius: 6px 6px 0 0; background: rgba(5,9,14,.17); }
.chat-welcome { display: grid; justify-items: center; align-content: center; flex: 1; min-height: 125px; color: #a8b4c0; text-align: center; }
.welcome-orb { width: 31px; height: 31px; margin-bottom: 8px; font-size: 17px; }
.chat-welcome strong { font-size: 10px; font-weight: 500; }
.chat-welcome p { max-width: 190px; margin: 4px 0 0; color: #71808d; font-size: 8px; line-height: 1.55; }
.chat-message { max-width: 92%; padding: 8px 9px; border: 1px solid rgba(159,181,210,.09); border-radius: 6px; color: #bbc6d1; font-size: 9px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user { align-self: flex-end; border-color: rgba(98,226,211,.16); background: rgba(98,226,211,.07); color: #dcf2ef; }
.chat-message.assistant { align-self: flex-start; background: rgba(255,255,255,.025); }
.chat-composer { padding: 8px; border: 1px solid rgba(159,181,210,.1); border-top: 0; border-radius: 0 0 6px 6px; background: rgba(5,9,14,.24); }
.chat-composer textarea { display: block; width: 100%; min-height: 41px; resize: vertical; border: 0; outline: 0; background: transparent; color: #d6e0e9; font-size: 9px; line-height: 1.5; }
.chat-composer textarea::placeholder { color: #687684; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.composer-footer > span { color: #687684; font-size: 7px; }
.composer-footer button { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid rgba(98,226,211,.22); border-radius: 4px; background: rgba(98,226,211,.1); color: #a9eae1; font: 7px var(--mono); letter-spacing: .5px; }
.composer-footer button:hover { background: rgba(98,226,211,.19); }
.composer-footer button:disabled { cursor: wait; opacity: .5; }
.composer-footer button b { font-size: 12px; font-weight: 400; }
.chat-status { min-height: 12px; margin: 4px 2px 0; color: #f0a2a4; font-size: 8px; }

.activity-panel { margin-top: 13px; padding: 14px 17px 10px; }
.activity-lock { color: #65727f; font-size: 8px; letter-spacing: .3px; }
.audit-status { margin: 11px 0 0; color: #83909d; font-size: 9px; }
.audit-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 15px; margin: 7px 0 0; padding: 0; list-style: none; }
.audit-list li { overflow: hidden; padding: 7px 0; border-top: 1px solid rgba(159,181,210,.07); color: #9ba8b5; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.footer { display: flex; justify-content: space-between; padding: 15px 2px 4px; color: #52606d; font-size: 7px; letter-spacing: .6px; }
.footer i { color: var(--cyan); font-style: normal; }
.footer b { color: #697683; font-size: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

.login-body { position: relative; display: grid; min-height: 100vh; overflow: hidden; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 20%, #13252a, #090d13 65%); }
.login-body::before { position: fixed; inset: 0; background-image: linear-gradient(rgba(98,226,211,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(98,226,211,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000, transparent 75%); content: ''; pointer-events: none; }
.login-orbit { position: fixed; width: 26rem; height: 26rem; border-radius: 50%; filter: blur(100px); opacity: .13; pointer-events: none; }
.login-orbit-one { top: -12rem; left: 3%; background: #11cdb4; }
.login-orbit-two { right: 3%; bottom: -16rem; background: #6835f2; }
.login-panel { position: relative; width: min(100%, 440px); padding: 36px; border-radius: 12px; box-shadow: 0 25px 80px rgba(0,0,0,.4), 0 0 55px rgba(98,226,211,.045), inset 0 1px rgba(255,255,255,.05); animation: rise-in .7s both; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-divider { height: 1px; margin: 28px 0; background: linear-gradient(90deg, rgba(98,226,211,.35), transparent); }
.login-panel h1 { margin-top: 12px; }
.login-subtitle { margin: 7px 0 26px; color: #8493a1; font-size: 13px; line-height: 1.6; }
.login-panel label { display: block; margin: 16px 0 8px; color: #a4b2bf; font: 10px var(--mono); letter-spacing: .5px; }
.login-panel input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid rgba(159,181,210,.2); border-radius: 6px; outline: none; background: rgba(5,9,14,.55); color: #e8edf5; transition: border-color .2s, box-shadow .2s; }
.login-panel input:focus-visible { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(98,226,211,.12); }
.login-panel button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; margin-top: 24px; padding: 0 15px; border: 1px solid rgba(98,226,211,.38); border-radius: 6px; background: linear-gradient(100deg, rgba(98,226,211,.18), rgba(98,226,211,.06)); color: #c3fff4; font: 10px var(--mono); letter-spacing: 1px; transition: background .2s, box-shadow .2s; }
.login-panel button:hover, .login-panel button:focus-visible { background: rgba(98,226,211,.22); box-shadow: 0 0 20px rgba(98,226,211,.12); }
.login-panel button span { font-size: 18px; }
.error { min-height: 1.5em; margin: 10px 0 0; color: #ff9a9a; font-size: 12px; }
.login-footer { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #778794; font: 9px var(--mono); letter-spacing: .7px; }
.login-footer > span:last-child { margin-left: auto; color: #526371; }

@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { opacity: .2; } 50% { opacity: .6; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 6px rgba(86,216,162,.4); } 50% { box-shadow: 0 0 13px rgba(86,216,162,.85); } }
@keyframes line-glow { from { opacity: .8; } to { opacity: 1; } }

/* HUD surfaces and controls */
:root {
  font-family: 'Bahnschrift', 'Segoe UI', sans-serif;
  --mono: 'Cascadia Code', 'Consolas', monospace;
  --cyan: #43d8ff;
  --line: rgba(65, 162, 225, .25);
}
.dashboard-body {
  background-color: #030916;
  background-image: url('/assets/hud/background.svg');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
.ambient-one { background: #078bd6; }
.ambient-two { background: #2351c4; }
.hud-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-icon svg, .metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
.glass {
  border-color: rgba(65,162,225,.23);
  background: linear-gradient(135deg, rgba(10,32,55,.89), rgba(4,13,31,.88));
  box-shadow: 0 0 20px rgba(26,116,221,.07), inset 0 0 25px rgba(27,128,219,.035);
}
.metric-card, .chart-panel, .content-panel, .hardware-strip {
  border-radius: 2px 14px 2px 14px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.metric-card:hover, .chart-panel:hover, .content-panel:hover {
  border-color: rgba(69,232,244,.68);
  box-shadow: 0 0 25px rgba(69,232,244,.16), inset 0 0 25px rgba(69,232,244,.06);
  transform: scale(1.008);
}
.chart-panel, .content-panel { position: relative; }
.content-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-icon, .hardware-icon, .service-logo, .model-orb, .welcome-orb {
  border-radius: 2px 8px 2px 8px;
  box-shadow: inset 0 0 10px rgba(69,232,244,.08), 0 0 10px rgba(69,232,244,.08);
}
.metric-card-top, .chart-heading, .panel-heading { margin-right: 55px; }
.card-order-controls { position: absolute; z-index: 2; top: 8px; right: 8px; display: flex; gap: 3px; }
.card-order-controls button {
  width: 22px; height: 22px; padding: 0; border: 1px solid rgba(69,232,244,.28);
  background: rgba(4,17,26,.8); color: #8beefa; font: 18px/1 var(--mono);
}
.card-order-controls button:hover, .card-order-controls button:focus-visible { border-color: var(--cyan); box-shadow: 0 0 10px rgba(69,232,244,.4); }
.layout-status { min-height: 1em; margin: 0 0 4px; color: #86c3ca; font: 9px var(--mono); }
.cpu-threads { position: absolute; inset: 36px 8px 18px; display: flex; align-items: end; gap: 2px; opacity: .25; pointer-events: none; }
.cpu-threads span { flex: 1; min-width: 1px; background: linear-gradient(to top, rgba(69,232,244,.06), #45e8f4); box-shadow: 0 0 5px rgba(69,232,244,.4); transition: height .7s ease; }
.metric-card > :not(.cpu-threads):not(.card-order-controls):not(.card-boot) { position: relative; }
[aria-busy="true"].service-footnote::before, .composer-footer button[aria-busy="true"]::before {
  display: inline-block; flex: 0 0 auto; width: 13px; height: 13px; border: 2px solid rgba(69,232,244,.2);
  border-top-color: var(--cyan); border-right-color: var(--cyan); border-radius: 50%;
  box-shadow: 0 0 8px rgba(69,232,244,.4); animation: hud-spin .8s linear infinite; content: '';
}
@keyframes hud-spin { to { transform: rotate(360deg); } }
@keyframes hud-border-pulse { 50% { opacity: .45; } }

.metric-card, .chart-panel, .content-panel, .hardware-strip {
  position: relative;
  border: 1px solid transparent;
  border-image: url('/assets/hud/frame-blue.svg') 20 / 10px stretch;
  border-radius: 0;
  background:
    linear-gradient(rgba(49,151,226,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49,151,226,.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(10,41,70,.58), rgba(4,13,31,.68));
  background-size: 32px 32px, 32px 32px, auto;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  box-shadow: inset 0 0 30px rgba(13,111,200,.08);
}
.metric-card {
  min-height: 151px;
  padding: 10px 12px 8px;
}
.chart-panel, .content-panel, .hardware-strip {
  border-image-source: url('/assets/hud/frame-blue-panel.svg');
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.chart-panel, .content-panel { padding: 14px; }
.hardware-strip { padding: 10px 13px; }
.activity-panel.glass { background: linear-gradient(135deg, rgba(10,32,55,.58), rgba(4,13,31,.68)); }
.metric-card::before, .chart-panel::before, .content-panel::before {
  position: absolute; z-index: 1; top: 1px; left: 24px; width: 32px; height: 2px;
  background: #45d9ff; box-shadow: 0 0 8px #139bff;
  content: ''; pointer-events: none; animation: hud-border-pulse 3s ease-in-out infinite;
}
.metric-card::after, .chart-panel::after, .content-panel::after {
  position: absolute; top: auto; right: 24px; bottom: 1px; width: 24px; height: 2px;
  border: 0; border-radius: 0; background: #278fff; opacity: .8;
  box-shadow: 0 0 8px #278fff; content: ''; pointer-events: none;
}
.metric-card:hover, .chart-panel:hover, .content-panel:hover {
  filter: brightness(1.12);
  box-shadow: inset 0 0 32px rgba(31,157,244,.12);
}
.metric-cyan { color: #43d8ff; }
.metric-violet { color: #6eaaff; }
.metric-blue { color: #50c8ed; }
.metric-orange { color: #6fbfff; }
.hardware-symbol img, .hardware-icon img, .nav-icon img, .metric-icon img {
  display: block; width: 22px; height: 22px;
  filter: drop-shadow(0 0 5px rgba(69,232,244,.45));
}
.nav-icon img { width: 17px; height: 17px; }
.metric-icon img { width: 20px; height: 20px; }
.metric-name { font: 11px var(--mono); letter-spacing: .3px; }
.metric-value { font-size: 30px; text-shadow: 0 0 16px currentColor; }
.chart-heading h2, .panel-heading h2 { font-family: var(--mono); letter-spacing: .5px; text-transform: uppercase; }
.legend-cpu, .legend-rx { color: #43d8ff; }
.legend-memory, .legend-tx { color: #629bff; }
.cpu-line, .rx-line { stroke: #43d8ff; filter: drop-shadow(0 0 4px rgba(67,216,255,.7)); }
.memory-line, .tx-line { stroke: #629bff; filter: drop-shadow(0 0 4px rgba(98,155,255,.7)); }
.history-status { margin: 0; color: #f0b77f; font: 9px var(--mono); }
.history-status:empty { display: none; }
.chat-messages { height: 360px; min-height: 240px; max-height: none; flex: 0 0 auto; resize: vertical; }
.chat-message { font-size: 12px; }
.chat-composer textarea { font-size: 12px; }
.conversation-list { max-height: 340px; }
.conversation-row { display: flex; min-width: 0; align-items: center; }
.conversation-item { min-width: 0; flex: 1; font-size: 10px; }
.conversation-delete { flex: 0 0 24px; height: 24px; border: 0; background: transparent; color: #9aafb9; font-size: 18px; }
.conversation-delete:hover, .conversation-delete:focus-visible { color: #ff8293; outline-color: #ff8293; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #286d7a transparent; }
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
*::-webkit-scrollbar-thumb { border-radius: 3px; background: #286d7a; }
*::-webkit-scrollbar-thumb:hover { background: #45e8f4; }
[aria-busy="true"].service-footnote::before, .composer-footer button[aria-busy="true"]::before {
  width: 16px; height: 16px; border: 2px dashed #45e8f4; border-radius: 30%;
  background: radial-gradient(circle, #45e8f4 0 2px, transparent 3px);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-width: 1150px) {
  .sidebar { flex-basis: 195px; }
  .main-content { padding-right: 22px; padding-left: 22px; }
  .hardware-strip { gap: 15px; }
  .hardware-intro { min-width: 125px; }
  .hardware-note { display: none; }
  .content-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { flex-basis: 66px; align-items: center; padding-right: 8px; padding-left: 8px; }
  .brand { margin: 0 0 44px; }
  .brand-copy, .nav-caption, .nav-link:not(.active) { display: none; }
  .nav-link { justify-content: center; width: 43px; padding: 0; font-size: 0; }
  .nav-link.active { font-size: 0; }
  .nav-count, .sidebar-server div, .sidebar-server > .status-dot, .logout-button { display: none; }
  .sidebar-server { justify-content: center; width: 43px; padding: 7px; }
  .hardware-strip { flex-wrap: wrap; row-gap: 11px; }
  .hardware-item { min-width: 115px; }
  .hardware-divider { display: none; }
  .charts-grid { grid-template-columns: 1fr; }
  .content-columns { grid-template-columns: 1fr; }
  .service-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 17px; }
  .service-row:nth-child(2) { border-top: 1px solid rgba(159,181,210,.07); }
}
@media (max-width: 600px) {
  .sidebar { position: fixed; z-index: 3; top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: 56px; flex-direction: row; justify-content: center; gap: 8px; padding: 6px 8px; border-width: 1px 0 0; background: rgba(9,13,19,.93); backdrop-filter: blur(16px); }
  .brand, .sidebar-spacer, .sidebar-server, .logout-button { display: none; }
  .side-nav { display: flex; justify-content: space-around; width: 100%; margin: 0; }
  .nav-link, .nav-link:not(.active) { display: flex; width: 52px; min-height: 40px; justify-content: center; padding: 0; }
  .nav-link.active::before { top: -8px; right: 13px; bottom: auto; left: 13px; width: auto; height: 2px; }
  .nav-icon { font-size: 16px; }
  .main-content { padding: 0 14px 70px; }
  .topbar { min-height: 55px; }
  .live-pill { padding: 6px; font-size: 7px; }
  .topbar-right { gap: 9px; }
  .user-label, .topbar-divider { display: none; }
  .page-heading { padding-top: 25px; }
  .heading-meta { display: none; }
  .eyebrow { font-size: 7px; }
  .hardware-strip { gap: 13px; padding: 12px; }
  .hardware-intro { flex: 1 1 100%; }
  .hardware-item { flex: 1 1 40%; }
  .hardware-symbol { font-size: 14px; }
  .section-note { font-size: 7px; }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric-card { min-height: 143px; padding: 11px; }
  .chart-panel { padding-right: 11px; padding-left: 11px; }
  .metric-state { font-size: 6px; }
  .content-panel { padding: 14px 12px 10px; }
  .service-list { grid-template-columns: 1fr; }
  .service-row:nth-child(2) { border-top: 0; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-archive { min-height: 0; }
  .conversation-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 70px; }
  .archive-empty { margin: 4px 2px; }
  .chat-messages { min-height: 180px; }
  .activity-panel { padding-right: 12px; padding-left: 12px; }
  .audit-list { grid-template-columns: 1fr; }
  .footer { padding-bottom: 3px; font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
