:root {
    color-scheme: light;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #202d42;
    background: #f3f5f9;
    --line: #e3e8ef;
    --muted: #6c7a90;
    --accent: #285fbb;
    --surface: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 360px; overflow: hidden; -webkit-font-smoothing: antialiased; }
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, svg [tabindex]:focus-visible { outline: 3px solid #719ce0; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(21px, 1.65vw, 26px); font-weight: 650; letter-spacing: -.6px; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.3px; line-height: 1.4; }
h3 { font-size: 14px; font-weight: 600; }
p, small, .muted { color: var(--muted); }
.icon { display: block; width: 18px; height: 18px; flex: 0 0 auto; }
.topbar { flex: none; min-height: 76px; display: flex; align-items: center; gap: 28px; padding: 14px clamp(20px, 3vw, 48px); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: #192c49; font-size: 20px; font-weight: 750; letter-spacing: 2px; line-height: 1.25; }
.brand small { display: block; color: #7a8799; font-size: 8px; font-weight: 650; letter-spacing: 1.5px; margin-top: 3px; }
.logo { display: grid; place-items: center; width: 40px; height: 44px; border-radius: 9px; color: #fff; background: #203b63; }
.logo .icon { width: 26px; height: 26px; }
.topbar-context { display: flex; align-items: center; gap: 20px; color: #8490a2; font-size: 12px; }
.topbar-context > span { width: 1px; height: 28px; background: var(--line); }
.topright { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.save-state { color: #69778b; font-size: 12px; max-width: 290px; line-height: 1.5; text-align: right; }
.primary, .secondary, .add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.primary { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 1px 2px #173c7714; }
.primary:hover:not(:disabled) { background: #1d4f9f; border-color: #1d4f9f; }
.primary .icon { width: 16px; height: 16px; }
.secondary { color: #3c4d65; background: #fff; border-color: #d8e0ea; }
.secondary:hover { color: #234f96; border-color: #a6bbd9; background: #f5f8fd; }
.compact { min-height: 34px; padding: 6px 10px; font-size: 11px; gap: 5px; }
.compact .icon { width: 15px; height: 15px; }
.icon-button { width: 36px; min-height: 36px; padding: 0; }
.danger { color: #b14b54; }
.danger:hover { color: #a63241; background: #fdf3f4; border-color: #e4bcc2; }
.intro, .workspace, .workspace-footer { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: clamp(20px, 3vw, 48px); }
.intro { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #8591a3; font-size: 10px; margin-bottom: 3px; }
.breadcrumb > span { color: #b3bdcb; }
.breadcrumb b { font-weight: 500; color: #61718a; }
.summary { display: flex; align-items: center; flex-shrink: 0; }
.summary > div { padding-inline: clamp(12px, 1.4vw, 24px); border-left: 1px solid #dce3ed; white-space: nowrap; }
.summary > div:first-child { padding-left: 0; border-left: 0; }
.summary > div:last-child { padding-right: 0; }
.summary span { display: block; font-size: 10px; color: #7b8799; margin-bottom: 2px; }
.summary strong { color: #283d5b; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.summary small { font-weight: 400; font-size: 11px; color: #8490a3; margin-left: 2px; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 350px) minmax(320px, 1fr); grid-template-rows: minmax(260px, 1fr); gap: 20px; overflow: auto; }
.catalog, .canvas { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid #dfe5ee; border-radius: 10px; background: var(--surface); box-shadow: 0 2px 4px #20355403; }
.catalog { padding: 21px 18px 0; }
.catalog > :not(.inventory), .canvas > :not(.stage) { flex-shrink: 0; }
.panel-heading { display: flex; align-items: center; gap: 10px; }
.section-icon { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 7px; background: #edf3fc; color: #4972aa; flex-shrink: 0; }
.eyebrow { color: #8895a8; font-size: 9px; line-height: 1.4; letter-spacing: 1.3px; font-weight: 650; margin-bottom: 3px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
label { display: block; color: #53627a; font-size: 11px; font-weight: 600; margin-top: 22px; margin-bottom: 8px; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px; color: #32435b; border: 1px solid #d9e1ec; border-radius: 6px; background: #fff; font-size: 12px; line-height: 20px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #96a0b0; }
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2375849a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #7298d1; box-shadow: 0 0 0 3px #285fbb12; }
textarea { resize: vertical; }
.measurements { margin-top: 18px; }
.measurements > div, .capacity > div { display: flex; justify-content: space-between; gap: 10px; color: #7c889a; font-size: 11px; line-height: 1.5; margin-bottom: 11px; }
.measurements b, .capacity b { color: #43546d; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-preview { display: flex; flex-direction: column; align-items: center; gap: 9px; background: #f6f8fb; border: 1px solid #e9edf3; border-radius: 7px; padding: 16px; margin-top: 20px; }
.plan { display: block; width: 100%; height: 112px; }
.plan-preview > span { color: #8a96a8; font-size: 10px; }
.capacity { margin-top: 22px; }
.capacity > div { margin-bottom: 8px; }
.capacity progress { appearance: none; display: block; width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 8px; background: #eaf0f7; accent-color: #4b79bf; }
.capacity progress::-webkit-progress-bar { background: #eaf0f7; border-radius: 8px; }
.capacity progress::-webkit-progress-value { background: #4b79bf; border-radius: 8px; }
.capacity progress::-moz-progress-bar { background: #4b79bf; border-radius: 8px; }
.capacity small { display: block; font-size: 10px; color: #8c98aa; margin-top: 9px; line-height: 1.5; }
.selection { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.selection h3 { margin-top: 7px; }
.selection p { font-size: 11px; margin: 7px 0 14px; line-height: 1.6; }
.selection-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.selection-actions .danger { margin-left: auto; min-height: 36px; padding: 7px 9px; }
.selection-actions .danger .icon { width: 14px; height: 14px; }
.search-field { position: relative; }
.search-field > .icon { position: absolute; left: 12px; top: 12px; color: #99a5b6; width: 16px; height: 16px; pointer-events: none; }
.search-field input { padding-left: 36px; background: #f8fafc; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-top: 13px; background: #f0f3f8; border: 1px solid #edf0f5; border-radius: 7px; }
.tabs button { flex: 1; min-height: 31px; padding: 6px; border: 1px solid transparent; border-radius: 5px; color: #8590a2; background: transparent; font-size: 11px; font-weight: 500; }
.tabs button:hover { color: #335b98; }
.tabs .current { color: #285fbb; background: #fff; border-color: #e1e7f0; font-weight: 650; box-shadow: 0 1px 3px #20355408; }
.catalog-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9px; color: #8f9bad; margin-top: 19px; margin-bottom: 10px; }
.catalog-caption > span:last-child { display: flex; align-items: center; gap: 4px; }
.catalog-caption .icon { width: 12px; height: 12px; }
.inventory { flex: 1; min-height: 0; overflow: auto; padding: 0 3px 8px 0; scrollbar-width: thin; scrollbar-color: #c9d3e1 transparent; }
.product { border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; margin-bottom: 11px; padding: 11px; cursor: grab; touch-action: pan-y; user-select: none; transition: border-color .15s, background .15s; }
.product:hover { border-color: #a9bfdf; background: #fcfdff; }
.product-preview { display: flex; align-items: center; justify-content: center; height: 55px; padding: 10px; border-radius: 5px; background: #f0f3f7; }
.product-preview svg { display: block; width: 100%; height: 33px; touch-action: none; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.product-meta h3 { font-size: 12px; color: #354761; line-height: 1.5; }
.product-meta small { display: block; color: #97a1b0; font-size: 10px; line-height: 1.7; margin-top: 1px; }
.add { flex-shrink: 0; width: 30px; min-height: 30px; padding: 0; border-radius: 6px; border-color: #dbe5f4; background: #f2f6fd; color: #4777ba; }
.add .icon { width: 15px; height: 15px; }
.add:hover { color: #fff; background: #285fbb; border-color: #285fbb; }
.product-tags { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.equipment-type { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; line-height: 16px; color: #7c899b; }
.equipment-type i { width: 5px; height: 5px; border-radius: 50%; background: #a3adba; }
.equipment-type.active i { background: #4b9080; }
.unit-tag { font-size: 9px; line-height: 16px; color: #7b8ba1; border-left: 1px solid #e0e6ee; padding-left: 8px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid #dfe7f2; border-radius: 5px; background: #f3f6fb; color: #617a9c; font-size: 10px; font-weight: 600; white-space: nowrap; }
.empty-search { text-align: center; padding: 40px 10px; }
.empty-search > .icon { margin: 0 auto 14px; color: #a0afc2; width: 24px; height: 24px; }
.empty-search h3 { font-size: 12px; margin-bottom: 7px; }
.empty-search p { font-size: 11px; line-height: 1.7; }
.canvas { overflow: hidden; container: rack-panel / inline-size; }
.rack-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rack-header .section-icon { width: 30px; height: 32px; }
.rack-actions { display: flex; align-items: center; gap: 8px; }
.rack-actions > button { min-height: 32px; }
.rack-actions .icon-button { width: 32px; color: #73859e; }
.rack-visibility-controls { display: flex; gap: 4px; }
.rack-visibility-controls .icon-button { min-height: 32px; }
.rack-visibility-controls .icon-button[aria-pressed="true"] { color: var(--accent); border-color: #8ba8d1; background: #edf3fc; }
.rack-visibility-controls .icon-button:disabled { cursor: default; }
.fullscreen-toggle svg { width: 14px; height: 14px; flex: none; }
.device-inspector { margin: 0; padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 0 20px; }
.device-inspector > .eyebrow, .device-inspector > h3, .device-inspector > p { grid-column: 1; }
.device-inspector .selection-actions { grid-column: 2; grid-row: 1 / 4; align-self: center; }
.device-inspector .selection-actions .danger { margin-left: 4px; }
.device-inspector > label { margin-top: 4px; }
.device-inspector > select { grid-column: 1 / -1; }
.rack-view-controls { display: flex; gap: 2px; padding: 2px; border: 1px solid #dce3ed; background: #edf1f7; border-radius: 6px; }
.rack-view-controls button { min-height: 26px; padding: 1px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #718198; font-size: 10px; }
.rack-view-controls button[aria-pressed="true"] { border-color: #dce3ed; background: #fff; color: #285fbb; font-weight: 600; }
.rack-zoom-controls { display: inline-flex; align-items: center; gap: 4px; }
.rack-zoom-controls button { width: 28px; min-height: 28px; padding: 0; font-size: 15px; }
.rack-zoom-controls button:disabled { cursor: default; }
.rack-zoom-value { min-width: 4ch; text-align: center; color: #637895; font-size: 10px; font-variant-numeric: tabular-nums; }
@container rack-panel (max-width: 750px) {
    .rack-header .section-icon, .fullscreen-toggle > span { display: none; }
    .fullscreen-toggle { width: 32px; padding: 0; }
}
@container rack-panel (max-width: 655px) {
    .rack-header { gap: 8px; padding-inline: 8px; }
    .rack-header h2 { font-size: 14px; }
    .rack-actions { gap: 4px; }
    .rack-actions > button, .rack-actions .icon-button { width: 30px; min-height: 30px; padding: 0; }
    .rack3d-trigger > span { display: none; }
    .rack-view-controls button { min-height: 24px; padding-inline: 6px; }
}
@container rack-panel (max-width: 545px) { .rack-actions > .badge { display: none; } }
@container rack-panel (max-width: 480px) { .rack-title-detail { display: none; } }
@container rack-panel (max-width: 425px) {
    .rack-header { gap: 5px; padding-inline: 6px; }
    .rack-header h2 { font-size: 13px; }
    .rack-actions { min-width: 0; gap: 3px; margin-block: -3px; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
    .rack-actions > * { flex: none; }
    .rack-actions > button, .rack-actions .icon-button { width: 26px; min-height: 28px; }
    .rack-visibility-controls { gap: 3px; }
    .rack-view-controls button { padding-inline: 4px; }
    .rack-zoom-controls { gap: 2px; }
    .rack-zoom-controls button { width: 23px; }
}
.stage { position: relative; flex: 1; min-height: 0; padding: clamp(10px, 2vh, 22px) clamp(10px, 1.5vw, 22px); display: flex; justify-content: center; background-color: #edf1f6; background-image: radial-gradient(#cdd6e3 .7px, transparent .7px); background-size: 14px 14px; overflow: hidden; }
.rack { display: block; width: min(100%, var(--rack-width)); height: 100%; overflow: visible; user-select: none; }
.rack-detail { overflow: auto; align-items: flex-start; scrollbar-width: thin; scrollbar-color: #b9c6d7 transparent; }
.rack-detail .rack { height: auto; flex-shrink: 0; }
.device { cursor: grab; touch-action: none; }
.port { cursor: pointer; }
.device.chosen > svg > rect:first-child { stroke: #99c5ff; stroke-width: 2; }
.port:hover rect, .port:focus-visible rect { stroke: #b5d5ff; stroke-width: 1.75; }
.dragging { opacity: .42; }
.rack-dragging, .rack-dragging * { cursor: grabbing !important; user-select: none; }
#drop-preview { fill: #69a6f4; fill-opacity: .3; stroke: #a3c9fb; stroke-width: 2; }
#drop-preview.blocked { fill: #ff667a; stroke: #ff91a0; }
.workspace-footer { flex: none; display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; font-size: 10px; color: #99a4b4; }
.workspace-footer span span { margin: 0 7px; color: #bdc5d0; }
.overlay { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: #15233c70; backdrop-filter: blur(3px); padding: 20px; }
.dialog { width: min(100%, 480px); max-height: 92vh; overflow: auto; background: #fff; border: 1px solid #dce3ed; border-radius: 12px; padding: 26px; box-shadow: 0 20px 80px #13243e30; }
.dialog .section-top { margin-bottom: 10px; align-items: flex-start; }
.dialog h2 { font-size: 20px; margin-top: 3px; }
.dialog-description { font-size: 12px; line-height: 1.8; padding-right: 20px; }
.rack-settings-content { display: grid; grid-template-columns: 1.2fr 1fr; column-gap: 24px; }
.rack-settings-content > label, .rack-settings-content > select, .rack-settings-content > .measurements { grid-column: 1; }
.rack-settings-content > .plan-preview { grid-column: 2; grid-row: 1 / 5; margin-top: 22px; justify-content: center; padding: 12px; }
.rack-settings-content > .capacity { grid-column: 1 / -1; }
.rack-settings-dialog { width: min(100%, 540px); }
.accessory-settings { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.accessory-settings .door-setting { grid-column: 1 / -1; }
.cabinet-door { pointer-events: none; }
.form-error { margin-top: 18px; padding: 10px 12px; border-radius: 6px; background: #fdf0f1; color: #a63241; font-size: 12px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.loading { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 80px 24px; color: #7c8ba1; }
@media (min-width: 1600px) { .workspace { grid-template-columns: 370px minmax(320px, 1fr); gap: 24px; } }
@media (max-width: 1180px) {
    .workspace { grid-template-columns: minmax(275px, 310px) minmax(290px, 1fr); gap: 14px; }
    .catalog { padding-inline: 14px; }
    .topbar-context { display: none; }
}
@media (max-width: 980px) {
    .workspace { grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.3fr); }
}
@media (max-width: 640px) {
    .topbar { gap: 12px; padding: 14px 18px; align-items: flex-start; }
    .brand { font-size: 18px; }
    .logo { width: 34px; height: 39px; }
    .brand small { font-size: 7px; letter-spacing: 1px; }
    .topright { flex-direction: column-reverse; align-items: flex-end; gap: 7px; }
    .save-state { font-size: 10px; max-width: 190px; }
    .topright .primary { min-height: 36px; padding: 7px 10px; font-size: 11px; gap: 6px; }
    .intro, .workspace, .workspace-footer { padding-inline: 16px; }
    .intro { align-items: flex-start; flex-direction: column; gap: 8px; }
    .summary { width: 100%; }
    .summary > div { flex: 1; }
    .catalog { padding: 20px 18px 0; }
    .catalog-caption { font-size: 10px; }
    .workspace-footer { display: none; }
    .dialog { padding: 22px; }
    .device-inspector { display: block; padding: 18px; }
    .device-inspector .selection-actions { margin-bottom: 16px; }
    .rack-settings-content { grid-template-columns: 1fr; }
    .rack-settings-content > .plan-preview { grid-column: 1; grid-row: auto; margin-top: 12px; }
    .rack-settings-content .plan { height: 80px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Imported equipment and shelf editing surfaces. */
.mount-tag { flex-basis: 100%; color: #8a97aa; font-size: 9px; line-height: 1.5; }
.product-tags { flex-wrap: wrap; row-gap: 4px; }
.rack { width: 100%; height: 100%; overflow: hidden; }
.rack-viewport { display: flex; width: 100%; height: 100%; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b9c6d7 transparent; }
.rack-viewport:focus-visible { outline: 2px solid #719ce0; outline-offset: 2px; }
.rack-surface { flex: none; width: var(--rack-zoom, 100%); height: var(--rack-zoom, 100%); margin: auto; }
.rack-depth { stroke: #64758a; stroke-width: 2; stroke-linejoin: round; }
.rack-dimensions { color: #405d7b; }
.rack-dimension-line, .rack-dimension-extension { stroke: currentColor; vector-effect: non-scaling-stroke; }
.rack-dimension-line { stroke-width: 1; }
.rack-dimension-extension { stroke-width: .8; opacity: .65; }
.rack-dimension-tick { fill: none; stroke: #405d7b; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.rack-dimension-value { fill: currentColor; font: 600 41px Consolas, 'IBM Plex Mono', monospace; paint-order: stroke; stroke: #edf1f6; stroke-width: 9px; stroke-linejoin: round; }
.rack-depth-top { fill: #465565; }
.rack-depth-side { fill: #303e4d; }
.rack-depth-side-frame { fill: none; stroke: #64758a; stroke-width: 12; }
.rack-roof-inset, .rack-side-inset { stroke-width: 1.5; }
.rack-roof-inset { fill: #364555; }
.rack-side-inset { fill: #283543; }
.device.chosen > svg > image { outline: 1px solid #99c5ff; outline-offset: -1px; }
.illustrated-port { fill: transparent; stroke: transparent; stroke-width: 8; }
.illustrated-port.configured { fill: #285fbb22; stroke: #74b1f4; }
.illustrated-port:hover, .illustrated-port:focus-visible { fill: #285fbb44; stroke: #a3c9fb; }
.shelf-device { cursor: pointer; }
.shelf-device:hover > rect, .shelf-device:focus-visible > rect, .shelf-device[aria-pressed="true"] > rect:first-of-type { stroke: #99c5ff; stroke-width: 1.6; }
.shelf-add-row { display: flex; gap: 8px; align-items: center; }
.zoom-layer { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: clamp(12px, 3vw, 36px); background: #15233c70; backdrop-filter: blur(3px); }
.zoom-card { width: min(100%, 1400px); max-height: 100%; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: clamp(18px, 2vw, 28px); border: 1px solid #dce3ed; border-radius: 12px; background: #fff; box-shadow: 0 20px 80px #13243e30; }
.zoom-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.zoom-card p { margin-top: 7px; font-size: 12px; line-height: 1.7; }
.zoom-face { display: block; width: 100%; height: auto; max-height: 68vh; margin-top: 20px; }
.zoom-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: clamp(18px, 3vw, 36px); margin-top: 22px; }
.zoom-preview { min-width: 0; padding: clamp(12px, 2vw, 24px); border: 1px solid var(--line); border-radius: 8px; background: #f5f7fb; }
.zoom-preview .zoom-face { margin-top: 0; }
.zoom-form { min-width: 0; }
.zoom-form fieldset { min-width: 0; margin: 0 0 18px; padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--line); }
.zoom-form legend { padding: 0; font-size: 13px; font-weight: 600; }
.zoom-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zoom-form-actions span { color: var(--muted); font-size: 12px; }
.ethernet-ports { display: grid; gap: 5px; list-style: none; margin: 8px 0 12px; padding: 0; max-height: 13rem; overflow: auto; }
.ethernet-port-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; white-space: normal; text-align: left; }
.ethernet-port-row span { flex: none; }
.ethernet-port-row small { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.ethernet-port-row[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.overlay { z-index: 30; }
.canvas.canvas-expanded { position: fixed; inset: 0; z-index: 10; border: 0; border-radius: 0; }
.canvas-expanded .rack-viewport { overflow-x: hidden; overflow-y: auto; container-type: inline-size; }
.canvas-expanded .rack-surface { width: min(100%, var(--rack-zoom, 100%)); max-height: calc(100cqw * var(--rack-height-ratio)); }
.dialog form > p[role="status"] { margin-top: 10px; font-size: 11px; }
.device-inspector .selection-actions { flex-wrap: wrap; justify-content: flex-end; }
.workspace.has-selection { grid-template-columns: minmax(260px, 320px) minmax(320px, 1fr) 270px; }
.workspace > .device-inspector { display: block; position: relative; align-self: start; min-width: 0; max-height: 100%; overflow: auto; margin: 0; padding: 22px 18px; border: 1px solid #dfe5ee; border-radius: 10px; background: #fff; }
.workspace > .device-inspector .eyebrow { padding-right: 36px; margin-bottom: 16px; }
.workspace > .device-inspector h3 { overflow-wrap: anywhere; }
.workspace > .device-inspector .selection-actions { justify-content: flex-start; margin-top: 18px; }
.workspace > .device-inspector > label { margin-top: 22px; }
.inspector-close { position: absolute; top: 12px; right: 12px; width: 28px; min-height: 28px; border-color: transparent; }
.inspector-close .icon { width: 14px; height: 14px; }
.canvas-expanded ~ .device-inspector { position: fixed; top: 16px; right: 16px; z-index: 11; width: min(270px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
@media (min-width: 701px) {
    .workspace.has-selection > .canvas-expanded { right: 302px; }
}
@media (max-width: 1220px) and (min-width: 701px) {
    .workspace.has-selection { grid-template-columns: minmax(320px, 1fr) 260px; grid-template-rows: minmax(245px, .7fr) minmax(260px, 1fr); }
    .workspace.has-selection > .catalog { grid-column: 1 / -1; }
    .workspace.has-selection > .catalog .inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-content: start; gap: 10px; }
}
@media (max-width: 700px) {
    .workspace, .workspace.has-selection { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(250px, .75fr) minmax(290px, 1fr); gap: 14px; }
    .workspace > .device-inspector { position: fixed; top: 92px; right: 12px; z-index: 8; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 110px); overflow: auto; box-shadow: 0 12px 40px #20355422; }
    .workspace > .canvas-expanded ~ .device-inspector { z-index: 11; }
}
@media (max-width: 740px) { .zoom-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .device-inspector .selection-actions { justify-content: flex-start; } }
/* Interactive model window. */
.viewer3d-overlay { position: fixed; inset: 0; z-index: 40; background: #f3f5f9; }
.viewer3d-dialog { display: flex; flex-direction: column; height: 100dvh; width: 100%; background: #fff; }
.viewer3d-heading { display: flex; align-items: center; gap: 18px; padding: 16px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.viewer3d-header-actions { display: flex; align-items: center; gap: 8px; }
.viewer3d-dimensions-toggle[aria-pressed="true"] { color: var(--accent); border-color: #8ba8d1; background: #edf3fc; }
.viewer3d-summary { margin-left: auto; color: #7c8ba0; font-size: 12px; }
.viewer3d-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; flex: 1; min-height: 0; }
.viewer3d-stage { position: relative; min-width: 0; min-height: 0; background: #e6ecf3; }
.viewer3d-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline-offset: -4px; }
.viewer3d-stage canvas.orbiting { cursor: grabbing; }
.viewer3d-port-tooltip { position: absolute; z-index: 2; width: max-content; max-width: min(340px, calc(100% - 16px)); max-height: calc(100% - 16px); overflow: hidden; padding: 12px 14px; border: 1px solid #c4d3e6; border-radius: 9px; background: #f8fbfffa; box-shadow: 0 8px 28px #183c6326; color: #274766; font-size: 11px; line-height: 1.6; pointer-events: none; overflow-wrap: anywhere; }
.viewer3d-port-tooltip[hidden] { display: none; }
.viewer3d-port-tooltip-title { display: block; color: #183c63; font-size: 12px; }
.viewer3d-port-tooltip-details, .viewer3d-port-tooltip-route { white-space: pre-line; }
.viewer3d-port-tooltip-details { color: #62768c; margin-top: 4px; }
.viewer3d-port-tooltip-heading { display: block; margin-top: 9px; padding-top: 8px; border-top: 1px solid #e0e8f2; color: #7a8ca0; font-size: 10px; }
.viewer3d-port-tooltip-result { display: block; margin-top: 7px; color: #2e639a; font-size: 11px; }
.viewer3d-controls { border-left: 1px solid var(--line); overflow: auto; padding: 24px 18px; }
.viewer3d-controls > p { font-size: 12px; line-height: 1.9; margin-top: 10px; }
.viewer3d-controls > h3 { font-size: 12px; margin-top: 26px; margin-bottom: 12px; }
.viewer3d-fan-power { width: 100%; justify-content: space-between; margin-top: 16px; }
.viewer3d-fan-power > span { color: #637895; font-size: 11px; }
.viewer3d-fan-power[aria-pressed="true"] { background: #edf7f2; border-color: #8ab6a2; }
.viewer3d-fan-power[aria-pressed="true"] > span { color: #30654d; }
.viewer3d-door-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.viewer3d-door-actions button { min-height: 36px; padding: 7px 9px; font-size: 10px; }
.viewer3d-door-actions button[aria-expanded="true"] { background: #edf3fc; border-color: #7c9fce; color: #285fbb; }
.viewer3d-controls button:disabled { cursor: default; }
.viewer3d-options { margin-top: 24px; }
.viewer3d-options label { display: flex; align-items: center; gap: 9px; margin-top: 14px; cursor: pointer; }
.viewer3d-options input { width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; accent-color: #285fbb; }
.viewer3d-range { display: flex; justify-content: space-between; margin-top: 22px; }
.viewer3d-controls input[type="range"] { padding: 0; min-height: 22px; border: 0; box-shadow: none; accent-color: #285fbb; }
.viewer3d-settings-group { margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.viewer3d-group-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid transparent; border-radius: 7px; background: transparent; color: #3c4d65; font-size: 12px; font-weight: 600; text-align: left; }
.viewer3d-group-toggle:hover { color: #285fbb; background: #f6f8fc; }
.viewer3d-settings-group.is-open > .viewer3d-group-toggle { border-bottom-color: var(--line); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.viewer3d-group-chevron { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; color: #6b7e96; transition: background .2s, border-color .2s, color .2s; }
.viewer3d-group-chevron .icon { width: 17px; height: 17px; stroke-width: 1.9; transition: transform .24s cubic-bezier(.22,.61,.36,1); }
.viewer3d-settings-group.is-open .viewer3d-group-chevron { color: #285fbb; background: #edf3fc; border-color: #cddbf0; }
.viewer3d-settings-group.is-open .viewer3d-group-chevron .icon { transform: rotate(180deg); }
.viewer3d-group-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .24s cubic-bezier(.22,.61,.36,1), opacity .18s ease; }
.viewer3d-settings-group.is-open > .viewer3d-group-body { grid-template-rows: 1fr; opacity: 1; }
.viewer3d-group-clip { min-height: 0; overflow: hidden; }
.viewer3d-settings-content { padding: 0 12px 12px; }
.viewer3d-settings-content .viewer3d-range { margin-top: 14px; }
.viewer3d-cable-content > label:not(.viewer3d-range) { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.viewer3d-controls .viewer3d-switch { justify-content: space-between; cursor: pointer; }
.viewer3d-switch-control { position: relative; display: inline-flex; flex: none; width: 36px; height: 22px; }
.viewer3d-switch-control input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.viewer3d-switch-track { width: 100%; height: 100%; border: 1px solid #b7c4d5; border-radius: 12px; background: #ced7e3; transition: background .18s, border-color .18s; }
.viewer3d-switch-track::after { content: ''; display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #233b5d33; transition: transform .18s; }
.viewer3d-switch-control input:checked + .viewer3d-switch-track { background: #285fbb; border-color: #285fbb; }
.viewer3d-switch-control input:checked + .viewer3d-switch-track::after { transform: translateX(14px); }
.viewer3d-switch-control input:focus-visible + .viewer3d-switch-track { outline: 2px solid #285fbb; outline-offset: 3px; }
.viewer3d-cable-content input[type="color"] { padding: 3px; height: 32px; width: 100%; }
.viewer3d-cable-status { color: #567291; font-size: 11px; line-height: 1.6; margin-top: 12px; }
.viewer3d-cable-content > p { color: #567291; font-size: 11px; line-height: 1.6; margin-top: 12px; }
.viewer3d-cable-info:not([hidden]) { display: grid; gap: 6px; margin-top: 16px; padding: 12px; border: 1px solid #d3dfed; border-left: 3px solid #d9a538; border-radius: 8px; background: #f8fafc; font-size: 12px; overflow-wrap: anywhere; }
.viewer3d-cable-info .section-top { margin-bottom: 3px; }
.viewer3d-cable-info .icon-button { width: 26px; height: 26px; min-height: 26px; }
.viewer3d-cable-info small { color: #567291; line-height: 1.6; }
.viewer3d-cable-arrow { color: #7186a0; }
.viewer3d-cable-info input[type="color"] { width: 100%; height: 32px; padding: 3px; }
.viewer3d-cable-info .viewer3d-range { margin-top: 6px; }
.viewer3d-cable-edit-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.viewer3d-cable-edit-actions button { font-size: 11px; padding: 6px 9px; }
.viewer3d-port-editor { display: grid; gap: 8px; }
.viewer3d-port-editor fieldset { border: 0; padding: 0; display: grid; gap: 8px; }
.viewer3d-port-editor label { font-size: 11px; color: #567291; }
.viewer3d-port-editor p { margin: 0; font-size: 11px; line-height: 1.6; }
.viewer3d-light-switch { display: flex; justify-content: flex-end; padding-top: 12px; }
.viewer3d-light-power { color: #8b97a7; }
.viewer3d-light-power[aria-pressed="true"] { color: #bb850d; background: #fff9e8; border-color: #e9d18a; }
.viewer3d-light-power[aria-pressed="true"] .icon { fill: #f5ce57; }
.viewer3d-door-content { padding-top: 12px; }
.viewer3d-door-content .viewer3d-options { margin-top: 0; }
.viewer3d-camera-actions { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.viewer3d-camera-actions > button { min-height: 34px; font-size: 10px; }
.viewer3d-camera-actions .icon-button { width: 30px; }
.viewer3d-controls .viewer3d-status { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: #567291; font-size: 11px; }
.viewer3d-controls .viewer3d-hint { color: #91a0b4; font-size: 10px; line-height: 1.8; margin-top: 18px; }
.viewer3d-caption { position: absolute; bottom: 16px; left: 20px; font-size: 11px; color: #6b7f96; pointer-events: none; }
.viewer3d-loading, .viewer3d-error { position: absolute; inset: 0; display: grid; place-items: center; background: #edf2f8ee; color: #6c809b; padding: 24px; text-align: center; font-size: 13px; }
.viewer3d-error { color: #a63241; }
@media (max-width: 740px) {
    .viewer3d-heading { padding: 12px 16px; gap: 10px; }
    .viewer3d-heading h2 { font-size: 15px; }
    .viewer3d-summary { display: none; }
    .viewer3d-header-actions { margin-left: auto; }
    .viewer3d-body { display: flex; flex-direction: column; }
    .viewer3d-stage { flex: 1; min-height: 260px; }
    .viewer3d-controls { flex-shrink: 0; max-height: 40dvh; border-left: 0; border-top: 1px solid var(--line); padding: 18px; }
    .viewer3d-door-actions { grid-template-columns: repeat(4, 1fr); }
    .viewer3d-controls > h3 { margin-top: 16px; }
}
@media (max-width: 420px) { .viewer3d-door-actions { grid-template-columns: 1fr 1fr; } }
