:root { color-scheme: dark; font-family: 'Segoe UI', system-ui, sans-serif; background: #111322; color: #edf0ff;
  --panel: #181b2d; --chrome: #15182b; --toolbar: #1b2036; --control: #222840; --drawing: #101321;
  --line: #37415d; --muted: #b6bfd7; --accent: #a8b8ff; --accent-hover: #c6d0ff;
  --active: #313c65; --active-border: #6576ad; --column: #a5c1ef; --beam: #64d9e7; --brace: #ecb684;
}
* { box-sizing: border-box; }
body { margin: 0; }
.bh-bim { --accent: var(--bh-accent, #a8b8ff); }
button, input, select { font: inherit; }
button, input, select { border: 1px solid var(--line); border-radius: 6px; background: var(--control); color: inherit; }
button { cursor: pointer; padding: .48rem .7rem; white-space: nowrap; }
button:hover { background: var(--active); border-color: var(--active-border); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }
button[aria-pressed="true"], #elevation-view.active { color: #edf0ff; background: var(--active); border-color: var(--active-border); }
button.primary { background: var(--accent); color: #161c35; border-color: var(--accent); font-weight: 650; }
button.primary:hover { background: var(--accent-hover); }
input, select { width: 100%; min-width: 0; padding: .5rem .6rem; }
h2, .section-title { font-size: .875rem; margin: 0; font-weight: 650; color: #e0e9f9; }
.topbar { min-height: 67px; padding: .65rem 1rem; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; background: var(--chrome); }
.brand { font-weight: 700; font-size: 1.14rem; display: flex; align-items: center; gap: .65rem; }
.brand-home { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--control); }
.brand-home:hover { border-color: var(--accent); }
.jlc-brand-logo { display: block; object-fit: contain; }
.brand .suite-app-icon { border: 1px solid var(--accent); }
.brand small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; margin-top: .15rem; }
.file-actions, .tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.tools select { width: auto; }
#wall-width-tool { width: 10rem; }
[hidden] { display: none !important; }
.file-actions, .toolbar, .panel { font-size: .875rem; }
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr) 224px; height: calc(100dvh - 67px); min-height: 400px; }
.panel { padding: 1rem; background: var(--panel); min-width: 0; min-height: 0; overflow: auto; }
.project { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.section-title { display: block; margin-bottom: .65rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 1.25rem 0 .45rem; }
.section-heading button { padding: .15rem .5rem; }
.section-heading span { color: var(--muted); }
.grid-summary, .level-filter { color: var(--muted); }
.grid-summary { margin: .25rem 0 .85rem; }
.level-filter { display: flex; align-items: center; gap: .4rem; margin: .35rem 0 .6rem; }
.level-filter input { width: auto; margin: 0; }
.row { display: flex; gap: .5rem; align-items: center; justify-content: space-between; width: 100%; text-align: left; margin-bottom: .2rem; background: transparent; border-color: transparent; }
.row strong { overflow: hidden; text-overflow: ellipsis; }
.row small { color: var(--muted); font-size: .78rem; }
#members .row[aria-pressed="true"] { color: #ff9aa0; background: #402233; border-color: #b54a59; }
.member-list { max-height: 42vh; overflow: auto; }
.example { margin-top: 1rem; width: 100%; }
.library-example { display: inline-block; margin-top: .45rem; color: var(--accent); text-underline-offset: .15em; }
.viewport { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; flex-wrap: wrap; padding: .65rem; justify-content: space-between; gap: .5rem; background: var(--toolbar); border-bottom: 1px solid var(--line); }
.tool-stack { display: grid; gap: .4rem; }
.toolbar > .tools { align-content: start; }
.drawing { min-height: 0; flex: 1; position: relative; background: var(--drawing); overflow: hidden; }
canvas { position: absolute; width: 100%; height: 100%; touch-action: none; }
canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.drawing.shaded canvas { cursor: grab; }
.drawing.shaded canvas:active { cursor: grabbing; }
.drawing.shaded .view-label, .drawing.shaded .nav-tip { background: #fff; border-color: #cad4db; color: #3b5266; }
.drawing.architectural .view-label, .drawing.architectural .nav-tip { background: #fff; border-color: #c7d3d9; color: #344c5a; }
.presentation .topbar, .presentation .panel, .presentation .status, .presentation .nav-tip, .presentation .view-label,
.presentation .toolbar > :not(.presentation-tools) { display: none; }
.presentation .workspace { height: 100dvh; grid-template-columns: minmax(0, 1fr); }
.presentation .viewport { grid-column: 1; grid-row: 1; }
.presentation .toolbar { justify-content: end; }
.view-label, .nav-tip { position: absolute; pointer-events: none; padding: .36rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--chrome); color: var(--muted); font-size: .8rem; }
.view-label { top: .85rem; left: .85rem; }
.nav-tip { bottom: .85rem; right: .85rem; }
.exact-move { position: absolute; top: .85rem; right: .85rem; display: grid; gap: .45rem; width: min(13rem, calc(100% - 1.7rem));
  padding: .7rem; background: var(--chrome); border: 1px solid var(--active-border); border-radius: 7px; font-size: .8rem; }
.exact-move label { display: grid; gap: .22rem; }
.exact-move p { margin: 0; color: #ffbeb5; }
.status { background: var(--toolbar); border-top: 1px solid var(--line); min-height: 2.25rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .4rem .7rem; color: var(--muted); font-size: .8rem; }
#coords { flex-shrink: 0; }
.status-tools { margin-inline-start: auto; flex-shrink: 0; }
.status-tools button { padding: .25rem .45rem; }
.status { flex-wrap: wrap; }
#properties { margin-top: .75rem; }
#properties p { color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.steel-section-picker { min-width: 0; margin: .6rem 0; padding: .45rem .55rem .6rem; border: 1px solid var(--line); border-radius: 7px; }
.steel-section-picker legend, .steel-section-picker a { color: var(--accent); }
.steel-section-picker a, .steel-section-picker p { font-size: .78rem; }
.steel-section-picker .field { margin: .4rem 0; }
#section-box-panel { border-bottom: 1px solid var(--line); margin-bottom: 1rem; padding-bottom: .85rem; }
#section-box-panel p { color: var(--muted); font-size: .8rem; }
#section-box-fields { display: grid; gap: .45rem; margin-bottom: .65rem; }
#section-box-fields input { min-width: 0; }
#view-filter-dialog { width: min(545px, 94vw); }
#quantity-dialog { width: min(1050px, 95vw); }
#quantity-content p { margin: .4rem 0 .8rem; font-size: .86rem; }
.quantity-table { max-height: 48vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.quantity-table table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.quantity-table th, .quantity-table td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); }
.quantity-table th { position: sticky; top: 0; background: #26364a; white-space: nowrap; }
.quantity-table tfoot { background: #202f42; font-weight: 700; }
.quantity-table .number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#view-filter-dialog fieldset { border: 1px solid var(--line); border-radius: 5px; }
.category-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.element-checks { max-height: 13rem; overflow: auto; }
#view-filter-dialog .view-filter-check { display: flex; align-items: baseline; gap: .5rem; margin: .3rem 0; }
.view-filter-check input { width: auto; flex: none; }
label.field, dialog label { display: block; margin: .75rem 0; color: var(--muted); }
label.field input, label.field select, dialog input { margin-top: .3rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.pair .field { margin: 0; }
.metre-field { position: relative; min-width: 0; }
.metre-field:has(> label) { margin: .75rem 0; }
:is(.pair, .exact-move) > .metre-field, .metre-field > label { margin: 0; }
.metre-field input { appearance: textfield; padding-right: 1.7rem; }
.metre-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.metre-field:has(input[hidden]), .metre-field:has(input:is(:disabled, [readonly])) .metre-step-buttons { display: none; }
.metre-step-buttons { position: absolute; inset-inline-end: .25rem; bottom: .22rem; display: grid; }
.metre-step-buttons button { width: 1.15rem; height: .9rem; padding: 0; line-height: 1; font-size: .72rem; border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .78rem; }
.legend span::before { display: inline-block; width: 7px; height: 7px; margin-right: .3rem; border-radius: 50%; content: ''; background: currentColor; }
.column { color: var(--column); } .beam { color: var(--beam); } .brace { color: var(--brace); }
.danger { color: #ffc0c0; }
dialog { color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(470px, 94vw); padding: 1.3rem; }
dialog::backdrop { background: #070b12c9; }
dialog h2 { font-size: 1.12rem; }
dialog p { color: var(--muted); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 174px minmax(0, 1fr) 178px; } .panel { padding: .7rem; } }
@media (max-width: 760px) { .workspace { grid-template-columns: 1fr 1fr; height: auto; } .viewport { grid-column: 1 / -1; grid-row: 1; } .drawing { min-height: 52vh; } .inspector { border-left: 0; } .panel { border-top: 1px solid var(--line); overflow: visible; } .member-list { max-height: 12rem; } }
