: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);
  --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 { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 246px; padding: 27px 17px 18px; color: #e1edf2; background: var(--sidebar); transition: width .2s ease; }
.brand { display: flex; align-items: center; gap: 10px; height: 40px; margin: 0 9px 58px; color: inherit; text-decoration: none; }
.brand-logo { width: 194px; height: auto; }
.sidebar-nav-heading { display: flex; align-items: center; justify-content: space-between; min-height: 26px; margin-bottom: 14px; }
.workspace-label { margin: 0 10px; color: #7fa9bb; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.nav-section-label { margin-top: 10px; }
.sidebar-toggle { position: relative; display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; 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; }
.app-shell.sidebar-collapsed .sidebar-toggle::before { transform: rotate(-45deg); }
.main-nav { display: grid; gap: 6px; }
.admin-nav-group, .connections-nav-group { display: grid; gap: 3px; }
.nav-sub-link { min-height: 36px; margin-left: 16px; width: calc(100% - 16px); padding-left: 8px; color: #91a9b5; font-size: calc(var(--type-xs) - 1px); }
.nav-sub-link .nav-icon { width: 17px; font-size: 14px; }
.nav-sub-link:hover { color: #e1edf2; }
.nav-link { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 43px; padding: 0 12px; color: #afc0b8; background: transparent; border: 0; border-radius: 8px; text-align: left; font-size: var(--type-xs); font-weight: 500; transition: background .16s, color .16s; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.nav-link.active { color: #f1fcff; background: #0b4964; box-shadow: inset 2px 0 #42d6cf; }
.nav-icon { width: 17px; color: #8db2c1; font-size: 17px; line-height: 1; text-align: center; }
.nav-link.active .nav-icon { color: #5ce4de; }
.nav-count { margin-left: auto; padding: 3px 7px; color: #bed8e1; background: rgba(255,255,255,.08); border-radius: 9px; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.online-status { display: flex; gap: 10px; align-items: center; margin: 0 5px 21px; padding: 13px 11px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.06); border-radius: 9px; }
.status-dot, .live-indicator i, .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); }
.online-status strong, .online-status small { display: block; }
.online-status strong { color: #e3f4f8; font-size: 10px; font-weight: 600; }
.online-status small { margin-top: 4px; color: #83aab9; font-size: 9px; }
.sidebar-footer { display: flex; align-items: center; gap: 4px; padding: 14px 9px 1px; color: #88a9b6; border-top: 1px solid rgba(255,255,255,.09); font-size: 9px; }
.main-area { width: calc(100% - 246px); min-height: 100vh; margin-left: 246px; transition: width .2s ease, margin-left .2s ease; }
.topbar { position: sticky; z-index: 4; 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; }
.mobile-access-label { display: none; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: #74817b; font-size: 10px; }
.live-indicator i { width: 6px; height: 6px; flex-basis: 6px; box-shadow: none; }
.avatar { display: grid; width: 30px; height: 30px; place-items: center; color: #087da0; background: #e1f3f6; border-radius: 50%; font-size: 9px; font-weight: 700; }
.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; }
.heading-spark { color: #16a8b6; font-size: 13px; }
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, .tip-link { padding: 0; color: #087da0; background: none; border: 0; font-size: 9px; font-weight: 600; }
.text-button span, .tip-link span { margin-left: 3px; }
.text-button:hover, .tip-link: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: #58665f; font-size: 8px; }
.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; }
.tip-card { position: relative; display: flex; align-self: stretch; gap: 12px; overflow: hidden; min-height: 120px; padding: 18px; background: #edf5ef; border: 1px solid #e5efe7; border-radius: 10px; }
.tip-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; color: #47896b; background: #dceee0; border-radius: 8px; font-size: 14px; }
.tip-card strong { color: #43614e; font-family: "Segoe UI", Arial, sans-serif; font-size: 10px; }
.tip-card p { max-width: 255px; margin-top: 6px; color: #829889; font-size: 8px; line-height: 1.55; }
.tip-link { margin-top: 9px; color: #378263; font-size: 8px; }
.tip-decoration { position: absolute; right: 14px; bottom: 6px; color: #d4e8d9; font-size: 35px; font-weight: 300; }
.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; }
.equipment-card { min-width: 0; padding: 16px; background: white; border: 1px solid #e9efeb; border-radius: 10px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.equipment-card:hover { transform: translateY(-1px); border-color: #d8e7dc; }
.equipment-card-top { display: flex; align-items: center; gap: 8px; }
.equipment-card-top .equipment-icon { width: 30px; height: 30px; flex-basis: 30px; }
.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; }
.equipment-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 14px; }
.equipment-card-title h3 { overflow: hidden; color: #32423a; font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.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; }
.equipment-card .port-chip.port-reserved { color: #8a682b; background: #fbf3df; border-color: #f2e7c7; }
.equipment-card .port-chip.port-disabled { color: #727b76; background: #edf0ee; border-color: #e1e5e2; }
.device-port-caption { overflow: hidden; margin-top: 14px; color: #89958e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.device-port-caption span { padding: 0 4px; color: #c3ccc6; }
.port-chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.port-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 5px; overflow: hidden; padding: 5px 7px; color: #76837c; background: #f5f7f5; border: 1px solid #edf0ee; border-radius: 5px; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.port-chip i { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; }
.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: #85938b; font-size: 9px; 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-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: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(228px, calc(100vw - 16px)); gap: 5px; padding: 9px; 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; }
.connection-menu-heading { padding: 3px 5px 5px; color: #20485d; font-size: 13px; }
.connection-menu-label { padding: 2px 5px; color: #738995; font-size: 11px; font-weight: 600; }
.connection-color-options { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 2px 5px 8px; border-bottom: 1px solid #edf2f4; }
.connection-color-swatch { width: 22px; height: 22px; 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: 24px; height: 24px; overflow: hidden; border: 1px solid #cfdbdf; border-radius: 50%; cursor: pointer; }
.connection-color-custom input { width: 32px; height: 32px; margin: -4px; padding: 0; border: 0; cursor: pointer; }
.connection-menu-action { display: flex; min-height: 34px; align-items: center; justify-content: space-between; padding: 0 8px; color: #345566; background: transparent; border: 0; border-radius: 5px; font-size: 12px; text-align: left; cursor: pointer; }
.connection-menu-action:hover, .connection-menu-action:focus-visible { color: #075b79; background: #edf7f9; outline: none; }
.connection-menu-action span { color: #76909c; font-size: 11px; }
.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-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; }
.admin-log-panel { padding-bottom: 12px; }
.admin-log-filters { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0; }
.admin-log-filters select { min-width: 190px; padding: 0 9px; color: #52645a; background: white; border: 1px solid #e3e9e5; border-radius: 6px; font-size: 10px; }
.admin-change-table { min-width: 850px; }
.admin-change-table th { padding: 0 8px; }
.admin-change-table td { height: auto; padding: 10px 8px; vertical-align: top; line-height: 1.45; }
.admin-change-table td:nth-child(1), .admin-change-table td:nth-child(2), .admin-change-table td:nth-child(5) { white-space: nowrap; }
.admin-change-table td:nth-child(4) { min-width: 260px; overflow-wrap: anywhere; }
.admin-log-empty { padding: 20px 8px; text-align: center; }
.admin-log-more { display: flex; justify-content: center; padding: 12px 0 0; }
.admin-log-note { margin-top: 12px; }
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-patch-board { margin: 12px 0 18px; }
.rear-board-port { display: grid; min-width: 0; grid-template-columns: 14px minmax(38px, auto) minmax(0, 1fr); align-items: center; gap: 7px; padding: 7px 8px; color: #516258; background: #f8faf8; border: 1px solid #eaf0ec; border-radius: 7px; text-align: left; cursor: pointer; }
.rear-board-port:hover { background: #f2f7f3; border-color: #c7dbce; }
.rear-board-port.rear-port-selected { background: #edf8ef; border-color: #7ab28c; box-shadow: 0 0 0 2px rgba(94, 167, 116, .14); }
.rear-board-port.rear-port-faulty { border-left: 3px solid #d35e46; }
.rear-port-indicator { width: 12px; height: 12px; border: 2px solid #69a47c; border-radius: 4px; background: #edf7ef; }
.rear-port-faulty .rear-port-indicator { border-color: #cf5b43; background: #fff0e8; }
.rear-board-port strong { overflow: hidden; color: #45584c; font-size: var(--type-xs); text-overflow: ellipsis; white-space: nowrap; }
.rear-board-port small { overflow: hidden; color: #84958a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.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-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: #34483d; font-size: 12px; }
.equipment-form-section-heading p { margin: 4px 0 0; color: #8a9990; font-size: 9px; 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-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; grid-template-columns: 1fr 1.2fr .55fr .65fr .85fr .8fr 24px; align-items: end; gap: 7px; margin-top: 8px; padding: 10px; background: #f7faf8; border: 1px solid #edf1ee; border-radius: 7px; }
.module-field { gap: 5px; font-size: 7px; }
.module-field input, .module-field select { 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; }
.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; }
@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; }
}
.app-shell.sidebar-collapsed .sidebar { width: 66px; align-items: center; padding: 27px 8px 18px; }
.app-shell.sidebar-collapsed .brand { margin: 0 0 34px; }
.app-shell.sidebar-collapsed .brand-logo { width: 38px; height: 38px; object-fit: cover; object-position: left center; }
.app-shell.sidebar-collapsed .sidebar-nav-heading { justify-content: center; width: 100%; margin-bottom: 14px; }
.app-shell.sidebar-collapsed .workspace-label { display: none; }
.app-shell.sidebar-collapsed .sidebar-toggle { width: 28px; height: 28px; }
.app-shell.sidebar-collapsed .main-nav { width: 100%; }
.app-shell.sidebar-collapsed .nav-link { justify-content: center; gap: 0; padding: 0; font-size: 0; }
.app-shell.sidebar-collapsed .nav-icon { font-size: 17px; }
.app-shell.sidebar-collapsed .nav-count { display: none; }
.app-shell.sidebar-collapsed .nav-sub-link { width: 100%; margin-left: 0; padding: 0; }
.app-shell.sidebar-collapsed .online-status { justify-content: center; margin: 0 0 13px; padding: 10px 0; background: transparent; border: 0; }
.app-shell.sidebar-collapsed .online-status span:not(.status-dot) { display: none; }
.app-shell.sidebar-collapsed .sidebar-footer { width: 50px; flex-direction: column; gap: 0; padding: 10px 0 0; font-size: 7px; line-height: 1.3; text-align: center; }
.app-shell.sidebar-collapsed .main-area { width: calc(100% - 66px); margin-left: 66px; }

@media (max-width: 1140px) {
  .sidebar { width: 215px; }
  .main-area { width: calc(100% - 215px); margin-left: 215px; }
  .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) {
  .sidebar { width: 66px; align-items: center; padding: 20px 8px 14px; }
  .brand { margin: 0 0 41px; }
  .brand-logo { width: 38px; height: 38px; object-fit: cover; object-position: left center; }
  .brand-name, .workspace-label, .nav-link:not(.active) { font-size: 0; }
  .brand-name, .workspace-label, .online-status span:not(.status-dot) { display: none; }
  .main-nav { width: 100%; }
  .nav-link { justify-content: center; gap: 0; padding: 0; font-size: 0; }
  .nav-icon { font-size: 17px; }
  .nav-count { display: none; }
  .online-status { justify-content: center; margin: 0 0 13px; padding: 10px 0; background: transparent; border: 0; }
  .sidebar-footer { width: 50px; flex-direction: column; gap: 0; padding: 10px 0 0; font-size: 7px; line-height: 1.3; text-align: center; }
  .main-area { width: calc(100% - 66px); margin-left: 66px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .app-shell:not(.sidebar-collapsed) .sidebar { width: 246px; align-items: stretch; box-shadow: 8px 0 28px rgba(6,44,67,.2); }
  .app-shell:not(.sidebar-collapsed) .brand { margin: 0 9px 34px; }
  .app-shell:not(.sidebar-collapsed) .brand-logo { width: 194px; height: auto; object-fit: contain; }
  .app-shell:not(.sidebar-collapsed) .sidebar-nav-heading { justify-content: space-between; }
  .app-shell:not(.sidebar-collapsed) .workspace-label { display: block; font-size: 9px; }
  .app-shell:not(.sidebar-collapsed) .sidebar-toggle { width: 28px; height: 28px; }
  .app-shell:not(.sidebar-collapsed) .nav-link { justify-content: flex-start; gap: 13px; padding: 0 12px; font-size: var(--type-xs); }
  .app-shell:not(.sidebar-collapsed) .nav-count { display: block; }
  .app-shell:not(.sidebar-collapsed) .nav-sub-link { width: calc(100% - 16px); margin-left: 16px; padding-left: 8px; font-size: calc(var(--type-xs) - 1px); }
  .app-shell:not(.sidebar-collapsed) .online-status { justify-content: flex-start; margin: 0 5px 21px; padding: 13px 11px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.06); }
  .app-shell:not(.sidebar-collapsed) .online-status span:not(.status-dot) { display: block; }
  .app-shell:not(.sidebar-collapsed) .sidebar-footer { width: auto; flex-direction: row; gap: 4px; padding: 14px 9px 1px; font-size: 9px; line-height: normal; text-align: left; }
}
@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; }
  .live-indicator { display: none; }
  .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; }
  .tip-card { min-height: 105px; padding: 14px; }
  .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)); }
  .module-row { grid-template-columns: 1fr 1fr .7fr .7fr 24px; }
  .module-row .module-field:nth-child(5), .module-row .module-field:nth-child(6) { grid-row: 2; }
  .module-row .module-field:nth-child(5) { grid-column: 1 / 3; }
  .module-row .module-field:nth-child(6) { grid-column: 3 / 5; }
  .module-remove { grid-column: 5; grid-row: 1; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-card { padding: 18px; }
}

@media (min-width: 1600px) {
  .sidebar { width: 270px; }
  .main-area { width: calc(100% - 270px); margin-left: 270px; }
}

.workspace-label,
.online-status strong,
.online-status small,
.sidebar-footer,
.breadcrumbs,
.live-indicator,
.avatar,
.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,
.tip-card p,
.tip-link,
.recent-device strong,
.recent-device small,
.recent-port-count,
.search-box input,
.inventory-toolbar select,
.result-count,
.type-pill,
.connection-count,
.device-location,
.device-port-caption,
.port-chip,
.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,
.tip-card 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-row { grid-template-columns: 1fr 1fr .6fr 28px; }
  .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; }
.inline-create-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.admin-user-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 11px; }
.admin-user-form > .button { min-height: 39px; }
.admin-check { display: flex; align-items: center; gap: 8px; color: #3d5a68; font-size: 13px; }
.site-permission-field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 10px; border: 1px solid #dce8ed; border-radius: 7px; }
.site-permission-field legend { padding: 0 5px; color: #597684; font-size: 12px; }
.permission-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.permission-option { display: flex; align-items: center; gap: 6px; color: #3c5b69; font-size: 12px; }
.admin-user-list { display: grid; gap: 11px; max-height: 350px; overflow: auto; }
.admin-user-row { display: grid; gap: 10px; padding: 13px; background: #f6f9fa; border: 1px solid #e2ecef; border-radius: 8px; }
.admin-user-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-user-heading strong, .admin-user-heading small { display: block; }
.admin-user-heading strong { color: #23485b; font-size: 14px; }
.admin-user-heading small, .self-account { margin-top: 3px; color: #6b8592; font-size: 12px; }
.self-account { margin: 0; }

@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, .inline-create-form, .admin-user-form { grid-template-columns: 1fr; }
  .site-permission-field { grid-column: auto; }
  .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 { padding: 10px 16px 12px; }
.rack-page-toolbar { position: sticky; z-index: 3; top: 69px; display: flex; min-height: 48px; align-items: center; gap: 12px; margin-bottom: 8px; padding: 6px 10px; background: rgba(255,255,255,.96); box-shadow: 0 5px 14px rgba(8,52,75,.08); backdrop-filter: blur(12px); }
.rack-page-title .eyebrow { margin: 0 0 1px; font-size: 7px; }
.rack-page-title h1 { font-size: 18px; line-height: 1; }
.rack-page-toolbar .rack-toolbar-actions { margin-left: auto; }
.rack-page-toolbar .button { min-height: 30px; padding-right: 10px; padding-left: 10px; font-size: 9px; }
.rack-page-toolbar .button-plus { font-size: 14px; }
.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: 9px; 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-options { 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-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 8px; }
.rack-inventory-panel, .rack-face-panel { min-width: 0; padding: 8px; }
.rack-inventory-panel { position: absolute; top: 0; left: 0; z-index: 6; width: min(680px, calc(100% - 18px)); max-height: min(38vh, 360px); padding: 9px; overflow: hidden; background: #fff; box-shadow: 0 10px 28px rgba(30,63,76,.2); }
.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-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.rack-face-heading h2 { color: #214458; font-size: 16px; }
.rack-face-heading p { margin-top: 4px; color: #718a97; font-size: 11px; }
.rack-face-heading p { display: none; }
.rack-face-actions { display: flex; align-items: center; gap: 10px; }
.rack-cable-toggle { display: inline-flex; align-items: center; gap: 7px; color: #456675; font-size: 11px; white-space: nowrap; cursor: pointer; }
.rack-cable-toggle input { width: 16px; height: 16px; margin: 0; accent-color: #0785a8; }
.rack-face { position: relative; isolation: isolate; display: flex; min-width: 0; align-items: flex-end; 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; }
.rack-face-multi .rack-face-column { padding-top: 22px; }
.rack-face-frame { width: min(100%, 420px); min-width: 350px; margin: 0 auto; padding: 8px 10px; background: linear-gradient(90deg, #e7eef1, #f8fbfc 8%, #f8fbfc 92%, #e7eef1); border: 1px solid #d7e4e9; border-radius: 8px; box-shadow: inset 0 0 0 3px #f1f6f8; }
.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; }
.rack-cable-jacket { stroke-width: 2.5px; filter: drop-shadow(0 1px 1px rgba(12, 31, 39, .24)); }
.rack-cable-highlight { stroke: rgba(255, 255, 255, .55); stroke-width: .7px; transform: translateY(-.5px); }
.rack-cable-dimmed { opacity: .13; transition: opacity .12s ease; }
.rack-cable-highlighted { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .95)) drop-shadow(0 0 5px currentColor); }
.rack-cable { transition: opacity .12s ease, filter .12s ease; }
.rack-face-column { position: relative; flex: 0 0 420px; width: 420px; }
.rack-face-column .rack-face-frame { width: 100%; min-width: 0; }
.rack-column-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.rack-column-footer { display: flex; justify-content: flex-end; margin-top: 7px; }
.rack-face-label { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; margin: 0 0 6px; color: #6e8793; font-size: 8px; font-weight: 700; }
.rack-face-info { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
.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: 140px; color: #3c6476; font-size: 10px; }
.rack-face-info small { min-width: 0; color: #6e8793; font-size: 7px; font-weight: 500; }
.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 40px 6px 6px; background: linear-gradient(90deg,#e7eef0 0 25px,#edf3f5 25px); border: 2px solid #78909b; border-radius: 5px; }
.rack-u-mark { position: relative; z-index: 2; display: grid; justify-items: start; align-items: center; min-height: 24px; padding-left: 2px; color: rgba(75,105,116,.76); background: transparent; border: 0; border-radius: 0; font-size: 8px; font-weight: 600; pointer-events: none; }
.rack-u-mark::after { position: absolute; left: 25px; right: 0; bottom: -1px; content: ""; border-bottom: 1px solid rgba(99,127,137,.2); }
.rack-u-mark i { position: relative; z-index: 1; display: grid; width: 19px; height: 16px; place-items: center; color: inherit; background: #e7eef0; border-radius: 3px; font-style: normal; }
.rack-u-mark.rack-u-drop-target i { color: #fff; background: #0785a8; 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-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 { background-color: #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; }
.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-device { display: flex; min-width: 0; min-height: 14px; align-items: center; gap: 4px; }
.rack-equipment-device[draggable="true"] { min-height: 19px; cursor: grab; }
.rack-equipment-device[draggable="true"]:active { cursor: grabbing; }
.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; }
.rack-device-glyph { position: relative; display: grid; width: 18px; height: 12px; flex: 0 0 18px; place-items: center; overflow: hidden; color: transparent; background: #d9e6ea; border: 1px solid #7895a0; border-radius: 3px; }
.rack-device-glyph::before { position: absolute; inset: 2px 3px; content: ""; background: #537684; border-radius: 1px; }
.rack-glyph-switch::before, .rack-glyph-patch-panel::before { inset: 2px; background: repeating-linear-gradient(90deg,#345f70 0 2px,#8ba7b1 2px 3px); }
.rack-glyph-core-switch { background: #d4dfe3; border-width: 2px; }
.rack-glyph-core-switch::before { inset: 1px 2px; background: linear-gradient(90deg,#547c89 0 24%,#9cb1b7 24% 28%,#547c89 28% 52%,#9cb1b7 52% 56%,#547c89 56% 80%,#9cb1b7 80% 84%,#547c89 84%); }
.rack-glyph-computer::before { inset: 2px 4px; background: repeating-linear-gradient(180deg,#50717e 0 2px,#bdcbd0 2px 3px); }
.rack-glyph-ups { color: #7d571c; background: linear-gradient(145deg,#f2db9e,#c4913f); border-color: #a77d37; }
.rack-glyph-ups::before { inset: 4px 3px; background: linear-gradient(90deg,#243137 0 45%,#93d49e 45% 72%,#35444a 72%); border: 1px solid #687b7e; }
/* Rack equipment face and port rules live in rack-equipment.css. */


@media (max-width: 960px) {
  .rack-layout { grid-template-columns: minmax(0, 1fr); }
  .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-page-toolbar { flex-wrap: wrap; gap: 6px; margin-bottom: 6px; padding: 6px; }
  .rack-page-title { display: none; }
  .rack-page-toolbar .rack-toolbar-actions { flex: 1 1 auto; justify-content: flex-end; gap: 4px; }
  .rack-page-toolbar .button { min-height: 27px; padding-right: 7px; padding-left: 7px; font-size: 8px; }
  .rack-available-list { grid-template-columns: minmax(0, 1fr); }
  .rack-inventory-panel { width: calc(100% - 18px); max-height: min(42vh, 360px); }
  .rack-available-list { max-height: min(34vh, 290px); }
  .rack-face-panel { padding: 7px; }
  .rack-face-heading { align-items: center; }
  .rack-face-actions { width: auto; justify-content: flex-end; gap: 6px; }
  .rack-face-column { flex-basis: 360px; width: 360px; }
  .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"] { 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: #7f9299; font-size: 10px; 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: 11px; }
.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; }

.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: 10px; text-align: center; white-space: nowrap; }
/* Rack equipment compact and print overrides live in rack-equipment.css. */

@page { size: A4 landscape; margin: 10mm; }
@media print {
  body { min-width: 0; background: white; }
  .sidebar, .topbar, .rack-page-toolbar, #rack-inventory-panel, #rack-empty-state,
  .rack-face-heading, .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: block; overflow: visible; padding: 0; border: 0; background: white; }
  .rack-face-column, .rack-face-multi .rack-face-column { width: 100%; padding: 0; break-inside: avoid; page-break-inside: avoid; }
  .rack-face-frame { width: 100%; }
  .rack-face-label { padding: 2px 5px; }
  .rack-grid { --rack-unit-height: 15px; min-height: 0; grid-template-columns: 24px minmax(0, 1fr); gap: 1px 2px; padding: 3px; border-radius: 0; }

}

@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; }
  .rack-face-actions { flex-wrap: wrap; }
}
@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-face-actions { width: 100%; justify-content: flex-start; }
  .rack-scale-controls { order: 5; }
  .rack-face-column { flex-basis: 380px; width: 380px; }
}

@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-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.company-dashboard-grid > .panel { min-width: 0; padding: 20px; }
.company-dashboard-grid h2 { margin: 0 0 14px; font-size: 17px; }
.company-usage-list { display: grid; gap: 8px; margin: 18px 0; }
.company-usage-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 9px; background: var(--surface-muted, #f2f6f7); }
.company-logo-preview { display: block; max-width: 180px; max-height: 80px; object-fit: contain; margin: 8px 0; }
.admin-company-edit, .admin-plan-edit { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-company-edit > input, .admin-company-edit > select, .admin-plan-edit > input { min-width: 110px; flex: 1 1 120px; }
.admin-plan-editor { margin-top: 16px; }
.admin-plan-editor > summary { cursor: pointer; color: var(--ink-soft); font-weight: 650; }
@media (max-width: 820px) { .company-dashboard-grid { grid-template-columns: minmax(0, 1fr); } }
