:root {
  --bg: #f4f6f9; --panel: #ffffff; --text: #1b2330; --muted: #657186; --line: #e2e6ec;
  --accent: #1f6feb; --good: #1f9d63; --bad: #d1343b; --warn: #c98a07; --unknown: #8a94a6;
  --top: #0f1b2d; --top-text: #e7edf6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131c; --panel: #151d29; --text: #e3e9f2; --muted: #8e9bb0; --line: #263142;
    --accent: #4c8dff; --good: #2fbf7c; --bad: #ff5a5f; --warn: #e5a823; --unknown: #6f7a8d;
    --top: #0a1018; --top-text: #e3e9f2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { margin: 0 0 12px; }

header { display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 52px; background: var(--top); color: var(--top-text); position: sticky; top: 0; z-index: 5; }
header nav { display: flex; gap: 18px; flex: 1; }
header nav a, .brand { color: var(--top-text); font-weight: 500; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.logo { width: 20px; height: 20px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: inset 0 0 0 4px rgba(255,255,255,.25); }
.live { color: var(--unknown); font-size: 12px; }
.live.on { color: var(--good); }

main { max-width: 1400px; margin: 0 auto; padding: 20px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid > .panel { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.tile .n { font-size: 28px; font-weight: 700; }
.tile .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tile.bad .n { color: var(--bad); }
.tile.good .n { color: var(--good); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
td.wrap { white-space: normal; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); margin-right: 6px; vertical-align: -1px; }
.dot.up { background: var(--good); } .dot.down { background: var(--bad); } .dot.unknown { background: var(--unknown); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--text); }
.pill.bad { background: var(--bad); color: #fff; } .pill.good { background: var(--good); color: #fff; }
.pill.warn { background: var(--warn); color: #fff; } .pill.info { background: var(--accent); color: #fff; }
.muted { color: var(--muted); }
.bad-text { color: var(--bad); font-weight: 600; } .warn-text { color: var(--warn); font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

button, .button { font: inherit; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; display: inline-block; }
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
button.primary, .button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.danger { color: var(--bad); }
button.small, .button.small { padding: 2px 8px; font-size: 12px; }
input, select, textarea { font: inherit; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
input[type=checkbox] { width: auto; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1; min-width: 120px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
code, pre { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px; white-space: pre-wrap; word-break: break-all; margin: 0 0 10px; }
.error { color: var(--bad); min-height: 1em; margin: 4px 0; }

meter { width: 160px; height: 12px; vertical-align: middle; }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); width: min(560px, 95vw); padding: 20px; }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog input, dialog select, dialog textarea { width: 100%; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.login { max-width: 360px; margin: 12vh auto; }
.login .brand { color: var(--text); justify-content: center; font-size: 26px; margin-bottom: 18px; }
.login input { width: 100%; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }

@media (max-width: 700px) {
  header { gap: 12px; padding: 0 12px; }
  main { padding: 12px; }
  .hide-sm { display: none; }
}
.wide { width: 100%; }
[hidden] { display: none !important; }
.grid { margin-bottom: 16px; }

/* ---- network devices ---- */
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 2px; margin: 0 0 10px; }
legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
.grow { flex: 1; min-width: 240px; }
tr.selected td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.port-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--unknown); vertical-align: 0; }
.port-dot.up { background: var(--good); } .port-dot.down { background: var(--line); border: 1px solid var(--muted); }
.port-dot.disabled { background: var(--muted); opacity: .45; } .port-dot.errors { background: var(--bad); }

.faceplate { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; max-width: 1000px; }
.fp-port { height: 32px; padding: 0; font-size: 11px; font-weight: 600; border-radius: 5px; border: 2px solid var(--line);
  background: var(--bg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.fp-port.up { background: var(--good); border-color: var(--good); color: #fff; }
.fp-port.errors { background: var(--bad); border-color: var(--bad); color: #fff; }
.fp-port.disabled { background: repeating-linear-gradient(45deg, var(--line), var(--line) 3px, var(--bg) 3px, var(--bg) 6px); }
.fp-port.uplink { box-shadow: inset 0 0 0 2px var(--accent); }
.fp-port.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12px; align-items: center; }
.legend i.fp-port { width: 16px; height: 12px; display: inline-block; vertical-align: -2px; margin-right: 5px; border-width: 1px; }
.vlan-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.vlan-row:last-child { border-bottom: none; }

svg.chart { width: 100%; height: 240px; display: block; }
svg.chart .grid-line { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--muted); font-size: 11px; }
svg.chart .area-in { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: none; }
svg.chart .line-in { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
svg.chart .line-out { fill: none; stroke: var(--good); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
svg.chart .cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart-legend { font-size: 12px; margin-top: 6px; }
.chart-legend .in { color: var(--accent); } .chart-legend .out { color: var(--good); }

#map svg { width: 100%; height: 640px; display: block; background: var(--bg); border-radius: 8px; touch-action: none; cursor: grab; user-select: none; }
#map .link line { stroke: var(--good); opacity: .8; }
#map .link.down line { stroke: var(--bad); stroke-dasharray: 6 4; }
#map .link.fdb line { stroke: var(--muted); stroke-dasharray: 2 4; }
#map .port-label { font-size: 10px; fill: var(--muted); text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
#map .node { cursor: pointer; }
#map .node circle { fill: var(--panel); stroke: var(--unknown); stroke-width: 3; }
#map .node.up circle { stroke: var(--good); } #map .node.down circle { stroke: var(--bad); fill: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
#map .node.infra circle { stroke-width: 4; }
#map .node.neighbor circle { stroke-dasharray: 3 3; }
#map .node .glyph { font-size: 10px; font-weight: 700; fill: var(--text); text-anchor: middle; pointer-events: none; }
#map .node.infra .glyph { font-size: 12px; }
#map .node .name { font-size: 12px; fill: var(--text); text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.legend i.lk { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--good); vertical-align: middle; margin-right: 5px; }
.legend i.lk.down { border-top: 3px dashed var(--bad); } .legend i.lk.fdb { border-top: 3px dotted var(--muted); }
input.num, dialog input.num { width: 80px; }
.alert-row { margin-bottom: 10px; }
.alert-row label.check { margin: 0; }

/* ---- buildings ---- */
.site-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.site-grid > .panel { margin-bottom: 0; }
.site-card { border-top: 4px solid var(--unknown); }
.site-card.up { border-top-color: var(--good); } .site-card.down { border-top-color: var(--bad); } .site-card.warn { border-top-color: var(--warn); }
.site-card h2 { margin-bottom: 2px; }
.site-card .sub { margin: 0; }
.site-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.site-stats a { cursor: pointer; background: var(--bg); border-radius: 8px; padding: 8px 10px; color: var(--text); text-decoration: none; }
.site-stats a:hover { outline: 1px solid var(--accent); }
.site-stats b { font-size: 20px; }
.site-stats span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.site-stats a.bad-text b { color: var(--bad); }
tr.group-row td { background: var(--bg); font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.sites-table input { width: 100%; min-width: 120px; }
td.nowrap, .nowrap { white-space: nowrap; }
@media (max-width: 700px) { .site-stats { grid-template-columns: repeat(2, 1fr); } .site-grid { grid-template-columns: 1fr; } }
.dot.warn { background: var(--warn); }
.tabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; }
html, body { overflow-x: hidden; }
@media (max-width: 700px) {
  header nav { gap: 12px; overflow-x: auto; }
  .head h1 { font-size: 19px; }
  .site-card .head { flex-wrap: nowrap; }
}

/* ---- documentation ---- */
.docs-layout { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.docs-nav { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; position: sticky; top: 64px; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.docs-nav a:hover { background: var(--bg); text-decoration: none; }
.docs-nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.docs-nav .ico { width: 18px; text-align: center; opacity: .8; }
.docs-nav .count { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 7px; }
.docs-main { min-width: 0; }
.docs-search { margin-bottom: 12px; }
.section-title { font-size: 19px; margin: 4px 0 12px; }
.sub-h { font-size: 14px; margin: 0 0 10px; }
.doc-table tr.clickable { cursor: pointer; }
.detail-row > td { background: var(--bg); padding: 0; white-space: normal; }
.doc-detail { padding: 14px 16px; }
.doc-detail.grid2, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.doc-detail dl.kv { margin: 8px 0 12px; }
.pre { white-space: pre-wrap; }
.auto-box { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.auto-box .head { align-items: center; }
.secret { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
code.revealed { background: color-mix(in srgb, var(--warn) 18%, transparent); padding: 2px 6px; border-radius: 4px; font-size: 13px; user-select: all; }
.small-link { font-size: 12px; }
.contact-card { padding: 8px 0; border-bottom: 1px solid var(--line); }
.contact-card:last-child { border-bottom: none; }
.kv-block { margin-bottom: 12px; }
.tips ul { margin: 0; padding-left: 20px; }
.tips li { margin: 4px 0; }
.wide-dialog { width: min(820px, 96vw); }
.doc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.doc-form-grid .span2 { grid-column: span 2; }
.doc-form-grid small { font-size: 11px; }
label.check.inline { display: inline-flex; margin: 0; }
.twofa { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.twofa img { background: #fff; padding: 8px; border-radius: 8px; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: flex; overflow-x: auto; }
  .docs-nav a { flex: 0 0 auto; }
  .doc-form-grid, .doc-detail.grid2, .grid2 { grid-template-columns: 1fr; }
  .doc-form-grid .span2 { grid-column: auto; }
}
.kv-block dd, .doc-detail dd { white-space: pre-line; }

/* ---- AI assistant ---- */
#ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 20; border-radius: 999px; padding: 10px 18px; font-weight: 600;
  background: linear-gradient(135deg, #6d4aff, var(--accent)); color: #fff; border: none; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#ai-fab span { margin-right: 4px; }
#ai-panel { position: fixed; top: 52px; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 30; background: var(--panel);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,.18); }
#ai-panel > header { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
#ai-panel .ai-grow { flex: 1; }
#ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0 6px; padding-left: 20px; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg.error { color: var(--bad); }
.ai-msg a { text-decoration: underline; }
.ai-msg.user a { color: #fff; }
.ai-welcome li { cursor: pointer; color: var(--accent); }
.ai-thumb { max-width: 100%; max-height: 160px; border-radius: 8px; display: block; margin-bottom: 6px; }
.ai-file { margin-bottom: 4px; }
.ai-dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 3px; animation: aidot 1.2s infinite; }
.ai-dots i:nth-child(2) { animation-delay: .2s; } .ai-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes aidot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
#ai-form { border-top: 1px solid var(--line); padding: 10px 12px; }
#ai-input { width: 100%; resize: vertical; min-height: 44px; max-height: 200px; }
.ai-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ai-row label.button { margin: 0; display: inline-flex; color: var(--text); font-size: 13px; }
.ai-hint { flex: 1; font-size: 11px; }
#ai-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ai-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; max-width: 100%; }
.ai-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.ai-chip button { border: none; padding: 0 2px; background: none; }
#ai-drop { position: absolute; inset: 52px 0 0 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 18%, var(--panel));
  border: 3px dashed var(--accent); font-weight: 600; z-index: 2; pointer-events: none; }
#ai-list { max-height: 45%; overflow-y: auto; border-bottom: 1px solid var(--line); }
.ai-conv { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.ai-conv span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-conv:hover { background: var(--bg); }
.ai-actions { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ai-action { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.ai-action.applied { border-left-color: var(--good); } .ai-action.rejected { border-left-color: var(--unknown); opacity: .75; } .ai-action.failed { border-left-color: var(--bad); }
.ai-action dl.kv { margin: 6px 0; font-size: 12.5px; gap: 3px 10px; }
.ai-action-head { font-size: 13px; }
body.ai-open main { margin-right: min(440px, 100vw); }
@media (max-width: 900px) { body.ai-open main { margin-right: 0; } #ai-panel { width: 100vw; } }
@media (max-width: 700px) { #ai-fab { right: 12px; bottom: 12px; } }

/* ---- client portal ---- */
.preview-banner { background: color-mix(in srgb, var(--warn) 22%, var(--panel)); border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; }
.support-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.switch { font-size: 14px; }
.ps-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ps-docs label.check { margin-bottom: 4px; font-size: 13px; }
.pu-add, .u-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.u-add label { min-width: 140px; }
.temp-pw { margin-top: 10px; padding: 10px; border: 1px dashed var(--warn); border-radius: 8px; }
.small { font-size: 12px; }
@media (max-width: 860px) { .ps-docs { grid-template-columns: 1fr; } }
#ai-panel > header { position: static; height: auto; background: var(--panel); color: var(--text); padding: 10px 12px; gap: 6px; }
#ai-panel > header b { white-space: nowrap; }
.renewal { padding: 8px 0; border-bottom: 1px solid var(--line); }
.renewal:last-child { border-bottom: none; }

/* ---- setup, shell, updates, discovery ---- */
.setting { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; max-width: 640px; }
.setting input:not([type=checkbox]), .setting select, .setting textarea { width: 100%; }
.setting small { font-size: 12px; }
.good-text { color: var(--good); font-weight: 600; }
.shell-dialog { width: min(1100px, 98vw); height: min(720px, 92vh); padding: 0; background: #0b0f14; color: #d7e0ea; border-color: #263142; display: flex; flex-direction: column; }
.shell-dialog:not([open]) { display: none; }
.shell-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #263142; color: #e3e9f2; }
#shell-out { flex: 1; margin: 0; padding: 10px 12px; overflow: auto; background: #0b0f14; color: #d7e0ea; border: none; border-radius: 0;
  font: 13px/1.4 ui-monospace, Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; word-break: break-word; }
#shell-in { margin: 0; border: none; border-top: 1px solid #263142; border-radius: 0; background: #101722; color: #fff; padding: 10px 12px;
  font: 13px ui-monospace, Consolas, monospace; }
#shell-in:focus { outline: none; }
.update-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0 10px; }
.update-stats b { font-size: 17px; }
.small-table td, .small-table th { padding: 5px 8px; font-size: 13px; }
.install-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 8px; }
.install-options h3 { margin-bottom: 6px; }
.install-options pre, #install-cmd { white-space: pre-wrap; word-break: break-all; }
@media (max-width: 800px) { .install-options { grid-template-columns: 1fr; } }
.rel-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; align-items: end; }
.rel-form label { display: flex; flex-direction: column; gap: 4px; }
.rel-form .toolbar { grid-column: 1 / -1; }
details summary { cursor: pointer; color: var(--accent); margin: 8px 0; }
.disc-sites { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.disc-site { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input.disc-name { width: 100%; min-width: 140px; padding: 3px 6px; font-size: 13px; }
@media (max-width: 700px) { .shell-dialog { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; border-radius: 0; } }
button:disabled, .button[disabled] { opacity: .45; cursor: not-allowed; }
.table-scroll { max-height: 520px; overflow: auto; }
