:root {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #111c2d;
  --surface-raised: #152238;
  --surface-soft: #0e1929;
  --border: rgba(164, 183, 207, .14);
  --border-strong: rgba(164, 183, 207, .23);
  --text: #f2f6fc;
  --muted: #99a9be;
  --subtle: #6f829b;
  --accent: #57e0c0;
  --accent-deep: #123f42;
  --blue: #83b8ff;
  --warning: #ffcc80;
  --danger: #ff8e98;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 10% -10%, rgba(34, 95, 117, .18), transparent 34rem), var(--bg); min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.app-shell { width: min(1500px, 100%); margin: 0 auto; padding: 0 34px 30px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #082a2d; font-weight: 900; font-size: 24px; background: linear-gradient(145deg, #74f4d3, #4dbbba); box-shadow: 0 8px 22px rgba(74, 207, 182, .12); }
.brand-copy { display: grid; gap: 2px; letter-spacing: .06em; }
.brand-copy strong { font-size: 14px; letter-spacing: .16em; }
.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .22em; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.secure-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(87, 224, 192, .10); flex: 0 0 auto; }
.header-user { color: var(--muted); font-size: 12px; padding-left: 15px; border-left: 1px solid var(--border-strong); }
.button { border: 1px solid transparent; border-radius: 10px; min-height: 40px; padding: 10px 14px; font-weight: 650; font-size: 12px; letter-spacing: .01em; display: inline-flex; align-items: center; justify-content: center; gap: 12px; transition: background .16s ease, border-color .16s ease, transform .16s ease, opacity .16s ease; white-space: nowrap; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .56; }
.button-primary { background: var(--accent); color: #062d2a; }
.button-primary:hover:not(:disabled) { background: #7df0d5; }
.button-wide { width: 100%; min-height: 48px; justify-content: space-between; padding: 0 16px; margin-top: 8px; }
.button-secondary { color: #d7e2f1; background: #18263b; border-color: var(--border-strong); }
.button-secondary:hover:not(:disabled) { background: #21334d; border-color: rgba(164,183,207,.4); }
.button-outline { color: var(--accent); background: rgba(87,224,192,.06); border-color: rgba(87,224,192,.28); }
.button-outline:hover:not(:disabled) { background: rgba(87,224,192,.13); }
.button-quiet { background: transparent; color: #cfdaea; border-color: var(--border-strong); }
.button-quiet:hover:not(:disabled) { background: rgba(255,255,255,.05); }
.button-small { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: 11px; }
.auth-layout { min-height: calc(100vh - 119px); padding: 58px 6vw 76px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px); gap: clamp(48px, 9vw, 150px); align-items: center; }
.auth-intro { max-width: 580px; padding: 24px 0; }
.eyebrow { color: var(--accent); font-size: 9px; line-height: 1.5; font-weight: 800; letter-spacing: .19em; }
.auth-intro h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.06; letter-spacing: -.055em; margin: 20px 0 22px; font-weight: 750; }
.auth-intro h1 span { color: var(--accent); }
.auth-intro > p { max-width: 470px; color: #a0afc3; font-size: 15px; line-height: 1.8; margin: 0; }
.auth-points { display: grid; gap: 22px; margin-top: 44px; }
.auth-points > div { display: flex; align-items: center; gap: 13px; }
.point-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #152a39; color: var(--accent); font-size: 20px; }
.auth-points strong, .auth-points small { display: block; }
.auth-points strong { font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.auth-points small { font-size: 11px; color: var(--muted); }
.login-card { width: 100%; padding: 31px; background: linear-gradient(145deg, rgba(23, 37, 58, .97), rgba(15, 26, 42, .98)); border: 1px solid var(--border-strong); border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.login-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.login-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; color: var(--accent); background: rgba(87,224,192,.09); border: 1px solid rgba(87,224,192,.18); }
.login-icon svg { width: 23px; height: 23px; }
.tiny-label { color: var(--subtle); font-size: 8px; letter-spacing: .14em; font-weight: 800; }
.login-card h2 { font-size: 24px; letter-spacing: -.035em; margin: 0 0 7px; }
.muted { color: var(--muted); }
.login-description { font-size: 12px; line-height: 1.6; margin: 0 0 26px; }
#login-form { display: grid; }
#login-form label { color: #d8e1ed; font-size: 11px; font-weight: 650; margin: 0 0 8px; }
#login-form input { display: block; width: 100%; min-height: 45px; color: var(--text); background: #0c1727; border: 1px solid #2a3a50; border-radius: 9px; padding: 0 12px; outline-offset: 2px; margin-bottom: 19px; font-size: 12px; }
#login-form input::placeholder { color: #60728a; }
#login-form input:focus { border-color: #55bfae; outline: 2px solid rgba(87,224,192,.10); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 55px !important; }
.password-toggle { position: absolute; top: 0; right: 0; height: 45px; padding: 0 12px; border: 0; color: var(--accent); background: transparent; font-size: 10px; font-weight: 700; }
.form-error { margin: -5px 0 12px; font-size: 11px; line-height: 1.5; color: var(--danger); }
.login-foot { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 19px; color: #788ba3; font-size: 9px; display: flex; align-items: center; gap: 8px; }
.mini-lock { width: 13px; height: 13px; font-size: 7px; color: var(--accent); display: inline-grid; place-items: center; border: 1px solid rgba(87,224,192,.35); border-radius: 50%; }
#dashboard-view { padding-top: 39px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 25px; }
.page-heading h1 { margin: 9px 0 7px; font-size: clamp(28px, 3vw, 35px); letter-spacing: -.045em; }
.eyebrow-divider { color: #506680; margin: 0 6px; }
.heading-description { font-size: 12px; margin: 0; }
.heading-status { display: grid; justify-items: end; gap: 10px; padding-bottom: 2px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(87,224,192,.22); border-radius: 30px; color: var(--accent); background: rgba(87,224,192,.06); font-size: 10px; font-weight: 700; white-space: nowrap; }
.updated-text { color: var(--subtle); font-size: 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.metric-card, .panel { min-width: 0; background: linear-gradient(145deg, rgba(19,31,50,.98), rgba(15,25,42,.98)); border: 1px solid var(--border); border-radius: var(--radius); }
.metric-card { padding: 19px 18px 16px; min-height: 168px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { color: #9cacc0; font-size: 9px; letter-spacing: .105em; font-weight: 800; white-space: nowrap; }
.metric-glyph { color: var(--accent); font-size: 19px; opacity: .8; }
.metric-main { display: flex; align-items: baseline; gap: 6px; margin-top: 19px; }
.metric-main strong { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.05em; line-height: 1; font-weight: 700; }
.metric-unit { font-size: 10px; color: var(--muted); }
.load-secondary { display: flex; gap: 12px; margin-top: 10px; font-size: 9px; color: var(--subtle); }
.load-secondary strong { color: #cbd7e6; font-weight: 650; margin-left: 3px; }
.metric-progress { display: block; width: 100%; height: 5px; margin: 16px 0 11px; border: 0; border-radius: 20px; overflow: hidden; background: #26364b; accent-color: var(--accent); }
.metric-progress::-webkit-progress-bar { background: #26364b; border-radius: 20px; }
.metric-progress::-webkit-progress-value { background: linear-gradient(90deg, #3bbda7, #74f0d4); border-radius: 20px; }
.metric-progress::-moz-progress-bar { background: var(--accent); border-radius: 20px; }
.metric-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--subtle); font-size: 9px; line-height: 1.45; }
.metric-foot code { color: #90a1b7; font-size: 9px; }
.metric-connections { display: flex; flex-direction: column; }
.connections-summary { flex: 1; margin: 14px 0 8px; min-height: 50px; color: #c4d3e4; font-size: 9px; line-height: 1.55; white-space: pre-wrap; overflow: auto; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 14px; margin-top: 14px; }
.panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-heading h2 { font-size: 17px; letter-spacing: -.025em; margin: 6px 0 0; }
.panel-count, .role-tag { border: 1px solid var(--border-strong); border-radius: 6px; padding: 5px 7px; color: #a3b4ca; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
thead th { padding: 0 10px 11px; color: #73869e; font-size: 8px; font-weight: 800; letter-spacing: .12em; border-bottom: 1px solid var(--border); }
thead th:first-child, tbody td:first-child { padding-left: 0; }
tbody td { border-bottom: 1px solid rgba(164,183,207,.09); padding: 12px 10px; color: #bdcadd; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: #e1eaf5; font-weight: 650; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.table-placeholder { color: var(--muted) !important; padding: 22px 0 !important; font-weight: 400 !important; }
.panel-note { color: var(--subtle); font-size: 9px; margin: 12px 0 0; }
.panel-intro { font-size: 11px; line-height: 1.6; margin: -7px 0 18px; }
.action-list { display: grid; gap: 0; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 13px 0; }
.action-copy { display: grid; gap: 4px; min-width: 0; }
.action-copy strong { font-size: 11px; font-weight: 700; }
.action-copy span { color: var(--muted); font-size: 9px; }
.viewer-note { background: rgba(87,224,192,.05); border: 1px solid rgba(87,224,192,.15); border-radius: 12px; padding: 15px; display: flex; align-items: start; gap: 11px; margin: 16px 0; }
.note-icon { color: var(--accent); }
.viewer-note strong, .viewer-note small { display: block; }
.viewer-note strong { font-size: 11px; margin-bottom: 6px; }
.viewer-note small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.action-result-wrap { margin-top: 14px; border: 1px solid #2b3a4f; border-radius: 11px; overflow: hidden; background: #091321; }
.result-heading { min-height: 38px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #122035; border-bottom: 1px solid #253349; }
.result-heading strong { font-size: 9px; color: #d7e4f3; }
.result-state { color: var(--subtle); font-size: 8px; }
.result-state.success { color: var(--accent); }
.result-state.error { color: var(--danger); }
.terminal-output { margin: 0; min-height: 70px; max-height: 240px; overflow: auto; padding: 12px; color: #b7c9dc; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.logs-panel { grid-column: 1 / -1; }
.logs-heading { align-items: start; margin-bottom: 16px; }
.logs-heading .panel-intro { margin: 7px 0 0; }
.logs-heading code { color: #d0ddeb; font-size: 10px; }
.log-controls { display: flex; align-items: center; gap: 10px; }
.small-live { padding: 6px 8px; font-size: 9px; }
.logs-terminal { height: 340px; overflow: auto; margin: 0; padding: 16px; border: 1px solid #24354a; border-radius: 11px; background: #081321; color: #b4c8d8; font: 10px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.inline-error { color: var(--danger); border: 1px solid rgba(255,142,152,.25); background: rgba(255,142,152,.07); padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; font-size: 10px; }
.logs-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--subtle); font-size: 9px; margin-top: 10px; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 0 2px; color: #62758d; font-size: 9px; letter-spacing: .03em; }
.toast { position: fixed; z-index: 10; bottom: 22px; right: 22px; max-width: min(420px, calc(100vw - 44px)); background: #1a2d40; color: var(--text); border: 1px solid var(--border-strong); padding: 13px 16px; border-radius: 12px; box-shadow: 0 18px 45px rgba(0,0,0,.35); font-size: 11px; line-height: 1.5; }
@media (max-width: 1180px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-connections { grid-column: span 1; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .process-panel, .actions-panel, .logs-panel { grid-column: auto; }
  .auth-layout { padding-left: 2vw; padding-right: 2vw; gap: 6vw; }
}
@media (max-width: 720px) {
  .app-shell { padding: 0 15px 22px; }
  .topbar { height: 70px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; font-size: 21px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 8px; }
  .topbar-right { gap: 8px; }
  .secure-indicator { font-size: 0; gap: 0; }
  .secure-indicator .status-dot { width: 8px; height: 8px; }
  .header-user { display: none; }
  .auth-layout { min-height: auto; padding: 38px 0 40px; grid-template-columns: 1fr; gap: 28px; }
  .auth-intro { padding: 0; }
  .auth-intro h1 { font-size: clamp(38px, 11vw, 52px); margin: 13px 0 14px; }
  .auth-intro > p { font-size: 13px; line-height: 1.7; }
  .auth-points { display: none; }
  .login-card { max-width: 460px; margin: 0 auto; padding: 24px; border-radius: 18px; }
  #dashboard-view { padding-top: 26px; }
  .page-heading { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 30px; }
  .heading-status { display: flex; width: 100%; align-items: center; justify-content: space-between; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { padding: 15px 13px; border-radius: 14px; min-height: 155px; }
  .metric-label { font-size: 8px; letter-spacing: .06em; white-space: normal; }
  .metric-main { margin-top: 17px; }
  .metric-main strong { font-size: 27px; }
  .metric-glyph { font-size: 16px; }
  .metric-foot { font-size: 8px; }
  .load-secondary { gap: 8px; font-size: 8px; }
  .metric-connections { grid-column: 1 / -1; min-height: 130px; }
  .connections-summary { min-height: 40px; }
  .content-grid { margin-top: 10px; gap: 10px; }
  .panel { padding: 17px 14px; border-radius: 14px; }
  .panel-heading h2 { font-size: 16px; }
  .process-panel { overflow: hidden; }
  .table-wrap { margin-right: -2px; }
  thead th { padding-left: 8px; padding-right: 8px; }
  tbody td { padding: 11px 8px; }
  .action-row { gap: 8px; }
  .action-copy span { line-height: 1.4; }
  .button { padding-left: 10px; padding-right: 10px; }
  .logs-heading { flex-direction: column; }
  .log-controls { width: 100%; justify-content: space-between; }
  .logs-terminal { height: 300px; padding: 12px; font-size: 9px; }
  .logs-footer { flex-direction: column; gap: 5px; }
  .dashboard-footer { flex-direction: column; gap: 7px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
