:root {
  color-scheme: light;
  --bg: #eceeef;
  --surface: #f7f8f8;
  --panel: #fff;
  --panel-soft: #f2f4f5;
  --line: #d8dcdf;
  --line-strong: #c3c9ce;
  --text: #20252a;
  --muted: #68727c;
  --primary: #2367d1;
  --primary-soft: #e8f0fe;
  --green: #12825b;
  --green-soft: #e5f5ee;
  --amber: #a86108;
  --amber-soft: #fff1d7;
  --red: #be3445;
  --red-soft: #fdecef;
  --sidebar: #171b1f;
  --sidebar-soft: #22272c;
  --sidebar-text: #f3f5f6;
  --sidebar-muted: #9da6ae;
  --shadow: 0 14px 35px rgba(30, 39, 47, .13);
}
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111416;
  --surface: #171a1d;
  --panel: #1d2125;
  --panel-soft: #24292e;
  --line: #343a40;
  --line-strong: #485058;
  --text: #eef1f3;
  --muted: #a3abb3;
  --primary: #75a9f6;
  --primary-soft: #233750;
  --green: #4bc38c;
  --green-soft: #1e382d;
  --amber: #e2a44e;
  --amber-soft: #3b2f1e;
  --red: #ef7d89;
  --red-soft: #41262b;
  --sidebar: #0d0f11;
  --sidebar-soft: #191d20;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", "Microsoft YaHei", Arial, sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 11px/1.4 Consolas, monospace; color: var(--muted); }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
