:root {
  color-scheme: light;
  --ink: #163648;
  --ink-soft: #4d6877;
  --muted: #728a97;
  --line: #dce8ed;
  --canvas: #f2f7f9;
  --white: #fff;
  --green: #0785a8;
  --green-dark: #056884;
  --green-pale: #e4f4f7;
  --navy: #062c43;
  --sidebar: #062c43;
  --shadow: 0 10px 30px rgba(8, 52, 75, .07);
  /* Rack cabinet: the enclosure, rails and U numbers frame the equipment without competing with it. */
  --rack-enclosure: #4d6570;
  --rack-rail: #d2dce0;
  --rack-rail-edge: #a9b9bf;
  --rack-interior: #f5f8f9;
  --rack-u-ink: #7c929c;
  --rack-u-major-ink: #3f5c69;
  --rack-header-ink: #234556;
  --type-xs: clamp(0.75rem, 0.15vw + 0.7rem, 0.875rem);
  --type-sm: clamp(0.8125rem, 0.2vw + 0.75rem, 0.9375rem);
  --type-md: clamp(0.875rem, 0.25vw + 0.8rem, 1rem);
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar-toggle { position: relative; display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; align-self: center; margin: 12px auto 18px; padding: 0; color: transparent; background: linear-gradient(145deg,rgba(255,255,255,.11),rgba(255,255,255,.045)); border: 1px solid rgba(160,200,211,.2); border-radius: 8px; box-shadow: inset 0 1px rgba(255,255,255,.06); font-size: 0; transition: background .16s, border-color .16s, box-shadow .16s; }
.sidebar-toggle::before { width: 8px; height: 8px; content: ""; border: solid #b9d5df; border-width: 0 2px 2px 0; transform: rotate(135deg); transition: transform .2s, border-color .16s; }
.sidebar-toggle:hover { background: rgba(104,193,211,.18); border-color: rgba(160,220,231,.4); box-shadow: 0 0 0 3px rgba(104,193,211,.08); }
.sidebar-toggle:hover::before { border-color: white; }
.status-dot, .stat-live-dot { width: 7px; height: 7px; flex: 0 0 7px; background: #42d6cf; border-radius: 50%; box-shadow: 0 0 0 3px rgba(66,214,207,.12); }
#server-version-label { margin-top: 2px; color: #7fa3b2; font-size: 11px; }
.topbar { position: sticky; z-index: 9; top: 0; display: flex; height: 61px; align-items: center; justify-content: space-between; padding: 0 46px; background: rgba(255,255,255,.95); border-bottom: 1px solid #deeaee; backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #96a19c; font-size: 10px; }
.crumb-separator { color: #c0d2d9; }
.breadcrumbs strong { color: #35596b; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 11px; }
.global-search { position: relative; width: clamp(155px, 19vw, 245px); }
.global-search input { width: 100%; min-height: 34px; padding: 6px 11px; color: #24495a; background: #f7fafb; border: 1px solid #d6e5ea; border-radius: 7px; font-size: 12px; }
.global-search-results { position: absolute; z-index: 10; top: calc(100% + 7px); left: 0; width: min(370px, 80vw); max-height: min(65vh, 480px); overflow: auto; padding: 5px; background: white; border: 1px solid #dce8ed; border-radius: 9px; box-shadow: 0 12px 32px rgba(8,52,75,.18); }
.global-search-result { display: block; width: 100%; padding: 9px 10px; color: #23495b; background: transparent; border: 0; border-radius: 6px; text-align: left; }
.global-search-result:hover, .global-search-result:focus { outline: none; background: #eef7f9; }
.global-search-result strong, .global-search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result strong { font-size: 12px; }
.global-search-result small, .global-search-empty { margin-top: 3px; color: #758c98; font-size: 10px; }
.global-search-empty { padding: 8px 10px; }
.site-picker-label { color: #6b8795; font-size: 12px; font-weight: 600; }
.topbar-right select { max-width: 220px; min-height: 34px; padding: 5px 30px 5px 10px; color: #1c4a60; background: #f4f9fb; border: 1px solid #d6e5ea; border-radius: 7px; font-size: 12px; }
.user-menu { position: relative; }
.user-menu-trigger { display: inline-flex; max-width: 180px; align-items: center; gap: 7px; padding: 7px 9px; color: #456272; background: transparent; border: 0; border-radius: 6px; font-size: 12px; }
.user-menu-trigger:hover, .user-menu-trigger[aria-expanded="true"] { background: #edf5f7; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-chevron { color: #8097a1; font-size: 10px; }
.user-menu-panel { position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; display: grid; min-width: 170px; padding: 5px; background: white; border: 1px solid #dce8ed; border-radius: 8px; box-shadow: 0 10px 28px rgba(8,52,75,.16); }
.user-menu-panel button { padding: 9px 10px; color: #35596b; background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 12px; }
.user-menu-panel button:hover, .user-menu-panel button:focus-visible { outline: none; background: #eef7f9; }
.user-menu-panel #logout-button { color: #875952; }
.content { width: min(1600px, 100%); margin: 0 auto; padding: clamp(28px, 3vw, 48px) clamp(24px, 3.4vw, 54px) 56px; }
.page-view { display: none; animation: fade-in .2s ease-out; }
.page-view.active { display: block; }
@keyframes fade-in { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #287f98; font-size: 9px; font-weight: 700; letter-spacing: 1.12px; }
h1, h2, h3, p { margin: 0; }
h1 { color: #12384c; font-family: "Segoe UI", Arial, sans-serif; font-size: clamp(24px, 2.15vw, 31px); font-weight: 700; letter-spacing: -1.1px; line-height: 1.25; }
.page-description { margin-top: 7px; color: #718a97; font-size: var(--type-sm); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 7px; font-size: var(--type-xs); font-weight: 600; transition: background .14s, transform .14s, box-shadow .14s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green); box-shadow: 0 4px 10px rgba(8,133,168,.16); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); box-shadow: 0 5px 14px rgba(8,133,168,.23); }
.button-plus { font-size: 17px; font-weight: 400; line-height: .8; }
.button-secondary { color: #5b6962; background: white; border-color: #e3e9e5; }
.button-secondary:hover:not(:disabled) { background: #f6f9f7; }
.button-small { min-height: 31px; padding: 0 10px; font-size: 9px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card { min-height: 122px; padding: 17px 18px 15px; background: white; border: 1px solid #edf1ee; border-radius: 10px; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: #76827c; font-size: 10px; font-weight: 500; }
.stat-icon, .summary-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 15px; font-weight: 600; }
.icon-purple { color: #8463be; background: #f1ecfa; }
.icon-green { color: #328b69; background: #e8f5ee; }
.icon-blue { color: #5482ad; background: #edf3fa; }
.icon-amber { color: #b38139; background: #faf1e2; }
.stat-value { display: block; margin-top: 7px; color: #273630; font-family: "Segoe UI", Arial, sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.8px; line-height: 1.05; }
.stat-note { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #9aa49f; font-size: 9px; }
.stat-live-dot { width: 6px; height: 6px; flex-basis: 6px; box-shadow: none; }
.dashboard-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 15px; }
.panel { min-width: 0; background: white; border: 1px solid #edf1ee; border-radius: 10px; box-shadow: var(--shadow); }
.overview-panel, .activity-panel, .equipment-panel { padding: 19px 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h2 { color: #304039; font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: -.25px; }
.panel-heading p { margin-top: 4px; color: #9ba59f; font-size: 9px; }
.text-button { padding: 0; color: #087da0; background: none; border: 0; font-size: 9px; font-weight: 600; }
.text-button span { margin-left: 3px; }
.text-button:hover { color: #064d68; }
.equipment-breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; margin-top: 16px; }
.breakdown-item { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 7px 0; color: inherit; background: transparent; border: 0; text-align: left; }
.breakdown-item:hover .breakdown-label { color: #087da0; }
.equipment-icon { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 8px; font-size: 15px; font-weight: 600; }
.equipment-icon.icon-coral { color: #bd7968; background: #fbefec; }
.equipment-icon.icon-violet { color: #8268b5; background: #f1edfa; }
.equipment-icon.icon-blue { color: #5482ad; background: #edf3fa; }
.equipment-icon.icon-green { color: #428865; background: #ebf5ee; }
.equipment-icon.icon-amber { color: #b38341; background: #faf2e6; }
.breakdown-label { overflow: hidden; color: #718078; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.breakdown-item strong { margin-left: auto; color: #34443c; font-size: 10px; font-weight: 600; }
.breakdown-arrow { color: #bdc7c0; font-size: 12px; opacity: 0; transition: opacity .15s, transform .15s; }
.breakdown-item:hover .breakdown-arrow { transform: translateX(2px); opacity: 1; }
.utilization-block { margin-top: 13px; padding-top: 14px; border-top: 1px solid #edf1ee; }
.utilization-header { display: flex; align-items: center; justify-content: space-between; }
.utilization-header > div { display: flex; align-items: baseline; gap: 10px; }
.section-label { color: #9ba7a0; font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.utilization-header strong { color: #40564a; font-size: 10px; font-weight: 600; }
.utilization-header > span { color: #a0aaa4; font-size: 8px; }
.progress-track { overflow: hidden; height: 6px; margin-top: 10px; background: #edf2ef; border-radius: 5px; }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg,#087da0,#42d6cf); border-radius: inherit; transition: width .3s ease; }
.progress-legend { display: flex; gap: 22px; margin-top: 9px; color: #97a29c; font-size: 8px; }
.progress-legend span { display: inline-flex; align-items: center; gap: 5px; }
.progress-legend i { width: 6px; height: 6px; border-radius: 50%; }
.legend-used { background: #0785a8; }
.legend-free { background: #d7e1db; }
.progress-legend strong { color: #3c5866; font-size: inherit; }
.activity-list { margin-top: 15px; }
.activity-item { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid #f0f3f1; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; color: #519477; background: #eef7f1; border-radius: 8px; font-size: 16px; }
.activity-copy { overflow: hidden; min-width: 0; }
.activity-copy strong { display: block; overflow: hidden; color: #53635a; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy strong span { color: #81b59a; }
.activity-copy small { display: block; margin-top: 4px; color: #a2aca6; font-size: 8px; }
.activity-dot { padding: 0 3px; color: #c6d1ca; }
.activity-status { flex: 0 0 auto; padding: 4px 7px; color: #578e72; background: #eef7f0; border-radius: 10px; font-size: 7px; }
.icon-more { display: grid; width: 27px; height: 27px; place-items: center; color: #84968c; background: #f4f7f5; border: 0; border-radius: 7px; }
.equipment-panel { grid-column: 1; }
.recent-equipment-list { margin-top: 11px; }
.recent-device { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 0; background: transparent; border: 0; text-align: left; }
.recent-device > span:nth-child(2) { min-width: 0; }
.recent-device strong, .recent-device small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-device strong { color: #526159; font-size: 9px; font-weight: 600; }
.recent-device small { margin-top: 4px; color: #a2aca6; font-size: 8px; }
.recent-device .equipment-icon { width: 27px; height: 27px; flex-basis: 27px; font-size: 13px; }
.recent-port-count { margin-left: auto; color: #97a39c; font-size: 8px; white-space: nowrap; }
.recent-device:hover strong { color: #32846b; }
.inventory-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-box { display: flex; width: min(330px, 60%); height: 37px; align-items: center; gap: 8px; padding: 0 11px; color: #9aa69f; background: white; border: 1px solid #e8eeea; border-radius: 7px; }
.search-box > span { font-size: 18px; transform: rotate(-20deg); }
.search-box input { width: 100%; color: var(--ink); background: transparent; border: 0; outline: none; font-size: 10px; }
.search-box input::placeholder { color: #aab3ae; }
.inventory-toolbar select { height: 37px; min-width: 120px; padding: 0 28px 0 10px; color: #66736d; background: white; border: 1px solid #e8eeea; border-radius: 7px; font-size: 9px; }
.result-count { margin-left: auto; color: #98a39d; font-size: 9px; }
.equipment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.type-pill { padding: 4px 8px; color: #7d8b83; background: #f5f7f6; border-radius: 10px; font-size: 8px; }
.card-actions { display: flex; gap: 4px; margin-left: auto; }
.card-action { display: grid; width: 27px; height: 27px; place-items: center; color: #84938b; background: transparent; border: 0; border-radius: 6px; font-size: 12px; }
.card-action:hover { color: #3a846a; background: #edf6f0; }
.card-action-delete:hover { color: #b65f56; background: #fbefed; }
.connection-count { flex: 0 0 auto; color: #529272; font-size: 8px; }
.connection-count span { color: #a2ada6; }
.device-location { overflow: hidden; margin-top: 6px; color: #939f98; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.device-location span { margin-right: 3px; color: #a6b4aa; }
.equipment-meta-row { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: #728178; font-size: 8px; }
.equipment-meta-row > span { min-width: 0; overflow-wrap: anywhere; }
.equipment-meta-row strong { color: #506259; font-weight: 650; }
.equipment-status { padding: 2px 6px; color: #26754e; background: #e8f5ed; border-radius: 999px; font-weight: 650; }
.equipment-status.status-spare { color: #8a682b; background: #fbf3df; }
.equipment-status.status-maintenance { color: #9b5d2e; background: #fff0e8; }
.equipment-status.status-retired { color: #6e7672; background: #edf0ee; }
.card-actions [data-action="manage-ports"] { width: auto; min-width: 36px; padding: 0 6px; font-size: 8px; }
.card-actions [data-action="duplicate-equipment"] { width: auto; min-width: 30px; padding: 0 4px; font-size: 8px; }
.decommission-impact { margin: 5px 0 12px; padding: 12px; background: #f7fafb; border: 1px solid #e1eaed; border-radius: 8px; }
.decommission-impact dl { display: grid; gap: 8px; margin: 0; }
.decommission-impact dl > div { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
.decommission-impact dt { color: #728792; font-size: 11px; }
.decommission-impact dd { margin: 0; color: #294a5b; font-size: 11px; font-weight: 600; }
.decommission-impact p { margin-top: 12px; padding-top: 10px; color: #728792; border-top: 1px solid #e2ebee; font-size: 10px; line-height: 1.5; }
.button-danger:not(:disabled) { background: #a64d45; }
.button-danger:hover:not(:disabled) { background: #8b3933; }
.port-chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.port-used { color: #427f63; background: #eff7f1; border-color: #e7f1e9; }
.port-used i { background: #64ae7d; }
.port-free i { background: #d2ddd5; }
.port-more { color: #89968f; background: white; }
.module-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.module-badges span { padding: 4px 6px; color: #697f72; background: #f0f5f1; border-radius: 4px; font-size: 7px; }

.equipment-toolbar { flex-wrap: wrap; }
.equipment-toolbar .search-box { flex: 1 1 240px; width: auto; }
.equipment-toolbar select { flex: 0 1 auto; }
.equipment-list-header, .equipment-row { display: grid; grid-template-columns: minmax(190px, 1.7fr) minmax(140px, 1.2fr) minmax(100px, .8fr) minmax(145px, 1.2fr) minmax(100px, .8fr) 144px; align-items: center; gap: 12px; }
.equipment-list-header { padding: 0 13px 7px; color: #607b87; font-size: 11px; font-weight: 650; }
.equipment-list { display: flex; flex-direction: column; gap: 6px; }
.equipment-row { min-width: 0; padding: 11px 13px; background: #fff; border: 1px solid #e6ede8; border-radius: 8px; box-shadow: 0 2px 7px rgba(30,64,46,.035); }
.equipment-row-device { display: flex; min-width: 0; align-items: center; gap: 9px; }
.equipment-row-device > .equipment-icon { width: 29px; height: 29px; flex: 0 0 29px; }
.equipment-row-device-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.equipment-name-link { width: fit-content; max-width: 100%; overflow: hidden; padding: 0; color: #2c4639; background: none; border: 0; font: inherit; font-size: 12px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.equipment-name-link:hover { color: #32846b; text-decoration: underline; }
.equipment-name-link:focus-visible { outline: 2px solid #32846b; outline-offset: 2px; border-radius: 2px; }
.equipment-row-subtitle { overflow: hidden; color: #87948c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-row-location, .equipment-row-status, .equipment-row-ports, .equipment-row-asset { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.equipment-row-location strong, .equipment-row-ports strong, .equipment-row-asset strong { overflow: hidden; color: #52645a; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.equipment-row-location small, .equipment-row-ports small { overflow: hidden; color: #8b9991; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-row-label { display: none; color: #88958d; font-size: 8px; }
.equipment-row-status .equipment-status { width: fit-content; font-size: 8px; }
.equipment-row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.equipment-row-actions .card-action { width: 27px; height: 27px; flex: 0 0 auto; }
.equipment-row-actions .equipment-ports-action { width: auto; min-width: 37px; padding: 0 5px; font-size: 8px; }
.equipment-row-actions .card-action-delete { color: #a97872; }
.equipment-detail-card { width: min(620px, 100%); }
.equipment-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
.equipment-detail-grid > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid #edf1ee; }
.equipment-detail-grid dt { margin-bottom: 4px; color: #839189; font-size: 9px; }
.equipment-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: #344b3d; font-size: 11px; font-weight: 600; }
.equipment-detail-section { margin-top: 15px; }
.equipment-detail-section h3 { margin-bottom: 7px; color: #5d7165; font-size: 10px; }
.equipment-detail-section p { color: #506259; font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
.equipment-detail-section ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.equipment-detail-section li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; color: #43594d; background: #f5f8f6; border-radius: 5px; font-size: 9px; }
.equipment-detail-section li span { color: #819087; }
.device-notes { margin-top: 10px; padding-top: 8px; color: #96a29b; border-top: 1px solid #f0f3f1; font-size: 8px; line-height: 1.5; }
.empty-state { display: flex; min-height: 125px; flex-direction: column; align-items: center; justify-content: center; padding: 15px; color: #75837a; text-align: center; }
.empty-state-icon { display: grid; width: 33px; height: 33px; margin-bottom: 8px; place-items: center; color: #62977b; background: #edf5ef; border-radius: 9px; font-size: 17px; }
.empty-state strong { color: #526259; font-size: 10px; font-weight: 600; }
.empty-state p { margin-top: 5px; color: #9aa69f; font-size: 8px; }
.empty-action { margin-top: 12px; }
.connection-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 16px; }
.connection-summary-card { display: flex; min-height: 74px; align-items: center; gap: 11px; padding: 14px 17px; background: white; border: 1px solid #e9efeb; border-radius: 9px; box-shadow: var(--shadow); }
.connection-summary-card .summary-icon { width: 32px; height: 32px; }
.connection-summary-card strong, .connection-summary-card small { display: block; }
.connection-summary-card strong { color: #37483e; font-family: "Segoe UI", Arial, sans-serif; font-size: 17px; line-height: 1; }
.connection-summary-card small { margin-top: 5px; color: #98a49c; font-size: 8px; }
.connection-panel { padding: 18px 20px 5px; }
.connection-panel .panel-heading { padding-bottom: 14px; }
.table-count { padding: 5px 8px; color: #6a8c78; background: #eff6f0; border-radius: 10px; font-size: 8px; }
.table-scroll { overflow-x: auto; }
.patch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.patch-tabs { display: inline-flex; gap: 3px; padding: 4px; background: #eaf0ec; border-radius: 8px; }
.patch-tab { min-height: 34px; padding: 0 13px; color: #718078; background: transparent; border: 0; border-radius: 6px; font-size: var(--type-xs); font-weight: 600; }
.patch-tab.active { color: #326c55; background: white; box-shadow: 0 1px 3px rgba(25, 56, 39, .1); }
.vlan-button-dot { width: 9px; height: 9px; background: linear-gradient(135deg, #568b72 0 50%, #d6a749 50%); border-radius: 3px; }
.patch-help { margin: -4px 0 12px; color: #7d8d83; font-size: var(--type-xs); line-height: 1.45; }
.patch-help.hidden { display: none; }
.patch-board { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 680px), 1fr)); align-items: start; gap: 14px; }
.patch-board-masonry { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(var(--patch-board-columns), minmax(0, 1fr)); align-items: start; gap: 14px; min-width: 0; }
.patch-board-stack { display: flex; min-width: 0; flex-direction: column; gap: 14px; }
.patch-board-wide { display: contents; }
.patch-equipment-visibility { position: relative; z-index: 6; }
.patch-equipment-visibility > summary { min-height: 34px; padding: 0 9px; color: #3e6474; background: #fff; border: 1px solid #dce8ed; border-radius: 6px; font-size: 11px; line-height: 32px; list-style: none; white-space: nowrap; cursor: pointer; }
.patch-equipment-visibility > summary::-webkit-details-marker { display: none; }
.patch-equipment-visibility > summary::after { margin-left: 8px; color: #8297a0; content: "▾"; }
.patch-equipment-visibility[open] > summary::after { content: "▴"; }
.patch-equipment-visibility-menu { position: absolute; top: calc(100% + 6px); left: 0; width: min(280px, calc(100vw - 28px)); max-height: min(350px, 65vh); padding: 10px; overflow: auto; background: #fff; border: 1px solid #d9e5e9; border-radius: 9px; box-shadow: 0 12px 30px rgba(30,63,76,.2); }
.patch-equipment-visibility-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #315365; font-size: 11px; }
.patch-equipment-visibility-heading .text-button { padding: 2px 5px; font-size: 10px; }
#patch-equipment-visibility-options { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; }
.patch-equipment-visibility-option { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 6px; color: #496472; border-radius: 5px; font-size: 11px; cursor: pointer; }
.patch-equipment-visibility-option > label { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; cursor: pointer; }
.patch-equipment-visibility-option > .text-button { flex: 0 0 auto; padding: 2px 5px; font-size: 10px; }
.patch-equipment-visibility-option:hover { background: #f0f6f8; }
.patch-equipment-visibility-option input { accent-color: #168aa8; }
.patch-equipment-visibility-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patch-board.hidden, .connection-panel.hidden { display: none; }
.patch-cable-overlay { position: absolute; z-index: 2; inset: 0 auto auto 0; overflow: visible; pointer-events: none; }
.patch-board .patch-cable-overlay { z-index: 4; }
.patch-cable-path { fill: none; opacity: 0; stroke-width: 2.5px; stroke-linecap: round; stroke-dasharray: 7 8; filter: drop-shadow(0 1px 2px rgba(6, 44, 67, .3)); transition: opacity .14s ease-out; }
.rear-patch-cable-path { stroke-width: 3px; stroke-dasharray: 2 6; }
.patch-cable-path.is-flowing { opacity: .95; animation: patch-cable-flow .7s linear infinite; }
.patch-cable-path.flow-reverse { animation-direction: reverse; }
@keyframes patch-cable-flow { to { stroke-dashoffset: -30; } }
.patch-device-card { min-width: 0; overflow: hidden; background: white; border: 1px solid #e6ede8; border-radius: 10px; box-shadow: var(--shadow); }
.patch-device-header { display: flex; align-items: center; gap: 10px; padding: 14px 15px; border-bottom: 1px solid #edf1ee; }
.patch-device-header .equipment-icon { flex: 0 0 34px; width: 34px; height: 34px; }
.patch-device-heading { display: block; min-width: 0; }
.patch-device-heading strong, .patch-device-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patch-device-heading strong { color: #34473d; font-size: var(--type-sm); }
.patch-device-heading small { margin-top: 3px; color: #8b9a91; font-size: var(--type-xs); }
.patch-device-count { margin-left: auto; padding: 5px 8px; color: #62836d; background: #f0f6f1; border-radius: 12px; font-size: var(--type-xs); white-space: nowrap; }
.patch-device-groups { display: grid; gap: 12px; padding: 12px 13px 14px; }
.patch-module { min-width: 0; }
.patch-module h3, .patch-module-caption { margin: 0 0 8px; color: #7a8b81; font-size: var(--type-xs); font-weight: 600; }
.patch-module h3 { padding-bottom: 6px; border-bottom: 1px solid #f0f3f1; }
.patch-port-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.board-port-row { display: flex; min-width: 0; align-items: stretch; background: #f8faf8; border: 1px solid #eaf0ec; border-left: 3px solid transparent; border-radius: 7px; transition: border-color .14s, background .14s; }
.board-port-row.board-port-connected { border-left-color: var(--cable-color); }
.board-port-row:hover { background: #f2f7f3; border-top-color: #d6e6da; border-right-color: #d6e6da; border-bottom-color: #d6e6da; }
.board-port-row.board-port-selected { background: #edf8ef; border-color: #7ab28c; box-shadow: 0 0 0 2px rgba(94, 167, 116, .14); }
.board-port-unavailable { opacity: .72; }
.board-port-unavailable .board-port-connect:disabled { cursor: not-allowed; }
.board-port-connect { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 7px 6px 7px 9px; color: #516258; background: transparent; border: 0; border-radius: 6px; text-align: left; }
.board-port-socket { width: 15px; height: 15px; flex: 0 0 15px; background: color-mix(in srgb, var(--port-vlan-color) 15%, white); border: 2px solid var(--port-vlan-color); border-radius: 4px; box-shadow: inset 0 0 0 2px white; }
.board-port-socket.socket-connected { background: var(--port-vlan-stripe); border-color: var(--port-vlan-color); box-shadow: inset 0 0 0 2px white, 0 0 0 2px var(--cable-color); }
.board-port-socket.socket-tagged { border-radius: 50%; }
.board-port-copy { display: block; min-width: 0; overflow: hidden; }
.board-port-copy strong, .board-port-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-port-copy strong { color: #45584c; font-size: var(--type-xs); font-weight: 600; }
.board-port-copy small { margin-top: 3px; color: #84958a; font-size: 12px; }
.board-port-state { max-width: 105px; margin-left: auto; overflow: hidden; color: #97a49b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.socket-connected + .board-port-copy + .board-port-state { color: #518361; }
.board-port-settings { width: 30px; flex: 0 0 30px; color: #96a49b; background: transparent; border: 0; border-radius: 0 6px 6px 0; font-size: 14px; }
.board-port-settings:hover { color: #377a5c; background: #eaf4ec; }
.board-port-menu { width: 30px; flex: 0 0 30px; color: #758b96; background: transparent; border: 0; border-radius: 0 6px 6px 0; font-size: 19px; line-height: 1; }
.board-port-menu:hover, .board-port-menu:focus-visible { color: #075b79; background: #eaf4ec; outline: none; }
.board-port-menu + .board-port-settings { border-radius: 0 6px 6px 0; }
.no-module-ports { color: #9ba69f; font-size: var(--type-xs); }
.patch-board-legend { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 9px 15px; padding: 12px 15px; color: #78877e; background: white; border: 1px solid #e8eeea; border-radius: 8px; font-size: var(--type-xs); }
.patch-board-legend strong { color: #58685e; font-size: var(--type-xs); }
.patch-board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.patch-board-legend i, .vlan-swatch { display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; background: var(--legend-color); border: 1px solid rgba(38, 58, 45, .12); border-radius: 4px; }
.patch-board-legend .legend-multi { background: linear-gradient(135deg,#568b72 0 33%,#d6a749 33% 66%,#6381b6 66%); }
.connection-context-menu { position: fixed; z-index: 10000; display: grid; width: min(252px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; padding: 5px; color: #29495a; background: white; border: 1px solid #dbe7eb; border-radius: 9px; box-shadow: 0 10px 28px rgba(22, 52, 67, .2); }
.connection-context-menu.hidden { display: none; }
/* Menus: a title naming what was clicked, labelled groups from narrow to broad scope, removals last. */
.connection-menu-title { display: grid; gap: 2px; padding: 5px 8px 7px; }
.connection-menu-title small { color: #6f8792; font-size: 11px; line-height: 1.35; }
.connection-menu-heading { padding: 3px 5px 5px; color: #20485d; font-size: 13px; }
.connection-menu-title .connection-menu-heading { padding: 0; }
.connection-menu-section { display: grid; gap: 1px; padding: 4px 0; border-top: 1px solid #edf2f4; }
.connection-menu-label { padding: 3px 8px 3px; color: #78909a; font-size: 10px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; }
.connection-color-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 8px 6px; }
.connection-color-swatch { width: 20px; height: 20px; padding: 0; background: var(--cable-color); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #cfdbdf; cursor: pointer; }
.connection-color-swatch.selected { box-shadow: 0 0 0 2px #087da0; }
.connection-color-custom { display: grid; width: 22px; height: 22px; overflow: hidden; border: 1px solid #cfdbdf; border-radius: 50%; cursor: pointer; }
.connection-color-custom input { width: 32px; height: 32px; margin: -5px; padding: 0; border: 0; cursor: pointer; }
.connection-menu-action { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; color: #345566; background: transparent; border: 0; border-radius: 5px; font-size: 12.5px; text-align: left; cursor: pointer; }
.connection-menu-action:hover, .connection-menu-action:focus-visible { color: #075b79; background: #edf7f9; outline: none; }
.connection-menu-action span { min-width: 18px; padding: 1px 6px; color: #5f7a86; background: #eef4f6; border-radius: 9px; font-size: 10.5px; text-align: center; }
.connection-menu-action.connection-menu-danger { color: #a63636; }
/* Menus not yet grouped (infrastructure cabling) still set removals apart. */
.connection-context-menu > .connection-menu-danger { margin-top: 4px; border-top: 1px solid #edf2f4; border-radius: 0 0 5px 5px; }
.connection-menu-action.connection-menu-danger:hover, .connection-menu-action.connection-menu-danger:focus-visible { color: #8a2525; background: #fff1f1; }
.rack-equipment-picker-dialog { width: min(460px, calc(100vw - 28px)); }
.rack-equipment-picker-card { padding: 20px; }
.rack-equipment-picker-card .modal-heading { margin-bottom: 12px; }
.rack-equipment-picker-list { display: grid; max-height: min(56vh, 440px); gap: 5px; overflow-y: auto; padding: 2px; }
.rack-picker-section { display: grid; gap: 5px; }
.rack-picker-section h3 { padding: 3px 2px 0; color: #788d95; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rack-picker-group { display: grid; gap: 4px; }
.rack-picker-row { display: flex; min-width: 0; min-height: 54px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; color: #29495a; background: #f8fbfc; border: 1px solid #e3ecef; border-radius: 7px; text-align: left; cursor: pointer; }
.rack-picker-row:hover, .rack-picker-row:focus-visible { background: #eff8fa; border-color: #a8d5df; outline: none; }
.rack-picker-row-neutral { background: #f1f4f5; border-color: #e0e6e8; }
.rack-picker-row-neutral:hover, .rack-picker-row-neutral:focus-visible { background: #e9eef0; border-color: #cbd7da; }
.rack-picker-row:disabled, .rack-picker-row:disabled:hover { color: #7d8f96; background: #f4f6f7; border-color: #e3e8ea; cursor: not-allowed; }
.rack-picker-row-available { background: #eff8f0; border-color: #d8eadb; }
.rack-picker-row-available:hover, .rack-picker-row-available:focus-visible { background: #e6f4e8; border-color: #bedcc3; }
.rack-picker-row-available .rack-picker-action { color: #3f8051; }
.rack-picker-row-placed { background: #fff3f1; border-color: #efd9d5; }
.rack-picker-row-placed:hover, .rack-picker-row-placed:focus-visible { background: #ffebe8; border-color: #e8c5bf; }
.rack-picker-row-placed .rack-picker-action { color: #ad5a50; }
.rack-picker-name { display: grid; min-width: 0; gap: 3px; }
.rack-picker-name strong, .rack-picker-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-picker-name strong { color: #29495a; font-size: 13px; }
.rack-picker-name small { color: #78909a; font-size: 11px; }
.rack-picker-action { flex: 0 0 auto; color: #087da0; font-size: 11px; font-weight: 700; }
.rack-picker-empty { padding: 18px 10px; color: #78909a; font-size: 12px; text-align: center; }
.vlan-setting-block { display: grid; gap: 12px; margin-top: 15px; }
.vlan-allowed-field { gap: 9px; }
.vlan-checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 220px; overflow: auto; padding: 9px; background: #f7faf8; border: 1px solid #e7eeea; border-radius: 7px; }
.vlan-checkbox { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 7px; color: #536359; background: white; border: 1px solid #edf1ee; border-radius: 6px; font-size: var(--type-xs); font-weight: 500; }
.vlan-checkbox input { accent-color: #388565; }
.vlan-checkbox .vlan-swatch { width: 11px; height: 11px; flex-basis: 11px; }
.vlan-checkbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlan-list { display: grid; max-height: 285px; gap: 5px; overflow: auto; padding: 2px; }
.vlan-list-row { display: flex; min-height: 45px; align-items: center; gap: 10px; padding: 6px 9px; background: #f8faf8; border: 1px solid #edf1ee; border-radius: 7px; }
.vlan-list-row .vlan-swatch { width: 15px; height: 15px; flex-basis: 15px; background: var(--vlan-color); }
.vlan-row-id { min-width: 38px; color: #718076; font-size: var(--type-xs); font-variant-numeric: tabular-nums; }
.vlan-row-name { display: block; min-width: 0; flex: 1; }
.vlan-row-name strong, .vlan-row-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlan-row-name strong { color: #4b5c51; font-size: var(--type-xs); }
.vlan-row-name small { margin-top: 2px; color: #9aa69e; font-size: 12px; }
.vlan-row-action, .vlan-row-delete { min-width: 36px; min-height: 30px; color: #61806d; background: white; border: 1px solid #e5ece7; border-radius: 5px; font-size: var(--type-xs); }
.vlan-row-delete { min-width: 30px; color: #9d6660; font-size: 17px; }
.vlan-row-delete:disabled { visibility: hidden; }
.vlan-create-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 17px; padding-top: 13px; border-top: 1px solid #edf1ee; }
.vlan-create-heading strong { color: #526257; font-size: var(--type-sm); }
.vlan-create-heading span { color: #8d9a91; font-size: var(--type-xs); }
.vlan-create-form { display: grid; grid-template-columns: .7fr 1.2fr .65fr auto; align-items: end; gap: 8px; margin-top: 10px; }
.vlan-create-form .field { min-width: 0; }
.vlan-create-form .field input { min-width: 0; }
.vlan-color-field input { height: 38px; padding: 4px; }
.vlan-create-form .button { min-height: 38px; padding: 0 10px; }
.vlan-create-form #cancel-vlan-edit { grid-column: 4; }
table { width: 100%; border-collapse: collapse; text-align: left; }
#page-admin .page-heading, #page-company .page-heading { flex-wrap: wrap; }
#page-admin .page-heading > div, #page-company .page-heading > div { min-width: 0; flex: 1 1 230px; }
form[data-busy] { opacity: .65; }
.nav-link:disabled { opacity: .4; cursor: default; }
thead { border-top: 1px solid #edf1ee; border-bottom: 1px solid #edf1ee; }
th { height: 34px; color: #a0aaa4; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
td { height: 58px; color: #68756e; border-bottom: 1px solid #f0f3f1; font-size: 9px; }
tbody tr:last-child td { border-bottom: 0; }
.endpoint-cell { display: flex; align-items: center; gap: 8px; min-width: 135px; }
.endpoint-cell .equipment-icon { width: 27px; height: 27px; flex-basis: 27px; font-size: 12px; }
.endpoint-cell strong, .endpoint-cell small { display: block; overflow: hidden; max-width: 170px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-cell strong { color: #4e5d54; font-size: 9px; font-weight: 600; }
.endpoint-cell small { margin-top: 3px; color: #9ca7a0; font-size: 8px; }
.connection-line-cell { width: 50px; }
.connection-line { display: flex; align-items: center; width: 31px; height: 2px; background: var(--cable-color, #808080); }
.connection-line i { width: 5px; height: 5px; margin-left: 12px; background: var(--cable-color, #808080); border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cable-color, #808080) 15%, white); }
.rear-cable-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; text-transform: capitalize; }
.rear-cable-status.status-active { color: #26754e; background: #e8f5ed; }
.rear-cable-status.status-faulty { color: #a14b32; background: #fff0e8; }
.rear-cable-status.status-investigate { color: #8a5a00; background: #fff5dd; }
#page-infrastructure .page-heading { flex-wrap: wrap; }
#page-infrastructure .page-heading > div { min-width: 0; }
.infrastructure-toolbar { flex-wrap: wrap; gap: 8px; }
.infrastructure-toolbar .search-box { flex: 1 1 240px; }
.infrastructure-toolbar select { max-width: 240px; }
.infrastructure-export { display: inline-flex; gap: 6px; margin-left: auto; }
#patch-report-dialog { width: min(1500px, calc(100vw - 28px)); }
.patch-report-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; font-size: 10px; }
.patch-report-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.patch-report-toolbar #patch-report-count { margin-left: auto; }
.patch-report-toolbar .text-button:disabled { color: #9aa8ad; cursor: default; }
.patch-report-preview { max-height: min(60vh, 620px); overflow: auto; border: 1px solid #dce7eb; border-radius: 8px; }
.patch-report-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.patch-report-table thead th { position: sticky; z-index: 1; top: 0; height: auto; min-width: 92px; color: #1d3340; letter-spacing: 0; padding: 5px 6px; background: #eef4f6; border-bottom: 1px solid #c6d4da; text-align: left; vertical-align: top; }
.patch-report-table thead input { width: 100%; padding: 2px 4px; font: inherit; font-weight: 700; border: 1px solid #c6d4da; border-radius: 4px; }
.patch-report-table thead span { display: flex; align-items: center; gap: 2px; margin-top: 3px; }
.patch-report-table thead small { flex: 1; overflow: hidden; color: #7b8c93; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.patch-report-table thead button { width: 18px; height: 18px; padding: 0; color: #36535f; background: white; border: 1px solid #c6d4da; border-radius: 4px; font-size: 11px; line-height: 1; }
.patch-report-table thead button:disabled { opacity: .35; }
.patch-report-table td { height: auto; padding: 3px 6px; color: #1d3340; border-bottom: 1px solid #edf1ee; font-size: 10px; vertical-align: top; white-space: pre-wrap; }
.patch-report-table td:focus { outline: 2px solid #087da0; outline-offset: -2px; background: #f4fbfd; }
.patch-report-table td.patch-report-edited { background: #fff6d8; }
.patch-report-section th { position: sticky; top: 52px; height: auto; letter-spacing: 0; padding: 6px; color: #1d3340; background: #f7fafb; border-bottom: 1px solid #c6d4da; font-size: 11px; text-align: left; }
.rear-board-section { padding: 9px; margin-bottom: 10px; }
.rear-board-section > summary { cursor: pointer; color: #315668; font-size: 13px; font-weight: 650; }
.rear-board-section > summary span { margin-left: 10px; color: #788d95; font-size: 11px; font-weight: 400; }
.rear-board-options { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 8px; color: #5e7781; font-size: 11px; }
.rear-board-options label { display: flex; align-items: center; gap: 5px; }
.rear-board-options input { margin: 0; }
.rear-patch-board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 8px; max-height: min(48vh, 480px); overflow: auto; margin: 9px 0 0; padding: 2px; }
.rear-panel-card .patch-device-header { gap: 7px; padding: 7px 9px; }
.rear-panel-card .patch-device-header .equipment-icon { width: 23px; height: 23px; flex-basis: 23px; }
.rear-panel-card .patch-device-heading strong { font-size: 12px; }
.rear-panel-card .patch-device-heading small, .rear-panel-card .patch-device-count { font-size: 10px; }
.rear-panel-card .patch-device-groups { padding: 7px; }
.rear-panel-card .patch-port-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; }
.rear-panel-card .patch-port-grid:empty::after { content: "No ports match these filters"; grid-column: 1 / -1; padding: 6px; color: #7a8c93; font-size: 11px; }
.rear-board-port { display: flex; min-width: 0; min-height: 31px; align-items: center; gap: 5px; padding: 5px; color: #516258; background: #f8faf8; border: 1px solid #e1ebe4; border-radius: 4px; text-align: left; cursor: pointer; }
.rear-board-port:hover { background: #f2f7f3; border-color: #8eb79b; }
.rear-board-port.rear-port-selected { background: #edf8ef; border-color: #579b6d; box-shadow: 0 0 0 2px rgba(94, 167, 116, .18); }
.rear-board-port.rear-port-faulty { border-color: #d35e46; }
.rear-board-port.rear-port-investigate { border-color: #c98a12; }
.rear-port-indicator { width: 8px; height: 8px; flex-shrink: 0; border: 2px solid #69a47c; border-radius: 2px; background: #edf7ef; }
.rear-port-active .rear-port-indicator { background: #69a47c; }
.rear-port-faulty .rear-port-indicator { border-color: #cf5b43; background: #fff0e8; }
.rear-port-investigate .rear-port-indicator { border-color: #c98a12; background: #fff5dd; }
.rear-board-port strong { overflow: hidden; color: #45584c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rear-board-port small { display: none; overflow: hidden; color: #728378; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rear-detailed .patch-port-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rear-detailed .rear-board-port { display: grid; grid-template-columns: 8px minmax(0, 1fr); }
.rear-detailed .rear-board-port small { display: block; grid-column: 2; }
.rear-run-list td { padding: 8px 10px; font-size: 12px; }
.rear-run-endpoints { display: grid; gap: 4px; }
.rear-run-endpoints small { color: #768a92; }
.rear-run-notes { max-width: 280px; overflow-wrap: anywhere; white-space: pre-wrap; }
.rear-run-list .rear-cable-status { padding: 2px 6px; font-size: 10px; }
@media (max-width: 680px) {
  .infrastructure-toolbar select { flex: 1 1 100px; max-width: 100%; min-width: 0; }
  .rear-board-section > summary span { display: block; margin: 5px 0 0; }
  .rear-run-list thead { display: none; }
  .rear-run-list .table-scroll table, .rear-run-list tbody { display: block; width: 100%; min-width: 0; }
  .rear-run-list tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; padding: 9px; border-bottom: 1px solid #dce7e2; }
  .rear-run-list td { display: block; min-width: 0; padding: 3px; border: 0; }
  .rear-run-list td::before { display: block; margin-bottom: 3px; content: attr(data-label); color: #80938b; font-size: 9px; text-transform: uppercase; }
  .rear-run-list .rear-run-notes { max-width: none; }
}
.trace-modal-card { width: min(100%, 620px); }
.trace-steps { display: grid; max-height: min(58vh, 560px); overflow: auto; padding: 4px 2px; }
.trace-node, .trace-link { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; }
.trace-node { min-height: 54px; padding: 8px 10px; background: #f6faf7; border: 1px solid #e4eee7; border-radius: 8px; }
.trace-node-selected { background: #edf7fb; border-color: #7ab8ce; box-shadow: 0 0 0 2px rgba(55, 139, 167, .1); }
.trace-node-dot { width: 12px; height: 12px; justify-self: center; background: #fff; border: 3px solid #4d8e69; border-radius: 50%; }
.trace-node-selected .trace-node-dot { border-color: #087da0; }
.trace-node strong, .trace-node small, .trace-link strong, .trace-link small { display: block; }
.trace-node strong, .trace-link strong { color: #385246; font-size: 13px; }
.trace-node small, .trace-link small { margin-top: 3px; color: #7b8c82; font-size: 11px; }
.trace-link { min-height: 52px; }
.trace-link-line { width: 2px; height: 100%; min-height: 39px; justify-self: center; background: #52a5ba; }
.trace-link-rear .trace-link-line { background: #4c8491; }
.trace-link-faulty .trace-link-line { background: #d35e46; }
.trace-link-investigate .trace-link-line { background: #c98a12; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cable-details { display: grid; gap: 12px; margin: 14px 0 0; padding: 12px 14px 14px; border: 1px solid #e3ecef; border-radius: 9px; }
.cable-details legend { padding: 0 6px; color: #294f60; font-size: 13px; font-weight: 700; }
.cable-color-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.cable-color-choice { display: grid; width: 26px; height: 26px; background: var(--cable-color); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #cfdbdf; cursor: pointer; }
.cable-color-choice input { width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cable-color-choice:has(input:checked) { box-shadow: 0 0 0 2px #087da0; }
.cable-color-choice:has(input:focus-visible) { outline: 2px solid #087f9c; outline-offset: 2px; }
.check-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #405c68; font-size: 13px; font-weight: 600; }
.check-field .form-hint { margin: 0; font-weight: 400; }
.bulk-patch-preview { margin-top: 14px; padding: 10px 12px; color: #244758; background: #eef7f9; border: 1px solid #cfe3ea; border-radius: 7px; font-size: 13px; }
.bulk-patch-preview:empty { display: none; }
.bulk-patch-preview > span { display: block; margin-bottom: 4px; font-weight: 700; }
.bulk-patch-preview ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bulk-patch-preview small { color: #617b87; }
.bulk-patch-gap { color: #617b87; }
.bulk-patch-problem { margin: 6px 0 0; color: #a63d2f; }
.trace-cable-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1px solid rgba(0,0,0,.2); border-radius: 50%; vertical-align: -1px; }
.trace-node-unavailable .trace-node-dot { border-color: #c2412f; background: #fbe9e5; }
.trace-gap { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 46px; padding: 7px 10px; color: #8a5b35; background: #fff8ef; border: 1px dashed #e8c7a4; border-radius: 7px; }
.trace-gap > span { justify-self: center; color: #c17b3b; font-size: 18px; }
.trace-gap strong, .trace-gap small { display: block; }
.trace-gap strong { font-size: 12px; }
.trace-gap small { margin-top: 3px; color: #806d5c; font-size: 10px; line-height: 1.4; }
.media-badge { padding: 5px 7px; color: #7f8b83; background: #f6f8f6; border-radius: 5px; font-size: 7px; white-space: nowrap; }
.media-badge span { padding: 0 2px; color: #bbc5be; }
.disconnect-button { display: grid; width: 25px; height: 25px; place-items: center; color: #a4aea8; background: transparent; border: 0; border-radius: 5px; font-size: 15px; }
.disconnect-button:hover { color: #af5a51; background: #fbefed; }
.modal { width: min(680px, calc(100vw - 28px)); max-height: min(90vh, 850px); padding: 0; overflow: auto; background: transparent; border: 0; }
#equipment-dialog { width: min(1240px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(22, 39, 34, .43); backdrop-filter: blur(3px); }
.modal-card { padding: 24px; background: white; border: 1px solid #e7ede9; border-radius: 13px; box-shadow: 0 20px 70px rgba(15,37,27,.2); }
.modal-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-kicker { color: #6f9b83; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.modal-heading h2 { margin-top: 5px; color: #2f4037; font-family: "Segoe UI", Arial, sans-serif; font-size: 19px; letter-spacing: -.5px; }
.modal-heading p { margin-top: 5px; color: #96a19a; font-size: 9px; }
.close-button { width: 29px; height: 29px; color: #829087; background: #f4f7f5; border: 0; border-radius: 7px; font-size: 19px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.equipment-form-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, .85fr); align-items: start; gap: 16px; }
.equipment-form-primary, .equipment-form-secondary { display: grid; min-width: 0; gap: 13px; }
.equipment-form-secondary { padding: 16px; background: #f7faf9; border: 1px solid #e9efec; border-radius: 10px; }
.equipment-form-section-heading { margin-bottom: 1px; }
.equipment-form-section-heading h3 { margin: 0; color: #294f60; font-size: 13px; }
.equipment-form-section-heading p { margin: 4px 0 0; color: #617b87; font-size: 12px; font-weight: 400; }
.equipment-port-configuration { display: grid; gap: 12px; margin-top: 3px; padding: 15px; background: #f4f8f7; border: 1px solid #e5eeeb; border-radius: 9px; }
.equipment-template-adaptive-display { display: grid; gap: 10px; padding: 13px 15px; background: #f4f8f7; border: 1px solid #e5eeeb; border-radius: 9px; }
.equipment-display-line-count { max-width: 180px; }
.equipment-template-adaptive-display-lines { display: grid; gap: 7px; }
.equipment-template-adaptive-display-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; gap: 9px; padding: 9px; background: #fff; border: 1px solid #e7eeeb; border-radius: 7px; }
.equipment-template-adaptive-display-line .field { font-size: 8px; }
.equipment-template-adaptive-display-line input, .equipment-template-adaptive-display-line select { min-height: 32px; padding: 6px 8px; font-size: 8px; }
.equipment-port-field-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.equipment-port-field-row-has-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.equipment-form-notes { grid-column: 1 / -1; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #66746b; font-size: 9px; font-weight: 600; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 36px; padding: 8px 10px; color: #435148; background: #fff; border: 1px solid #e2e9e4; border-radius: 6px; outline: none; font-size: 9px; font-weight: 400; }
.field textarea { min-height: 57px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #49b4c5; box-shadow: 0 0 0 3px rgba(8,133,168,.13); }
.field input::placeholder, .field textarea::placeholder { color: #b0b9b3; }
.optional-label { margin-left: 4px; color: #aeb8b1; font-size: 7px; font-weight: 500; letter-spacing: .4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.module-header strong, .module-header span { display: block; }
.module-header strong { color: #58675d; font-size: 9px; }
.module-header span { margin-top: 4px; color: #9ba69f; font-size: 8px; font-weight: 400; }
.module-row { display: grid; gap: 8px; margin-top: 8px; padding: 10px; background: #f7faf8; border: 1px solid #edf1ee; border-radius: 7px; }
.module-row-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24px; align-items: end; gap: 7px; }
.module-port-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; color: #58675d; font-size: 8px; }
.module-port-groups { display: grid; gap: 7px; }
.module-port-group-row { display: grid; grid-template-columns: minmax(100px, 1.2fr) minmax(55px, .55fr) minmax(58px, .6fr) minmax(90px, .9fr) minmax(80px, .8fr) 24px; align-items: end; gap: 7px; padding: 8px; background: white; border: 1px solid #e7eeeb; border-radius: 6px; }
.module-field { gap: 5px; font-size: 7px; }
.module-field input, .module-field select { box-sizing: border-box; min-width: 0; min-height: 32px; padding: 6px 7px; font-size: 8px; }
.module-remove { width: 24px; height: 31px; color: #a47770; background: #fbf0ee; border: 0; border-radius: 5px; font-size: 15px; }
.module-remove:hover { color: #a8483d; background: #f8e4e1; }
.module-remove:disabled { cursor: not-allowed; opacity: .4; }
.hidden { display: none !important; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 14px; border-top: 1px solid #edf1ee; }
#connection-dialog { width: min(460px, calc(100vw - 28px)); }
#connection-dialog .modal-card > .field { margin-top: 12px; }
.cable-divider { display: flex; align-items: center; gap: 10px; width: 45px; margin: 8px auto; color: #70a68a; }
.cable-divider span { width: 12px; height: 1px; background: #c7dccf; }
.cable-divider i { font-size: 17px; font-style: normal; }
.form-hint { margin-top: 10px; color: #9aa69e; font-size: 8px; }
.toast-region { position: fixed; z-index: 10; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { display: flex; max-width: min(380px, calc(100vw - 32px)); align-items: center; gap: 9px; padding: 11px 14px; color: #476456; background: white; border: 1px solid #dfebe2; border-radius: 8px; box-shadow: 0 7px 25px rgba(34,61,46,.15); font-size: 9px; animation: toast-in .18s ease-out; }
.toast-error { color: #8b504b; background: #fff9f8; border-color: #f0d8d4; }
.toast-mark { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; color: white; background: #5da77d; border-radius: 50%; font-size: 9px; font-weight: 700; }
.toast-error .toast-mark { background: #c47168; }
.toast-dismiss { margin-left: auto; padding: 0 4px; color: inherit; background: transparent; border: 0; border-radius: 4px; font-size: 18px; line-height: 1; }
.toast-dismiss:hover { background: rgba(139,80,75,.1); }
.confirm-dialog { width: min(460px, calc(100vw - 28px)); }
.confirm-dialog .modal-heading { margin-bottom: 4px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1500px) {
  .content { padding-right: 58px; padding-left: 58px; }
}

@media (max-width: 1140px) {
  .topbar { padding-right: 30px; padding-left: 30px; }
  .content { padding: 33px 30px 45px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding-right: 13px; padding-left: 13px; }
  .dashboard-grid { grid-template-columns: 1.08fr .92fr; gap: 11px; }
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { height: 53px; padding: 0 15px; }
  .topbar-right { gap: 5px; }
  .global-search { width: min(23vw, 100px); flex: 0 0 auto; }
  .global-search input { min-height: 31px; padding: 5px 7px; font-size: 11px; }
  .site-picker-label { display: none; }
  .topbar-right select { width: 48px; min-width: 0; padding: 4px 12px 4px 4px; font-size: 9px; }
  .user-menu-trigger { max-width: 105px; gap: 4px; padding: 6px 4px; font-size: 10px; }
  .user-menu-panel button { padding: 10px; font-size: 12px; }
  .content { padding: 27px 15px 38px; }
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 19px; }
  .page-heading .button { min-height: 38px; gap: 5px; padding: 0 10px; font-size: 0.75rem; white-space: nowrap; }
  .page-heading h1 { font-size: 23px; }
  .page-description { max-width: 290px; font-size: 0.8125rem; line-height: 1.5; }
  .eyebrow { font-size: 0.6875rem; }
  .stats-grid { gap: 8px; margin-bottom: 11px; }
  .stat-card { min-height: 105px; padding: 12px; }
  .stat-label { font-size: 0.75rem; }
  .stat-icon { width: 25px; height: 25px; font-size: 13px; }
  .stat-value { font-size: 22px; }
  .stat-note { font-size: 0.6875rem; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .equipment-panel { grid-column: auto; }
  .overview-panel, .activity-panel, .equipment-panel { padding: 15px; }
  .equipment-breakdown { gap: 3px 10px; }
  .equipment-grid { grid-template-columns: 1fr; gap: 9px; }
  .inventory-toolbar { flex-wrap: wrap; gap: 7px; }
  .search-box { width: 100%; }
  .inventory-toolbar select { flex: 1; }
  .result-count { margin-left: auto; }
  .connection-summary { gap: 6px; }
  .connection-summary-card { min-height: 66px; gap: 7px; padding: 9px; }
  .connection-summary-card .summary-icon { width: 27px; height: 27px; font-size: 12px; }
  .connection-summary-card strong { font-size: 15px; }
  .connection-summary-card small { font-size: 0.6875rem; }
  .connection-panel { padding: 14px 12px 3px; }
  .patch-toolbar { align-items: stretch; flex-wrap: wrap; }
  .patch-tabs { flex: 1; }
  .patch-tab { flex: 1; padding: 0 7px; font-size: 12px; }
  .patch-toolbar > .button { min-height: 36px; }
  .patch-help { margin-top: 0; }
  .patch-board { grid-template-columns: 1fr; }
  .patch-device-card { min-width: 0; }
  .patch-device-groups { padding: 10px; }
  .patch-port-grid { gap: 4px; }
  .board-port-connect { gap: 6px; padding-left: 6px; }
  .board-port-state { font-size: 12px; }
  .board-port-settings { width: 27px; flex-basis: 27px; }
  .patch-board-legend { gap: 8px 11px; }
  .vlan-create-form { grid-template-columns: .7fr 1.2fr .65fr; }
  .vlan-create-form .button { grid-column: auto; }
  .vlan-create-form #cancel-vlan-edit { grid-column: 3; }
  .vlan-checkbox-list { grid-template-columns: 1fr; }
  .connection-line-cell, .connection-line-cell + td { display: none; }
  .endpoint-cell { min-width: 120px; }
  th, td { padding-right: 5px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .field-wide { grid-column: auto; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row .field:last-child { grid-column: 1 / -1; }
  .equipment-port-field-row, .equipment-port-field-row-has-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-template-adaptive-display-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .module-port-group-row { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, .7fr) 24px; }
  .module-port-group-row .module-field:nth-child(4) { grid-column: 1 / 3; }
  .module-port-group-row .module-field:nth-child(5) { grid-column: 3 / 4; }
  .module-port-group-remove { grid-column: 4; grid-row: 1; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-card { padding: 18px; }
}

.workspace-label,
.online-status strong,
.online-status small,
.sidebar-footer,
.breadcrumbs,
.eyebrow,
.page-description,
.button,
.stat-label,
.stat-note,
.panel-heading p,
.breakdown-label,
.breakdown-item strong,
.utilization-header strong,
.utilization-header > span,
.progress-legend,
.activity-copy strong,
.activity-copy small,
.activity-status,
.text-button,
.recent-device strong,
.recent-device small,
.recent-port-count,
.search-box input,
.inventory-toolbar select,
.result-count,
.type-pill,
.connection-count,
.device-location,
.module-badges span,
.device-notes,
.empty-state strong,
.empty-state p,
.connection-summary-card small,
.table-count,
th,
td,
.endpoint-cell strong,
.endpoint-cell small,
.media-badge,
.modal-kicker,
.modal-heading p,
.field,
.field input,
.field select,
.field textarea,
.optional-label,
.module-header strong,
.module-header span,
.module-field,
.module-field input,
.module-field select,
.form-hint,
.toast {
  font-size: clamp(12px, 0.18vw + 11px, 14px);
}

.workspace-label,
.modal-kicker,
.optional-label,
th,
.section-label {
  font-size: clamp(11px, 0.15vw + 10px, 12px);
}

.nav-count,
.table-count,
.activity-status {
  white-space: nowrap;
}

.section-label { letter-spacing: .7px; }
.empty-state p,
.page-description { line-height: 1.55; }
.page-heading { flex-wrap: wrap; }
.equipment-breakdown { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Keep the primary pages compact: title first, description directly beneath. */
#page-overview .page-heading .eyebrow,
#page-equipment .page-heading .eyebrow,
#page-connections .page-heading .eyebrow,
#page-infrastructure .page-heading .eyebrow { display: none; }
#page-overview .page-heading,
#page-equipment .page-heading,
#page-connections .page-heading,
#page-infrastructure .page-heading { margin-bottom: 19px; }
#page-overview .page-heading h1,
#page-equipment .page-heading h1,
#page-connections .page-heading h1,
#page-infrastructure .page-heading h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-overview .page-description,
#page-equipment .page-description,
#page-connections .page-description,
#page-infrastructure .page-description { margin-top: 3px; }

@media (max-width: 640px) {
  .equipment-form-layout { grid-template-columns: minmax(0, 1fr); }
  .equipment-form-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-form-secondary .equipment-form-section-heading { grid-column: 1 / -1; }
  .equipment-form-notes { grid-column: auto; }
  .page-heading { flex-wrap: nowrap; }
  .page-heading .button { font-size: 12px; }
  .stat-note { font-size: 11px; }
  .connection-summary-card small { font-size: 11px; }
  .equipment-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-port-group-row { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) 24px; }
  .module-port-group-row .module-field:nth-child(3) { grid-column: 1 / 2; }
  .module-port-group-row .module-field:nth-child(4) { grid-column: 2 / 3; }
  .module-port-group-row .module-field:nth-child(5) { grid-column: 1 / 3; }
  .module-port-group-remove { grid-column: 3; grid-row: 1; }
  .modal-card { padding: 16px; }
}

@media (max-width: 900px) {
  .equipment-form-layout { grid-template-columns: minmax(0, 1fr); }
  .equipment-form-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equipment-form-secondary .equipment-form-section-heading { grid-column: 1 / -1; }
}

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

.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 0%, #d5edf2, transparent 54%), #f2f7f9; }
.auth-card { width: min(430px, 100%); padding: 34px; background: #fff; border: 1px solid #dce8ed; border-radius: 14px; box-shadow: 0 20px 60px rgba(6,44,67,.12); }
.auth-logo { display: block; width: 215px; height: auto; margin: 0 auto 25px; padding: 7px; background: #062c43; border-radius: 10px; }
.auth-card h1 { text-align: center; font-size: 25px; letter-spacing: -.5px; }
.auth-card > p { margin: 7px 0 22px; color: #718a97; text-align: center; font-size: 14px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .field { gap: 7px; font-size: 13px; }
.auth-card .field input { min-height: 42px; font-size: 14px; }
.auth-card .button { width: 100%; min-height: 44px; margin-top: 3px; font-size: 14px; }
.auth-card .form-hint { margin: -8px 0 0; font-size: 12px; }
.setup-note { margin: 0 0 2px; color: #587482; font-size: 13px; line-height: 1.5; }
.auth-error { min-height: 18px; margin: 14px 0 0 !important; color: #a7433a !important; text-align: left !important; font-size: 13px !important; }
.site-required { width: min(640px, calc(100% - 32px)); margin: 10vh auto; padding: 30px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.site-required h1 { font-size: 23px; }
.site-required p { margin: 10px 0 20px; color: var(--ink-soft); line-height: 1.6; }
.activity-item-button { width: 100%; color: inherit; background: transparent; border: 0; text-align: left; }
.activity-item-button:hover { background: #f5fafb; border-radius: 7px; }
.activity-item { align-items: flex-start; padding: 11px 6px; }
.activity-copy { flex: 1; }
.activity-copy strong { color: #24495c; font-size: 13px; }
.activity-copy small { overflow: hidden; color: #688493; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; }
.activity-copy .activity-detail { color: #235d70; white-space: normal; }
.activity-icon { color: #087da0; background: #e4f4f7; }
.activity-status { color: #087da0; background: #e4f4f7; }
.table-action { margin-right: 8px; padding: 6px 7px; color: #087da0; background: #edf7f9; border: 0; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.table-action:hover { color: #064d68; background: #dff1f5; }
.danger-action { color: #aa5149; background: #fbefed; }
.last-change { color: #587484; font-size: 12px; white-space: nowrap; }
#connection-detail-dialog { width: min(720px, calc(100vw - 28px)); }
.detail-section { margin-top: 22px; padding-top: 17px; border-top: 1px solid #e6eef1; }
.detail-section h3 { margin-bottom: 11px; color: #214458; font-size: 15px; }
.connection-comments, .connection-history { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.comment-entry, .history-entry { padding: 11px 13px; background: #f5f9fa; border: 1px solid #e5eef1; border-radius: 7px; }
.comment-entry p, .history-entry p { color: #274b5d; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.comment-entry small, .history-entry small { display: block; margin-top: 6px; color: #6c8794; font-size: 11px; }
.history-entry strong { color: #087da0; font-size: 13px; }
.no-comments { padding: 8px 0; color: #6e8793; font-size: 13px; }
.comment-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-top: 13px; }
.comment-form .field textarea { min-height: 70px; font-size: 13px; }
.comment-form .button { min-height: 39px; }

@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .topbar-right { gap: 5px; }
  .breadcrumbs { display: none; }
  .site-picker-label { display: none; }
  .topbar-right select { max-width: 105px; }
  .user-menu-trigger { max-width: 80px; }
  .auth-card { padding: 26px 22px; }
  .comment-form{ grid-template-columns: 1fr; }
  .table-scroll table { min-width: 930px; }
  .connection-line-cell, .connection-line-cell + td { display: table-cell; }
}

.rack-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding: 16px 18px; }
.rack-toolbar .field { width: min(420px, 100%); margin: 0; }
.rack-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rack-empty-state { padding: 35px 20px; }
.content.content-rack-focus { width: 100%; max-width: none; margin: 0; padding: 10px 16px 12px; }
.rack-room-filter { position: relative; z-index: 8; }
.rack-room-filter > summary { display: flex; min-height: 30px; align-items: center; gap: 12px; padding: 0 10px; color: #315d70; background: #f7fafb; border: 1px solid #d6e4e9; border-radius: 6px; font-size: 12px; font-weight: 700; list-style: none; cursor: pointer; }
.rack-room-filter > summary::-webkit-details-marker { display: none; }
.rack-room-filter > summary::after { color: #708a95; content: "▾"; font-size: 11px; }
.rack-room-filter[open] > summary::after { content: "▴"; }
.rack-room-filter-panel { position: absolute; top: calc(100% + 6px); right: 0; width: min(260px, calc(100vw - 28px)); max-height: min(330px, 65vh); padding: 10px; overflow: auto; background: #fff; border: 1px solid #d9e5e9; border-radius: 9px; box-shadow: 0 12px 30px rgba(30,63,76,.2); }
.rack-room-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #315365; font-size: 11px; }
.rack-room-filter-heading .text-button { padding: 2px 5px; font-size: 10px; }
.rack-room-filter fieldset { display: grid; gap: 2px; margin: 7px 0; padding: 0; border: 0; }
.rack-room-option { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 6px; color: #3a5d6c; border-radius: 5px; font-size: 11px; cursor: pointer; }
.rack-room-option:hover { background: #f1f7f9; }
.rack-room-option input { width: 14px; height: 14px; margin: 0; accent-color: #0785a8; }
.rack-room-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-room-filter-panel > p { margin: 0; color: #758b94; font-size: 9px; }
.rack-inventory-panel, .rack-face-panel { min-width: 0; padding: 8px; }
.rack-available-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: min(30vh, 290px); margin-top: 7px; overflow: auto; }
.rack-available-list > .empty-state { min-height: 80px; padding: 12px 8px; }
.rack-available-list > .empty-state .empty-state-icon { width: 27px; height: 27px; margin-bottom: 5px; font-size: 14px; }
.rack-available-list > .empty-state p { font-size: 10px; }
.rack-available-item { display: flex; min-width: 0; align-items: center; gap: 7px; padding: 6px 7px; background: #f7fafb; border: 1px solid #e2ecef; border-radius: 7px; cursor: grab; }
.rack-available-item:active { cursor: grabbing; }
.rack-available-copy, .rack-available-copy strong, .rack-available-copy small { display: block; min-width: 0; }
.rack-available-copy { flex: 1; overflow: hidden; }
.rack-available-copy strong { overflow: hidden; color: #23485b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rack-available-copy small { margin-top: 2px; overflow: hidden; color: #708995; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rack-available-item .button { flex: 0 0 auto; }
.rack-face { position: relative; isolation: isolate; display: flex; min-width: 0; align-items: stretch; gap: 10px; overflow-x: auto; padding: 2px 2px 7px; }
.rack-overhead-cable-tray { position: absolute; top: 3px; left: 7px; z-index: 2; height: 14px; border: 1px solid #849da5; border-radius: 4px; background: repeating-linear-gradient(90deg,#c4d1d5 0 5px,#e5ecee 5px 9px,#aebfc4 9px 10px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.38), 0 1px 3px rgba(27,57,68,.16); pointer-events: none; }

/* The frame's side padding is where the cable router draws the vertical managers; keep its box size. */
.rack-face-frame { width: min(100%, 420px); min-width: 350px; margin: 0 auto; padding: 8px 10px; background: transparent; border: 1px solid transparent; border-radius: 8px; }
.rack-cable-overlay { position: absolute; inset: 0 auto auto 0; z-index: 5; overflow: visible; pointer-events: none; }
.rack-cable path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rack-cable-shadow { stroke: rgba(28, 45, 52, .35); stroke-width: 4px; }
/* No per-cable filters or transitions: hovering a port restyles cables, and large racks hold thousands. */
.rack-cable-jacket { stroke-width: 2.5px; }
.rack-cable-highlight { stroke: rgba(255, 255, 255, .55); stroke-width: .7px; transform: translateY(-.5px); }
.rack-cables-tracing .rack-cable { opacity: .13; }
.rack-cables-tracing .rack-cable-highlighted { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .95)) drop-shadow(0 0 5px currentColor); }
.rack-face-column { position: relative; width: var(--rack-width, 420px); }
.rack-face-column .rack-face-frame { width: 420px; min-width: 0; zoom: var(--rack-scale, 1); }
.rack-column-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.rack-secondary-actions { display: none; }
.rack-column-footer { display: flex; justify-content: flex-end; margin-top: 7px; }
.rack-face-label { display: flex; min-width: 0; min-height: 22px; align-items: center; justify-content: space-between; gap: 5px; margin: 0 0 5px; color: var(--rack-header-ink); font-size: 8px; font-weight: 700; }
.rack-face-info { display: flex; flex: 1 1 auto; min-width: 0; align-items: baseline; gap: 7px; }
.rack-face-info strong, .rack-face-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-face-info strong { flex: 0 1 auto; max-width: 180px; color: var(--rack-header-ink); font-size: max(11px, calc(13px / var(--rack-scale, 1))); }
.rack-face-info small { flex: 0 0 auto; color: var(--muted); font-size: max(8px, calc(10px / var(--rack-scale, 1))); font-weight: 600; }
/* Rack actions stay out of the way until the rack is hovered or focused; touch screens always show them. */
.rack-column-actions { opacity: 0; transition: opacity .12s ease; }
.rack-face-column:hover .rack-column-actions, .rack-face-column:focus-within .rack-column-actions { opacity: 1; }
@media (hover: none) { .rack-column-actions { opacity: 1; } }
.rack-order-controls { display: inline-flex; gap: 2px; }
.rack-order-controls button, .rack-face-label .rack-drag-handle { min-width: 20px; min-height: 20px; padding: 0 3px; color: #466777; background: transparent; border: 1px solid transparent; border-radius: 4px; font-size: 10px; line-height: 1; cursor: pointer; }
.rack-order-controls button:hover:not(:disabled), .rack-face-label .rack-drag-handle:hover { background: #eef4f6; border-color: #dce7ec; }
.rack-order-controls button:disabled { opacity: .35; cursor: default; }
.rack-face-label .rack-drag-handle { flex: 0 0 auto; margin-right: -3px; color: #8aa0a9; cursor: grab; }
.rack-grid { position: relative; display: grid; grid-template-columns: 22px minmax(230px, 1fr); align-content: start; align-items: stretch; gap: 2px 3px; min-height: calc(var(--rack-units) * var(--rack-unit-height, 32px)); padding: 6px 8px 6px 6px;
  /* Left rail carries the U numbers; the right rail is the grid's padding. */
  background: linear-gradient(90deg, var(--rack-rail) 0 28px, var(--rack-rail-edge) 28px 29px, var(--rack-interior) 29px calc(100% - 9px), var(--rack-rail-edge) calc(100% - 9px) calc(100% - 8px), var(--rack-rail) calc(100% - 8px));
  border: 2px solid var(--rack-enclosure); border-radius: 3px; box-shadow: 0 1px 2px rgba(20, 45, 56, .12); }
.rack-u-mark { position: relative; z-index: 2; display: grid; justify-items: start; align-items: center; min-height: 24px; padding-left: 0; color: var(--rack-u-ink); background: transparent; border: 0; border-radius: 0; font-size: 8px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.rack-u-mark::after { position: absolute; left: 25px; right: 0; bottom: -1px; content: ""; border-bottom: 1px solid rgba(99, 127, 137, .13); }
.rack-u-mark.rack-u-major { color: var(--rack-u-major-ink); font-weight: 700; }
.rack-u-mark i { position: relative; z-index: 1; display: block; width: 20px; color: inherit; font-style: normal; text-align: right; }
.rack-u-mark.rack-u-drop-target i { color: #fff; background: #0785a8; border-radius: 3px; box-shadow: 0 0 0 2px rgba(7, 133, 168, .22); transform: scale(1.06); }
.rack-grid-item { position: relative; z-index: 3; grid-column: 2; min-width: 0; border-radius: 5px; }
.rack-name-bubble { position: absolute; z-index: 6; top: 50%; left: 3px; display: none; max-width: 48%; padding: 2px 8px; overflow: hidden; color: #fff; background: rgba(13, 43, 56, .9); border-radius: 999px; box-shadow: 0 1px 4px rgba(13, 43, 56, .35); font-size: 9px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); pointer-events: none; }
.rack-show-names .rack-name-bubble { display: block; }
.rack-drop-hint { display: none; position: absolute; top: 10px; left: 65px; z-index: 4; padding: 4px 8px; color: #087da0; background: rgba(255,255,255,.94); border: 1px solid #c5e4eb; border-radius: 5px; font-size: 10px; pointer-events: none; }
.rack-grid.drag-active { --rack-interior: #e5f4f7; border-color: #168aa8; }
.rack-grid.drag-active .rack-drop-hint { display: block; }
.rack-equipment-item { display: block; min-height: 28px; padding: 2px 4px; overflow: hidden; background: #fff; border: 1px solid #a9c3cf; box-shadow: 0 1px 3px rgba(21, 58, 75, .07); cursor: grab; }
.rack-equipment-item:active { cursor: grabbing; }
/* Mounted equipment reads as hardware standing proud of the rails. */
.rack-grid > .rack-equipment-item { border-color: #93a8b0; box-shadow: 0 1px 2px rgba(20, 45, 56, .2); }
.rack-equipment-item:focus-visible { outline: 3px solid #168aa8; outline-offset: 2px; z-index: 5; }
.rack-equipment-front { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 100%; gap: 2px; }
.rack-equipment-copy { display: block; flex: 1; min-width: 0; overflow: hidden; }
.rack-equipment-copy strong, .rack-equipment-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rack-equipment-copy strong { color: #1c455a; font-size: 9px; }
.rack-equipment-copy small { margin-top: 0; color: #6b8592; font-size: 7px; }
/* Whole-frame zoom preserves equipment geometry and port targets. */
.rack-room-group { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; margin-top: 22px; padding: 4px 7px 7px; border: 0; border-radius: 8px; background: transparent; }
.rack-room-heading { display: flex; align-items: baseline; gap: 8px; padding: 0 3px 4px; color: var(--ink-soft); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .02em; }
.rack-room-heading span { color: var(--muted); font-size: 10px; }
.rack-room-racks { display: flex; flex: 1; align-items: flex-end; gap: 8px; }
.rack-room-member { flex: 0 0 var(--rack-width, 420px); width: var(--rack-width, 420px); min-width: 0; }
.rack-scale-controls button[aria-pressed="true"] { border-color: #0785a8; background: #e7f4f8; }
.rack-scale-controls { flex-wrap: wrap; }
/* Rack equipment face and port rules live in rack-equipment.css. */

@media (max-width: 960px) {
  .rack-available-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 360px; }
}

@media (max-width: 640px) {
  .content.content-rack-focus { padding: 7px; }
  .rack-available-list { grid-template-columns: minmax(0, 1fr); }
  .rack-available-list { max-height: min(34vh, 290px); }
  .rack-face-panel { padding: 7px; }
  .rack-face-column .rack-face-frame { min-width: 0; }
  .rack-grid { grid-template-columns: 24px minmax(225px,1fr); gap: 2px 4px; padding: 5px; }
}

/* Focused usability improvements for connection discovery and rack readability. */
.status-dot[data-state="online"] { background: #42d6cf; box-shadow: 0 0 0 3px rgba(66,214,207,.12); }
.status-dot[data-state="offline"] { background: #ef8a78; box-shadow: 0 0 0 3px rgba(239,138,120,.16); }
.status-dot[data-state="checking"], .status-dot[data-state="busy"] { background: #e8be5c; box-shadow: 0 0 0 3px rgba(232,190,92,.14); }
.activity-item { min-width: 0; padding: 8px 4px; }
.activity-copy { display: grid; min-width: 0; grid-template-columns: minmax(90px, .75fr) minmax(0, 2fr) minmax(100px, 1fr); align-items: center; gap: 10px; }
.activity-copy strong, .activity-copy .activity-detail, .activity-copy small { display: block; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy strong { color: #24495c; font-size: 12px; }
.activity-copy .activity-detail { color: #587381; font-size: 11px; }
.activity-copy small { color: #82949b; font-size: 10px; text-align: right; }
.activity-item-button { min-height: 44px; }

.patch-toolbar-options, .patch-board-filters { display: flex; min-width: 0; align-items: center; gap: 8px; }
.patch-filter { display: flex; align-items: center; gap: 5px; color: #607b87; font-size: 12px; white-space: nowrap; }
.patch-filter select, .patch-board-search input { min-height: 34px; padding: 4px 8px; color: #3e6474; background: white; border: 1px solid #dce8ed; border-radius: 6px; font-size: 12px; }
.patch-board-search input { width: 145px; }
.connection-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 13px; }
.connection-list-toolbar .search-box { width: min(310px, 100%); height: 34px; }
.connection-list-toolbar .search-box > span { font-size: 10px; transform: none; }
.connection-list-toolbar select { min-height: 34px; padding: 4px 26px 4px 9px; color: #526c78; background: white; border: 1px solid #dce8ed; border-radius: 6px; font-size: 11px; }
.connection-list-toolbar .result-count { margin-left: auto; }
.connection-list-link { display: inline-flex; align-items: center; gap: 7px; color: #416a79; font-size: 11px; font-weight: 600; white-space: nowrap; }
.connection-list-link i { width: 9px; height: 9px; border-radius: 50%; background: var(--cable-color, #808080); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cable-color, #808080) 15%, white); }
.connection-list-note { display: block; max-width: 160px; margin-top: 4px; overflow: hidden; color: #80939a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.connection-panel .endpoint-cell { min-width: 160px; }
.connection-panel .endpoint-cell strong { color: #355a6a; font-size: 12px; }
.connection-panel .endpoint-cell small { color: #718995; font-size: 10px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.peer-device-preview { position: fixed; z-index: 12; display: none; width: min(300px, calc(100vw - 20px)); padding: 12px; color: #25495b; background: rgba(255,255,255,.97); border: 1px solid #b8d0d8; border-radius: 10px; box-shadow: 0 14px 34px rgba(16,54,70,.24); pointer-events: none; backdrop-filter: blur(8px); }
.peer-device-preview-visible { display: block; }
.peer-device-preview-pinned { z-index: 30; right: 16px; bottom: 16px; left: auto !important; top: auto !important; width: min(340px, calc(100vw - 32px)); max-height: min(60vh, 440px); overflow-y: auto; padding: 14px; pointer-events: auto; }
.peer-preview-header { display: flex; min-height: 14px; align-items: flex-start; justify-content: space-between; gap: 12px; padding-right: 20px; }
.peer-preview-header .peer-preview-kicker { margin-bottom: 8px; }
.peer-preview-close { position: absolute; top: 7px; right: 8px; display: grid; width: 25px; height: 25px; place-items: center; padding: 0; color: #607d88; background: #f1f6f7; border: 1px solid #d8e5e8; border-radius: 6px; font-size: 17px; line-height: 1; cursor: pointer; }
.peer-preview-close:hover { color: #1f566b; background: #e6f1f3; }
.peer-preview-kicker { margin-bottom: 8px; color: #69838e; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.peer-preview-main { display: flex; min-width: 0; align-items: center; gap: 11px; }
.peer-preview-hardware { display: flex; width: 98px; height: 53px; flex: 0 0 98px; align-items: center; gap: 5px; padding: 6px; background: linear-gradient(180deg,#e5eef1,#c9d8dd); border: 1px solid #8ca7b0; border-radius: 5px; box-shadow: inset 0 1px rgba(255,255,255,.85), 0 3px 6px rgba(35,74,89,.15); }
.peer-preview-hardware .equipment-icon { width: 25px; height: 25px; flex: 0 0 25px; font-size: 12px; }
.peer-preview-face { display: grid; min-width: 0; flex: 1; gap: 4px; }
.peer-preview-vents { height: 5px; background: repeating-linear-gradient(90deg,#718c96 0 2px,transparent 2px 4px); }
.peer-preview-sockets { display: grid; grid-template-columns: repeat(8, 5px); gap: 2px; }
.peer-preview-sockets i { width: 5px; height: 5px; background: #e8f0f2; border: 1px solid #8da7af; border-radius: 1px; }
.peer-preview-sockets .peer-preview-socket-active { background: #0785a8; border-color: #056884; box-shadow: 0 0 0 2px rgba(7,133,168,.18); }
.peer-preview-copy { display: grid; min-width: 0; gap: 4px; }
.peer-preview-copy strong, .peer-preview-copy small, .peer-preview-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peer-preview-copy strong { color: #21485b; font-size: 13px; }
.peer-preview-copy small { color: #718b96; font-size: 10px; }
.peer-preview-copy > span { color: #52727e; font-size: 10px; }
.peer-preview-endpoints { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); gap: 5px; align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7eff1; }
.peer-preview-endpoints > div { display: grid; min-width: 0; gap: 3px; }
.peer-preview-endpoints > div:last-child { text-align: right; }
.peer-preview-endpoints small { color: #8398a0; font-size: 8px; font-weight: 700; letter-spacing: .5px; }
.peer-preview-endpoints strong { overflow-wrap: anywhere; color: #355b69; font-size: 9px; line-height: 1.3; }
.peer-preview-endpoints > span { color: #62a6b6; text-align: center; }
.peer-preview-details { display: grid; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7eff1; }
.peer-preview-details > span { display: grid; min-width: 0; gap: 3px; }
.peer-preview-details small { color: #8398a0; font-size: 8px; font-weight: 700; letter-spacing: .5px; }
.peer-preview-details strong { display: flex; min-width: 0; align-items: center; gap: 6px; overflow-wrap: anywhere; color: #355b69; font-size: 10px; font-weight: 600; line-height: 1.35; }
.peer-preview-details strong i { width: 8px; height: 8px; flex: 0 0 8px; background: var(--cable-color); border: 1px solid rgba(35,68,78,.24); border-radius: 50%; }
.peer-preview-details .peer-preview-notes strong { font-weight: 400; }
.peer-preview-disconnect { width: 100%; min-height: 34px; margin-top: 10px; padding: 0 10px; color: #a63636; background: #fff7f7; border: 1px solid #ebcccc; border-radius: 6px; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.peer-preview-disconnect:hover, .peer-preview-disconnect:focus-visible { color: #862626; background: #fff0f0; outline: 2px solid rgba(166,54,54,.14); }

.port-manager-card { box-sizing: border-box; width: min(940px, 100%); max-width: 100%; max-height: calc(100dvh - 28px); overflow: auto; }
#port-manager-dialog { box-sizing: border-box; width: min(980px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow-x: hidden; }
.port-bulk-naming { display: grid; grid-template-columns: minmax(180px, 1fr) 120px auto; align-items: end; gap: 8px; margin-bottom: 14px; }
.port-manager-table-wrap { max-height: min(55vh, 520px); overflow-y: auto; overflow-x: hidden; border: 1px solid #e2e9e5; border-radius: 7px; }
.port-manager-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.port-manager-table th, .port-manager-table td { padding: 6px; border-bottom: 1px solid #edf1ee; text-align: left; }
.port-manager-table thead { position: sticky; top: 0; z-index: 1; background: #f5f8f6; }
.port-manager-table tbody th { width: 42px; color: #718078; font-variant-numeric: tabular-nums; }
.port-manager-table input, .port-manager-table select { width: 100%; min-width: 105px; padding: 6px; color: #33463b; background: #fff; border: 1px solid #dbe4de; border-radius: 5px; font: inherit; }
.port-manager-table input:focus, .port-manager-table select:focus { outline: 2px solid rgba(22,138,168,.2); border-color: #168aa8; }
.port-manager-card > .form-hint { margin-top: 10px; }

@media (max-width: 640px) {
  .port-manager-card { padding: 14px; }
  .port-manager-card .modal-heading { gap: 8px; }
  .port-manager-card .modal-heading h2 { overflow-wrap: anywhere; }
  .port-bulk-naming { grid-template-columns: minmax(0, 1fr) 76px; }
  .port-bulk-naming .button { grid-column: 1 / -1; }
  .port-manager-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
  .port-manager-table, .port-manager-table tbody { display: block; width: 100%; }
  .port-manager-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; padding: 7px 9px; border-bottom: 1px solid #edf1ee; }
  .port-manager-table tbody th { grid-column: 1 / -1; width: auto; padding: 4px 0 7px; border: 0; }
  .port-manager-table tbody th::before { content: "Port "; }
  .port-manager-table td { display: block; min-width: 0; padding: 5px 0; border: 0; }
  .port-manager-table td:first-of-type { grid-column: 1 / -1; }
  .port-manager-table td::before { display: block; margin-bottom: 4px; color: #718078; content: attr(data-label); font-size: 10px; font-weight: 600; }
  .port-manager-table input, .port-manager-table select { box-sizing: border-box; min-width: 0; font-size: 11px; }
}

.rack-scale-controls { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; background: #f4f8f9; border: 1px solid #e0e9ec; border-radius: 7px; }
.rack-scale-controls .button { min-width: 30px; min-height: 28px; padding: 3px 7px; font-size: 11px; }
.rack-scale-controls span { min-width: 62px; color: #607984; font-size: 12px; text-align: center; white-space: nowrap; }
/* Rack equipment compact and print overrides live in rack-equipment.css. */

@page { size: A4 landscape; margin: 10mm; }
#print-sheet { display: none; }
@media print {
  body.printing-sheet > :not(#print-sheet) { display: none !important; }
  body.printing-sheet #print-sheet { display: block; color: #1d3340; font-size: 11pt; }
  .print-sheet-header { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #9fb3bc; }
  .print-sheet-header h1 { margin: 0; font-size: 16pt; }
  .print-sheet-header p, .print-sheet-summary { margin: 4px 0 0; color: #4a6370; }
  .print-sheet-summary { margin-bottom: 10px; font-weight: 600; }
  #print-sheet h2 { margin: 14px 0 6px; font-size: 12pt; break-after: avoid; }
  #print-sheet table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  #print-sheet th, #print-sheet td { height: auto; padding: 4px 6px; color: #1d3340; border: 1px solid #c6d4da; font-size: 9.5pt; letter-spacing: 0; text-align: left; vertical-align: top; }
  #print-sheet th { background: #eef4f6; }
  #print-sheet tbody tr:last-child td { border-bottom: 1px solid #c6d4da; }
  #print-sheet tr { break-inside: avoid; }
  #print-sheet .trace-node, #print-sheet .trace-link, #print-sheet .trace-gap { break-inside: avoid; }
  #print-sheet .patch-list-sheet th, #print-sheet .patch-list-sheet td { padding: 2px 4px; font-size: 8pt; }
  #print-sheet .trace-cable-swatch { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
@media print {
  body { min-width: 0; background: white; }
  .sidebar, .topbar, .rack-workspace-toolbar, .rack-workspace-source, #rack-empty-state,
  .rack-column-actions, .rack-column-footer, .rack-cable-overlay,
  .rack-overhead-cable-tray, .rack-drop-hint, #toast-region { display: none !important; }
  .app-shell, .main-area { display: block; width: 100%; margin: 0; }
  .content { width: 100%; margin: 0; padding: 0; }
  .page-view { display: none !important; }
  #page-racks { display: block !important; }
  #rack-layout, .rack-face-panel { display: block !important; width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .rack-face { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 16px; overflow: visible; padding: 0; border: 0; background: white; }
  #rack-drop-status { display: none; }
  .rack-face-column, .rack-face-multi .rack-face-column { width: auto; padding: 0; break-inside: avoid; page-break-inside: avoid; }
  .rack-room-group { display: block; margin: 0 0 10px; padding: 0; border: 0; break-inside: avoid; }
  /* Racks print side by side at their screen proportions, so template faces keep fitting their U rows. */
  .rack-room-racks { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
  .rack-room-member { flex: 0 0 auto; width: auto; }
  .rack-order-controls, .rack-face-label .rack-drag-handle { display: none; }
  .rack-face-column .rack-face-frame { --rack-scale: 1; width: 420px; zoom: .64; }
  .rack-face-label { padding: 2px 5px; }
  .rack-face-info strong { font-size: 19px; }
  .rack-face-info small { font-size: 14px; }
  .rack-grid { --rack-unit-height: 32px; border-radius: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

}

@media (max-width: 900px) {
  .patch-toolbar-options, .patch-board-filters { flex-wrap: wrap; }
  .connection-list-toolbar .search-box { flex: 1 1 100%; }
  .connection-list-toolbar .result-count { margin-left: 0; }
}
@media (max-width: 640px) {
  .patch-toolbar-options { width: 100%; align-items: stretch; flex-direction: column; }
  .patch-board-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patch-filter { justify-content: space-between; }
  .patch-filter select, .patch-board-search input { width: 100%; }
  .patch-board-search { grid-column: 1 / -1; }
  .connection-list-toolbar select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .connection-list-toolbar .button { flex: 0 0 auto; }
  .activity-copy { grid-template-columns: minmax(55px, .8fr) minmax(0, 1.4fr) minmax(45px, .8fr); gap: 2px 5px; }
  .activity-copy strong { font-size: 10px; }
  .activity-copy .activity-detail { grid-column: 2; grid-row: 1; font-size: 9px; }
  .activity-copy small { display: block; grid-column: 3; grid-row: 1; font-size: 8px; }
  .rack-scale-controls { order: 5; }
}

@media (max-width: 960px) {
  .equipment-list-header { display: none; }
  .equipment-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px; }
  .equipment-row-device { grid-column: 1; grid-row: 1; }
  .equipment-row-actions { grid-column: 2; grid-row: 1; }
  .equipment-row-location { grid-column: 1; grid-row: 2; }
  .equipment-row-status { grid-column: 2; grid-row: 2; }
  .equipment-row-ports { grid-column: 1 / -1; grid-row: 3; }
  .equipment-row-asset { grid-column: 1 / -1; grid-row: 4; }
  .equipment-row-label { display: block; }
  .equipment-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .equipment-toolbar { align-items: stretch; }
  .equipment-toolbar .search-box { flex: 1 1 100%; }
  .equipment-toolbar select { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .equipment-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .equipment-row-device > .equipment-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .equipment-row-device-copy { max-width: 100%; }
  .equipment-row-actions { gap: 0; }
  .equipment-row-actions .card-action { width: 25px; height: 25px; }
  .equipment-row-actions .equipment-ports-action { min-width: 34px; padding: 0 3px; }
  .equipment-row-location strong, .equipment-row-ports strong, .equipment-row-asset strong { white-space: normal; overflow-wrap: anywhere; }
  .equipment-detail-card { max-height: calc(100dvh - 24px); overflow-y: auto; }
}

/* Company management workspace */
#page-company { --company-ink: #173f52; --company-muted: #718895; --company-line: #e0eaee; }
#page-company .page-heading { align-items: center; margin-bottom: 15px; }
#page-company .page-heading h1 { color: var(--company-ink); font-size: clamp(22px, 2.5vw, 30px); letter-spacing: -.65px; }
#page-company .page-heading .eyebrow{ color: #648795; font-size: 9px; font-weight: 800; letter-spacing: 1.15px; }
#page-company .page-description { max-width: 640px; margin-top: 5px; color: var(--company-muted); }
.company-invite-created { margin-top: 14px; padding: 12px; background: #edf7f5; border: 1px solid #d1e9e2; border-radius: 9px; }
.company-invite-created > strong { color: #286450; font-size: 12px; }
.company-invite-created > p { margin: 4px 0 9px; color: #6a8580; font-size: 10px; line-height: 1.45; }

.field:has(> .optional-label) { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 6px 8px; }
.field:has(> .optional-label) > :not(.optional-label) { grid-column: 1 / -1; }
.mfa-recovery-codes { padding: 12px; overflow: auto; background: var(--canvas); user-select: all; }
#vue-account-security { display: contents; }

.connection-menu-action:focus-visible { outline: 2px solid #087da0; outline-offset: -2px; background: #edf6f8; }
.connection-menu-heading { overflow-wrap: anywhere; }

.connection-menu-action:disabled { color: #83969e; cursor: default; background: transparent; }
.rear-board-port[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.data-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 12px 0; font-size: 13px; }
.data-pager[hidden] { display: none; }
.data-pager button { padding: 7px 12px; border: 1px solid #b9cdd7; border-radius: 5px; background: #f7fbfc; color: #244959; cursor: pointer; }
.data-pager button:disabled { opacity: .45; cursor: default; }

.rack-room-combobox { position: relative; }
.rack-room-entry { display: flex; }
.rack-room-entry input { min-width: 0; flex: 1; border-radius: 5px 0 0 5px; }
.rack-room-entry > button { padding: 0 12px; border: 1px solid #b9cdd7; border-left: 0; border-radius: 0 5px 5px 0; background: #f7fbfc; color: #244959; cursor: pointer; }
.rack-room-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; max-height: 200px; overflow-y: auto; padding: 4px; border: 1px solid #b9cdd7; border-radius: 5px; background: #fff; box-shadow: 0 3px 9px #193b4b26; }
.rack-room-suggestions > button { display: block; width: 100%; padding: 8px; border: 0; background: transparent; color: #244959; text-align: left; cursor: pointer; }
.rack-room-suggestions > button:hover, .rack-room-suggestions > button[aria-selected=true] { background: #e5f3f8; }
.rack-room-suggestions > p { margin: 8px; color: #5e747e; font-size: 13px; }

.port-info-bubble { position: fixed; z-index: 35; box-sizing: border-box; width: 260px; max-height: calc(100vh - 16px); padding: 11px 13px; border: 1px solid #b8d0d8; border-radius: 9px; background: #fff; color: #25495b; box-shadow: 0 5px 18px #10364626; pointer-events: none; font-size: 12px; }
.port-info-bubble[hidden] { display: none; }
.port-info-content > strong, .port-info-content > small { display: block; overflow-wrap: anywhere; }
.port-info-content > strong { font-size: 13px; }
.port-info-content > small { margin-top: 3px; color: #607d88; }
.port-info-state { display: block; margin: 8px 0; font-weight: 600; }
.port-info-bubble dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 9px; margin: 0; }
.port-info-bubble dt { color: #607d88; }
.port-info-bubble dd { margin: 0; overflow-wrap: anywhere; }

.port-info-content { max-height: calc(100vh - 42px); overflow: hidden; }

/* Shared workspace surfaces and controls. */
:root { --ink: #173849; --ink-soft: #476171; --muted: #607b89; --line: #d5e2e7; --canvas: #f1f6f8; --shadow: 0 4px 18px rgba(8, 52, 75, .055); }
.content { width: min(1600px, 100%); padding: clamp(24px, 2.4vw, 38px) clamp(20px, 2.8vw, 44px) 48px; }
.page-heading { gap: 14px; margin-bottom: 20px; }
.page-heading h1 { font-size: clamp(23px, 2vw, 30px); letter-spacing: -.7px; }
.page-description { color: #587381; }
.panel, .stat-card, .equipment-row { border-color: #dce7eb; box-shadow: var(--shadow); }
.button, .inventory-toolbar select, .field input, .field select, .field textarea { border-color: #cfdee4; }
.button-secondary { color: #294f60; background: #fff; }
.button:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #087f9c; outline-offset: 2px; }
.field { color: #405c68; }
.optional-label, .form-hint, .page-description, .panel-heading p { color: #617b87; }
.equipment-row-device-copy, .equipment-row-location, .equipment-row-ports, .equipment-row-asset { min-width: 0; }
.equipment-row-subtitle, .equipment-row-location small, .equipment-row-ports small, .equipment-row-label { font-size: 12px; color: #617b87; }
.equipment-row-location strong, .equipment-row-ports strong, .equipment-row-asset strong, .equipment-name-link { font-size: 13px; color: #244758; }
.equipment-row-status .equipment-status { font-size: 12px; }
.equipment-row-actions { align-items: center; gap: 6px; }
.equipment-row-actions .equipment-ports-action { width: auto; min-width: 52px; height: 34px; padding: 0 8px; color: #076e88; font-size: 12px; }
.equipment-row-actions .equipment-options { width: 34px; height: 34px; color: #315f70; font-size: 20px; }
.equipment-secondary-actions { display: none; }
.equipment-breakdown { gap: 6px 18px; }
.breakdown-label { min-width: 0; overflow: visible; white-space: normal; }
.activity-panel:has(.empty-state) { min-height: 0; }
.connection-face-card { min-width: 0; }
.connection-face-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 10px; color: #294c5c; font-size: 13px; }
.connection-face-label strong, .connection-face-label span { min-width: 0; overflow-wrap: anywhere; }
.connection-face-label span { color: #617b87; font-size: 12px; }
.patch-toolbar { gap: 10px; align-items: center; flex-wrap: wrap; }
.patch-toolbar-options { flex-wrap: wrap; gap: 8px; }
#equipment-dialog { width: min(1000px, calc(100vw - 32px)); }
#equipment-dialog .modal-actions { position: sticky; z-index: 2; bottom: -24px; margin: 20px -24px -24px; padding: 12px 24px; background: #fff; border-top: 1px solid #dce7eb; box-shadow: 0 -4px 12px #173b4b0a; }
/* Add equipment: choose on the left, name and describe on the right. */
#equipment-dialog .equipment-form-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
#equipment-dialog .equipment-form-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 10px; }
#equipment-dialog .equipment-form-secondary .equipment-form-section-heading, .equipment-form-wide { grid-column: 1 / -1; }
.equipment-source { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.equipment-source label { position: relative; cursor: pointer; }
.equipment-source input, .equipment-library-chip input, .equipment-library-item input { position: absolute; opacity: 0; pointer-events: none; }
.equipment-source span { display: grid; gap: 2px; height: 100%; padding: 9px 12px; background: #fff; border: 1px solid #d5e2e7; border-radius: 8px; }
.equipment-source strong { color: #294f60; font-size: 12px; }
.equipment-source small { color: #6d838d; font-size: 11px; }
.equipment-source input:checked + span { background: #eef8fb; border-color: #087da0; box-shadow: inset 0 0 0 1px #087da0; }
.equipment-source input:focus-visible + span, .equipment-library-chip input:focus-visible + span, .equipment-library-item input:focus-visible ~ .equipment-library-item-text { outline: 2px solid #087da0; outline-offset: 2px; }
.equipment-library { display: grid; gap: 8px; }
.equipment-library-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .45fr); gap: 8px; }
.equipment-library-filters input, .equipment-library-filters select { min-height: 36px; padding: 6px 10px; font-size: 12px; }
.equipment-library-categories { display: flex; flex-wrap: wrap; gap: 5px; }
.equipment-library-chip { cursor: pointer; }
.equipment-library-chip span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; color: #36535f; background: #fff; border: 1px solid #d5e2e7; border-radius: 999px; font-size: 11px; font-weight: 600; }
.equipment-library-chip small { color: #7b8c93; font-size: 10px; font-weight: 500; }
.equipment-library-chip input:checked + span { color: #fff; background: #087da0; border-color: #087da0; }
.equipment-library-chip input:checked + span small { color: #d6eef5; }
.equipment-library-list { max-height: 282px; overflow: auto; background: #fff; border: 1px solid #d5e2e7; border-radius: 8px; }
.equipment-library-group h4 { position: sticky; z-index: 1; top: 0; margin: 0; padding: 5px 10px; color: #6d838d; background: #f4f8f9; border-bottom: 1px solid #e3ecef; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.equipment-library-item { position: relative; display: block; cursor: pointer; }
.equipment-library-item + .equipment-library-item { border-top: 1px solid #edf2f4; }
.equipment-library-item-text { display: grid; gap: 1px; padding: 7px 10px 7px 30px; }
.equipment-library-item-text::before { content: ""; position: absolute; top: 50%; left: 10px; box-sizing: border-box; width: 12px; height: 12px; margin-top: -6px; border: 1px solid #a9bcc4; border-radius: 50%; background: #fff; }
.equipment-library-item strong { overflow: hidden; color: #1d3340; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.equipment-library-item small { overflow: hidden; color: #6d838d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-library-item:hover .equipment-library-item-text { background: #f6fafb; }
.equipment-library-item input:checked ~ .equipment-library-item-text { background: #eef8fb; }
.equipment-library-item input:checked ~ .equipment-library-item-text::before { border: 4px solid #087da0; }
.equipment-library-empty { margin: 0; padding: 14px 10px; color: #6d838d; font-size: 12px; }
#equipment-template-hint { margin: 0; font-size: 11px; }
.equipment-template-preview { display: grid; gap: 6px; padding: 10px 12px; background: #f4f8f7; border: 1px solid #e5eeeb; border-radius: 9px; }
.equipment-template-preview-face { max-width: 560px; }
.equipment-template-preview p { margin: 0; color: #6d838d; font-size: 11px; }
.equipment-template-preview p strong { margin-right: 4px; color: #294f60; font-size: 12px; }
@media (max-width: 900px) { #equipment-dialog .equipment-form-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  #equipment-dialog .equipment-form-secondary, .equipment-source, .equipment-library-filters { grid-template-columns: minmax(0, 1fr); }
}
.mobile-nav-open, .mobile-nav-backdrop, .mobile-search-toggle { display: none; }
@media (max-width: 640px) {
  .mobile-nav-open, .mobile-search-toggle { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; padding: 0; color: #225268; background: transparent; border: 0; border-radius: 6px; font-size: 20px; }
  .mobile-nav-backdrop:not([hidden]) { position: fixed; z-index: 19; inset: 0; display: block; width: 100%; background: #062c4380; border: 0; }
  .topbar { gap: 6px; padding: 0 10px; }
  .topbar-right { flex: 1; min-width: 0; justify-content: flex-end; gap: 5px; }
  #vue-site-picker { min-width: 0; flex: 1 1 130px; max-width: 190px; }
  .topbar-right select { width: 100%; min-height: 38px; padding: 4px 24px 4px 8px; font-size: 12px; }
  .user-menu-trigger { max-width: 100px; min-height: 40px; font-size: 12px; }
  .global-search { position: absolute; top: 100%; left: 8px; right: 8px; z-index: 8; display: none; width: auto; padding: 8px; background: white; border: 1px solid #d5e2e7; border-radius: 8px; box-shadow: var(--shadow); }
  .mobile-search-open .global-search { display: block; }
  .global-search input { min-height: 40px; font-size: 14px; }
  .global-search-results { left: 0; width: 100%; }
  .content { padding: 22px 14px 36px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > div:first-child { min-width: 0; }
  .equipment-breakdown { grid-template-columns: 1fr; }
  .breakdown-item { min-height: 36px; }
  .equipment-row-actions .card-action, .equipment-row-actions .equipment-ports-action { min-height: 40px; height: 40px; }
  .equipment-row-actions .equipment-options { width: 40px; }
  .equipment-row-actions { gap: 4px; }
  .equipment-form-secondary { grid-template-columns: minmax(0, 1fr); }
  .equipment-form-secondary .equipment-form-section-heading { grid-column: auto; }
  #equipment-dialog .modal-actions { bottom: -16px; margin: 16px -16px -16px; padding: 12px 16px; }
}
@media (pointer: coarse) {
  .button, .field input, .field select, .inventory-toolbar select { min-height: 40px; }
}
.port-manager-row-focus { background: #fff6d6; }

.update-banner { position: fixed; z-index: 90; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 32px)); padding: 10px 12px 10px 16px; color: #e7f4f6; background: #062c43; border: 1px solid #0b4964; border-radius: 10px; box-shadow: 0 12px 34px rgba(3, 28, 43, .35); font-size: 12px; transform: translateX(-50%); }
.update-banner[hidden] { display: none; }
.update-banner strong { color: #fff; }
.update-banner .button { flex: 0 0 auto; min-height: 32px; }
.whats-new-list section + section { margin-top: 14px; }
.whats-new-list h3 { display: flex; align-items: baseline; gap: 8px; color: #214458; font-size: 13px; }
.whats-new-list h3 small { color: #718a97; font-size: 10px; font-weight: 500; }
.whats-new-list ul { margin: 6px 0 0; padding-left: 18px; color: #3c5866; font-size: 12px; line-height: 1.5; }
@media (max-width: 560px) { .update-banner { flex-wrap: wrap; left: 16px; right: 16px; max-width: none; transform: none; } }
.conflict-fields { width: 100%; margin: 4px 0 6px; border-collapse: collapse; font-size: 12px; }
.conflict-fields th, .conflict-fields td { padding: 7px 8px; border-bottom: 1px solid #e3ecef; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.conflict-fields th { color: #516b77; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.dialog-presence-note, .dialog-remote-note { margin: -8px 0 14px; padding: 8px 10px; color: #5b4216; background: #fdf4e5; border-left: 3px solid #f2b65d; border-radius: 0 6px 6px 0; font-size: 11px; }
.rack-presence { display: inline-flex; flex: 0 0 auto; gap: 2px; margin-left: 6px; }
.rack-presence i { display: grid; width: 18px; height: 18px; place-items: center; color: #fff; background: #0785a8; border: 2px solid #f8fbfc; border-radius: 50%; font-size: 7px; font-style: normal; font-weight: 700; }
.rack-presence i + i { margin-left: -6px; }
.rack-item-being-edited { outline: 2px dashed #f2b65d; outline-offset: 1px; }
.rack-item-badge { position: absolute; z-index: 8; top: 2px; right: 8px; max-width: 60%; padding: 1px 7px; overflow: hidden; color: #fff; background: rgba(13, 43, 56, .9); border-radius: 999px; font-size: 8px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.rack-item-badge-remote { background: #a8711c; }
.rack-item-remote-change { animation: rack-remote-change 3s ease-out; }
@keyframes rack-remote-change { 0%, 30% { box-shadow: 0 0 0 3px #f2b65d, 0 0 14px rgba(242, 182, 93, .8); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .rack-item-remote-change { animation: none; outline: 2px solid #f2b65d; } }

/* Side menu: the full menu on desktop (collapsible to a rail), a labelled rail on tablets that opens over
   the page, and a drawer on phones. Sections are flat: no page is indented under another. */
.app-shell { --sidebar-width: 246px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 22px 14px 14px; color: #e1edf2; background: var(--sidebar); transition: width .2s ease, transform .22s ease, visibility .22s; }
.main-area { width: calc(100% - var(--sidebar-width)); min-height: 100vh; margin-left: var(--sidebar-width); transition: width .2s ease, margin-left .2s ease; }
.brand { display: flex; align-items: center; height: 40px; margin: 0 8px 26px; color: inherit; text-decoration: none; }
.brand-logo { width: 176px; height: auto; }
.main-nav { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 16px; margin: 0 -4px; padding: 0 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-groups { display: grid; gap: 16px; }
.nav-group { display: grid; gap: 2px; }
.nav-group-label { padding: 0 12px 5px; color: #7fa9bb; font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; }
.nav-group-support { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; color: #b4c8d0; background: transparent; border: 0; border-radius: 8px; font-size: 13px; font-weight: 500; text-align: left; transition: background .16s, color .16s; }
.nav-link:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.06); }
.nav-link:focus-visible { outline: 2px solid #42d6cf; outline-offset: -2px; }
.nav-link.active { color: #f1fcff; background: #0b4964; box-shadow: inset 3px 0 #42d6cf; }
.nav-icon { width: 18px; flex: 0 0 18px; color: #8db2c1; font-size: 16px; line-height: 1; text-align: center; }
.nav-link.active .nav-icon { color: #5ce4de; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { margin-left: auto; padding: 2px 7px; color: #bed8e1; background: rgba(255,255,255,.08); border-radius: 9px; font-size: 11px; }
.sidebar-bottom { display: grid; gap: 10px; margin-top: 12px; }
.sidebar-bottom .sidebar-toggle { margin: 0 auto; }
.online-status { display: flex; gap: 10px; align-items: center; padding: 10px 11px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.06); border-radius: 9px; }
.online-status strong, .online-status small { display: block; }
.online-status strong { margin: 0; color: #e3f4f8; font-size: 11px; font-weight: 600; }
.online-status small { margin: 3px 0 0; color: #83aab9; font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 4px; margin: 0; padding: 10px 9px 0; color: #88a9b6; border-top: 1px solid rgba(255,255,255,.09); font-size: 10px; }
.mobile-nav-close { display: none; }
@media (max-width: 1140px) { .app-shell { --sidebar-width: 220px; } }
@media (min-width: 1600px) { .app-shell { --sidebar-width: 262px; } }

/* The rail: collapsed on desktop, and the default on tablets. Each page keeps a short label under its icon. */
@media (min-width: 641px) {
  .app-shell.sidebar-collapsed { --sidebar-width: 80px; }
  .app-shell.sidebar-collapsed .sidebar { padding: 18px 8px 12px; }
  .app-shell.sidebar-collapsed .brand { justify-content: center; margin: 0 0 20px; }
  .app-shell.sidebar-collapsed .brand-logo { width: 36px; height: 36px; object-fit: cover; object-position: left center; }
  .app-shell.sidebar-collapsed .main-nav, .app-shell.sidebar-collapsed .nav-groups { gap: 8px; }
  .app-shell.sidebar-collapsed .nav-group-label { height: 1px; margin: 2px 14px 4px; padding: 0; overflow: hidden; color: transparent; background: rgba(255,255,255,.1); }
  .app-shell.sidebar-collapsed .nav-group:first-child .nav-group-label { display: none; }
  .app-shell.sidebar-collapsed .nav-link { flex-direction: column; justify-content: center; gap: 4px; min-height: 52px; padding: 6px 2px; text-align: center; }
  .app-shell.sidebar-collapsed .nav-link::after { max-width: 100%; overflow: hidden; content: attr(data-short); font-size: 10px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell.sidebar-collapsed .nav-label, .app-shell.sidebar-collapsed .nav-count { display: none; }
  .app-shell.sidebar-collapsed .nav-group-support { padding-top: 6px; }
  .app-shell.sidebar-collapsed .online-status { justify-content: center; padding: 6px 0; background: transparent; border: 0; }
  .app-shell.sidebar-collapsed .online-status > span:not(.status-dot) { display: none; }
  .app-shell.sidebar-collapsed .sidebar-footer { flex-direction: column; gap: 0; padding: 8px 0 0; font-size: 9px; text-align: center; }
}
/* Tablets keep the rail's space; the full menu opens over the page with the page dimmed behind it. */
@media (min-width: 641px) and (max-width: 860px) {
  .app-shell { --sidebar-width: 80px; }
  .app-shell:not(.sidebar-collapsed) .sidebar { z-index: 25; width: 264px; box-shadow: 0 0 0 100vmax rgba(6,44,67,.38), 8px 0 28px rgba(6,44,67,.25); }
}
/* Phones: a drawer from the left with room to tap, scrolling when the screen is short. */
@media (max-width: 640px) {
  .app-shell, .app-shell.sidebar-collapsed { --sidebar-width: 0px; }
  .sidebar { z-index: 20; width: min(300px, 86vw); padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); box-shadow: 8px 0 28px rgba(6,44,67,.3); transform: translateX(-105%); visibility: hidden; }
  .app-shell.mobile-nav-opened .sidebar { transform: none; visibility: visible; }
  .brand { margin: 2px 52px 18px 8px; }
  .brand-logo { width: 160px; }
  .mobile-nav-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 8px; display: grid; width: 44px; height: 44px; place-items: center; padding: 0; color: #e1edf2; background: transparent; border: 0; border-radius: 8px; font-size: 24px; }
  .mobile-nav-close:hover { background: rgba(255,255,255,.08); }
  .nav-link { min-height: 44px; font-size: 14px; }
  .sidebar-bottom .sidebar-toggle { display: none; }
}

.app-shell.sidebar-collapsed .sidebar-toggle::before { transform: rotate(-45deg); }
