:root {
  --ink: #102f62;
  --muted: #526984;
  --canvas: #f1f2f4;
  --line: #c9d8e8;
  --brand: #0d3270;
  --brand-dark: #082554;
  --brand-soft: #eaf3fb;
  --accent: #f3a623;
  --action: #1987c9;
  --action-dark: #0d6fae;
  --toolbar-control-height: 2.25rem;
}

html { background: var(--canvas); }
body { min-height: 100vh; color: var(--ink); }
.app-navbar { background: var(--brand); border-bottom: 0; box-shadow: 0 1px 4px rgba(7, 30, 72, .25); min-height: 3.15rem; }
.app-navbar .navbar-menu, .app-navbar .navbar-brand { min-height: 3.15rem; }
.brand { color: #fff !important; font-size: 1rem; font-weight: 800; gap: .55rem; letter-spacing: -.02em; padding-left: 1.05rem; padding-right: 1.1rem; }
.brand-mark { align-items: center; background: #d9eafa; border-radius: 50%; color: var(--brand); display: inline-flex; font-size: .62rem; height: 1.8rem; justify-content: center; letter-spacing: .04em; width: 1.8rem; }
.top-nav { border-bottom: 3px solid transparent; color: #fff !important; font-size: .78rem; font-weight: 600; min-height: 3.15rem; padding-left: 1rem; padding-right: 1rem; }
.top-nav:hover { background: rgba(255, 255, 255, .08) !important; }
.top-nav.is-active { background: var(--action) !important; border-bottom-color: var(--accent); color: #fff !important; }
.user-pill { background: #d7e8f8; border: 0; border-radius: 999px; color: var(--brand); font-size: .72rem; padding: .35rem .7rem; }
.app-shell { margin: 0 auto; max-width: 1895px; padding-bottom: .75rem; padding-top: 1.35rem; }
.eyebrow { color: var(--brand); font-size: .63rem; font-weight: 800; letter-spacing: .14em; margin-bottom: .28rem; text-transform: uppercase; }
.title { color: var(--brand); letter-spacing: -.025em; }
.title.is-3 { font-size: 1.55rem; margin-bottom: .25rem !important; }
.subtitle { color: var(--muted) !important; font-size: .82rem !important; }
.box { border: 1px solid var(--line); box-shadow: 0 2px 7px rgba(29, 61, 96, .06); }
.button { border-radius: 4px; font-size: .76rem; height: 2.25em; }
.button.is-primary { background: var(--action); border-color: transparent; color: #fff !important; }
.button.is-primary:hover { background: var(--action-dark); color: #fff !important; }
.button.is-success { background: #238b57; border-color: transparent; color: #fff !important; }
.button.is-success:hover { background: #197044; color: #fff !important; }
.toolbar-box { background: #fff; border-color: #9ec4e6; border-radius: 5px; padding: 0; overflow: hidden; }
.project-search { align-items: flex-end; background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: .75rem; margin: 0; max-width: none; padding: .85rem .75rem .7rem; }
.project-search::before { color: var(--brand); content: 'Filters'; font-size: .68rem; font-weight: 700; margin-right: .25rem; padding-bottom: .55rem; text-transform: uppercase; }
.project-search .input { border-color: #b7cbe0; font-size: .76rem; height: 2.2rem; }
.project-search .select-filter .select, .project-search .select-filter select { height: 2.2rem; }
.project-search .select-filter select { border-color: #b7cbe0; color: var(--ink); font-size: .74rem; min-width: 135px; }
.project-search .button { background: #f2f2f2; color: var(--ink); font-weight: 700; }
.filter-count { color: var(--muted); font-size: .68rem; margin-left: auto; padding-bottom: .55rem; white-space: nowrap; }
.project-heading { align-items: center; background: #fff; border-left: 4px solid var(--action); display: flex; justify-content: space-between; padding: 1rem 1.15rem; }
.status-tag, .status-value { font-weight: 700; white-space: nowrap; }
.project-workspace { display: grid; gap: .75rem; grid-template-columns: 215px minmax(0, 1fr); }
.table-sidebar { align-self: start; padding: .55rem; }
.table-sidebar .menu-label { color: var(--muted); font-size: .63rem; padding: .45rem .55rem; }
.table-sidebar .menu-item { background: transparent; border: 0; border-radius: 3px; color: var(--ink); cursor: pointer; display: block; font: inherit; font-size: .76rem; padding: .52rem .55rem; text-align: left; width: 100%; }
.table-sidebar .menu-item:hover { background: var(--canvas); }
.table-sidebar .menu-item.is-active { background: var(--brand-soft); border-left: 3px solid var(--action); color: var(--brand-dark); font-weight: 700; }
.table-panel { height: clamp(440px, calc(100vh - 350px), 1000px); min-height: 0; min-width: 0; overflow: hidden; padding: 1rem; }
.table-panel .title.is-4 { color: var(--brand); font-size: 1.05rem; }
.table-search { border-color: #b7cbe0; font-size: .76rem; height: 2.15rem; max-width: 205px; }
.table-panel .level-right { min-width: 0; }
.table-panel .level-right .buttons { align-items: center; flex-wrap: nowrap; gap: .5rem; margin-bottom: 0; }
.table-panel .table-search { flex: 1 1 205px; height: var(--toolbar-control-height); max-width: none; min-width: 0; width: 205px; }
.table-panel .level-right .button { height: var(--toolbar-control-height); white-space: nowrap; }
.table-panel #export-csv, .table-panel #import-csv { border-color: #b7cbe0; color: var(--brand); font-weight: 700; }
.table-panel #export-csv:hover, .table-panel #import-csv:hover { background: var(--brand-soft); border-color: #87b8df; }
.column-picker { align-items: stretch; display: inline-flex; height: var(--toolbar-control-height); position: relative; }
.column-picker summary { align-items: center; box-sizing: border-box; cursor: pointer; display: inline-flex; font-weight: 700; height: 100%; list-style: none; }
.column-picker summary::-webkit-details-marker { display: none; }
.column-picker summary::after { content: '▾'; font-size: .62rem; margin-left: .45rem; }
.column-picker[open] summary { background: var(--brand-soft); border-color: #87b8df; color: var(--brand); }
.column-picker-options { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 7px 20px rgba(16, 47, 98, .16); display: grid; max-height: min(420px, 60vh); min-width: 220px; overflow-y: auto; padding: .35rem; position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; }
.column-picker-option { align-items: center; border-radius: 3px; color: var(--ink); cursor: pointer; display: flex; font-size: .72rem; gap: .55rem; min-height: 2rem; padding: .4rem .5rem; white-space: nowrap; }
.column-picker-option:hover { background: var(--brand-soft); }
.column-picker-option input { accent-color: var(--action); }
.network-tabs { align-items: stretch; border-bottom: 1px solid #9db9d5; display: flex; gap: .2rem; margin: -.35rem 0 .75rem; overflow-x: auto; padding: 0 .1rem; }
.network-tab { align-items: center; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; display: inline-flex; flex: 0 0 auto; font: inherit; font-size: .7rem; font-weight: 700; gap: .38rem; min-height: 2.5rem; padding: .45rem .65rem .4rem; white-space: nowrap; }
.network-tab:hover { background: #f5f8fb; color: var(--brand); }
.network-tab.is-active { background: var(--brand-soft); border-bottom-color: var(--action); color: var(--brand); }
.network-tab small { background: #dcecf8; border-radius: 999px; color: var(--brand); font-size: .61rem; line-height: 1.3; min-width: 1.3rem; padding: .1rem .28rem; text-align: center; }
.data-table-empty { align-items: center; display: flex; justify-content: center; min-height: 380px; }
.empty-state { color: var(--muted); padding: 4rem 2rem; text-align: center; }
.save-status { color: var(--muted); font-size: .72rem; height: 1rem; margin-top: .75rem; text-align: right; }
.save-status.is-saving { color: var(--accent); }
.save-status.is-saved { color: var(--brand); }
.row-delete { background: transparent; border: 0; color: #a43e48; cursor: pointer; font-weight: 800; }
.row-delete:hover { color: #7d202c; }
.uat-row-actions { align-items: center; display: flex; gap: .2rem; }
.row-move { background: transparent; border: 0; color: var(--brand); cursor: pointer; font-size: .82rem; font-weight: 800; line-height: 1; padding: .1rem .2rem; }
.row-move:disabled { color: #b7c2cc; cursor: default; }
.uat-group-label { color: var(--brand) !important; flex: 1 1 auto; }
.uat-group-label small { color: var(--muted); font-size: .65rem; font-weight: 600; margin-left: .35rem; }
.uat-group-actions { align-items: center; display: flex; flex: 0 0 auto; gap: .35rem; }
.modal-card { border-radius: 5px; }
.barcode-scanner-modal { width: min(560px, calc(100vw - 2rem)); }
.scanner-count { color: var(--action-dark); font-size: .72rem; font-weight: 700; margin-top: .5rem; }
.scanner-count strong { font-size: .9rem; }
.scanner-field-row { align-items: end; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; padding: .15rem 0 .8rem; }
.scanner-field-row + .scanner-field-row { margin-top: .8rem; }
.scanner-field { flex: 1 1 auto; margin-bottom: 0 !important; }
.scanner-input { font-size: .82rem; }
.scanner-toggle { align-items: center; color: var(--muted); cursor: pointer; display: inline-flex; flex: 0 0 auto; font-size: .68rem; gap: .45rem; padding-bottom: .15rem; user-select: none; }
.scanner-toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.scanner-switch { background: #b7c2cc; border-radius: 999px; display: inline-block; height: 1.35rem; position: relative; transition: background .15s ease; width: 2.45rem; }
.scanner-switch::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.18); content: ''; height: 1.05rem; left: .15rem; position: absolute; top: .15rem; transition: transform .15s ease; width: 1.05rem; }
.scanner-toggle input:checked + .scanner-switch { background: var(--action); }
.scanner-toggle input:checked + .scanner-switch::after { transform: translateX(1.1rem); }
.scanner-toggle input:focus-visible + .scanner-switch { outline: 2px solid var(--action); outline-offset: 2px; }
.scanner-field-row:has(.scanner-toggle input:not(:checked)) .scanner-field { opacity: .55; }
.toast { background: var(--ink); border-radius: 5px; bottom: 1.5rem; box-shadow: 0 8px 30px rgba(0,0,0,.2); color: white; max-width: 430px; padding: .85rem 1rem; position: fixed; right: 1.5rem; z-index: 100; }
.toast.is-error { background: #912f3a; }


.admin-heading { margin-bottom: 1.15rem !important; }
.admin-tabs { border-bottom: 1px solid #9db9d5; display: flex; gap: 1.65rem; margin-bottom: 1rem; }
.admin-tab { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .78rem; font-weight: 700; margin-bottom: -1px; padding: .7rem .1rem .65rem; }
.admin-tab:hover { color: var(--brand); }
.admin-tab.is-active { border-bottom-color: var(--action); color: var(--brand); }
.admin-panel { display: grid; gap: 1rem; }
.admin-card { border-color: #a8c7e3; border-radius: 6px; margin-bottom: 0 !important; overflow: hidden; padding: 0; }
.admin-card-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 73px; padding: .9rem 1rem; }
.admin-card-heading .title { font-size: .98rem; }
.admin-card-heading p { color: var(--muted); font-size: .7rem; }
.policy-chip { background: var(--brand-soft); border: 1px solid #b9d7ee; border-radius: 999px; color: var(--brand); font-size: .66rem; font-weight: 700; padding: .3rem .65rem; white-space: nowrap; }
.heading-with-badge { align-items: center; display: flex; gap: .65rem; }
.security-badge { background: #fff4d8; border: 1px solid #efd08b; border-radius: 3px; color: #72500d; font-size: .61rem; font-weight: 800; letter-spacing: .025em; padding: .18rem .4rem; text-transform: uppercase; }
.capability-table { font-size: .75rem; margin: 0 !important; }
.capability-table thead th { background: #f5f8fb; border-bottom: 2px solid #9ec4e6; color: var(--brand); font-size: .62rem; letter-spacing: .035em; padding: .62rem 1rem; text-align: center; text-transform: uppercase; }
.capability-table thead th:first-child { text-align: left; width: 42%; }
.capability-table tbody th { color: var(--ink); font-size: .74rem; font-weight: 600; padding: .62rem 1rem; }
.capability-table tbody td { padding: .62rem 1rem; text-align: center; }
.capability-table td, .capability-table th { border-color: #e0e8f0; }
.capability-yes { color: #4cae4f; font-size: .95rem; font-weight: 800; }
.capability-no { color: #8a9aab; }
.access-rule { align-items: center; background: #f8fbfe; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: .69rem; gap: .6rem; padding: .62rem 1rem; }
.access-rule-mark { align-items: center; background: #dcecf8; border-radius: 50%; color: var(--brand); display: inline-flex; flex: 0 0 auto; font-size: .65rem; font-weight: 900; height: 1.2rem; justify-content: center; width: 1.2rem; }
.admin-select { background: #fff; border: 1px solid #b7cbe0; border-radius: 4px; color: var(--ink); font-size: .7rem; height: 1.9rem; max-width: 190px; padding: 0 1.8rem 0 .45rem; width: 100%; }
.danger-action { color: #9b3540 !important; }
.access-button { border-color: #92bddd; color: var(--action-dark); font-weight: 700; }
.modal-subtitle { color: var(--muted); font-size: .68rem; margin-top: .15rem; }
.external-access-modal { width: min(720px, calc(100vw - 2rem)); }
.cabinet-gallery-modal { width: min(1120px, calc(100vw - 2rem)); }
.cabinet-gallery-layout { display: grid; gap: 1rem; grid-template-columns: 250px minmax(0, 1fr); min-height: 560px; }
.cabinet-gallery-sidebar { border-right: 1px solid var(--line); min-width: 0; padding-right: 1rem; }
.gallery-pane-label { color: var(--brand); font-size: .65rem; font-weight: 800; letter-spacing: .08em; margin-bottom: .55rem; text-transform: uppercase; }
.cabinet-gallery-cabinets { display: grid; gap: .3rem; max-height: 510px; overflow-y: auto; }
.cabinet-gallery-cabinet { align-items: flex-start; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; font: inherit; gap: .16rem; padding: .62rem .65rem; text-align: left; width: 100%; }
.cabinet-gallery-cabinet:hover { background: #f5f8fb; border-color: #d8e5f1; }
.cabinet-gallery-cabinet.is-selected { background: var(--brand-soft); border-color: #87b8df; color: var(--brand-dark); }
.cabinet-gallery-cabinet strong { font-size: .75rem; overflow-wrap: anywhere; }
.cabinet-gallery-cabinet small { color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.cabinet-gallery-main { min-width: 0; }
.gallery-selected-heading { color: var(--brand); font-size: 1rem; font-weight: 800; margin-bottom: .75rem; min-height: 1.4rem; }
.cabinet-gallery-dropzone { align-items: center; background: #f8fbfe; border: 2px dashed #8db8d9; border-radius: 5px; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; gap: .25rem; justify-content: center; min-height: 150px; padding: 1.25rem; text-align: center; transition: background .15s ease, border-color .15s ease; }
.cabinet-gallery-dropzone:hover, .cabinet-gallery-dropzone.is-dragging { background: var(--brand-soft); border-color: var(--action); }
.cabinet-gallery-dropzone strong { color: var(--brand); font-size: .82rem; }
.cabinet-gallery-dropzone span { font-size: .72rem; }
.cabinet-gallery-dropzone small { font-size: .64rem; }
.cabinet-gallery-dropzone.is-disabled { cursor: not-allowed; opacity: .55; }
.cabinet-gallery-dropzone.is-disabled:hover { background: #f8fbfe; border-color: #8db8d9; }
.cabinet-gallery-dropzone .gallery-upload-icon { align-items: center; background: #dcecf8; border-radius: 50%; color: var(--action-dark); display: inline-flex; font-size: 1.25rem; font-weight: 800; height: 2.25rem; justify-content: center; margin-bottom: .2rem; width: 2.25rem; }
.gallery-status { color: var(--action-dark); font-size: .7rem; height: 1.1rem; margin: .55rem 0; }
.cabinet-gallery-images { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cabinet-gallery-image { background: #fff; border: 1px solid var(--line); border-radius: 4px; min-width: 0; overflow: hidden; }
.cabinet-gallery-image-link { cursor: zoom-in; display: block; }
.cabinet-gallery-image img { aspect-ratio: 4 / 3; background: #eef3f7; display: block; height: auto; object-fit: contain; width: 100%; }
.cabinet-gallery-image-footer { align-items: center; display: flex; gap: .4rem; justify-content: space-between; padding: .42rem .5rem; }
.cabinet-gallery-image-footer > span { color: var(--muted); font-size: .65rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-empty { color: var(--muted); font-size: .7rem; padding: 1rem .25rem; }
.gallery-empty-main { grid-column: 1 / -1; padding: 2rem; text-align: center; }
.table-option-grid { display: grid; gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-option { align-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); cursor: pointer; display: flex; font-size: .73rem; gap: .55rem; min-height: 2.55rem; padding: .55rem .65rem; }
.table-option:has(input:checked) { background: var(--brand-soft); border-color: #87b8df; }
.table-option input { accent-color: var(--action); }
.current-access-section { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: .9rem; }
.grant-row { align-items: center; background: #f7f9fb; border: 1px solid #e0e8f0; border-radius: 4px; display: flex; font-size: .68rem; justify-content: space-between; margin-top: .4rem; padding: .45rem .55rem; }

@media (max-width: 900px) {
  .app-shell { padding: 1rem; }
  .project-workspace { grid-template-columns: 1fr; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .table-sidebar { overflow-x: auto; }
  #project-table-menu { display: flex; min-width: max-content; }
  .table-panel .level { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .table-panel .level-right, .table-panel .level-right .buttons { width: 100%; }
  .column-picker-options { left: 0; right: auto; }
  .admin-card-heading { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .table-option-grid { grid-template-columns: 1fr; }
  .cabinet-gallery-layout { grid-template-columns: 1fr; }
  .cabinet-gallery-sidebar { border-bottom: 1px solid var(--line); border-right: 0; padding-bottom: .8rem; padding-right: 0; }
  .cabinet-gallery-cabinets { display: flex; max-height: 150px; overflow-x: auto; overflow-y: hidden; }
  .cabinet-gallery-cabinet { flex: 0 0 180px; }
}


/* Native table layout and keyboard focus */
.native-array-values { list-style: disc; margin: 0; padding-left: 1.2rem; white-space: normal; }
.native-array-values li { margin: .15rem 0; overflow-wrap: anywhere; }
.table-panel { display: flex; flex-direction: column; height: max(520px, calc(100vh - 220px)); overflow: visible; }
.table-panel > .level, .network-tabs, .save-status { flex: 0 0 auto; }
.table-panel > .level { align-items: start; flex-wrap: wrap; gap: .75rem; }
.table-panel .level-right .buttons { flex-wrap: wrap; }
.native-table-container { overflow: auto; min-height: 0; border: 1px solid var(--line); background: #fff; }
#data-table { flex: 1 1 auto; }
#projects-table { max-height: 65vh; }
.native-table { font-size: .78rem; margin-bottom: 0 !important; color: var(--ink); }
.native-table thead { position: sticky; top: 0; z-index: 2; background: #f5f8fb; }
.native-table thead th { border-color: var(--line); vertical-align: bottom; padding: .4rem; }
.native-heading { border: 0; background: transparent; color: var(--brand); cursor: pointer; text-align: left; font: inherit; font-weight: 700; padding: .25rem 0; min-width: 85px; }
.native-heading:disabled { cursor: default; opacity: 1; }
.native-table td { border: 1px solid #e5ecf3; line-height: 1.45; min-width: 120px; max-width: 360px; white-space: pre-wrap; overflow-wrap: anywhere; padding: .5rem; }
.native-table td[data-field="__actions"], .native-table th.native-actions { min-width: 0; width: 1%; white-space: nowrap; padding: .25rem; }
.native-table .uat-row-actions { gap: .1rem; }
.native-table .uat-row-actions button { padding: 0 .2rem; min-width: 1.2rem; }
.native-table td.native-long-text { min-width: 220px; }
.native-table td:focus { outline: 2px solid var(--action); outline-offset: -2px; background: #eaf4fc; }
.native-table td.native-duplicate-value, .native-table td.native-missing-value, .native-table td.native-overlap-value { background-color: #fbe1e5; color: #762533; }
.native-table .native-editable { cursor: text; }
.native-table td.native-disabled { background-color: #edf0f3; color: #7b8793; cursor: not-allowed; }
.native-table input, .native-table textarea { min-width: 90px; font-size: .78rem; }
.native-table td { position: relative; }
.native-table .native-cell-editor { box-sizing: border-box; inset: 2px; margin: 0; min-height: 0; min-width: 0; padding: .1rem .35rem; position: absolute; width: calc(100% - 4px); height: calc(100% - 4px); }
.native-table .native-cell-ip-editor { align-items: center; background: #fff; border: 1px solid var(--action); border-radius: 4px; display: flex; gap: .1rem; padding: .05rem .35rem; }
.native-table .native-cell-ip-editor:focus-within { outline: 2px solid color-mix(in srgb, var(--action) 35%, transparent); }
.native-ip-prefix { color: var(--muted); font: inherit; white-space: pre; }
.native-table .native-ip-suffix { background: transparent; border: 0; box-shadow: none; flex: 1 1 auto; font: inherit; min-width: 0; outline: 0; padding: .1rem 0; width: 100%; }
.native-table textarea.native-cell-editor { overflow: hidden; resize: none; }
.native-select { border: 1px solid var(--action); border-radius: 4px; background: white; color: var(--ink); font: inherit; min-height: 2rem; max-width: 100%; width: 100%; }
.native-section th { background: var(--brand-soft); padding: .4rem; border-block: 1px solid #c4dced; }
.native-section-bar, .native-section-content { align-items: center; display: flex; gap: .6rem; }
.native-section-content { justify-content: space-between; flex: 1; flex-wrap: wrap; }
.native-section-content .buttons { margin: 0; flex-wrap: nowrap; }
.native-section-content .button { margin-bottom: 0; }
.native-table-footer { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; padding: .5rem; font-size: .72rem; position: sticky; left: 0; }
.native-table [aria-busy="true"] { opacity: .7; }
.uat-row-actions { display: flex; gap: .25rem; }
.network-tab:focus-visible, .native-heading:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (max-width: 900px) { .table-panel { min-height: 600px; height: 75vh; } .table-panel > .level { display: block; } .table-panel .level-right { margin-top: .75rem; } }

.table-panel .level-left { justify-content: flex-start; }

.table-panel.floorplans-active { padding-bottom: .35rem; }
.table-panel.floorplans-active > .save-status { display: none; }
.floorplans-view { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.floorplan-tabs { align-items: stretch; border-bottom: 1px solid #9db9d5; display: flex; gap: .2rem; margin: .35rem 0 .65rem; min-height: 2.5rem; overflow-x: auto; }
.floorplan-tab { align-items: center; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; display: inline-flex; flex: 0 0 auto; font: inherit; font-size: .7rem; font-weight: 700; gap: .5rem; max-width: 230px; min-height: 2.5rem; padding: .45rem .55rem .4rem .65rem; }
.floorplan-tab:hover { background: #f5f8fb; color: var(--brand); }
.floorplan-tab.is-active { background: var(--brand-soft); border-bottom-color: var(--action); color: var(--brand); }
.floorplan-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floorplan-tab-remove { background: transparent; border: 0; border-radius: 3px; color: #9b3540; cursor: pointer; font-size: .9rem; line-height: 1; padding: .1rem .2rem; }
.floorplan-tab-remove:hover { background: #fbecee; }
.floorplan-canvas-toolbar { bottom: .75rem; position: absolute; right: .75rem; z-index: 1; }
.floorplan-canvas-toolbar .buttons { background: rgba(255, 255, 255, .92); border-radius: 4px; box-shadow: 0 1px 4px rgba(21, 44, 67, .18); margin-bottom: 0; }
.floorplan-canvas-toolbar .button { color: var(--brand); font-weight: 700; min-width: 2.2rem; }
.floorplan-canvas-viewport { background: #eaf0f5; border: 1px solid var(--line); border-radius: 4px; flex: 1 1 auto; min-height: 300px; overflow: hidden; position: relative; }
.floorplan-canvas-viewport canvas { cursor: grab; display: block; height: 100%; width: 100%; }
.floorplan-canvas-viewport canvas.is-dragging { cursor: grabbing; }
.floorplan-canvas-viewport canvas.is-placing { cursor: crosshair; }
.floorplan-canvas-viewport canvas.is-hovering { cursor: pointer; }
.floorplan-canvas-empty { align-items: center; color: var(--muted); display: flex; font-size: .75rem; inset: 0; justify-content: center; pointer-events: none; position: absolute; }
.floorplan-status { color: var(--action-dark); font-size: .68rem; height: .5rem; margin: .2rem 0 0; }
.floorplan-empty-tabs { color: var(--muted); font-size: .68rem; padding: .7rem .5rem; }
.floorplan-annotation-panel { background: rgba(255, 255, 255, .97); border: 1px solid #a8c7e3; border-radius: 5px; bottom: .7rem; box-shadow: 0 5px 18px rgba(16, 47, 98, .2); display: flex; flex-direction: column; left: .7rem; max-width: 430px; min-width: 260px; overflow: hidden; padding: .85rem; position: absolute; top: .7rem; width: 35%; z-index: 3; }
.floorplan-annotation-heading { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: .75rem; padding-bottom: .65rem; }
.floorplan-annotation-heading h3 { color: var(--brand); font-size: 1rem; font-weight: 800; }
.floorplan-panel-eyebrow { color: var(--action-dark); font-size: .58rem; font-weight: 800; letter-spacing: .11em; margin-bottom: .12rem; text-transform: uppercase; }
.floorplan-annotation-count { background: var(--brand-soft); border-radius: 999px; color: var(--brand); font-size: .63rem; font-weight: 700; padding: .28rem .5rem; white-space: nowrap; }
.floorplan-name-form { border-bottom: 1px solid var(--line); margin-bottom: .75rem; padding-bottom: .75rem; }
.floorplan-name-form label, .floorplan-note-label { color: var(--brand); display: block; font-size: .65rem; font-weight: 700; margin-bottom: .3rem; }
.floorplan-note-label span { color: var(--muted); font-weight: 500; }
.floorplan-name-controls { align-items: stretch; display: flex; gap: .4rem; }
.floorplan-name-controls .input { border-color: #b7cbe0; font-size: .72rem; min-width: 0; }
.floorplan-name-controls .button { flex: 0 0 auto; font-size: .68rem; }
.floorplan-panel-label { color: var(--brand); font-size: .64rem; font-weight: 800; letter-spacing: .07em; margin-bottom: .45rem; text-transform: uppercase; }
.floorplan-add-section { border-bottom: 1px solid var(--line); padding-bottom: .75rem; }
.floorplan-add-section .textarea { border-color: #b7cbe0; font-size: .72rem; min-height: 4.3rem; resize: vertical; }
.floorplan-placement-actions { display: flex; gap: .4rem; margin-top: .45rem; }
.floorplan-placement-actions .button, .floorplan-cabinet-control .button { font-size: .68rem; font-weight: 700; }
.floorplan-cabinet-control { border-top: 1px solid #e2eaf2; margin-top: .65rem; padding-top: .65rem; }
.floorplan-cabinet-control .select, .floorplan-cabinet-control select { width: 100%; }
.floorplan-cabinet-control select { border-color: #b7cbe0; color: var(--ink); font-size: .7rem; height: 2.1rem; }
.floorplan-cabinet-control .button { margin-top: .45rem; }
.floorplan-annotation-hint { color: var(--muted); font-size: .64rem; line-height: 1.4; margin-top: .6rem; }
.floorplan-annotation-list-heading { padding: .75rem 0 .4rem; }
.floorplan-annotation-list { display: grid; flex: 1 1 auto; gap: .4rem; min-height: 0; overflow-y: auto; }
.floorplan-annotation-empty { color: var(--muted); font-size: .68rem; padding: .55rem .2rem; }
.floorplan-annotation-item { align-items: center; background: #f8fbfe; border: 1px solid #dbe7f1; border-left: 3px solid var(--action); border-radius: 4px; display: grid; gap: .45rem; grid-template-columns: auto minmax(0, 1fr) auto; padding: .45rem .4rem; }
.floorplan-annotation-item.is-cabinet { border-left-color: #e58b2d; }
.floorplan-annotation-swatch { border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(16, 47, 98, .3); display: block; height: .75rem; width: .75rem; }
.floorplan-annotation-item.is-cabinet .floorplan-annotation-swatch { border-radius: 1px; transform: rotate(45deg); }
.floorplan-annotation-copy { min-width: 0; }
.floorplan-annotation-copy strong, .floorplan-annotation-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floorplan-annotation-copy strong { color: var(--ink); font-size: .69rem; }
.floorplan-annotation-copy small { color: var(--muted); font-size: .6rem; margin-top: .12rem; }
.floorplan-annotation-actions { display: flex; gap: .25rem; }
.floorplan-annotation-actions .button { font-size: .59rem; height: 1.8rem; padding-left: .4rem; padding-right: .4rem; }
@media (max-width: 600px) {
  .floorplan-canvas-viewport { min-height: 340px; }
  .floorplan-annotation-panel { bottom: .5rem; left: .5rem; max-height: calc(100% - 1rem); min-width: 0; right: .5rem; top: auto; width: auto; }
  .floorplan-annotation-list { max-height: 9rem; }
}

.native-multiselect-summary { align-items: center; display: flex; gap: 1rem; justify-content: space-between; white-space: normal; }
.native-multiselect-values { list-style: disc; margin: 0; padding-left: 1rem; }
.native-multiselect-summary > span { color: var(--brand); }
.native-multiselect-menu { background: #fff; border: 1px solid #a8c7e3; border-radius: 5px; box-shadow: 0 5px 18px rgba(16, 47, 98, .2); color: var(--ink); font-size: .8rem; padding: .8rem; position: fixed; z-index: 100; }
.native-multiselect-menu > strong { color: var(--brand); display: block; margin-bottom: .5rem; }
.native-multiselect-menu label { align-items: center; cursor: pointer; display: flex; gap: .6rem; padding: .55rem .2rem; }
.native-multiselect-menu label:hover { background: var(--brand-soft); }
.native-multiselect-menu input { accent-color: var(--brand); }
.native-multiselect-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .6rem; }

/* The project index is a read-only list, so it uses a quieter report-style table
   instead of the cell-oriented native editor used inside project workspaces. */
#projects-table { max-height: none; overflow: visible; }
.projects-table-container { background: #fff; overflow-x: auto; }
.projects-table { color: var(--ink); font-size: .77rem; margin: 0 !important; }
.projects-table thead th { background: #f7f9fc; border-bottom: 2px solid #9ec4e6; border-top: 0; color: var(--brand); font-size: .63rem; letter-spacing: .035em; padding: .78rem .65rem; text-transform: uppercase; white-space: nowrap; }
.projects-table tbody td { border-bottom: 1px solid #e4ebf2; border-top: 0; padding: .78rem .65rem; vertical-align: middle; white-space: nowrap; }
.projects-table tbody tr:last-child td { border-bottom: 0; }
.projects-table .project-row { cursor: pointer; outline: none; }
.projects-table .project-row:hover td { background: #f8fbfe; }
.projects-table .project-row:focus-visible td { background: var(--brand-soft); box-shadow: inset 0 2px 0 var(--action), inset 0 -2px 0 var(--action); }
.projects-table .project-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.projects-table .project-name { color: var(--brand); font-weight: 700; min-width: 180px; }
.projects-table .project-manager { color: var(--muted); }
.projects-table .project-table-count { font-variant-numeric: tabular-nums; text-align: center; }
.projects-table .project-updated { color: var(--muted); white-space: nowrap; }
.projects-table .status-value { font-size: .68rem; padding-left: .55rem; padding-right: .55rem; }
.projects-table-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; padding: .7rem .65rem; text-align: right; }
.projects-empty-state { color: var(--muted); padding: 4rem 2rem; text-align: center; }
@media (max-width: 900px) { .projects-table { min-width: 1040px; } }
