:root {
  color-scheme: dark;
  --bg: #0b0e0e;
  --rail: #101414;
  --surface: #121817;
  --surface-raised: #19201e;
  --surface-soft: #0e1312;
  --line: #29322f;
  --line-strong: #3b4843;
  --text: #edf1ee;
  --muted: #a5b0aa;
  --subtle: #78847e;
  --accent: #ff8b2b;
  --accent-strong: #ffa24f;
  --accent-soft: #2c1e12;
  --cyan: #83d5c2;
  --cyan-soft: #10241f;
  --green: #81d6a1;
  --green-soft: #14251c;
  --yellow: #e9bd6a;
  --yellow-soft: #2a2417;
  --red: #ff8581;
  --red-soft: #2a1717;
  --rail-width: 84px;
  --control-height: 38px;
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: "Avenir Next", "Segoe UI Variable", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.5; }
button, input, select, textarea { font: inherit; font-variant-numeric: tabular-nums; }
button { color: inherit; letter-spacing: 0; }
.hidden { display: none !important; }
.muted, .hint { color: var(--muted); }
.hint { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.error, .bad-text, .bad-value { color: var(--red); }
.good-value { color: var(--green); }
.warn-value { color: var(--yellow); }
.eyebrow { color: var(--subtle); font-size: 10px; font-weight: 750; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
code, pre, .clock, time, .technical, .data-value { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 18% 5%, #20231e 0, transparent 37%), var(--bg); }
.login-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 26px 80px rgba(0,0,0,.36); }
.login-card h1 { margin: 8px 0; font-size: 25px; line-height: 1.18; letter-spacing: -.035em; }
.login-card p { margin: 0 0 21px; color: var(--muted); }
.login-card label { margin-bottom: 12px; }
.login-card .primary { width: 100%; margin-top: 6px; }

.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--rail-width) minmax(0,1fr); }
.sidebar { position: sticky; top: 0; z-index: 30; height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 17px 10px 12px; background: var(--rail); border-right: 1px solid #202825; }
.brand { width: 52px; min-height: 54px; display: grid; place-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #75411f; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 17px; font-weight: 850; box-shadow: inset 0 0 0 1px rgba(255,139,43,.06); }
.brand-copy { display: none; }
.sidebar nav { width: 100%; display: grid; justify-items: center; gap: 8px; margin-top: 18px; }
.nav { width: 56px; min-height: 54px; display: grid; place-items: center; gap: 3px; padding: 6px 3px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--subtle); cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .12s ease; }
.nav > span { display: none; }
.nav-icon { width: 19px; height: 19px; }
.nav:hover { border-color: #303a35; background: #1a201d; color: var(--text); }
.nav:active { transform: scale(.96); }
.nav.active { border-color: #3e3021; background: linear-gradient(145deg, #2d2117, #1e1b17); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,139,43,.035); }
.account { width: 100%; display: grid; justify-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.account > div { display: none; }
.account .icon-button { width: 42px; min-width: 42px; }

.main { width: 100%; min-width: 0; max-width: 1840px; margin: 0 auto; padding: 0 clamp(22px, 3vw, 48px) 48px; }
.topbar { min-height: 82px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid #242c28; background: rgba(11,14,14,.94); backdrop-filter: blur(16px); }
.topbar-title { min-width: 0; }
.topbar-title .eyebrow { color: var(--accent); }
.topbar h2 { margin: 3px 0 0; font-size: 21px; line-height: 1.2; font-weight: 640; letter-spacing: -.035em; }
.topbar-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.project-switcher { display: flex; align-items: flex-end; gap: 7px; }
.project-picker { width: 190px; margin: 0; }
.project-picker .eyebrow { display: block; margin-bottom: 3px; }
.project-picker select { width: 100%; min-height: 36px; }
.profile-actions { position: relative; }
.profile-actions > summary { display: none; }
.profile-actions-menu { display: flex; align-items: center; gap: 5px; }
.profile-actions-menu .icon-button { width: 34px; min-width: 34px; min-height: 34px; }
.profile-actions-menu .icon-button span { display: none; }
.clock { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.view { width: 100%; max-width: 1550px; margin: 0 auto; padding-top: 27px; }

.overview-head, .section-intro, .actionbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.overview-head h3, .section-intro h3, .actionbar h3 { margin: 5px 0 2px; font-size: clamp(23px, 2vw, 31px); line-height: 1.15; font-weight: 610; letter-spacing: -.045em; }
.overview-head p, .section-intro p, .actionbar p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.overview-head > .button { flex: 0 0 auto; }
.panel h3 { margin: 3px 0; font-size: 15px; line-height: 1.3; font-weight: 620; letter-spacing: -.018em; }
.panel { min-width: 0; margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.panel-head, .panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head { margin-bottom: 12px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.panel-actions { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.panel-actions > span:first-child { min-width: 0; flex: 1; }

.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 0 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { min-width: 0; min-height: 76px; display: flex; flex-direction: column; justify-content: center; padding: 10px 19px; border-right: 1px solid var(--line); }
.metric:first-child { padding-left: 1px; }
.metric:last-child { border-right: 0; }
.metric > span { color: var(--subtle); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.metric strong { display: block; margin: 5px 0 1px; overflow: hidden; color: var(--text); font-size: 23px; line-height: 1.08; font-weight: 620; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.metric strong small { display: inline; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.metric .text-value { font-size: 16px; letter-spacing: -.01em; }
.metric > small { color: var(--muted); font-size: 10px; }

.workflow-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); overflow: hidden; }
.workflow-item { min-width: 0; min-height: 64px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 9px; padding: 9px 12px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: background .15s ease; }
.workflow-item:last-child { border-right: 0; }
.workflow-item:hover { background: var(--surface-raised); }
.workflow-item:active { background: #202722; }
.workflow-item > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.workflow-item strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workflow-item small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-item b { display: none; }
.check { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 11px; }
.check.done { border-color: #3b6d53; background: var(--green-soft); color: var(--green); }
.workflow-item.ready .check { border-color: #3b6d53; }

.inline-alert { display: flex; align-items: center; gap: 11px; margin: 0 0 15px; padding: 11px 13px; border: 1px solid #65522d; border-radius: var(--radius-sm); background: var(--yellow-soft); }
.inline-alert.warning { border-color: #65522d; }
.inline-alert strong { flex: 0 0 auto; color: var(--yellow); font-size: 11px; }
.inline-alert span { min-width: 0; flex: 1; color: #d2c29b; font-size: 10px; }
.inline-alert .button { flex: 0 0 auto; }

.overview-command-layout { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(250px,.75fr); align-items: stretch; gap: 13px; margin-bottom: 16px; }
.topology-board { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg,#151c19,#111715 74%); }
.topology-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.topology-board-head h3 { margin: 3px 0 0; font-size: 15px; font-weight: 620; letter-spacing: -.02em; }
.topology-board-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.topology-flow { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 74px minmax(0,1.1fr); align-items: stretch; gap: 9px; }
.topology-flow.direct-public { grid-template-columns: minmax(0,1fr); }
.topology-lane { min-width: 0; padding: 10px; border: 1px solid #303a35; border-radius: var(--radius-md); background: rgba(10,14,12,.46); }
.topology-lane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.topology-lane-head strong { font-size: 10px; font-weight: 680; }
.topology-lane-head small { color: var(--subtle); font-size: 9px; }
.topology-node-list { display: grid; gap: 1px; }
.topology-node { min-width: 0; min-height: 42px; display: grid; grid-template-columns: 7px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 6px 5px; border-top: 1px solid #242c28; }
.topology-node:first-child { border-top: 0; }
.topology-node-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.topology-node-dot.online { background: var(--green); box-shadow: 0 0 10px rgba(129,214,161,.24); }
.topology-node-dot.offline { background: var(--red); }
.topology-node-dot.unknown { background: var(--yellow); }
.topology-node-copy { min-width: 0; display: grid; gap: 1px; }
.topology-node-copy strong, .topology-node-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topology-node-copy strong { font-size: 10px; font-weight: 590; }
.topology-node-copy small { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.topology-node > .status { font-size: 8px; }
.topology-connector { min-width: 0; display: grid; align-content: center; justify-items: center; gap: 7px; color: var(--cyan); }
.topology-connector-line { width: 100%; height: 1px; position: relative; background: linear-gradient(90deg,#39443e,var(--cyan),#39443e); }
.topology-connector-line::after { content: ""; position: absolute; top: -3px; right: 0; width: 6px; height: 6px; border-top: 1px solid var(--cyan); border-right: 1px solid var(--cyan); transform: rotate(45deg); }
.topology-connector strong { color: var(--text); font-size: 9px; font-weight: 650; text-align: center; }
.topology-connector small { color: var(--muted); font-size: 8px; text-align: center; }
.topology-empty { min-height: 88px; display: grid; align-content: center; gap: 3px; color: var(--muted); font-size: 10px; }
.topology-empty strong { color: var(--text); }
.topology-endpoint { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 9px; border: 1px solid #3d3427; border-radius: var(--radius-sm); background: #1d1913; color: var(--muted); font-size: 9px; }
.topology-endpoint strong { color: var(--text); font-family: var(--mono); font-weight: 550; overflow-wrap: anywhere; }
.next-action { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 18px; border: 1px solid #57402a; border-radius: var(--radius-lg); background: linear-gradient(155deg,#241d16,#171714 75%); }
.next-action > .eyebrow { color: var(--accent); }
.next-action h3 { margin: 11px 0 6px; font-size: 18px; line-height: 1.18; font-weight: 620; letter-spacing: -.03em; }
.next-action p { margin: 0 0 15px; color: #c0b8ad; font-size: 11px; }
.next-action .button { width: 100%; margin-top: auto; }
.next-action .status { margin-top: 11px; }
.overview-support { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: 13px; }
.overview-support .panel { margin: 0; }
.event-row { min-height: 42px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-row > div { min-width: 0; display: grid; gap: 2px; }
.event-row strong, .event-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-row strong { font-size: 10px; font-weight: 620; }
.event-row small, .event-row time { color: var(--muted); font-size: 9px; }

.button, .primary, .icon-button { min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #1b211e; color: var(--text); font-size: 11px; font-weight: 620; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .12s ease, border-color .15s ease, background .15s ease, color .15s ease, opacity .15s ease; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { border-color: #627067; background: #252d28; }
.button:active:not(:disabled), .primary:active:not(:disabled), .icon-button:active:not(:disabled) { transform: scale(.98); }
.primary, .primary-small, .button.primary-small, .button.save-desired { border-color: var(--accent); background: var(--accent); color: #211307; }
.primary { min-height: 42px; padding-inline: 16px; }
.primary:hover:not(:disabled), .primary-small:hover:not(:disabled), .button.primary-small:hover:not(:disabled), .button.save-desired:hover:not(:disabled) { border-color: var(--accent-strong); background: var(--accent-strong); }
.button.probe-action { border-color: #35564d; background: var(--cyan-soft); color: var(--cyan); }
.button.warning { border-color: #705b31; background: var(--yellow-soft); color: var(--yellow); }
.button.danger, .icon-button.danger { border-color: #623637; color: var(--red); }
.button.danger:hover:not(:disabled), .icon-button.danger:hover:not(:disabled) { background: var(--red-soft); }
.icon-button { width: var(--control-height); min-width: var(--control-height); padding: 0; font-size: 14px; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(255,139,43,.14); }

label { min-width: 0; display: grid; gap: 6px; color: #cbd3ce; font-size: 10px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: var(--control-height); border: 1px solid #35403a; border-radius: var(--radius-sm); background: #0b100e; color: var(--text); }
input, select { padding: 0 10px; }
textarea { min-height: 82px; padding: 9px 10px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #53625a; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #829088; }
.stack { display: grid; gap: 10px; }
.compact { display: flex; align-items: flex-end; gap: 8px; }
.compact label { margin: 0; }
.form-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.span-2 { grid-column: 1/-1; }
.file-label input { padding: 6px; }

.status { min-height: 22px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 8px; border: 1px solid #3b4540; border-radius: 999px; background: #1a201d; color: #c2cbc5; font-size: 9px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; opacity: .8; }
.status.ok { border-color: #355d46; background: var(--green-soft); color: var(--green); }
.status.bad { border-color: #694041; background: var(--red-soft); color: var(--red); }
.status.warning, .status.pending { border-color: #695732; background: var(--yellow-soft); color: var(--yellow); }
.inline-status { display: inline-block; font-size: 10px; }
.inline-status.ok { color: var(--green); }
.inline-status.bad { color: var(--red); }

.infra-workbench { display: grid; grid-template-columns: 212px minmax(0,1fr); gap: 18px; align-items: start; }
.infra-workbench[data-active-stage="inventory"] #infra-ingress .ingress-stage { display: none !important; }
.infra-workbench[data-active-stage="ingress"] #infra-ingress .inventory-stage { display: none !important; }
.infra-stepper { position: sticky; top: 102px; display: grid; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.infra-stepper::before { content: "ЭТАПЫ"; padding: 7px 9px 5px; color: var(--subtle); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.infra-step { min-width: 0; min-height: 54px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 6px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.infra-step:hover { background: #1a211d; color: var(--text); }
.infra-step.active { border-color: #54402b; background: #241d16; color: var(--text); }
.infra-step-number { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #465149; border-radius: 50%; color: var(--muted); font-size: 9px; font-weight: 750; }
.infra-step.ready .infra-step-number { border-color: #3c6a4e; background: var(--green-soft); color: var(--green); }
.infra-step.pending .infra-step-number { border-color: #695732; color: var(--yellow); }
.infra-step.active .infra-step-number { border-color: #aa6930; background: var(--accent-soft); color: var(--accent); }
.infra-step-copy { min-width: 0; display: grid; gap: 2px; }
.infra-step-copy strong, .infra-step-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.infra-step-copy strong { font-size: 10px; font-weight: 680; }
.infra-step-copy small { color: var(--subtle); font-size: 9px; }
.infra-step-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.infra-step.ready .infra-step-mark { background: var(--green); }
.infra-step.pending .infra-step-mark { background: var(--yellow); }
.infra-stage-detail { min-width: 0; }
.infra-stage-detail > .hidden { display: none !important; }
.section-intro { align-items: center; margin-bottom: 22px; }
.section-intro h3 { font-size: 25px; }
.segmented { display: flex; gap: 2px; margin-bottom: 14px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.segmented button { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--surface-raised); color: var(--text); }
.segmented button span { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; background: #252c28; color: var(--muted); font-size: 9px; }
.tab-warning { color: var(--yellow) !important; }
.workflow-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 9px; margin-bottom: 14px; }
.step-panel { margin: 0 0 9px; }
.step-panel .panel-head > div { min-width: 0; display: flex; align-items: center; gap: 8px; }
.step-panel h3 { overflow-wrap: anywhere; font-size: 13px; }
.automation-step .panel-head { flex-direction: column; align-items: flex-start; }
.automation-step .panel-head > div, .automation-step .head-actions { width: 100%; }
.step-summary { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr) 12px; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.step-summary::-webkit-details-marker { display: none; }
.step-summary > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.step-summary > span:nth-child(2) strong { font-size: 10px; }
.step-summary > span:nth-child(2) small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.step-summary::after { content: "›"; color: var(--subtle); font-size: 16px; }
.automation-step[open] .step-summary { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.automation-step[open] .automation-body { display: grid; gap: 9px; margin-top: 10px; }
.automation-body > .setup-checklist { margin: 0; border-top: 1px solid var(--line); border-left: 0; background: transparent; }
.automation-body > .setup-checklist > summary { padding: 7px 0; color: var(--text); cursor: pointer; }
.automation-body > .setup-checklist > p { margin: 4px 0; }
.automation-body .panel-actions { align-items: flex-start; }
.automation-body .panel-actions > span:empty { display: none; }
.automation-body #show-restart-script { white-space: normal; }
.step-number, .install-sequence-number { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #3d5148; border-radius: 50%; background: #18231f; color: var(--cyan); font-size: 9px; font-weight: 750; }
.step-panel textarea { min-height: 92px; }
.step-panel pre, #restart-command-text { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #090d0c; color: #c6d0ca; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.setup-checklist { display: grid; gap: 5px; margin: 10px 0; padding: 9px 11px; border-left: 2px solid var(--cyan); background: #101715; color: var(--muted); font-size: 10px; }
.setup-checklist p { margin: 0; }
.setup-checklist strong { color: var(--text); }
.automation-fields { display: grid; gap: 8px; margin-top: 10px; }
.automation-fields .hint { margin: 0 0 2px; }
.install-sequence { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; margin-bottom: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.install-sequence-item { min-width: 0; min-height: 60px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 9px; border-right: 1px solid var(--line); background: transparent; }
.install-sequence-item:last-child { border-right: 0; }
.install-sequence-copy { min-width: 0; display: grid; gap: 2px; }
.install-sequence-copy strong, .install-sequence-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-sequence-copy strong { font-size: 9px; }
.install-sequence-copy small { color: var(--muted); font-size: 8px; }
.install-sequence-item.ready .install-sequence-number { border-color: #3c6a4e; background: var(--green-soft); color: var(--green); }
.install-sequence-item.pending .install-sequence-number { border-color: #695732; background: var(--yellow-soft); color: var(--yellow); }
.settings-role-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 10px; }
.settings-role-grid > .panel { min-width: 0; margin: 0; }
.settings-role-grid > .panel:first-child { grid-column: 1/-1; }
.settings-role-grid.direct-public > .panel:first-child { grid-column: auto; }
.settings-role-grid.direct-public > .panel:nth-child(2) { grid-column: 1/-1; }
.settings-role-grid > .panel:first-child form.stack { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.settings-role-grid > .panel:first-child .form-scope { grid-column: 1/-1; }
.settings-role-grid form.stack { display: flex; flex-direction: column; }
.settings-role-grid .panel-actions { margin-top: auto; }
.form-scope { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.operational-row, .performance-controls { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.operational-row { grid-template-columns: 1fr auto; align-items: center; color: var(--muted); font-size: 10px; }
.operational-row code { color: var(--text); overflow-wrap: anywhere; }
.performance-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
.performance-controls .custom-limit:has(input:disabled) { display: none; }
.performance-preview { margin-top: 5px; color: var(--muted); font-size: 9px; }
.performance-preview summary { cursor: pointer; overflow-wrap: anywhere; }
.performance-preview > div { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-top: 6px; }
.performance-preview b { flex-basis: 100%; }
.fleet-install-panel { margin-top: 12px; border-color: #5b4129; background: linear-gradient(145deg,#1c1914,#151815); }
.fleet-install-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fleet-install-head h3 { margin: 4px 0; font-size: 17px; }
.fleet-install-head p { max-width: 780px; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.fleet-install-head .primary { min-width: 210px; }
.fleet-install-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fleet-install-summary span { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 9px; border-right: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.fleet-install-summary span:last-child { border-right: 0; }
.fleet-install-summary strong { color: var(--text); font-size: 12px; }
.fleet-apply-preview { display: grid; gap: 4px; margin-top: 9px; padding: 9px 10px; border: 1px solid #39564b; border-radius: var(--radius-sm); background: #111c17; }
.fleet-apply-preview > strong { color: var(--cyan); font-size: 10px; }
.fleet-apply-preview > span, .fleet-apply-preview li { color: var(--muted); font-size: 9px; }
.fleet-apply-preview ol { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 4px 12px; margin: 3px 0 0; padding-left: 18px; }
.fleet-apply-preview li { min-width: 0; }
.fleet-apply-preview li b { margin-right: 5px; color: var(--text); }
.fleet-apply-preview li code { display: inline-block; max-width: calc(100% - 90px); overflow: hidden; vertical-align: bottom; text-overflow: ellipsis; white-space: nowrap; }
.fleet-apply-preview.current { border-color: #3b6348; background: var(--green-soft); }
.fleet-progress { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 11px; }
.fleet-step { min-width: 0; min-height: 49px; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 7px; padding: 6px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.fleet-step > span { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 8px; }
.fleet-step > div { min-width: 0; display: grid; gap: 2px; }
.fleet-step strong, .fleet-step small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-step strong { font-size: 9px; }
.fleet-step small { color: var(--muted); font-size: 8px; }
.fleet-step.running { border-color: #436357; background: var(--cyan-soft); }
.fleet-step.running > span { color: var(--cyan); }
.fleet-step.done { border-color: #3d6549; background: var(--green-soft); }
.fleet-step.done > span { color: var(--green); }
.fleet-step.error { border-color: #694041; background: var(--red-soft); }
.fleet-step.error > span { color: var(--red); }
.fleet-install-result { min-height: 38px; display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.fleet-install-result strong { flex: 0 0 auto; font-size: 10px; }
.fleet-install-result span { color: var(--muted); font-size: 9px; }
.fleet-install-result.success { border-color: #3d6549; background: var(--green-soft); }
.fleet-install-result.success strong { color: var(--green); }
.fleet-install-result.warning { border-color: #695732; background: var(--yellow-soft); }
.fleet-install-result.warning strong { color: var(--yellow); }
.fleet-install-result.error { border-color: #694041; background: var(--red-soft); }
.fleet-install-result.error strong { color: var(--red); }
.manual-install { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.manual-install > summary { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; list-style: none; }
.manual-install > summary::-webkit-details-marker { display: none; }
.manual-install > summary > span:first-child { display: grid; gap: 2px; }
.manual-install > summary strong { font-size: 10px; }
.manual-install > summary small { color: var(--muted); font-size: 9px; }
.manual-install[open] > summary { border-bottom: 1px solid var(--line); }
.manual-install-body { padding: 12px; }
.manual-toolbar { display: flex; justify-content: flex-end; gap: 7px; }
.deployment-role-section { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.deployment-role-section > .panel-head { align-items: flex-start; }
.deployment-node-list, .node-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.deployment-node-row { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 26px minmax(190px,1fr) auto minmax(220px,auto); align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.deployment-node-row:last-child { border-bottom: 0; }
.deployment-node-row:hover, .node-row:hover { background: #171e1a; }
.deployment-node-main { min-width: 0; display: grid; gap: 2px; }
.deployment-node-main strong, .deployment-node-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deployment-node-main strong { font-size: 10px; }
.deployment-node-main small { color: var(--muted); font-size: 9px; }
.deployment-node-action { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.deployment-node-action .inline-status { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-tabs { margin-top: 8px; }
.config-tabs details { border-top: 1px solid var(--line); }
.config-tabs summary { padding: 9px 3px; cursor: pointer; }
.config-tabs pre { max-height: 300px; overflow: auto; margin: 0 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #090d0c; font-size: 9px; }
.blocker { margin-bottom: 6px; padding: 8px 10px; border: 1px solid #695732; border-radius: var(--radius-sm); background: var(--yellow-soft); color: var(--yellow); font-size: 10px; }
.node-row { min-width: 0; min-height: 50px; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.node-row:last-child { border-bottom: 0; }
.node-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #3e574d; border-radius: 8px; background: var(--cyan-soft); color: var(--cyan); font-family: var(--mono); font-size: 8px; font-weight: 800; }
.node-icon.origin { border-color: #665034; background: var(--accent-soft); color: var(--accent); }
.node-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.node-main strong, .node-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-main strong { font-size: 10px; }
.node-main small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.stale-node { opacity: .72; border-style: dashed; }
.advanced-settings { margin: 8px 0 15px; border-bottom: 1px solid var(--line); }
.advanced-settings > summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 1px; cursor: pointer; list-style-position: inside; }
.advanced-settings > summary > span:first-child { display: grid; gap: 2px; }
.advanced-settings > summary strong { font-size: 11px; }
.advanced-settings > summary small { color: var(--muted); font-size: 9px; }
.advanced-settings-body { display: grid; gap: 10px; padding: 4px 0 14px; }
.advanced-settings-body > .hint { max-width: 760px; }
.advanced-settings-body #restart-telemt { justify-self: start; }
.ad-tag-panel { border-left: 2px solid var(--cyan); }
.secret-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 9px 10px; border: 1px solid #3d6549; border-radius: var(--radius-sm); background: var(--green-soft); }
.secret-result > div { display: grid; gap: 2px; }
.secret-result small { color: var(--muted); }
#users-list.panel { padding: 0; border: 0; background: transparent; }
.origin-state-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 1px; margin: 0 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line); }
.origin-state { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 4px 8px; padding: 8px 9px; background: var(--surface-soft); }
.origin-state strong, .origin-state small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.origin-state strong { font-size: 9px; }
.origin-state small { grid-column: 2; color: var(--muted); font-size: 8px; }
.table { min-width: 0; }
.table-head, .table-row { display: grid; grid-template-columns: minmax(140px,1.1fr) 100px 100px minmax(180px,1.5fr) minmax(220px,auto); align-items: center; gap: 10px; }
.table-head { min-height: 32px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.table-row { min-height: 49px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.table-row:last-child { border-bottom: 0; }
.table-row:hover { background: #171e1a; }
.table-row > strong { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-link { min-width: 0; }
.user-link code { display: block; overflow: hidden; color: #b8cec4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.user-actions .button { min-height: 30px; padding-inline: 8px; font-size: 9px; }
.inline-alert.warning { flex-wrap: wrap; }
.inline-action { display: block; margin-top: 4px; padding: 0; border: 0; background: transparent; color: var(--cyan); font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.inline-action:hover { color: var(--text); text-decoration: underline; }

.monitor-table { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.monitor-table-head, .monitor-row { display: grid; grid-template-columns: minmax(180px,1.15fr) minmax(160px,1fr) minmax(145px,.9fr) minmax(135px,.85fr) minmax(150px,1fr); align-items: center; gap: 11px; }
.monitor-table-head { min-height: 33px; padding: 0 11px; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 8px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.monitor-row { min-height: 76px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.monitor-row:last-child { border-bottom: 0; }
.monitor-row:hover { background: #171e1a; }
.monitor-identity { min-width: 0; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 8px; }
.monitor-identity > div:last-child { min-width: 0; display: grid; gap: 2px; }
.monitor-identity strong, .monitor-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-identity strong { font-size: 10px; }
.monitor-identity small, .monitor-meta, .monitor-source { color: var(--muted); font-size: 8px; }
.monitor-health { min-width: 0; display: grid; align-content: center; gap: 6px; }
.monitor-ssh-group, .monitor-service-group { min-width: 0; display: grid; justify-items: start; gap: 4px; }
.monitor-group-label { color: var(--subtle); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.service-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.service-chip { min-height: 19px; display: inline-flex; align-items: center; padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); color: var(--muted); font-size: 8px; white-space: nowrap; }
.service-chip.ok { border-color: #355d46; background: var(--green-soft); color: var(--green); }
.service-chip.bad { border-color: #694041; background: var(--red-soft); color: var(--red); }
.monitor-stat { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 8px; }
.monitor-stat div { min-width: 0; }
.monitor-stat span { display: block; color: var(--subtle); font-size: 8px; }
.monitor-stat strong { display: block; margin-top: 2px; overflow: hidden; font-size: 10px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.monitor-runtime { grid-template-columns: repeat(2,minmax(0,1fr)); }
.monitor-wireguard, .monitor-transport { position: relative; padding-left: 9px; border-left: 1px solid var(--line-strong); }
.monitor-wireguard .monitor-group-label, .monitor-transport .monitor-group-label { grid-column: 1/-1; }
.monitor-traffic { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px 7px; }
.monitor-traffic span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.monitor-traffic .monitor-source { grid-column: 1/-1; white-space: normal; overflow-wrap: anywhere; }
.monitor-table-head > span:nth-child(2) { grid-column: 2; }
.monitor-table-head > span:nth-child(3) { grid-column: 3; }
.monitor-table-head > span:nth-child(4) { grid-column: 4; }
.monitor-table-head > span:nth-child(5) { grid-column: 5; }
.settings-grid.single { max-width: 560px; }
.empty { min-height: 100px; display: grid; place-content: center; gap: 4px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-soft); color: var(--text); text-align: center; }
.empty strong { font-size: 11px; }
.empty small { max-width: 520px; color: var(--muted); font-size: 10px; }
.loading { min-height: 64px; display: grid; place-content: center; color: var(--muted); font-size: 10px; }
.connection-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid #694041; border-radius: var(--radius-sm); background: var(--red-soft); color: #ffd0c2; }
.connection-alert.hidden { display: none; }
.public-ip-dialog { width: min(460px,calc(100vw - 28px)); padding: 17px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.56); }
.public-ip-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.public-ip-dialog form { display: grid; gap: 12px; }
.public-ip-dialog .panel-head { margin-bottom: 0; }
.dialog-node { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 10px; overflow-wrap: anywhere; }

@media (max-width: 1180px) {
  .overview-command-layout { grid-template-columns: minmax(0,1.4fr) minmax(220px,.8fr); }
  .topology-flow { grid-template-columns: minmax(0,1fr) 55px minmax(0,1fr); }
  .monitor-table-head, .monitor-row { grid-template-columns: minmax(150px,1.1fr) minmax(145px,1fr) minmax(125px,.9fr) minmax(120px,.8fr); }
  .monitor-table-head > :nth-child(5), .monitor-row > :nth-child(5) { display: none; }
  .workflow-item { padding-inline: 8px; }
}
@media (max-width: 980px) {
  .main { padding-inline: 22px; }
  .overview-command-layout { grid-template-columns: 1fr; }
  .next-action { min-height: 170px; }
  .next-action .button { width: auto; min-width: 200px; }
  .overview-support { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .workflow-item:nth-child(3) { border-right: 0; }
  .workflow-item:nth-child(n+4) { border-top: 1px solid var(--line); }
  .infra-workbench { grid-template-columns: 180px minmax(0,1fr); gap: 12px; }
  .settings-role-grid { grid-template-columns: 1fr; }
  .settings-role-grid > .panel, .settings-role-grid.direct-public > .panel:first-child { grid-column: 1/-1; }
  .settings-role-grid > .panel:first-child form.stack { grid-template-columns: 1fr 1fr; }
  .deployment-node-row { grid-template-columns: 27px minmax(0,1fr) auto; }
  .deployment-node-action { grid-column: 2/-1; justify-content: flex-start; flex-wrap: wrap; }
  .monitor-table-head { display: none; }
  .monitor-row { grid-template-columns: minmax(150px,1fr) minmax(160px,1fr) minmax(130px,.9fr); }
  .monitor-row > :nth-child(4) { display: grid; }
  .monitor-row > :nth-child(5) { display: none; }
  .monitor-traffic { grid-column: 2/-1; grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: calc(68px + env(safe-area-inset-bottom)); padding: 5px max(9px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left)); border-top: 1px solid #303934; border-right: 0; background: rgba(15,20,18,.97); backdrop-filter: blur(18px); }
  .brand, .account { display: none; }
  .sidebar nav { width: 100%; height: 100%; grid-template-columns: repeat(6,minmax(0,1fr)); align-items: stretch; justify-items: stretch; gap: 3px; margin: 0; }
  .nav { width: auto; min-width: 0; min-height: 0; align-content: center; gap: 4px; padding: 4px 2px; border-radius: 9px; }
  .nav > span { max-width: 100%; display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .nav.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .main { padding: 0 17px calc(88px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 65px; gap: 10px; padding: 8px 0; }
  .topbar-title { min-width: 0; flex: 1 1 0; }
  .topbar h2 { width: 100%; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-title .eyebrow { display: none; }
  .topbar-actions { flex: 0 0 auto; gap: 6px; }
  .project-picker { width: min(160px,39vw); }
  .project-picker .eyebrow { display: none; }
  .project-picker select { min-height: 35px; font-size: 10px; }
  .profile-actions { display: block; flex: 0 0 36px; }
  .profile-actions > summary { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text); cursor: pointer; list-style: none; }
  .profile-actions > summary::-webkit-details-marker { display: none; }
  .profile-actions-menu { display: none; }
  .profile-actions[open] .profile-actions-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 4; display: grid; gap: 5px; min-width: 174px; padding: 7px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 16px 36px rgba(0,0,0,.4); }
  .profile-actions-menu .icon-button { width: 100%; min-height: 38px; display: flex; justify-content: flex-start; gap: 9px; padding-inline: 9px; }
  .profile-actions-menu .icon-button span { display: inline; }
  .clock { display: none; }
  #global-health { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  .view { padding-top: 19px; }
  .overview-head, .section-intro, .actionbar { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 15px; }
  .overview-head h3, .section-intro h3, .actionbar h3 { font-size: 24px; }
  .overview-head > .button, .section-intro > .button, .actionbar > .button { align-self: stretch; }
  .overview-head > .button { width: 100%; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 68px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  .metric:first-child { padding-left: 12px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:last-child { grid-column: 1/-1; border-bottom: 0; }
  .metric strong { font-size: 20px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-item, .workflow-item:nth-child(3) { min-height: 52px; grid-template-columns: 23px minmax(0,1fr) auto; border-right: 0; border-top: 1px solid var(--line); }
  .workflow-item:first-child { border-top: 0; }
  .workflow-item b { display: block; color: var(--subtle); font-size: 17px; }
  .workflow-item strong { font-size: 10px; }
  .workflow-item small { white-space: normal; }
  .inline-alert { align-items: flex-start; flex-direction: column; }
  .inline-alert strong { flex: initial; }
  .inline-alert .button { width: 100%; }
  .topology-board, .next-action { padding: 13px; border-radius: var(--radius-md); }
  .topology-flow { grid-template-columns: 1fr; gap: 7px; }
  .topology-connector { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .topology-connector-line { width: 100%; }
  .topology-connector strong { max-width: 112px; }
  .topology-connector small { display: none; }
  .topology-lane { padding: 9px; }
  .topology-node { min-height: 40px; }
  .next-action { min-height: 0; }
  .next-action h3 { margin-top: 8px; font-size: 17px; }
  .next-action .button { width: 100%; min-width: 0; }
  .overview-support { gap: 9px; }
  .panel { padding: 13px; border-radius: 11px; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .panel-actions .button { width: 100%; }
  .compact { align-items: stretch; flex-direction: column; }
  .compact .button { width: 100%; }
  .form-layout { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .infra-workbench { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .infra-stepper { position: static; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; padding: 6px; }
  .infra-stepper::before { grid-column: 1/-1; padding: 4px 5px; }
  .infra-step { min-height: 68px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 5px 3px; text-align: center; }
  .infra-step-number { width: 23px; height: 23px; }
  .infra-step-copy strong { max-width: 100%; font-size: 8px; white-space: normal; }
  .infra-step-copy small, .infra-step-mark { display: none; }
  .infra-stage-detail { min-width: 0; }
  .workflow-steps { grid-template-columns: 1fr; }
  .install-sequence { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .install-sequence-item { min-height: 52px; border-bottom: 1px solid var(--line); }
  .install-sequence-item:nth-child(2n) { border-right: 0; }
  .install-sequence-item:last-child { grid-column: 1/-1; border-bottom: 0; }
  .settings-role-grid > .panel:first-child form.stack { grid-template-columns: 1fr; }
  .settings-role-grid > .panel:first-child .form-scope { grid-column: auto; }
  .performance-controls { grid-template-columns: 1fr; }
  .fleet-install-head { align-items: stretch; flex-direction: column; }
  .fleet-install-head .primary { width: 100%; min-width: 0; }
  .fleet-install-summary { grid-template-columns: 1fr; }
  .fleet-install-summary span { border-right: 0; border-bottom: 1px solid var(--line); }
  .fleet-install-summary span:last-child { border-bottom: 0; }
  .fleet-progress { grid-template-columns: 1fr 1fr; }
  .fleet-step:last-child { grid-column: 1/-1; }
  .fleet-install-result { align-items: flex-start; flex-direction: column; }
  .manual-toolbar { align-items: stretch; flex-direction: column; }
  .manual-toolbar .button { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { min-width: 0; flex: 1; justify-content: center; padding-inline: 5px; font-size: 9px; }
  .node-row { flex-wrap: wrap; align-items: center; }
  .node-main { flex-basis: calc(100% - 38px); }
  .node-row > .status:first-of-type { margin-left: 35px; }
  .node-row > .button { flex: 1 1 auto; }
  .deployment-node-row { grid-template-columns: 26px minmax(0,1fr); gap: 7px; }
  .deployment-node-row > .status { grid-column: 2; justify-self: start; }
  .deployment-node-action { grid-column: 1/-1; justify-content: flex-start; flex-wrap: wrap; }
  .deployment-node-action .button { flex: 1 1 auto; }
  .table-head { display: none; }
  .table-row { grid-template-columns: minmax(0,1fr) auto; gap: 6px 8px; padding: 10px 8px; }
  .table-row > strong { font-size: 11px; }
  .table-row > span:nth-child(3)::before { content: "Соединения: "; color: var(--muted); font-family: inherit; font-size: 9px; }
  .user-link, .user-actions { grid-column: 1/-1; }
  .user-link code { font-size: 8px; }
  .user-actions { justify-content: flex-start; flex-wrap: wrap; }
  .user-actions .button { flex: 1 1 auto; }
  .monitor-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 10px; }
  .monitor-identity, .monitor-health { grid-column: 1/-1; }
  .monitor-health { display: grid; grid-template-columns: minmax(90px,.7fr) minmax(0,1.3fr); align-items: start; }
  .monitor-stat { padding: 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
  .monitor-traffic { grid-column: 1/-1; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .monitor-traffic .monitor-source { grid-column: 1/-1; }
  .head-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .head-actions .button { width: 100%; }
  .event-row { grid-template-columns: minmax(0,1fr) auto; }
  .event-row time { grid-column: 1/-1; }
  .origin-state-strip { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .main { padding-inline: 12px; }
  .topbar { min-height: 62px; }
  .topbar h2 { max-width: none; font-size: 13px; }
  .topbar-actions { gap: 4px; }
  .project-picker { width: min(138px,37vw); }
  .project-picker select { padding-inline: 7px; font-size: 9px; }
  .status { min-height: 20px; padding-inline: 6px; font-size: 8px; }
  #global-health { max-width: 104px; }
  .overview-head h3, .section-intro h3, .actionbar h3 { font-size: 22px; }
  .metric { padding-inline: 9px; }
  .metric:first-child { padding-left: 9px; }
  .infra-stepper { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .infra-step { min-height: 62px; }
  .infra-step-copy strong { font-size: 7px; }
  .monitor-health { grid-template-columns: 1fr; }
  .monitor-row { gap: 7px; }
  .service-chip { font-size: 7px; }
  .public-ip-dialog { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
