@font-face {
  font-family: 'Sky Terminal';
  src: url('/fonts/PxPlus_IBM_VGA8.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #171719;
  --sidebar: #131315;
  --panel: #1b1b1e;
  --raised: #242428;
  --line: #2d2d32;
  --line-soft: #242428;
  --text: #e0dfe2;
  --muted: #a1a1a1;
  --faint: #787878;
  --accent: #c7a36c;
  --accent-bg: #302a22;
  --success: #9bb4a4;
  --font: 'Sky Terminal', 'Consolas', monospace;
  --sidebar-width: 232px;
}

* { box-sizing: border-box; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); font-synthesis: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, input, select { outline: none; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: none; }
a { color: inherit; }
svg { display: block; }
.icon { display: block; width: 16px; height: 16px; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 400; letter-spacing: 0; }
h2, h3, strong { font-size: 16px; font-weight: 400; }
p, .muted { color: var(--muted); }
.accent { color: var(--accent); }
.small, .mono { font-size: 16px; }
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { padding: 40px; font-size: 32px; color: var(--accent); }

/* Quiet navigation and restrained surfaces follow the selected product-minimal direction. */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid #242427; }
.brand { height: 88px; display: flex; align-items: center; gap: 11px; padding: 0 24px; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 28px; color: var(--accent); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-text strong { font-size: 24px; color: #eeecef; }
.navigation { padding: 8px 12px; }
.nav-label { display: block; margin: 0 12px 10px; color: var(--faint); letter-spacing: .5px; }
.second-label { margin-top: 29px; }
.nav-item { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 11px; padding: 7px 12px; margin-bottom: 3px; border: 0; border-radius: 5px; background: transparent; color: #999999; text-align: left; }
.nav-item .icon { width: 16px; height: 16px; color: #878787; }
.nav-item:hover { background: #202023; color: #dddce0; }
.nav-item.selected { background: #28282d; color: #f0edf2; }
.nav-item.selected .icon { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 22px; text-align: center; color: #a9a9a9; background: #35343b; border-radius: 4px; line-height: 20px; }
.sidebar-bottom { margin-top: auto; padding: 24px 18px 0; }
.sidebar-core { padding: 12px; margin-bottom: 15px; border: 1px solid #29292e; border-radius: 6px; background: #17171a; }
.sidebar-core-top { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.sidebar-core-top .icon { color: var(--faint); width: 15px; height: 15px; }
.sidebar-core-top > .status-dot { margin-left: auto; }
.sidebar-core-version { display: block; height: 20px; line-height: 20px; padding-left: 24px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-core > .muted { display: block; padding-left: 24px; }
.sidebar-core-meta { display: flex; gap: 8px; margin-top: 9px; padding-left: 24px; color: #828282; }
.sidebar-core-meta span + span::before { content: '·'; margin-right: 8px; color: #565656; }
.owner { display: flex; align-items: center; gap: 10px; padding: 15px 0 18px; border-top: 1px solid #28282c; }
.owner > div:nth-child(2) { display: flex; flex-direction: column; }
.owner-name { color: #d3d1d8; }
.owner > .icon { margin-left: auto; color: #777777; }
.owner-avatar { width: 30px; height: 30px; display: grid; place-items: center; background: #2b2928; color: #c6b8a3; border: 1px solid #423c34; border-radius: 6px; }
.workspace { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); min-width: 0; }
.topbar { height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; border-bottom: 1px solid var(--line-soft); color: #959595; }
.breadcrumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb > .icon { width: 15px; height: 15px; color: #7a7a7a; }
.server-name { color: #c2c2c2; }
.breadcrumb-slash { color: #525252; }
.compact-brand { display: none; }
.demo-badge { display: flex; align-items: center; gap: 7px; color: #938b7f; white-space: nowrap; }
.demo-badge .status-dot { width: 4px; height: 4px; background: var(--accent); }
.main-content { max-width: 1600px; margin: 0 auto; padding: 32px 32px 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 5px 11px; border: 1px solid #3a393f; border-radius: 5px; background: #262529; color: #d6d3da; white-space: nowrap; }
.button .icon { width: 15px; height: 15px; }
.button:hover { border-color: #515151; background: #302e34; }
.button.primary { border-color: #c7a36c; background: #c7a36c; color: #231d15; }
.button.primary:hover { background: #d2af7d; }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover { background: #27262b; color: var(--text); }
.button.danger { background: #382725; border-color: #67413b; color: #ddb0a7; }
.button.compact { min-height: 30px; padding: 3px 9px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 4px; background: transparent; color: #838383; }
.icon-button .icon { width: 15px; height: 15px; }
.icon-button:hover { color: #dbdbdb; background: #2e2e2e; }

/* Compact lists carry the hierarchy; color and borders stay secondary. */
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; margin-bottom: 24px; padding: 0; border: 0; }
.stat-card { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.stat-top { display: flex; align-items: center; gap: 10px; color: #989898; }
.stat-top .icon { display: none; }
.stat-bottom { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; }
.stat-value { color: #e2e2e2; font-size: 32px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-detail { color: #757575; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.connection-panel { border: 0; background: transparent; border-radius: 0; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0 0 14px; }
.tabs { display: flex; align-items: center; gap: 4px; }
.tab { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border: 0; border-radius: 4px; background: transparent; color: #979797; white-space: nowrap; }
.tab:hover { color: #dedede; }
.tab.active { background: #2b282f; color: #dcdcdc; }
.tab-count { min-width: 19px; padding: 0 4px; background: #373737; border-radius: 3px; text-align: center; color: #b9b9b9; line-height: 18px; }
.search { display: flex; align-items: center; gap: 9px; padding: 5px 9px; border: 1px solid #323232; border-radius: 5px; background: #19171b; }
.search .icon { width: 14px; height: 14px; color: #838383; }
.search input { width: 178px; min-height: 20px; padding: 0; border: 0; background: transparent; }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--line); }
input, select { width: 100%; min-height: 34px; padding: 5px 10px; border: 1px solid #3c3c3c; border-radius: 5px; background: #17151a; color: #d9d9d9; }
input::placeholder { color: #787878; }
input[type=checkbox] { width: 16px; height: 16px; min-height: 16px; flex-shrink: 0; accent-color: var(--accent); }
select { appearance: auto; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
th { position: relative; height: 37px; padding: 0 13px; border-bottom: 1px solid #303030; color: #888888; font-weight: 400; }
th:first-child, td:first-child { padding-left: 2px; }
th:last-child { width: 112px; padding-right: 0; }
td { height: 68px; padding: 10px 13px; border-bottom: 1px solid #272727; }
td:last-child { padding-right: 0; }
tbody tr:hover { background: #1d1a21; }
.connection-name { display: flex; align-items: center; gap: 11px; }
.connection-icon { display: grid; place-items: center; width: 30px; height: 30px; color: #9f9f9f; }
.connection-icon .icon { width: 17px; height: 17px; }
.connection-icon.dim { color: #686868; }
.connection-name > div:last-child { display: flex; flex-direction: column; gap: 1px; }
.name-button { padding: 0; border: 0; background: transparent; color: #d9d9d9; text-align: left; }
.name-button:hover { color: var(--accent); }
.endpoint { color: #7f7f7f; line-height: 20px; }
.protocol-tag { display: inline-flex; padding: 0 6px; border: 1px solid #363636; border-radius: 4px; background: #222222; color: #b5b5b5; line-height: 22px; }
.table-value { color: #b7b7b7; }
.transport-note { display: block; color: #767676; line-height: 20px; }
.avatar-stack { display: flex; align-items: center; min-width: 65px; padding-left: 3px; }
.mini-avatar { display: grid; place-items: center; width: 24px; height: 24px; margin-left: -3px; border: 2px solid var(--bg); border-radius: 50%; background: #323232; color: #bdbdbd; }
.avatar-1 { background: #403132; color: #d2b9b5; }
.avatar-2 { background: #343434; color: #bfbfbf; }
.avatar-extra { color: var(--muted); margin-left: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #868686; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: var(--success); }
.pill.positive { color: var(--success); }
.pill:not(.positive) .status-dot, .status-dot.off { background: #666666; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.diagnostic-dialog .modal-body { display: flex; flex-direction: column; gap: 16px; }
.diagnostic-summary { display: flex; gap: 16px; align-items: flex-start; min-height: 86px; }
.diagnostic-summary > :first-child { flex: 1; }
.diagnostic-summary-result { min-width: 0; }
.diagnostic-summary-detail { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
.diagnostic-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.diagnostic-progress-fill { height: 100%; background: var(--accent); }
.diagnostic-checks { display: flex; flex-direction: column; }
.diagnostic-row { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.diagnostic-row:last-child { border-bottom: 0; }
.diagnostic-symbol { width: 18px; flex-shrink: 0; padding-top: 2px; color: var(--muted); }
.diagnostic-passed .diagnostic-symbol { color: #9fbbab; }
.diagnostic-failed .diagnostic-symbol { color: #d49c91; }
.diagnostic-warning .diagnostic-symbol, .diagnostic-running .diagnostic-symbol { color: var(--accent); }
.diagnostic-row-content { min-width: 0; flex: 1; }
.diagnostic-row-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 23px; }
.diagnostic-duration { margin-left: auto; font-size: 14px; }
.diagnostic-description { margin: 5px 0 0; font-size: 14px; line-height: 1.4; }
.diagnostic-details { display: flex; gap: 5px 18px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.diagnostic-detail { overflow-wrap: anywhere; }
.diagnostic-scope { flex: 1; margin: 0; max-width: 410px; line-height: 1.35; }
.diagnostic-dialog .modal-footer { flex-wrap: wrap; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 11px 0; color: #767676; }
.table-summary { display: flex; align-items: center; gap: 7px; }
.table-summary .status-dot { width: 4px; height: 4px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 23px; }
.mini-panel { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 17px; border: 1px solid #2c2c2c; border-radius: 7px; background: #1a171e; }
.mini-panel > .icon-button { margin-left: auto; align-self: flex-start; }
.detail-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #818181; }
.eyebrow { display: block; margin-bottom: 5px; color: #7a7a7a; }
.inline-core { display: flex; align-items: center; gap: 13px; margin-bottom: 2px; }
.mini-panel p { margin-top: 4px; color: #808080; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 9px 24px; margin-top: 30px; padding: 15px 0 21px; border-top: 1px solid #252525; color: #777777; }
.page-footer > span:last-child { white-space: nowrap; }
.page-footer a { color: inherit; text-decoration: none; }
.page-footer a:hover { color: var(--accent); }

.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #3b3b3b; border-radius: 7px; background: #262626; color: #b6b6b6; }
.access-list { display: flex; flex-wrap: wrap; gap: 5px 12px; min-height: 24px; }
.access-tag { display: flex; align-items: center; gap: 6px; color: #a7a7a7; }
.access-tag .status-dot { width: 4px; height: 4px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; }
.section-heading + .table-scroll td:first-child, .section-heading + .table-scroll th:first-child { padding-left: 19px; }
.section-heading + .table-scroll td:last-child { padding-right: 15px; }
.activity-panel { margin-top: 20px; padding: 19px; }
.activity-panel h2 { margin-bottom: 10px; }
.log-panel { padding: 5px 19px; }
.log-row { display: flex; align-items: baseline; gap: 18px; min-height: 42px; padding: 10px 0; border-bottom: 1px solid #282828; }
.log-row:last-child { border: 0; }
.log-time { color: #7a7a7a; }
.log-level { color: #959595; }
.core-actions { display: flex; gap: 10px; }
.notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 23px; color: #888888; line-height: 1.5; }
.notice > .icon { width: 15px; height: 15px; margin-top: 4px; }
.subheading { margin-top: 27px; }
.future-core { display: flex; align-items: center; gap: 15px; padding: 20px; color: var(--muted); }
.future-core .pill { margin-left: auto; }
.future-core h3 { color: var(--text); }
.settings-panel { max-width: 840px; padding: 23px; }
.settings-panel > h2 { margin-bottom: 24px; }
.settings-panel > p { margin-top: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
label { display: flex; flex-direction: column; gap: 8px; color: #bfbfbf; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 23px 0; border-bottom: 1px solid #2d2d2d; }
.setting-row p { margin-top: 5px; }
.setting-value { display: flex; align-items: center; gap: 8px; color: #a3a3a3; }
.setting-row:last-of-type { margin-bottom: 22px; }
.reset-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; max-width: 840px; margin-top: 18px; padding: 22px; }
.reset-panel p { margin-top: 5px; }
.empty-state { width: 100%; padding: 55px 20px; text-align: center; }
.empty-state > .icon { width: 27px; height: 27px; margin: 0 auto 16px; color: #7c7c7c; }
.empty-state h3 { font-size: 24px; }
.empty-state p { margin-top: 9px; }

.modal-overlay { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: #09080acc; }
.modal { display: flex; flex-direction: column; width: 100%; max-width: 550px; max-height: calc(100dvh - 48px); border: 1px solid #383838; border-radius: 10px; background: #1b1b1b; box-shadow: 0 24px 80px #0008; }
.modal.wide { max-width: 760px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 25px; border-bottom: 1px solid #2d2d2d; }
.modal-header h2 { font-size: 24px; }
.modal-close { margin: -3px -7px 0 8px; }
.steps { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.steps .icon { width: 11px; height: 11px; color: #6b6b6b; }
.modal-body { padding: 24px 25px; overflow: auto; overscroll-behavior: contain; }
.modal-body h3 { font-size: 16px; }
.modal-body h3 + p { margin-top: 8px; }
.protocol-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 22px; }
.protocol-option { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 138px; padding: 15px; border: 1px solid #363636; border-radius: 7px; background: #212121; text-align: left; }
.protocol-option:hover { border-color: #9b7851; background: #332630; }
.protocol-option-top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; color: #989898; }
.protocol-option-top > .icon:last-child { width: 12px; color: #707070; }
.protocol-option > span { color: #979797; }
.selected-protocol { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.form-section-title { margin: 21px 0 18px; padding-bottom: 12px; border-bottom: 1px solid #333333; }
.field-label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.field-label label { display: block; }
.field-help { position: relative; }
.field-help > button { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 1px solid #777; border-radius: 50%; background: transparent; color: #aaa; cursor: pointer; line-height: 16px; }
.help-popover { position: absolute; left: -30px; bottom: 25px; z-index: 5; display: none; width: 380px; max-width: calc(100vw - 65px); padding: 16px 18px; border: 1px solid #606060; border-radius: 7px; background: #262626; box-shadow: 0 8px 25px #0007; color: #d3d3d3; line-height: 1.5; pointer-events: none; }
.help-popover p { margin-top: 8px; color: #adadad; }
.field-help > button:hover + .help-popover { display: block; }
.field:nth-child(2n) .help-popover { left: auto; right: -10px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 25px; border-top: 1px solid #333333; }
.modal-footer-actions { display: flex; gap: 9px; margin-left: auto; }
.form-error { display: flex; align-items: center; gap: 9px; margin-top: 21px; padding: 13px; border: 1px solid #795344; border-radius: 5px; background: #3b2926; color: #ddb49e; }
.grant-list { display: flex; flex-direction: column; gap: 8px; margin-top: 17px; }
.grant-option { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #333333; border-radius: 5px; background: #212121; cursor: pointer; }
.grant-option > div { display: flex; flex-direction: column; gap: 3px; }
.grant-option > span:last-child { margin-left: auto; }
.share-content { text-align: center; }
.qr-code { width: 100%; aspect-ratio: 1; margin: 22px auto 18px; padding: 8px; border-radius: 6px; background: #fff; }
.qr-code > svg { width: 100%; height: 100%; }
.copy-field { display: flex; align-items: center; margin-top: 19px; padding: 4px 8px 4px 0; border: 1px solid #3a3a3a; border-radius: 5px; background: #171717; }
.copy-field input { min-width: 0; border: 0; background: transparent; }
.share-content .notice { text-align: left; }
.toast { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-width)/2); z-index: 50; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 40px); padding: 12px 13px 12px 17px; border: 1px solid #685636; border-radius: 7px; background: #30291e; box-shadow: 0 10px 30px #0005; color: #dfc59d; transform: translateX(-50%); }
.toast > .icon { width: 16px; height: 16px; color: var(--accent); }

@media (min-width: 1500px) {
  .main-content { padding: 38px 42px 0; }
  .topbar { padding-inline: 42px; }
}
@media (max-width: 1250px) {
  .main-content { padding: 28px 24px 0; }
  .topbar { padding-inline: 24px; }
  .table-scroll table { min-width: 900px; }
  .stat-detail { display: none; }
}
@media (max-width: 1000px) {
  :root { --sidebar-width: 64px; }
  .brand { justify-content: center; height: 78px; padding: 0; }
  .brand-text, .nav-label, .nav-item > span, .sidebar-core, .owner > div:nth-child(2), .owner > .icon { display: none; }
  .navigation { padding: 8px; }
  .nav-item { justify-content: center; min-height: 39px; padding: 10px 0; margin-bottom: 6px; }
  .nav-item:nth-of-type(4) { margin-top: 24px; }
  .sidebar-bottom { padding: 0 16px; }
  .owner { justify-content: center; padding: 17px 0; }
  .compact-brand { display: inline; color: var(--text); }
  .breadcrumb > .icon { display: none; }
  .main-content { padding: 25px 22px 0; }
  .topbar { padding-inline: 22px; }
  .stats-grid { gap: 20px; }
  .mini-panel { padding: 15px; gap: 10px; }
  .mini-panel .detail-icon { display: none; }
}
@media (max-width: 680px) {
  :root { --sidebar-width: 52px; }
  .navigation { padding-inline: 5px; }
  .sidebar-bottom { padding-inline: 10px; }
  .brand-mark, .brand-mark svg { width: 23px; height: 25px; }
  .owner-avatar { width: 27px; height: 27px; }
  .main-content { padding: 22px 14px 0; }
  .topbar { height: 49px; padding-inline: 14px; gap: 10px; }
  .breadcrumb { gap: 8px; }
  .breadcrumb-slash, .breadcrumb > span:last-child { display: none; }
  .compact-brand { padding-right: 8px; border-right: 1px solid #3a3a3a; }
  .demo-badge .status-dot { display: none; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 23px; }
  h1 { font-size: 32px; }
  .page-heading p { margin-top: 6px; }
  .stats-grid { gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 12px; }
  .stat-label { overflow-wrap: anywhere; }
  .stat-value { font-size: 32px; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .tab { gap: 6px; padding: 4px 7px; }
  .tabs { flex-wrap: wrap; }
  .bottom-grid { grid-template-columns: 1fr; gap: 12px; }
  .mini-panel { min-height: 78px; }
  .mini-panel .detail-icon { display: grid; }
  .page-footer { margin-top: 24px; gap: 9px 18px; }
  .settings-panel { padding: 19px; }
  .reset-panel { flex-direction: column; align-items: flex-start; padding: 19px; }
  .setting-row { align-items: flex-start; gap: 15px; }
  .log-row { flex-wrap: wrap; gap: 10px; }
  .modal-overlay { padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-header { padding: 19px; }
  .modal-body { padding: 19px; }
  .modal-footer { flex-wrap: wrap; padding: 15px 19px; }
  .protocol-grid { grid-template-columns: repeat(2,1fr); gap: 9px; }
  .protocol-option { padding: 12px; min-height: 132px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-label { justify-content: space-between; }
  .field-help .help-popover { left: auto; right: 0; width: 350px; }
  .toast { left: 50%; width: max-content; max-width: calc(100vw - 30px); }
}
.enabled-checkbox { display: block; width: 16px; height: 16px; margin: 0 auto; cursor: pointer; }
.user-name { display: flex; align-items: center; gap: 12px; }
.users-table table, .connections-table table { table-layout: fixed; width: 100%; }
.connections-table table { min-width: 900px; }
.users-table table { min-width: 960px; }
.users-table th:nth-child(4), .users-table td:nth-child(4), .connections-table th:nth-child(5), .connections-table td:nth-child(5) { text-align: center; }
.recipient-presence { white-space: nowrap; color: var(--muted); }
.recipient-presence.online { color: var(--success); }
.recipient-presence.recent { color: var(--accent); }
.users-table th:last-child, .connections-table th:last-child { width: auto; }
.users-table td { height: 66px; }
.users-table .access-list { flex-wrap: nowrap; height: 24px; }
.access-tag { flex-shrink: 1; min-width: 0; }
.access-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-name > div:last-child, .user-name { min-width: 0; }
.connection-name > div:last-child { flex: 1; }
.name-button, .endpoint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name .name-button { min-width: 0; }
.modal.wide { height: min(760px, calc(100dvh - 48px)); }
.modal.wide .modal-header, .modal.wide .modal-footer { flex-shrink: 0; }
.modal.wide .modal-body { flex: 1; min-height: 0; scrollbar-gutter: stable; }
.modal.wide .modal-footer { min-height: 69px; }
.button:focus-visible { background: #302e34; }
.button.primary:focus-visible { background: #d2af7d; }
.name-button:focus-visible, .icon-button:focus-visible { color: var(--accent); }
.field-help { display: inline-flex; }
.protocol-choice { flex-direction: row; align-items: center; gap: 10px; min-height: 54px; padding: 12px; }
.protocol-choice > .icon:last-child { margin-left: auto; width: 12px; color: var(--faint); }
.core-grid { margin-top: 0; }
.core-option { min-height: 110px; }
.core-actions { flex-wrap: wrap; }
.runtime-log { height: 440px; overflow: auto; scrollbar-gutter: stable; }
.unused-anchor-never-matched {}
/* Operational dashboard and a log viewport that uses the available height. */
.page-footer { justify-content: flex-end; }
.hardware-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.hardware-metric { display: flex; flex-direction: column; gap: 8px; padding: 22px; min-width: 0; }
.metric-value { font-size: 28px; line-height: 1.4; white-space: nowrap; }
.system-status-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.system-status-row:last-child { border-bottom: 0; }
.system-status-row > div { display: flex; flex-direction: column; gap: 4px; }
.sidebar-core-list { display: flex; flex-direction: column; gap: 7px; }
button.sidebar-core { width: 100%; text-align: left; font: inherit; color: inherit; }
button.sidebar-core:hover { background: var(--raised); }
.sidebar-core-list .sidebar-core { padding: 8px 12px; margin: 0; }
.sidebar-core-detail { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.sidebar-core-detail .sidebar-core-version { padding: 0; margin: 0; max-width: 86px; flex-shrink: 0; }
.sidebar-core-detail .muted { white-space: nowrap; }
.sidebar-bottom { padding-top: 12px; }
.owner { justify-content: space-between; }
.owner-name { margin-right: auto; }
.core-page > .page-heading { margin-bottom: 18px; }
.engine-list { display: grid; gap: 10px; container-type: inline-size; }
.engine-panel { min-width: 0; padding: 12px 16px 9px; }
.engine-panel:hover { border-color: #3c3c44; }
.engine-main { display: grid; grid-template-columns: minmax(0,1fr) 240px auto; align-items: center; gap: 10px 16px; min-height: 48px; }
.engine-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.engine-symbol { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #34343b; border-radius: 5px; color: #919199; background: #232328; }
.engine-symbol .icon { width: 18px; height: 18px; }
.engine-identity-text { min-width: 0; }
.engine-name { display: flex; align-items: center; gap: 8px; min-height: 27px; }
.engine-name h2 { font-size: 24px; line-height: 1; white-space: nowrap; }
.engine-version { padding: 0 6px; min-width: 40px; max-width: 140px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #bcbac2; background: #27272d; border: 1px solid #34343c; border-radius: 3px; }
.engine-repository { flex: 0 0 24px; width: 24px; height: 24px; padding: 4px; color: var(--faint); }
.engine-service { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 21px; }
.engine-health { display: flex; flex-direction: column; gap: 2px; }
.engine-state { display: flex; align-items: center; min-height: 25px; }
.engine-state .pill { min-width: 154px; }
.engine-state.failed .pill, .engine-state.failed .status-dot { color: #d49999; }
.engine-state.failed .status-dot { background: #d49999; }
.engine-readouts { display: flex; align-items: center; gap: 16px; line-height: 21px; }
.engine-readout { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.engine-readout .muted { color: var(--faint); }
.engine-actions { display: grid; grid-template-columns: 128px 32px 112px 32px; align-items: center; gap: 6px; }
.engine-actions .button { width: 100%; gap: 6px; min-height: 32px; }
.engine-actions .icon-button { width: 32px; height: 32px; }
.engine-toggle { grid-column: 1; }
.engine-restart { grid-column: 2; }
.engine-update { grid-column: 3; }
.engine-remove { grid-column: 4; }
.engine-actions .engine-remove:hover { color: #ddb0a7; background: #382725; }
.engine-feedback { height: 20px; line-height: 20px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container(max-width:960px) {
  .engine-main { grid-template-columns: minmax(0,1fr) auto; }
  .engine-actions { grid-column: 1/-1; justify-content: end; padding-top: 8px; border-top: 1px solid var(--line-soft); }
}
@container(max-width:540px) {
  .engine-main { grid-template-columns: minmax(0,1fr); }
  .engine-health { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
  .engine-actions { grid-template-columns: minmax(100px,1fr) 28px minmax(100px,1fr) 28px; gap: 4px; }
  .engine-actions .icon-button { width: 28px; }
  .engine-actions .button { padding-inline: 6px; }
  .engine-actions .button > .icon { display: none; }
  .engine-name { gap: 6px; }
  .engine-name h2 { font-size: 20px; }
  .engine-version { max-width: 124px; }
}
.settings-panel + .settings-panel { margin-top: 20px; }
.protocol-option:disabled, .protocol-option:disabled:hover { opacity: .35; background: var(--panel); border-color: var(--line); cursor: not-allowed; }
.logs-layout { height: calc(100dvh - 55px); min-height: 420px; display: flex; flex-direction: column; }
.logs-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.logs-page > .page-heading { flex-shrink: 0; margin-bottom: 18px; }
.log-actions, .log-toolbar { display: flex; align-items: center; gap: 16px; }
.log-toolbar { justify-content: space-between; margin-bottom: 14px; flex-shrink: 0; }
.log-toolbar label { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.log-toolbar select { min-width: 164px; }
.logs-layout .runtime-log { height: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.logs-layout > .page-footer { flex-shrink: 0; margin-top: 18px; }
.log-row { align-items: flex-start; }
.log-time { flex: 0 0 72px; }
.log-level { flex: 0 0 64px; }
.log-message { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.level-warning { color: var(--accent); }
.level-error, .level-fatal { color: #d49999; }
.log-empty { padding: 17px 0; }
@media(max-width:1100px) { .hardware-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .log-actions { gap: 8px; }
  .log-actions > .small { display: none; }
  .log-toolbar { gap: 8px; flex-wrap: wrap; }
  .log-row { gap: 8px; }
  .log-time { flex-basis: 64px; }
  .log-level { flex-basis: 56px; }
  .hardware-metric { padding: 16px; }
  .metric-value { font-size: 23px; }
}

/* Hidden measurement prevents tooltips from flashing at a preliminary position. */
.help-popover { position: fixed; display: block; visibility: hidden; }
.field-help > button:hover + .help-popover[data-positioned="true"] { visibility: visible; }
.setting-label { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.availability-chip { display: inline-flex; flex-shrink: 0; padding: 1px 7px; border: 1px solid #353539; border-radius: 4px; background: #242427; color: #97979d; line-height: 22px; }
.log-level-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.log-level-filters .log-level-option { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.log-level-option input { margin: 0; width: 14px; height: 14px; }
.host-address { display: flex; gap: 16px; align-items: center; padding: 13px 20px; margin-bottom: 18px; }
.host-address .mono { min-width: 0; overflow-wrap: anywhere; }
.telemetry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 22px 0; }
.telemetry-card { min-width: 0; padding: 18px 20px 13px; }
.network-graph { grid-column: 1 / -1; }
.graph-heading, .graph-axis { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.graph-heading { margin-bottom: 12px; }
.graph-heading .mono { text-align: right; }
.graph-plot { position: relative; height: 160px; }
.telemetry-plot { display: block; width: 100%; height: 160px; }
.graph-empty { position: absolute; left: 0; right: 0; top: 60px; text-align: center; }
.graph-scale { position: absolute; top: -3px; right: 0; padding-left: 7px; background: var(--panel); }
.graph-axis { margin-top: 7px; font-size: 14px; }
.graph-legend { display: flex; gap: 16px; }
.rx-key { color: #c7a36c; }
.tx-key { color: #8ca8b9; }
@media(max-width:800px) {
  .telemetry-grid { grid-template-columns: 1fr; }
  .graph-heading { flex-wrap: wrap; }
  .log-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .host-address { align-items: flex-start; }
}

/* Owner sign-in and account controls. */
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 19px; }
.login-panel h1 { margin-bottom: 6px; font-size: 29px; }
.login-panel label { gap: 7px; }
.login-panel .button { justify-content: center; }
.login-error { min-height: 24px; color: #d49999; line-height: 24px; }
.owner-form { display: flex; flex-direction: column; gap: 18px; }
.session-container { overflow: auto; scrollbar-gutter: stable; }
.session-table { min-width: 620px; width: 100%; table-layout: fixed; }
.session-table th:nth-child(1) { width: 32%; }
.session-table th:nth-child(2) { width: 26%; }
.session-table th:nth-child(3) { width: 28%; }
.session-table th:last-child { width: 14%; text-align: right; }
.session-table td { overflow-wrap: anywhere; }
.session-table td:first-child > span { display: block; }
.session-table td:last-child { text-align: right; }
.session-table td:last-child button { margin-left: auto; }

/* The builder consumes core-owned field conditions and keeps its frame stable. */
.modal.wide { max-width: 880px; }
.engine-name .engine-settings { width: 26px; height: 26px; }
.core-settings-section { padding-block: 20px; border-bottom: 1px solid var(--line-soft); }
.core-settings-section h3 { margin: 0 0 16px; }
.core-settings-section .field:has(textarea) { grid-column: 1 / -1; }
.core-settings-form > p { margin-top: 20px; }
.core-settings-form .field:has(input[type=checkbox]) { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.core-settings-form .field:has(input[type=checkbox]) .field-label { margin-bottom: 0; }
.core-settings-form .builder-row { display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: end; gap: 12px; }
.core-settings-form .builder-row > .form-grid { grid-template-columns: 130px minmax(0,1fr) 145px; gap: 12px; }
@media (max-width: 760px) { .core-settings-form .builder-row > .form-grid { grid-template-columns: 1fr; } }
.builder-steps { gap: 7px; flex-wrap: wrap; }
.step-button { background: none; border: 0; padding: 4px 7px; color: var(--muted); font: inherit; white-space: nowrap; }
.step-button.active { background: #2b2926; color: var(--accent); border-radius: 4px; }
.step-button.complete { color: var(--text); }
.builder-content { display: flex; flex-direction: column; gap: 16px; }
.builder-content .form-section-title { margin-bottom: 0; }
.builder-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.builder-choice { text-align: left; min-height: 96px; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #202020; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 9px; }
.builder-choice.selected { background: #2b2925; border-color: #76644a; }
.builder-choice:disabled { opacity: .4; cursor: not-allowed; }
.choice-field { margin-bottom: 16px; }
.protocol-card { position: relative; display: flex; border: 1px solid var(--line); border-radius: 6px; background: #202020; min-height: 130px; }
.protocol-select { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-height: 130px; border: 0; border-radius: inherit; padding: 14px 14px 38px; background: none; color: var(--text); font: inherit; text-align: left; }
.protocol-card-heading { display: flex; align-items: center; gap: 9px; width: 100%; }
.protocol-card-heading > .icon:last-child { margin-left: auto; width: 12px; }
.protocol-card > .field-help { position: absolute; right: 12px; bottom: 12px; }
.protocol-card.available:hover { border-color: #5a5143; background: #292622; }
.protocol-select:focus-visible { background: #292622; }
.protocol-select:disabled { color: var(--muted); cursor: not-allowed; }
.protocol-description-row { display: flex; align-items: flex-start; gap: 8px; }
.protocol-description { font-size: 16px; line-height: 1.35; color: var(--muted); margin: 0; flex: 1; }
.protocol-card .availability-chip { margin-top: auto; align-self: flex-start; }
.connection-review { margin: 0; }
.review-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.review-row dt { color: var(--muted); }
.review-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.advanced-toggle { align-self: flex-start; margin-top: 8px; }
.field-error { color: #d49999; font-size: 16px; line-height: 1.3; }
.form-grid .full-field { grid-column: 1 / -1; }
.builder-row { padding: 14px; border: 1px solid var(--line); border-radius: 4px; }
.builder-rows { display: flex; flex-direction: column; gap: 12px; }
.builder-notice { margin: 0; padding: 12px; border: 1px solid #564a36; border-radius: 4px; color: var(--accent); background: #25221d; }
.builder-choice .availability-chip { align-self: flex-start; width: fit-content; }
.builder-choice-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.recommended-chip { display: inline-flex; flex-shrink: 0; padding: 2px 6px; border: 1px solid #5e4e35; border-radius: 3px; color: var(--accent); background: #30291f; font-size: 14px; line-height: 18px; }
.builder-choice:not(:disabled):hover { background: #292929; border-color: #625746; }
.builder-choice.selected:not(:disabled):hover { background: #332e26; border-color: #8c754e; }
.protocol-option:not(:disabled):hover { background: #292622; border-color: #625746; }
.protocol-option:disabled:hover { background: #212121; border-color: #363636; }
.step-button { border-radius: 4px; }
.step-button:not(:disabled):hover, .step-button:not(:disabled):focus-visible { background: #303033; color: var(--text); }
.step-button.active:not(:disabled):hover { background: #393126; color: var(--accent); }
.step-button:disabled { cursor: default; }
.transport-guide { margin-top: 16px; padding: 12px 14px; border-left: 2px solid #695638; background: #22211f; border-radius: 0 4px 4px 0; }
.transport-guide-title { color: var(--text); }
.transport-guide p { margin: 7px 0 0; color: var(--muted); white-space: pre-line; line-height: 1.4; }
.field-hint { margin: 8px 0 0; color: var(--muted); line-height: 1.35; font-size: 16px; }
textarea { width: 100%; resize: vertical; padding: 10px; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.maintenance-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.maintenance-heading ~ .setting-row > div:first-child { display: grid; gap: 6px; min-width: 0; }

.core-update-status { margin-top: 16px; min-height: 20px; }

.sidebar-update { padding: 12px; border: 1px solid var(--line); border-radius: 5px; display: grid; grid-template-rows: 24px 48px 20px 4px 20px 32px; gap: 8px; font-size: 16px; }
.update-header, .update-heading, .update-stage, .update-metrics, .update-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.update-heading { justify-content: flex-start; }
.update-chip { white-space: nowrap; color: var(--muted); font-size: 16px; line-height: 20px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px; }
.update-chip.failed { color: var(--accent); border-color: var(--accent); }
.update-versions { display: grid; gap: 4px; }
.update-version { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: center; }
.update-version > :last-child { text-align: right; white-space: nowrap; }
.update-stage > :first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.update-stage > :last-child { flex-shrink: 0; }
.update-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.update-progress-fill { height: 100%; background: var(--accent); }
.update-progress-fill.indeterminate { width: 28% !important; animation: core-install-activity 2s linear infinite; }
.update-metrics { font-size: 16px; line-height: 20px; }
.update-source { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.update-source:hover { color: var(--text); }
.update-actions .button { flex: 1; min-width: 0; justify-content: center; height: 32px; }
.update-actions .icon-button { flex: 0 0 32px; height: 32px; }
.update-details { display: grid; gap: 0; margin: 0; }
.update-detail-row { display: grid; grid-template-columns: 144px minmax(0,1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.update-detail-row dd { margin: 0; overflow-wrap: anywhere; }
.core-install-progress { min-height: 208px; padding: 18px; margin: 20px 0; border: 1px solid var(--line); border-radius: 5px; display: grid; gap: 12px; }
.core-install-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.core-install-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.core-install-step { display: flex; align-items: center; gap: 6px; padding: 5px 8px; color: var(--faint); }
.core-install-step.active { color: var(--accent); background: var(--accent-bg); border-radius: 3px; }
.core-install-step.done { color: var(--text); }
.core-install-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.core-install-fill { height: 100%; background: var(--accent); }
.core-install-fill.indeterminate { width: 28% !important; animation: core-install-activity 2s linear infinite; }
@keyframes core-install-activity { from { transform: translateX(-100%); } to { transform: translateX(360%); } }
@media(prefers-reduced-motion: reduce) { .core-install-fill.indeterminate, .update-progress-fill.indeterminate { animation: none; transform: none; } }
.core-install-artifact { min-height: 24px; overflow-wrap: anywhere; }
.core-install-details summary { cursor: pointer; color: var(--muted); }
.core-install-details summary:hover { color: var(--text); }
@media (max-width: 1000px) {
  .sidebar-update { padding: 0; border: 0; display: block; }
  .sidebar-update > :not(.update-actions) { display: none; }
  .update-actions { flex-direction: column; gap: 4px; }
  .update-actions .button { width: 100%; min-width: 0; padding: 7px 0; font-size: 0; gap: 0; }
  .update-actions .icon-button { flex-basis: 32px; }
}

.field-control { position: relative; min-width: 0; }
.field-control.with-generator > input, .field-control.with-generator > textarea { padding-right: 44px; }
.field-control.with-generator > input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.field-control.with-generator > input[type=number]::-webkit-inner-spin-button, .field-control.with-generator > input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field-control > .field-generator { position: absolute; top: 1px; right: 1px; width: 36px; height: 32px; padding: 7px; border-left: 1px solid var(--line); border-radius: 0 4px 4px 0; background: var(--raised); color: var(--text); }
.field-control > .field-generator:hover, .field-control > .field-generator:focus-visible { background: var(--accent-bg); color: var(--accent); }
.sni-panel { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; display: grid; gap: 10px; }
.sni-panel p { margin: 0; }
.sni-panel progress { width: 100%; height: 4px; accent-color: var(--accent); }
.sni-details summary { cursor: pointer; color: var(--muted); }
.sni-details pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: var(--muted); }
.sni-result { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 4px 10px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--text); }
.sni-result .small { grid-column: 1; }
.sni-result .icon { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.sni-result:hover { background: var(--raised); border-color: var(--accent); }
