:root {
  --navy: #0c2e48;
  --navy-2: #123e5e;
  --blue: #1478b8;
  --blue-soft: #e8f4fb;
  --orange: #f28a2e;
  --orange-dark: #d96912;
  --ink: #14212b;
  --muted: #667784;
  --line: #d9e2e8;
  --paper: #ffffff;
  --canvas: #f3f6f8;
  --success: #1e8a5b;
  --danger: #c43e45;
  --shadow: 0 10px 30px rgba(12, 46, 72, .12);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--canvas); }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; padding-top: env(safe-area-inset-top); }
.auth-mode .topbar, .auth-mode .drawer, .auth-mode .scrim { display: none !important; }
.auth-mode .app-shell { padding-top: 0; }
.auth-mode .view { width: 100%; max-width: none; min-height: 100vh; padding: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30; min-height: 64px; display: flex; align-items: center;
  padding: 8px 12px; color: #fff; background: linear-gradient(120deg, var(--navy), var(--navy-2));
  box-shadow: 0 5px 16px rgba(12, 46, 72, .2);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  color: #fff; font-size: 14px; font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(145deg, var(--orange), var(--orange-dark)); border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}
.brand-mark.large { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy small { margin-top: 3px; color: #bfd4e2; font-size: 11px; }
.icon-btn, .top-action {
  min-width: 42px; height: 42px; border: 0; border-radius: 12px; color: #fff; background: transparent;
  display: inline-grid; place-items: center; font-size: 22px;
}
.icon-btn:active, .top-action:active { background: rgba(255,255,255,.12); }
.top-actions { display: flex; gap: 2px; align-items: center; }
.top-action { font-size: 13px; min-width: auto; padding: 0 10px; font-weight: 700; }
.desktop-actions { display: flex; align-items: center; gap: 8px; margin-right: 5px; }
.connection-status { min-width: 66px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #d8edf8; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 850; text-align: center; }
.connection-status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #64d69b; box-shadow: 0 0 0 3px rgba(100,214,155,.13); }
.connection-status.offline::before { background: #f6b766; box-shadow: 0 0 0 3px rgba(246,183,102,.13); }
.install-app-btn,.pc-version-btn { min-height: 36px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 850; }
.install-app-btn:hover,.pc-version-btn:hover { background: #1989cc; }

.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(84vw, 330px); padding-top: env(safe-area-inset-top);
  color: #fff; background: #0a253a; transform: translateX(-102%); transition: transform .22s ease;
  box-shadow: 16px 0 40px rgba(0,0,0,.25); display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 28px 22px 22px; display: flex; gap: 13px; align-items: center; background: rgba(255,255,255,.035); }
.drawer-head div { display: flex; flex-direction: column; min-width: 0; }
.drawer-head strong { font-size: 17px; }
.drawer-head small { margin-top: 5px; color: #a9c3d5; font-size: 11px; }
.drawer nav { padding: 16px 10px; display: grid; gap: 5px; }
.drawer nav button { border: 0; border-radius: 12px; padding: 14px; color: #e8f2f8; background: transparent; text-align: left; }
.drawer nav button span { display: inline-block; width: 40px; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .25px; }
.drawer nav button .nav-new { float: right; margin-top: -2px; padding: 3px 6px; border-radius: 999px; color: #fff; background: var(--orange); font-size: 8px; letter-spacing: .5px; }
.drawer nav button:active { background: rgba(255,255,255,.08); }
.drawer-foot { margin-top: auto; padding: 20px 22px calc(20px + env(safe-area-inset-bottom)); color: #7999ad; font-size: 11px; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(3, 15, 24, .56); backdrop-filter: blur(2px); }

.view { width: min(1180px, 100%); margin: 0 auto; padding: 18px 14px calc(28px + env(safe-area-inset-bottom)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 2px 18px; }
.page-head h1 { margin: 0; font-size: clamp(23px, 5vw, 32px); letter-spacing: -.6px; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 8px; }
.btn {
  min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 15px;
  color: var(--ink); background: #fff; font-weight: 750; box-shadow: 0 2px 5px rgba(12,46,72,.05);
}
.btn.primary { color: #fff; border-color: var(--orange); background: var(--orange); }
.btn.primary:active { background: var(--orange-dark); }
.btn.blue { color: #fff; border-color: var(--blue); background: var(--blue); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.danger { color: #fff; border-color: var(--danger); background: var(--danger); }
.btn.small { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.btn:disabled { opacity: .42; cursor: default; }

.search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-bottom: 16px; }
.project-search-row { grid-template-columns: minmax(0,1fr) minmax(150px,210px) auto; margin-bottom: 9px; }
.workspace-quick-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: -2px 0 17px; }
.quick-action { min-width: 0; min-height: 86px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 12px; border: 1px solid #d9e3e8; border-radius: 14px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 4px 12px rgba(12,46,72,.055); }
.quick-action > span { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 950; }
.quick-action strong { align-self: end; font-size: 13px; }
.quick-action small { align-self: start; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.quick-action.primary { color: #fff; border-color: var(--orange); background: linear-gradient(135deg,var(--orange),var(--orange-dark)); }
.quick-action.primary > span { color: var(--orange-dark); background: #fff; font-size: 20px; }
.quick-action.primary small { color: #fff2e6; }
.status-filter { display: flex; gap: 7px; margin: 0 0 16px; overflow-x: auto; }
.status-filter button { flex: 0 0 auto; min-height: 34px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 850; }
.status-filter button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; padding: 12px 13px;
  color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,120,184,.11); }
.input[readonly] { color: #536470; background: #eef3f6; }
.textarea { min-height: 88px; resize: vertical; }
.field { display: grid; gap: 6px; }
.field label { color: #536470; font-size: 12px; font-weight: 750; }
.field-help { color: var(--muted); font-size: 10px; line-height: 1.45; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.field-grid .wide { grid-column: 1 / -1; }
.radio-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.radio-row.three { grid-template-columns: repeat(3,1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; background: #fff; font-weight: 750; }
.choice input:checked + span { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(275px,1fr)); gap: 14px; }
.customer-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.customer-summary > div { display: grid; gap: 3px; padding: 15px 17px; border: 1px solid #e0e8ec; border-radius: 14px; background: #fff; }
.customer-summary strong { color: var(--navy); font-size: 24px; }
.customer-summary span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.customer-grid { display: grid; gap: 10px; }
.customer-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 15px; }
.customer-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,var(--navy),var(--blue)); font-size: 13px; font-weight: 950; }
.customer-copy { min-width: 0; display: grid; gap: 3px; }
.customer-copy strong { font-size: 15px; }
.customer-copy span { color: var(--blue); font-size: 12px; font-weight: 750; }
.customer-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-project-count { min-width: 64px; display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #f2f6f8; text-align: center; }
.customer-project-count strong { color: var(--navy); font-size: 17px; }
.customer-project-count small { color: var(--muted); font-size: 8px; letter-spacing: .5px; }
.title-new { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 4px 7px; border-radius: 999px; color: #fff; background: var(--orange); font-size: 8px; letter-spacing: .5px; }
.library-tabs,.bom-tabs { display: flex; gap: 7px; margin-bottom: 14px; overflow-x: auto; }
.library-tabs button,.bom-tabs button { flex: 0 0 auto; min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 850; }
.library-tabs button.active,.bom-tabs button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.library-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.library-card { overflow: hidden; padding: 12px; }
.library-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .5px; }
.library-card-head b { padding: 4px 7px; border-radius: 999px; color: #9b4c0c; background: var(--orange-soft); font-size: 8px; }
.library-drawing { height: 180px; display: grid; place-items: center; margin: 9px 0; padding: 10px; border: 1px solid #e2eaee; border-radius: 12px; background: linear-gradient(#f7fafb,#eef4f7); }
.library-drawing .window-svg { width: 100%; height: 100%; }
.library-card-copy { display: grid; gap: 4px; margin-bottom: 11px; }
.library-card-copy small { color: var(--orange-dark); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.library-card-copy strong { font-size: 15px; }
.library-card-copy span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.library-card > .btn { width: 100%; }
.bom-context { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: center; gap: 12px; margin-bottom: 14px; padding: 13px 15px; }
.bom-context > div { min-width: 0; display: grid; gap: 3px; }
.bom-context small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .5px; }
.bom-context strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.bom-context > span { padding: 6px 9px; border-radius: 999px; color: #16714a; background: #e5f6ed; font-size: 9px; font-weight: 900; }
.bom-content { padding: 15px; overflow: hidden; }
.bom-toolbar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; gap: 10px; margin-bottom: 13px; }
.bom-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.bom-rule-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.bom-rule-table th { padding: 9px; color: var(--muted); background: #f0f5f7; font-size: 9px; text-align: left; text-transform: uppercase; }
.bom-rule-table td { padding: 7px 9px; border-bottom: 1px solid #e4eaed; font-size: 11px; }
.bom-rule-table input { width: 100%; min-width: 62px; border: 1px solid #dce5ea; border-radius: 7px; padding: 6px 7px; background: #fff; font-size: 10px; }
.formula-strip { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding: 11px 12px; border: 1px solid #b8d8e9; border-radius: 11px; color: #235c7c; background: #edf7fc; font-size: 11px; }
.formula-strip span { margin-left: auto; font-weight: 850; }
.bom-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.bom-card-grid article { display: grid; gap: 7px; padding: 15px; border: 1px solid #e0e8ec; border-radius: 13px; background: #f9fbfc; }
.bom-card-grid small { color: var(--orange-dark); font-size: 8px; font-weight: 900; }
.bom-card-grid strong { font-size: 13px; }
.bom-card-grid p { min-height: 30px; margin: 0; color: var(--muted); font-size: 10px; }
.bom-card-grid b { color: var(--blue); font-size: 11px; }
.condition-card { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 13px; border: 1px solid #ead6ae; border-radius: 12px; color: #75500f; background: #fff9e9; font-size: 10px; }
.condition-card span { margin-left: auto; }
.costing-flow { display: grid; grid-template-columns: repeat(7,auto); align-items: center; justify-content: center; gap: 9px; padding: 14px; }
.costing-flow > div { min-width: 128px; display: grid; gap: 5px; padding: 14px; border: 1px solid #dfe7eb; border-radius: 12px; background: #f8fafb; text-align: center; }
.costing-flow small { color: var(--muted); font-size: 8px; font-weight: 850; }
.costing-flow strong { color: var(--navy); font-size: 18px; }
.costing-flow span { color: var(--muted); font-size: 9px; }
.quotation-total-preview { width: min(520px,100%); display: grid; gap: 8px; margin: 8px auto 0; padding: 15px; border-radius: 14px; color: #fff; background: linear-gradient(140deg,var(--navy),var(--navy-2)); }
.quotation-total-preview > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.quotation-total-preview .grand { margin-top: 3px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); font-size: 16px; }
.quotation-total-preview > small { color: #bad2df; font-size: 9px; line-height: 1.4; }
.editable-dimension { cursor: pointer; }
.dim-text.editable-dimension { fill: #b9560f; font-weight: 950; text-decoration: underline; }
.dimension-label-bg.editable-dimension { fill: #fff0e1; stroke: #ef9b55; stroke-width: .7; }
.quick-measure-copy { display: grid; gap: 7px; margin-bottom: 14px; padding: 13px; border: 1px solid #b9d9e9; border-radius: 12px; background: #eef8fd; }
.quick-measure-copy span { color: var(--orange-dark); font-size: 8px; font-weight: 950; letter-spacing: .7px; }
.quick-measure-copy strong { color: var(--navy); font-size: 16px; }
.quick-measure-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.quick-measure-input { color: var(--blue); font-size: 22px; font-weight: 900; text-align: center; }
.selected-part-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.interior-view-badge { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 9px; border-radius: 999px; color: #1d6748; background: #e6f7ef; font-size: 9px; font-weight: 900; white-space: nowrap; }

@media (max-width: 900px) {
  .workspace-quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bom-context { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bom-context > span { grid-column: 1 / -1; width: max-content; }
  .bom-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bom-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .costing-flow { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .costing-flow > b { display: none; }
  .costing-flow > div { min-width: 0; }
}

@media (max-width: 600px) {
  .workspace-quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-action { min-height: 76px; padding: 9px; grid-template-columns: 30px 1fr; column-gap: 8px; }
  .quick-action > span { width: 30px; height: 30px; }
  .quick-action strong { font-size: 11px; }
  .customer-summary { grid-template-columns: repeat(3,1fr); gap: 6px; }
  .customer-summary > div { padding: 11px 9px; }
  .customer-summary strong { font-size: 18px; }
  .customer-card { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; }
  .customer-card > .btn { grid-column: 1 / -1; }
  .customer-project-count { min-width: 54px; }
  .library-grid,.bom-card-grid { grid-template-columns: 1fr; }
  .library-drawing { height: 155px; }
  .bom-toolbar { grid-template-columns: 1fr; }
  .formula-strip { align-items: flex-start; flex-direction: column; }
  .formula-strip span { margin-left: 0; }
  .condition-card { align-items: flex-start; flex-direction: column; gap: 7px; }
  .condition-card span { margin-left: 0; }
  .costing-flow { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 4px; }
}
.card { border: 1px solid #e1e8ec; border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 15px rgba(12,46,72,.07); }
.project-card { position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.project-card:active { transform: scale(.99); }
.project-accent { height: 5px; background: linear-gradient(90deg,var(--orange),#ffbb76); }
.project-card[data-material="Aluminium"] .project-accent { background: linear-gradient(90deg,var(--blue),#75c2ef); }
.project-body { padding: 16px; }
.project-top { display: flex; gap: 12px; align-items: flex-start; }
.project-number { width: 48px; height: 48px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); font-size: 13px; line-height: 1.05; font-weight: 900; }
.project-number small { margin-top: 3px; font-size: 9px; letter-spacing: .6px; color: #5d7787; }
.project-title { min-width: 0; flex: 1; }
.project-title h3 { margin: 2px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.project-title p { margin: 0; color: var(--muted); font-size: 12px; }
.card-menu { border: 0; border-radius: 9px; width: 34px; height: 34px; color: var(--muted); background: #f4f7f8; font-weight: 900; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 16px; }
.stat { padding: 9px 7px; border-radius: 11px; background: #f5f8fa; text-align: center; }
.stat strong { display: block; color: var(--navy); font-size: 14px; }
.stat small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .4px; }
.project-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; color: var(--muted); font-size: 11px; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; color: #266641; background: #e8f7ef; font-size: 10px; font-weight: 800; }
.pill.aluminium { color: #225d80; background: var(--blue-soft); }
.project-status { display: inline-flex; margin-left: 4px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.project-status.draft { color: #76500e; background: #fff2cc; }
.project-status.approved { color: #176b45; background: #e4f6ed; }
.project-status.completed { color: #225d80; background: #e4f3fc; }
.approval-lock-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 16px; padding: 13px 16px; border: 1px solid #8dc6ae; border-radius: 15px; color: #175f42; background: linear-gradient(110deg,#e6f7ef,#f5fbf8); box-shadow: 0 8px 22px rgba(27,104,73,.08); }
.approval-lock-banner div { display: grid; gap: 3px; }
.approval-lock-banner strong { font-size: 14px; }
.approval-lock-banner span { color: #4d7464; font-size: 11px; }
.approval-lock-copy { display: grid; gap: 10px; }
.approval-lock-copy h3, .approval-lock-copy p { margin: 0; }
.approval-designer-lock { display: grid; gap: 9px; margin: 12px; padding: 18px; border: 1px solid #8dc6ae; border-radius: 16px; background: linear-gradient(145deg,#e7f7ef,#f8fcfa); }
.approval-designer-lock > span { width: max-content; padding: 5px 9px; border-radius: 999px; color: #176b45; background: #d4f0e2; font-size: 10px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.approval-designer-lock h3, .approval-designer-lock p { margin: 0; }
.approval-designer-lock p { color: #527064; font-size: 12px; line-height: 1.5; }
.project-locked .designer-stage { border-color: #a9d7c4; }

.empty { padding: 50px 20px; text-align: center; border: 1px dashed #cbd8df; border-radius: var(--radius); background: rgba(255,255,255,.65); }
.empty-icon { width: 70px; height: 70px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 22px; color: var(--blue); background: var(--blue-soft); font-size: 32px; }
.empty h3 { margin: 0 0 7px; }
.empty p { max-width: 420px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; }

.project-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 14px; }
.summary-tile { padding: 16px 10px; text-align: center; }
.summary-tile strong { display: block; color: var(--navy); font-size: 23px; line-height: 1.15; }
.summary-tile span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 14px; }
.item-card { overflow: hidden; }
.item-preview { height: 210px; min-width: 0; min-height: 0; overflow: hidden; padding: 7px 10px; background: linear-gradient(150deg,#f8fbfc,#edf3f6); display: grid; place-items: center; }
.item-preview .window-svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; overflow: hidden; }
.item-info { padding: 13px 14px; border-top: 1px solid var(--line); }
.item-info-top { display: flex; align-items: center; gap: 8px; }
.item-no { color: var(--orange-dark); font-size: 18px; font-weight: 900; }
.item-name { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 750; }
.item-meta { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }
.item-meta span:first-child { color: var(--navy); font-size: 14px; font-weight: 900; }

.window-svg { width: 100%; height: 100%; max-width: 390px; max-height: 280px; overflow: visible; }
.frame-line { fill: #eef8fd; stroke: var(--navy); stroke-width: 5; }
.frame-inner { fill: #dff3fc; stroke: #2c719b; stroke-width: 2.2; }
.bevel-frame { shape-rendering: geometricPrecision; }
.bevel-outline { fill: none; stroke: #1f2c32; stroke-width: 1; }
.bevel-inner-line { fill: none; stroke: rgba(22,40,49,.82); stroke-width: .78; }
.glazing-bead-line { fill: none; stroke: rgba(40,61,70,.62); stroke-width: .5; }
.mitre-line { stroke: #1f2c32; stroke-width: .88; stroke-linecap: square; }
.outer-frame .bevel-outline { stroke-width: 1.18; }
.outer-frame .mitre-line { stroke-width: 1.02; }
.sash-frame .bevel-outline { stroke-width: .82; }
.sash-frame .mitre-line { stroke-width: .72; }
.sash-frame .glazing-bead-line { stroke-width: .44; }
.fixed-frame { opacity: 1; }
.glass-panel { filter: drop-shadow(inset 0 0 3px rgba(42,78,95,.18)); }
.window-svg[data-glass-type="frosted"] .glass-panel { filter: saturate(.35) brightness(1.04); opacity: .96; }
.window-svg[data-glass-type="reflective"] .glass-panel { stroke: rgba(255,255,255,.8); stroke-width: .7; filter: saturate(.72) contrast(1.05); }
.window-svg[data-glass-type="laminated"] .glass-panel { stroke: rgba(49,126,122,.32); stroke-width: .55; }
.window-svg[data-glass-type="dgu"] .glass-panel { stroke: rgba(42,108,143,.58); stroke-width: .85; }
.window-svg[data-glass-type="low-e"] .glass-panel { stroke: rgba(46,121,105,.35); stroke-width: .55; }
.mullion { stroke: var(--navy); stroke-width: 4.2; stroke-linecap: butt; }
.opening-line { fill: none; stroke: #26363e; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.panel-fill { fill: #e4e7e9; }
.louver-fill { fill: #fff; stroke: #aeb9bf; stroke-width: 1; }
.louver-line { stroke: #d0d7db; stroke-width: 2.5; stroke-linecap: round; }
.fan-ring { fill: rgba(255,255,255,.72); stroke: #4f6675; stroke-width: 2.2; }
.fan-hub { fill: #4f6675; }
.fan-blade { fill: #7f95a2; stroke: #4f6675; stroke-width: .7; }
.annotation-text { fill: var(--orange-dark); font-size: 8px; font-weight: 800; }
.selected-pane { fill: rgba(242,138,46,.12); stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 4; }
.slider-panel-hit { fill: transparent; stroke: transparent; stroke-width: 1.8; pointer-events: all; cursor: pointer; }
.slider-panel-hit.selected-slider-panel { fill: rgba(242,138,46,.09); stroke: var(--orange); stroke-dasharray: 5 3; }
.slider-part-selection { pointer-events: none; }
.dim-text { fill: #24343c; font-size: 9px; font-weight: 850; paint-order: stroke; stroke: #fff; stroke-width: 2.4px; }
.dimension-line, .dimension-tick { stroke: #52636c; stroke-width: .75; }
.dimension-label-bg { fill: #fff; opacity: 1; }
.vertical-dimension { stroke-width: 3px; }
.slide-arrow { fill: none; stroke: #26363e; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.slider-profile-bed { stroke: none; }
.slider-track-line { stroke: rgba(25,42,51,.65); stroke-width: .48; }
.meeting-profile-outline { fill: none; stroke: #16252c; stroke-width: .82; stroke-linejoin: miter; }
.meeting-profile-face, .meeting-profile-light { stroke: none; }
.meeting-depth-shadow { stroke: none; filter: none; }
.meeting-rear-edge { stroke: #101c22; stroke-width: .72; }
.meeting-profile-highlight { stroke: #26363e; stroke-width: .48; }
.casement-meeting-face { stroke: #16252c; stroke-width: .7; }
.casement-meeting-highlight { stroke: rgba(255,255,255,.72); stroke-width: .55; }
.casement-meeting-seam { stroke: #101c22; stroke-width: .82; }
.casement-meeting-shadow { stroke: rgba(15,28,34,.72); stroke-width: .55; }
.overlap-sash .bevel-outline, .overlap-sash .bevel-inner-line, .overlap-sash .glazing-bead-line { fill: none; }
.asymmetric-interlock { pointer-events: none; }
.central-slider-lock { pointer-events: none; }
.mesh-frame { opacity: 1; }
.mesh-fill { fill: rgba(198,215,219,.54); stroke: rgba(43,66,76,.72); stroke-width: .5; }
.mesh-line { stroke: rgba(55,82,91,.62); stroke-width: .38; }
.mesh-line.secondary { opacity: .7; }
.mesh-track-overlay { pointer-events: none; }
.mesh-track-border { fill: none; stroke-width: .72; }
.mesh-label { fill: #314954; font-size: 6px; font-weight: 900; paint-order: stroke; stroke: rgba(255,255,255,.88); stroke-width: 1.7px; }
.component-dimension { pointer-events: none; }
.component-dimension-line, .component-dimension-tick { stroke: #60727b; stroke-width: .48; }
.component-dimension-bg { fill: rgba(255,255,255,.96); }
.component-dimension-text { fill: #334851; font-size: 4.4px; font-weight: 850; }
.component-width-dimension .component-dimension-line, .component-width-dimension .component-dimension-tick { stroke-width: .6; }
.component-width-dimension .component-dimension-text { font-size: 6px; font-weight: 900; }
.part-divider { stroke: #2c719b; stroke-width: 1.5; }
.part-name, .part-dim { pointer-events: none; fill: var(--navy); font-size: 7px; font-weight: 850; paint-order: stroke; stroke: rgba(255,255,255,.86); stroke-width: 2px; }
.part-dim { fill: #516875; font-size: 6.5px; font-weight: 750; }
.shutter-label { pointer-events: none; fill: #26363e; font-size: 7px; font-weight: 800; paint-order: stroke; stroke: rgba(236,248,250,.94); stroke-width: 2px; }
.shutter-glazing-bars { pointer-events: none; }
.glazing-bar-hit { fill: transparent; pointer-events: all; cursor: pointer; }
.selected-glazing-bar .glazing-bar-face { stroke: var(--orange-dark); stroke-width: 1.15; }
.selected-glazing-bar .glazing-bar-highlight { stroke: #ffd5ad; stroke-width: .7; }
.glass-code-label { pointer-events: none; fill: #24404e; font-size: 5px; font-weight: 950; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 1.6px; }
.glazing-bar-face { stroke: #1b2a31; stroke-width: .48; }
.glazing-bar-highlight { stroke: rgba(255,255,255,.52); stroke-width: .45; }
.glazing-bar-shadow { stroke: rgba(18,31,38,.58); stroke-width: .48; }
.combo-casement-panel-hit { pointer-events: all; cursor: pointer; }
.combo-casement-panel-hit.selected-slider-panel { fill: rgba(242,138,46,.09); stroke: var(--orange); stroke-width: 1.8; stroke-dasharray: 5 3; }
.window-handle { pointer-events: none; }
.slider-handle-plate { fill: #e9eaef; stroke: #1f2b31; stroke-width: .72; }
.slider-handle-recess { fill: #b8bec7; stroke: #28383f; stroke-width: .55; }
.casement-handle-backplate { fill: #e9eaef; stroke: #1f2b31; stroke-width: .72; }
.casement-handle-lever { fill: #c7cbd2; stroke: #1f2b31; stroke-width: .65; stroke-linejoin: round; }
.door-handle .casement-handle-lever { fill: #bfc5cd; }
.hung-handle-plate { fill: #d7dce1; stroke: #1f2b31; stroke-width: .65; }
.hung-handle-detail { stroke: #f8fafb; stroke-width: .55; stroke-linecap: round; }

.designer-shell { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 14px; align-items: stretch; }
.tool-panel { padding: 12px; max-height: calc(100vh - 96px); overflow: auto; position: sticky; top: 78px; }
.designer-control-head { margin: -3px -3px 12px; padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid #b9d9e9; border-radius: 13px; background: linear-gradient(135deg,#eef8fd,#fff); }
.designer-control-head > div { min-width: 0; }
.designer-control-head small { color: var(--blue); font-size: 8px; font-weight: 900; letter-spacing: .55px; }
.designer-control-head h3 { margin: 3px 0; overflow: hidden; color: var(--navy); font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.designer-control-head p { margin: 0; color: var(--muted); font-size: 10px; }
.single-screen-actions { position: sticky; bottom: -12px; z-index: 3; margin: 15px -12px -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(7px); }
.single-screen-actions .btn { min-width: 0; padding-left: 7px; padding-right: 7px; }
.measurement-review { display: grid; gap: 7px; }
.measurement-review > div { padding: 10px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.measurement-review small { color: var(--muted); font-size: 8px; font-weight: 900; }
.measurement-review strong { color: var(--navy); font-size: 12px; }
.shutter-selector { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.shutter-selector button { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: #fff; font-size: 10px; font-weight: 900; }
.shutter-selector button.active { color: #fff; border-color: var(--orange); background: var(--orange); }
.selected-shutter-card { margin: 10px 0 2px; padding: 11px; display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; border: 1px solid #f5c18f; border-radius: 11px; background: #fff8f0; }
.selected-shutter-card small { grid-column: 1 / -1; color: var(--orange-dark); font-size: 8px; font-weight: 900; }
.selected-shutter-card strong { color: var(--navy); font-size: 20px; }
.selected-shutter-card span { color: var(--muted); font-size: 10px; }
.shutter-bar-controls { padding: 11px; border: 1px solid #bad8ea; border-radius: 12px; background: linear-gradient(145deg,#f7fcfe,#edf7fc); }
.shutter-bar-counter { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid #d8e7ee; }
.shutter-bar-counter > span { color: var(--navy); font-size: 11px; font-weight: 850; }
.shutter-bar-counter > div { display: grid; grid-template-columns: 32px 34px 32px; align-items: center; gap: 4px; }
.shutter-bar-counter button { width: 32px; height: 30px; border: 1px solid #bfd4df; border-radius: 8px; color: var(--navy); background: #fff; font-size: 18px; font-weight: 900; }
.shutter-bar-counter strong { color: var(--blue); font-size: 14px; text-align: center; }
.shutter-bar-controls > .btn { width: 100%; margin-top: 9px; }
.slider-config-summary { border-left: 3px solid var(--blue); }
.mesh-toggle { min-height: 42px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid #bad8ea; border-radius: 10px; color: var(--navy); background: #f4fbfe; font-size: 11px; font-weight: 850; cursor: pointer; }
.mesh-toggle input { width: 20px; height: 20px; accent-color: var(--blue); }
.mesh-type-options { margin-top: 11px; }
.fixed-orientation-tools { margin-bottom: 7px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.fixed-preset-tools { grid-template-columns: repeat(3,minmax(0,1fr)); }
.fixed-grid-axis { margin-top: 11px; display: grid; gap: 6px; }
.fixed-grid-axis > strong { color: var(--navy); font-size: 10px; }
.interior-view-note { margin-top: 11px; padding: 10px 11px; display: grid; gap: 2px; border: 1px solid #add2e5; border-radius: 10px; color: var(--navy); background: var(--blue-soft); }
.interior-view-note strong { font-size: 11px; }
.interior-view-note span { color: var(--muted); font-size: 9px; }
.readonly-spec { min-height: 42px; padding: 11px 12px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: #f2f6f8; font-size: 11px; font-weight: 800; }
.form-error { margin: 0; padding: 9px 10px; border: 1px solid #e5a5a9; border-radius: 9px; color: #962f37; background: #fff0f1; font-size: 11px; font-weight: 750; }
.input.invalid { border-color: #c83f48; box-shadow: 0 0 0 3px rgba(200,63,72,.12); }
.validation-card { margin: 10px 0; padding: 11px 12px; display: grid; gap: 5px; border: 1px solid #f0c7a1; border-radius: 11px; color: #6f461d; background: #fff8f0; }
.validation-card strong { color: #6f461d; font-size: 12px; }
.validation-card span { font-size: 10px; line-height: 1.45; }
.validation-card ul { margin: 2px 0 0; padding-left: 17px; }
.validation-card li { margin: 4px 0; font-size: 10px; line-height: 1.4; }
.validation-card li.error { color: var(--danger); }
.validation-card.valid { color: #176b45; border-color: #a9dbc3; background: #edf8f2; }
.validation-card.valid strong { color: #176b45; }
.validation-card.compact { margin-bottom: 12px; }
.save-complete-card { margin: 12px 0; padding: 14px; display: grid; gap: 4px; border: 1px solid #b7d9ea; border-radius: 13px; background: var(--blue-soft); }
.save-complete-card strong { color: var(--navy); }
.save-complete-card small { color: var(--muted); font-size: 10px; }
.save-indicator { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: #176b45; background: #e4f6ed; font-size: 9px; font-weight: 900; white-space: nowrap; }
.save-indicator.saving { color: #76500e; background: #fff2cc; }
.save-indicator.error { color: #9a3238; background: #fdebed; }
.guided-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.guided-actions .btn { min-width: 0; padding-left: 7px; padding-right: 7px; }
.tool-section + .tool-section { margin-top: 14px; }
.tool-title { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; }
.tools { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.number-tools { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; }
.direction-tools { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.casement-direction-tools { grid-template-columns: repeat(2,1fr); }
.number-tool { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: #fff; font-size: 12px; font-weight: 850; }
.number-tool.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.tool { min-height: 64px; border: 1px solid var(--line); border-radius: 11px; padding: 6px 4px; background: #fff; color: var(--ink); font-size: 9px; font-weight: 750; }
.tool strong { display: block; margin-bottom: 4px; color: var(--blue); font-size: 20px; line-height: 1; }
.tool.active { color: var(--orange-dark); border-color: var(--orange); background: #fff7ef; box-shadow: inset 0 0 0 1px var(--orange); }
.combo-grid-tools { grid-template-columns: repeat(2,1fr); }
.selected-part-card { margin-top: 14px; padding: 12px; display: grid; gap: 5px; border: 1px solid #bad8ea; border-radius: 12px; background: var(--blue-soft); }
.selected-part-card small { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .5px; }
.selected-part-card strong { color: var(--navy); }
.selected-part-card span { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.slider-config-note { margin: 7px 0 0; padding: 8px 9px; border-radius: 9px; color: #355466; background: #eef7fc; font-size: 10px; font-weight: 750; line-height: 1.45; }
.template-list { display: grid; gap: 8px; }
.template-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.template-row strong, .template-row small { display: block; }
.template-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.template-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.template-actions .btn { min-height: 32px; padding: 5px 8px; font-size: 10px; }
.design-colors { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 9px; }
.design-colors.single { grid-template-columns: 1fr; }
.design-colors label { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 800; }
.design-colors input { width: 32px; height: 28px; padding: 0; border: 0; background: transparent; }
.glass-spec-controls { padding: 11px; border: 1px solid #c8dfe9; border-radius: 12px; background: #f8fcfe; }
.glass-spec-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.glass-spec-grid > label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 850; }
.glass-spec-grid > label.wide { grid-column: 1 / -1; }
.glass-spec-grid .select, .glass-spec-grid .input { min-width: 0; padding: 9px 8px; border-radius: 9px; font-size: 10px; }
.glass-spec-preview { margin: 9px 0; padding: 8px; display: flex; align-items: center; gap: 8px; border: 1px solid #d4e3ea; border-radius: 9px; background: #fff; }
.glass-spec-preview > span { width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid #9cb2bc; border-radius: 7px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.46); }
.glass-spec-preview strong { color: var(--navy); font-size: 9px; line-height: 1.35; }
.glass-spec-controls > .btn { margin-top: 2px; }
.designer-shell { width: 100%; min-width: 0; }
.designer-stage { width: 100%; min-width: 0; max-width: 100%; min-height: calc(100vh - 102px); display: grid; grid-template-rows: auto minmax(0,1fr) auto auto auto; overflow: hidden; }
.designer-toolbar { padding: 10px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; border-bottom: 1px solid var(--line); overflow: visible; }
.designer-toolbar .btn { flex: 0 0 auto; }
.designer-canvas { position: relative; min-height: 380px; padding: 26px 28px; overflow: hidden; background-color: #f7fafb; background-image: linear-gradient(#e8eef1 1px, transparent 1px), linear-gradient(90deg,#e8eef1 1px,transparent 1px); background-size: 24px 24px; }
.preview-viewport { width: 100%; min-width: 0; max-width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; contain: layout paint; touch-action: none; user-select: none; }
.preview-transform { width: 100%; min-width: 0; max-width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; transform-origin: center center; will-change: transform; }
.preview-transform .window-svg { width: min(82vw, 680px); max-width: 100%; height: min(57vh, 470px); max-height: 100%; display: block; }
.preview-zoom-controls { min-height: 42px; display: flex; justify-content: flex-end; align-items: center; gap: 5px; padding: 5px 12px; border-top: 1px solid var(--line); background: #fff; }
.preview-zoom-label { margin-right: auto; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .45px; text-transform: uppercase; }
.preview-zoom-controls button { width: 34px; height: 32px; border: 0; border-radius: 8px; color: var(--navy); background: #edf4f7; font-size: 16px; font-weight: 900; }
.preview-zoom-controls button[data-action="preview-zoom-reset"] { width: auto; padding: 0 9px; color: #fff; background: var(--blue); font-size: 10px; }
.preview-zoom-value { min-width: 42px; color: var(--muted); text-align: center; font-size: 9px; font-weight: 900; }
.designer-foot { padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pane-hint { color: var(--orange-dark); font-weight: 800; }
.design-total-summary { display: flex; justify-content: center; gap: 42px; padding: 11px 14px; border-top: 1px solid var(--line); background: linear-gradient(90deg,#eef7fc,#fff7ef); }
.design-total-summary span { display: flex; align-items: baseline; gap: 7px; }
.design-total-summary small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.design-total-summary strong { color: var(--navy); font-size: 21px; }

.settings-card { padding: 16px; margin-bottom: 13px; }
.settings-card h3 { margin: 0 0 4px; font-size: 17px; }
.settings-card > p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.rate-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.glass-master-table td:first-child strong { color: var(--blue); font-size: 13px; }
.glass-colour-chip { width: 28px; height: 28px; display: inline-block; border: 1px solid #9db0ba; border-radius: 7px; vertical-align: middle; }
.settings-section-head { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.settings-section-head h3 { margin: 0 0 4px; }
.settings-section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.glass-master-table td strong, .glass-master-table td small { display: block; }
.glass-master-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.glass-master-swatch { width: 34px; height: 25px; display: inline-block; border: 1px solid #96abb5; border-radius: 7px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
.glass-master-actions { white-space: nowrap; }
.glass-master-schedule { padding: 8px 10px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: start; border: 1px solid #cfe0ea; border-radius: 9px; color: var(--navy); background: #f6fbfe; font-size: 7px; }
.glass-master-schedule > div { display: flex; flex-wrap: wrap; gap: 4px 13px; color: #4c6370; }
.glass-master-schedule span b { color: var(--blue); }

.estimate-workbar { margin-bottom: 12px; padding: 11px; display: flex; align-items: end; flex-wrap: wrap; gap: 8px; border: 1px solid #c9dce7; border-radius: 14px; background: #f8fcfe; }
.estimate-workbar label { min-width: 240px; flex: 1 1 280px; display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 850; }
.btn.warning { color: #8a4c00; border-color: #edba72; background: #fff5e6; }
.estimate-settings-panel { margin-bottom: 12px; padding: 15px; }
.estimate-document { width: min(1050px,100%); margin: 0 auto 18px; padding: 22px; color: #243943; background: #fff; }
.estimate-document-head { padding-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 3px solid var(--orange); }
.estimate-document-head .design-company-head { min-width: 0; padding: 0; border: 0; }
.estimate-document-head .company-logo-preview.small { width: 105px; height: 68px; border: 0; background: #fff; }
.estimate-document-head > div:last-child { display: grid; gap: 3px; flex: 0 0 auto; text-align: right; }
.estimate-document-head > div:last-child small { color: var(--orange-dark); font-size: 9px; font-weight: 950; letter-spacing: .8px; }
.estimate-document-head > div:last-child strong { color: var(--navy); font-size: 19px; }
.estimate-document-head > div:last-child span { color: var(--muted); font-size: 9px; }
.estimate-client { margin: 13px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.estimate-client > div { padding: 10px 12px; display: grid; gap: 3px; border: 1px solid #d5e2e9; border-radius: 10px; background: #f8fbfc; }
.estimate-client small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .5px; }
.estimate-client strong { color: var(--navy); font-size: 14px; }
.estimate-client span { color: var(--muted); font-size: 9px; }
.estimate-items { display: grid; gap: 10px; }
.estimate-item-card { min-height: 230px; display: grid; grid-template-columns: minmax(260px,.92fr) minmax(300px,1.08fr); overflow: hidden; border: 1px solid #cddce4; border-radius: 13px; break-inside: avoid; }
.estimate-item-drawing { min-height: 230px; display: grid; place-items: center; background-color: #f8fafb; background-image: linear-gradient(#e3ebef 1px,transparent 1px),linear-gradient(90deg,#e3ebef 1px,transparent 1px); background-size: 18px 18px; }
.estimate-item-drawing .window-svg { width: 100%; height: 100%; max-height: 250px; }
.estimate-item-details { padding: 14px; display: grid; align-content: start; gap: 11px; }
.estimate-item-title { display: flex; align-items: flex-start; gap: 10px; }
.estimate-item-title > span { min-width: 38px; padding: 6px 8px; border-radius: 7px; color: #fff; background: var(--orange); text-align: center; font-weight: 950; }
.estimate-item-title h3 { margin: 0; color: var(--navy); font-size: 16px; }
.estimate-item-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.estimate-item-details dl { margin: 0; display: grid; gap: 5px; }
.estimate-item-details dl > div { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 8px; font-size: 9px; }
.estimate-item-details dt { color: var(--muted); font-weight: 850; }
.estimate-item-details dd { margin: 0; color: #324b58; font-weight: 750; }
.estimate-rate-row { margin-top: auto; padding-top: 10px; display: flex; align-items: end; justify-content: space-between; gap: 14px; border-top: 1px solid #dce5ea; }
.estimate-rate-row label { min-width: 150px; display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; }
.estimate-rate-input { font-size: 14px; font-weight: 900; }
.estimate-rate-row > div { display: grid; gap: 3px; text-align: right; }
.estimate-rate-row small { color: var(--muted); font-size: 8px; font-weight: 900; }
.estimate-rate-row strong { color: var(--navy); font-size: 18px; }
.estimate-total-block { margin-top: 13px; padding-top: 13px; display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.8fr); gap: 18px; border-top: 2px solid var(--orange); }
.estimate-total-notes { display: grid; align-content: start; gap: 6px; color: var(--navy); font-size: 11px; }
.estimate-total-notes small { color: var(--muted); font-size: 8px; }
.estimate-totals { display: grid; gap: 3px; }
.estimate-totals > div { padding: 5px 8px; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e1e8ec; color: #4a606c; font-size: 10px; }
.estimate-totals > div strong { color: var(--navy); }
.estimate-totals .estimate-grand-total { margin-top: 3px; padding: 10px; color: #fff; background: var(--navy); border: 0; font-size: 14px; font-weight: 950; }
.estimate-totals .estimate-grand-total strong { color: #fff; font-size: 18px; }
.estimate-document > footer { margin-top: 14px; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #d8e2e7; color: var(--muted); font-size: 7px; }
.estimate-document > footer b { color: var(--navy); }
.quotation-flow-strip { margin: -3px 0 14px; padding: 10px 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #b8d8e9; border-radius: 12px; color: #31596f; background: #eef8fd; font-size: 10px; }
.quotation-flow-strip > span { padding: 5px 7px; border-radius: 6px; color: #fff; background: var(--blue); font-size: 8px; font-weight: 950; letter-spacing: .6px; }
.quotation-flow-strip small { margin-left: auto; color: var(--muted); }
.library-in-quotation { color: #fff; border-color: var(--orange-dark); background: linear-gradient(135deg,var(--orange),var(--orange-dark)); }
.library-inline-note { margin-bottom: 13px; padding: 11px 13px; display: grid; gap: 3px; border: 1px solid #f2bd82; border-radius: 11px; color: #75420d; background: #fff7ed; font-size: 11px; }
.library-modal-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.modal-wide { width: min(1120px,calc(100% - 24px)); }
.modal-wide .modal-body { max-height: calc(100vh - 185px); overflow: auto; }
.modal-wide .library-drawing { height: 140px; }
.master-flow-note { margin: -3px 0 14px; padding: 10px 13px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid #b8d8e9; border-radius: 12px; color: var(--navy); background: #eef8fd; font-size: 10px; font-weight: 900; letter-spacing: .4px; }
.master-flow-note strong { color: var(--orange); font-size: 16px; }
.rate-grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.costing-studio { margin-bottom: 14px; padding: 18px; overflow: hidden; }
.costing-studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.costing-studio-head > div > span { color: var(--orange-dark); font-size: 9px; font-weight: 950; letter-spacing: .8px; }
.costing-studio-head h2 { margin: 4px 0; color: var(--navy); font-size: 21px; }
.costing-studio-head p { margin: 0; color: var(--muted); font-size: 11px; }
.rate-snapshot-badge { padding: 7px 9px; border-radius: 8px; color: #19734d; background: #e8f8f0; font-size: 8px; font-weight: 950; letter-spacing: .6px; white-space: nowrap; }
.pricing-mode-cards { margin: 16px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.pricing-mode-cards button { min-height: 92px; padding: 13px; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto; column-gap: 10px; align-content: center; border: 1px solid #cadbe4; border-radius: 13px; color: #35515f; background: #f8fbfc; text-align: left; cursor: pointer; }
.pricing-mode-cards button > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #e8f5fc; font-size: 10px; font-weight: 950; }
.pricing-mode-cards button strong { color: var(--navy); font-size: 13px; }
.pricing-mode-cards button small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.pricing-mode-cards button.active { border-color: var(--blue); background: linear-gradient(135deg,#e9f7fe,#fff); box-shadow: inset 0 0 0 1px var(--blue); }
.pricing-mode-cards button.active > span { color: #fff; background: var(--blue); }
.costing-input-section { padding: 14px; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(260px,.7fr); gap: 14px; border: 1px solid #d2e0e7; border-radius: 13px; background: #fbfdfe; }
.cost-input-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.cost-input { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 850; }
.cost-input > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px; }
.cost-input small { color: #547080; white-space: nowrap; }
.costing-help { grid-column: 1 / -1; margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.margin-controls { padding-left: 14px; display: grid; align-content: center; gap: 10px; border-left: 1px solid #dce7ec; }
.margin-controls > label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 850; }
.direct-rate-grid { display: grid; grid-template-columns: minmax(180px,.65fr) minmax(280px,1.35fr); align-items: center; gap: 14px; }
.production-bom-toggle { min-height: 66px; padding: 11px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid #bdd9e8; border-radius: 11px; background: #eef8fd; }
.production-bom-toggle input { width: 20px; height: 20px; }
.production-bom-toggle span { display: grid; gap: 3px; }
.production-bom-toggle strong { color: var(--navy); font-size: 12px; }
.production-bom-toggle small { color: var(--muted); font-size: 9px; }
.direct-selling-note { padding: 14px; display: grid; align-content: center; gap: 4px; border-left: 1px solid #dce7ec; color: var(--navy); }
.direct-selling-note span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.costing-summary { margin: 12px 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.costing-summary > div { padding: 12px; display: grid; gap: 3px; border: 1px solid #cfdfe7; border-radius: 11px; background: #f7fbfd; }
.costing-summary small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .5px; }
.costing-summary strong { color: var(--navy); font-size: 18px; }
.costing-summary span { color: var(--muted); font-size: 8px; }
.project-bom-details { margin-top: 12px; border: 1px solid #cddde5; border-radius: 12px; overflow: hidden; }
.project-bom-details > summary { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--navy); background: #f1f7fa; cursor: pointer; list-style: none; }
.project-bom-details > summary::-webkit-details-marker { display: none; }
.project-bom-details > summary span { display: grid; gap: 3px; }
.project-bom-details > summary small { color: var(--muted); font-size: 9px; font-weight: 600; }
.project-bom-details > summary b { padding: 5px 7px; border-radius: 7px; color: #18734b; background: #e6f7ee; font-size: 8px; text-transform: uppercase; }
.bom-summary-cards { padding: 10px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.bom-summary-cards > div { padding: 8px; display: grid; gap: 2px; border-radius: 8px; background: #f5f8fa; }
.bom-summary-cards small { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.bom-summary-cards strong { color: var(--navy); font-size: 11px; }
.project-bom-table { border: 0; border-radius: 0; box-shadow: none; }
.project-bom-table table { min-width: 920px; font-size: 9px; }
.project-bom-table th, .project-bom-table td { padding: 8px 7px; }
.project-bom-table td small { margin-top: 2px; display: block; color: var(--muted); font-size: 7px; }
.project-bom-table tfoot td { color: var(--navy); background: #eef5f8; font-weight: 950; }
.bom-category { padding: 4px 6px; border-radius: 999px; color: #24566f; background: #e7f3f9; font-size: 7px; font-weight: 900; }
.bom-rate-input { width: 72px; padding: 6px; border: 1px solid #bfd3de; border-radius: 7px; text-align: right; font-size: 9px; font-weight: 850; }
.bom-disabled-note { padding: 20px; display: grid; gap: 5px; color: #6b4b17; background: #fff8e9; }
.bom-disabled-note span { color: #846a40; font-size: 10px; }
.automatic-rate { display: grid; gap: 2px; }
.automatic-rate small { color: var(--orange-dark); font-size: 8px; font-weight: 950; }
.automatic-rate strong { color: var(--navy); font-size: 14px; }
.automatic-rate span { color: var(--muted); font-size: 9px; }
.merged-update-list { display: grid; gap: 9px; }
.merged-update-list > div { padding: 11px; display: grid; gap: 3px; border: 1px solid #d3e1e8; border-radius: 10px; background: #f8fbfc; }
.merged-update-list strong { color: var(--navy); }
.merged-update-list span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.company-profile-card { padding: 18px; }
.logo-editor { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.logo-editor strong { display: block; color: var(--navy); }
.logo-editor p { margin: 4px 0 9px; color: var(--muted); font-size: 11px; }
.logo-editor .btn + .btn { margin-left: 6px; }
.company-logo-preview { width: 88px; height: 88px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; color: #fff; background: linear-gradient(145deg,var(--orange),var(--orange-dark)); font-size: 24px; font-weight: 900; }
.company-logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.company-logo-preview.small { width: 62px; height: 62px; border-radius: 13px; font-size: 18px; }
.pdf-proof-banner { width: min(1120px,100%); margin: 0 auto 12px; padding: 11px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #9dcce6; border-radius: 12px; color: var(--navy); background: #e8f6fe; }
.pdf-proof-banner span { flex: 0 0 auto; padding: 5px 8px; border-radius: 7px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .7px; }
.pdf-proof-banner strong { font-size: 11px; }

.design-sheet-cover, .design-sheet-page { padding: 22px; margin-bottom: 16px; }
.design-company-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 3px solid var(--orange); }
.design-company-head h2 { margin: 0 0 4px; color: var(--navy); font-size: 20px; }
.design-company-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.design-project-title { padding: 28px 2px 22px; }
.design-project-title small { color: var(--orange-dark); font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.design-project-title h1 { margin: 5px 0 6px; color: var(--navy); font-size: 28px; }
.design-project-title p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.design-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.design-item-head small { color: var(--orange-dark); font-size: 9px; font-weight: 900; letter-spacing: .8px; }
.design-item-head h2 { margin: 3px 0; color: var(--navy); }
.design-item-head p { margin: 0; color: var(--muted); font-size: 11px; }
.design-item-meta { display: grid; gap: 4px; text-align: right; color: var(--muted); font-size: 11px; }
.design-item-meta strong { color: var(--navy); font-size: 15px; }
.design-sheet-drawing { height: 340px; display: grid; place-items: center; padding: 16px; background-color: #f8fafb; background-image: linear-gradient(#edf2f4 1px,transparent 1px),linear-gradient(90deg,#edf2f4 1px,transparent 1px); background-size: 24px 24px; }
.design-sheet-drawing .window-svg { width: 100%; height: 100%; max-width: 720px; max-height: 310px; }
.design-note { margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--orange); color: #465b68; background: #fff8f0; font-size: 11px; }
.design-parts-table { margin-top: 13px; }
.design-parts-table table { min-width: 480px; }
.design-sheet-four-up { width: min(1120px,100%); aspect-ratio: 297 / 210; margin: 0 auto 18px; padding: 16px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 8px; overflow: hidden; }
.four-up-header { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: 14px; align-items: center; padding-bottom: 9px; border-bottom: 3px solid var(--orange); }
.four-up-header .design-company-head { min-width: 0; padding: 0; border: 0; }
.four-up-header .company-logo-preview.small { width: 104px; height: 64px; border: 0; border-radius: 10px; background: #fff; }
.four-up-header .company-logo-preview.small > span { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg,var(--orange),var(--orange-dark)); }
.four-up-header .company-logo-preview.small img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.four-up-header .design-company-head h2 { font-size: 16px; }
.four-up-header .design-company-head p { font-size: 7px; }
.four-up-project { min-width: 0; display: grid; gap: 2px; text-align: right; }
.four-up-project small { color: var(--orange-dark); font-size: 7px; font-weight: 900; letter-spacing: .7px; }
.four-up-project strong { overflow: hidden; color: var(--navy); font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.four-up-project span { overflow: hidden; color: var(--muted); font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.design-sheet-grid { min-height: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 7px; }
.design-sheet-tile { min-width: 0; min-height: 0; overflow: hidden; padding: 7px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 4px; align-content: stretch; border: 1px solid #cfdbe2; border-radius: 10px; background: #fff; }
.design-tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.design-tile-head > div { min-width: 0; }
.design-window-code { width: max-content; padding: 3px 7px; display: inline-flex; border-radius: 6px; color: #fff; background: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: .6px; }
.design-tile-head h3 { margin: 4px 0 0; overflow: hidden; color: var(--navy); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.design-glass-spec { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 7px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.design-tile-drawing { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; background-color: #f8fafb; background-image: linear-gradient(#edf2f4 1px,transparent 1px),linear-gradient(90deg,#edf2f4 1px,transparent 1px); background-size: 18px 18px; }
.design-tile-drawing .window-svg { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: none; max-height: none; display: block; }
.design-tile-footer { min-height: 28px; padding: 4px 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 2px solid var(--orange); border-radius: 0 0 7px 7px; background: #eef7fc; }
.design-tile-footer strong { color: var(--navy); font-size: 14px; font-weight: 900; letter-spacing: .15px; }
.design-tile-footer b { flex: 0 0 auto; color: var(--orange-dark); font-size: 11px; font-weight: 900; }
.four-up-footer { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 6.5px; }
.four-up-footer span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.four-up-footer b { flex: 0 0 auto; color: var(--navy); }
.design-summary-page { width: min(1120px,100%); aspect-ratio: 297 / 210; margin: 0 auto 18px; padding: 24px; display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto auto auto; gap: 10px; overflow: hidden; }
.summary-page-title { padding: 10px 2px 0; }
.summary-page-title small { color: var(--orange-dark); font-size: 8px; font-weight: 900; letter-spacing: .8px; }
.summary-page-title h2 { margin: 3px 0; color: var(--navy); font-size: 23px; }
.summary-page-title p { margin: 0; color: var(--muted); font-size: 9px; }
.project-summary-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.project-summary-totals > div { min-height: 78px; padding: 13px 15px; display: grid; align-content: center; gap: 4px; border: 1px solid #cfe0ea; border-radius: 13px; background: #eef7fc; }
.project-summary-totals > div.primary { border-color: #9dcce6; background: #e2f3fd; }
.project-summary-totals small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .6px; }
.project-summary-totals strong { color: var(--navy); font-size: 27px; line-height: 1; }
.summary-schedule { min-height: 0; overflow: hidden; }
.summary-schedule h3 { margin: 0 0 8px; color: var(--navy); font-size: 14px; }
.summary-schedule .table-wrap { height: auto; max-height: 100%; overflow: hidden; border-radius: 9px; }
.summary-schedule table { min-width: 0; }
.summary-schedule th, .summary-schedule td { padding: 6px 7px; font-size: 8px; }
.summary-schedule th { font-size: 6.5px; }
.summary-schedule td strong, .summary-schedule td small { display: block; }
.summary-schedule td small { margin-top: 2px; color: var(--muted); font-size: 7px; font-weight: 750; }
.summary-schedule .summary-item-size { color: var(--navy); font-size: 11px; font-weight: 950; white-space: nowrap; }
.summary-schedule .summary-qty { color: var(--orange-dark); font-size: 11px; font-weight: 950; }
.summary-overflow-note { margin: 5px 0 0; color: var(--muted); font-size: 7px; }
.summary-project-notes { padding: 9px 11px; border-left: 3px solid var(--orange); color: #48606e; background: #fff8f0; font-size: 8px; }
.summary-project-notes strong { color: var(--navy); }
.summary-project-notes p { margin: 3px 0 0; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(360px,.95fr); background: #eef4f7; }
.auth-visual { min-height: 100vh; padding: clamp(44px,7vw,100px); display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 20% 20%,rgba(20,120,184,.42),transparent 36%),linear-gradient(145deg,#071f31,#0c2e48 58%,#164e73); }
.auth-brand { width: 66px; height: 66px; margin-bottom: 20px; border-radius: 19px; font-size: 22px; }
.auth-visual > small { color: #7ec3ea; font-size: 11px; font-weight: 900; letter-spacing: 1.8px; }
.auth-visual h1 { max-width: 620px; margin: 10px 0 14px; font-size: clamp(30px,4vw,54px); line-height: 1.06; letter-spacing: -1.5px; }
.auth-visual p { max-width: 570px; margin: 0 0 25px; color: #c6dbe7; line-height: 1.65; }
.auth-feature { margin-top: 10px; color: #d9e8f0; font-size: 13px; }
.auth-feature span { margin-right: 8px; color: #ffad63; font-weight: 900; }
.auth-card { width: min(480px,calc(100% - 34px)); margin: auto; overflow: hidden; box-shadow: 0 20px 55px rgba(12,46,72,.18); }
.auth-tabs { display: grid; grid-template-columns: repeat(2,1fr); background: #edf2f5; }
.auth-tabs button { min-height: 58px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-weight: 850; }
.auth-tabs button.active { color: var(--navy); border-bottom-color: var(--orange); background: #fff; }
.auth-card-body { padding: 30px; }
.auth-card-body h2 { margin: 0 0 6px; color: var(--navy); font-size: 27px; }
.auth-card-body > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-card-body form { display: grid; gap: 15px; }
.auth-submit { width: 100%; margin-top: 20px; }
.auth-foot { display: block; margin-top: 14px; color: #8b9aa4; text-align: center; }
.admin-credential-hint { margin-top: 15px; padding: 11px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; border: 1px solid #b9d9eb; border-radius: 11px; color: #476170; background: var(--blue-soft); font-size: 11px; }
.admin-credential-hint strong { grid-row: 1 / 3; align-self: center; color: var(--navy); }
.admin-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.cloud-admin-notice { margin-bottom: 14px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; border-color: #b9d9eb; background: var(--blue-soft); }
.cloud-admin-notice strong { color: var(--navy); white-space: nowrap; }
.cloud-admin-notice span { color: var(--muted); font-size: 12px; }
.cloud-loading-card { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 36px; text-align: center; }
.cloud-loading-card h2, .cloud-loading-card p { margin: 0; }
.cloud-spinner { width: 46px; height: 46px; border: 4px solid #d8e9f2; border-top-color: var(--blue); border-radius: 50%; animation: cloud-spin .8s linear infinite; }
@keyframes cloud-spin { to { transform: rotate(360deg); } }
.user-grid { display: grid; gap: 10px; }
.user-card { padding: 14px; display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,var(--blue),var(--navy)); font-weight: 900; }
.user-details { min-width: 0; flex: 1; display: grid; gap: 3px; }
.user-details strong { color: var(--navy); }
.user-details span { color: var(--muted); font-size: 11px; }
.user-details small { width: max-content; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.status-on { color: #176b45; background: #e4f6ed; }
.status-off { color: #9a3238; background: #fdebed; }
.user-actions { display: flex; gap: 6px; }
.toggle-field { display: flex; align-items: center; gap: 9px; color: var(--navy); font-size: 12px; font-weight: 750; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--blue); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: #4e6472; background: #f3f7f9; font-size: 10px; text-transform: uppercase; letter-spacing: .45px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 900; color: var(--navy); background: #f7fafb; }
tr.grand td { color: #fff; background: var(--navy); font-size: 14px; font-weight: 900; }

.about-card { padding: 24px; text-align: center; }
.about-card .brand-mark { margin: 0 auto 15px; width: 72px; height: 72px; border-radius: 20px; font-size: 24px; }
.about-card h2 { margin: 0 0 8px; }
.version-badge { display: inline-block; margin: 0 0 10px; padding: 5px 9px; border-radius: 999px; color: #fff; background: var(--success); font-size: 10px; font-weight: 850; }
.about-card p { max-width: 600px; margin: 0 auto; color: var(--muted); line-height: 1.65; }
.feature-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; margin-top: 20px; text-align: left; }
.feature-list div { padding: 13px; border-radius: 12px; color: #455a67; background: #f5f8fa; font-size: 12px; }

.subscription-gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0,.9fr) minmax(440px,1.1fr); background: #eef4f7; }
.subscription-hero { min-height: 100vh; padding: clamp(42px,6vw,90px); display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 20% 18%,rgba(71,181,235,.36),transparent 36%),linear-gradient(145deg,#071f31,#0c2e48 58%,#164e73); }
.subscription-hero > small { color: #7ec3ea; font-size: 11px; font-weight: 900; letter-spacing: 1.8px; }
.subscription-hero h1 { max-width: 610px; margin: 12px 0 14px; font-size: clamp(31px,4vw,54px); line-height: 1.06; letter-spacing: -1.3px; }
.subscription-hero p { max-width: 560px; margin: 0; color: #c6dbe7; line-height: 1.65; }
.subscription-gate > .subscription-card { width: min(610px,calc(100% - 34px)); margin: auto; padding: clamp(20px,4vw,34px); box-shadow: 0 20px 55px rgba(12,46,72,.18); }
.subscription-card { padding: 22px; }
.subscription-card > h2 { margin: 0 0 15px; color: var(--navy); font-size: 26px; }
.subscription-status { padding: 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #d5e1e8; border-radius: 15px; background: #f5f8fa; }
.subscription-status > span { width: 47px; height: 47px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--muted); font-size: 14px; font-weight: 950; }
.subscription-status.active { border-color: #9cd7bb; background: #ebf8f1; }
.subscription-status.active > span { background: #24835a; }
.subscription-status.pending { border-color: #f3ca8d; background: #fff8e9; }
.subscription-status.pending > span { background: #cc7c16; }
.subscription-status.loading > span { background: var(--blue); }
.subscription-status strong { display: block; color: var(--navy); font-size: 15px; }
.subscription-status p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.subscription-plans { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.subscription-plan { padding: 16px; display: flex; flex-direction: column; gap: 5px; border: 1px solid #bfd7e5; border-radius: 15px; background: linear-gradient(145deg,#f8fcfe,#edf7fc); }
.subscription-plan .plan-name { width: max-content; padding: 4px 8px; border-radius: 999px; color: #0e6597; background: #dff2fc; font-size: 9px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; }
.subscription-plan strong { margin-top: 6px; color: var(--navy); font-size: 22px; }
.subscription-plan small { min-height: 28px; color: var(--muted); font-size: 10px; }
.subscription-plan .btn { width: 100%; margin-top: 8px; }
.subscription-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.production-privacy { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.production-privacy h3 { margin: 0 0 5px; color: var(--navy); font-size: 15px; }
.production-privacy p { margin: 0 0 11px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.production-privacy > div { display: flex; flex-wrap: wrap; gap: 7px; }
.subscription-legal { display: block; margin-top: 14px; color: #7b8c96; font-size: 9px; line-height: 1.5; }
.web-access-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.web-access-grid article { padding: 15px; border: 1px solid #cfe0e9; border-radius: 14px; background: linear-gradient(145deg,#f8fcfe,#eef7fb); }
.web-access-grid strong { color: var(--navy); font-size: 13px; }
.web-access-grid p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.web-share-note { padding: 13px; display: grid; gap: 4px; border: 1px solid #c6dce8; border-radius: 11px; color: var(--navy); background: var(--blue-soft); }
.web-share-note span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.noscript-warning { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; color: #fff; background: var(--navy); font-weight: 800; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; padding-top: 50px; background: rgba(3,15,24,.58); backdrop-filter: blur(3px); }
.modal { width: min(620px,100%); max-height: calc(100vh - 50px); overflow: auto; border-radius: 22px 22px 0 0; background: #fff; box-shadow: 0 -12px 42px rgba(0,0,0,.22); animation: rise .18s ease-out; }
.modal-head { position: sticky; top: 0; z-index: 2; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-close { border: 0; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); background: #f1f4f6; font-size: 20px; }
.modal-body { padding: 18px; }
.modal-actions { position: sticky; bottom: 0; padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.action-list { display: grid; gap: 5px; }
.action-list button { border: 0; border-radius: 11px; padding: 13px; text-align: left; background: #f6f8f9; }
.action-list button.danger-link { color: var(--danger); }
.form-note, .share-copy { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.summary-subtitle { margin: 18px 2px 8px; color: var(--navy); font-size: 14px; }
.part-table { min-width: 420px; }
.share-options button strong { color: var(--navy); }
.share-options button small { color: var(--muted); }
.confirm-copy { color: var(--muted); line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 150; max-width: calc(100% - 30px); padding: 11px 15px; border-radius: 12px; color: #fff; background: rgba(14,32,44,.94); transform: translate(-50%,30px); opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); font-size: 12px; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
@keyframes rise { from { transform: translateY(28px); opacity: .4; } }

@media (max-width: 760px) {
  .approval-lock-banner { align-items: stretch; flex-direction: column; }
  .desktop-actions { display: none; }
  .view { padding-left: 11px; padding-right: 11px; }
  .page-head { align-items: flex-start; }
  .page-head p { max-width: 230px; }
  .head-actions .btn span { display: none; }
  .project-search-row { grid-template-columns: minmax(0,1fr) auto; }
  .project-search-row .select { grid-column: 1 / -1; grid-row: 2; }
  .project-summary { grid-template-columns: repeat(2,1fr); }
  .designer-shell { display: flex; flex-direction: column; }
  .tool-panel { order: 1; position: static; max-height: none; margin-bottom: 10px; }
  .tools { grid-template-columns: repeat(5,minmax(62px,1fr)); overflow-x: auto; }
  .tool { min-width: 66px; }
  .designer-stage { order: -1; position: sticky; top: calc(66px + env(safe-area-inset-top)); z-index: 20; width: 100%; min-width: 0; max-width: 100%; min-height: 0; height: 400px; margin-bottom: 10px; box-shadow: 0 10px 28px rgba(12,46,72,.16); }
  .designer-toolbar { width: 100%; min-width: 0; max-width: 100%; min-height: 48px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .designer-toolbar::-webkit-scrollbar { display: none; }
  .designer-canvas { width: 100%; min-width: 0; max-width: 100%; min-height: 220px; height: 220px; padding: 5px 10px; }
  .preview-transform { width: 100%; min-width: 0; max-width: 100%; }
  .preview-transform .window-svg { width: 100%; max-width: 100%; height: 205px; max-height: 100%; }
  .preview-zoom-controls { min-height: 42px; padding: 4px 9px; }
  .preview-zoom-label { display: none; }
  .preview-zoom-controls { justify-content: center; }
  .designer-foot { min-height: 35px; padding: 7px; display: block; text-align: center; }
  .designer-foot > span:not(.pane-hint) { display: none; }
  .designer-foot .pane-hint { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .quotation-flow-strip { align-items: flex-start; flex-wrap: wrap; }
  .quotation-flow-strip small { width: 100%; margin-left: 0; }
  .library-modal-grid { grid-template-columns: 1fr; }
  .modal-wide { width: 100%; }
  .master-flow-note { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .rate-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pricing-mode-cards { grid-template-columns: 1fr; }
  .costing-studio { padding: 12px; }
  .costing-studio-head { flex-direction: column; }
  .costing-input-section { grid-template-columns: 1fr; }
  .cost-input-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .margin-controls, .direct-selling-note { padding: 12px 0 0; border-left: 0; border-top: 1px solid #dce7ec; }
  .direct-rate-grid { grid-template-columns: 1fr; }
  .costing-summary { grid-template-columns: 1fr; }
  .bom-summary-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .design-total-summary { min-height: 39px; gap: 24px; padding: 6px; }
  .design-sheet-cover, .design-sheet-page { padding: 14px; }
  .design-sheet-four-up { padding: 7px; gap: 4px; border-radius: 10px; }
  .four-up-header { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 5px; padding-bottom: 4px; border-bottom-width: 2px; }
  .four-up-header .company-logo-preview.small { width: 52px; height: 34px; border-radius: 6px; font-size: 10px; }
  .four-up-header .company-logo-preview.small > span { width: 32px; height: 32px; border-radius: 6px; }
  .four-up-header .design-company-head { gap: 5px; }
  .four-up-header .design-company-head h2 { margin-bottom: 1px; font-size: 8px; }
  .four-up-header .design-company-head p { font-size: 4.5px; line-height: 1.15; }
  .four-up-project small { font-size: 4.5px; }
  .four-up-project strong { font-size: 8px; }
  .four-up-project span { font-size: 4.5px; }
  .design-sheet-grid { gap: 4px; }
  .design-sheet-tile { padding: 4px; gap: 3px; border-radius: 6px; }
  .design-window-code { padding: 2px 4px; border-radius: 4px; font-size: 5px; }
  .design-tile-head h3 { margin-top: 2px; font-size: 7px; }
  .design-glass-spec { margin-top: 1px; font-size: 4.5px; }
  .design-tile-footer { min-height: 20px; padding: 3px 4px; border-top-width: 1px; }
  .design-tile-footer strong { font-size: 7px; }
  .design-tile-footer b { font-size: 6px; }
  .four-up-footer { font-size: 4px; }
  .design-sheet-cover table { min-width: 0; table-layout: fixed; }
  .design-sheet-cover th, .design-sheet-cover td { padding: 7px 4px; font-size: 8px; overflow-wrap: anywhere; }
  .design-sheet-cover th { font-size: 7px; }
  .design-parts-table table { min-width: 0; table-layout: fixed; }
  .design-parts-table th, .design-parts-table td { padding: 7px 4px; font-size: 8px; overflow-wrap: anywhere; }
  .design-parts-table th { font-size: 7px; }
  .design-company-head { align-items: flex-start; }
  .design-company-head h2 { font-size: 17px; }
  .design-item-head { display: grid; }
  .design-item-meta { grid-template-columns: repeat(3,auto); text-align: left; align-items: baseline; }
  .design-sheet-drawing { height: 285px; padding: 6px; }
  .field-grid, .rate-grid { grid-template-columns: 1fr; }
  .estimate-workbar label { min-width: 100%; }
  .estimate-document { padding: 12px; }
  .estimate-document-head { align-items: flex-start; }
  .estimate-document-head .company-logo-preview.small { width: 72px; height: 48px; }
  .estimate-document-head .design-company-head h2 { font-size: 12px; }
  .estimate-client { grid-template-columns: 1fr; }
  .estimate-item-card { grid-template-columns: 1fr; }
  .estimate-item-drawing { min-height: 220px; }
  .estimate-total-block { grid-template-columns: 1fr; }
  .radio-row.three { grid-template-columns: 1fr; }
  .brand-copy strong { font-size: 14px; }
  .top-action { padding: 0 7px; }
  .auth-shell { display: block; min-height: 100vh; padding: 28px 0 36px; background: linear-gradient(160deg,#08263b 0,#0c2e48 38%,#eef4f7 38%); }
  .auth-visual { min-height: 0; padding: 16px 24px 38px; background: transparent; }
  .auth-brand { width: 54px; height: 54px; margin-bottom: 12px; border-radius: 15px; font-size: 18px; }
  .auth-visual h1 { margin: 7px 0 8px; font-size: 25px; letter-spacing: -.6px; }
  .auth-visual p { margin-bottom: 0; font-size: 11px; line-height: 1.5; }
  .auth-feature { display: none; }
  .auth-card { margin: -10px auto 0; }
  .auth-card-body { padding: 22px; }
  .user-card { align-items: flex-start; flex-wrap: wrap; }
  .user-details { min-width: calc(100% - 64px); }
  .user-actions { width: 100%; padding-left: 60px; flex-wrap: wrap; }
  .admin-summary { grid-template-columns: 1fr; }
  .cloud-admin-notice { align-items: flex-start; flex-direction: column; }
  .subscription-gate { display: block; min-height: 100vh; padding: 24px 0 36px; background: linear-gradient(160deg,#08263b 0,#0c2e48 34%,#eef4f7 34%); }
  .subscription-hero { min-height: 0; padding: 15px 23px 38px; background: transparent; }
  .subscription-hero h1 { margin: 8px 0; font-size: 25px; letter-spacing: -.6px; }
  .subscription-hero p { font-size: 11px; line-height: 1.5; }
  .subscription-gate > .subscription-card { margin: -8px auto 0; padding: 20px; }
  .subscription-card > h2 { font-size: 22px; }
  .subscription-plans { grid-template-columns: 1fr; }
  .subscription-actions .btn, .production-privacy .btn { flex: 1 1 150px; }
  .web-access-grid { grid-template-columns: 1fr; }
}

@media (min-width: 761px) {
  .modal-backdrop { place-items: center; padding: 30px; }
  .modal { border-radius: 22px; max-height: min(760px,calc(100vh - 60px)); }
}

@media (min-width: 1100px) {
  body:not(.auth-mode) { overflow-x: hidden; }
  body:not(.auth-mode) .app-shell { padding-top: 0; }
  body:not(.auth-mode) .drawer {
    width: 276px; padding-top: 0; transform: none; box-shadow: 8px 0 30px rgba(7,31,48,.13);
  }
  body:not(.auth-mode) .drawer-head { min-height: 82px; padding: 16px 19px; }
  body:not(.auth-mode) .drawer-head strong { font-size: 15px; }
  body:not(.auth-mode) .drawer nav { overflow-y: auto; padding-top: 11px; }
  body:not(.auth-mode) .drawer nav button { padding: 12px 13px; }
  body:not(.auth-mode) .drawer-foot { padding-bottom: 18px; }
  body:not(.auth-mode) .topbar {
    position: fixed; inset: 0 0 auto 276px; min-height: 70px; padding: 10px 24px; z-index: 40;
  }
  body:not(.auth-mode) #menuBtn { display: none !important; }
  body:not(.auth-mode) .scrim { display: none !important; }
  body:not(.auth-mode) .view {
    width: calc(100% - 276px); max-width: none; min-height: 100vh; margin: 0 0 0 276px;
    padding: 94px clamp(22px,3vw,46px) 44px;
  }
  body:not(.auth-mode) .page-head h1 { font-size: 32px; }
  body:not(.auth-mode) .project-grid { grid-template-columns: repeat(auto-fill,minmax(315px,1fr)); }
  body:not(.auth-mode) .item-grid { grid-template-columns: repeat(auto-fill,minmax(360px,1fr)); gap: 18px; }
  body:not(.auth-mode) .item-preview { height: 340px; padding: 8px 10px; }
  body:not(.auth-mode) .item-preview .window-svg { max-width: 620px; max-height: 324px; }
  body:not(.auth-mode) .designer-shell { grid-template-columns: 330px minmax(0,1fr); gap: 18px; }
  body:not(.auth-mode) .tool-panel { top: 94px; max-height: calc(100vh - 118px); }
  body:not(.auth-mode) .designer-stage { min-height: calc(100vh - 138px); }
  body:not(.auth-mode) .designer-canvas { min-height: 540px; padding: 34px 42px; }
  body:not(.auth-mode) .designer-canvas .window-svg { max-width: 820px; max-height: 590px; }
  body:not(.auth-mode) .design-sheet-page,
  body:not(.auth-mode) .design-sheet-cover { max-width: 1180px; margin-left: auto; margin-right: auto; }
  .modal { width: min(680px,100%); }
}

@media (display-mode: standalone) {
  .install-app-btn { display: none !important; }
}

.design-specification-controls { display: grid; gap: 10px; }
.material-lock { padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; border: 1px solid #cbdde6; border-radius: 11px; background: #f2f8fb; }
.material-lock span { color: var(--orange-dark); font-size: 8px; font-weight: 950; letter-spacing: .8px; }
.material-lock strong { justify-self: end; color: var(--navy); font-size: 14px; }
.material-lock small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.design-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.design-spec-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 850; }
.design-spec-grid .select { min-width: 0; height: 34px; padding: 5px 7px; font-size: 10px; }
.selected-spec-strip { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: 17px minmax(0,1fr); gap: 2px 8px; align-items: center; border-radius: 10px; background: #0d314a; color: #fff; }
.selected-spec-strip .standard-colour-dot { grid-row: 1 / 3; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.16); }
.selected-spec-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.selected-spec-strip small { overflow: hidden; color: #cfe0e9; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.locked-spec-card { margin-bottom: 10px; padding: 12px; display: grid; gap: 3px; border: 1px solid #d4e0e6; border-radius: 11px; background: #f7fafb; }
.locked-spec-card small { color: var(--orange-dark); font-size: 8px; font-weight: 950; }
.locked-spec-card strong { color: var(--navy); font-size: 12px; }
.locked-spec-card span { color: var(--muted); font-size: 9px; }
.item-spec-meta { margin-top: 9px; padding-top: 9px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 8px; border-top: 1px solid #e2e9ed; font-size: 9px; }
.item-spec-meta > span:first-child { color: var(--orange-dark); font-weight: 950; }
.item-spec-meta strong { overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; }
.item-spec-meta > span:last-child { grid-column: 1 / -1; color: var(--muted); }
.design-system-spec { margin: 3px 0 2px; color: var(--orange-dark); font-size: 8px; font-weight: 850; line-height: 1.3; }
.phase-scope-note { margin-bottom: 14px; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 13px; align-items: center; border: 1px solid #bcd8e6; border-radius: 13px; background: linear-gradient(100deg,#eaf6fb,#f8fcfd); }
.phase-scope-note span { grid-row: 1 / 3; padding: 7px 9px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 8px; font-weight: 950; letter-spacing: .7px; }
.phase-scope-note strong { color: var(--navy); font-size: 15px; }
.phase-scope-note small { color: var(--muted); font-size: 9px; }
.system-master-table { min-width: 780px; }
.system-master-table th, .system-master-table td { padding: 10px 12px; }
.standard-colour-master { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 9px; }
.standard-colour-master > div { padding: 10px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 2px 9px; align-items: center; border: 1px solid #d8e3e8; border-radius: 11px; background: #fafcfd; }
.standard-colour-master > div > span { grid-row: 1 / 3; width: 28px; height: 28px; border: 1px solid rgba(12,46,72,.2); border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.42); }
.standard-colour-master strong { color: var(--navy); font-size: 11px; }
.standard-colour-master small { color: var(--muted); font-size: 8px; }
.direct-pricing-overview { margin-bottom: 14px; padding: 15px; display: grid; grid-template-columns: 1.35fr repeat(3,1fr); gap: 10px; background: linear-gradient(110deg,#0b2e47,#114461); color: #fff; }
.direct-pricing-overview > div { min-width: 0; padding: 11px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: rgba(255,255,255,.06); }
.direct-pricing-overview span { color: #a8cfdf; font-size: 8px; font-weight: 950; letter-spacing: .6px; }
.direct-pricing-overview strong { font-size: 16px; }
.direct-pricing-overview small { color: #d4e7ee; font-size: 8px; line-height: 1.4; }

@media (max-width: 760px) {
  .design-spec-grid { grid-template-columns: 1fr; }
  .direct-pricing-overview { grid-template-columns: 1fr 1fr; }
  .phase-scope-note { grid-template-columns: 1fr; }
  .phase-scope-note span { grid-row: auto; justify-self: start; }
}

@page { size: A4 landscape; margin: 0; }

@media print {
  .topbar, .drawer, .scrim, .desktop-actions, .head-actions, .search-row, .btn, .card-menu, .designer-toolbar, .preview-zoom-controls, .tool-panel, .pdf-proof-banner, .estimate-workbar, .estimate-settings-panel, .costing-studio, .direct-pricing-overview, .phase-scope-note { display: none !important; }
  body, :root, .view { background: #fff; }
  .view { width: 100%; max-width: none; padding: 0; }
  .card, .table-wrap { box-shadow: none; break-inside: avoid; }
  .page-head { display: none; }
  .design-sheet-cover, .design-sheet-page { min-height: 96vh; margin: 0; padding: 12mm 10mm; border: 0; border-radius: 0; page-break-after: always; break-after: page; }
  .design-sheet-four-up { width: 297mm; height: 210mm; min-height: 0; aspect-ratio: auto; margin: 0; padding: 6mm; gap: 2.5mm; box-sizing: border-box; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .design-summary-page { width: 297mm; height: 210mm; min-height: 0; aspect-ratio: auto; margin: 0; padding: 8mm; gap: 2.5mm; box-sizing: border-box; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .design-sheet-page:last-child { page-break-after: auto; break-after: auto; }
  .design-sheet-drawing { height: 100mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .design-tile-drawing { background-color: #f8fafb !important; background-image: linear-gradient(#e3ebef 1px,transparent 1px),linear-gradient(90deg,#e3ebef 1px,transparent 1px) !important; background-size: 18px 18px !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .design-sheet-cover .table-wrap, .design-parts-table { overflow: visible; }
  .design-sheet-cover table, .design-parts-table table { min-width: 0; }
  .design-tile-head h3 { font-size: 14px; }
  .design-glass-spec { font-size: 8px; }
  .design-tile-footer strong { font-size: 15px; }
  .design-tile-footer b { font-size: 12px; }
  .summary-schedule th, .summary-schedule td { font-size: 8.5px; }
  .summary-schedule td small { font-size: 7.5px; }
  .summary-schedule .summary-item-size, .summary-schedule .summary-qty { font-size: 12px; }
  .estimate-document { width: 297mm; min-height: 210mm; margin: 0; padding: 8mm; border: 0; border-radius: 0; box-shadow: none; box-sizing: border-box; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .estimate-item-card { grid-template-columns: 88mm minmax(0,1fr); min-height: 57mm; page-break-inside: avoid; }
  .estimate-item-drawing { min-height: 57mm; }
  .estimate-item-drawing .window-svg { max-height: 57mm; }
  .estimate-total-notes .textarea { border: 0; resize: none; }
}
.design-sheet-slot-empty { min-width: 0; min-height: 0; border: 0; background: transparent; }
.security-control-card{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0;padding:20px}
.security-control-card h3{margin:0 0 6px;color:var(--ink)}
.security-control-card p{margin:0;color:var(--muted);max-width:620px}
.audit-table-wrap{max-height:58vh;overflow:auto;border:1px solid var(--line);border-radius:12px}
.audit-table-wrap .data-table{width:100%;border-collapse:collapse;font-size:12px}
.audit-table-wrap th,.audit-table-wrap td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
.audit-table-wrap th{position:sticky;top:0;background:#edf4f7;color:var(--ink)}
@media(max-width:720px){.security-control-card{align-items:stretch;flex-direction:column}.security-control-card .user-actions{display:grid;grid-template-columns:1fr 1fr}.audit-table-wrap{max-width:calc(100vw - 52px)}}
.save-indicator.pending{border-color:#e4a23a;background:#fff4df;color:#8a5906}
.connection-status.pending{border-color:#e4a23a;background:#fff4df;color:#8a5906}
.permission-badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#edf3f6;color:#5d7381;font-size:12px;font-weight:850}
.permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f7fafb}
.permission-grid>strong{grid-column:1/-1;color:var(--ink)}
.permission-grid .toggle-field{margin:0}
@media(max-width:620px){.permission-grid{grid-template-columns:1fr}}