.app-shell { display: grid; grid-template: 58px minmax(0, 1fr) / 232px minmax(0, 1fr); height: 100vh; }
.sidebar { grid-row: 1 / 3; display: flex; flex-direction: column; min-width: 0; background: var(--sidebar); color: var(--sidebar-text); border-right: 1px solid #2b3035; }
.brand-block { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid #2a2f34; }
.brand-block > div:last-child { display: grid; }
.brand-block strong { font-size: 15px; }
.brand-block span { color: var(--sidebar-muted); font-size: 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #4f86da; border-radius: 7px; background: #205cb7; color: #fff; font-size: 12px; font-weight: 750; }
.nav-stack { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-label { display: block; padding: 11px 9px 4px; color: #707b85; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.nav-item { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 35px; padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: #bbc2c8; text-align: left; cursor: pointer; }
.nav-item:hover { background: #20252a; color: #fff; }
.nav-item.active { background: #26384f; color: #fff; box-shadow: inset 3px 0 #6da3f4; }
.nav-item b { min-width: 20px; padding: 1px 5px; border-radius: 8px; background: #30363c; color: #bfc7cd; font-size: 10px; text-align: center; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-dot.online { background: var(--green); }
.topbar { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; white-space: nowrap; }
.crumbs span { color: var(--muted); }
.crumbs span::after { content: "/"; margin-left: 8px; }
.top-actions { display: flex; align-items: center; gap: 7px; }
.top-actions form { margin: 0; }
.top-search { display: flex; align-items: center; gap: 7px; width: min(330px, 30vw); min-height: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.top-search svg { color: var(--muted); }
.top-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.icon-button, .user-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
.user-button { border-color: #26384f; background: #26384f; color: #fff; font-size: 11px; font-weight: 700; }
.workspace { grid-column: 2; min-width: 0; overflow: auto; }
.view { display: none; min-height: 100%; padding: 18px; }
.view.active { display: block; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 72px; margin-bottom: 14px; }
.page-head h1 { margin: 1px 0 2px; font-size: 24px; line-height: 1.2; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); cursor: pointer; }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.secondary { background: var(--panel); }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 1px 0 0; font-size: 16px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; }
.metric-strip { display: grid; grid-template-columns: repeat(4,minmax(130px,1fr)); margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.metric-strip button { display: grid; gap: 3px; min-height: 92px; padding: 13px 15px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.metric-strip button:last-child { border-right: 0; }
.metric-strip button:hover { background: var(--panel-soft); }
.metric-strip span, .metric-strip small { color: var(--muted); }
.metric-strip strong { font-size: 26px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compact-list { display: grid; }
.compact-list button { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(120px,.75fr) auto; align-items: center; gap: 12px; min-height: 59px; padding: 8px 13px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.compact-list button:last-child { border-bottom: 0; }
.compact-list button:hover { background: var(--panel-soft); }
.compact-list button > span:first-child { display: grid; min-width: 0; }
.compact-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 23px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); color: var(--muted); font-size: 11px; white-space: nowrap; }
.badge.active, .badge.online, .badge.succeeded { border-color: #acd9c6; background: var(--green-soft); color: var(--green); }
.badge.standby, .badge.awaiting_approval, .badge.awaiting_authorization { border-color: #efcf9d; background: var(--amber-soft); color: var(--amber); }
.badge.expired, .badge.failed, .badge.blocked { border-color: #edb5bd; background: var(--red-soft); color: var(--red); }
.badge.retired, .badge.neutral { color: var(--muted); }
.toolbar { display: flex; min-height: 54px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.search-field { display: flex; align-items: center; gap: 7px; width: min(440px,55vw); min-height: 34px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { height: 38px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--panel-soft); color: var(--muted); font-size: 10px; text-align: left; text-transform: uppercase; }
.data-table td { height: 55px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-table tbody tr:hover { background: var(--panel-soft); }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td small { color: var(--muted); }
.data-table .empty-row, .empty-row { padding: 30px; color: var(--muted); text-align: center; }
.table-sort-button { display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.sort-indicator { display: inline-block; flex: 0 0 12px; width: 12px; color: var(--muted); text-align: center; }
.data-table th[aria-sort="ascending"] .table-sort-button, .data-table th[aria-sort="descending"] .table-sort-button, .data-table th[aria-sort="ascending"] .sort-indicator, .data-table th[aria-sort="descending"] .sort-indicator { color: var(--primary); }
.empty-state { display: grid; justify-items: center; gap: 8px; min-height: 360px; padding: 60px 20px; text-align: center; }
.empty-state > svg { width: 38px; height: 38px; color: var(--muted); }
.empty-state h2, .empty-state p { margin: 0; }
.empty-state p { max-width: 600px; color: var(--muted); }

.metrics-actions { display: flex; align-items: center; gap: 8px; }
.metrics-updated { color: var(--muted); font-size: 11px; }
.metrics-actions button[aria-pressed="true"] { color: var(--amber); background: var(--amber-soft); }
.metrics-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.metrics-summary > div { display: grid; gap: 5px; padding: 14px 18px; border-right: 1px solid var(--line); }
.metrics-summary > div:first-child { padding-left: 0; }
.metrics-summary > div:last-child { border-right: 0; }
.metrics-summary strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.metrics-summary span, .metrics-summary small { color: var(--muted); }
.metrics-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 12px; }
.metrics-toolbar select { min-height: 34px; padding: 5px 28px 5px 9px; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 5px; font: inherit; }
.metrics-toolbar > span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.metrics-notice { margin: 10px 0; padding: 10px 12px; background: var(--amber-soft); color: var(--amber); border-left: 3px solid var(--amber); }
.metrics-table-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics-table { min-width: 1320px; font-variant-numeric: tabular-nums; }
.metrics-table .metrics-connections { width: 1%; min-width: 140px; padding-right: 6px; white-space: nowrap; }
.metrics-table .metrics-rates { padding-left: 6px; }
.metrics-table th button { display: flex; gap: 5px; align-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.metrics-table th button > span { display: inline-block; width: 10px; }
.metrics-table td { height: 73px; }
.metrics-table .metrics-node-name { min-width: 205px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.metrics-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); border-right: 1px solid var(--line); }
.metrics-table th:first-child { position: sticky; left: 0; z-index: 2; }
.metrics-node-name > a { display: block; color: var(--text); }
.metrics-table tbody tr:hover td:first-child { background: var(--panel-soft); }
.metrics-table small { font-size: 10px; }
.metrics-meter { min-width: 68px; }
.metrics-meter > span { display: block; margin-bottom: 4px; }
.metrics-meter i { display: block; height: 4px; background: var(--line); }
.metrics-meter b { display: block; height: 100%; background: var(--green); }
.metrics-meter b.warning { background: var(--amber); }
.metrics-meter b.critical { background: var(--red); }
.metrics-rates strong { color: var(--primary); font-weight: 600; }
.metrics-rates small { color: var(--green) !important; }
.metrics-offline .metrics-meter, .metrics-offline .metrics-rates { opacity: .45; }
.metrics-detail { margin-top: 22px; border-top: 1px solid var(--line); }
.metrics-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; }
.metrics-detail-head > div { min-width: 0; }
.metrics-detail-head h2 { margin: 3px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.metrics-detail-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; }
.metrics-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.metrics-chart-head h3 { margin: 0; font-size: 13px; }
.metrics-chart-head > span { color: var(--muted); font-size: 11px; }
.metrics-chart-head i { display: inline-block; width: 12px; height: 2px; margin: 0 4px 3px 8px; }
.rx-key { background: var(--primary); } .tx-key { background: var(--green); }
#metricsChart { display: block; width: 100%; height: 160px; }
.metrics-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 20px; margin: 0; }
.metrics-facts dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.metrics-facts dd { margin: 0; overflow-wrap: anywhere; }
.metrics-carriers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 18px; border-top: 1px solid var(--line); }
.metrics-carriers > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-right: 1px solid var(--line); }
.metrics-carriers > div:first-child { padding-left: 0; }
.metrics-carriers > div:last-child { border-right: 0; }
.metrics-carriers small { color: var(--muted); }
@media (max-width: 1050px) { .metrics-detail-body { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) {
  .metrics-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics-summary > div { padding: 12px 10px !important; border-bottom: 1px solid var(--line); }
  .metrics-summary > div:nth-child(2n) { border-right: 0; }
  .metrics-summary strong { font-size: 21px; }
  .metrics-toolbar .search-field { width: 100%; }
  .metrics-table .metrics-node-name { min-width: 180px; width: 180px; max-width: 180px; }
  .metrics-node-name > a { max-width: 160px; }
  .metrics-carriers { grid-template-columns: minmax(0,1fr); }
  .metrics-carriers > div { padding: 10px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 440px) {
  .metrics-table .metrics-node-name { min-width: 150px; width: 150px; max-width: 150px; }
  .metrics-node-name > a { max-width: 130px; }
}

.login-page { display: grid; place-items: center; overflow: auto; padding: 20px; background: #eceeef; }
.login-shell { width: min(430px,100%); overflow: hidden; border: 1px solid #d2d7db; border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #171b1f; color: #fff; }
.login-brand > div:last-child { display: grid; }
.login-brand span { color: #9da6ae; font-size: 10px; }
.login-form { display: grid; gap: 16px; padding: 24px; }
.login-form h1 { margin: 3px 0; }
.login-form p { margin: 0; color: #68727c; }
.login-form label { display: grid; gap: 6px; color: #68727c; }
.login-form input { min-height: 39px; padding: 7px 10px; border: 1px solid #c3c9ce; border-radius: 5px; background: #fff; color: #20252a; }
.form-error { padding: 9px 10px; border: 1px solid #edb5bd; border-radius: 5px; background: #fdecef; color: #be3445; }

.credential-dialog { width: min(510px,calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
#credentialTable { min-width: 1080px; }
#credentialTable td:first-child { min-width: 190px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
#credentialTable td:nth-child(3), #credentialTable td:nth-child(4) { min-width: 170px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
#credentialTable td:last-child, #credentialTable th:last-child { position: sticky; right: 0; min-width: 48px; background: var(--panel); }
.credential-dialog::backdrop { background: rgba(15,20,24,.5); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.dialog-body { display: grid; gap: 14px; padding: 16px; }
.dialog-body label { display: grid; gap: 7px; }
.dialog-body input { width: 100%; min-width: 0; height: 39px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel-soft); color: var(--text); }
.secret-input { display: grid; grid-template-columns: minmax(0,1fr) 36px 36px; gap: 7px; align-items: center; }
.dialog-body p { min-height: 20px; margin: 0; color: var(--muted); }
.dialog-footer { display: flex; justify-content: flex-end; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.row-actions { display: flex; align-items: center; gap: 6px; }
#view-ssh-keys .page-head .row-actions { flex-wrap: wrap; max-width: 100%; }
.dialog-body select { width: 100%; min-width: 0; height: 40px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel-soft); color: var(--text); font: inherit; }
.key-fingerprint code { overflow-wrap: anywhere; }
#sshKeyTable { min-width: 1000px; }
#sshKeyTable td:nth-child(2) { min-width: 280px; }
#sshKeyTable code { white-space: normal; overflow-wrap: anywhere; }
#sshKeyTable td:last-child, #sshKeyTable th:last-child { position: sticky; right: 0; min-width: 132px; background: var(--panel); }
.public-key-dialog { width: min(640px,calc(100vw - 24px)); }
.public-key-dialog code { white-space: normal; overflow-wrap: anywhere; }
.public-key-output { display: grid; grid-template-columns: minmax(0,1fr) 36px; gap: 8px; align-items: start; }
.editor-field textarea.public-key-value { font-family: ui-monospace,Consolas,monospace; font-size: 13px; line-height: 1.6; resize: vertical; max-height: 45vh; }
.key-public-section { margin: 24px 0; }
.key-public-section p, #publicKeyNotice { min-height: 20px; margin: 8px 0; color: var(--muted); }
.icon-button:disabled { opacity: .45; cursor: not-allowed; }
.editor-field input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; justify-self: start; }
#view-servers .toolbar { flex-wrap: wrap; gap: 12px; }
#serverTable td:last-child { white-space: nowrap; }
[hidden] { display: none !important; }
.button.danger-outline { color: var(--red); border-color: var(--red); }
.danger-outline:hover { background: var(--red-soft); }
.delete-entry { margin-right: auto; }
.danger-button { background: var(--red); border-color: var(--red); color: #fff; }
.button.danger-button:hover { background: var(--red); filter: brightness(.94); }
.danger-button:disabled { opacity: .5; cursor: not-allowed; }
.delete-main { max-width: 800px; }
.delete-identity { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.delete-identity dt { color: var(--muted); }
.delete-identity dd { margin: 0; overflow-wrap: anywhere; }
.delete-warning { color: var(--muted); line-height: 1.8; margin: 20px 0; }
.delete-blockers { border-left: 3px solid var(--red); padding-left: 16px; margin: 24px 0; overflow-wrap: anywhere; }
.delete-blockers h2, .delete-links h2 { font-size: 16px; }
.delete-blockers h3 { font-size: 14px; margin-bottom: 8px; }
.delete-blockers ul { padding-left: 20px; margin-top: 0; color: var(--muted); }
.delete-links { margin: 20px 0; }
.delete-links p { margin: 6px 0; color: var(--muted); }
.delete-confirm { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.delete-confirm input { width: 18px; height: 18px; flex: 0 0 18px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 12px; }
.provider-search { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.provider-search .search-field { width: min(440px,100%); }
.provider-search-count { margin: -4px 0 5px; color: var(--muted); font-size: 11px; }
.provider-search-empty { margin: 18px 0; padding: 24px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); text-align: center; }
.provider-search-empty[hidden] { display: none; }
.provider-search-empty p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.provider-sort-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.provider-sort-controls > span { color: var(--muted); }
.provider-sort-controls .table-sort-button { width: auto; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); }
.provider-sort-controls .table-sort-button[aria-pressed="true"], .provider-sort-controls .table-sort-button[aria-pressed="true"] .sort-indicator { color: var(--primary); }
.provider-sort-controls .table-sort-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.provider-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.provider-scene { max-width: 100%; font-size: 11px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.provider-group { border-bottom: 1px solid var(--line); }
.provider-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.provider-head h2 { flex: 1; min-width: 0; margin: 0; }
.provider-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0; border: 0; border-radius: 4px; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.provider-toggle:hover { color: var(--primary); }
.provider-toggle > svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--primary); }
.provider-toggle[aria-expanded="true"] > svg { transform: rotate(90deg); }
.provider-identity { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.provider-identity small { font-size: 12px; font-weight: 400; }
.provider-accounts { padding-bottom: 18px; }
.provider-resource-details { min-width: 0; margin: 0 0 12px 30px; font-size: 12px; }
.account-resource-details { min-width: 0; margin-top: 6px; font-size: 11px; }
.provider-resource-details > summary, .account-resource-details > summary { cursor: pointer; color: var(--primary); overflow-wrap: anywhere; }
.provider-resource-details > summary:focus-visible, .account-resource-details > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.typed-resource-list { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.typed-resource-list > li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; min-width: 0; overflow-wrap: anywhere; line-height: 1.65; }
.resource-kind { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.resource-name { min-width: 0; overflow-wrap: anywhere; }
.resource-role, .resource-parent { color: var(--muted); font-size: 10px; }
.typed-resource-list .resource-parent { flex-basis: 100%; }
.account-resource-summary { margin-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .provider-search-count { margin-top: 0; }
}
.credential-eye { border-color: transparent; background: transparent; color: var(--muted); }
.credential-eye:hover:not(:disabled) { background: var(--panel-soft); color: var(--primary); }
.credential-eye[aria-pressed="true"] { color: var(--primary); }
.provider-head small { color: var(--muted); }
.provider-head .row-actions, #view-providers .page-head .row-actions { flex-wrap: wrap; }
.provider-account-table { min-width: 860px; background: var(--panel); }
.provider-account-table td:first-child { min-width: 200px; max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.provider-account-table td:nth-child(2) { min-width: 220px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.provider-account-table td:last-child, .provider-account-table th:last-child { position: sticky; right: 0; background: var(--panel); }
@media (max-width: 600px) { .provider-head { align-items: flex-start; flex-direction: column; gap: 10px; } .provider-head h2 { width: 100%; } }
.success-message { padding: 10px 14px; margin-bottom: 16px; background: var(--green-soft); color: var(--green); border-left: 3px solid var(--green); }
.editor-page { overflow: auto; }
.editor-header { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor-header > span { color: var(--muted); }
.editor-main { width: min(1040px,100%); margin: 0 auto; padding: 28px 24px; }
.editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; }
.editor-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.editor-field.wide { grid-column: 1/-1; }
.editor-field label { color: var(--muted); }
.editor-field input, .editor-field select, .editor-field textarea { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); color: var(--text); font: inherit; }
.editor-field select[multiple] { min-height: 112px; }
.editor-field textarea { resize: vertical; }
.business-scene-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
.business-scene-links .text-button { font: inherit; }
.business-scene-notice:empty { display: none; }
.business-scene-main .page-head .row-actions { flex-shrink: 0; }
.business-scene-table { table-layout: fixed; white-space: normal; }
.business-scene-table th:first-child { width: 50%; }
.business-scene-table th:nth-child(2) { width: 16%; }
.business-scene-table td { overflow-wrap: anywhere; }
.business-scene-table .row-actions { flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) {
  .business-scene-main .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .business-scene-table th:first-child { width: 44%; }
  .business-scene-table th:nth-child(2) { width: 20%; }
  .business-scene-table th, .business-scene-table td { padding: 8px; }
  .business-scene-table .button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
}
.required-mark { margin-left: 6px; color: var(--red); }
.errorlist { list-style: none; padding: 0; margin: 0; color: var(--red); }
.asset-form > .errorlist { margin-bottom: 20px; padding: 12px; background: var(--red-soft); }
.editor-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .editor-grid { grid-template-columns: minmax(0,1fr); } .editor-header { padding: 10px; } .editor-main { padding: 20px 14px; } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 205px minmax(0,1fr); }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .metric-strip button { border-bottom: 1px solid var(--line); }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .app-shell { display: block; height: auto; }
  .sidebar { position: sticky; z-index: 20; top: 0; display: block; }
  .brand-block { min-height: 50px; }
  .nav-stack { display: flex; gap: 4px; padding: 5px 8px; overflow-x: auto; }
  .nav-label, .nav-item b { display: none; }
  .nav-item { grid-template-columns: 18px auto; width: auto; min-width: max-content; }
  .topbar { position: sticky; z-index: 19; top: 89px; padding: 7px 10px; }
  .crumbs { min-width: 0; }
  .crumbs > span, .top-actions { flex-shrink: 0; }
  .crumbs strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .top-search { width: 36px; padding: 8px; }
  .top-search input { display: none; }
  .view { padding: 13px 10px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip button:nth-child(2n) { border-right: 0; }
  .compact-list button { grid-template-columns: minmax(0,1fr) auto; }
  .compact-list button > span:nth-child(2) { display: none; }
}

/* Mobile provider account cards: let every field size itself in normal flow. */
@media (max-width: 600px) {
  #view-providers .provider-accounts > .table-wrap { overflow: visible; }
  #view-providers .account-directory-table,
  #view-providers .account-directory-table tbody,
  #view-providers .account-directory-table tr { display: block; width: 100%; min-width: 0; max-width: 100%; }
  #view-providers .account-directory-table tr { margin-bottom: 10px; }
  #view-providers .account-directory-table tr[hidden] { display: none; }
  #view-providers .account-directory-table td {
    display: block; height: auto; min-height: 0; width: 100%; min-width: 0; max-width: 100%;
    position: static; right: auto; overflow: visible; padding: 9px 0;
  }
  #view-providers .account-directory-table td[data-label]::before {
    display: block; grid-row: auto; grid-column: auto; margin-bottom: 5px;
  }
  #view-providers .account-directory-table td > * { min-width: 0; max-width: 100%; }
}

/* Provider directory shares the infrastructure table panel and toolbar. */
.provider-directory-toolbar { flex-wrap: wrap; align-items: center; gap: 10px; }
.provider-directory-toolbar .search-field { flex: 1 1 240px; width: auto; max-width: 440px; }
.provider-directory-table { min-width: 880px; }
.provider-directory-table > tbody[hidden] { display: none; }
.provider-directory-table .provider-summary-row > td:first-child { min-width: 210px; }
.provider-directory-table .provider-toggle { font-weight: 600; font-size: 13px; color: var(--text); }
.provider-directory-table .provider-toggle:hover { color: var(--primary); }
.provider-directory-table .provider-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.provider-directory-table .provider-summary-row > td:nth-child(4) { white-space: normal; min-width: 150px; }
.provider-directory-table .provider-summary-row .row-actions { flex-wrap: nowrap; }
.provider-directory-table .provider-detail-row > td { padding: 0; height: auto; white-space: normal; background: var(--panel-soft); }
.provider-directory-table .provider-detail-content { padding: 14px; }
.provider-directory-table .provider-resource-details { margin: 0 0 12px; }
.provider-directory-table .provider-accounts { padding-bottom: 0; }
.provider-directory-table .account-directory-table { background: var(--panel); }
.provider-directory-panel > .provider-search-count { margin: 0; padding: 10px 13px; font-size: 12px; background: var(--panel-soft); }
.provider-directory-table th .table-sort-button[aria-pressed="true"],
.provider-directory-table th .table-sort-button[aria-pressed="true"] .sort-indicator { color: var(--primary); }
@media (max-width: 600px) {
  .provider-directory-toolbar .search-field { flex-basis: 100%; max-width: none; }
}

#serverTable > tbody[hidden] { display: none; }
#serverTable .server-detail-row > td { padding: 0; white-space: normal; background: var(--panel-soft); }
.server-applications { padding: 14px; }
.server-applications .data-table { background: var(--panel); }
#serverTable .provider-toggle { color: var(--text); }
#serverTable .provider-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

#serverTable .provider-toggle small { display: block; margin-top: 4px; font-weight: 400; }
