:root {
  --font-ui: "Inter", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #f7f8fc;
  --panel: #ffffff;
  --ink: #17172a;
  --muted: #74728a;
  --border: #e6e2f2;
  --sidebar: #182939;
  --sidebar-hover: rgba(71,139,60,.24);
  --sidebar-text: #d5e0e7;
  --sidebar-muted: #8ea0ad;
  --primary: #478b3c;
  --primary-soft: #eef6ec;
  --pink: #f451a5;
  --green: #478b3c;
  --orange: #ee8b2d;
  --red: #d94d4d;
  --shadow: 0 1px 2px rgba(31, 24, 65, .05), 0 12px 30px rgba(31, 24, 65, .055);
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); font-family: var(--font-ui); }
body { min-height: 100vh; }
button, input, select, textarea, table { font-family: var(--font-ui); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }

.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, .9fr); background: #fff; }
.auth-brand { padding: 80px clamp(36px, 8vw, 120px); background: radial-gradient(circle at 25% 20%, rgba(101,71,231,.45), transparent 30%), linear-gradient(145deg, #14111f, #221b3a); color: white; display: flex; flex-direction: column; justify-content: center; }
.auth-brand h1 { font-size: clamp(42px, 6vw, 72px); margin: 20px 0 16px; letter-spacing: -.04em; }
.auth-brand p { max-width: 540px; font-size: 20px; line-height: 1.55; color: #d8d4e6; }
.brand-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: white; color: #171320; font-weight: 900; letter-spacing: -.04em; }
.auth-points { display: grid; gap: 12px; margin-top: 36px; color: #cfc9df; }
.auth-panel { display: grid; place-items: center; padding: 42px; background: #fbfaff; }
.auth-card { width: min(440px, 100%); padding: 38px; border: 1px solid var(--border); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 30px; margin: 0 0 6px; }
.auth-card label, .field { display: grid; gap: 7px; margin-top: 18px; font-size: 13px; font-weight: 700; color: #4f4b61; }
input, select, textarea { width: 100%; border: 1px solid #dcd9e5; border-radius: 10px; padding: 11px 12px; color: var(--ink); background: white; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(120,81,255,.13); }
textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--red); margin: 14px 0 0; font-size: 13px; }
.link-button { border: 0; background: transparent; color: var(--primary); margin-top: 16px; padding: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); color: #f5f2fa; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #373341 transparent; }
.sidebar-brand { min-height: 75px; padding: 10px 19px 18px; border-bottom: 1px solid rgba(255,255,255,.075); display: flex; flex-direction: column; justify-content: center; }
.brand-title { font-size: 19px; line-height: 24px; font-weight: 800; letter-spacing: -.02em; }
.brand-subtitle { margin-top: 2px; color: #aaa2bd; font-size: 12px; line-height: 18px; }
.main-nav { padding: 13px 10px 14px; display: grid; gap: 4px; }
.nav-item { min-height: 40px; border: 0; color: var(--sidebar-text); background: transparent; border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; font-size: 14px; line-height: 20px; font-weight: 450; transition: color .14s ease, background .14s ease; }
.nav-icon { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #f6f3fb; }
.nav-item.active { background: var(--sidebar-hover); color: #fff; font-weight: 650; }
.nav-item:focus-visible { outline: 2px solid #8069ef; outline-offset: -2px; }
.sidebar-bottom { margin-top: auto; padding: 14px 10px 13px; border-top: 1px solid rgba(255,255,255,.075); display: grid; gap: 4px; }
.user-block { padding: 12px 13px 8px; display: grid; gap: 0; }
.user-block strong { color: #7f788e; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-block small { color: #655f73; font-size: 10px; line-height: 14px; text-transform: capitalize; }
.main-area { min-width: 0; }
.topbar { min-height: 82px; padding: 20px 28px; display: flex; align-items: center; gap: 16px; justify-content: space-between; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.topbar p { margin: 4px 0 0; font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; }
.page-content { padding: 24px 28px 60px; }
.loading-card { min-height: 220px; border: 1px solid var(--border); border-radius: 16px; background: white; display: grid; place-items: center; color: var(--muted); }

.btn { border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-weight: 750; transition: transform .05s, background .15s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: #2f8f53; }
.btn.secondary { background: white; border-color: var(--border); color: var(--ink); }
.btn.secondary:hover { border-color: #c9c4da; }
.btn.danger { background: #fff2f2; color: #b62e2e; border-color: #ffd2d2; }
.btn.success { background: #e9f8f1; color: #11734a; border-color: #c7efdc; }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn.full { width: 100%; margin-top: 20px; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--border); background: white; border-radius: 9px; display: grid; place-items: center; }
.mobile-only { display: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(7, minmax(135px, 1fr)); gap: 14px; }
.kpi-card { min-height: 122px; border: 1px solid var(--border); border-radius: 14px; background: white; padding: 17px; box-shadow: var(--shadow); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #807b92; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.kpi-value { font-size: 27px; font-weight: 850; margin-top: 13px; letter-spacing: -.04em; }
.kpi-note { font-size: 11px; color: var(--muted); margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.panel { border: 1px solid var(--border); border-radius: 15px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.panel.pad { padding: 20px; }
.panel.full { grid-column: 1 / -1; }
.panel-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h2, .panel h2 { margin: 0; font-size: 17px; }
.metric-list { display: grid; gap: 20px; margin-top: 22px; }
.metric-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; }
.metric-row .number { color: var(--primary); font-size: 12px; }
.top-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 18px; }
.top-list li { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; }
.top-list .rank { color: #a39db2; }
.top-list .value { font-weight: 750; }
.top-list .count { color: var(--muted); font-size: 12px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.search { min-width: 260px; flex: 1; max-width: 440px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.quotes-toolbar { align-items: center; }
.quotes-toolbar .filter-pills { flex: 0 1 auto; }
.quotes-filter-controls { min-width: min(470px, 100%); flex: 1 1 470px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.quotes-filter-controls .search-autocomplete { min-width: 260px; flex: 1 1 340px; max-width: 520px; }
.quotes-filter-controls #quote-rep { width: 210px; flex: 0 0 210px; }
.pill { border: 1px solid var(--border); background: white; color: #655f75; padding: 8px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.active { background: var(--primary); color: white; border-color: var(--primary); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid #efedf3; text-align: left; font-size: 13px; vertical-align: middle; }
th { color: #302c3d; background: #fcfbfe; font-weight: 800; white-space: nowrap; }
tbody tr:hover { background: #fbfaff; }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.table-action { border: 0; background: transparent; color: var(--primary); width: 30px; height: 30px; border-radius: 7px; }
.table-action:hover { background: var(--primary-soft); }
.table-action:disabled { cursor: wait; opacity: .45; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.negative { color: var(--red); }
.positive { color: var(--green); }
.age-old { color: var(--red); font-weight: 750; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 750; background: #f2f1f5; color: #655f75; white-space: nowrap; }
.badge.draft { background: #f2f1f5; }
.badge.sent { background: #edf3ff; color: #3867b4; }
.badge.accepted { background: #e9f8f1; color: #11734a; }
.badge.rejected, .badge.expired { background: #fff0f0; color: #b33b3b; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.info-card h3 { margin: 0 0 8px; }
.info-card p { color: var(--muted); line-height: 1.5; }
.info-card .card-actions { margin-top: 15px; display: flex; gap: 8px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(17,14,27,.52); z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 18px; box-shadow: 0 30px 90px rgba(8,5,18,.3); }
.modal.wide { width: min(1120px, 100%); }
.modal.fullscreen { width: min(1320px, 100%); }
.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: white; z-index: 3; }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: white; }
.close-modal { border: 0; background: #f4f2f7; width: 34px; height: 34px; border-radius: 9px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.section-title { margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 15px; }

.quote-builder { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
.quote-main, .quote-summary { min-width: 0; }
.quote-summary { position: sticky; top: 82px; align-self: start; }
.line-items { border: 1px solid var(--border); border-radius: 12px; overflow: auto; margin-top: 16px; }
.line-items table { min-width: 860px; }
.line-items input, .line-items select { padding: 8px; min-width: 90px; }
.summary-box { border: 1px solid var(--border); border-radius: 14px; background: white; padding: 18px; box-shadow: var(--shadow); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.summary-line.total { border-top: 1px solid var(--border); margin-top: 7px; padding-top: 15px; font-size: 19px; font-weight: 850; }
.summary-line.margin { color: var(--green); }
.quote-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 20px; }
.quote-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.quote-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }


.team-add-button { display: inline-flex; align-items: center; gap: 8px; }
.team-add-button span { font-size: 18px; line-height: 1; }
.team-panel { border: 1px solid var(--border); border-radius: 15px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.team-panel-header { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.team-panel-header h2 { margin: 0; font-size: 17px; }
.team-list { display: grid; }
.team-member { min-height: 92px; padding: 18px 20px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px; border-bottom: 1px solid #efedf3; }
.team-member:last-child { border-bottom: 0; }
.team-member:hover { background: #fcfbff; }
.team-member.suspended { opacity: .62; }
.team-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: white; font-size: 14px; font-weight: 850; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.team-avatar.avatar-1 { background: #6c4be8; }
.team-avatar.avatar-2 { background: #168f5a; }
.team-avatar.avatar-3 { background: #d98016; }
.team-avatar.avatar-4 { background: #3376c8; }
.team-avatar.avatar-5 { background: #b54886; }
.team-identity { min-width: 0; }
.team-name-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.team-name-line strong { font-size: 15px; }
.team-email { margin-top: 5px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.team-role-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.team-role-badge.admin { color: #6846d8; background: #eee8ff; }
.team-role-badge.sales { color: #0b8152; background: #e4f7ee; }
.team-role-badge.suspended { color: #a33a3a; background: #fff0f0; }
.team-actions { display: flex; align-items: center; gap: 7px; }
.team-action { width: 38px; height: 38px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; transition: background .15s, transform .05s; }
.team-action:active { transform: translateY(1px); }
.team-action svg { width: 19px; height: 19px; }
.team-action.shield.promote { color: #13945d; }
.team-action.shield.promote:hover { background: #e7f8ef; }
.team-action.shield.demote { color: #d68a1e; }
.team-action.shield.demote:hover { background: #fff4df; }
.team-action.mail { color: #7150e7; }
.team-action.mail:hover { background: #f0ecff; }
.team-action.trash { color: #e14848; }
.team-action.trash:hover { background: #fff0f0; }
.team-form-note { margin: 18px 0 0; line-height: 1.5; }
.settings-layout { max-width: 760px; }

.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 440px; border-radius: 12px; background: #171421; color: white; padding: 13px 15px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: toast-in .18s ease-out; }
.toast.error { background: #8f2424; }
.toast.success { background: #126444; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.public-quote { min-height: 100vh; background: #f2f2f6; padding: 30px; }
.public-document { width: min(900px, 100%); margin: 0 auto; background: white; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.public-head { padding: 32px; background: #15121f; color: white; display: flex; justify-content: space-between; gap: 20px; }
.public-body { padding: 32px; }
.public-title { font-size: 34px; margin: 16px 0 8px; letter-spacing: -.04em; }
.public-actions { display: flex; gap: 10px; margin-top: 25px; }
.public-totals { width: min(360px, 100%); margin: 25px 0 0 auto; }

.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.callout { border: 1px solid #eadffd; background: #faf7ff; border-radius: 12px; padding: 16px; color: #574c70; line-height: 1.55; }
.code-box { padding: 12px; background: #15121f; color: #efeafa; border-radius: 10px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); z-index: 60; width: 260px; transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .dashboard-grid, .security-grid { grid-template-columns: 1fr; }
  .quote-builder { grid-template-columns: 1fr; }
  .quote-summary { position: static; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
@media (max-width: 720px) {
  .topbar, .page-content { padding-left: 16px; padding-right: 16px; }
  .topbar { align-items: flex-start; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .team-member { grid-template-columns: 46px minmax(0, 1fr); padding: 16px; }
  .team-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
  .form-grid .span-2 { grid-column: auto; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .public-quote { padding: 0; }
  .public-document { border-radius: 0; }
  .public-head, .public-body { padding: 22px; }
  .quotes-filter-controls { min-width: 100%; flex-basis: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
  .quotes-filter-controls .search-autocomplete,
  .quotes-filter-controls #quote-rep { width: 100%; max-width: none; min-width: 0; }
}
@media print {
  .public-quote { padding: 0; background: white; }
  .public-document { box-shadow: none; }
  .public-actions { display: none; }
}

/* v0.2.5 quote wizard */
.modal-backdrop:has(.quote-wizard-modal) { padding: 0; background: #fff; }
.modal.quote-wizard-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; box-shadow: none; overflow: hidden; }
.quote-wizard-modal > .modal-head { display: none; }
.quote-wizard-modal > .modal-body { height: 100%; padding: 0; }
.quote-wizard-shell { height: 100%; display: grid; grid-template-rows: 64px minmax(0, 1fr); background: #fff; color: #121726; }
.quote-wizard-topbar { min-height: 64px; padding: 0 max(24px, calc((100vw - 1160px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #12101b; color: #fff; }
.quote-wizard-topbar > strong { font-size: 19px; font-weight: 750; }
.quote-wizard-topbar > div { display: flex; align-items: center; gap: 18px; color: #b9b3c8; font-size: 14px; }
.quote-wizard-topbar button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #cfc9da; font-size: 24px; line-height: 1; }
.quote-wizard-topbar button:hover { background: #292635; color: #fff; }
.quote-wizard-scroll { overflow: auto; min-height: 0; background: #fff; }
.quote-wizard-container { position: relative; width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 64px); margin: 0 auto; padding: 8px 0 26px; }
.quote-wizard-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 12px 0 10px; min-height: 42px; }
.quote-wizard-navigation-side { display: flex; align-items: center; }
.quote-wizard-navigation-side.end { justify-content: flex-end; }
.quote-wizard-navigation .btn { min-width: 112px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.quote-wizard-navigation .btn[hidden] { display: none; }
.quote-wizard-restart { min-width: auto !important; min-height: 36px !important; padding: 7px 12px; border: 1px solid transparent; background: transparent; color: #6f687c; box-shadow: none; }
.quote-wizard-restart:hover { border-color: #ddd8e7; background: #f7f5fa; color: #352d45; }
.quote-stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 15px 0 38px; }
.quote-step { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 0; border-radius: 9px; background: #f1eff4; color: #7a7486; font-size: 14px; font-weight: 650; transition: .16s ease; }
.quote-step svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quote-step.active { background: #6440df; color: #fff; box-shadow: 0 5px 13px rgba(100,64,223,.24); }
.quote-step.complete { background: #f0eaff; color: #6843dc; }
.quote-step-arrow { color: #aaa4b2; font-size: 24px; }
#quote-step-content { width: min(760px, 100%); margin: 0 auto; }
.quote-step-heading { margin-bottom: 24px; }
.quote-step-heading h2 { margin: 0 0 3px; font-size: 25px; line-height: 1.15; letter-spacing: -.025em; font-weight: 780; }
.quote-step-heading p { margin: 0; color: #817a91; font-size: 16px; }
.quote-form-block { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.quote-form-block.one-column { grid-template-columns: 1fr; }
.quote-form-block.compact { gap: 14px 16px; }
.quote-field { display: grid; gap: 7px; margin: 0; color: #29243a; font-size: 14px; font-weight: 650; }
.quote-field.full, .quote-form-block .full { grid-column: 1 / -1; }
.quote-field input, .quote-field select, .quote-field textarea, .quote-map-search input { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid #dedbe6; border-radius: 9px; outline: 0; background: #fff; color: #242031; font-size: 15px; font-weight: 430; transition: border .15s, box-shadow .15s; }
.quote-field textarea { min-height: 85px; resize: vertical; }
.quote-field input:focus, .quote-field select:focus, .quote-field textarea:focus, .quote-map-search input:focus { border-color: #6843df; box-shadow: 0 0 0 3px rgba(104,67,223,.11); }
.quote-field input:disabled { background: #f5f4f7; color: #aaa5b1; }
.quote-basics-form { gap: 19px 16px; }
.quote-segmented { display: flex; gap: 8px; }
.quote-segmented button { min-height: 38px; padding: 8px 13px; border: 1px solid #dfdbe7; border-radius: 8px; background: #fff; color: #282238; font-size: 14px; }
.quote-segmented button.active { border-color: #6542de; background: #6542de; color: #fff; }
.quote-new-customer { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; border: 1px solid #e5e1eb; border-radius: 11px; background: #fbfaff; }
.quote-checkbox { display: flex; align-items: center; gap: 9px; margin: 0; color: #252033; font-size: 14px; }
.quote-checkbox.top-align { align-items: flex-start; }
.quote-checkbox input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #6542de; }
.quote-checkbox small { display: block; margin-top: 4px; color: #817a91; font-weight: 430; line-height: 1.4; }
.quote-wizard-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 31px; padding-top: 14px; }
.quote-wizard-footer-side { flex: 1; display: flex; align-items: center; }
.quote-wizard-footer-side.end { justify-content: flex-end; }
.quote-wizard-footer .btn { min-width: 112px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.quote-accordion { margin: 0 0 14px; border: 1px solid #e4e1e8; border-radius: 11px; overflow: hidden; background: #fff; }
.quote-accordion-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fafafa; }
.quote-accordion-head strong { display: block; font-size: 15px; }
.quote-accordion-head span { color: #8a8394; }
.quote-accordion-head div span { display: block; margin-top: 2px; font-size: 13px; }
.quote-accordion-body { padding: 17px 16px 19px; border-top: 1px solid #ece9ef; }
.quote-line-layout { width: min(1110px, calc(100vw - 80px)); margin-left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 20px; align-items: start; }
.quote-product-catalogue { display: grid; gap: 16px; }
.quote-product-section { border: 1px solid #e2dfe7; border-radius: 11px; overflow: hidden; background: #fff; }
.quote-product-section-title { padding: 15px 16px; border-bottom: 1px solid #ebe8ef; }
.quote-product-section-title h3 { margin: 0 0 3px; font-size: 16px; }
.quote-product-section-title p { margin: 0; color: #827b8e; font-size: 13px; }
.quote-product-category { border-bottom: 1px solid #ece9ef; }
.quote-product-category:last-child { border-bottom: 0; }
.quote-product-category summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; cursor: pointer; font-weight: 650; }
.quote-product-category summary::-webkit-details-marker { display: none; }
.quote-product-category summary span:last-child { min-width: 25px; padding: 2px 7px; border-radius: 999px; background: #f1eef7; color: #756d82; text-align: center; font-size: 11px; }
.quote-product-options { display: grid; gap: 1px; padding: 0 7px 8px; }
.quote-product-options button { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 11px; border: 0; border-radius: 7px; background: #fff; text-align: left; }
.quote-product-options button:hover { background: #f7f4ff; }
.quote-product-options button span { display: grid; gap: 2px; }
.quote-product-options button strong { font-size: 13px; font-weight: 650; }
.quote-product-options button small { color: #928b9b; }
.quote-product-options button b { color: #6040d8; font-size: 13px; white-space: nowrap; }
.quote-selected-items { position: sticky; top: 16px; padding: 16px; border: 1px solid #e1dde7; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(28,20,49,.05); }
.quote-selected-items > h3 { margin: 0 0 14px; font-size: 16px; }
.quote-empty-items { display: grid; place-items: center; min-height: 190px; padding: 24px; border: 1px dashed #dad4e4; border-radius: 10px; color: #8e8798; text-align: center; }
.quote-empty-items span { font-size: 28px; }
.quote-empty-items p { margin: 4px 0 0; line-height: 1.45; }
.quote-selected-list { display: grid; gap: 11px; margin-bottom: 13px; }
.quote-selected-card { padding: 12px; border: 1px solid #e7e3ec; border-radius: 9px; background: #fcfbfd; }
.quote-selected-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.quote-selected-card-head strong, .quote-selected-card-head small { display: block; }
.quote-selected-card-head small { margin-top: 2px; color: #90899a; }
.quote-selected-card-head button { border: 0; background: transparent; color: #d84a4a; font-size: 20px; }
.quote-selected-card > label { display: grid; gap: 4px; margin-top: 10px; color: #766f80; font-size: 11px; }
.quote-selected-card input { width: 100%; min-height: 34px; padding: 7px 8px; border: 1px solid #ddd8e5; border-radius: 7px; background: #fff; }
.quote-item-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; margin-top: 9px; }
.quote-item-controls > label { display: grid; gap: 4px; color: #766f80; font-size: 11px; }
.quote-qty-control { display: grid; grid-template-columns: 33px 1fr 33px; }
.quote-qty-control button, .quote-qty-control input { min-height: 34px; border: 1px solid #ddd8e5; background: #fff; text-align: center; }
.quote-qty-control button:first-child { border-radius: 7px 0 0 7px; }
.quote-qty-control button:last-child { border-radius: 0 7px 7px 0; }
.quote-qty-control input { min-width: 0; border-left: 0; border-right: 0; border-radius: 0; }
.quote-item-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7e3ec; font-size: 12px; }
.quote-upload-card, .quote-map-card { margin-bottom: 17px; padding: 16px; border: 1px solid #e2dfe7; border-radius: 11px; background: #fff; }
.quote-upload-card h3, .quote-map-card h3 { margin: 0 0 3px; font-size: 15px; }
.quote-upload-card p { margin: 0 0 13px; color: #817a8c; font-size: 13px; }
.quote-dropzone { display: grid; place-items: center; min-height: 125px; padding: 18px; border: 1px dashed #cfc7da; border-radius: 10px; background: #fbfaff; text-align: center; cursor: pointer; }
.quote-dropzone input { display: none; }
.quote-dropzone > span { color: #6d49dd; font-size: 25px; }
.quote-dropzone strong { margin-top: 3px; color: #55476d; }
.quote-dropzone small { margin-top: 3px; color: #918a9a; }
.quote-image-preview { display: block; width: min(360px, 100%); max-height: 230px; object-fit: cover; margin: 13px auto 0; border-radius: 9px; }
.quote-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 13px; }
.quote-preview-grid figure { margin: 0; }
.quote-preview-grid img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; }
.quote-preview-grid figcaption { margin-top: 3px; color: #7d7588; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.quote-file-chips span { padding: 5px 8px; border-radius: 999px; background: #f1eef7; color: #6d6478; font-size: 11px; }
.quote-map-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0; }
.quote-map-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.quote-map-toolbar strong { margin-right: 3px; font-size: 12px; }
.quote-map-toolbar button { min-height: 31px; padding: 6px 9px; border: 1px solid #ded9e5; border-radius: 7px; background: #fff; color: #4e465a; font-size: 11px; }
.quote-map-toolbar button.active { border-color: #6742de; background: #ede7ff; color: #6240d5; }
.quote-map-toolbar button.danger { color: #c74040; border-color: #efc8c8; }
.quote-map-toolbar button.purple { color: #6d42da; border-color: #d8c9f6; }
.quote-map-canvas { position: relative; height: 360px; overflow: hidden; border: 1px solid #dad5e1; border-radius: 9px; background: radial-gradient(circle at 25% 28%, rgba(68,116,69,.34) 0 10%, transparent 11%), radial-gradient(circle at 73% 62%, rgba(75,125,75,.28) 0 15%, transparent 16%), linear-gradient(145deg, #b9c9a9, #d6d1b8 48%, #9fb393); cursor: crosshair; }
.quote-map-road { position: absolute; background: rgba(236,229,210,.9); box-shadow: 0 0 0 2px rgba(126,116,95,.35); }
.quote-map-road.road-a { width: 120%; height: 17px; left: -10%; top: 48%; transform: rotate(-8deg); }
.quote-map-road.road-b { width: 18px; height: 130%; left: 66%; top: -15%; transform: rotate(13deg); }
.quote-map-road.road-c { width: 70%; height: 10px; left: -8%; top: 22%; transform: rotate(22deg); }
.map-annotation { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 27px; height: 27px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 3; }
.map-annotation.charger { background: #2f8f53; color: #fff; }
.map-annotation.route { width: 14px; height: 14px; background: #e34b4b; color: #fff; }
.map-annotation.parking { border-radius: 4px; background: #3381d0; color: #fff; }
.map-annotation.zone { border-radius: 4px; background: #e89529; color: #fff; }
.map-annotation.coverage { width: 58px; height: 58px; background: rgba(81,169,106,.24); color: #16813f; border-color: #39a45b; }
.quote-map-brand { position: absolute; right: 10px; bottom: 8px; padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,.82); color: #5c5664; font-size: 10px; }
.quote-map-legend { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 10px; color: #716a7b; font-size: 11px; }
.quote-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.quote-map-legend i { width: 10px; height: 10px; border-radius: 50%; background: #2f8f53; }
.quote-map-legend i.route { background: #e34b4b; }.quote-map-legend i.parking { border-radius: 2px; background: #3381d0; }.quote-map-legend i.zone { border-radius: 2px; background: #e89529; }.quote-map-legend i.coverage { background: #51a96a; }
.quote-ai-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; padding: 17px; border: 1px solid #dfcdfd; border-radius: 11px; background: linear-gradient(135deg, #faf4ff, #f7f1ff); }
.quote-ai-card h3 { margin: 0 0 4px; color: #6a38c9; font-size: 15px; }
.quote-ai-card p { margin: 0; color: #756786; font-size: 13px; line-height: 1.4; }
.quote-ai-card button { flex: 0 0 auto; min-height: 40px; padding: 8px 13px; border: 0; border-radius: 8px; background: #6841dc; color: #fff; font-weight: 650; }
.quote-review-grid { display: grid; gap: 13px; }
.quote-review-card { padding: 16px; border: 1px solid #e2dfe7; border-radius: 11px; background: #fff; }
.quote-review-card h3 { margin: 0 0 12px; font-size: 15px; }
.quote-review-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; margin: 0; }
.quote-review-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.quote-review-card dt { color: #837c8d; }.quote-review-card dd { margin: 0; font-weight: 650; }
.quote-review-lines { display: grid; gap: 7px; }
.quote-review-lines > div { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 7px; border-bottom: 1px solid #efedf2; }
.quote-vat-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; }
.quote-vat-row select { min-height: 33px; padding: 5px 9px; border: 1px solid #ddd9e4; border-radius: 7px; background: #fff; }
.quote-margin-card { border-color: #ecd9a3; background: #fffbeb; }
.quote-margin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #9a6b12; font-size: 11px; }
.quote-margin-head button { border: 0; border-radius: 6px; background: #f8e7b5; color: #8f6211; padding: 5px 8px; }
.quote-margin-value { display: block; color: #8b5d0b; font-size: 23px; }
.quote-margin-card p { margin: 4px 0 0; color: #8d7950; }

@media (max-width: 920px) {
  .quote-line-layout { width: 100%; margin-left: 0; transform: none; grid-template-columns: 1fr; }
  .quote-selected-items { position: static; }
  .quote-stepper { justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .quote-step span { white-space: nowrap; }
}
@media (max-width: 650px) {
  .quote-wizard-container { width: min(100% - 24px, 1160px); }
  .quote-wizard-topbar { padding: 0 14px; }
  .quote-wizard-navigation { gap: 8px; margin-top: 10px; }
  .quote-wizard-navigation .btn { min-width: 96px; }
  .quote-wizard-restart { min-width: auto !important; }
  .quote-stepper { margin-bottom: 25px; }
  .quote-step { padding: 8px 10px; }
  .quote-step-arrow { display: none; }
  .quote-form-block, .quote-new-customer { grid-template-columns: 1fr; }
  .quote-field.full, .quote-form-block .full { grid-column: auto; }
  .quote-ai-card { align-items: flex-start; flex-direction: column; }
  .quote-review-card dl { grid-template-columns: 1fr; }
  .quote-preview-grid { grid-template-columns: 1fr 1fr; }
}

/* v0.2.7 proposal generation */
.quote-step:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; }
.quote-step.complete:not(:disabled) { cursor: pointer; }
.quote-step.complete:not(:disabled):hover { background: #e6dcff; transform: translateY(-1px); }
.proposal-document-card { align-items: center; }
.proposal-download-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.proposal-download-actions .btn { min-width: 140px; }
.quote-detail-actions a.btn { text-decoration: none; }
@media (max-width: 760px) {
  .proposal-document-card { align-items: stretch; }
  .proposal-download-actions { justify-content: stretch; }
  .proposal-download-actions .btn { flex: 1 1 150px; }
}

/* v0.2.9 faithful site map and reliable document downloads */
#quote-step-content.site-map-step { width: min(900px, 100%); }
.quote-upload-card.template-card { padding: 16px; margin-bottom: 24px; border-radius: 10px; box-shadow: 0 4px 14px rgba(30, 24, 48, .07); }
.quote-card-heading, .quote-map-section-title { display: flex; align-items: flex-start; gap: 12px; }
.quote-card-heading { margin-bottom: 13px; }
.quote-card-heading h3, .quote-map-section-title h3 { margin: 0 0 3px; font-size: 14px; font-weight: 700; }
.quote-card-heading p { margin: 0; font-size: 12px; line-height: 1.45; color: #817a8c; }
.quote-card-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 9px; }
.quote-card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quote-card-icon.blue { color: #2563eb; background: #dbeafe; }
.quote-card-icon.purple { color: #6d3ee6; background: #ede9fe; }
.quote-card-icon.green { color: #159455; background: #dcfce7; }
.quote-dropzone.template-dropzone { min-height: 112px; background: #fff; border: 2px dashed #d8d4df; }
.quote-dropzone.template-dropzone:hover { border-color: #8b6eea; background: #faf8ff; }
.quote-dropzone.template-dropzone svg { width: 28px; height: 28px; fill: none; stroke: #8a8491; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quote-dropzone.template-dropzone strong { font-size: 13px; color: #4d4758; }
.quote-dropzone.template-dropzone small { font-size: 11px; }
.quote-map-section { margin-top: 6px; }
.quote-map-section-title { align-items: center; margin: 4px 0 14px; }
.quote-map-section-title h3 { font-size: 15px; }
.quote-map-search.template-search { display: flex; gap: 8px; margin: 0 0 14px; }
.quote-map-search.template-search > div { position: relative; flex: 1; }
.quote-map-search.template-search > div > svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: #8a8491; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; z-index: 1; }
.quote-map-search.template-search input { min-height: 42px; padding-left: 39px; }
.quote-map-search.template-search .btn { min-height: 42px; gap: 7px; padding: 0 18px; }
.quote-map-search.template-search .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.quote-map-toolbar.template-toolbar { padding: 12px; margin: 0 0 14px; border: 1px solid #e1dde7; border-radius: 9px; background: #fff; box-shadow: 0 4px 14px rgba(30, 24, 48, .06); }
.quote-map-toolbar.template-toolbar strong { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; color: #6f6879; font-size: 12px; }
.quote-map-toolbar.template-toolbar strong svg, .quote-map-toolbar.template-toolbar button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quote-map-toolbar.template-toolbar button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 7px 10px; font-size: 11px; box-shadow: 0 1px 2px rgba(20,15,30,.04); }
.quote-map-toolbar.template-toolbar .toolbar-spacer { flex: 1 1 20px; }
.quote-map-frame { position: relative; height: 500px; overflow: hidden; border: 1px solid #d9d5e0; border-radius: 9px; background: #e5e7eb; box-shadow: 0 8px 20px rgba(25, 20, 40, .10); }
.quote-leaflet-map { width: 100%; height: 100%; z-index: 1; }
.quote-map-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #746d7d; background: #f3f4f6; font-size: 13px; pointer-events: none; }
.quote-map-help { margin: 10px 2px 0; color: #7d7686; font-size: 11px; line-height: 1.45; }
.orderwolf-site-marker { background: transparent; border: 0; }
.orderwolf-site-marker span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: #2f8f53; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 16px; }
.leaflet-container, .leaflet-container * { font-family: var(--font-ui); }
.leaflet-control-attribution { font-size: 10px; }
@media (max-width: 760px) {
  .quote-map-search.template-search { flex-direction: column; }
  .quote-map-search.template-search .btn { align-self: stretch; }
  .quote-map-frame { height: 420px; }
  .quote-map-toolbar.template-toolbar .toolbar-spacer { display: none; }
}

/* v0.3.0 template-matched satellite map */
.template-map-section { margin-top: 8px; }
.template-satellite-frame { height: 500px; border-radius: 8px; border-color: #d8d4df; box-shadow: none; }
.quote-map-results { margin: -8px 0 14px; padding: 6px; border: 1px solid #ddd8e5; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(31, 24, 47, .12); }
.quote-map-results button { width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; color: #312a3d; cursor: pointer; }
.quote-map-results button:hover { background: #f6f3fb; }
.quote-map-results strong { display: block; font-size: 12px; line-height: 1.35; }
.quote-map-toolbar.template-toolbar button.active { transform: none; box-shadow: 0 0 0 2px rgba(103, 65, 217, .12); }
.quote-map-toolbar.template-toolbar .map-tool-charger.active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.quote-map-toolbar.template-toolbar .map-tool-route.active,
.quote-map-toolbar.template-toolbar .map-tool-zone.active { border-color: #8b5cf6; background: #f5f3ff; color: #6d28d9; }
.quote-map-toolbar.template-toolbar .map-tool-parking.active { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; }
.quote-map-toolbar.template-toolbar .map-tool-coverage.active { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.quote-map-legend-card { margin-top: 14px; padding: 14px 16px; border: 1px solid #ded9e5; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(31, 24, 47, .05); }
.quote-map-legend-card h4 { margin: 0 0 11px; font-size: 12px; }
.quote-map-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.quote-map-legend span { display: flex; align-items: center; gap: 7px; color: #5f5869; font-size: 11px; white-space: nowrap; }
.quote-map-legend i { display: inline-block; flex: 0 0 auto; }
.legend-pin { width: 16px; color: #2563eb; font-style: normal; font-size: 18px; line-height: 1; }
.legend-route { width: 17px; height: 3px; border-radius: 2px; background: #8b5cf6; }
.legend-parking { width: 16px; height: 12px; border: 2px solid #3b82f6; border-radius: 2px; background: #dbeafe; }
.legend-zone { width: 16px; height: 13px; border: 2px solid #8b5cf6; background: #ede9fe; clip-path: polygon(50% 0%,100% 40%,80% 100%,20% 100%,0 40%); }
.legend-coverage { width: 15px; height: 15px; border: 2px solid #f59e0b; border-radius: 50%; background: #fef3c7; }
.orderwolf-template-site-marker { background: transparent; border: 0; }
.orderwolf-template-site-marker > span { display: grid; place-items: center; width: 34px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.orderwolf-template-site-marker svg { width: 34px; height: 40px; fill: #2563eb; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.orderwolf-template-site-marker svg circle { fill: #fff; stroke: #2563eb; }
.leaflet-control-attribution { max-width: calc(100% - 12px); background: rgba(255,255,255,.86) !important; color: #625b69; }
.leaflet-control-attribution a { color: #5744bb; }
.quote-map-loading code { padding: 2px 5px; border-radius: 4px; background: #e9e5ef; color: #4d4358; }
@media (max-width: 900px) {
  .quote-map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .template-satellite-frame { height: 420px; }
  .quote-map-legend { grid-template-columns: 1fr; }
}


/* v0.3.1 search suggestions and map-layer selector */
.search-autocomplete { position: relative; min-width: min(360px, 100%); flex: 1 1 280px; }
.search-autocomplete > .search { width: 100%; }
.search-suggestions, .quote-map-results { position: absolute; z-index: 1200; top: calc(100% + 6px); left: 0; right: 0; max-height: 330px; overflow-y: auto; padding: 6px; border: 1px solid #ddd8e5; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(31, 24, 47, .16); }
.search-suggestions button, .quote-map-results button { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 2px 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; text-align: left; color: #312a3d; cursor: pointer; }
.search-suggestions button:hover, .search-suggestions button:focus, .quote-map-results button:hover, .quote-map-results button:focus { background: #f6f3fb; outline: 0; }
.search-suggestions strong, .quote-map-results strong { grid-row: 1 / span 2; align-self: center; font-size: 12px; }
.search-suggestions span { font-size: 12px; font-weight: 600; }
.search-suggestions small, .quote-map-results small { color: #827a8d; font-size: 10px; }
.autocomplete-status { padding: 10px 12px; color: #837b8d; font-size: 12px; }
.quote-map-search.template-search > div { z-index: 10; }
.quote-map-results { top: calc(100% + 6px); margin: 0; }
/* v0.3.2 compact, collapsible and aligned map-layer control */
.leaflet-top.leaflet-right .leaflet-control-layers { margin-top: 12px; margin-right: 12px; }
.leaflet-control-layers {
  overflow: hidden;
  border: 1px solid rgba(82, 72, 101, .18) !important;
  border-radius: 10px !important;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 20, 36, .16) !important;
  font: 12px/1.35 var(--font-ui);
}
.leaflet-control-layers-toggle {
  width: 40px !important;
  height: 40px !important;
  border-radius: 9px;
  background-position: center !important;
  background-size: 21px 21px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23665f73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 9 5-9 5-9-5 9-5Z'/%3E%3Cpath d='m3 12 9 5 9-5'/%3E%3Cpath d='m3 17 9 5 9-5'/%3E%3C/svg%3E") !important;
}
.leaflet-control-layers-toggle:hover,
.leaflet-control-layers-toggle:focus { background-color: #f7f5fb; }
.leaflet-control-layers-expanded {
  min-width: 184px;
  padding: 8px;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list { margin: 0; }
.leaflet-control-layers-base label { display: block; margin: 0; }
.leaflet-control-layers-base label > span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 7px;
  color: #342e3e;
  white-space: nowrap;
}
.leaflet-control-layers-base label > span:hover { background: #f6f3fb; }
.leaflet-control-layers-selector {
  width: 14px;
  height: 14px;
  margin: 0 !important;
  justify-self: center;
  accent-color: #5b36db;
}
.leaflet-control-layers-separator { display: none; }

/* v0.4.0 sales dashboard, deals pipeline and per-user calendar */
.header-control-group { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.compact-select { min-width: 170px; max-width: 240px; padding: 9px 34px 9px 11px; }
.text-button { border: 0; background: transparent; color: var(--primary); font-weight: 750; font-size: 12px; padding: 6px 0; }
.empty.compact { padding: 24px 18px; }
.table-subtitle { display: block; margin-top: 3px; color: var(--muted); font-weight: 450; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.dashboard-kpi {
  --kpi-accent: var(--primary);
  --kpi-soft: var(--primary-soft);
  min-height: 118px;
  padding: 15px 17px 17px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--kpi-accent);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.dashboard-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #756f84; font-size: 11px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.dashboard-kpi .kpi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--kpi-accent); box-shadow: 0 0 0 5px var(--kpi-soft); }
.dashboard-kpi > strong { display: block; margin-top: 13px; font-size: 27px; line-height: 1; letter-spacing: -.045em; }
.dashboard-kpi > small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.dashboard-kpi.pipeline, .dashboard-kpi.weighted { --kpi-accent: #2f8f53; --kpi-soft: #eee9ff; }
.dashboard-kpi.won, .dashboard-kpi.complete { --kpi-accent: #2f8f53; --kpi-soft: #e8f8f1; }
.dashboard-kpi.due { --kpi-accent: #e59a13; --kpi-soft: #fff5df; }
.dashboard-kpi.overdue { --kpi-accent: #df4e55; --kpi-soft: #fff0f0; }
.dashboard-kpi.quotes, .dashboard-kpi.conversion { --kpi-accent: #9a83e8; --kpi-soft: #f2effd; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr); gap: 16px; margin-top: 16px; align-items: start; }
.dashboard-pipeline-panel, .dashboard-team-panel, .dashboard-attention-panel { grid-column: 1 / -1; }
.dashboard-trend-panel, .dashboard-closes-panel, .dashboard-week-panel { min-height: 330px; }
.pipeline-report { padding: 8px 18px 16px; display: grid; }
.pipeline-report-row { display: grid; grid-template-columns: 130px minmax(120px, 1fr) 90px 105px 100px; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; border: 0; border-bottom: 1px solid #f0eef4; background: transparent; text-align: left; color: inherit; }
.pipeline-report-row:last-child { border-bottom: 0; }
.pipeline-report-row:hover { background: #fbfaff; }
.pipeline-stage-name { font-size: 12px; font-weight: 750; }
.pipeline-bar-track { height: 9px; border-radius: 99px; overflow: hidden; background: #f1eff5; }
.pipeline-bar { display: block; height: 100%; border-radius: inherit; background: #8d73ef; }
.pipeline-bar.stage-initial-contact { background: #6f8eea; }
.pipeline-bar.stage-needs-analysis { background: #4aa9c8; }
.pipeline-bar.stage-proposal-sent { background: #e5a32d; }
.pipeline-bar.stage-negotiation { background: #dc7450; }
.pipeline-bar.stage-closed-won { background: #27a76d; }
.pipeline-bar.stage-closed-lost { background: #cc5c61; }
.pipeline-stage-count, .pipeline-report-row small { color: var(--muted); font-size: 11px; }
.dashboard-task-list { max-height: 390px; overflow: auto; padding: 7px 14px 14px; }
.task-row { display: grid; grid-template-columns: 25px 29px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 7px; border-bottom: 1px solid #f0eef4; cursor: pointer; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fbfaff; }
.task-row.completed { opacity: .62; }
.task-row.completed .task-main strong { text-decoration: line-through; }
.task-row.overdue .task-when, .task-row.overdue .task-when small { color: var(--red); }
.task-check, .calendar-task-check { width: 20px; height: 20px; padding: 0; border: 1.5px solid #c9c4d4; border-radius: 6px; background: #fff; color: #fff; font-size: 12px; font-weight: 900; line-height: 17px; }
.task-row.completed .task-check, .calendar-task.completed .calendar-task-check { border-color: var(--green); background: var(--green); }
.task-type-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.task-main { min-width: 0; display: grid; gap: 3px; }
.task-main strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-main small, .task-when small { color: var(--muted); font-size: 10px; }
.task-when { display: grid; gap: 3px; text-align: right; white-space: nowrap; }
.task-when strong { font-size: 11px; }
.mini-chart { height: 255px; padding: 26px 20px 16px; display: grid; grid-template-columns: repeat(8, minmax(24px, 1fr)); align-items: end; gap: 9px; }
.mini-chart-column { height: 100%; display: grid; grid-template-rows: 20px minmax(10px, 1fr) 28px; align-items: end; justify-items: center; gap: 5px; }
.mini-chart-value { color: var(--muted); font-size: 10px; }
.mini-chart-bar { width: min(36px, 72%); min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #8063eb, #6042d8); }
.mini-chart-column small { color: var(--muted); font-size: 9px; text-align: center; }
.close-date-list { display: grid; padding: 5px 14px 14px; }
.close-date-list > button { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 6px; border: 0; border-bottom: 1px solid #f0eef4; background: transparent; text-align: left; color: inherit; }
.close-date-list > button:last-child { border-bottom: 0; }
.close-date-list > button:hover { background: #fbfaff; }
.close-date-list span { min-width: 0; display: grid; gap: 3px; }
.close-date-list span strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.close-date-list small { color: var(--muted); font-size: 10px; }
.close-date { padding-left: 8px; border-left: 3px solid var(--primary); }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell > span:last-child { display: grid; gap: 2px; }
.person-cell small { color: var(--muted); font-size: 10px; }
.mini-avatar { width: 29px; height: 29px; display: grid !important; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 850; }
.team-performance-table th, .team-performance-table td { padding-top: 11px; padding-bottom: 11px; }

.deals-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.deals-search-wrap { max-width: 520px; }
.deals-toolbar > select { width: auto; min-width: 180px; }
.deal-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 300px); gap: 12px; overflow-x: auto; align-items: start; padding: 2px 2px 18px; scroll-snap-type: x proximity; }
.deal-column { min-height: 540px; border: 1px solid #e3e0e9; border-radius: 13px; background: #f5f4f8; overflow: hidden; scroll-snap-align: start; transition: border-color .15s, background .15s; }
.deal-column.drag-over { border-color: var(--primary); background: #f0ecff; box-shadow: inset 0 0 0 2px rgba(101,71,231,.14); }
.deal-column > header { padding: 14px; border-top: 4px solid #8f7aa9; border-bottom: 1px solid #e4e1ea; background: #fff; }
.deal-column.stage-prospecting > header { border-top-color: #8a83a0; }
.deal-column.stage-initial-contact > header { border-top-color: #6788e2; }
.deal-column.stage-needs-analysis > header { border-top-color: #49a5c6; }
.deal-column.stage-proposal-sent > header { border-top-color: #e4a22c; }
.deal-column.stage-negotiation > header { border-top-color: #d77655; }
.deal-column.stage-closed-won > header { border-top-color: #23a36a; }
.deal-column.stage-closed-lost > header { border-top-color: #cf5b62; }
.deal-column > header > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deal-column h3 { margin: 0; font-size: 13px; }
.deal-column header span { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 99px; background: #f1eff5; color: #6d6779; font-size: 10px; font-weight: 800; }
.deal-column header > strong { display: block; margin-top: 10px; font-size: 18px; letter-spacing: -.025em; }
.deal-column header > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.deal-column-body { min-height: 410px; padding: 10px; display: grid; align-content: start; gap: 9px; }
.deal-card { padding: 13px; border: 1px solid #dfdce6; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(22,18,36,.04); cursor: pointer; }
.deal-card:hover { border-color: #c8c0df; box-shadow: 0 5px 15px rgba(27,22,42,.08); }
.deal-card.dragging { opacity: .45; }
.deal-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.deal-reference { color: var(--primary); font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.deal-card-menu { border: 0; background: transparent; color: #8b8595; padding: 0 3px; letter-spacing: 1px; }
.deal-card h4 { margin: 9px 0 4px; font-size: 13px; line-height: 1.35; }
.deal-card > p { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-value { display: block; margin-top: 13px; font-size: 18px; letter-spacing: -.03em; }
.deal-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.deal-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-next-action { display: grid; grid-template-columns: 25px 1fr; gap: 7px; align-items: center; margin-top: 11px; padding: 8px; border-radius: 8px; background: #f7f6fa; color: #6d6677; }
.deal-next-action > span:first-child { display: grid; place-items: center; }
.deal-next-action > span:last-child { display: grid; gap: 2px; min-width: 0; }
.deal-next-action strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-next-action small { font-size: 9px; color: var(--muted); }
.deal-next-action.overdue { background: #fff1f1; color: var(--red); }
.deal-add-task, .deal-column-add { width: 100%; margin-top: 9px; padding: 7px; border: 1px dashed #cec8db; border-radius: 7px; background: transparent; color: #6f687b; font-size: 10px; font-weight: 700; }
.deal-add-task:hover, .deal-column-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.deal-column-add { width: calc(100% - 20px); margin: 0 10px 10px; }
.deal-column-empty { padding: 32px 10px; text-align: center; color: #aaa4b4; font-size: 11px; }
.deal-stage-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f1eff5; color: #655f73; font-size: 10px; font-weight: 800; }
.deal-stage-pill.stage-closed-won { background: #e7f7ef; color: #16784e; }
.deal-stage-pill.stage-closed-lost { background: #fff0f0; color: #ae3e45; }
.deal-stage-pill.stage-proposal-sent { background: #fff5df; color: #a66608; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.calendar-nav { display: flex; gap: 7px; }
.calendar-summary-inline { display: flex; align-items: center; gap: 17px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.calendar-summary-inline span { display: flex; align-items: baseline; gap: 4px; }
.calendar-summary-inline strong { color: var(--ink); font-size: 15px; }
.calendar-summary-inline .age-old strong { color: var(--red); }
.calendar-summary-inline .positive strong { color: var(--green); }
.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); min-width: 1080px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.page-content:has(.week-calendar) { overflow-x: auto; }
.calendar-day { min-height: 470px; border-right: 1px solid var(--border); background: #fff; display: flex; flex-direction: column; }
.calendar-day:last-child { border-right: 0; }
.calendar-day.today { background: #fbfaff; }
.calendar-day > header { min-height: 78px; padding: 11px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; }
.calendar-day > header span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.calendar-day > header strong { grid-row: 1 / span 2; grid-column: 2; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; }
.calendar-day.today > header strong { background: var(--primary); color: #fff; }
.calendar-day > header small { color: var(--muted); font-size: 9px; }
.calendar-day-body { flex: 1; min-height: 350px; padding: 7px; display: grid; align-content: start; gap: 7px; }
.calendar-task { position: relative; padding: 9px 8px 9px 31px; border: 1px solid #e2ddeb; border-left: 3px solid var(--primary); border-radius: 8px; background: #f9f7ff; cursor: pointer; display: grid; gap: 3px; }
.calendar-task.type-call { border-left-color: #4e86d8; background: #f4f8ff; }
.calendar-task.type-email { border-left-color: #9b65d6; }
.calendar-task.type-meeting { border-left-color: #dc8f25; background: #fff9ee; }
.calendar-task.type-site-visit { border-left-color: #2aa56b; background: #f2fbf7; }
.calendar-task.overdue { border-color: #f3c9c9; border-left-color: var(--red); background: #fff4f4; }
.calendar-task.completed { opacity: .6; }
.calendar-task.completed > strong { text-decoration: line-through; }
.calendar-task-check { position: absolute; top: 9px; left: 7px; width: 17px; height: 17px; border-radius: 5px; }
.calendar-task-time { color: #6f687b; font-size: 9px; font-weight: 800; }
.calendar-task > strong { font-size: 10px; line-height: 1.35; }
.calendar-task > small { color: var(--muted); font-size: 9px; }
.calendar-task > em { color: var(--primary); font-size: 8px; font-style: normal; font-weight: 800; }
.calendar-empty-day { padding: 25px 5px; color: #b0aab7; text-align: center; font-size: 10px; }
.calendar-day-add { margin: 5px 7px 8px; padding: 7px; border: 0; border-radius: 7px; background: transparent; color: var(--primary); font-size: 10px; font-weight: 750; }
.calendar-day-add:hover { background: var(--primary-soft); }
.calendar-agenda { margin-top: 16px; }
.agenda-list { padding: 8px 14px 16px; }

@media (max-width: 1180px) {
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-pipeline-panel, .dashboard-team-panel, .dashboard-attention-panel { grid-column: auto; }
  .pipeline-report-row { grid-template-columns: 120px minmax(100px, 1fr) 80px 95px; }
  .pipeline-report-row small { display: none; }
}
@media (max-width: 760px) {
  .dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .dashboard-kpi { min-height: 105px; padding: 13px; }
  .dashboard-kpi > strong { font-size: 21px; }
  .pipeline-report-row { grid-template-columns: 105px 1fr auto; gap: 8px; }
  .pipeline-report-row strong, .pipeline-report-row small { display: none; }
  .deal-board { grid-auto-columns: minmax(270px, 88vw); }
  .header-control-group { width: 100%; }
  .header-control-group .compact-select { flex: 1; max-width: none; }
}


/* v0.4.1 map usability and private R2 capture storage */
.quote-map-toolbar.template-toolbar .map-tool-pan.active {
  border-color: #64748b;
  background: #f8fafc;
  color: #334155;
}
.quote-leaflet-map { cursor: grab; }
.quote-leaflet-map:active { cursor: grabbing; }
.quote-leaflet-map.drawing-active,
.quote-leaflet-map.drawing-active:active { cursor: crosshair; }
.leaflet-control-attribution {
  max-width: calc(100% - 16px);
  padding: 1px 5px !important;
  border-radius: 5px 0 0 0;
  background: rgba(255,255,255,.72) !important;
  color: #5f5968;
  font-size: 8px !important;
  line-height: 1.35 !important;
  white-space: nowrap;
  opacity: .88;
}
.leaflet-control-attribution a { color: #5142a5; }


/* v0.4.4 — OrderWolf CRM branding */
body { background:
  radial-gradient(circle at 78% 5%, rgba(120,81,255,.045), transparent 28%),
  var(--bg);
}
::selection { background: rgba(120,81,255,.22); }

/* Authentication is the OrderWolf platform layer. */
.auth-screen { grid-template-columns: minmax(520px, 1.08fr) minmax(430px, .92fr); }
.auth-brand {
  position: relative;
  overflow: hidden;
  justify-content: space-between;
  padding: 54px clamp(48px, 7vw, 104px);
  background:
    radial-gradient(circle at 76% 30%, rgba(47,143,83,.19), transparent 29%),
    radial-gradient(circle at 18% 72%, rgba(120,81,255,.12), transparent 34%),
    linear-gradient(145deg, #101c28 0%, #203442 58%, #182b36 100%);
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -210px;
  bottom: -210px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255,255,255,.018), 0 0 0 160px rgba(255,255,255,.012);
}
.auth-platform-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.auth-orderwolf-logo { width: min(290px, 48vw); height: 104px; object-fit: contain; object-position: left center; }
.auth-platform-lockup span { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.22); color: #b8c7d1; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.auth-copy { position: relative; z-index: 1; max-width: 680px; margin: 38px 0; }
.auth-copy .auth-kicker { margin: 0; color: #67bf7b; font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.auth-brand h1 { max-width: 680px; margin: 20px 0 18px; font-size: clamp(45px, 5.3vw, 76px); line-height: 1.02; }
.auth-brand p { max-width: 620px; color: #d2dce3; font-size: 18px; }
.auth-points { max-width: 610px; margin-top: 34px; gap: 10px; }
.auth-points span { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.035); color: #e6edf1; }
.auth-points b { color: #67bf7b; font-size: 11px; letter-spacing: .08em; }
.auth-workspace-badge { position: relative; z-index: 1; width: fit-content; display: flex; align-items: center; gap: 14px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.055); }
.auth-workspace-badge span { color: #aebdc7; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-workspace-badge img { width: 76px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); opacity: .95; }
.auth-panel { background: linear-gradient(145deg, #f9f8fd, #f5f5fa); }
.auth-card { position: relative; border-top: 4px solid #2f8f53; padding-top: 31px; box-shadow: 0 24px 65px rgba(21,31,43,.11); }
.auth-card-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: #203442; font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.auth-card-brand img { width: 30px; height: 30px; object-fit: contain; display: block; }
.auth-card-platform-logo { justify-content: flex-start; align-items: center; min-height: 44px; }
.auth-card-platform-logo img { width: 178px; height: 42px; object-fit: contain; object-position: left center; display: block; }
.auth-card-platform-logo span { display: inline-flex; align-items: center; align-self: stretch; padding-left: 14px; border-left: 1px solid #dce5e1; color: #667987; font-size: 9px; letter-spacing: .16em; }
.auth-workspace-row { display: flex; align-items: center; gap: 12px; width: fit-content; min-height: 44px; margin-bottom: 18px; padding: 9px 13px 9px 4px; border-radius: 10px; background: var(--primary-soft); color: #5235c8; font-size: 11px; font-weight: 800; }
.auth-workspace-row img { width: 68px; height: 24px; margin-left: -4px; object-fit: contain; display: block; }
.auth-card h2 { color: #172735; }

.password-field-wrap { position: relative; display: flex; align-items: center; }
.password-field-wrap input { padding-right: 74px; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #6a55dd; font-size: 12px; font-weight: 800; padding: 4px 6px; border-radius: 8px; }
.password-toggle:hover { background: #f3efff; }
.password-toggle:focus-visible { outline: 2px solid rgba(120,81,255,.3); outline-offset: 1px; }

/* Logged-in OrderWolf CRM workspace. */
.app-shell { grid-template-columns: 254px 1fr; }
.sidebar {
  background:
    radial-gradient(circle at 20% 8%, rgba(120,81,255,.22), transparent 25%),
    linear-gradient(180deg, #182939 0%, #14232f 64%, #101e28 100%);
}
.sidebar-brand { min-height: 92px; padding: 15px 17px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
.sidebar-brand-mark { width: 58px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.sidebar-brand-mark img { width: 48px; height: 25px; object-fit: contain; }
.sidebar-brand-copy { min-width: 0; }
.brand-title { color: #fff; font-size: 15px; }
.brand-subtitle { color: #a9b9c4; font-size: 10px; }
.nav-item { border-radius: 9px; }
.nav-item.active { position: relative; background: linear-gradient(90deg, rgba(120,81,255,.32), rgba(120,81,255,.14)); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #66a77c; }
.nav-item.active .nav-icon { color: #9bc5aa; }
.user-block { grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; padding-top: 10px; }
.user-block > div:last-child { min-width: 0; display: grid; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #2f8f53, #9c82ff); color: #fff; font-size: 11px; font-weight: 900; }
.user-block strong { color: #dbe3e8; font-weight: 700; }
.user-block small { color: #81929e; }
.powered-by { margin: 9px 8px 0; padding: 11px 10px 2px; border-top: 1px solid rgba(255,255,255,.075); display: flex; align-items: center; gap: 8px; color: #6f818e; font-size: 8px; text-transform: uppercase; letter-spacing: .11em; }
.powered-by img { width: 94px; height: 34px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); opacity: .58; }
.topbar { min-height: 88px; border-bottom-color: #e8e3f3; box-shadow: 0 1px 0 rgba(120,81,255,.035); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--primary), rgba(120,81,255,0) 42%); opacity: .45; }
.topbar-context { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-workspace-mark { width: 49px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: 0 5px 15px rgba(34,25,70,.055); }
.topbar-workspace-mark img { width: 41px; height: 22px; object-fit: contain; }
.topbar h1 { color: #19182b; }
.page-content { position: relative; }
.page-content > .panel,
.page-content > .team-panel,
.page-content > .week-calendar,
.page-content > .card-grid .info-card,
.page-content > .settings-layout .panel { border-color: #e4dff0; }
.panel-header, .team-panel-header { background: linear-gradient(180deg, #fff, #fdfcff); }
.panel-header h2::before, .team-panel-header h2::before { content: ""; display: inline-block; width: 4px; height: 15px; margin-right: 9px; border-radius: 4px; background: var(--primary); vertical-align: -2px; }
.btn.primary { background: linear-gradient(135deg, #2f8f53, #2f8f53); box-shadow: 0 7px 16px rgba(120,81,255,.18); }
.btn.primary:hover { background: linear-gradient(135deg, #2f8f53, #203442); }
.btn.secondary:hover { border-color: #bfb4df; background: #fbf9ff; }
.pill.active { background: linear-gradient(135deg, #2f8f53, #2f8f53); }
/* KPI accents are defined once above so every dashboard card uses the same 4px top-border treatment. */
.deal-column.stage-prospecting > header, .deal-column.stage-initial-contact > header, .deal-column.stage-needs-analysis > header, .deal-column.stage-proposal-sent > header, .deal-column.stage-negotiation > header { border-top-color: #2f8f53; }
.calendar-day.today { background: #faf8ff; box-shadow: inset 0 3px 0 #2f8f53; }
.quote-wizard-topbar { background: linear-gradient(90deg, #172735, #203442 55%, #392d70); }
.quote-wizard-topbar::before { content: ""; width: 55px; height: 30px; margin-right: 4px; background: url('/assets/orderwolf-logo.png') center / contain no-repeat; filter: brightness(0) invert(1); }
.modal { border-top: 4px solid var(--primary); }
.modal-head h2 { display: flex; align-items: center; gap: 9px; }
.modal-brand-icon { width: 27px; height: 22px; object-fit: contain; }

/* Brand-assets page and public customer view. */
.brand-showcase { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); gap: 18px; }
.brand-showcase-card { min-height: 245px; padding: 24px; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.brand-showcase-card.orderwolf { background: radial-gradient(circle at 85% 10%, rgba(120,81,255,.28), transparent 30%), linear-gradient(145deg,#17162b,#2c2455); color: #fff; }
.brand-showcase-card.orderwolf { background: radial-gradient(circle at 80% 5%, rgba(47,143,83,.14), transparent 28%), linear-gradient(145deg,#edf4f1,#fff); }
.brand-showcase-logo { width: min(250px,70%); height: 90px; object-fit: contain; object-position: left center; }
.brand-showcase-card h3 { margin: 18px 0 7px; }
.brand-showcase-card.orderwolf p { color: #cfc9e8; }
.brand-colour-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 20px; }
.brand-colour { min-height: 74px; border-radius: 11px; padding: 9px; display: flex; align-items: flex-end; color: #fff; font-size: 9px; font-weight: 800; }
.public-quote { background: radial-gradient(circle at 80% 0%, rgba(120,81,255,.09), transparent 30%), #f4f3f8; }
.public-document { border: 1px solid #e2ddec; }
.public-head { position: relative; overflow: hidden; min-height: 155px; background: linear-gradient(135deg,#172735,#203442) !important; }
.public-head::after { content: ""; position: absolute; width: 240px; height: 240px; right: -100px; top: -125px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025); }
.public-orderwolf-logo { width: 132px; height: 49px; object-fit: contain; padding: 8px 12px; border-radius: 10px; background: #fff; }
.public-powered-by { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border-top: 1px solid var(--border); color: #878298; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.public-powered-by img { width: 108px; height: 38px; object-fit: contain; opacity: .78; }

@media (max-width: 920px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 270px; }
  .brand-showcase { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .auth-panel { padding: 18px; }
  .auth-card { padding: 27px 22px; }
  .topbar-workspace-mark { display: none; }
  .topbar-context { gap: 0; }
  .public-head { padding: 24px; }
}



/* v0.4.6 dashboard alignment and KPI consistency */
.topbar-context { flex: 1 1 auto; }
.page-actions.dashboard-actions-active {
  flex: 0 0 auto;
  min-width: max-content;
  align-self: center;
}
.dashboard-header-actions {
  display: grid;
  grid-template-columns: minmax(210px, 240px) auto auto;
  align-items: center;
  justify-content: end;
  gap: 10px;
  width: auto;
  flex-wrap: nowrap;
}
.dashboard-header-actions .compact-select,
.dashboard-header-actions .btn {
  height: 44px;
  min-height: 44px;
  margin: 0;
  border-radius: 11px;
}
.dashboard-header-actions .compact-select {
  min-width: 210px;
  max-width: 240px;
  padding-top: 0;
  padding-bottom: 0;
}
.dashboard-header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .page-actions.dashboard-actions-active { width: 100%; min-width: 0; }
  .dashboard-header-actions {
    grid-template-columns: minmax(190px, 1fr) auto auto;
    width: 100%;
  }
  .dashboard-header-actions .compact-select { max-width: none; }
}

@media (max-width: 620px) {
  .dashboard-header-actions { grid-template-columns: 1fr 1fr; }
  .dashboard-header-actions .compact-select { grid-column: 1 / -1; width: 100%; }
  .dashboard-header-actions .btn { width: 100%; }
}

/* v0.4.5 — full OrderWolf sign-in lockup and email-delivery status */
.settings-layout { display: grid; gap: 18px; }
.email-delivery-card { border-top: 3px solid #2f8f53; }
.email-delivery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.email-delivery-head h2 { margin: 2px 0 0; }
.email-delivery-card .metric-list { margin: 12px 0 16px; }
@media (max-width: 520px) {
  .auth-card-platform-logo img { width: 150px; }
  .auth-card-platform-logo span { display: none; }
}

/* v0.4.7 product and customer catalogue alignment */
.catalogue-header-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  align-items: center;
  justify-content: end;
  gap: 10px;
}
.catalogue-header-actions .btn {
  width: 132px;
  min-width: 132px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.catalogue-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(190px, 240px) auto;
  align-items: center;
  justify-content: start;
  gap: 12px;
  margin-bottom: 16px;
}
.catalogue-toolbar .catalogue-search {
  width: 100%;
  min-width: 0;
  max-width: 440px;
  flex: none;
}
.catalogue-toolbar .catalogue-search > .search {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.catalogue-toolbar .catalogue-filter {
  width: 100%;
  min-width: 0;
  max-width: 240px;
  height: 44px;
  margin: 0;
}
.catalogue-toolbar .catalogue-count {
  white-space: nowrap;
}

@media (max-width: 820px) {
  .catalogue-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  }
  .catalogue-toolbar .catalogue-search,
  .catalogue-toolbar .catalogue-filter { max-width: none; }
  .catalogue-toolbar .catalogue-count { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .catalogue-header-actions {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .catalogue-header-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .catalogue-toolbar { grid-template-columns: 1fr; }
  .catalogue-toolbar .catalogue-count { grid-column: auto; }
}

/* v0.4.8 calendar header alignment, symmetric authentication layout and session sign-in */
@media (min-width: 921px) {
  .auth-screen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 100svh;
  }
  .auth-brand,
  .auth-panel { min-width: 0; }
  .auth-panel {
    padding: clamp(34px, 5vw, 76px);
    place-items: center;
  }
  .auth-card {
    width: min(440px, 100%);
    margin-inline: auto;
  }
}

.page-actions.calendar-actions-active {
  flex: 0 0 auto;
  min-width: max-content;
  align-self: center;
}
.calendar-header-actions {
  display: grid;
  grid-template-columns: minmax(210px, 240px) 120px;
  align-items: center;
  justify-content: end;
  gap: 10px;
  width: auto;
  flex-wrap: nowrap;
}
.calendar-header-actions .compact-select,
.calendar-header-actions .btn {
  height: 44px;
  min-height: 44px;
  margin: 0;
  border-radius: 11px;
}
.calendar-header-actions .compact-select {
  width: 100%;
  min-width: 210px;
  max-width: 240px;
  padding-top: 0;
  padding-bottom: 0;
}
.calendar-header-actions .btn {
  width: 120px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .page-actions.calendar-actions-active {
    width: 100%;
    min-width: 0;
  }
  .calendar-header-actions {
    grid-template-columns: minmax(180px, 1fr) 120px;
    width: 100%;
  }
  .calendar-header-actions .compact-select { max-width: none; }
}

@media (max-width: 480px) {
  .calendar-header-actions {
    grid-template-columns: 1fr;
  }
  .calendar-header-actions .btn,
  .calendar-header-actions .compact-select {
    width: 100%;
    min-width: 0;
  }
}


/* v0.4.11 quote wizard header and multiple proposal map captures */
.quote-wizard-topbar > #quote-wizard-close { margin-left: auto; }
.quote-map-captures-card { margin-top: 14px; padding: 16px; border: 1px solid #ded9e5; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(31, 24, 47, .05); }
.quote-map-captures-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.quote-map-captures-head h4 { margin: 0 0 4px; font-size: 13px; }
.quote-map-captures-head p { margin: 0; color: #777080; font-size: 11px; line-height: 1.45; }
.quote-map-captures-head > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #edf4f1; color: #5b3fd0; font-size: 10px; font-weight: 800; }
.quote-map-capture-list { display: grid; gap: 10px; }
.quote-map-capture-item { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 9px; border: 1px solid #e5e1ea; border-radius: 9px; background: #fbfaff; }
.quote-map-capture-item img { width: 128px; height: 76px; object-fit: cover; border: 1px solid #d8d3df; border-radius: 7px; background: #eceaf0; }
.quote-map-capture-item div { min-width: 0; }
.quote-map-capture-item strong { display: block; color: #2f2938; font-size: 12px; }
.quote-map-capture-item small { display: block; margin-top: 4px; overflow: hidden; color: #7b7484; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quote-map-capture-item button { padding: 7px 10px; border: 1px solid #efcaca; border-radius: 7px; background: #fff6f6; color: #b93c3c; font-size: 10px; font-weight: 750; }
.quote-map-capture-item button:hover { background: #ffecec; }
.quote-map-captures-empty { padding: 18px; border: 1px dashed #d8d2e0; border-radius: 8px; background: #faf9fc; color: #777080; font-size: 11px; text-align: center; }
@media (max-width: 650px) {
  .quote-map-captures-head { flex-direction: column; gap: 8px; }
  .quote-map-capture-item { grid-template-columns: 92px minmax(0, 1fr); }
  .quote-map-capture-item img { width: 92px; height: 62px; }
  .quote-map-capture-item button { grid-column: 1 / -1; justify-self: end; }
}

/* OrderWolf Glazing - supplier import and proposal builder */
.import-hero { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(420px,.85fr); gap:34px; padding:34px; border:1px solid #dce8e1; border-radius:20px; background:linear-gradient(135deg,#172735 0%,#203b43 58%,#254e45 100%); color:#fff; box-shadow:var(--shadow); overflow:hidden; position:relative; }
.import-hero:after { content:""; position:absolute; width:420px; height:420px; border:1px solid rgba(255,255,255,.08); border-radius:50%; right:-170px; bottom:-260px; }
.import-hero-copy { position:relative; z-index:1; }
.import-hero .eyebrow { color:#71d59a; }
.import-hero h2 { margin:8px 0 14px; font-size:34px; line-height:1.08; letter-spacing:-.04em; max-width:720px; }
.import-hero p { color:#d7e0e2; max-width:700px; line-height:1.65; font-size:15px; }
.import-hero .btn { margin-top:12px; }
.import-flow-visual { align-self:center; display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:10px; align-items:center; position:relative; z-index:1; }
.import-flow-visual>div { min-height:150px; padding:20px 16px; border:1px solid rgba(255,255,255,.15); border-radius:15px; background:rgba(255,255,255,.07); backdrop-filter:blur(5px); display:flex; flex-direction:column; justify-content:flex-end; }
.import-flow-visual strong { color:#71d59a; font-size:12px; letter-spacing:.12em; }
.import-flow-visual span { font-size:14px; font-weight:800; margin-top:22px; }
.import-flow-visual small { color:#aec0c4; font-size:11px; margin-top:5px; }
.import-flow-visual i { font-style:normal; color:#71d59a; }
.import-kpis { margin-top:18px; }
.import-history-panel { margin-top:18px; }
.table-subtitle { display:block; color:var(--muted); margin-top:3px; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.confidence-pill { display:inline-flex; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:800; }
.confidence-pill.good { color:#147146; background:#e9f8f1; }
.confidence-pill.review { color:#9c6311; background:#fff5df; }
.demo-adapter-note { margin-top:18px; line-height:1.55; }

.import-wizard-progress { width:min(760px,calc(100% - 40px)); margin:8px auto 32px; display:grid; grid-template-columns:1fr auto 1fr auto 1fr; align-items:center; gap:13px; }
.import-wizard-progress>button { appearance:none; border:0; background:transparent; padding:0; display:flex; align-items:center; gap:10px; color:#8c9399; font:inherit; text-align:left; }
.import-wizard-progress>button:not(:disabled) { cursor:pointer; }
.import-wizard-progress>button:not(:disabled):hover strong { text-decoration:underline; text-underline-offset:3px; }
.import-wizard-progress>button span { width:32px; height:32px; flex:0 0 32px; display:grid; place-items:center; border-radius:50%; border:1px solid #d9dfe2; font-size:11px; font-weight:850; background:#fff; }
.import-wizard-progress>button strong { font-size:12px; white-space:nowrap; }
.import-wizard-progress>button.active { color:#172735; }
.import-wizard-progress>button.active span { border-color:#2f8f53; box-shadow:0 0 0 5px #edf7f1; color:#2f8f53; }
.import-wizard-progress>button.done { color:#2f8f53; }
.import-wizard-progress>button.done span { background:#2f8f53; border-color:#2f8f53; color:#fff; }
.import-wizard-progress>button:disabled { opacity:1; cursor:default; }
.import-wizard-progress>i { color:#c8d0d4; font-style:normal; }
.import-step-shell { max-width:1180px; margin:0 auto 100px; }
.import-step-copy { text-align:center; max-width:760px; margin:0 auto 25px; }
.import-step-copy h2,.import-review-head h2,.proposal-setup-main h2 { font-size:30px; line-height:1.12; margin:6px 0 10px; letter-spacing:-.035em; color:#172735; }
.import-step-copy p,.import-review-head p,.proposal-setup-main>p { color:#65717a; line-height:1.6; }
.import-source-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr); gap:22px; }
.import-upload-panel,.import-explainer { border:1px solid var(--border); border-radius:18px; background:#fff; padding:24px; box-shadow:var(--shadow); }
.supplier-dropzone { min-height:210px; margin-top:16px; border:2px dashed #bfd0c5; border-radius:17px; background:#f8fcf9; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; cursor:pointer; transition:.15s; text-align:center; }
.supplier-dropzone:hover { border-color:#2f8f53; background:#f2faf5; }
.supplier-dropzone input { display:none; }
.supplier-upload-icon { width:50px; height:50px; display:grid; place-items:center; border-radius:14px; background:#e4f4e9; color:#2f8f53; font-size:28px; }
.supplier-dropzone strong { font-size:16px; color:#172735; }
.supplier-dropzone small { color:#7c878d; }
.supplier-or { display:flex; align-items:center; gap:12px; color:#9aa2a7; font-size:11px; margin:15px 0; }
.supplier-or:before,.supplier-or:after { content:""; height:1px; flex:1; background:#edf0f1; }
.demo-file-button { width:100%; border:1px solid #dce5df; background:#fff; border-radius:13px; display:grid; grid-template-columns:78px 1fr auto; gap:14px; align-items:center; padding:14px; text-align:left; color:#172735; }
.demo-file-button:hover { border-color:#2f8f53; background:#fbfefc; }
.demo-file-button>span { height:42px; display:grid; place-items:center; border-radius:9px; background:#172735; color:#fff; font-size:11px; font-weight:900; letter-spacing:.04em; }
.demo-file-button strong,.demo-file-button small { display:block; }
.demo-file-button small { color:#7c878d; margin-top:4px; }
.demo-file-button>b { color:#2f8f53; font-size:20px; }
.import-explainer h3 { margin:0 0 18px; font-size:17px; }
.import-explainer>div { display:grid; grid-template-columns:34px 1fr; gap:11px; align-items:start; padding:12px 0; border-bottom:1px solid #eef1ef; }
.import-explainer>div>span { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#edf4f1; color:#2f8f53; font-size:10px; font-weight:900; }
.import-explainer p { margin:0; }
.import-explainer strong,.import-explainer small { display:block; }
.import-explainer small { color:#7c878d; margin-top:3px; }
.demo-mode-warning { margin-top:18px!important; padding:13px; border-radius:10px; background:#fff8e8; color:#71551b; font-size:12px; line-height:1.5; }
.wizard-actionbar { position:sticky; bottom:0; z-index:10; margin:28px -24px -24px; padding:15px 24px; border-top:1px solid var(--border); background:rgba(255,255,255,.96); backdrop-filter:blur(8px); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wizard-actionbar>div { display:flex; gap:9px; }

.import-review-head { max-width:1180px; margin:0 auto 18px; display:flex; justify-content:space-between; gap:25px; align-items:flex-end; }
.extraction-score { min-width:190px; padding:14px 17px; border:1px solid #d9e7dd; background:#f7fcf8; border-radius:13px; }
.extraction-score small,.extraction-score strong,.extraction-score span { display:block; }
.extraction-score small { color:#7a8780; font-size:10px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.extraction-score strong { font-size:25px; color:#2f8f53; margin:4px 0 2px; }
.extraction-score span { color:#64706a; font-size:11px; }
.import-project-review { max-width:1180px; margin:0 auto 14px; border:1px solid var(--border); border-radius:14px; background:#fff; padding:16px; display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.import-project-review label { display:grid; gap:5px; }
.import-project-review label.wide { grid-column:1 / -1; }
.import-project-review label>span { font-size:10px; font-weight:800; color:#778088; text-transform:uppercase; letter-spacing:.06em; }
.import-project-review input { padding:9px 10px; }
.import-review-summary { max-width:1180px; margin:0 auto 14px; display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.import-review-summary span { padding:13px; border:1px solid #e3e8e5; border-radius:11px; background:#fff; color:#7b858b; font-size:11px; }
.import-review-summary strong { display:block; color:#172735; font-size:16px; margin-bottom:2px; }
.import-review-toolbar { max-width:1180px; margin:0 auto 10px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.import-review-toolbar>div { display:grid; gap:2px; }
.import-review-toolbar strong { color:#172735; font-size:13px; }
.import-review-toolbar small { color:#778188; font-size:10px; }
.import-opening-review-list { max-width:1180px; margin:0 auto; display:grid; gap:10px; }
.import-opening-row { display:grid; grid-template-columns:90px minmax(0,1fr) 270px 105px; gap:14px; align-items:center; padding:14px; border:1px solid #e2e6e4; border-radius:13px; background:#fff; }
.opening-number { align-self:stretch; border-right:1px solid #edf0ee; padding-right:14px; display:flex; flex-direction:column; justify-content:center; gap:9px; }
.opening-number>span { color:#2f8f53; font-size:11px; font-weight:900; letter-spacing:.08em; }
.mini-window-diagram { height:54px; border:2px solid #7d8b92; display:grid; grid-template-columns:repeat(3,1fr); gap:2px; padding:2px; background:#eef6f8; }
.mini-window-diagram.door { height:65px; }
.mini-window-diagram i { border:1px solid #a8b3b7; background:linear-gradient(145deg,#f9fdff,#d9ebf1); }
.opening-fields { min-width:0; }
.opening-field-row { display:grid; grid-template-columns:1.15fr .78fr 1fr .48fr .48fr; gap:7px; }
.opening-field-row label { display:grid; gap:3px; }
.opening-field-row label>span,.opening-pricing label>span { font-size:9px; font-weight:800; text-transform:uppercase; color:#858e93; letter-spacing:.05em; }
.opening-field-row input { padding:7px 8px; font-size:11px; min-width:0; width:100%; box-sizing:border-box; }
.dimension-input { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; border:1px solid #dcdfe0; border-radius:8px; overflow:hidden; background:#fff; }
.dimension-input input { border:0; box-shadow:none!important; min-width:0; }
.dimension-input b { padding:0 7px 0 3px; color:#84908a; font-size:9px; font-weight:700; }
.opening-description-field { display:grid; gap:3px; margin:7px 0 6px; }
.opening-description-field>span { font-size:9px; font-weight:800; text-transform:uppercase; color:#858e93; letter-spacing:.05em; }
.opening-description-field input { padding:7px 8px; font-size:11px; }
.opening-tag-editor { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; }
.opening-spec-chips { display:flex; gap:5px; flex-wrap:wrap; align-items:center; }
.opening-spec-chip { display:inline-flex; align-items:center; gap:5px; max-width:220px; padding:3px 5px 3px 8px; border-radius:999px; background:#edf7f0; color:#557064; font-size:9px; white-space:nowrap; overflow:hidden; }
.opening-spec-chip button { border:0; background:transparent; color:#668176; font:700 12px/1 var(--font-ui); cursor:pointer; padding:0 2px; flex:0 0 auto; }
.opening-spec-chip button:hover { color:#a33d32; }
.opening-tags-empty { color:#8a9690; font-size:9px; font-style:italic; }
.opening-tag-add { display:flex; align-items:center; gap:4px; }
.opening-tag-add input { width:175px; height:26px; border:1px solid #dbe4df; border-radius:7px; padding:0 8px; font-size:10px; }
.opening-tag-add button { height:26px; border:1px solid #cfe1d5; border-radius:7px; background:#fff; color:#2f8f53; padding:0 8px; font-size:9px; font-weight:800; cursor:pointer; }
.opening-tag-add button:hover { background:#edf7f0; }
.proposal-highlight-tags { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.proposal-highlight-tags span { padding:4px 8px; border-radius:999px; background:#edf7f0; color:#2f6e49; font-size:9px; font-weight:700; }
.opening-pricing { display:grid; grid-template-columns:minmax(125px,1fr) minmax(125px,1fr); gap:8px; min-width:0; }
.opening-pricing label { display:grid; gap:3px; }
.money-input { display:grid; grid-template-columns:auto 1fr; align-items:center; border:1px solid #dcdfe0; border-radius:8px; overflow:hidden; background:#fff; }
.money-input b { padding-left:8px; color:#758078; font-size:11px; }
.money-input input { border:0; box-shadow:none!important; padding:7px 7px; min-width:0; width:100%; box-sizing:border-box; font-variant-numeric:tabular-nums; }
.opening-margin { grid-column:1 / -1; color:#2f8f53; font-weight:750; font-size:10px; }
.opening-flags { display:grid; gap:8px; justify-items:start; font-size:10px; color:#667077; }
.opening-flags label { display:flex; align-items:center; gap:5px; }
.opening-flags input { width:auto; }
.opening-remove-button { border:0; padding:0; background:transparent; color:#a44c4c; font:inherit; font-weight:750; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.opening-remove-button:hover { color:#7b2424; }

.proposal-setup-grid { max-width:1180px; margin:0 auto 90px; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(330px,.75fr); gap:28px; }
.proposal-setup-main { padding:8px 0; }
.proposal-section-picker { margin-top:22px; }
.proposal-section-picker h3 { margin:0 0 10px; font-size:14px; }
.proposal-section-picker { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.proposal-section-picker h3 { grid-column:1/-1; }
.proposal-section-picker label { border:1px solid #e1e6e3; border-radius:10px; padding:11px; background:#fff; display:flex; align-items:center; gap:8px; font-size:12px; font-weight:700; }
.proposal-section-picker input { display:none; }
.proposal-section-picker label>span { width:22px; height:22px; display:grid; place-items:center; background:#e8f6ed; border-radius:6px; color:#2f8f53; }
.proposal-setup-summary { border-left:1px solid #e6eae7; padding-left:28px; }
.proposal-doc-stack { height:300px; position:relative; margin:0 25px 20px; }
.proposal-doc { position:absolute; width:205px; height:280px; border:1px solid #d8dedb; border-radius:6px; background:#fff; box-shadow:0 10px 24px rgba(22,40,49,.08); }
.proposal-doc.back { transform:rotate(-6deg); left:12px; top:10px; }
.proposal-doc.middle { transform:rotate(4deg); right:8px; top:8px; }
.proposal-doc.front { left:50%; transform:translateX(-50%); top:0; padding:22px; display:flex; flex-direction:column; }
.proposal-doc.front img { width:90px; height:auto; object-fit:contain; }
.proposal-doc.front>span { margin-top:55px; font-size:8px; letter-spacing:.16em; color:#2f8f53; font-weight:900; }
.proposal-doc.front>strong { margin-top:10px; font-size:18px; line-height:1.1; color:#172735; }
.proposal-doc.front>small { margin-top:auto; color:#87918d; }
.proposal-money-card { display:grid; gap:1px; border:1px solid #dfe5e1; border-radius:12px; overflow:hidden; }
.proposal-money-card span { padding:12px 14px; background:#fff; color:#737e78; font-size:10px; }
.proposal-money-card strong { display:block; color:#172735; font-size:15px; margin-top:2px; }
.proposal-money-card .positive { background:#f1faf4; }
.proposal-money-card .positive strong { color:#207245; }
.proposal-setup-summary>p { color:#6a7670; line-height:1.55; font-size:12px; }

.proposal-builder-topbar { height:56px; margin:-24px -24px 0; padding:0 18px; border-bottom:1px solid #e0e5e2; display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff; }
.proposal-builder-topbar>div:first-child { display:flex; align-items:center; gap:10px; color:#69746e; font-size:12px; }
.builder-top-actions { display:flex; align-items:center; gap:7px; }
.proposal-builder-layout { height:calc(100vh - 150px); margin:0 -24px -24px; display:grid; grid-template-columns:245px minmax(460px,1fr) 320px; background:#e9edeb; overflow:hidden; }
.builder-pages { background:#fff; border-right:1px solid #dfe4e1; overflow-y:auto; padding:15px 10px 30px; }
.builder-side-title { padding:5px 8px 12px; display:flex; justify-content:space-between; align-items:center; color:#748079; }
.builder-side-title span { font-size:10px; font-weight:900; letter-spacing:.12em; }
.builder-side-title small { font-size:9px; }
.builder-page-item { width:100%; border:1px solid transparent; background:transparent; padding:9px 8px; border-radius:9px; display:grid; grid-template-columns:27px 1fr auto; gap:8px; align-items:center; text-align:left; color:#394740; }
.builder-page-item:hover { background:#f6f9f7; }
.builder-page-item.active { background:#edf7f1; border-color:#cfe6d7; }
.builder-page-item>span { color:#8e9993; font-size:9px; font-weight:850; }
.builder-page-item strong,.builder-page-item small { display:block; }
.builder-page-item strong { font-size:11px; }
.builder-page-item small { color:#8b9690; font-size:9px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:155px; }
.builder-page-item>b { color:#ba5a5a; font-size:8px; }
.builder-page-item.disabled-page { opacity:.48; }
.builder-page-group-label { padding:15px 8px 5px; font-size:8px; color:#99a29e; letter-spacing:.12em; font-weight:900; }
.builder-static-pages { margin:12px 8px; padding-top:10px; border-top:1px solid #edf0ee; display:grid; gap:8px; color:#9aa39f; font-size:9px; }
.builder-canvas { min-width:0; overflow:auto; }
.builder-canvas-toolbar { height:42px; padding:0 18px; border-bottom:1px solid #d8dedb; background:#f6f8f7; display:flex; align-items:center; justify-content:space-between; color:#6e7973; font-size:10px; }
.builder-canvas-toolbar>div { display:flex; align-items:center; gap:6px; }
.builder-canvas-toolbar button { width:25px; height:25px; border:1px solid #d8dedb; background:#fff; border-radius:6px; }
.proposal-paper-wrap { min-height:100%; padding:28px; display:flex; justify-content:center; align-items:flex-start; }
.proposal-paper-wrap.zoomed .proposal-paper { transform:scale(1.12); transform-origin:top center; margin-bottom:90px; }
.proposal-paper { width:595px; min-height:842px; padding:48px 50px 42px; background:#fff; box-shadow:0 10px 35px rgba(22,38,45,.16); position:relative; color:#172735; transition:transform .15s; }
.proposal-paper:not(.cover-page) { height:842px; max-height:842px; overflow:hidden; display:flex; flex-direction:column; }
.paper-header { height:42px; min-height:42px; flex:0 0 42px; margin:-15px 0 38px; border-bottom:1px solid #dfe5e1; display:flex; align-items:center; justify-content:space-between; }
.proposal-page-body-shell { flex:1 1 auto; min-height:0; width:100%; overflow:hidden; position:relative; }
.proposal-page-body { width:100%; transform-origin:top left; will-change:transform; }
.proposal-paper.proposal-body-condensed .proposal-page-body { --proposal-condensed:1; }
.paper-header img { width:98px; max-height:32px; object-fit:contain; object-position:left center; }
.paper-header span { color:#8c9791; font-size:8px; letter-spacing:.08em; }
.paper-kicker { color:#2f8f53; font-size:9px; letter-spacing:.15em; font-weight:900; }
.proposal-paper h1 { margin:8px 0 12px; font-size:30px; line-height:1.08; letter-spacing:-.04em; }
.paper-lead { font-size:14px; line-height:1.65; color:#5f6d65; max-width:440px; }
.proposal-summary-grid { margin:32px 0; display:grid; grid-template-columns:1fr 1fr; border:1px solid #dfe5e1; border-radius:11px; overflow:hidden; }
.proposal-summary-grid>div { padding:16px; border-right:1px solid #e5e9e7; border-bottom:1px solid #e5e9e7; }
.proposal-summary-grid>div:nth-child(even) { border-right:0; }
.proposal-summary-grid>div:nth-last-child(-n+2) { border-bottom:0; }
.proposal-summary-grid span,.proposal-summary-grid strong { display:block; }
.proposal-summary-grid span { color:#87928c; font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.proposal-summary-grid strong { margin-top:5px; font-size:15px; }
.cover-page { padding:0; overflow:hidden; }
.proposal-cover-brand { height:105px; padding:30px 48px; background:#172735; display:flex; align-items:center; justify-content:space-between; }
.proposal-cover-brand img { width:135px; max-height:45px; object-fit:contain; object-position:left center; filter:none; }
.proposal-cover-brand span { color:#9bd3af; font-size:9px; letter-spacing:.16em; font-weight:850; }
.proposal-cover-main { height:530px; padding:92px 60px; background:linear-gradient(145deg,#2f8f53,#1f6d42); color:#fff; }
.proposal-cover-main small { font-size:9px; letter-spacing:.16em; opacity:.78; }
.proposal-cover-main h1 { font-size:42px; max-width:430px; margin:14px 0 10px; color:#fff; }
.proposal-cover-main p { color:#dceee3; font-size:14px; }
.proposal-cover-rule { width:55px; height:3px; background:#fff; margin:45px 0 18px; opacity:.75; }
.proposal-cover-main>strong { display:block; max-width:420px; font-size:18px; line-height:1.35; }
.proposal-cover-meta { height:207px; padding:40px 52px; display:grid; grid-template-columns:repeat(3,1fr); gap:20px; background:#fff; }
.proposal-cover-meta span { color:#87928d; font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.proposal-cover-meta strong { display:block; color:#172735; font-size:11px; text-transform:none; letter-spacing:0; margin-top:7px; line-height:1.4; }
.aperture-page-title { display:grid; grid-template-columns:1fr auto; gap:25px; align-items:start; }
.aperture-page-title p { color:#65716b; line-height:1.55; font-size:12px; max-width:365px; }
.aperture-price { min-width:115px; padding:12px; border:1px solid #dfe8e3; border-top:3px solid #2f8f53; text-align:right; }
.aperture-price small,.aperture-price strong,.aperture-price span { display:block; }
.aperture-price small { font-size:7px; color:#87928d; letter-spacing:.09em; }
.aperture-price strong { margin:5px 0 2px; font-size:20px; }
.aperture-price span { color:#8e9993; font-size:8px; }
.proposal-window-drawing { height:285px; margin:24px 0 22px; padding:30px 40px 20px; border:1px solid #e2e8e4; background:#f9fbfa; position:relative; }
.proposal-window-drawing .frame { width:65%; height:185px; margin:12px auto 0; border:6px solid #5b6661; display:grid; gap:5px; padding:4px; background:#fff; }
.proposal-window-drawing.two-light .frame { grid-template-columns:1fr 1fr; }
.proposal-window-drawing.three-light .frame { grid-template-columns:1fr 1.3fr 1fr; }
.proposal-window-drawing .frame i { display:block; border:2px solid #78857f; background:linear-gradient(150deg,#edf7fa,#cfe5ea); position:relative; }
.proposal-window-drawing .frame i:first-child:after { content:"↗"; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); color:#80918a; font-size:24px; }
.proposal-window-drawing.is-door .frame { height:205px; width:70%; }
.drawing-dimension { text-align:center; color:#758179; font-size:9px; }
.drawing-note { position:absolute; bottom:10px; left:0; right:0; text-align:center; color:#9aa39f; font-size:8px; }
.aperture-spec-grid { display:grid; grid-template-columns:1fr 1fr; border:1px solid #e0e6e2; border-radius:9px; overflow:hidden; }
.aperture-spec-grid>div { min-height:58px; padding:11px 13px; border-right:1px solid #e7ebe9; border-bottom:1px solid #e7ebe9; }
.aperture-spec-grid>div:nth-child(even) { border-right:0; }
.aperture-spec-grid>div:nth-last-child(-n+2) { border-bottom:0; }
.aperture-spec-grid span,.aperture-spec-grid strong { display:block; }
.aperture-spec-grid span { color:#8b9690; font-size:7px; text-transform:uppercase; letter-spacing:.07em; }
.aperture-spec-grid strong { font-size:9px; line-height:1.45; margin-top:4px; }
.technical-note { margin-top:17px; padding:12px; border-left:3px solid #9db9a8; background:#f4f8f5; }
.technical-note strong { font-size:9px; }
.technical-note p { margin:5px 0 0; color:#68736d; font-size:9px; line-height:1.5; }
.photo-placeholder { height:270px; margin:24px 0; display:grid; place-items:center; border:1px dashed #cbd3cf; background:#f8faf9; color:#a1aaa5; font-size:9px; }
.investment-lines { margin-top:30px; border-top:1px solid #dfe5e1; }
.investment-lines>div { min-height:42px; padding:10px 4px; border-bottom:1px solid #e5eae7; display:flex; align-items:center; justify-content:space-between; gap:18px; font-size:10px; }
.investment-lines strong { white-space:nowrap; }
.investment-total { margin-top:22px; padding:20px; background:#172735; color:#fff; display:flex; justify-content:space-between; align-items:center; }
.investment-total span { font-size:11px; }
.investment-total strong { font-size:24px; }
.paper-footnote { color:#8c9691; font-size:8px; line-height:1.6; margin-top:16px; }
.builder-controls { background:#fff; border-left:1px solid #dfe4e1; overflow-y:auto; padding:18px; }
.builder-controls-head { padding-bottom:13px; border-bottom:1px solid #edf0ee; margin-bottom:14px; }
.builder-controls-head span { color:#2f8f53; font-size:8px; text-transform:uppercase; letter-spacing:.12em; font-weight:900; }
.builder-controls-head h3 { margin:5px 0 0; font-size:17px; }
.builder-control { display:grid; gap:6px; margin-top:13px; }
.builder-control>span,.builder-price-pair label>span { color:#6f7a74; font-size:10px; font-weight:750; }
.builder-control textarea { min-height:100px; font-size:11px; line-height:1.45; }
.builder-control input,.builder-control select { font-size:11px; }
.builder-price-pair { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.builder-price-pair label { display:grid; gap:5px; }
.builder-price-pair small { color:#a27737; font-size:8px; }
.builder-toggle-list { display:grid; margin-top:16px; border:1px solid #e3e8e5; border-radius:10px; overflow:hidden; }
.builder-toggle-list label { min-height:48px; padding:8px 10px; border-bottom:1px solid #edf0ee; display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:center; }
.builder-toggle-list label:last-child { border-bottom:0; }
.builder-toggle-list input { width:auto; }
.builder-toggle-list strong,.builder-toggle-list small { display:block; }
.builder-toggle-list strong { font-size:10px; }
.builder-toggle-list small { color:#8b9590; font-size:8px; margin-top:2px; }
.builder-internal-card { margin-top:16px; padding:13px; border-radius:10px; background:#fff8e9; border:1px solid #f2dfb8; }
.builder-internal-card>small { color:#9c6d24; font-size:8px; font-weight:900; letter-spacing:.08em; }
.builder-internal-card>span { padding:7px 0; border-bottom:1px solid #f0e3c9; display:flex; justify-content:space-between; gap:10px; color:#7a6849; font-size:9px; }
.builder-internal-card>span:last-child { border-bottom:0; }
.builder-internal-card strong { color:#55462e; }
.builder-internal-card.compact { padding:10px; }
.builder-tip { margin-top:18px; padding:13px; border-radius:10px; background:#f0f6f2; color:#5f7167; }
.builder-tip strong { font-size:10px; color:#2f6847; }
.builder-tip p { margin:5px 0 0; font-size:9px; line-height:1.5; }

@media (max-width: 1180px) {
  .import-hero { grid-template-columns:1fr; }
  .import-flow-visual { max-width:650px; }
  .proposal-builder-layout { grid-template-columns:210px minmax(430px,1fr) 285px; }
  .proposal-paper { transform:scale(.88); transform-origin:top center; margin-bottom:-90px; }
}
@media (max-width: 900px) {
  .import-source-grid,.proposal-setup-grid { grid-template-columns:1fr; }
  .proposal-setup-summary { border-left:0; border-top:1px solid #e6eae7; padding:25px 0 0; }
  .import-review-summary { grid-template-columns:1fr 1fr; }
  .import-review-toolbar { align-items:flex-start; flex-direction:column; }
  .import-opening-row { grid-template-columns:70px 1fr; }
  .opening-pricing,.opening-flags { grid-column:2; }
  .proposal-builder-layout { grid-template-columns:190px minmax(420px,1fr); }
  .builder-controls { position:absolute; right:0; width:300px; height:calc(100vh - 150px); box-shadow:-5px 0 20px rgba(0,0,0,.12); }
}

/* Customer-facing glazing-company wordmarks: OrderWolf remains the platform brand. */
.customer-brand-wordmark,
.customer-paper-brand {
  font-weight: 900;
  letter-spacing: .02em;
  color: #172735;
}
.customer-brand-wordmark { font-size: 18px; text-transform: uppercase; }
.customer-paper-brand { font-size: 12px; }
.public-company-wordmark {
  max-width: 330px;
  color: #fff;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.02em;
}

/* v0.7.1 - real supplier PDF extraction */
.supplier-dropzone.drag-active { border-color:#2f8f53; background:#eaf7ef; box-shadow:0 0 0 5px rgba(47,143,83,.10); transform:translateY(-1px); }
.supplier-dropzone.has-file { border-style:solid; border-color:#8ac9a2; background:#f4fbf6; }
.supplier-dropzone.has-file .supplier-upload-icon { background:#2f8f53; color:#fff; }
.real-extraction-badge { margin-top:5px; display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; background:#e7f7ed; color:#1e7845; font-size:10px; line-height:1; font-style:normal; font-weight:850; letter-spacing:.03em; text-transform:uppercase; }
.real-extraction-badge:before { content:"✓"; }
.real-mode-note { margin-top:18px!important; padding:13px; border-radius:10px; background:#eef8f1; color:#2c6040; font-size:12px; line-height:1.5; }
.demo-file-button.selected { border-color:#2f8f53; box-shadow:0 0 0 3px rgba(47,143,83,.08); background:#f7fcf8; }
.extraction-source-note { max-width:1180px; margin:0 auto 16px; padding:12px 15px; border-radius:12px; display:flex; gap:12px; align-items:flex-start; font-size:12px; line-height:1.5; }
.extraction-source-note strong { flex:0 0 auto; white-space:nowrap; }
.extraction-source-note span { color:#55636b; }
.extraction-source-note.real { border:1px solid #cce5d5; background:#f1faf4; color:#1f7545; }
.extraction-source-note.demo { border:1px solid #f0dfb2; background:#fff9ea; color:#85631b; }

/* v0.7.2 document generation + transfer progress */
.proposal-download-panel { min-width: 310px; display: grid; gap: 11px; justify-items: stretch; }
.proposal-generation-progress { width: 100%; padding: 10px 12px; border: 1px solid #d9e5dd; border-radius: 10px; background: #f8fbf9; box-sizing: border-box; }
.proposal-generation-progress[hidden] { display: none !important; }
.proposal-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #173329; font-size: 12px; font-weight: 800; }
.proposal-progress-head strong { min-width: 52px; text-align: right; color: #2f8f53; font-variant-numeric: tabular-nums; }
.proposal-progress-track { height: 7px; margin: 7px 0 6px; overflow: hidden; border-radius: 999px; background: #e5ece8; }
.proposal-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2f8f53,#46ad6d); transition: width .24s ease; }
.proposal-generation-progress small { display: block; color: #75817b; font-size: 10.5px; line-height: 1.35; }
.proposal-generation-progress.indeterminate .proposal-progress-track span { width: 38% !important; animation: proposal-progress-indeterminate 1.15s ease-in-out infinite; }
.proposal-generation-progress.complete { border-color: #b9ddc7; background: #f1faf4; }
.proposal-generation-progress.error { border-color: #efc5c5; background: #fff7f7; }
.proposal-generation-progress.error .proposal-progress-head,
.proposal-generation-progress.error .proposal-progress-head strong { color: #a53a3a; }
.proposal-generation-progress.error .proposal-progress-track span { background: #c34c4c; }
@keyframes proposal-progress-indeterminate { 0% { transform: translateX(-120%); } 50% { transform: translateX(85%); } 100% { transform: translateX(280%); } }
@media (max-width: 760px) { .proposal-download-panel { min-width: 0; width: 100%; } }

/* Proposal Builder v0.7.4: persistent page navigation + functional customer sections. */
.builder-pages { display:flex; flex-direction:column; overflow:hidden; padding:0; }
.builder-side-title { flex:0 0 auto; padding:15px 18px 11px; border-bottom:1px solid #edf0ee; background:#fff; }
.builder-page-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:8px 10px 14px; scrollbar-width:thin; scrollbar-color:#b9c3bd transparent; }
.builder-page-scroll::-webkit-scrollbar { width:9px; }
.builder-page-scroll::-webkit-scrollbar-thumb { background:#c2cbc6; border:2px solid #fff; border-radius:10px; }
.builder-page-scroll::-webkit-scrollbar-track { background:#fff; }
.builder-page-item { cursor:pointer; }
.builder-page-group-label { display:flex; justify-content:space-between; align-items:center; }
.builder-page-group-label b { color:#2f8f53; font-size:8px; letter-spacing:.05em; }
.builder-page-nav { flex:0 0 auto; height:48px; padding:7px 9px; border-top:1px solid #dfe4e1; background:#fff; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:7px; }
.builder-page-nav button { height:32px; border:1px solid #d9e0dc; background:#fff; color:#34433b; border-radius:7px; font-size:9px; font-weight:800; cursor:pointer; }
.builder-page-nav button:last-child { justify-self:stretch; }
.builder-page-nav button:disabled,.builder-preview-nav button:disabled { opacity:.35; cursor:default; }
.builder-page-nav span { color:#7d8982; font-size:9px; font-weight:800; white-space:nowrap; }
.builder-preview-nav { display:grid !important; grid-template-columns:25px 210px 25px 1px 25px 48px 25px; align-items:center; gap:5px !important; width:374px; }
.builder-preview-nav button { justify-self:center; }
.builder-preview-nav strong { width:210px; min-width:210px; max-width:210px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; color:#59665f; font-size:9px; }
.builder-preview-nav i { width:1px; height:18px; margin:0; background:#d6ddda; }
.builder-preview-nav span { width:48px; text-align:center; white-space:nowrap; }
@media (max-width: 1050px) {
  .builder-preview-nav { grid-template-columns:25px 150px 25px 1px 25px 42px 25px; width:308px; }
  .builder-preview-nav strong { width:150px; min-width:150px; max-width:150px; }
  .builder-preview-nav span { width:42px; }
}
.builder-section-switch { margin:0 0 14px; min-height:52px; padding:10px 11px; border:1px solid #dce6e0; border-radius:10px; background:#f4faf6; display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; cursor:pointer; }
.builder-section-switch input { width:auto; }
.builder-section-switch strong,.builder-section-switch small { display:block; }
.builder-section-switch strong { color:#235e3e; font-size:10px; }
.builder-section-switch small { color:#78867e; font-size:8px; margin-top:3px; }
.investment-totals { margin-top:22px; border:1px solid #dfe5e1; border-radius:9px; overflow:hidden; }
.investment-totals>div { padding:11px 14px; display:flex; justify-content:space-between; gap:18px; border-bottom:1px solid #e6ebe8; font-size:10px; }
.investment-totals>div:last-child { border-bottom:0; }
.investment-totals .grand { padding:15px 14px; background:#172735; color:#fff; }
.investment-totals .grand strong { font-size:18px; }
.proposal-copy-block { margin-top:22px; color:#4d5d54; font-size:13px; line-height:1.7; }
.proposal-copy-block p { margin:0 0 14px; }
.about-value-grid { margin-top:30px; display:grid; gap:10px; }
.about-value-grid>div { padding:15px 17px; border:1px solid #dfe7e2; border-radius:10px; background:#f8faf9; }
.about-value-grid strong,.about-value-grid span { display:block; }
.about-value-grid strong { font-size:12px; color:#1f5f3f; }
.about-value-grid span { margin-top:4px; color:#6b7971; font-size:10px; line-height:1.5; }
.credential-preview-list { margin-top:28px; display:grid; gap:11px; }
.credential-preview-list>div { padding:14px 16px; border:1px solid #dce6e0; border-radius:10px; display:grid; grid-template-columns:26px 1fr; gap:10px; align-items:start; background:#f6faf7; }
.credential-preview-list>div>span { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:#2f8f53; color:#fff; font-weight:900; }
.credential-preview-list p { margin:2px 0 0; color:#4d5c54; font-size:11px; line-height:1.5; }
.terms-preview-list { margin-top:25px; display:grid; gap:10px; }
.terms-preview-list>div { display:grid; grid-template-columns:34px 1fr; gap:10px; padding-bottom:10px; border-bottom:1px solid #e2e7e4; }
.terms-preview-list strong { color:#2f8f53; font-size:9px; padding-top:3px; }
.terms-preview-list p { margin:0; color:#526159; font-size:10px; line-height:1.55; }
.acceptance-value-card { margin:28px 0; padding:20px; border-radius:10px; background:#172735; color:#fff; display:flex; justify-content:space-between; align-items:center; }
.acceptance-value-card span { font-size:10px; }
.acceptance-value-card strong { font-size:22px; }
.acceptance-sign-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:30px; }
.acceptance-sign-grid>div { height:92px; padding:12px; border:1px solid #cfd8d3; border-radius:8px; display:flex; align-items:flex-end; }
.acceptance-sign-grid span { width:100%; padding-top:8px; border-top:1px solid #84918a; color:#7b8780; font-size:8px; text-transform:uppercase; letter-spacing:.08em; }

@media (max-width: 1120px) {
  .import-opening-row { grid-template-columns:78px minmax(0,1fr) 250px 92px; gap:10px; }
  .opening-field-row { grid-template-columns:1fr 1fr 1fr .62fr .62fr; }
}

/* v0.7.10: persistent proposal image uploads */
.quote-dropzone.template-dropzone.drag-active {
  border-color: #2f8f53;
  background: #edf7f1;
  box-shadow: 0 0 0 3px rgba(47, 143, 83, 0.10);
}
.quote-uploaded-site-images { margin-top: 12px; }
.quote-uploaded-asset-list { margin-top: 12px; }
.quote-uploaded-site-images .quote-map-captures-head > span { white-space: nowrap; }

/* v0.7.11 WindowCAD visual designer */
.windowcad-designer-backdrop{position:fixed;inset:0;z-index:50000;background:rgba(18,31,42,.72);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(5px)}
.windowcad-designer-shell{width:min(1280px,96vw);height:min(860px,94vh);background:#f6f8f7;border-radius:20px;overflow:hidden;box-shadow:0 30px 90px rgba(12,26,35,.34);display:grid;grid-template-rows:auto auto 1fr auto;border:1px solid rgba(255,255,255,.45)}
.windowcad-designer-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:#fff;border-bottom:1px solid #e4e9e6}
.windowcad-designer-head>div{display:flex;gap:12px;align-items:center}.windowcad-designer-head h2{margin:0;color:#172735;font-size:22px}.windowcad-designer-head p{margin:2px 0 0;color:#6e7b76;font-size:12px}.windowcad-designer-head>button{border:0;background:#eef2f0;border-radius:10px;width:36px;height:36px;font-size:24px;cursor:pointer;color:#34443d}
.windowcad-brand-chip{display:inline-flex;align-items:center;justify-content:center;background:#172735;color:#6fdf95;border:1px solid #26443a;border-radius:7px;font-weight:900;font-size:9px;letter-spacing:.12em;padding:6px 8px;white-space:nowrap}
.windowcad-tabs{display:flex;gap:2px;overflow-x:auto;background:#fff;border-bottom:1px solid #e2e7e4;padding:0 16px}.windowcad-tabs button{border:0;background:transparent;padding:12px 15px;font-weight:800;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:#73817b;border-bottom:3px solid transparent;cursor:pointer;white-space:nowrap}.windowcad-tabs button.active{color:#2f8f53;border-bottom-color:#2f8f53}
.windowcad-designer-body{min-height:0;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(350px,.7fr)}
.windowcad-preview-stage{min-width:0;overflow:auto;padding:24px;background-image:linear-gradient(rgba(229,235,232,.9) 1px,transparent 1px),linear-gradient(90deg,rgba(229,235,232,.9) 1px,transparent 1px);background-size:24px 24px;background-color:#f5f8f6;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:12px}
.windowcad-stage-meta{width:min(680px,100%);display:flex;justify-content:space-between;align-items:center;color:#62716b;font-size:12px}.windowcad-stage-meta strong{color:#172735}.windowcad-source-warning{width:min(680px,100%);display:flex;gap:10px;align-items:flex-start;border:1px solid #d9e7df;background:#eff8f2;border-radius:12px;padding:11px 12px;color:#53645c;font-size:11px}.windowcad-source-warning strong{color:#2f8f53;white-space:nowrap}.windowcad-source-warning span{line-height:1.45}
.windowcad-visual{width:min(700px,100%);background:linear-gradient(180deg,#ffffff 0%,#fbfcfb 100%);border:1px solid #dfe6e2;border-radius:18px;box-shadow:0 18px 38px rgba(24,50,38,.09);padding:14px}.windowcad-visual svg{display:block;width:100%;height:auto;max-height:548px}.windowcad-visual-caption{display:flex;justify-content:space-between;gap:14px;align-items:center;border-top:1px solid #edf1ef;padding:10px 8px 2px;font-size:11px;color:#6f7d77}.windowcad-visual-caption strong{color:#172735}.windowcad-visual.compact{width:92px;padding:2px;border-radius:7px;box-shadow:none;background:#f8faf9}.windowcad-visual.compact svg{width:88px;height:66px}.opening-number .windowcad-visual.compact{margin:6px 0 7px}
.windowcad-control-panel{min-height:0;overflow:auto;background:#fff;border-left:1px solid #e1e7e4;padding:22px}.windowcad-control-title>span{font-size:9px;letter-spacing:.14em;color:#2f8f53;font-weight:900}.windowcad-control-title h3{margin:5px 0 6px;font-size:22px;color:#172735}.windowcad-control-title p{margin:0 0 18px;color:#77837e;font-size:12px;line-height:1.55}
.windowcad-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.windowcad-option-grid.finishes{grid-template-columns:repeat(2,minmax(0,1fr))}.windowcad-option-card{min-height:78px;border:1px solid #dfe6e2;border-radius:12px;background:#fff;padding:10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;cursor:pointer;text-align:left;color:#34443d}.windowcad-option-card:hover{border-color:#9fcbb0;background:#f8fbf9}.windowcad-option-card.active{border:2px solid #2f8f53;background:#eff8f2;box-shadow:0 0 0 2px rgba(47,143,83,.08)}.windowcad-option-card i{width:46px;height:20px;border-radius:5px;background:var(--swatch);border:1px solid rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}.windowcad-option-card strong{font-size:12px}.windowcad-option-card>span{font-size:24px;line-height:1;color:#87938e}.windowcad-option-grid.text .windowcad-option-card{min-height:58px}
.windowcad-control-row,.windowcad-dimension-grid{margin-top:16px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.windowcad-control-row.single{grid-template-columns:1fr}.windowcad-control-row label,.windowcad-dimension-grid label{display:flex;flex-direction:column;gap:6px;font-size:10px;font-weight:800;color:#64716c;text-transform:uppercase;letter-spacing:.04em}.windowcad-control-row select,.windowcad-dimension-grid input{width:100%;border:1px solid #d9e1dd;border-radius:10px;padding:11px 10px;background:#fff;color:#172735;font:inherit;font-size:13px;text-transform:none;letter-spacing:0}.windowcad-check{margin-top:16px;border:1px solid #dfe6e2;border-radius:12px;padding:12px;display:flex;gap:10px;align-items:flex-start}.windowcad-check input{margin-top:3px}.windowcad-check span{display:flex;flex-direction:column;gap:3px}.windowcad-check strong{font-size:12px;color:#172735}.windowcad-check small{font-size:10px;color:#7b8882}.windowcad-control-card{margin-top:14px;padding:14px;border:1px solid #dfe7e3;border-radius:14px;background:linear-gradient(180deg,#fbfcfb 0%,#f7faf8 100%);box-shadow:0 8px 22px rgba(29,49,41,.04)}
.windowcad-designer-foot{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 18px;background:#fff;border-top:1px solid #e1e7e4}.windowcad-designer-foot>div{display:flex;gap:8px;align-items:center}
.opening-visual-design-button{border:1px solid #cfe0d5;background:#f2f8f4;color:#2f7e4b;border-radius:8px;padding:6px 8px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}.opening-visual-design-button.configured{background:#2f8f53;color:#fff;border-color:#2f8f53}.opening-visual-design-button:hover{transform:translateY(-1px)}
.builder-windowcad-button{width:100%;border:1px solid #cfe0d5;border-radius:12px;background:linear-gradient(135deg,#f4faf6,#eef7f1);padding:10px 11px;display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;text-align:left;cursor:pointer;margin:10px 0 14px;color:#172735}.builder-windowcad-button.configured{border-color:#7fbd94;background:linear-gradient(135deg,#eff8f2,#e7f5ec)}.builder-windowcad-button div{display:flex;flex-direction:column;gap:2px}.builder-windowcad-button strong{font-size:12px}.builder-windowcad-button small{font-size:10px;color:#6e7c76;line-height:1.35}.builder-windowcad-button>b{color:#2f8f53;font-size:17px}.proposal-windowcad-drawing .windowcad-visual{max-width:620px;margin:12px auto;padding:8px;box-shadow:none}.proposal-windowcad-drawing .windowcad-visual-caption{font-size:9px}.proposal-windowcad-drawing .drawing-note{position:static;left:auto;right:auto;bottom:auto;display:block;text-align:center;color:#7c8783;font-size:9px;line-height:1.45;margin:6px 0 0}
@media(max-width:900px){.windowcad-designer-shell{height:96vh;width:98vw}.windowcad-designer-body{grid-template-columns:1fr}.windowcad-preview-stage{min-height:45vh}.windowcad-control-panel{border-left:0;border-top:1px solid #e1e7e4}.windowcad-designer-foot{align-items:stretch;flex-direction:column}.windowcad-designer-foot>div{flex-wrap:wrap}.windowcad-designer-foot .btn{flex:1}.windowcad-option-grid{grid-template-columns:1fr 1fr}}

/* v0.7.12 — the Proposal Builder HTML is the canonical PDF renderer. */
.proposal-pdf-render-stage {
  position: fixed;
  left: -12000px;
  top: 0;
  width: 595px;
  z-index: -1000;
  pointer-events: none;
  background: #fff;
}
.proposal-pdf-render-stage .proposal-paper {
  width: 595px;
  min-height: 842px;
  height: 842px;
  max-height: 842px;
  overflow: hidden;
  box-shadow: none !important;
  transform: none !important;
  margin: 0 !important;
  transition: none !important;
}
.proposal-pdf-render-stage .proposal-page-body-shell { overflow:hidden; }
.proposal-media-page { display:flex; flex-direction:column; }
.proposal-media-frame {
  flex: 1;
  min-height: 560px;
  margin-top: 16px;
  border: 1px solid #dce4e0;
  border-radius: 10px;
  background: #f7faf8;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.proposal-media-frame img { width:100%; height:100%; object-fit:contain; display:block; }
.proposal-cover-hero {
  position:absolute;
  right: 0;
  top: 105px;
  width: 42%;
  height: 530px;
  overflow:hidden;
  border-left: 1px solid rgba(255,255,255,.18);
}
.proposal-cover-hero::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(47,143,83,.82),rgba(47,143,83,.14));
}
.proposal-cover-hero img { width:100%; height:100%; object-fit:cover; display:block; }
.proposal-cover-main.has-hero h1,
.proposal-cover-main.has-hero > strong,
.proposal-cover-main.has-hero > p { max-width: 285px; position:relative; z-index:2; }
.proposal-cover-main.has-hero > small,
.proposal-cover-main.has-hero .proposal-cover-rule { position:relative; z-index:2; }

/* v0.7.15 — responsive phone/tablet shell + installable PWA polish */
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; min-height: 100dvh; }
body { overflow-x: hidden; }
img, svg { max-width: 100%; }
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.sidebar-backdrop { display: none; }
.mobile-menu-close { display: none; }

@media (max-width: 980px) {
  .app-shell { display: block; min-height: 100dvh; }
  .main-area { width: 100%; min-width: 0; }
  .sidebar {
    top: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 18px 0 46px rgba(10, 20, 28, .22);
    will-change: transform;
  }
  .sidebar-brand { position: relative; padding-right: 58px; }
  .mobile-menu-close {
    display: grid;
    position: absolute;
    right: 12px;
    top: 50%;
    width: 40px;
    height: 40px;
    transform: translateY(-50%);
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 26px;
    line-height: 1;
  }
  .mobile-menu-close:hover { background: rgba(255,255,255,.11); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(10, 20, 28, .42);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease, visibility .2s ease;
  }
  .sidebar-backdrop.active { opacity: 1; visibility: visible; pointer-events: auto; }
  body.sidebar-open { overflow: hidden; }
  .topbar { padding-top: max(16px, env(safe-area-inset-top)); }
  .page-content { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .nav-item { min-height: 46px; font-size: 14px; }
  .main-nav { gap: 5px; }
  .btn, .icon-button { min-height: 44px; }
}

@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  input, select { min-height: 44px; }
  textarea { min-height: 100px; }

  .topbar {
    min-height: 0;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  #mobile-menu { width: 44px; height: 44px; flex: 0 0 44px; font-size: 20px; }
  .topbar-context { flex: 1 1 calc(100% - 54px); min-width: 0; }
  .topbar-context > div:last-child { min-width: 0; }
  .topbar h1 { font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar p { max-width: 100%; font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-actions { flex: 0 0 100%; width: 100%; min-width: 0; justify-content: flex-start; }
  .page-content { padding: 14px 14px calc(34px + env(safe-area-inset-bottom)); }

  .panel { border-radius: 13px; }
  .panel.pad { padding: 16px; }
  .panel-header { padding: 15px 16px; }
  .panel-header { align-items: flex-start; flex-wrap: wrap; }

  .toolbar { align-items: stretch; }
  .toolbar > .search,
  .toolbar > .search-autocomplete,
  .search,
  .search-autocomplete { min-width: 0; max-width: none; width: 100%; flex-basis: 100%; }
  .filter-pills { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .filter-pills::-webkit-scrollbar { display: none; }
  .pill { flex: 0 0 auto; min-height: 40px; }

  .table-wrap { margin-inline: -1px; border-radius: 0 0 12px 12px; }
  .table-wrap table { min-width: 680px; }
  .line-items table { min-width: 860px; }
  .table-wrap th, .table-wrap td { padding: 12px 10px; }

  .dashboard-layout { gap: 12px; margin-top: 12px; }
  .dashboard-kpis { gap: 10px; }
  .dashboard-kpi { min-width: 0; }
  .pipeline-report { overflow-x: auto; padding-inline: 12px; }
  .pipeline-report-row { min-width: 430px; }
  .task-row { grid-template-columns: 24px 28px minmax(0,1fr); }
  .task-when { grid-column: 3; text-align: left; white-space: normal; }
  .mini-chart { min-width: 520px; overflow: visible; }
  .dashboard-trend-panel { overflow-x: auto; }

  .deal-board { scroll-snap-type: x proximity; overscroll-behavior-x: contain; padding-bottom: 8px; }
  .deal-column { scroll-snap-align: start; }

  .calendar-toolbar { align-items: stretch; }
  .calendar-nav { width: 100%; }
  .calendar-nav .btn { flex: 1; }
  .week-calendar {
    display: flex;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }
  .calendar-day { flex: 0 0 min(82vw, 340px); scroll-snap-align: start; border-right: 1px solid var(--border); }
  .calendar-day:last-child { border-right: 0; }
  .page-content:has(.week-calendar) { overflow-x: hidden; }

  .import-hero { padding: 24px 20px; gap: 22px; border-radius: 16px; }
  .import-hero h2 { font-size: clamp(27px, 8vw, 34px); }
  .import-flow-visual { grid-template-columns: 1fr; gap: 7px; }
  .import-flow-visual > div { min-height: 110px; }
  .import-flow-visual > i { justify-self: center; transform: rotate(90deg); }
  .import-wizard-progress { width: 100%; overflow-x: auto; justify-content: flex-start; grid-template-columns: repeat(5, max-content); padding: 5px 8px 10px; margin-bottom: 22px; }
  .import-wizard-progress > i { display: none; }
  .import-step-shell { margin-bottom: 76px; }
  .import-upload-panel, .import-explainer { padding: 18px; border-radius: 14px; }
  .supplier-dropzone { min-height: 170px; padding: 18px; }
  .demo-file-button { grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; padding: 11px; }
  .import-project-review { grid-template-columns: 1fr; }
  .import-project-review label.wide { grid-column: auto; }
  .import-review-head { align-items: stretch; flex-direction: column; }
  .extraction-score { min-width: 0; width: 100%; }
  .import-review-summary { grid-template-columns: 1fr 1fr; }
  .wizard-actionbar { margin: 22px -14px -14px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .wizard-actionbar > div { width: 100%; }
  .wizard-actionbar .btn { flex: 1; }

  .quote-wizard-shell { grid-template-rows: auto minmax(0,1fr); }
  .quote-wizard-topbar { min-height: 58px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .quote-wizard-topbar::before { display: none; }
  .quote-wizard-topbar > strong { font-size: 16px; }
  .quote-wizard-topbar > div { gap: 8px; font-size: 11px; }
  .quote-wizard-container { min-height: calc(100dvh - 58px); }
  .quote-stepper { scrollbar-width: none; }
  .quote-stepper::-webkit-scrollbar { display: none; }
  .quote-map-frame, .template-satellite-frame { height: min(54vh, 420px); }

  .proposal-builder-layout {
    height: auto;
    min-height: calc(100dvh - 136px);
    margin: 0 -14px -34px;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .builder-pages { order: 1; max-height: 210px; border-bottom: 1px solid #dfe4e1; }
  .builder-page-scroll { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 9px 10px; }
  .builder-page-scroll > * { flex: 0 0 170px; }
  .builder-page-nav { display: none; }
  .builder-canvas { order: 2; min-height: 620px; overflow: auto; }
  .builder-canvas-toolbar { position: sticky; top: 0; z-index: 4; flex-wrap: wrap; height: auto; min-height: 44px; padding: 8px 10px; gap: 8px; }
  .builder-preview-nav { width: min(100%, 308px); }
  .proposal-paper-wrap { width: max-content; min-width: 100%; padding: 20px; }
  .proposal-paper { transform: scale(.78); transform-origin: top center; margin-bottom: -185px; }
  .proposal-paper-wrap.zoomed .proposal-paper { transform: scale(.9); margin-bottom: -85px; }
  .builder-controls { order: 3; position: static; width: 100%; height: auto; max-height: none; border-left: 0; border-top: 1px solid #dfe4e1; box-shadow: none; overflow: visible; }
  .builder-price-pair { grid-template-columns: 1fr 1fr; }

  .windowcad-designer-backdrop { padding: 0; align-items: stretch; }
  .windowcad-designer-shell { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .windowcad-designer-head { padding: max(12px, env(safe-area-inset-top)) 14px 12px; }
  .windowcad-designer-head h2 { font-size: 18px; }
  .windowcad-preview-stage, .windowcad-control-panel { padding: 15px; }
  .windowcad-designer-foot { padding-bottom: calc(13px + env(safe-area-inset-bottom)); }

  .public-head { flex-direction: column; min-height: 0; gap: 16px; }
  .public-head > div:last-child { text-align: left !important; }
  .public-title { font-size: 28px; }
  .public-actions { flex-direction: column; align-items: stretch; }
  .public-actions .btn { width: 100%; }
  .toast-root { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 620px) {
  .page-actions.dashboard-actions-active,
  .page-actions.catalogue-actions-active,
  .page-actions.calendar-actions-active { width: 100%; min-width: 0; }

  .dashboard-header-actions,
  .calendar-header-actions,
  .catalogue-header-actions { width: 100%; }

  .import-opening-row { grid-template-columns: 1fr; gap: 12px; }
  .opening-number { border-right: 0; border-bottom: 1px solid #edf0ee; padding: 0 0 11px; flex-direction: row; align-items: center; justify-content: flex-start; }
  .opening-number .mini-window-diagram,
  .opening-number .windowcad-visual.compact { width: 82px; flex: 0 0 82px; }
  .opening-fields, .opening-pricing, .opening-flags { grid-column: 1; }
  .opening-field-row { grid-template-columns: 1fr 1fr; }
  .opening-field-row > *:first-child { grid-column: 1 / -1; }

  .proposal-setup-grid { margin-bottom: 70px; gap: 18px; }
  .proposal-setup-main h2, .import-step-copy h2, .import-review-head h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .auth-panel { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); align-items: start; }
  .auth-card { margin-top: 4vh; padding: 24px 18px; border-radius: 18px; }
  .auth-card h2 { font-size: 26px; }
  .sidebar { width: min(326px, 90vw); }
  .page-content { padding-inline: 11px; }
  .dashboard-kpis, .kpi-grid { grid-template-columns: 1fr; }
  .dashboard-kpi { min-height: 96px; }
  .dashboard-kpi > strong { font-size: 24px; }
  .import-review-summary { grid-template-columns: 1fr; }
  .demo-file-button { grid-template-columns: 1fr auto; }
  .demo-file-button > span { grid-column: 1 / -1; width: 62px; }
  .quote-preview-grid { grid-template-columns: 1fr; }
  .quote-review-card dl div { grid-template-columns: 1fr; }
  .proposal-paper { transform: scale(.62); margin-bottom: -320px; }
  .proposal-paper-wrap.zoomed .proposal-paper { transform: scale(.72); margin-bottom: -235px; }
  .builder-preview-nav { grid-template-columns: 25px minmax(100px,1fr) 25px 1px 25px 38px 25px; width: 100%; }
  .builder-preview-nav strong { min-width: 0; width: auto; max-width: none; }
  .windowcad-option-grid, .windowcad-option-grid.finishes { grid-template-columns: 1fr; }
  .windowcad-control-row, .windowcad-dimension-grid { grid-template-columns: 1fr; }
  .public-body { padding: 18px; }
  .public-head { padding: 20px 18px; }
}

@media (display-mode: standalone) {
  body { min-height: 100dvh; }
}

/* v0.7.16 Mobile WindowCAD visual designer */
.windowcad-preview-content{width:100%;display:flex;flex-direction:column;align-items:center;gap:12px;min-height:0}
.windowcad-preview-toggle{display:none;border:1px solid #d4e1da;background:#fff;color:#2f7e4b;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}

@media (max-width: 900px) {
  .windowcad-designer-shell{grid-template-rows:auto auto minmax(0,1fr) auto}
  .windowcad-designer-body{min-height:0;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
  .windowcad-preview-stage{min-height:0;height:clamp(210px,34dvh,320px);overflow:hidden;padding:12px 14px 10px;gap:7px;justify-content:flex-start;border-bottom:1px solid #e1e7e4}
  .windowcad-stage-meta{gap:8px;min-height:31px}
  .windowcad-stage-meta>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
  .windowcad-stage-meta>strong{margin-left:auto;white-space:nowrap}
  .windowcad-preview-toggle{display:inline-flex;align-items:center;justify-content:center;margin-left:2px}
  .windowcad-preview-content{gap:7px;overflow:hidden;flex:1}
  .windowcad-preview-stage .windowcad-visual{width:min(460px,100%);padding:7px;border-radius:12px;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center}
  .windowcad-preview-stage .windowcad-visual svg{max-height:min(23dvh,210px);min-height:0}
  .windowcad-preview-stage .windowcad-visual-caption{padding:6px 5px 0;font-size:10px}
  .windowcad-preview-stage .windowcad-source-warning{display:none}
  .windowcad-control-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:16px 15px 22px;border-left:0;border-top:0}
  .windowcad-control-title h3{font-size:20px;margin-top:3px}
  .windowcad-control-title p{margin-bottom:13px;line-height:1.4}
  .windowcad-option-card{min-height:64px;padding:9px;gap:5px}
  .windowcad-option-grid.text .windowcad-option-card{min-height:52px}
  .windowcad-designer-foot{padding:9px 12px calc(9px + env(safe-area-inset-bottom));gap:8px;flex-direction:row;align-items:center}
  .windowcad-designer-foot>div{display:flex;flex:1;justify-content:flex-end;gap:7px;flex-wrap:nowrap;min-width:0}
  .windowcad-designer-foot .btn{min-height:42px;padding:9px 12px;font-size:12px}
  .windowcad-designer-foot>#wcad-reset{flex:0 0 auto}
  .windowcad-designer-foot #wcad-save{flex:1}
  .windowcad-designer-foot #wcad-apply-all{flex:1;white-space:normal;line-height:1.2}
  .windowcad-designer-shell.preview-collapsed .windowcad-designer-body{grid-template-rows:auto minmax(0,1fr)}
  .windowcad-designer-shell.preview-collapsed .windowcad-preview-stage{height:auto;min-height:49px;padding-bottom:8px}
  .windowcad-designer-shell.preview-collapsed .windowcad-preview-content{display:none}
}

@media (max-width: 620px) {
  .windowcad-designer-head p{display:none}
  .windowcad-designer-head>div{min-width:0}
  .windowcad-brand-chip{display:none}
  .windowcad-tabs{padding:0 7px;scrollbar-width:none}
  .windowcad-tabs::-webkit-scrollbar{display:none}
  .windowcad-tabs button{padding:10px 11px;font-size:10px}
  .windowcad-preview-stage{height:clamp(190px,29dvh,250px);padding:8px 10px 7px}
  .windowcad-stage-meta{width:100%;font-size:10px}
  .windowcad-stage-meta>strong{display:none}
  .windowcad-preview-stage .windowcad-visual{width:min(360px,100%);padding:5px}
  .windowcad-preview-stage .windowcad-visual svg{max-height:min(19dvh,165px)}
  .windowcad-preview-stage .windowcad-visual-caption{display:none}
  .windowcad-control-panel{padding:13px 11px 18px}
  .windowcad-option-grid,.windowcad-option-grid.finishes{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .windowcad-option-card{min-height:56px;border-radius:10px;padding:8px}
  .windowcad-option-card i{width:36px;height:16px}
  .windowcad-option-card strong{font-size:11px;line-height:1.2}
  .windowcad-option-card>span{font-size:20px}
  .windowcad-control-row,.windowcad-dimension-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
  .windowcad-control-row select,.windowcad-dimension-grid input{min-height:44px;padding:9px 8px;font-size:16px}
  .windowcad-check{margin-top:12px;padding:10px}
  .windowcad-designer-foot{gap:6px;padding-inline:8px}
  .windowcad-designer-foot .btn{padding:8px 9px;font-size:11px}
  .windowcad-designer-foot #wcad-apply-all{font-size:10px}
}

@media (max-width: 390px) {
  .windowcad-preview-stage{height:180px}
  .windowcad-preview-stage .windowcad-visual svg{max-height:125px}
  .windowcad-control-title h3{font-size:18px}
  .windowcad-control-title p{font-size:11px}
  .windowcad-designer-foot>#wcad-reset{padding-inline:8px}
}

/* v0.7.17 — tablet-first workspace, import review and calendar layouts */
@media (min-width: 761px) and (max-width: 1024px) {
  /* Keep page identity on its own row and stop action controls from running off-screen. */
  .topbar {
    min-height: 0;
    padding: max(14px, env(safe-area-inset-top)) 20px 14px;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
  }
  #mobile-menu { flex: 0 0 44px; width: 44px; height: 44px; }
  .topbar-context { flex: 1 1 calc(100% - 62px); min-width: 0; }
  .topbar h1 { font-size: 24px; line-height: 1.15; }
  .topbar p { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-actions,
  .page-actions.dashboard-actions-active,
  .page-actions.calendar-actions-active,
  .page-actions.catalogue-actions-active {
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  /* Dashboard: team filter gets a full row, actions share the next row evenly. */
  .dashboard-header-actions {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-header-actions .compact-select {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .dashboard-header-actions .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }

  /* Calendar header actions fit the viewport rather than covering the title. */
  .calendar-header-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 170px);
    gap: 8px;
  }
  .calendar-header-actions .compact-select,
  .calendar-header-actions .btn {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .calendar-header-actions .btn { justify-self: stretch; }

  /* A tablet week is a set of readable day cards rather than a clipped desktop grid. */
  .calendar-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 18px;
  }
  .calendar-nav { width: auto; }
  .calendar-summary-inline { justify-content: flex-end; gap: 10px 16px; }
  .week-calendar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .calendar-day,
  .calendar-day:last-child {
    min-width: 0;
    min-height: 260px;
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .calendar-day > header { min-height: 68px; padding: 10px 12px; }
  .calendar-day-body { min-height: 150px; padding: 9px; }
  .calendar-empty-day { padding: 28px 8px; }
  .calendar-day-add { min-height: 40px; font-size: 11px; }
  .page-content:has(.week-calendar) { overflow-x: hidden; }
  .calendar-agenda { margin-top: 14px; }

  /* Supplier import review: use the tablet width instead of compressing five fields into one strip. */
  .quote-wizard-container { width: min(100% - 28px, 1160px); }
  .import-opening-row {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
  }
  .opening-number {
    grid-column: 1;
    grid-row: 1 / span 3;
    padding-right: 14px;
    justify-content: flex-start;
  }
  .opening-number .mini-window-diagram,
  .opening-number .windowcad-visual.compact {
    width: 92px;
    flex: 0 0 92px;
  }
  .opening-fields,
  .opening-pricing,
  .opening-flags { grid-column: 2; min-width: 0; width: 100%; }
  .opening-field-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }
  .opening-field-row > label:nth-child(1),
  .opening-field-row > label:nth-child(2),
  .opening-field-row > label:nth-child(3) { grid-column: span 2; }
  .opening-field-row > label:nth-child(4),
  .opening-field-row > label:nth-child(5) { grid-column: span 3; }
  .opening-field-row label > span,
  .opening-pricing label > span,
  .opening-description-field > span { font-size: 10px; }
  .opening-field-row input,
  .opening-description-field input,
  .money-input input { font-size: 13px; }
  .opening-description-field { margin-top: 9px; }
  .opening-pricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 5px;
  }
  .opening-flags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    padding-top: 2px;
  }
  .opening-flags label { min-height: 38px; }
  .opening-tag-add input { width: min(260px, 45vw); }
}

@media (min-width: 900px) and (max-width: 1024px) {
  .week-calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* v0.7.18 — opening media containment, photo uploads, and cross-device quote controls */
.import-opening-row { overflow: hidden; box-sizing: border-box; }
.opening-number { min-width: 0; overflow: hidden; box-sizing: border-box; }
.opening-visual-wrap { width: 100%; min-width: 0; display: flex; justify-content: flex-start; overflow: hidden; }
.opening-number .windowcad-visual.compact { width: 100%; max-width: 88px; box-sizing: border-box; margin-inline: 0; }
.opening-number .windowcad-visual.compact svg { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.opening-photo-tools { width: 100%; min-width: 0; display: grid; gap: 6px; align-items: center; }
.opening-photo-thumb { width: 100%; max-width: 88px; aspect-ratio: 4 / 3; border: 1px solid #dce5e0; border-radius: 8px; overflow: hidden; background: #f5f8f6; }
.opening-photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.opening-photo-button,
.opening-photo-remove { width: 100%; min-height: 30px; border-radius: 8px; font-size: 9px; font-weight: 800; cursor: pointer; }
.opening-photo-button { border: 1px solid #cfe0d5; background: #fff; color: #2f7e4b; }
.opening-photo-button:hover { background: #f2f8f4; }
.opening-photo-remove { border: 0; background: transparent; color: #9a4940; text-decoration: underline; text-underline-offset: 2px; }
.opening-photo-proposal-toggle { display: flex; align-items: center; gap: 5px; font-size: 9px; color: #62716b; white-space: nowrap; }
.opening-photo-proposal-toggle input { width: auto; margin: 0; }

.builder-opening-photo-card { margin: 0 0 14px; padding: 12px; border: 1px solid #dfe6e2; border-radius: 12px; background: #fbfcfb; display: grid; gap: 10px; }
.builder-opening-photo-card.has-photo { border-color: #b9d8c4; background: #f6fbf7; }
.builder-opening-photo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.builder-opening-photo-head > div { display: grid; gap: 2px; min-width: 0; }
.builder-opening-photo-head strong { color: #172735; font-size: 12px; }
.builder-opening-photo-head small { color: #74807b; font-size: 10px; line-height: 1.35; }
.builder-opening-photo-head .btn { flex: 0 0 auto; min-height: 36px; padding: 8px 10px; }
.builder-opening-photo-preview { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; align-items: center; min-width: 0; }
.builder-opening-photo-preview img { width: 92px; height: 70px; object-fit: cover; border-radius: 9px; border: 1px solid #d9e2dd; background: #fff; }
.builder-opening-photo-preview > div { min-width: 0; display: grid; gap: 5px; }
.builder-opening-photo-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5f6d66; font-size: 10px; }
.builder-opening-photo-preview button { justify-self: start; border: 0; padding: 0; background: transparent; color: #9a4940; font: inherit; font-size: 10px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.builder-opening-photo-toggle { display: flex; align-items: flex-start; gap: 9px; padding-top: 8px; border-top: 1px solid #e3e9e6; }
.builder-opening-photo-toggle input { width: auto; margin-top: 2px; }
.builder-opening-photo-toggle span { display: grid; gap: 2px; }
.builder-opening-photo-toggle strong { color: #172735; font-size: 11px; }
.builder-opening-photo-toggle small { color: #76817c; font-size: 9px; }
.builder-opening-photo-empty { margin: 0; color: #76817c; font-size: 10px; line-height: 1.45; }

.proposal-opening-photo { width: min(100%, 500px); margin: 10px auto 14px; border: 1px solid #dfe5e2; border-radius: 12px; overflow: hidden; background: #fff; }
.proposal-opening-photo img { display: block; width: 100%; max-height: 235px; object-fit: contain; background: #f5f7f6; }
.proposal-opening-photo > div { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 10px; border-top: 1px solid #edf1ef; color: #77827d; font-size: 8px; }
.proposal-opening-photo > div strong { color: #2f8f53; text-transform: uppercase; letter-spacing: .06em; }
.proposal-opening-photo > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1025px) {
  .import-opening-row { grid-template-columns: 118px minmax(0,1fr) 270px 105px; }
  .opening-number { padding-right: 12px; }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .import-opening-row { grid-template-columns: 118px minmax(0,1fr); }
  .opening-number { padding-right: 10px; }
  .opening-number .windowcad-visual.compact,
  .opening-photo-thumb { max-width: 88px; }
  .opening-photo-button,
  .opening-photo-remove { max-width: 88px; }
}

@media (max-width: 760px) {
  .import-opening-row { overflow: hidden; }
  .opening-number { width: 100%; min-width: 0; overflow: hidden; flex-wrap: wrap; gap: 8px 10px; }
  .opening-number > span { flex: 0 0 30px; }
  .opening-visual-wrap { width: 82px; flex: 0 0 82px; }
  .opening-number .windowcad-visual.compact { width: 82px; max-width: 82px; }
  .opening-visual-design-button { flex: 0 0 auto; }
  .opening-photo-tools { flex: 1 1 170px; width: auto; grid-template-columns: minmax(0,82px) minmax(88px,1fr); gap: 6px 8px; }
  .opening-photo-thumb { grid-row: 1 / span 3; width: 82px; max-width: 82px; }
  .opening-photo-button,
  .opening-photo-remove { width: 100%; min-height: 34px; }
  .opening-photo-proposal-toggle { min-height: 30px; }
  .builder-opening-photo-head { align-items: flex-start; }
  .builder-opening-photo-head .btn { min-width: 92px; }
}

@media (max-width: 480px) {
  .opening-number { align-items: center; }
  .opening-photo-tools { flex-basis: 100%; grid-template-columns: 76px minmax(0,1fr); }
  .opening-photo-thumb { width: 76px; max-width: 76px; }
  .builder-opening-photo-preview { grid-template-columns: 78px minmax(0,1fr); }
  .builder-opening-photo-preview img { width: 78px; height: 62px; }
}

/* v0.7.19 — reliable apply-to-all, native photo picker, and tablet header alignment */
.opening-photo-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.opening-photo-button,
.builder-opening-photo-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.opening-photo-button:focus-visible,
.builder-opening-photo-pick:focus-visible {
  outline: 2px solid rgba(47, 143, 83, .32);
  outline-offset: 2px;
}
.windowcad-designer-foot #wcad-apply-all:disabled {
  opacity: .72;
  cursor: wait;
}
.mobile-menu-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

@media (min-width: 761px) and (max-width: 1024px) {
  #mobile-menu,
  .topbar-workspace-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 11px;
    box-sizing: border-box;
  }
  #mobile-menu {
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 0;
  }
  .topbar-workspace-mark img {
    width: 40px;
    height: 24px;
  }
  .mobile-menu-icon {
    width: 22px;
    height: 22px;
  }
  .opening-photo-button {
    max-width: 92px;
    min-height: 36px;
  }
}
@media (min-width: 761px) and (max-width: 1024px) {
  #mobile-menu {
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 5px 15px rgba(34,25,70,.055);
  }
}

/* v0.7.20 - supplier quote photo import + mobile/tablet importer polish */
.import-source-step { margin-bottom: 42px; }
.supplier-source-select { margin-bottom: 14px; }
.supplier-input-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.supplier-source-card { min-width:0; min-height:138px; border:1px solid #dbe5df; border-radius:15px; background:#fff; padding:16px; display:grid; grid-template-columns:50px minmax(0,1fr); grid-template-rows:1fr auto; gap:10px 13px; align-items:center; cursor:pointer; transition:border-color .15s,background .15s,box-shadow .15s,transform .15s; }
.supplier-source-card:hover,.supplier-source-card.drag-active { border-color:#74b98e; background:#f7fcf8; box-shadow:0 0 0 3px rgba(47,143,83,.08); }
.supplier-source-card.selected { border:2px solid #2f8f53; background:#f2faf5; box-shadow:0 0 0 3px rgba(47,143,83,.08); }
.supplier-source-card input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.supplier-source-icon { grid-row:1 / span 2; width:50px; height:50px; display:grid; place-items:center; border-radius:13px; background:#172735; color:#fff; font-size:11px; font-weight:900; letter-spacing:.05em; }
.supplier-source-icon.camera { background:#e8f6ed; color:#2f8f53; font-size:22px; }
.supplier-source-card>div { min-width:0; }
.supplier-source-card strong { display:block; color:#172735; font-size:14px; line-height:1.3; }
.supplier-source-card small { display:block; margin-top:5px; color:#738078; font-size:11px; line-height:1.4; }
.supplier-source-card>b { grid-column:2; justify-self:start; color:#2f8f53; font-size:11px; font-weight:850; }
.supplier-photo-selection { margin-top:12px; padding:11px 13px; border:1px solid #cfe4d7; border-radius:11px; background:#f4faf6; display:grid; gap:4px; }
.supplier-photo-selection strong { color:#206c43; font-size:11px; }
.supplier-photo-selection span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#46564e; font-size:10px; }
.supplier-photo-selection small { color:#6f7c75; font-size:10px; line-height:1.4; }
.import-explainer-steps { display:grid; }
.import-explainer .import-explainer-step { display:grid; grid-template-columns:34px 1fr; gap:11px; align-items:start; padding:12px 0; border-bottom:1px solid #eef1ef; }
.import-explainer .import-explainer-step>span { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#edf4f1; color:#2f8f53; font-size:10px; font-weight:900; }
.import-explainer .import-explainer-step p { margin:0; }
.import-explainer .import-explainer-step strong,.import-explainer .import-explainer-step small { display:block; }
.import-explainer .import-explainer-step small { color:#7c878d; margin-top:3px; line-height:1.4; }

@media (max-width: 1100px) {
  .import-source-step { max-width:820px; margin-bottom:32px; }
  .import-source-grid { grid-template-columns:1fr; gap:14px; }
  .import-step-copy { margin-bottom:18px; }
  .import-step-copy p { max-width:680px; margin-left:auto; margin-right:auto; }
  .import-upload-panel,.import-explainer { padding:18px; }
  .import-explainer { box-shadow:none; }
  .import-explainer h3 { margin-bottom:10px; }
  .import-explainer-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
  .import-explainer .import-explainer-step { min-width:0; }
  .real-mode-note { margin-top:12px!important; }
}

@media (max-width: 700px) {
  .import-wizard-progress { margin:0 0 14px; padding:2px 0 8px; }
  .import-wizard-progress>button { gap:6px; }
  .import-wizard-progress>button span { width:28px; height:28px; flex-basis:28px; }
  .import-wizard-progress>button strong { font-size:10px; }
  .import-step-copy { text-align:left; margin-bottom:14px; }
  .import-step-copy h2 { font-size:24px; margin-top:4px; }
  .import-step-copy p { font-size:13px; line-height:1.48; margin-bottom:0; }
  .import-upload-panel,.import-explainer { padding:13px; border-radius:13px; }
  .supplier-input-options { grid-template-columns:1fr; gap:9px; }
  .supplier-source-card { min-height:104px; padding:12px; grid-template-columns:44px minmax(0,1fr); gap:7px 11px; }
  .supplier-source-icon { width:44px; height:44px; border-radius:11px; }
  .supplier-source-card strong { font-size:13px; }
  .supplier-source-card small { font-size:10px; }
  .supplier-or { margin:11px 0; }
  .demo-file-button { grid-template-columns:52px minmax(0,1fr) auto; }
  .import-explainer-steps { grid-template-columns:1fr; }
  .import-explainer .import-explainer-step { padding:9px 0; }
  .import-explainer .import-explainer-step:last-child { border-bottom:0; }
  .real-mode-note { font-size:10px; padding:10px; }
  .wizard-actionbar { position:sticky; margin:16px -14px -14px; }
  .wizard-actionbar>#import-extract { flex:1; min-height:46px; }
}

/* v0.7.20 final importer refinements */
.import-explainer > .import-explainer-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.supplier-source-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.supplier-source-card,
.supplier-source-card > div,
.import-upload-panel,
.import-explainer,
.import-source-grid { min-width: 0; box-sizing: border-box; }
.supplier-source-card > b { align-self: end; }
/* Opening-level photo upload was intentionally removed: source quote photos belong in Step 1. */
.opening-photo-tools,
.builder-opening-photo-card { display: none !important; }

@media (min-width: 761px) and (max-width: 1100px) {
  #supplier-import-wizard { width: 100%; min-width: 0; }
  .import-source-step { width: min(100%, 860px); padding-inline: 8px; box-sizing: border-box; }
  .import-source-grid { width: 100%; }
  .supplier-input-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-source-card { min-height: 124px; padding: 14px; }
  .import-explainer > .import-explainer-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .import-explainer .import-explainer-step:nth-last-child(-n+2) { border-bottom: 0; }
  .import-wizard-progress { max-width: 720px; }
}

@media (max-width: 760px) {
  #supplier-import-wizard { width: 100%; min-width: 0; overflow-x: hidden; }
  .import-source-step { width: 100%; padding: 0; margin-bottom: 24px; }
  .import-source-grid { width: 100%; }
  .supplier-source-select { margin-bottom: 10px; }
  .supplier-source-card { width: 100%; min-height: 96px; }
  .supplier-source-card > b { font-size: 10px; }
  .supplier-photo-selection span { white-space: normal; overflow-wrap: anywhere; }
  .import-explainer > .import-explainer-steps { grid-template-columns: 1fr; }
  .import-explainer .import-explainer-step:nth-last-child(-n+2) { border-bottom: 1px solid #eef1ef; }
  .import-explainer .import-explainer-step:last-child { border-bottom: 0; }
  .wizard-actionbar #import-cancel { flex: 0 0 auto; }
  .wizard-actionbar #import-extract { flex: 1 1 190px; }
}

/* v0.7.22 import processing timer + realistic ETA */
.import-processing-status {
  max-width: 1180px;
  margin: -70px auto 16px;
  padding: 15px 17px 13px;
  border: 1px solid #cfe4d7;
  border-radius: 14px;
  background: #f7fbf8;
  box-shadow: 0 8px 24px rgba(31, 64, 47, .08);
  color: #172735;
}
.import-processing-status.slow { border-color: #ead7aa; background: #fffaf0; }
.import-processing-head { display:flex; align-items:center; gap:12px; min-width:0; }
.import-processing-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 3px solid #dcece2;
  border-top-color: #2f8f53;
  border-radius: 50%;
  animation: orderwolf-import-spin .9s linear infinite;
}
.import-processing-copy { min-width:0; display:grid; gap:3px; }
.import-processing-copy strong { font-size:14px; line-height:1.25; }
.import-processing-copy > span { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:#68766f; font-size:11px; }
.import-processing-copy b { color:#295f40; font-weight:800; }
.import-processing-copy i { font-style:normal; color:#a7b0aa; }
.import-processing-track { position:relative; height:5px; margin:12px 0 9px; overflow:hidden; border-radius:999px; background:#e2ede6; }
.import-processing-track > span { position:absolute; inset:0 auto 0 -34%; width:34%; border-radius:999px; background:linear-gradient(90deg,rgba(47,143,83,.15),#2f8f53,rgba(47,143,83,.15)); animation:orderwolf-import-track 1.45s ease-in-out infinite; }
.import-processing-status.slow .import-processing-track { background:#f0e4c7; }
.import-processing-status.slow .import-processing-track > span { background:linear-gradient(90deg,rgba(191,137,29,.15),#bf891d,rgba(191,137,29,.15)); }
.import-processing-foot { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; min-width:0; }
.import-processing-foot > span { color:#55635c; font-size:11px; line-height:1.4; }
.import-processing-foot > small { color:#9a6813; font-size:10px; line-height:1.4; text-align:right; max-width:390px; }
@keyframes orderwolf-import-spin { to { transform:rotate(360deg); } }
@keyframes orderwolf-import-track { 0% { left:-34%; } 60%,100% { left:100%; } }
@media (prefers-reduced-motion: reduce) {
  .import-processing-spinner { animation:none; border-top-color:#2f8f53; }
  .import-processing-track > span { animation:none; left:0; width:58%; }
}
@media (max-width: 1100px) {
  .import-processing-status { max-width:820px; margin:-18px auto 14px; }
}
@media (max-width: 700px) {
  .import-processing-status { margin:-46px 0 11px; padding:12px 13px 11px; border-radius:12px; }
  .import-processing-spinner { width:30px; height:30px; flex-basis:30px; }
  .import-processing-copy strong { font-size:13px; }
  .import-processing-copy > span { font-size:10px; }
  .import-processing-foot { display:grid; gap:4px; }
  .import-processing-foot > small { max-width:none; text-align:left; }
}


/* v0.8.0 Eco Glaze Scotland local workspace */
.eco-dashboard-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
  align-items: start;
}
.eco-upcoming-panel, .eco-recent-panel { min-width: 0; }
/* v0.8.41 — lead-source report uses true share-of-total bars and dashboard table columns align professionally. */
.eco-source-panel { min-width:0; overflow:hidden; }
.eco-source-report { min-width:0; overflow:visible; }
.eco-source-report-head {
  position:static;
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(190px,1fr) 88px 110px;
  gap:12px;
  align-items:center;
  min-width:0;
  padding:10px 16px 9px;
  border-bottom:1px solid #ebeef0;
  background:rgba(255,255,255,.97);
  color:#6e7780;
  font-size:10px;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.eco-source-sort {
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  letter-spacing:inherit;
  text-transform:inherit;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}
.eco-source-sort:hover,
.eco-source-sort.active { color:#245f3d; }
.eco-source-share-heading { min-width:0; }
.eco-source-report-head > :nth-child(3),
.eco-source-report-head > :nth-child(4) { text-align:right; }
.eco-source-panel .pipeline-report { min-width:0; overflow:visible; padding:0 14px 4px; }
.eco-source-panel .pipeline-report-row {
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(190px,1fr) 88px 110px;
  gap:12px;
  align-items:center;
  min-width:0;
}
.eco-source-panel .pipeline-report-row > * { min-width:0; }
.eco-source-panel .pipeline-stage-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.eco-source-share-cell { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:center; gap:10px; min-width:0; }
.eco-source-share-cell .pipeline-bar-track { width:100%; margin:0; }
.eco-source-share-pct,
.eco-source-panel .pipeline-stage-count,
.eco-source-panel .pipeline-report-row > strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.eco-source-share-pct { color:#6f7786; font-size:12px; text-align:right; }
.eco-source-panel .pipeline-stage-count,
.eco-source-panel .pipeline-report-row > strong { text-align:right; }
.eco-source-panel .pipeline-report-row > strong { justify-self:end; }
@media (max-width: 1180px) and (min-width: 961px) {
  .eco-source-report-head,
  .eco-source-panel .pipeline-report-row {
    grid-template-columns:minmax(0,1fr) minmax(160px,.95fr) 80px 98px;
    gap:9px;
  }
  .eco-source-report-head { padding-left:14px; padding-right:14px; }
  .eco-source-panel .pipeline-report { padding-left:12px; padding-right:12px; }
}
@media (max-width: 760px) {
  .eco-source-report { overflow-x:auto; }
  .eco-source-report-head,
  .eco-source-panel .pipeline-report-row { min-width:560px; }
}
.eco-recent-panel { grid-column: 1 / -1; }
.eco-sales-report {
  max-height:min(520px, 62vh);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#b9c6bf transparent;
  outline:none;
}
.eco-sales-report:focus-visible { box-shadow:inset 0 0 0 2px rgba(47,143,83,.22); }
.eco-sales-report::-webkit-scrollbar { width:9px; height:9px; }
.eco-sales-report::-webkit-scrollbar-thumb { background:#bdc9c2; border:2px solid #fff; border-radius:999px; }
.eco-sales-report::-webkit-scrollbar-track { background:#fff; }
.eco-sales-table { table-layout:fixed; width:100%; min-width:900px; }
.eco-sales-table col.eco-col-sale { width:145px; }
.eco-sales-table col.eco-col-client { width:220px; }
.eco-sales-table col.eco-col-work { width:150px; }
.eco-sales-table col.eco-col-source { width:170px; }
.eco-sales-table col.eco-col-value { width:135px; }
.eco-sales-table col.eco-col-profit { width:135px; }
.eco-sales-report thead th {
  position:sticky;
  top:0;
  z-index:2;
  background:#fcfbfe;
  box-shadow:0 1px 0 #efedf3;
}
.eco-sales-report th,
.eco-sales-report td { vertical-align:middle; }
.eco-sales-report th.eco-col-value,
.eco-sales-report th.eco-col-profit,
.eco-sales-report td.eco-col-value,
.eco-sales-report td.eco-col-profit { text-align:right; }
.eco-sales-report td.eco-col-client,
.eco-sales-report td.eco-col-work,
.eco-sales-report td.eco-col-source { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.eco-sales-report td.eco-col-client strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.eco-sales-sort {
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:inherit;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}
.eco-sales-sort:hover,
.eco-sales-sort.active { color:#245f3d; }
.eco-sales-report th.eco-col-value .eco-sales-sort,
.eco-sales-report th.eco-col-profit .eco-sales-sort { text-align:right; }
.eco-sales-report th,
.eco-sales-report td { padding-left:14px; padding-right:14px; }
.eco-sales-report th.eco-col-value,
.eco-sales-report th.eco-col-profit,
.eco-sales-report td.eco-col-value,
.eco-sales-report td.eco-col-profit { padding-left:10px; padding-right:18px; }
.eco-data-panel { grid-column: 1 / -1; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: rgba(47, 143, 83, .045); }
.eco-import-summary { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 16px; }
.eco-import-summary > * { padding:8px 12px; border:1px solid #dfe7e2; border-radius:999px; background:#f8fbf9; }
.eco-import-summary strong { color:#245f3d; }
.eco-team-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.eco-team-grid .panel { min-width:0; }
.eco-calendar-event { border-left:3px solid #7d9588; }
.eco-calendar-event.eco-install { border-left-color:#2f8f53; }
.eco-calendar-event.eco-survey { border-left-color:#46698e; }
.eco-agenda-day { display:grid; gap:8px; }
.eco-job-detail { display:grid; gap:18px; }
.eco-job-detail-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; padding:18px 20px; border:1px solid #dfe7e2; border-radius:16px; background:#f8fbf9; }
.eco-job-detail-hero h3 { margin:8px 0 4px; font-size:24px; }
.eco-job-detail-hero p { margin:0; color:#64716a; }
.eco-job-detail-hero > div:last-child { text-align:right; }
.eco-job-detail-hero > div:last-child strong { display:block; font-size:24px; color:#245f3d; }
.eco-job-detail-hero > div:last-child small { color:#718078; }
.eco-job-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.eco-job-detail-grid section { border:1px solid #e2e8e4; border-radius:14px; padding:16px; background:#fff; }
.eco-job-detail-grid h4, .eco-job-note h4 { margin:0 0 12px; }
.eco-job-detail-grid dl { display:grid; grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr); gap:9px 12px; margin:0; }
.eco-job-detail-grid dt { color:#7a867f; }
.eco-job-detail-grid dd { margin:0; font-weight:650; overflow-wrap:anywhere; }
.eco-job-financials { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.eco-job-financials > div { padding:14px; border-radius:12px; background:#172735; color:#fff; }
.eco-job-financials span { display:block; font-size:11px; opacity:.72; margin-bottom:4px; }
.eco-job-financials strong { font-size:17px; }
.eco-job-financials .positive { color:#9fe0b8; }
.eco-job-financials .negative { color:#ffb4b4; }
.eco-job-note { padding:16px; }
.eco-job-note p, .eco-job-source { margin:0; }
@media (max-width: 960px) {
  .eco-dashboard-layout, .eco-team-grid { grid-template-columns:1fr; }
  .eco-recent-panel, .eco-data-panel { grid-column:auto; }
  .eco-job-financials { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .eco-job-detail-hero { display:grid; }
  .eco-job-detail-hero > div:last-child { text-align:left; }
  .eco-job-detail-grid, .eco-job-financials { grid-template-columns:1fr; }
}


/* Eco Glaze Scotland workspace branding + palette (v0.8.2)
   Keeps the original OrderWolf demo typography and component proportions. */
.visually-hidden { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

body {
  background:
    radial-gradient(circle at 78% 5%, rgba(71,139,60,.05), transparent 29%),
    var(--bg);
}
::selection { background: rgba(71,139,60,.2); }

/* Auth */
.auth-brand {
  background:
    radial-gradient(circle at 78% 27%, rgba(71,139,60,.23), transparent 30%),
    radial-gradient(circle at 15% 78%, rgba(50,91,148,.15), transparent 35%),
    linear-gradient(145deg, #122338 0%, #1d3557 58%, #172a43 100%);
}
.auth-eco-logo { width:min(250px,42vw); height:86px; object-fit:contain; object-position:left center; border-radius:14px; }
.auth-workspace-logo { width:132px !important; height:42px !important; object-fit:contain !important; filter:none !important; opacity:1 !important; border-radius:9px; }
.auth-copy .auth-kicker, .auth-points b { color:#87c778; }
.auth-card { border-top-color:#478b3c; }
.auth-workspace-row { background:#eef6ec; color:#2e6630; padding-right:13px; }
.auth-workspace-row img { width:118px; height:38px; margin-left:0; border-radius:8px; }
.auth-workspace-row span { color:#315c35; font-weight:800; }
.password-toggle { color:#3f7f3b; }
.password-toggle:hover { background:#eef6ec; }
.password-toggle:focus-visible { outline-color:rgba(71,139,60,.32); }

/* Sidebar: same lockup format as the original OrderWolf demo. */
.sidebar {
  background:
    radial-gradient(circle at 16% 6%, rgba(71,139,60,.22), transparent 27%),
    linear-gradient(180deg, #1d3557 0%, #172d49 58%, #11243a 100%);
}
.sidebar-brand-mark { width:58px; height:48px; background:#fff; border-radius:12px; box-shadow:0 8px 22px rgba(0,0,0,.16); display:grid; place-items:center; flex:0 0 58px; }
.sidebar-brand-mark img { width:35px; height:35px; object-fit:contain; }
.brand-title { font-size:15px; line-height:20px; font-weight:800; letter-spacing:-.02em; white-space:nowrap; }
.brand-subtitle { margin-top:2px; color:#aebdca; font-size:10px; line-height:15px; }
.nav-item.active { background:linear-gradient(90deg, rgba(71,139,60,.34), rgba(71,139,60,.13)); }
.nav-item.active::before { background:#7bc36d; }
.nav-item.active .nav-icon { color:#a7d59d; }
.nav-item:focus-visible { outline-color:#78b86d; }
.user-avatar { background:linear-gradient(145deg,#478b3c,#315f92); }
.powered-by { color:#8798a5; }

/* Header / workspace logo */
.topbar { border-bottom-color:#e1e8e3; box-shadow:0 1px 0 rgba(71,139,60,.04); }
.topbar::after { background:linear-gradient(90deg,#478b3c,rgba(71,139,60,0) 42%); opacity:.5; }
.topbar-workspace-mark { width:166px; height:54px; padding:0; border:1px solid #e2e8e4; border-radius:13px; background:#fff; box-shadow:0 7px 20px rgba(23,45,73,.07); }
.topbar-workspace-mark img { width:154px; height:50px; object-fit:contain; border-radius:11px; }
.topbar h1 { color:#18243a; }

/* Main controls */
.btn.primary { background:linear-gradient(135deg,#478b3c,#3d7c36); box-shadow:0 7px 16px rgba(71,139,60,.18); }
.btn.primary:hover { background:linear-gradient(135deg,#3d7c36,#244a72); }
.btn.secondary:hover { border-color:#b8c8bd; background:#f8fbf9; }
.pill.active { background:linear-gradient(135deg,#478b3c,#3d7c36); border-color:#478b3c; }
input:focus, select:focus, textarea:focus { border-color:#478b3c; box-shadow:0 0 0 3px rgba(71,139,60,.12); }
.panel-header, .team-panel-header { background:linear-gradient(180deg,#fff,#fbfdfb); }
.page-content > .panel,
.page-content > .team-panel,
.page-content > .week-calendar,
.page-content > .card-grid .info-card,
.page-content > .settings-layout .panel { border-color:#dfe7e2; }

/* Quote/proposal workflow: replace the old purple UI accents with Eco Glaze green/navy. */
.quote-step.active { background:#478b3c; box-shadow:0 5px 13px rgba(71,139,60,.22); }
.quote-step.complete { background:#e8f4e6; color:#377234; }
.quote-field input:focus, .quote-field select:focus, .quote-field textarea:focus, .quote-map-search input:focus { border-color:#478b3c; box-shadow:0 0 0 3px rgba(71,139,60,.11); }
.quote-segmented button.active { border-color:#478b3c; background:#478b3c; }
.quote-checkbox input { accent-color:#478b3c; }
.quote-product-options button b, .quote-dropzone > span { color:#3f7f3b; }
.quote-map-toolbar button.active { border-color:#478b3c; background:#eef6ec; color:#356f34; }
.quote-map-toolbar button.purple { color:#315f92; border-color:#cbd9e8; }
.quote-ai-card h3 { color:#315f92; }
.quote-ai-card button { background:#315f92; }
.quote-card-icon.purple { color:#315f92; background:#edf3f8; }
.quote-map-toolbar.template-toolbar .map-tool-zone.active { border-color:#478b3c; background:#eef6ec; color:#356f34; }
.team-avatar.avatar-1 { background:#315f92; }
.team-role-badge.admin { color:#315f92; background:#edf3f8; }
.team-action.mail { color:#315f92; }
.mini-chart-bar { background:linear-gradient(180deg,#4c8f45,#315f92); }

/* Import / Quotes tab */
.import-hero { background:linear-gradient(135deg,#172d49,#1d3b5f); }
.import-hero .eyebrow, .import-flow-visual strong, .import-flow-visual i { color:#8fd17f; }
.supplier-source-card:hover,.supplier-source-card.drag-active { border-color:#73b669; background:#f7fcf7; box-shadow:0 0 0 3px rgba(71,139,60,.08); }
.local-only-note { border:1px solid #d8e9d4; background:#f3f9f1; color:#315c2c; border-radius:12px; padding:12px 14px; font-size:13px; }

/* Imported Eco Glaze workbook views */
.clickable-row:hover td { background:rgba(71,139,60,.045); }
.eco-import-summary strong { color:#356f34; }
.eco-job-detail-hero > div:last-child strong { color:#356f34; }
.eco-job-financials > div { background:#1d3557; }

/* Customer proposal wordmark remains simple and brand-coloured. */
.proposal-doc.front .eco-proposal-wordmark, .paper-header .eco-proposal-wordmark { font-weight:800; letter-spacing:.03em; color:#244273; }
.proposal-doc.front .eco-proposal-wordmark b, .paper-header .eco-proposal-wordmark b { color:#478b3c; }

@media (max-width: 980px) {
  .topbar-workspace-mark { width:52px; height:42px; }
  .topbar-workspace-mark img { width:44px; height:36px; object-fit:cover; object-position:left center; }
}

/* v0.8.4 Eco Glaze calendar: month overview + timed week/day scheduler */
.calendar-view-switch { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(23,39,53,.04); }
.calendar-view-button { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 7px 12px; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.calendar-view-button:hover { color: var(--ink); background: #f3f7f5; }
.calendar-view-button.active { background: var(--primary); color: #fff; box-shadow: 0 2px 7px rgba(47,143,83,.18); }

.month-calendar { min-width: 950px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.page-content:has(.month-calendar), .page-content:has(.time-calendar) { overflow-x: auto; }
.month-weekdays { display: grid; grid-template-columns: repeat(7, minmax(130px,1fr)); min-width: 950px; border-bottom: 1px solid var(--border); background: #f6f9f7; }
.month-weekdays > div { padding: 9px 12px; color: #64736c; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; border-right: 1px solid var(--border); }
.month-weekdays > div:last-child { border-right: 0; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(130px,1fr)); min-width: 950px; }
.month-day { position: relative; min-height: 132px; padding: 7px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.month-day:nth-child(7n) { border-right: 0; }
.month-day:nth-last-child(-n+7) { border-bottom: 0; }
.month-day.outside { background: #f8faf9; }
.month-day.outside .month-day-number { color: #aab5af; }
.month-day.today { box-shadow: inset 0 3px 0 var(--primary); background: #fbfefc; }
.month-day > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; min-height: 27px; }
.month-day > header > span { min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: #eef4f0; color: #68766f; font-size: 8px; font-weight: 850; }
.month-day-number { width: 27px; height: 27px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font: inherit; font-size: 11px; font-weight: 850; cursor: pointer; }
.month-day-number:hover { background: var(--primary-soft); color: var(--primary); }
.month-day.today .month-day-number { background: var(--primary); color: #fff; }
.month-events { display: grid; gap: 4px; }
.month-event { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid #dce7e0; border-left: 3px solid var(--primary); border-radius: 6px; background: #f7fbf8; text-align: left; cursor: pointer; overflow: hidden; }
.month-event:hover { border-color: #b9d5c2; box-shadow: 0 2px 7px rgba(23,39,53,.07); }
.month-event.eco-survey { border-left-color: #2f6f9f; background: #f5f9fd; }
.month-event.task-event { border-left-color: #738089; background: #fafbfb; }
.month-event > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 8.8px; line-height: 1.25; }
.month-event > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--muted); font-size: 7.8px; }
.month-more { border: 0; background: transparent; padding: 2px 4px; color: var(--primary); text-align: left; font-size: 8px; font-weight: 800; cursor: pointer; }
.month-add { position: absolute; right: 5px; bottom: 4px; width: 23px; height: 23px; border: 0; border-radius: 6px; background: transparent; color: var(--primary); cursor: pointer; font-weight: 900; }
.month-add:hover { background: var(--primary-soft); }

.time-calendar { min-width: 1040px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.time-calendar.day-mode { min-width: 720px; }
.time-calendar-head-spacer { height: 34px; display: flex; align-items: center; padding: 0 9px; border-bottom: 1px solid var(--border); background: #f6f9f7; color: #78867f; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.time-calendar-head-spacer span { width: 70px; }
.time-day-head-placeholder { display: none; }
.time-calendar .time-axis { position: absolute; width: 70px; margin-top: 112px; z-index: 3; pointer-events: none; }
.time-calendar .time-axis span { position: absolute; right: 9px; transform: translateY(-50%); color: #839088; font-size: 8px; font-weight: 750; }
.time-days { display: grid; grid-template-columns: repeat(var(--calendar-day-count), minmax(130px,1fr)); margin-left: 70px; min-width: calc(var(--calendar-day-count) * 135px); }
.time-calendar.day-mode .time-days { grid-template-columns: 1fr; min-width: 0; }
.time-day-column { min-width: 0; border-left: 1px solid var(--border); background: #fff; }
.time-day-column.today { background: #fbfefc; }
.time-day-column > header { height: 78px; padding: 10px 11px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; background: #fff; position: sticky; top: 0; z-index: 4; }
.time-day-column.today > header { box-shadow: inset 0 3px 0 var(--primary); background: #fbfefc; }
.time-day-column > header span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.time-day-column > header strong { grid-row: 1 / span 2; grid-column: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); font-size: 14px; }
.time-day-column.today > header strong { background: var(--primary); color: #fff; }
.time-day-column > header small { color: var(--muted); font-size: 8px; }
.untimed-events { min-height: 34px; padding: 4px 5px; border-bottom: 1px solid var(--border); background: #fafcfb; display: grid; gap: 3px; align-content: start; }
.untimed-event { width: 100%; border: 1px solid #dbe5ea; border-left: 3px solid #2f6f9f; border-radius: 6px; background: #f5f9fd; padding: 5px 6px; text-align: left; cursor: pointer; }
.untimed-event strong, .untimed-event small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.untimed-event strong { color: var(--ink); font-size: 8.5px; }
.untimed-event small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.time-day-body { position: relative; height: calc(var(--calendar-hours) * var(--calendar-hour-height)); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--calendar-hour-height) - 1px), #e9efeb calc(var(--calendar-hour-height) - 1px), #e9efeb var(--calendar-hour-height)); }
.time-day-body::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc((var(--calendar-hour-height) / 2) - 1px), rgba(223,232,226,.55) calc((var(--calendar-hour-height) / 2) - 1px), rgba(223,232,226,.55) calc(var(--calendar-hour-height) / 2), transparent calc(var(--calendar-hour-height) / 2), transparent var(--calendar-hour-height)); }
.timed-calendar-event { position: absolute; z-index: 2; left: calc(5px + var(--event-nudge)); right: 5px; min-height: 30px; overflow: hidden; padding: 6px 7px; border: 1px solid #cfe0d5; border-left: 4px solid var(--primary); border-radius: 7px; background: rgba(241,249,244,.96); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 1px 3px rgba(23,39,53,.08); }
.timed-calendar-event:hover { z-index: 10; box-shadow: 0 4px 14px rgba(23,39,53,.14); }
.timed-calendar-event.eco-survey { border-color: #d6e4ee; border-left-color: #2f6f9f; background: rgba(245,249,253,.97); }
.timed-calendar-event.task-event { border-left-color: #75828b; background: rgba(250,251,251,.97); }
.timed-calendar-event > span { display: block; color: var(--primary); font-size: 8px; font-weight: 900; }
.timed-calendar-event.eco-survey > span { color: #2f6f9f; }
.timed-calendar-event > strong { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; line-height: 1.3; }
.timed-calendar-event > small { display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 7.7px; line-height: 1.25; }
.time-calendar.day-mode .timed-calendar-event > strong { font-size: 10px; }
.time-day-add { position: absolute; right: 6px; top: 5px; z-index: 3; width: 24px; height: 24px; border: 1px solid #d9e5dc; border-radius: 6px; background: #fff; color: var(--primary); font-weight: 900; cursor: pointer; }
.time-day-add:hover { background: var(--primary-soft); }
.schedule-help { padding: 10px 12px; border-radius: 8px; background: #f4f8f5; border: 1px solid #dfe9e2; color: #66746d; font-size: 10px; line-height: 1.5; }
.schedule-help strong { color: var(--ink); }

@media (max-width: 760px) {
  .calendar-nav { width: 100%; flex-wrap: wrap; }
  .calendar-view-switch { margin-left: auto; }
  .month-calendar { min-width: 760px; }
  .month-weekdays, .month-grid { min-width: 760px; grid-template-columns: repeat(7, minmax(108px,1fr)); }
  .time-calendar { min-width: 880px; }
  .time-calendar.day-mode { min-width: 620px; }
}
.time-calendar { position: relative; }
.time-calendar-head-spacer, .time-day-head-placeholder { display: none; }
.time-axis-label { position: absolute; left: 0; top: 78px; width: 70px; height: 34px; padding: 6px 8px; display: flex; align-items: center; justify-content: flex-end; text-align: right; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f6f9f7; color: #7b8881; font-size: 7px; font-weight: 800; line-height: 1.15; text-transform: uppercase; z-index: 3; }
.time-calendar .time-axis { top: 112px; margin-top: 0; }
.untimed-events { height: 34px; min-height: 34px; overflow: auto; }

/* v0.8.5 calendar: compact month/week/day views, no hourly timeline */
.page-content:has(.compact-calendar),
.page-content:has(.compact-week-calendar),
.page-content:has(.compact-day-agenda) { overflow-x: auto; }

.compact-calendar.month-calendar { min-width: 980px; border-radius: 16px; box-shadow: 0 10px 28px rgba(23,39,53,.06); }
.compact-calendar .month-weekdays { min-width: 980px; background: #f5f7f4; }
.compact-calendar .month-weekdays > div { text-align: center; padding: 10px 8px; font-size: 9px; letter-spacing: .08em; }
.compact-calendar .month-grid { min-width: 980px; }
.compact-calendar .month-day { min-height: 145px; padding: 9px 9px 31px; }
.compact-calendar .month-day > header { margin-bottom: 7px; }
.compact-calendar .month-day.outside { background: #fafbf9; }
.compact-calendar .month-day.today { background: #f7fbf5; box-shadow: inset 0 0 0 2px #8fb56d; }
.compact-calendar .month-day.today .month-day-number { background: #6e9f45; }
.compact-calendar .month-event { padding: 6px 7px; border-radius: 7px; background: #f4f8f0; border-color: #d9e4d1; border-left-width: 2px; }
.compact-calendar .month-event.eco-install { border-left-color: #4f8f48; }
.compact-calendar .month-event.eco-survey { border-left-color: #4d7899; background: #f3f7fa; border-color: #d7e1e8; }
.compact-calendar .month-event.task-event { border-left-color: #7b858e; background: #f7f8f8; }
.compact-calendar .month-event > strong { display:flex; gap:5px; align-items:center; font-size: 8.8px; }
.compact-calendar .month-event > small { font-size: 7.6px; }
.calendar-entry-time { flex: 0 0 auto; color: #527b3c; font-weight: 900; }
.compact-calendar .eco-survey .calendar-entry-time { color:#3f6f92; }
.compact-calendar .month-add { left: 9px; right: auto; bottom: 7px; width: auto; height: auto; padding: 2px 4px; font-size: 8px; border-radius: 4px; }

.compact-week-calendar { min-width: 980px; display:grid; grid-template-columns:repeat(7,minmax(138px,1fr)); border:1px solid var(--border); border-radius:16px; overflow:hidden; background:#fff; box-shadow:0 10px 28px rgba(23,39,53,.06); }
.compact-week-day { min-height: 470px; position:relative; padding:0 7px 34px; border-right:1px solid var(--border); background:#fff; }
.compact-week-day:last-child { border-right:0; }
.compact-week-day.today { background:#f8fbf6; box-shadow: inset 0 3px 0 #6e9f45; }
.compact-week-day > header { min-height:72px; padding:10px 5px 9px; display:flex; align-items:flex-start; justify-content:space-between; gap:8px; border-bottom:1px solid var(--border); }
.compact-week-day > header > div { display:flex; align-items:center; gap:8px; }
.compact-week-day > header span { color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; }
.compact-week-day > header strong { width:29px; height:29px; display:grid; place-items:center; border-radius:50%; font-size:13px; }
.compact-week-day.today > header strong { background:#6e9f45; color:#fff; }
.compact-week-day > header small { color:var(--muted); font-size:8px; padding-top:5px; }
.compact-day-events { display:grid; gap:7px; padding:8px 0; }
.compact-calendar-event { width:100%; text-align:left; border:1px solid #dbe5d6; border-left:3px solid #4f8f48; border-radius:8px; background:#f6f9f3; padding:8px 8px; cursor:pointer; }
.compact-calendar-event.eco-survey { border-color:#d8e2e9; border-left-color:#4d7899; background:#f4f8fb; }
.compact-calendar-event.task-event { border-left-color:#7b858e; background:#f8f9f9; }
.compact-calendar-event:hover { box-shadow:0 3px 10px rgba(23,39,53,.08); }
.compact-event-time { display:block; color:#5b8644; font-size:8px; font-weight:900; margin-bottom:3px; }
.compact-calendar-event.eco-survey .compact-event-time { color:#3f6f92; }
.compact-calendar-event strong { display:block; color:var(--ink); font-size:9px; line-height:1.3; }
.compact-calendar-event small { display:block; margin-top:3px; color:var(--muted); font-size:7.8px; line-height:1.3; }
.calendar-empty-day { padding:18px 5px; text-align:center; color:#a0aaa4; font-size:8px; }
.compact-day-add { position:absolute; left:10px; right:10px; bottom:8px; border:1px dashed #d4dfd0; border-radius:7px; background:transparent; color:#5b8644; padding:6px; font:inherit; font-size:8px; font-weight:800; cursor:pointer; }
.compact-day-add:hover { background:#f5f9f2; }

.compact-day-agenda { max-width:900px; margin:0 auto; border:1px solid var(--border); border-radius:16px; background:#fff; overflow:hidden; box-shadow:0 10px 28px rgba(23,39,53,.06); }
.compact-day-agenda-head { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 20px; border-bottom:1px solid var(--border); background:#f8faf7; }
.compact-day-agenda-head > div { display:flex; align-items:center; gap:12px; }
.compact-day-agenda-head span { color:var(--muted); font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.compact-day-agenda-head strong { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:#6e9f45; color:#fff; font-size:16px; }
.compact-day-agenda-head p { margin:0; color:var(--muted); font-size:10px; }
.compact-agenda-list { display:grid; gap:8px; padding:14px; }
.compact-agenda-event { width:100%; display:grid; grid-template-columns:94px 1fr; align-items:center; gap:14px; padding:12px 14px; border:1px solid #dbe5d6; border-left:4px solid #4f8f48; border-radius:10px; background:#f8fbf6; text-align:left; cursor:pointer; }
.compact-agenda-event.eco-survey { border-color:#d8e2e9; border-left-color:#4d7899; background:#f6f9fb; }
.compact-agenda-event.task-event { border-left-color:#7b858e; background:#fafafa; }
.compact-agenda-event:hover { box-shadow:0 4px 12px rgba(23,39,53,.08); }
.compact-agenda-time { color:#557d3f; font-size:10px; font-weight:900; }
.compact-agenda-event.eco-survey .compact-agenda-time { color:#3f6f92; }
.compact-agenda-event strong { display:block; color:var(--ink); font-size:11px; }
.compact-agenda-event small { display:block; margin-top:3px; color:var(--muted); font-size:9px; }
.calendar-empty-agenda { padding:28px; text-align:center; color:#929d97; font-size:10px; }
.compact-agenda-add { margin:0 14px 14px; }

@media (max-width: 760px) {
  .compact-calendar.month-calendar,
  .compact-calendar .month-weekdays,
  .compact-calendar .month-grid { min-width:760px; }
  .compact-week-calendar { min-width:840px; }
  .compact-day-agenda { min-width:0; }
  .compact-agenda-event { grid-template-columns:1fr; gap:5px; }
}

/* v0.8.6 new quote launcher */
.new-quote-launcher,
.template-quote-picker,
.ai-quote-staging { display:grid; gap:20px; }
.new-quote-intro { max-width:760px; }
.new-quote-intro h3 { margin:5px 0 7px; font-size:26px; line-height:1.08; color:var(--ink); }
.new-quote-intro p { margin:0; color:var(--muted); line-height:1.55; }
.new-quote-context { display:inline-flex; align-items:center; gap:8px; margin-top:12px; padding:7px 10px; border:1px solid #dbe6dd; border-radius:999px; background:#f6faf6; }
.new-quote-context span { color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.new-quote-context strong { color:var(--primary); font-size:10px; }
.new-quote-option-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.new-quote-option { min-height:156px; display:grid; grid-template-columns:48px 1fr; grid-template-rows:1fr auto; gap:10px 14px; padding:18px; border:1px solid #dfe6e1; border-radius:15px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.new-quote-option:hover { transform:translateY(-1px); border-color:#b9ceb9; box-shadow:0 10px 24px rgba(20,42,54,.08); }
.new-quote-option > span:nth-child(2) { min-width:0; }
.new-quote-option strong { display:block; margin-bottom:5px; font-size:14px; }
.new-quote-option small { display:block; color:var(--muted); font-size:10px; line-height:1.5; }
.new-quote-option b { grid-column:2; color:var(--primary); font-size:9px; font-weight:850; }
.new-quote-option-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:12px; flex:0 0 auto; }
.new-quote-option-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.new-quote-option-icon.green { color:#477f42; background:#edf6e9; }
.new-quote-option-icon.navy { color:#17354f; background:#edf2f6; }
.new-quote-option-icon.amber { color:#8a6728; background:#fbf4e6; }
.new-quote-option-icon.blue { color:#376b91; background:#edf5fa; }
.new-quote-local-note { padding:11px 13px; border:1px solid #dfe7e1; border-radius:10px; background:#f7faf8; color:#66736d; font-size:9.5px; line-height:1.55; }
.new-quote-local-note strong { color:var(--ink); }
.template-quote-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.template-quote-card { min-height:132px; display:grid; grid-template-columns:44px 1fr; gap:10px 13px; padding:16px; border:1px solid #dfe6e1; border-radius:14px; background:#fff; text-align:left; cursor:pointer; }
.template-quote-card:hover { border-color:#b9ceb9; box-shadow:0 8px 20px rgba(20,42,54,.07); }
.template-quote-card > div { min-width:0; }
.template-quote-card strong { display:block; color:var(--ink); font-size:13px; }
.template-quote-card p { margin:4px 0 0; color:var(--muted); font-size:9.5px; line-height:1.45; }
.template-quote-card small { display:block; margin-top:8px; padding-top:8px; border-top:1px solid #edf0ee; color:#7a8680; font-size:8.5px; line-height:1.45; }
.template-quote-card b { grid-column:2; color:var(--primary); font-size:9px; }
.template-quote-empty { grid-column:1 / -1; }
.ai-quote-dropzone { min-height:190px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:22px; border:1.5px dashed #c9d8cd; border-radius:15px; background:#fafcfb; text-align:center; cursor:pointer; }
.ai-quote-dropzone:hover { border-color:#91b48c; background:#f7faf5; }
.ai-quote-dropzone input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.ai-quote-dropzone strong { margin-top:3px; color:var(--ink); font-size:12px; }
.ai-quote-dropzone small { color:var(--muted); font-size:9px; }
.ai-quote-selection { display:grid; gap:3px; padding:11px 13px; border:1px solid #dce6df; border-radius:10px; background:#f8fbf8; }
.ai-quote-selection strong { color:var(--ink); font-size:10px; }
.ai-quote-selection span { color:#42514a; font-size:9px; overflow-wrap:anywhere; }
.ai-quote-selection small { color:var(--muted); font-size:8.5px; }
.ai-model-pending { display:grid; grid-template-columns:38px 1fr; gap:12px; padding:14px; border:1px solid #e4e7e5; border-radius:12px; background:#f7f8f8; }
.ai-model-pending > span { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:#17354f; color:#fff; font-size:10px; font-weight:900; letter-spacing:.04em; }
.ai-model-pending strong { display:block; color:var(--ink); font-size:11px; }
.ai-model-pending p { margin:3px 0 0; color:var(--muted); font-size:9px; line-height:1.5; }

@media (max-width:760px) {
  .new-quote-option-grid,
  .template-quote-grid { grid-template-columns:1fr; }
}

/* Eco Glaze window & door quote editor — v0.8.7 */
.glazing-quote-modal { width: min(1540px, calc(100vw - 24px)) !important; max-height: calc(100vh - 24px) !important; border-radius: 18px !important; overflow: hidden !important; }
.glazing-quote-modal > .modal-head,
.glazing-quote-modal > .modal-foot { display: none !important; }
.glazing-quote-modal > .modal-body { padding: 0 !important; height: calc(100vh - 24px); overflow: hidden; }
#glazing-quote-editor, .glazing-editor-shell { height: 100%; min-height: 0; }
.glazing-editor-shell { background: #f5f7f5; display: grid; grid-template-rows: auto minmax(0,1fr); }
.glazing-editor-topbar { min-height: 76px; display: grid; grid-template-columns: minmax(240px,1fr) auto minmax(240px,1fr); align-items: center; gap: 18px; padding: 0 20px; background: #fff; border-bottom: 1px solid #e1e7df; }
.glazing-editor-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.glazing-editor-title > button { width: 38px; height: 38px; border: 1px solid #dfe5dd; border-radius: 10px; background: #fff; color: #3f4c43; font-size: 24px; line-height: 1; }
.glazing-editor-title > div { min-width: 0; display: grid; gap: 2px; }
.glazing-editor-title span { color: #7b877d; font-size: 10px; font-weight: 850; letter-spacing: .11em; }
.glazing-editor-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; color: #16211a; }
.glazing-editor-tabs { display: flex; align-self: stretch; gap: 4px; }
.glazing-editor-tabs button { position: relative; border: 0; background: transparent; padding: 0 17px; color: #68736a; font-size: 13px; font-weight: 760; }
.glazing-editor-tabs button:hover { color: #2f6e34; }
.glazing-editor-tabs button.active { color: #234f28; }
.glazing-editor-tabs button.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #4a8c3d; }
.glazing-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.glazing-editor-actions .btn { padding: 9px 13px; font-size: 12px; }
.glazing-editor-workspace { min-height: 0; display: grid; grid-template-columns: minmax(620px, 1.25fr) minmax(420px, .75fr); overflow: hidden; }
.glazing-editor-panel { min-width: 0; min-height: 0; overflow: auto; padding: 22px; }
.glazing-preview-column { min-width: 0; min-height: 0; overflow: auto; padding: 18px 22px 28px; background: #eef2ed; border-left: 1px solid #dde5dc; }
.glazing-preview-toolbar { width: min(100%, 640px); margin: 0 auto 10px; display: flex; justify-content: space-between; gap: 16px; align-items: center; color: #667267; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.glazing-preview-toolbar strong { letter-spacing: normal; font-size: 11px; color: #516057; }
.glazing-panel-card { max-width: 930px; margin: 0 auto; padding: 24px; background: #fff; border: 1px solid #e1e7df; border-radius: 15px; box-shadow: 0 8px 24px rgba(32,57,35,.045); }
.glazing-panel-card + .glazing-panel-card { margin-top: 16px; }
.glazing-panel-heading { margin-bottom: 22px; }
.glazing-panel-heading.compact { margin-bottom: 16px; }
.glazing-panel-heading.inline { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.glazing-panel-heading > span,
.glazing-panel-heading > div > span { display: block; margin-bottom: 5px; color: #4a8c3d; font-size: 10px; line-height: 1; font-weight: 900; letter-spacing: .12em; }
.glazing-panel-heading h2 { margin: 0; color: #142017; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.glazing-panel-heading p { margin: 7px 0 0; color: #738077; font-size: 12px; line-height: 1.5; }
.glazing-mode-toggle { display: inline-flex; padding: 3px; margin-bottom: 18px; border: 1px solid #dfe6dd; border-radius: 10px; background: #f6f8f5; }
.glazing-mode-toggle button { border: 0; border-radius: 7px; padding: 8px 12px; background: transparent; color: #647066; font-size: 12px; font-weight: 760; }
.glazing-mode-toggle button.active { background: #fff; color: #295f30; box-shadow: 0 1px 4px rgba(28,51,30,.11); }
.glazing-form-grid,
.glazing-opening-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.glazing-form-grid label,
.glazing-opening-grid label,
.glazing-spec-field { display: grid; gap: 6px; min-width: 0; color: #4e5a51; font-size: 11px; font-weight: 780; }
.glazing-form-grid .span-2,
.glazing-opening-grid .span-2 { grid-column: 1 / -1; }
.glazing-form-grid label > span,
.glazing-opening-grid label > span,
.glazing-spec-field > span { display: flex; align-items: baseline; gap: 5px; }
.glazing-form-grid label small,
.glazing-opening-grid label small { color: #8b958d; font-size: 9px; font-weight: 700; }
.glazing-form-grid input,
.glazing-form-grid select,
.glazing-form-grid textarea,
.glazing-opening-grid input,
.glazing-opening-grid select,
.glazing-spec-field input { border-color: #dce4da; border-radius: 9px; background: #fff; font-size: 12px; }
.glazing-form-grid textarea { min-height: 76px; }
.glazing-pricing-shell { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 14px; align-items: start; }
.glazing-spec-sidebar { position: sticky; top: 0; padding: 8px; border: 1px solid #e0e7df; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(32,57,35,.035); display: grid; gap: 4px; }
.glazing-spec-sidebar button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; color: #526056; text-align: left; font-size: 12px; font-weight: 760; }
.glazing-spec-sidebar button b { color: #9aa59c; font-size: 17px; font-weight: 500; }
.glazing-spec-sidebar button:hover { background: #f3f7f2; color: #315f35; }
.glazing-spec-sidebar button.active { background: #eaf4e7; color: #2f6e34; }
.glazing-spec-sidebar button.active b { color: #4a8c3d; }
.glazing-pricing-main { min-width: 0; }
.glazing-default-spec { max-width: none; margin: 0; padding: 20px; }
.glazing-openings-section { max-width: none; margin: 14px 0 0 !important; padding: 20px; }
.glazing-add-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.glazing-add-actions .btn { padding: 8px 10px; font-size: 11px; }
.glazing-opening-list { display: grid; gap: 12px; }
.glazing-opening-card { border: 1px solid #e0e7de; border-radius: 12px; background: #fbfcfb; overflow: hidden; }
.glazing-opening-head { padding: 13px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid #e6ebe5; background: #fff; }
.glazing-opening-head > div { min-width: 0; }
.glazing-opening-head span { display: block; margin-bottom: 2px; color: #4a8c3d; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.glazing-opening-head h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d2920; font-size: 14px; }
.glazing-opening-head > button { width: 28px; height: 28px; border: 1px solid #e2e6e1; border-radius: 8px; background: #fff; color: #8b948c; font-size: 18px; }
.glazing-opening-head > button:hover { color: #b33b3b; border-color: #efcaca; background: #fff6f6; }
.glazing-opening-grid { padding: 14px; gap: 10px 12px; }
.glazing-opening-specs { margin: 0 14px 14px; border: 1px solid #e2e8e1; border-radius: 10px; background: #fff; }
.glazing-opening-specs summary { padding: 10px 12px; cursor: pointer; color: #425048; font-size: 11px; font-weight: 800; }
.glazing-opening-specs[open] summary { border-bottom: 1px solid #e6ebe5; }
.glazing-opening-specs .glazing-opening-grid { padding-top: 12px; }
.glazing-money-input { display: grid; grid-template-columns: 31px 1fr; align-items: stretch; }
.glazing-money-input b { display: grid; place-items: center; border: 1px solid #dce4da; border-right: 0; border-radius: 9px 0 0 9px; background: #f4f7f3; color: #68746b; font-size: 12px; }
.glazing-money-input input { border-radius: 0 9px 9px 0 !important; }
.glazing-empty-openings { padding: 34px 20px; border: 1px dashed #ced9cc; border-radius: 12px; text-align: center; color: #637066; background: #fafcf9; }
.glazing-empty-openings strong { display: block; color: #33413a; font-size: 14px; }
.glazing-empty-openings p { max-width: 500px; margin: 7px auto 15px; font-size: 12px; line-height: 1.55; }
.glazing-empty-openings > div { display: flex; justify-content: center; gap: 8px; }
.glazing-commercial-summary { margin-top: 20px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.glazing-commercial-summary > div { min-width: 0; padding: 14px; border: 1px solid #e0e6df; border-radius: 11px; background: #f9faf9; display: grid; gap: 3px; }
.glazing-commercial-summary > div.primary { border-color: #cfe1cc; background: #eef6ec; }
.glazing-commercial-summary span { color: #78837b; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.glazing-commercial-summary strong { color: #1b2820; font-size: 16px; }
.glazing-commercial-summary small { color: #7d887f; font-size: 9px; }
.glazing-structure-list { display: grid; gap: 9px; }
.glazing-structure-list label { padding: 13px; border: 1px solid #e0e7df; border-radius: 11px; background: #fbfcfb; display: grid; grid-template-columns: 18px 1fr; gap: 11px; align-items: start; cursor: pointer; }
.glazing-structure-list input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #4a8c3d; }
.glazing-structure-list span { display: grid; gap: 2px; }
.glazing-structure-list strong { color: #26332a; font-size: 12px; }
.glazing-structure-list small { color: #7b877e; font-size: 10px; line-height: 1.45; }
.glazing-structure-callout { margin-top: 18px; padding: 15px; border-radius: 11px; background: #edf4eb; color: #3a5e3d; }
.glazing-structure-callout strong { font-size: 12px; }
.glazing-structure-callout p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; }
.glazing-preview-paper { width: min(100%, 640px); min-height: 780px; margin: 0 auto; padding: 32px 34px 26px; background: #fff; border: 1px solid #dfe5dd; border-radius: 3px; box-shadow: 0 12px 32px rgba(29,49,31,.09); color: #17231a; }
.glazing-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 17px; border-bottom: 2px solid #4a8c3d; }
.glazing-preview-head img { width: 150px; max-height: 50px; object-fit: contain; object-position: left center; }
.glazing-preview-head > div { display: grid; justify-items: end; gap: 2px; text-align: right; }
.glazing-preview-head span { color: #809083; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.glazing-preview-head strong { color: #233029; font-size: 11px; }
.glazing-preview-title { padding: 22px 0 18px; }
.glazing-preview-title span { color: #4a8c3d; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.glazing-preview-title h2 { margin: 5px 0 0; color: #152019; font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.glazing-preview-customer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 13px 0 17px; border-top: 1px solid #e7ebe6; border-bottom: 1px solid #e7ebe6; }
.glazing-preview-customer > div { min-width: 0; display: grid; gap: 3px; }
.glazing-preview-customer > div:last-child { text-align: right; }
.glazing-preview-customer small { color: #839087; font-size: 8px; font-weight: 850; letter-spacing: .09em; }
.glazing-preview-customer strong { color: #233029; font-size: 11px; }
.glazing-preview-customer span { color: #6f7b72; font-size: 9px; line-height: 1.4; }
.glazing-preview-lines { margin-top: 16px; display: grid; }
.glazing-preview-line { display: grid; grid-template-columns: minmax(0,1fr) 34px 88px; gap: 9px; align-items: start; padding: 12px 0; border-bottom: 1px solid #ebeeea; }
.glazing-preview-line > div { min-width: 0; display: grid; gap: 2px; }
.glazing-preview-line strong { color: #263229; font-size: 10px; }
.glazing-preview-line small { color: #768278; font-size: 8px; }
.glazing-preview-line p { margin: 3px 0 0; color: #68746b; font-size: 8px; line-height: 1.45; }
.glazing-preview-line > span { color: #7a867d; font-size: 9px; text-align: center; }
.glazing-preview-line > b { color: #243128; font-size: 10px; text-align: right; }
.glazing-preview-empty { padding: 44px 15px; text-align: center; color: #909a92; font-size: 10px; border-bottom: 1px solid #ebeeea; }
.glazing-preview-totals { width: min(285px, 65%); margin: 16px 0 0 auto; }
.glazing-preview-totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; color: #606d63; font-size: 9px; }
.glazing-preview-totals > div.total { margin-top: 5px; padding-top: 9px; border-top: 1px solid #ced7cd; color: #244d29; font-size: 12px; }
.glazing-preview-note { margin-top: 18px; padding: 12px; border-left: 3px solid #4a8c3d; background: #f5f8f4; }
.glazing-preview-note.muted-note { border-left-color: #9aa69c; background: #fafbfa; }
.glazing-preview-note small { color: #617063; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.glazing-preview-note p { margin: 5px 0 0; color: #5c6860; font-size: 8.5px; line-height: 1.55; white-space: pre-line; }
.glazing-preview-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid #e2e7e1; display: flex; justify-content: space-between; color: #89948b; font-size: 8px; }

@media (max-width: 1180px) {
  .glazing-editor-topbar { grid-template-columns: 1fr auto; }
  .glazing-editor-tabs { grid-row: 2; grid-column: 1 / -1; min-height: 46px; justify-content: center; border-top: 1px solid #eef1ed; }
  .glazing-editor-workspace { grid-template-columns: minmax(560px,1fr) minmax(360px,.7fr); }
  .glazing-commercial-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .glazing-quote-modal { width: 100vw !important; max-height: 100vh !important; border-radius: 0 !important; }
  .glazing-quote-modal > .modal-body { height: 100vh; }
  .glazing-editor-topbar { padding: 10px 12px 0; grid-template-columns: 1fr; gap: 8px; }
  .glazing-editor-actions { justify-content: stretch; }
  .glazing-editor-actions .btn { flex: 1; }
  .glazing-editor-tabs { grid-row: auto; grid-column: auto; overflow-x: auto; justify-content: flex-start; }
  .glazing-editor-tabs button { min-height: 42px; }
  .glazing-editor-workspace { display: block; overflow: auto; }
  .glazing-editor-panel { overflow: visible; padding: 14px; }
  .glazing-preview-column { border-left: 0; border-top: 1px solid #dde5dc; overflow: visible; }
  .glazing-pricing-shell { grid-template-columns: 1fr; }
  .glazing-spec-sidebar { position: static; grid-template-columns: repeat(5, max-content); overflow-x: auto; }
  .glazing-spec-sidebar button { min-height: 38px; }
  .glazing-preview-paper { min-height: 0; }
}
@media (max-width: 620px) {
  .glazing-form-grid, .glazing-opening-grid { grid-template-columns: 1fr; }
  .glazing-form-grid .span-2, .glazing-opening-grid .span-2 { grid-column: auto; }
  .glazing-panel-card { padding: 17px; }
  .glazing-panel-heading.inline { display: block; }
  .glazing-add-actions { margin-top: 12px; justify-content: flex-start; }
  .glazing-commercial-summary { grid-template-columns: 1fr; }
  .glazing-preview-paper { padding: 22px 20px; }
}

/* Eco Glaze v0.8.9: flexible cill depth control */
.windowcad-cill-block{margin-top:16px;border-top:1px solid #edf1ef;padding-top:15px}.windowcad-cill-label{display:flex;flex-direction:column;gap:4px;color:#64716c;text-transform:uppercase;letter-spacing:.04em;font-size:10px;font-weight:800}.windowcad-cill-label small{font-size:10px;line-height:1.45;font-weight:500;text-transform:none;letter-spacing:0;color:#84908b}.windowcad-cill-adjust{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;align-items:center;margin-top:10px}.windowcad-cill-adjust>button{height:44px;border:1px solid #d9e1dd;border-radius:10px;background:#fff;color:#257744;font-size:22px;font-weight:700;cursor:pointer}.windowcad-cill-adjust>button:hover{border-color:#7fbd94;background:#f3f9f5}.windowcad-cill-input-wrap{position:relative}.windowcad-cill-input-wrap input{width:100%;height:44px;border:1px solid #d9e1dd;border-radius:10px;padding:10px 46px 10px 12px;background:#fff;color:#172735;font:inherit;font-size:16px;font-weight:700}.windowcad-cill-input-wrap input:focus{outline:none;border-color:#2f8f53;box-shadow:0 0 0 3px rgba(47,143,83,.11)}.windowcad-cill-input-wrap span{position:absolute;right:13px;top:50%;transform:translateY(-50%);font-size:11px;font-weight:800;color:#7b8882;pointer-events:none}.windowcad-cill-presets{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.windowcad-cill-presets button{border:1px solid #dfe6e2;border-radius:999px;background:#fff;padding:6px 10px;color:#5f6d67;font:inherit;font-size:11px;font-weight:700;cursor:pointer}.windowcad-cill-presets button:hover{border-color:#9fcbb0;background:#f8fbf9}.windowcad-cill-presets button.active{border-color:#2f8f53;background:#eff8f2;color:#246e40}.windowcad-cill-input-wrap input::-webkit-outer-spin-button,.windowcad-cill-input-wrap input::-webkit-inner-spin-button{opacity:1}

/* v0.8.10 — flexible opening/draw controls */
.windowcad-layout-mode{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0 0 14px;padding:4px;background:#f1f5f2;border:1px solid #e2e8e4;border-radius:12px}.windowcad-layout-mode button{border:0;border-radius:9px;background:transparent;padding:10px 12px;color:#64716c;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.windowcad-layout-mode button.active{background:#fff;color:#247744;box-shadow:0 2px 8px rgba(23,39,53,.08)}
.windowcad-operation-row{grid-template-columns:1fr}.windowcad-view-row{grid-template-columns:1fr;margin-top:9px}.windowcad-orientation-note{margin-top:10px;padding:10px 11px;border:1px solid #dce9e0;background:#f4faf6;border-radius:10px;display:flex;flex-direction:column;gap:3px}.windowcad-orientation-note strong{font-size:10px;color:#296f45}.windowcad-orientation-note span{font-size:10px;line-height:1.4;color:#6f7d77}
.windowcad-draw-workspace{display:flex;flex-direction:column;gap:12px}.windowcad-draw-help{display:flex;flex-direction:column;gap:3px}.windowcad-draw-help strong{font-size:12px;color:#172735}.windowcad-draw-help span{font-size:10px;line-height:1.45;color:#7a8882}.windowcad-draw-canvas{position:relative;height:220px;border:8px solid #263830;border-radius:8px;background:#dfeef4;overflow:hidden;box-shadow:inset 0 0 0 2px #fff}.windowcad-draw-pane{position:absolute;border:3px solid #263830;background:rgba(239,248,242,.58);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;color:#21362b;cursor:pointer;min-width:0;min-height:0}.windowcad-draw-pane:hover{background:rgba(231,247,237,.82)}.windowcad-draw-pane.active{z-index:2;background:rgba(215,243,226,.92);box-shadow:inset 0 0 0 3px #36a05d}.windowcad-draw-pane b{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#2f8f53;font-size:10px;box-shadow:0 1px 4px rgba(0,0,0,.08)}.windowcad-draw-pane span{max-width:92%;font-size:9px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.windowcad-draw-selected{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border:1px solid #e0e7e3;border-radius:10px;background:#fafcfb}.windowcad-draw-selected span{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#7d8984}.windowcad-draw-selected strong{font-size:11px;color:#172735;text-align:right}
.windowcad-split-control{border:1px solid #e0e7e3;border-radius:12px;padding:11px;background:#fff}.windowcad-split-control label>span,.windowcad-operation-section>span{display:block;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#64716c;margin-bottom:7px}.windowcad-split-control label>div{display:grid;grid-template-columns:1fr 46px;gap:10px;align-items:center}.windowcad-split-control input[type=range]{width:100%;accent-color:#2f8f53}.windowcad-split-control b{font-size:12px;color:#2f8f53;text-align:right}.windowcad-split-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.windowcad-split-actions button,.windowcad-draw-actions button{border:1px solid #cfdcd4;border-radius:9px;background:#fff;padding:9px 8px;color:#2e4638;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.windowcad-split-actions button:hover,.windowcad-draw-actions button:hover{border-color:#76b98d;background:#f3f9f5}.windowcad-draw-actions{display:flex;gap:7px;justify-content:flex-end}.windowcad-draw-actions button:disabled{opacity:.45;cursor:not-allowed}
.windowcad-operation-section{border-top:1px solid #edf1ef;padding-top:12px}.windowcad-operation-section p{margin:-2px 0 9px;color:#819089;font-size:10px;line-height:1.4}.windowcad-operation-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.windowcad-operation-card{border:1px solid #dfe6e2;border-radius:10px;background:#fff;padding:8px 9px;display:flex;flex-direction:column;gap:2px;align-items:flex-start;text-align:left;color:#34443d;cursor:pointer}.windowcad-operation-card:hover{border-color:#9fcbb0;background:#f8fbf9}.windowcad-operation-card.active{border:2px solid #2f8f53;background:#eff8f2;padding:7px 8px}.windowcad-operation-card strong{font-size:10px}.windowcad-operation-card small{font-size:8px;color:#7b8882;line-height:1.25}.windowcad-preview-stage [data-wcad-preview-pane]{cursor:pointer}
.windowcad-visual-caption{flex-wrap:wrap}.windowcad-visual-caption span:first-of-type{color:#2c7748;font-weight:700}
@media(max-width:900px){.windowcad-draw-canvas{height:190px}.windowcad-operation-grid{grid-template-columns:1fr 1fr}.windowcad-split-actions{grid-template-columns:1fr}.windowcad-operation-card small{display:none}}
@media(max-width:520px){.windowcad-draw-canvas{height:170px}.windowcad-operation-grid{grid-template-columns:1fr 1fr}.windowcad-operation-card{padding:7px}.windowcad-operation-card.active{padding:6px}.windowcad-layout-mode button{padding:9px 7px;font-size:11px}}

/* Eco Glaze v0.8.11: richer opening mechanics, proportional dimensioning and local 3D preview */
.windowcad-preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:2px 0 10px;flex-wrap:wrap}.windowcad-view-switch{display:inline-flex;border:1px solid #dbe3df;background:#fff;border-radius:10px;padding:3px}.windowcad-view-switch button{border:0;background:transparent;color:#66736d;font:inherit;font-size:11px;font-weight:800;padding:7px 11px;border-radius:7px;cursor:pointer}.windowcad-view-switch button.active{background:#eaf5ed;color:#247343}.windowcad-zoom-controls{display:flex;align-items:center;gap:6px}.windowcad-zoom-controls button{height:31px;min-width:31px;border:1px solid #dbe3df;border-radius:8px;background:#fff;color:#29423a;font:inherit;font-weight:800;cursor:pointer}.windowcad-zoom-controls span{min-width:44px;text-align:center;font-size:11px;font-weight:800;color:#65716c}.windowcad-angle-control{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 11px;border:1px solid #e1e7e4;background:#fafcfb;border-radius:10px;margin-bottom:9px}.windowcad-angle-control label{display:grid;grid-template-columns:auto minmax(110px,1fr) 38px;align-items:center;gap:10px;width:100%}.windowcad-angle-control label span{font-size:10px;font-weight:800;color:#64716b;text-transform:uppercase;letter-spacing:.04em}.windowcad-angle-control input{accent-color:#2f8f53}.windowcad-angle-control b{font-size:11px;color:#247343}.windowcad-angle-control button{white-space:nowrap;border:1px solid #d8e1dd;background:#fff;border-radius:8px;padding:7px 10px;font:inherit;font-size:10px;font-weight:800;color:#51615a;cursor:pointer}.windowcad-preview-viewport{min-height:430px;display:flex;align-items:center;justify-content:center;overflow:auto;padding:10px 8px 12px;perspective:1100px;background:linear-gradient(180deg,#fafcfb 0%,#f2f6f3 100%);border:1px solid #e4ebe7;border-radius:14px}.windowcad-preview-viewport>#wcad-preview-model{transition:transform .16s ease;transform-origin:center center;max-width:100%}.windowcad-scale-readout{display:flex;justify-content:center;align-items:baseline;gap:9px;color:#718079;font-size:10px;margin:6px 0 10px}.windowcad-scale-readout strong{color:#2f4a40;font-size:11px}.windowcad-tech-readout{width:min(700px,100%);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 10px}.windowcad-tech-readout span{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid #e1e7e4;border-radius:10px;background:#fbfcfb;color:#6d7b75;font-size:10px;box-shadow:0 1px 2px rgba(18,32,26,.03)}.windowcad-tech-readout strong{font-size:9px;letter-spacing:.05em;text-transform:uppercase;color:#2e4f44}.windowcad-pane-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px;padding-top:12px;border-top:1px solid #e5ebe8}.windowcad-pane-detail-grid label{display:flex;flex-direction:column;gap:6px;font-size:10px;font-weight:800;color:#68756f;text-transform:uppercase;letter-spacing:.03em}.windowcad-pane-detail-grid select{height:40px;border:1px solid #d8e1dd;border-radius:9px;background:#fff;padding:0 10px;color:#1b2c37;font:inherit;font-weight:700}.windowcad-draw-selected small{display:block;color:#81908a;font-size:10px;font-weight:600;margin-top:3px}.windowcad-field-note{display:block;color:#7c8984;font-size:10px;line-height:1.45;margin-top:7px}.windowcad-dimension-note{margin-top:14px;padding:11px 12px;border-radius:10px;background:#eff7f1;border:1px solid #d6eadc;display:flex;flex-direction:column;gap:4px}.windowcad-dimension-note strong{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#287647}.windowcad-dimension-note span{font-size:11px;line-height:1.45;color:#607069}.windowcad-bar-grid{margin-top:14px}.windowcad-visual{display:flex;flex-direction:column;gap:10px}.windowcad-visual svg{display:block;max-width:100%;height:auto;filter:drop-shadow(0 10px 18px rgba(16,34,27,.05))}.windowcad-visual-caption{display:flex;gap:8px 12px;align-items:center;justify-content:center;flex-wrap:wrap;padding:8px 12px;border:1px solid #e2e9e5;border-radius:12px;background:#fbfcfb;color:#6c7a73;font-size:10px}.windowcad-visual-caption strong{color:#20342d;font-size:11px}.windowcad-visual-caption span{white-space:nowrap}

.windowcad-3d-view{width:min(700px,100%);display:flex;flex-direction:column;align-items:center}.windowcad-3d-scene{position:relative;width:min(690px,100%);height:420px;perspective:1180px;cursor:grab;touch-action:none;user-select:none;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#f9fbfa 0%,#f1f5f2 100%);border:1px solid #dce5e0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 10px 26px rgba(17,35,28,.05)}.windowcad-3d-scene.dragging{cursor:grabbing}.windowcad-3d-sheet-frame{position:absolute;inset:18px;border:1px solid #dfe7e3;border-radius:6px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(251,252,251,.95));box-shadow:inset 0 0 0 10px rgba(255,255,255,.56),inset 0 1px 0 rgba(255,255,255,.9)}.windowcad-3d-grid{position:absolute;inset:60% -10% -25%;transform:rotateX(74deg);transform-origin:center top;background-image:linear-gradient(rgba(80,98,89,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(80,98,89,.05) 1px,transparent 1px);background-size:22px 22px;opacity:.55}.windowcad-3d-dim{position:absolute;color:#596861;font-size:10px;font-weight:700;letter-spacing:.01em}.windowcad-3d-dim span{display:inline-flex;align-items:center;gap:6px;padding:2px 7px;border-radius:999px;background:rgba(255,255,255,.9);border:1px solid #d8e0dc}.windowcad-3d-dim.width{left:50%;top:24px;transform:translateX(-50%)}.windowcad-3d-dim.height{right:22px;top:50%;transform:translateY(-50%) rotate(90deg);transform-origin:center}.windowcad-3d-dim.depth{left:50%;bottom:18px;transform:translateX(-50%)}.windowcad-3d-model{position:absolute;left:50%;top:49%;width:var(--model-w);height:var(--model-h);transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(var(--rx)) rotateY(var(--ry));transition:transform .08s linear}.windowcad-3d-shadow{position:absolute;left:-30px;right:-30px;top:-16px;bottom:-30px;background:radial-gradient(ellipse at center,rgba(29,46,39,.17) 0%,rgba(29,46,39,.08) 38%,rgba(29,46,39,0) 70%);filter:blur(10px);transform:translateZ(-36px) translateY(58px) rotateX(90deg)}.windowcad-3d-outer{position:absolute;inset:calc(var(--frame-depth) * -1);border:var(--frame-depth) solid var(--frame);border-radius:2px;box-shadow:0 22px 34px rgba(33,53,45,.10), inset 0 0 0 1px rgba(255,255,255,.32);transform:translateZ(-10px);background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.03))}.windowcad-3d-inner{position:absolute;inset:0;transform-style:preserve-3d}.windowcad-3d-pane{position:absolute;box-sizing:border-box;border:var(--sash-depth) solid var(--frame);transform-style:preserve-3d;transition:transform .25s ease;z-index:2;box-shadow:0 4px 10px rgba(19,30,25,.05), inset 0 0 0 1px rgba(255,255,255,.35)}.windowcad-3d-glass{position:absolute;inset:0;background:linear-gradient(180deg,color-mix(in srgb,var(--glass) 78%,white) 0%,color-mix(in srgb,var(--glass) 92%,transparent) 100%);border:2px solid rgba(255,255,255,.8);box-shadow:inset 0 0 18px rgba(255,255,255,.26);overflow:hidden}.windowcad-3d-glass:before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.26) 0%,rgba(255,255,255,0) 36%,rgba(255,255,255,.14) 100%)}.windowcad-3d-pane>span{position:absolute;left:50%;bottom:5px;transform:translateX(-50%) translateZ(3px);padding:2px 5px;border-radius:4px;background:rgba(255,255,255,.84);color:#18352a;font-size:8px;font-weight:800;white-space:nowrap}.windowcad-3d-handle{position:absolute;width:34px;height:34px;display:flex;align-items:center;justify-content:center;z-index:9;pointer-events:none}.windowcad-3d-handle svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 2px rgba(17,28,24,.18))}.wcad3d-bar{position:absolute;display:block;background:var(--frame);z-index:2}.wcad3d-bar.vertical{top:0;bottom:0;transform:translateX(-50%)}.wcad3d-bar.horizontal{left:0;right:0;transform:translateY(-50%)}.windowcad-3d-cill{position:absolute;left:-21px;right:-21px;height:13px;bottom:-29px;background:var(--frame);transform-origin:center top;transform:translateZ(calc(var(--cill-depth) * .45)) rotateX(72deg);box-shadow:0 5px 8px rgba(26,42,36,.18)}.windowcad-3d-note{display:flex;gap:8px;align-items:baseline;margin-top:10px;color:#708078;font-size:10px;flex-wrap:wrap;justify-content:center}.windowcad-3d-note strong{color:#2d6544}.windowcad-preview-content .windowcad-visual{max-width:700px;margin-inline:auto}

@media (max-width:900px){.windowcad-preview-viewport{min-height:360px}.windowcad-3d-scene{height:340px}.windowcad-pane-detail-grid{grid-template-columns:1fr}.windowcad-angle-control{align-items:stretch;flex-direction:column}.windowcad-angle-control label{grid-template-columns:1fr}.windowcad-scale-readout{flex-direction:column;align-items:center;gap:2px}.windowcad-tech-readout{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Eco Glaze v0.8.12: centre-joint mechanics + true inside/outside viewing */
.windowcad-joint-section{margin-top:14px;padding:13px;border:1px solid #dfe7e3;border-radius:12px;background:#fbfcfb}.windowcad-joint-heading{margin-bottom:9px}.windowcad-joint-heading>span{display:block;font-size:10px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#287647}.windowcad-joint-heading p{margin:4px 0 0;color:#74817c;font-size:11px;line-height:1.45}.windowcad-joint-section .windowcad-control-row{margin-top:9px}.windowcad-joint-note{margin-top:10px;padding:9px 10px;border-radius:9px;background:#eff7f1;border:1px solid #d6eadc;color:#5c6d65;font-size:10px;line-height:1.45}.windowcad-joint-note strong{color:#287647}.wcad3d-fixed-mullion{position:absolute;width:var(--joint-width);margin-left:calc(var(--joint-width) / -2);background:var(--frame);transform:translateZ(4px);z-index:8;box-shadow:0 1px 4px rgba(20,35,29,.16);pointer-events:none}.wcad3d-flying-mullion{position:absolute;top:-6px;bottom:-6px;width:11px;background:var(--frame);z-index:8;box-shadow:0 1px 4px rgba(20,35,29,.13);pointer-events:none}.wcad3d-flying-mullion.left{left:-7px}.wcad3d-flying-mullion.right{right:-7px}.wcad3d-master-leaf{position:absolute;right:5px;top:5px;z-index:10;padding:2px 4px;border-radius:4px;background:rgba(47,143,83,.88);color:#fff;font-size:7px;font-weight:900;font-style:normal;letter-spacing:.04em;transform:translateZ(4px)}.windowcad-3d-view-badge{position:absolute;left:0;top:-42px;padding:5px 8px;border-radius:7px;background:#eef7f0;border:1px solid #d3e7d8;color:#287647;font-size:8px;font-weight:900;letter-spacing:.05em;white-space:nowrap;transform:translateZ(3px)}


/* v0.8.14 reporting period controls */
.report-period-bar {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  margin:0 0 16px; padding:12px 14px; border:1px solid #dfe7e2; border-radius:14px;
  background:#fbfdfb;
}
.report-period-copy { display:flex; flex-direction:column; gap:2px; min-width:220px; }
.report-period-copy > span { font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:#658071; }
.report-period-copy > strong { font-size:15px; color:#132a3d; }
.report-period-copy > small { color:#77847d; line-height:1.35; }
.report-period-controls { display:flex; align-items:end; gap:9px; flex-wrap:wrap; justify-content:flex-end; }
.report-period-controls select,
.report-period-controls input { min-height:40px; border:1px solid #d7e1db; border-radius:10px; background:white; padding:8px 10px; font:inherit; color:#17263a; }
.report-period-controls select { min-width:150px; }
.report-period-controls label { display:flex; flex-direction:column; gap:4px; font-size:10px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#65796d; }
@media (max-width: 820px) {
  .report-period-bar { align-items:stretch; flex-direction:column; }
  .report-period-controls { justify-content:flex-start; }
  .report-period-controls select { width:100%; }
}

/* v0.8.15 — professional quote start + genuine reusable glazing templates */
.professional-quote-start { min-height:100%; padding-top:8px; }
.quote-start-shell { max-width:1180px; }
.quote-start-progress { margin-top:8px; }
.quote-start-source-grid { align-items:stretch; }
.quote-start-panel { display:flex; flex-direction:column; justify-content:space-between; }
.quote-start-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.quote-start-card { width:100%; min-height:154px; appearance:none; text-align:left; font:inherit; }
.quote-start-card .quote-start-icon { background:#eef6ee; color:var(--primary); }
.quote-start-card .quote-start-icon.template { background:#edf2f6; color:var(--brand-dark,var(--ink)); }
.quote-start-card .quote-start-icon.camera { background:#edf7f0; color:var(--primary); }
.quote-start-card .quote-start-icon.pdf { background:var(--ink); color:#fff; }
.quote-start-card .quote-start-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.quote-start-card:hover { transform:translateY(-1px); }
.quote-start-local-status { margin-top:18px; display:flex; align-items:flex-start; gap:10px; padding:12px 13px; border:1px solid #d8e5db; border-radius:11px; background:#f5faf6; }
.quote-start-local-status>span { flex:0 0 auto; padding:4px 7px; border-radius:7px; background:#e3f2e6; color:var(--primary); font-size:8px; font-weight:900; letter-spacing:.08em; }
.quote-start-local-status p { margin:0; color:#65736c; font-size:10px; line-height:1.5; }
.quote-start-local-status strong { color:var(--ink); }
.quote-start-explainer { min-height:100%; }
.quote-start-hint { color:var(--muted); font-size:10px; }
.template-professional-panel { padding:20px; }
.professional-template-grid { grid-template-columns:1fr; }
.professional-template-card { min-height:116px; grid-template-columns:48px minmax(0,1fr); padding:17px; border-color:#dce5df; transition:transform .15s,border-color .15s,box-shadow .15s; }
.professional-template-card:hover { transform:translateY(-1px); border-color:#7eb47a; box-shadow:0 8px 22px rgba(31,72,46,.08); }
.professional-template-card .new-quote-option-icon { align-self:start; }
.professional-template-card p { font-size:10.5px; line-height:1.5; }
.professional-template-card small { font-size:9.5px; color:#55705d; border-top:1px solid #edf1ee; }
.professional-template-card b { font-size:10px; }
@media (max-width:860px) {
  .quote-start-grid { grid-template-columns:1fr; }
  .quote-start-card { min-height:112px; }
}

/* v0.8.16 — expanded client CRM profiles + local spreadsheet import */
.client-header-actions { grid-auto-columns: 132px; }
.client-header-actions .btn { width: 132px; min-width: 132px; }
.clients-table .client-row { cursor: pointer; }
.clients-table .client-row:hover { background: #f5faf6; }
.client-name-link { border: 0; background: transparent; padding: 0; text-align: left; color: var(--text); cursor: pointer; display: grid; gap: 3px; font: inherit; }
.client-name-link strong { color: #172735; }
.client-name-link small, .table-subline { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; font-weight: 500; }
.table-link { color: var(--primary); font-weight: 800; text-decoration: none; white-space: nowrap; }
.table-link:hover { text-decoration: underline; }
.client-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.client-profile-hero { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(360px, .8fr); gap: 20px; align-items: center; padding: 24px; border: 1px solid #dce7df; border-top: 4px solid var(--primary); background: linear-gradient(135deg,#fff 0%,#f5faf6 100%); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.client-profile-avatar { width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; background: #172735; color: white; font-size: 20px; font-weight: 900; letter-spacing: .04em; }
.client-profile-heading h2 { margin: 7px 0 3px; font-size: 26px; color: #172735; }
.client-profile-heading p { margin: 0; color: var(--muted); }
.client-profile-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.client-profile-quick { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-left: 1px solid #dce7df; }
.client-profile-quick span { padding: 6px 16px; min-width: 0; display: grid; gap: 5px; }
.client-profile-quick small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.client-profile-quick strong { overflow-wrap: anywhere; font-size: 13px; }
.client-profile-stats { margin-bottom: 18px; }
.client-profile-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 18px; }
.client-profile-panel, .client-history-panel { overflow: hidden; }
.client-profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px 20px 18px; }
.client-profile-details > div { padding: 14px 10px; border-bottom: 1px solid #edf1ee; display: grid; gap: 5px; }
.client-profile-details span, .client-profile-label, .client-profile-notes > span { color: #718078; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.client-profile-details strong { font-size: 13px; color: #172735; overflow-wrap: anywhere; }
.client-profile-notes { margin: 0 20px 20px; padding: 15px; border-radius: 11px; background: #f7faf8; border: 1px solid #e3ece6; }
.client-profile-notes p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.55; color: #34463c; }
.client-address-grid { display: grid; gap: 12px; padding: 0 20px 20px; }
.client-profile-card { display: grid; gap: 6px; padding: 16px; border: 1px solid #dfe8e1; border-radius: 12px; background: #fbfdfb; }
.client-profile-card strong { color: #172735; line-height: 1.45; }
.client-profile-card > span:last-child { font-weight: 850; color: var(--primary); letter-spacing: .04em; }
.client-history-panel { margin-top: 18px; }
.client-edit-form .client-form-section { margin: 22px 0 11px; padding-top: 18px; border-top: 1px solid #e3e8e4; color: #172735; font-size: 14px; }
.client-edit-form .client-form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.client-import-steps { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 2px 0 24px; color: #95a098; font-size: 12px; font-weight: 800; }
.client-import-steps span { display: inline-flex; align-items: center; gap: 8px; }
.client-import-steps b { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #d8e0da; background: white; font-size: 11px; }
.client-import-steps span.active { color: #172735; }
.client-import-steps span.active b { color: var(--primary); border-color: #83b892; box-shadow: 0 0 0 5px #eef7f0; }
.client-import-steps i { color: #bdc6bf; font-style: normal; }
.client-import-intro { max-width: 1120px; margin: 20px auto; display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; }
.client-import-intro > div, .client-import-intro > aside { border: 1px solid #dce6de; border-radius: 17px; background: white; padding: 28px; }
.client-import-intro h2, .client-import-map h2, .client-import-review h2, .client-import-complete h2 { color: #172735; margin: 5px 0 8px; font-size: 26px; }
.client-import-intro p, .client-import-map p, .client-import-review p, .client-import-complete p { color: var(--muted); line-height: 1.55; }
.client-import-drop { margin-top: 22px; min-height: 160px; border: 1.5px dashed #a9c5b0; border-radius: 15px; background: #f6fbf7; display: grid; place-items: center; align-content: center; text-align: center; gap: 7px; cursor: pointer; }
.client-import-drop:hover { border-color: var(--primary); background: #f0f8f2; }
.client-import-drop input { position: absolute; opacity: 0; pointer-events: none; }
.client-import-drop strong { color: var(--primary); font-size: 16px; }
.client-import-drop span { color: var(--muted); font-size: 12px; }
.client-import-intro aside h3 { margin-top: 0; }
.client-import-intro aside ol { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 17px; counter-reset: none; }
.client-import-intro aside li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; }
.client-import-intro aside li::before { content: counter(list-item, decimal-leading-zero); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #eef6f0; color: var(--primary); font-weight: 900; font-size: 10px; grid-row: 1 / span 2; }
.client-import-intro aside li b { color: #172735; }
.client-import-intro aside li span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.client-import-map, .client-import-review { max-width: 1180px; margin: 0 auto; }
.client-import-map-head, .client-import-review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.client-import-map-head > label { min-width: 260px; display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.client-import-map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 16px; padding: 20px; border: 1px solid #dfe7e1; border-radius: 15px; background: #fbfdfb; }
.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 14px 3px; color: #4f5d55; font-size: 12px; }
.checkbox-row input { width: auto; }
.client-import-preview { margin-top: 18px; border: 1px solid #e0e7e2; border-radius: 14px; overflow: hidden; }
.client-import-preview h3 { margin: 0; padding: 15px 18px; background: #f6f9f7; border-bottom: 1px solid #e4e9e5; font-size: 14px; }
.client-import-review-stats { display: flex; gap: 9px; flex-wrap: wrap; }
.client-import-review-stats span { min-width: 105px; padding: 10px 13px; border: 1px solid #dfe7e1; border-radius: 10px; background: white; display: grid; gap: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.client-import-review-stats b { color: #172735; font-size: 18px; }
.client-import-review-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.client-import-review-table { max-height: 52vh; border: 1px solid #e0e6e1; border-radius: 13px; }
.client-import-review-table table { min-width: 1080px; }
.client-import-review-table thead { position: sticky; top: 0; z-index: 1; }
.client-import-review-table select { min-width: 138px; padding: 7px 8px; font-size: 11px; }
.import-row-rejected { opacity: .48; background: #fcf7f7; }
.import-decision { display: flex; gap: 5px; }
.import-choice { border: 1px solid #d9e2dc; border-radius: 7px; background: white; padding: 6px 9px; font-size: 10px; font-weight: 850; cursor: pointer; }
.import-choice.active { border-color: var(--primary); background: #edf7ef; color: var(--primary); }
.import-choice.reject.active { border-color: #c97070; background: #fff1f1; color: #ad4141; }
.client-import-amend { margin: 0 0 18px; padding: 20px; border: 2px solid #9bc8a7; border-radius: 15px; background: #fbfefc; }
.client-import-amend-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.client-import-amend h3 { margin: 2px 0 0; }
.client-import-amend-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.client-import-complete { max-width: 700px; margin: 50px auto; text-align: center; }
.client-import-complete-icon { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: #e9f7ed; color: var(--primary); font-size: 30px; font-weight: 900; }
.client-import-result-grid { margin: 25px 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.client-import-result-grid span { padding: 18px; border: 1px solid #dfe7e1; border-radius: 12px; display: grid; gap: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.client-import-result-grid b { color: #172735; font-size: 25px; }

@media (max-width: 1050px) {
  .client-profile-hero { grid-template-columns: auto 1fr; }
  .client-profile-quick { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #dce7df; padding-top: 12px; }
  .client-profile-grid { grid-template-columns: 1fr; }
  .client-import-map-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .client-header-actions { grid-auto-flow: row; grid-auto-columns: auto; }
  .client-profile-hero, .client-import-intro { grid-template-columns: 1fr; }
  .client-profile-avatar { width: 56px; height: 56px; }
  .client-profile-quick { grid-template-columns: 1fr; }
  .client-profile-details, .client-import-map-grid { grid-template-columns: 1fr; }
  .client-import-map-head, .client-import-review-head { align-items: flex-start; flex-direction: column; }
  .client-import-steps { justify-content: flex-start; overflow-x: auto; }
}

/* v0.8.17 dashboard operational drill-downs */
.dashboard-kpi-action {
  position: relative;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-kpi-action:hover,
.dashboard-kpi-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20, 39, 55, .10);
  border-color: var(--kpi-accent);
  outline: none;
}
.dashboard-kpi-link {
  display: inline-block;
  margin-top: 9px;
  color: var(--kpi-accent);
  font-size: 11px;
  font-weight: 800;
}
.dashboard-operational-modal > .muted { margin: 0 0 14px; }
.dashboard-operational-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf8;
}
.dashboard-operational-summary strong { font-size: 24px; line-height: 1; }
.dashboard-operational-summary span { color: var(--muted); font-size: 12px; }
.operational-job-actions { flex-wrap: nowrap; justify-content: flex-end; }
.operational-job-actions .btn.small { min-height: 32px; padding: 6px 10px; white-space: nowrap; }
@media (max-width: 760px) {
  .operational-job-actions { flex-wrap: wrap; }
}

/* v0.8.18 — cleaner month-first calendar navigation */
.calendar-control-card {
  margin-bottom: 16px;
  padding: 14px 16px 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(23,39,53,.045);
}
.calendar-control-row {
  display: grid;
  grid-template-columns: minmax(150px,1fr) auto minmax(150px,1fr);
  align-items: center;
  gap: 16px;
}
.calendar-control-left { justify-self: start; }
.calendar-control-right { justify-self: end; }
.calendar-period-nav {
  display: grid;
  grid-template-columns: 42px minmax(165px,auto) 42px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.calendar-circle-nav {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e1da;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(23,39,53,.025);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.calendar-circle-nav:hover {
  background: #f4f8f4;
  border-color: #b9ccbd;
  transform: translateY(-1px);
}
.calendar-period-title {
  min-width: 165px;
  color: var(--ink);
  text-align: center;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.01em;
}
.calendar-today-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d7e1da;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.calendar-today-button:hover { background: #f5f8f5; border-color: #bfd0c1; }
.calendar-control-card .calendar-summary-inline {
  justify-content: center;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #eef2ef;
  font-size: 9px;
}
.calendar-control-card .calendar-summary-inline strong { font-size: 12px; }

/* Month view now contains the selected month only. No preceding/following dates are rendered. */
.month-only-calendar.compact-calendar {
  min-width: 980px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 9px 26px rgba(23,39,53,.05);
}
.month-only-calendar .month-weekdays {
  background: #f7f9f6;
  border-bottom: 1px solid var(--border);
}
.month-only-calendar .month-weekdays > div {
  padding: 11px 8px;
  color: #62716a;
  font-size: 9px;
  letter-spacing: .075em;
}
.month-only-calendar .month-grid { background: #fff; }
.month-only-calendar .month-day {
  min-height: 142px;
  padding: 10px 9px 31px;
  border: 0;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.month-only-calendar .month-day:nth-child(7n) { border-right: 0; }
.month-only-calendar .month-day:nth-last-child(-n+7) { border-bottom: 1px solid var(--border); }
.month-only-calendar .month-day.today {
  background: #f8fcf6;
  box-shadow: inset 0 0 0 2px #91b77b;
}
.month-only-calendar .month-day > header { margin-bottom: 7px; }
.month-only-calendar .month-day-number { font-size: 11px; }
.month-only-calendar .month-event {
  padding: 6px 7px;
  border-radius: 7px;
  border-left-width: 2px;
  box-shadow: none;
}
.month-only-calendar .month-event > strong { font-size: 8.7px; }
.month-only-calendar .month-event > small { font-size: 7.5px; }
.month-only-calendar .month-add { left: 9px; right: auto; bottom: 7px; width: auto; height: auto; padding: 2px 4px; font-size: 8px; }

@media (max-width: 900px) {
  .calendar-control-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .calendar-period-nav { grid-row: 1; justify-self: center; }
  .calendar-control-left { grid-row: 2; justify-self: center; }
  .calendar-control-right { grid-row: 3; justify-self: center; }
  .calendar-period-title { min-width: 150px; }
}

@media (max-width: 760px) {
  .calendar-control-card { padding: 12px 10px 10px; }
  .calendar-period-nav { grid-template-columns: 38px minmax(135px,auto) 38px; gap: 10px; }
  .calendar-circle-nav { width: 38px; height: 38px; font-size: 22px; }
  .calendar-period-title { min-width: 135px; font-size: 13px; }
  .month-only-calendar.compact-calendar,
  .month-only-calendar .month-weekdays,
  .month-only-calendar .month-grid { min-width: 760px; }
}


/* v0.8.42 — calendar refreshed to a cleaner O'Suan-style month layout while retaining week/day views and simple add controls. */
.calendar-control-card {
  margin-bottom: 18px;
  padding: 10px 14px 12px;
  border: 1px solid #dfe7e2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(23,39,53,.045);
}
.calendar-control-row {
  grid-template-columns: minmax(120px,1fr) auto minmax(220px,1fr);
  gap: 14px;
}
.calendar-control-left { justify-self: start; }
.calendar-control-right { justify-self: end; }
.calendar-period-nav { grid-template-columns: 40px minmax(170px,auto) 40px; gap: 14px; }
.calendar-circle-nav {
  width: 40px; height: 40px; font-size: 24px;
  border-color: #cfdacf; color: #4f8f48; background: #fcfdfc;
}
.calendar-circle-nav:hover { background:#f5f9f4; border-color:#b7cab8; }
.calendar-period-title { min-width: 170px; font-size: 15px; font-weight: 850; }
.calendar-today-button {
  min-height: 34px; padding: 0 15px; border-radius: 11px;
  border: 1px solid #d2ddd4; background: #fff; font-size: 11px; font-weight: 800;
}
.calendar-control-card .calendar-summary-inline {
  justify-content: center; gap: 18px; margin-top: 10px; padding-top: 9px;
  border-top: 1px solid #edf2ee; font-size: 10px;
}
.calendar-control-card .calendar-summary-inline strong { font-size: 14px; }
.calendar-view-switch { padding: 4px; border-radius: 10px; }
.calendar-view-button { min-width: 54px; font-size: 10px; }

.month-only-calendar.compact-calendar {
  min-width: 980px;
  border: 1px solid #dfe7e2;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23,39,53,.045);
}
.month-only-calendar .month-weekdays {
  background: #f7faf6;
  border-bottom: 1px solid #dfe7e2;
}
.month-only-calendar .month-weekdays > div {
  padding: 12px 8px;
  color: #68756f;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.month-only-calendar .month-grid { background: #fff; }
.month-only-calendar .month-day {
  min-height: 145px;
  padding: 12px 10px 28px;
  border: 0;
  border-left: 1px solid #e1e8e2;
  border-bottom: 1px solid #e1e8e2;
  background: #fff;
}
.month-only-calendar .month-day:nth-child(7n) { border-right: 0; }
.month-only-calendar .month-day.today {
  background: #f7fbf5;
  box-shadow: inset 0 0 0 2px #8fb56d;
}
.month-only-calendar .month-day > header {
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom: 10px; min-height: 28px;
}
.month-only-calendar .month-day > header > span {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: #eef3ea; color: #6f7a73;
  font-size: 9px; font-weight: 800;
}
.month-only-calendar .month-day-number {
  width: 30px; height: 30px; font-size: 13px; font-weight: 850;
}
.month-only-calendar .month-day.today .month-day-number { background:#7ea85e; color:#fff; }
.month-only-calendar .month-events { display:grid; gap:6px; }
.month-only-calendar .month-event {
  padding: 7px 9px;
  border: 1px solid #cfdacb;
  border-left-width: 1px;
  border-radius: 8px;
  background: #f7faf5;
  text-align: left;
  box-shadow: none;
}
.month-only-calendar .month-event.eco-install {
  border-color: #c8d8c0;
  background: #f5f9f2;
}
.month-only-calendar .month-event.eco-survey {
  border-color: #d7e2e7;
  background: #f6fafc;
}
.month-only-calendar .month-event.task-event {
  border-color: #dce2de;
  background: #fafbfa;
}
.month-only-calendar .month-event > strong {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:#25452c; font-size:11px; line-height:1.25; font-weight:700;
}
.month-only-calendar .month-event > small {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  margin-top:2px; color:#6d7a73; font-size:9px; line-height:1.25;
}
.month-only-calendar .calendar-entry-time {
  display:inline; margin-right:4px; color:#557d3f; font-size:10px; font-weight:900;
}
.month-only-calendar .eco-survey .calendar-entry-time { color:#3f6f92; }
.month-only-calendar .month-more {
  border:0; background:transparent; color:#4f8f48; padding:1px 2px;
  text-align:left; font:inherit; font-size:10px; font-weight:800; cursor:pointer;
}
.month-only-calendar .month-more:hover { text-decoration: underline; }
.month-only-calendar .month-add {
  position:absolute; left:10px; bottom:8px;
  width:18px; height:18px; padding:0;
  display:grid; place-items:center;
  border:0; border-radius:5px; background:transparent; color:#4f8f48;
  font: inherit; font-size:15px; font-weight:900; line-height:1; cursor:pointer;
}
.month-only-calendar .month-add:hover { background:#eef5ec; }

.compact-week-calendar {
  min-width: 980px;
  border:1px solid #dfe7e2;
  border-radius:18px;
  box-shadow:0 10px 26px rgba(23,39,53,.045);
}
.compact-week-day {
  min-height: 485px;
  padding:0 10px 30px;
  background:#fff;
}
.compact-week-day.today { background:#f7fbf5; box-shadow: inset 0 0 0 2px #8fb56d; }
.compact-week-day > header {
  min-height:64px; padding:11px 0 9px;
  border-bottom:1px solid #e3e9e4;
}
.compact-week-day > header span { font-size:10px; color:#6e7a73; letter-spacing:.06em; }
.compact-week-day > header strong { width:30px; height:30px; font-size:13px; }
.compact-week-day.today > header strong { background:#7ea85e; }
.compact-day-events { padding:9px 0; gap:8px; }
.compact-calendar-event {
  border:1px solid #cfdbc9; border-left:0; border-radius:8px;
  background:#f7faf5; padding:8px 9px;
}
.compact-calendar-event.eco-survey { border-color:#d8e2e9; background:#f6fafc; }
.compact-calendar-event.task-event { border-color:#dce2de; background:#fafbfa; }
.compact-event-time { font-size:10px; margin-bottom:3px; }
.compact-calendar-event strong { font-size:10px; }
.compact-calendar-event small { font-size:8px; }
.compact-day-add {
  position:absolute; left:10px; bottom:8px;
  width:18px; height:18px; padding:0;
  display:grid; place-items:center;
  border:0; border-radius:5px; background:transparent; color:#4f8f48;
  font: inherit; font-size:15px; font-weight:900; line-height:1; cursor:pointer;
}
.compact-day-add:hover { background:#eef5ec; }

.compact-day-agenda {
  max-width: 900px;
  border:1px solid #dfe7e2;
  border-radius:18px;
  box-shadow:0 10px 26px rgba(23,39,53,.045);
}
.compact-day-agenda-head {
  padding:16px 18px; background:#f7faf6; border-bottom:1px solid #e2e9e3;
}
.compact-day-agenda-head strong { background:#7ea85e; }
.compact-agenda-list { gap:10px; padding:14px; }
.compact-agenda-event {
  border:1px solid #cfdbc9; border-left:0; border-radius:10px; background:#f7faf5;
}
.compact-agenda-event.eco-survey { border-color:#d8e2e9; background:#f6fafc; }
.compact-agenda-event.task-event { border-color:#dce2de; background:#fafbfa; }
.compact-agenda-time { font-size:11px; }
.compact-agenda-add {
  margin:0 14px 14px;
  width:28px; height:28px; padding:0;
  display:grid; place-items:center;
  border:1px solid #d4dfd0; border-radius:8px; background:#fff; color:#4f8f48;
  font: inherit; font-size:20px; font-weight:900; line-height:1; cursor:pointer;
}
.compact-agenda-add:hover { background:#f5f9f2; }

@media (max-width: 900px) {
  .calendar-control-row { grid-template-columns: 1fr; gap: 12px; }
  .calendar-period-nav { grid-row: 1; justify-self: center; }
  .calendar-control-left { grid-row: 2; justify-self: center; }
  .calendar-control-right { grid-row: 3; justify-self: center; }
}

@media (max-width: 760px) {
  .calendar-control-card { padding: 10px 10px 11px; }
  .calendar-period-nav { grid-template-columns: 38px minmax(140px,auto) 38px; gap: 10px; }
  .calendar-circle-nav { width: 38px; height: 38px; font-size: 22px; }
  .calendar-period-title { min-width: 140px; font-size: 13px; }
  .month-only-calendar.compact-calendar,
  .month-only-calendar .month-weekdays,
  .month-only-calendar .month-grid { min-width: 760px; }
}

/* v0.8.19 — polished client directory + CRM profile */
.client-directory-summary {
  display: grid;
  grid-template-columns: minmax(270px, .72fr) minmax(620px, 1.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid #dfe8e2;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(71,139,60,.09), transparent 31%),
    linear-gradient(135deg, #ffffff 0%, #fbfdfb 62%, #f3f8f4 100%);
  box-shadow: 0 10px 28px rgba(24,41,57,.045);
}
.client-directory-intro { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 4px 8px 4px 2px; }
.client-directory-intro .eyebrow { margin-bottom: 5px; font-size: 10px; letter-spacing: .13em; }
.client-directory-intro h2 { margin: 0; color: #172735; font-size: 28px; line-height: 1.08; letter-spacing: -.035em; }
.client-directory-intro p:last-child { margin: 8px 0 0; max-width: 440px; color: #718078; font-size: 12px; line-height: 1.55; }
.client-directory-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.client-directory-metrics article {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border: 1px solid #e2e9e4;
  border-radius: 13px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 2px rgba(19,45,31,.025);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.client-directory-metrics article > span { color: #75817b; font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.client-directory-metrics article > strong { margin-top: 9px; color: #182936; font-size: 20px; line-height: 1.05; letter-spacing: -.035em; overflow-wrap: anywhere; }
.client-directory-metrics article > small { margin-top: 5px; color: #87918c; font-size: 10px; }

.client-directory-controls {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(180px, 230px) minmax(170px, 220px) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #e1e7e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(24,41,57,.035);
}
.client-directory-search { position: relative; min-width: 0; }
.client-directory-search .search { width: 100%; max-width: none; min-width: 0; height: 43px; padding-left: 40px; border-color: #dce4df; background: #fbfcfb; }
.client-directory-search .search:focus { background: #fff; }
.client-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 2; color: #718078; font-size: 21px; line-height: 1; pointer-events: none; }
.client-filter-select { height: 43px; border-color: #dce4df; background: #fff; color: #263a31; font-size: 12px; font-weight: 700; }
.client-clear-filters { height: 43px; white-space: nowrap; }

.client-directory-table-card {
  overflow: hidden;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(24,41,57,.045);
}
.client-directory-table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #e8ece9; background: linear-gradient(180deg,#fff,#fbfdfb); }
.client-directory-table-head h2 { margin: 0; color: #192b38; font-size: 15px; }
.client-directory-table-head p { margin: 4px 0 0; color: #84908a; font-size: 11px; }
.client-directory-count { min-width: 35px; height: 28px; padding: 0 10px; border-radius: 999px; display: inline-grid; place-items: center; background: #edf6ef; color: #347843; font-size: 11px; font-weight: 900; }
.clients-table-polished { min-width: 1160px; }
.clients-table-polished th { padding: 11px 14px; color: #6d7872; background: #f8faf8; border-bottom-color: #e5eae6; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.clients-table-polished td { padding: 14px; border-bottom-color: #edf0ee; vertical-align: middle; }
.clients-table-polished tbody tr:last-child td { border-bottom: 0; }
.clients-table-polished .client-row { transition: background .12s ease, box-shadow .12s ease; }
.clients-table-polished .client-row:hover { background: #f7fbf8; box-shadow: inset 3px 0 0 #478b3c; }
.client-list-identity { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 11px; align-items: center; min-width: 210px; }
.client-list-avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg,#193244,#25495a); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.client-name-link { max-width: 240px; }
.client-name-link strong { font-size: 13px; line-height: 1.2; }
.client-name-link small { margin-top: 3px; color: #7a857f; font-size: 10px; }
.client-list-badges { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #83908a; font-size: 9px; }
.client-status-pill, .client-type-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 8px; border: 1px solid #dfe7e1; background: #f6f8f7; color: #63716a; font-size: 9px; font-weight: 850; line-height: 1; white-space: nowrap; }
.client-status-pill.status-active { border-color: #cfe5d5; background: #eef8f0; color: #2f7d43; }
.client-status-pill.status-lead { border-color: #ddd5f4; background: #f4f1fc; color: #7055b5; }
.client-status-pill.status-past-client { border-color: #dde2e0; background: #f4f6f5; color: #68716d; }
.client-status-pill.status-on-hold { border-color: #f1dfb7; background: #fff8e9; color: #9a6b0b; }
.client-status-pill.status-do-not-contact { border-color: #f0cece; background: #fff2f2; color: #b04b4b; }
.client-contact-stack, .client-location-stack, .client-activity-stack, .client-value-stack { display: grid; gap: 4px; min-width: 0; }
.client-contact-stack a { width: fit-content; max-width: 210px; overflow: hidden; text-overflow: ellipsis; color: #24372e; text-decoration: none; font-size: 11px; font-weight: 750; }
.client-contact-stack a:hover { color: var(--primary); text-decoration: underline; }
.client-contact-stack .client-email-line, .client-contact-stack small, .client-location-stack small { color: #88928d; font-size: 10px; font-weight: 500; }
.client-location-stack { max-width: 250px; }
.client-location-stack > span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #34453c; font-size: 11px; line-height: 1.4; }
.client-postcode-chip { width: fit-content; padding: 3px 7px; border-radius: 6px; background: #edf5ef; color: #347443; font-size: 9.5px; letter-spacing: .035em; }
.client-activity-stack strong, .client-value-stack strong { color: #1f3228; font-size: 12px; }
.client-activity-stack span, .client-activity-stack small, .client-value-stack small { color: #84908a; font-size: 10px; }
.client-value-stack strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.client-source-chip { display: inline-flex; max-width: 155px; padding: 5px 8px; border: 1px solid #e1e7e3; border-radius: 7px; background: #fafcfb; color: #627168; font-size: 9.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-row-actions { flex-wrap: nowrap; }
.client-action-button { border: 1px solid #e1e7e3; background: #fff; color: #557067; }
.client-action-button:hover { border-color: #b7cdbd; background: #f1f8f3; color: #2f7a44; }
.client-action-quote { color: #fff; border-color: #478b3c; background: #478b3c; }
.client-action-quote:hover { background: #397a39; color: #fff; }
.client-action-delete { color: #a96262; }
.client-action-delete:hover { border-color: #edcccc; background: #fff3f3; color: #b04646; }
.client-empty-state { min-height: 185px; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; color: #8b9690; }
.client-empty-state > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #f0f6f1; color: #478b3c; font-size: 21px; }
.client-empty-state h3 { margin: 3px 0 0; color: #2d3e35; font-size: 14px; }
.client-empty-state p { margin: 0; font-size: 11px; }

.client-profile-banner {
  display: grid;
  grid-template-columns: 82px minmax(0,1fr) minmax(220px,.48fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 22px 24px;
  border: 1px solid #dce6df;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(71,139,60,.10), transparent 31%),
    linear-gradient(135deg,#fff 0%,#fbfdfb 68%,#f2f7f3 100%);
  box-shadow: 0 10px 28px rgba(24,41,57,.045);
}
.client-profile-avatar-large { width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(145deg,#193244,#25495a); box-shadow: 0 8px 20px rgba(24,41,57,.13); }
.client-profile-identity { min-width: 0; }
.client-profile-identity h1 { margin: 8px 0 3px; color: #172a37; font-size: 27px; line-height: 1.05; letter-spacing: -.035em; }
.client-profile-identity > p { margin: 0; color: #77847d; font-size: 12px; }
.client-profile-inline-meta { display: flex; align-items: center; gap: 8px; margin-top: 11px; min-width: 0; flex-wrap: wrap; color: #718078; font-size: 10.5px; }
.client-profile-inline-meta a { color: #355f49; font-weight: 700; text-decoration: none; }
.client-profile-inline-meta a:hover { text-decoration: underline; }
.client-profile-inline-meta i { color: #bbc4bf; font-style: normal; }
.client-profile-inline-meta b { color: #2f7541; letter-spacing: .035em; }
.client-profile-banner-aside { min-height: 88px; padding: 13px 0 13px 22px; border-left: 1px solid #dbe5de; display: grid; align-content: center; gap: 5px; }
.client-profile-banner-aside > span { color: #7d8982; font-size: 9.5px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.client-profile-banner-aside > strong { color: #24382e; font-size: 13px; }
.client-profile-banner-aside > small { color: #8a948f; font-size: 10px; }

.client-profile-tabs { display: flex; align-items: center; gap: 5px; margin-bottom: 14px; padding: 5px; width: fit-content; border: 1px solid #dfe6e1; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(24,41,57,.03); }
.client-profile-tabs button { min-height: 34px; padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: #6c7972; font-size: 11px; font-weight: 800; }
.client-profile-tabs button:hover { color: #2f7040; background: #f4f8f5; }
.client-profile-tabs button.active { color: #fff; background: #478b3c; }
.client-profile-tabs button span { display: inline-grid; min-width: 19px; height: 18px; margin-left: 5px; place-items: center; padding: 0 5px; border-radius: 999px; background: rgba(23,42,55,.07); font-size: 9px; }
.client-profile-tabs button.active span { background: rgba(255,255,255,.18); }

.client-profile-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.client-profile-metric { --metric-accent:#478b3c; position: relative; min-height: 105px; padding: 15px 16px; overflow: hidden; border: 1px solid #dfe6e1; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(24,41,57,.03); }
.client-profile-metric::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--metric-accent); }
.client-profile-metric > span { display:block; color:#7b8780; font-size:9.5px; font-weight:850; text-transform:uppercase; letter-spacing:.055em; }
.client-profile-metric > strong { display:block; margin-top:10px; color:#192b37; font-size:20px; line-height:1.05; letter-spacing:-.035em; overflow-wrap:anywhere; }
.client-profile-metric > small { display:block; margin-top:6px; color:#8a958f; font-size:9.5px; }
.client-profile-metric.purple { --metric-accent:#8e78d7; }
.client-profile-metric.amber { --metric-accent:#e49c1c; }
.client-profile-metric.red { --metric-accent:#d85b5b; }

.client-profile-overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.client-profile-section-card { border:1px solid #dfe6e1; border-radius:15px; background:#fff; box-shadow:0 5px 18px rgba(24,41,57,.035); overflow:hidden; }
.client-profile-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:17px 18px 13px; border-bottom:1px solid #ebeeec; background:linear-gradient(180deg,#fff,#fcfdfc); }
.client-profile-section-head .eyebrow { margin:0 0 4px; font-size:9px; }
.client-profile-section-head h2 { margin:0; color:#1d303c; font-size:14px; }
.client-inline-edit { border:0; background:#eef6f0; color:#347744; border-radius:7px; padding:6px 9px; font-size:10px; font-weight:850; }
.client-inline-edit:hover { background:#e2f0e5; }
.client-detail-list { padding:2px 18px 10px; }
.client-detail-row { min-height:48px; display:grid; grid-template-columns:minmax(120px,.72fr) minmax(0,1.4fr); gap:14px; align-items:center; border-bottom:1px solid #edf0ee; }
.client-detail-row:last-child { border-bottom:0; }
.client-detail-row > span { color:#81908a; font-size:10px; font-weight:700; }
.client-detail-row > strong, .client-detail-row > a { color:#2a3d33; font-size:11px; font-weight:750; overflow-wrap:anywhere; text-align:right; }
.client-detail-row > a { color:#347b48; text-decoration:none; }
.client-detail-row > a:hover { text-decoration:underline; }
.client-address-section, .client-notes-section { min-height:210px; }
.client-address-grid-polished { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:14px; }
.client-address-card { min-height:126px; display:grid; grid-template-columns:34px 1fr; gap:11px; padding:15px; border:1px solid #e1e8e3; border-radius:12px; background:#fbfdfb; }
.client-address-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; background:#edf6ef; color:#347743; font-size:17px; }
.client-address-card > div:last-child { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.client-address-card span { color:#7d8982; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.055em; }
.client-address-card strong { color:#293c32; font-size:11px; line-height:1.45; font-weight:750; }
.client-address-card b { margin-top:auto; padding:4px 7px; border-radius:6px; background:#eaf5ed; color:#2f7541; font-size:9.5px; letter-spacing:.04em; }
.client-address-card small { color:#8c9691; font-size:9.5px; }
.client-profile-notes-polished { min-height:145px; padding:16px 18px; color:#415148; font-size:11px; line-height:1.65; white-space:pre-wrap; }
.client-profile-notes-polished p { margin:0; }
.client-notes-empty { min-height:110px; display:grid; place-items:center; text-align:center; color:#96a09b; }

.client-profile-table-section { overflow:hidden; border:1px solid #dfe6e1; border-radius:15px; background:#fff; box-shadow:0 6px 20px rgba(24,41,57,.04); }
.client-profile-table-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; border-bottom:1px solid #e7ece8; background:linear-gradient(180deg,#fff,#fbfdfb); }
.client-profile-table-heading .eyebrow { margin:0 0 3px; font-size:9px; }
.client-profile-table-heading h2 { margin:0; color:#1c303c; font-size:16px; }
.client-profile-table-heading p { margin:5px 0 0; color:#84908a; font-size:10.5px; }
.client-profile-table-heading > span { min-width:65px; padding:7px 10px; border-radius:999px; background:#eef6f0; color:#347743; text-align:center; font-size:10px; font-weight:850; }
.client-history-table { min-width:1000px; }
.client-history-table th { padding:11px 13px; color:#6d7972; background:#f8faf8; font-size:9px; letter-spacing:.055em; text-transform:uppercase; }
.client-history-table td { padding:13px; font-size:11px; }

@media (max-width: 1280px) {
  .client-directory-summary { grid-template-columns:1fr; }
  .client-directory-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .client-profile-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  .client-directory-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .client-directory-controls { grid-template-columns:1fr 1fr; }
  .client-directory-search { grid-column:1/-1; }
  .client-profile-banner { grid-template-columns:72px 1fr; }
  .client-profile-banner-aside { grid-column:1/-1; border-left:0; border-top:1px solid #dbe5de; padding:14px 0 0; }
  .client-profile-overview-grid { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .client-directory-summary { padding:15px; border-radius:14px; }
  .client-directory-metrics { grid-template-columns:1fr 1fr; }
  .client-directory-controls { grid-template-columns:1fr; }
  .client-directory-search { grid-column:auto; }
  .client-directory-metrics article { min-height:92px; padding:13px; }
  .client-directory-metrics article > strong { font-size:17px; }
  .client-profile-banner { grid-template-columns:56px minmax(0,1fr); padding:16px; gap:13px; }
  .client-profile-avatar-large { width:56px; height:56px; border-radius:14px; }
  .client-profile-identity h1 { font-size:22px; }
  .client-profile-inline-meta { align-items:flex-start; flex-direction:column; gap:4px; }
  .client-profile-inline-meta i { display:none; }
  .client-profile-tabs { width:100%; overflow:auto; }
  .client-profile-tabs button { flex:1 0 auto; }
  .client-profile-metrics { grid-template-columns:1fr 1fr; }
  .client-address-grid-polished { grid-template-columns:1fr; }
  .client-detail-row { grid-template-columns:1fr; gap:4px; padding:10px 0; align-items:start; }
  .client-detail-row > strong, .client-detail-row > a { text-align:left; }
}
@media (max-width: 480px) {
  .client-directory-metrics, .client-profile-metrics { grid-template-columns:1fr; }
  .client-profile-banner { grid-template-columns:1fr; }
  .client-profile-avatar-large { width:52px; height:52px; }
}

.client-edit-form { color:#2a3b32; }
.client-edit-form .client-form-section { margin:22px 0 9px; padding-top:18px; border-top:1px solid #e4eae6; color:#347443; font-size:10px; font-weight:900; letter-spacing:.085em; text-transform:uppercase; }
.client-edit-form .client-form-section:first-child { margin-top:0; padding-top:0; border-top:0; }
.client-edit-form > .form-grid { padding:14px 15px 16px; border:1px solid #e3e9e5; border-radius:12px; background:#fbfdfb; gap:11px 14px; }
.client-edit-form > .field { margin-top:10px; }
.client-edit-form .field { color:#617068; font-size:10.5px; font-weight:800; }
.client-edit-form input, .client-edit-form select, .client-edit-form textarea { border-color:#dbe4de; background:#fff; }
.client-edit-form input:focus, .client-edit-form select:focus, .client-edit-form textarea:focus { border-color:#72a97b; box-shadow:0 0 0 3px rgba(71,139,60,.10); }

/* v0.8.20 — local outcode performance map */
.geo-performance-panel { margin-top: 16px; overflow: hidden; }
.geo-performance-head { align-items: flex-end; }
.geo-performance-head p { margin: 5px 0 0; }
.geo-metric-control { display: grid; gap: 5px; min-width: 220px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.geo-metric-control select { text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 700; color: var(--ink); }
.geo-performance-body { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .7fr); min-height: 500px; }
.geo-map-wrap { min-width: 0; padding: 18px 18px 14px; border-right: 1px solid var(--border); background: linear-gradient(180deg, #fbfdfb 0%, #f6faf7 100%); }
.geo-performance-map { display: block; width: 100%; min-height: 390px; max-height: 520px; border: 1px solid #dce7e0; border-radius: 20px; background: #f7fbf8; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.geo-map-bg { fill: #f7fbf8; }
.geo-reference circle { fill: #7e8e84; opacity: .55; }
.geo-reference text { fill: #718078; font-size: 11px; font-weight: 650; opacity: .65; pointer-events: none; }
.geo-bubble { cursor: pointer; outline: none; }
.geo-bubble-halo { opacity: .14; transition: opacity .14s ease, r .14s ease; }
.geo-bubble-core { opacity: .88; stroke: #ffffff; stroke-width: 3; filter: drop-shadow(0 5px 8px rgba(23,39,53,.14)); transition: opacity .14s ease, stroke-width .14s ease; }
.geo-bubble-label { fill: #172735; font-size: 10px; font-weight: 900; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.82); stroke-width: 3px; stroke-linejoin: round; }
.geo-bubble:hover .geo-bubble-halo,
.geo-bubble:focus .geo-bubble-halo { opacity: .28; }
.geo-bubble:hover .geo-bubble-core,
.geo-bubble:focus .geo-bubble-core { opacity: 1; stroke-width: 5; }
.geo-map-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.geo-map-foot strong { color: #245f3d; }
.geo-ranking { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.geo-ranking-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px 12px; border-bottom: 1px solid #edf1ee; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.geo-ranking-head strong { color: #245f3d; }
.geo-rank-row { width: 100%; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 12px 16px; border: 0; border-bottom: 1px solid #edf1ee; background: #fff; color: inherit; text-align: left; }
.geo-rank-row:hover, .geo-rank-row:focus-visible { background: #f7fbf8; outline: none; }
.geo-rank-number { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #eef5ef; color: #477055; font-size: 10px; font-weight: 850; }
.geo-rank-place { display: grid; min-width: 0; }
.geo-rank-place strong { font-size: 13px; }
.geo-rank-place small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.geo-rank-value { color: #183b29; font-size: 12px; font-weight: 850; white-space: nowrap; }
.geo-unmapped-note { margin: auto 14px 14px; padding: 10px 11px; border: 1px solid #eadfbe; border-radius: 10px; background: #fff9e9; color: #78672f; font-size: 10px; line-height: 1.45; }
.geo-privacy-note { padding: 10px 18px; border-top: 1px solid var(--border); background: #fbfcfb; color: #718078; font-size: 10px; }
.geo-empty { min-height: 420px; display: grid; place-items: center; }
.geo-drilldown-summary { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; margin-bottom: 14px; }
.geo-drilldown-summary > div { padding: 12px; border: 1px solid #dfe8e2; border-radius: 11px; background: #f8fbf9; }
.geo-drilldown-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.geo-drilldown-summary strong { display: block; font-size: 16px; letter-spacing: -.02em; }
@media (max-width: 1050px) {
  .geo-performance-body { grid-template-columns: 1fr; }
  .geo-map-wrap { border-right: 0; border-bottom: 1px solid var(--border); }
  .geo-ranking { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .geo-ranking-head, .geo-unmapped-note { grid-column: 1 / -1; }
  .geo-drilldown-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .geo-performance-head { align-items: stretch; flex-direction: column; }
  .geo-metric-control { min-width: 0; width: 100%; }
  .geo-performance-body { min-height: 0; }
  .geo-map-wrap { padding: 11px; }
  .geo-performance-map { min-height: 300px; }
  .geo-map-foot { display: grid; gap: 4px; }
  .geo-ranking { grid-template-columns: 1fr; }
  .geo-ranking-head, .geo-unmapped-note { grid-column: auto; }
  .geo-drilldown-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* v0.8.21 — real Scotland basemap for sales geography */
.geo-map-controls { display:flex; align-items:end; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.geo-map-controls .geo-metric-control { min-width:170px; }
.geo-map-wrap { position:relative; }
.geo-performance-map { min-height:420px; max-height:560px; overflow:hidden; background:#f4f8f8; }
.geo-basemap { pointer-events:none; user-select:none; }
.geo-reference circle { fill:#526c5d; opacity:.58; stroke:#fff; stroke-width:1.5; }
.geo-reference text { fill:#60736a; font-size:10px; font-weight:750; opacity:.78; pointer-events:none; paint-order:stroke; stroke:rgba(255,255,255,.92); stroke-width:3px; stroke-linejoin:round; }
.geo-bubble-core { filter:drop-shadow(0 4px 7px rgba(27,54,38,.18)); }
.geo-map-tooltip { position:absolute; z-index:6; width:min(238px,calc(100% - 24px)); padding:9px 11px; border:1px solid rgba(255,255,255,.15); border-radius:10px; background:rgba(22,39,31,.94); box-shadow:0 12px 28px rgba(18,34,26,.18); color:#fff; font-size:10.5px; font-weight:650; line-height:1.45; pointer-events:none; backdrop-filter:blur(8px); }
.geo-map-tooltip[hidden] { display:none; }
.geo-map-legend { display:flex; align-items:center; gap:10px; margin-top:10px; padding:9px 10px; border:1px solid #e0e9e3; border-radius:11px; background:#fbfdfb; }
.geo-legend-item { min-width:0; display:grid; grid-template-columns:auto auto auto auto; align-items:center; gap:5px; color:#53655b; }
.geo-legend-item b { font-size:10px; white-space:nowrap; }
.geo-legend-item small { color:#7a8a81; font-size:9.5px; white-space:nowrap; }
.geo-size-dot { display:inline-block; border-radius:50%; background:#4aa96b; border:2px solid #fff; box-shadow:0 0 0 1px rgba(42,106,64,.18); opacity:.82; }
.geo-size-dot.small { width:9px; height:9px; }
.geo-size-dot.medium { width:14px; height:14px; }
.geo-size-dot.large { width:20px; height:20px; }
.geo-colour-legend { grid-template-columns:minmax(96px,150px) auto auto; margin-left:auto; }
.geo-intensity-bar { width:100%; height:9px; border-radius:999px; background:linear-gradient(90deg,hsl(143 38% 82%),hsl(143 50% 62%),hsl(143 62% 37%)); border:1px solid rgba(36,95,61,.12); }
.geo-map-foot { padding:0 2px; }
.geo-privacy-note { display:flex; align-items:center; gap:6px; }
.geo-privacy-note::before { content:"⌖"; color:#3d8d50; font-weight:900; }
@media (max-width:900px) {
  .geo-map-controls { justify-content:stretch; width:100%; }
  .geo-map-controls .geo-metric-control { flex:1 1 180px; }
  .geo-map-legend { align-items:flex-start; flex-direction:column; }
  .geo-colour-legend { width:100%; margin-left:0; grid-template-columns:minmax(110px,1fr) auto auto; }
}
@media (max-width:700px) {
  .geo-map-controls { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .geo-map-controls .geo-metric-control { width:auto; min-width:0; }
  .geo-performance-map { min-height:320px; }
  .geo-map-legend { display:none; }
}

/* v0.8.22 — pan/zoom geography map + viewport-aware ranking */
.geo-map-wrap { position: relative; }
.geo-performance-map { cursor: grab; touch-action: none; user-select: none; }
.geo-performance-map.is-panning { cursor: grabbing; }
.geo-map-toolbar {
  position: absolute;
  z-index: 8;
  top: 30px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(195, 211, 201, .95);
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(28,55,38,.10);
  backdrop-filter: blur(8px);
}
.geo-map-tool {
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 9px;
  border: 1px solid #dbe6de;
  border-radius: 8px;
  background: #fff;
  color: #183b29;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}
.geo-map-tool:hover,
.geo-map-tool:focus-visible { background: #eef7f0; border-color: #b9d3c0; outline: none; }
.geo-map-tool.geo-map-fit { font-size: 11px; min-width: 40px; }
#dashboard-geo-zoom-label {
  min-width: 42px;
  color: #64736b;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.geo-ranking-head { gap: 10px; align-items: flex-start; }
.geo-ranking-head > div:first-child { display: grid; gap: 4px; }
.geo-ranking-head > div:first-child strong { color: #245f3d; }
.geo-ranking-scope {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #dfe8e2;
  border-radius: 8px;
  background: #f7faf8;
}
.geo-ranking-scope button {
  border: 0;
  border-radius: 6px;
  padding: 5px 7px;
  background: transparent;
  color: #758279;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}
.geo-ranking-scope button.active { background: #fff; color: #245f3d; box-shadow: 0 1px 4px rgba(23,58,40,.09); }
.geo-ranking-scope button:hover,
.geo-ranking-scope button:focus-visible { color: #245f3d; outline: none; }
#dashboard-geo-ranking-rows { min-height: 0; }
@media (max-width: 700px) {
  .geo-map-toolbar { top: 22px; left: 20px; }
  .geo-ranking-head { align-items: stretch; flex-direction: column; }
  .geo-ranking-scope { align-self: flex-start; }
}

/* v0.8.23 — premium geographic analytics */
.geo-performance-panel {
  margin-top: 18px;
  border: 1px solid #dfe7e3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(20, 39, 31, .055);
  background: #fff;
}
.geo-performance-head {
  padding: 20px 22px 17px;
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  border-bottom: 1px solid #e7ece9;
}
.geo-title-block { display: grid; gap: 3px; }
.geo-title-block h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.geo-title-block p { margin: 0; }
.geo-eyebrow {
  color: #3b8553;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.geo-map-controls { gap: 9px; }
.geo-map-controls .geo-metric-control { min-width: 164px; gap: 6px; }
.geo-map-controls .geo-metric-control span {
  color: #7b8781;
  font-size: 9px;
  letter-spacing: .08em;
}
.geo-map-controls .compact-select {
  min-height: 39px;
  border-color: #d9e2dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 38, 27, .025);
}
.geo-performance-body { grid-template-columns: minmax(0, 1.95fr) minmax(285px, .72fr); min-height: 535px; }
.geo-map-wrap {
  padding: 16px 16px 13px;
  background: #f5f8f7;
  border-right: 1px solid #e3e9e6;
}
.geo-performance-map {
  min-height: 440px;
  max-height: 600px;
  border: 1px solid #d6e1dc;
  border-radius: 16px;
  background: #eaf1f4;
  box-shadow: 0 8px 24px rgba(22, 45, 34, .07), inset 0 0 0 1px rgba(255,255,255,.55);
}
.geo-basemap { filter: saturate(.86) contrast(1.035); }
.geo-reference circle {
  fill: #526761;
  opacity: .72;
  stroke: rgba(255,255,255,.96);
  stroke-width: 1.7;
}
.geo-reference text {
  fill: #566861;
  font-size: 10.5px;
  font-weight: 760;
  opacity: .84;
  paint-order: stroke;
  stroke: rgba(248,251,249,.98);
  stroke-width: 3.5px;
}
.geo-bubble-halo { opacity: .18; filter: blur(.4px); }
.geo-bubble-core {
  opacity: .96;
  stroke: rgba(255,255,255,.98);
  stroke-width: 3.4;
  filter: drop-shadow(0 5px 8px rgba(18, 44, 38, .20));
}
.geo-bubble-label {
  fill: #102d31;
  font-size: 10px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255,255,255,.94);
  stroke-width: 3.7px;
}
.geo-bubble:hover .geo-bubble-core,
.geo-bubble:focus .geo-bubble-core { stroke-width: 5; filter: drop-shadow(0 7px 12px rgba(18, 44, 38, .28)); }
.geo-bubble:hover .geo-bubble-halo,
.geo-bubble:focus .geo-bubble-halo { opacity: .30; }
.geo-map-toolbar {
  top: 28px;
  left: 28px;
  padding: 5px;
  gap: 2px;
  border: 1px solid rgba(207, 220, 214, .94);
  border-radius: 11px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 20px rgba(26, 49, 39, .10);
  backdrop-filter: blur(10px);
}
.geo-map-tool {
  min-width: 34px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263b33;
  font-size: 17px;
  font-weight: 800;
}
.geo-map-tool:hover, .geo-map-tool:focus-visible { background: #edf5f1; border-color: transparent; }
.geo-map-tool.geo-map-fit { min-width: 42px; padding: 0 9px; font-size: 10.5px; }
#dashboard-geo-zoom-label {
  min-width: 45px;
  color: #67766e;
  font-size: 10px;
  font-weight: 800;
}
.geo-map-summary {
  position: absolute;
  z-index: 5;
  top: 28px;
  right: 28px;
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 9px 12px;
  border: 1px solid rgba(207, 220, 214, .92);
  border-radius: 11px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 20px rgba(26, 49, 39, .10);
  backdrop-filter: blur(10px);
}
.geo-map-summary span {
  color: #79877f;
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.geo-map-summary strong { color: #183e34; font-size: 15px; letter-spacing: -.02em; }
.geo-map-tooltip {
  width: min(255px, calc(100% - 24px));
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 11px;
  background: rgba(18, 36, 31, .96);
  box-shadow: 0 16px 34px rgba(13, 31, 24, .24);
  color: #fff;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line;
}
.geo-map-legend {
  margin-top: 10px;
  padding: 9px 11px;
  gap: 16px;
  border-color: #dce5e1;
  border-radius: 10px;
  background: #fff;
}
.geo-legend-item { display: flex; align-items: center; gap: 6px; color: #52635b; }
.geo-legend-copy { display: grid; gap: 1px; margin-left: 3px; }
.geo-legend-copy b { font-size: 9.5px; line-height: 1.1; }
.geo-legend-copy small { color: #849089; font-size: 8.5px; }
.geo-size-dot { background: #238b8d; border: 2px solid #fff; box-shadow: 0 0 0 1px #a8c9c5; opacity: .94; }
.geo-colour-legend { margin-left: auto; gap: 5px; }
.geo-scale-swatches {
  display: grid;
  grid-template-columns: repeat(5, 24px);
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(21,65,63,.14);
  border-radius: 999px;
}
.geo-scale-swatch { display: block; min-width: 0; }
.geo-scale-label { color: #89948e; font-size: 8.5px; font-weight: 750; }
.geo-map-foot {
  margin-top: 9px;
  padding: 0 2px;
  color: #7c8882;
  font-size: 10px;
}
.geo-map-foot strong { color: #255f52; }
.geo-ranking { background: #fff; }
.geo-ranking-head {
  padding: 17px 16px 13px;
  background: #fbfcfb;
  border-bottom: 1px solid #e9eeeb;
}
.geo-ranking-head > div:first-child { gap: 3px; }
.geo-ranking-head > div:first-child span { color: #728079; font-size: 9.5px; }
.geo-ranking-head > div:first-child strong { color: #1e5d4c; font-size: 11px; }
.geo-ranking-scope {
  padding: 3px;
  border: 1px solid #dce5e0;
  border-radius: 9px;
  background: #f3f6f4;
}
.geo-ranking-scope button {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 9px;
}
.geo-rank-row {
  grid-template-columns: 25px minmax(0,1fr) auto;
  gap: 10px;
  padding: 13px 15px;
  border-bottom-color: #edf1ef;
  transition: background .12s ease, transform .12s ease;
}
.geo-rank-row:hover, .geo-rank-row:focus-visible { background: #f6faf8; transform: translateX(1px); }
.geo-rank-number {
  width: 24px;
  height: 24px;
  background: #edf5f2;
  color: #2b6756;
  border: 1px solid #dae8e2;
}
.geo-rank-place { gap: 2px; }
.geo-rank-place strong { color: #23322c; font-size: 13px; }
.geo-rank-place small { color: #87938d; font-size: 9.5px; }
.geo-rank-meter {
  display: block;
  width: min(120px, 100%);
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ef;
}
.geo-rank-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #57b9b5, #14566f);
}
.geo-rank-value { color: #173f3c; font-size: 12.5px; }
.geo-privacy-note {
  padding: 9px 18px;
  background: #fbfcfb;
  color: #84908a;
  font-size: 9.5px;
}

@media (max-width: 900px) {
  .geo-performance-body { grid-template-columns: 1fr; }
  .geo-map-wrap { border-right: 0; border-bottom: 1px solid #e3e9e6; }
  .geo-map-summary { top: 22px; right: 20px; }
  .geo-map-toolbar { top: 22px; left: 20px; }
}
@media (max-width: 620px) {
  .geo-performance-head { padding: 16px; }
  .geo-map-wrap { padding: 10px; }
  .geo-performance-map { min-height: 330px; border-radius: 13px; }
  .geo-map-summary { display: none; }
  .geo-map-legend { display: none; }
}

/* v0.8.24 — deeper geographic zoom with stable markers */
.geo-performance-map { cursor: grab; }
.geo-bubble,
.geo-reference { transform-box: fill-box; transform-origin: center; }
.geo-bubble-core,
.geo-bubble-halo,
.geo-reference circle { vector-effect: non-scaling-stroke; }
.geo-bubble-halo { opacity: .14; }
.geo-bubble-core { stroke-width: 2.6; }
.geo-bubble-label {
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  font-size: 8.4px;
  stroke-width: 3px;
}
.geo-bubble-label.is-visible { opacity: 1; }
.geo-bubble-locality {
  opacity: 0;
  pointer-events: none;
  fill: #2c3f39;
  font-size: 8.5px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255,255,255,.96);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  transition: opacity .12s ease;
}
.geo-bubble-locality.is-visible { opacity: .92; }
.geo-reference text {
  font-size: 9px;
  stroke-width: 3px;
}
.geo-detail-medium .geo-reference text { opacity: .92; }
.geo-detail-high .geo-reference text { font-weight: 850; }
.geo-detail-high .geo-basemap { filter: saturate(.82) contrast(1.08); }
.geo-map-foot span:last-child::after {
  content: " · max 2400%";
  color: #9aa49f;
}

/* v0.8.25 — geographically aligned Leaflet / OpenStreetMap performance map */
.geo-performance-map.geo-leaflet-map {
  display:block;
  width:100%;
  height:560px;
  min-height:460px;
  max-height:none;
  overflow:hidden;
  border:1px solid #d5dfdb;
  border-radius:16px;
  background:#e8f0f2;
  box-shadow:0 8px 24px rgba(22,45,34,.07), inset 0 0 0 1px rgba(255,255,255,.55);
  cursor:grab;
  touch-action:pan-x pan-y;
}
.geo-performance-map.geo-leaflet-map:active { cursor:grabbing; }
.geo-leaflet-map .leaflet-tile-pane { filter:saturate(.86) contrast(.97) brightness(1.035); }
.geo-leaflet-map .leaflet-control-zoom {
  margin:12px 0 0 12px !important;
  border:1px solid rgba(199,212,206,.95) !important;
  border-radius:11px !important;
  box-shadow:0 8px 20px rgba(26,49,39,.10) !important;
  overflow:hidden;
}
.geo-leaflet-map .leaflet-control-zoom a {
  width:34px !important;
  height:34px !important;
  line-height:32px !important;
  border:0 !important;
  background:rgba(255,255,255,.96) !important;
  color:#243d34 !important;
  font-weight:800 !important;
}
.geo-leaflet-map .leaflet-control-zoom a:hover { background:#eef6f2 !important; }
.geo-leaflet-map .leaflet-control-attribution {
  margin:0 !important;
  padding:2px 6px !important;
  background:rgba(255,255,255,.88) !important;
  color:#65736c !important;
  font-size:9px !important;
  backdrop-filter:blur(6px);
}
.geo-leaflet-map .leaflet-control-attribution a { color:#2d6e5c !important; }
.geo-map-fit-floating {
  position:absolute;
  z-index:500;
  top:34px;
  left:70px;
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(199,212,206,.95);
  border-radius:9px;
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 20px rgba(26,49,39,.10);
  color:#244437;
  font:inherit;
  font-size:10.5px;
  font-weight:850;
  cursor:pointer;
  backdrop-filter:blur(8px);
}
.geo-map-fit-floating:hover,.geo-map-fit-floating:focus-visible { background:#eef6f2; outline:none; }
.geo-map-summary { z-index:500; }
.geo-leaflet-bubble { filter:drop-shadow(0 3px 5px rgba(19,45,40,.22)); cursor:pointer; }
.geo-leaflet-hover.leaflet-tooltip {
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:9px;
  background:rgba(18,36,31,.96);
  box-shadow:0 12px 26px rgba(13,31,24,.22);
  color:#fff;
  font-size:10.5px;
  line-height:1.45;
}
.geo-leaflet-hover.leaflet-tooltip:before { border-top-color:rgba(18,36,31,.96); }
.geo-leaflet-outcode-label.leaflet-tooltip {
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:#102d31;
  font-size:9.5px;
  font-weight:900;
  text-align:center;
  text-shadow:-1px -1px 0 rgba(255,255,255,.95),1px -1px 0 rgba(255,255,255,.95),-1px 1px 0 rgba(255,255,255,.95),1px 1px 0 rgba(255,255,255,.95),0 0 5px rgba(255,255,255,1);
  pointer-events:none;
}
.geo-leaflet-outcode-label.leaflet-tooltip:before { display:none; }
.geo-leaflet-outcode-label span { display:block; }
.geo-leaflet-outcode-label small { display:block; margin-top:2px; color:#52655d; font-size:8px; font-weight:750; white-space:nowrap; }
.geo-map-unavailable { height:100%; min-height:460px; display:grid; place-content:center; gap:5px; padding:30px; text-align:center; color:#53655c; }
.geo-map-unavailable strong { color:#233d32; font-size:15px; }
.geo-map-unavailable span { font-size:11px; }
@media (max-width:700px) {
  .geo-performance-map.geo-leaflet-map { height:430px; min-height:380px; }
  .geo-map-fit-floating { top:29px; left:64px; }
  .geo-map-summary { top:22px; right:20px; min-width:105px; }
}

/* v0.8.26 — in-panel outcode drill-down + mobile directions */
#dashboard-geo-ranking-view[hidden],
.geo-side-detail[hidden] { display: none !important; }
.geo-ranking.is-detail { background: #fbfcfb; }
.geo-side-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  background: #fff;
}
.geo-detail-header {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 15px 15px 13px;
  border-bottom: 1px solid #e8eeeb;
  background: linear-gradient(180deg,#fff 0%,#fbfcfb 100%);
}
.geo-detail-back {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e4df;
  border-radius: 10px;
  background: #fff;
  color: #214c3e;
  font: inherit;
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(24,58,45,.05);
}
.geo-detail-back:hover,.geo-detail-back:focus-visible { background:#edf6f1; outline:none; }
.geo-detail-header span {
  display: block;
  margin-bottom: 3px;
  color: #7d8b84;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.geo-detail-header h3 { margin: 0; color: #1c3028; font-size: 15px; line-height: 1.2; letter-spacing: -.015em; }
.geo-detail-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  border-bottom: 1px solid #e8eeeb;
  background: #e8eeeb;
}
.geo-detail-summary > div { min-width:0; padding: 10px 9px; background:#fff; }
.geo-detail-summary span { display:block; color:#87938d; font-size:7.8px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.geo-detail-summary strong { display:block; margin-top:3px; overflow:hidden; color:#173f34; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.geo-detail-caption { padding: 10px 14px; color:#76847d; font-size:9.5px; line-height:1.45; background:#fbfcfb; border-bottom:1px solid #edf1ef; }
.geo-detail-job-list { min-height:0; overflow:auto; padding: 10px; scrollbar-width: thin; }
.geo-detail-job {
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid #e0e8e4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(18,44,34,.035);
}
.geo-detail-job:last-child { margin-bottom:0; }
.geo-detail-job-head { display:flex; align-items:flex-start; justify-content:space-between; gap:9px; }
.geo-detail-job-head > div { min-width:0; display:grid; gap:2px; }
.geo-detail-job-head > strong { flex:0 0 auto; color:#173f34; font-size:12px; }
.geo-detail-client-name {
  max-width:100%;
  padding:0;
  border:0;
  background:transparent;
  color:#1b2e27;
  font:inherit;
  font-size:12px;
  font-weight:850;
  line-height:1.25;
  text-align:left;
  cursor:pointer;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.geo-detail-client-name:not(:disabled):hover,.geo-detail-client-name:not(:disabled):focus-visible { color:#2f8056; text-decoration:underline; outline:none; }
.geo-detail-client-name:disabled { cursor:default; }
.geo-detail-job-head small { color:#87938d; font-size:8.8px; }
.geo-detail-location {
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 8px;
  align-items:center;
  margin-top:9px;
  padding:8px 9px;
  border:1px solid #e3ebe7;
  border-radius:9px;
  background:#f8fbf9;
}
.geo-detail-location > span { color:#849189; font-size:7.5px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.geo-postcode-link {
  justify-self:start;
  padding:3px 7px;
  border:1px solid #bcd8cc;
  border-radius:999px;
  background:#eef7f3;
  color:#236048;
  font:inherit;
  font-size:9.5px;
  font-weight:900;
  letter-spacing:.02em;
  cursor:pointer;
}
.geo-postcode-link:hover,.geo-postcode-link:focus-visible { border-color:#77aa93; background:#e0f1e9; outline:none; }
.geo-detail-location small { grid-column:1 / -1; color:#66766e; font-size:9px; line-height:1.4; white-space:pre-line; }
.geo-detail-job-stats { display:flex; gap:16px; margin-top:9px; }
.geo-detail-job-stats span { display:grid; gap:1px; }
.geo-detail-job-stats b { color:#30463c; font-size:10px; }
.geo-detail-job-stats small { color:#8b9690; font-size:8px; }
.geo-detail-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:10px; }
.geo-detail-actions .btn.small,.geo-map-link { min-height:29px; padding:5px 8px; border-radius:7px; font-size:8.8px; text-decoration:none; }
.geo-map-link { color:#315e52; }
@media (min-width:1051px) {
  .geo-ranking { max-height: 665px; overflow:hidden; }
  .geo-side-detail { max-height:665px; }
}
@media (max-width:1050px) {
  .geo-ranking.is-detail { display:block; }
  .geo-side-detail { height:auto; }
  .geo-detail-job-list { overflow:visible; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .geo-detail-job { margin:0; }
}
@media (max-width:700px) {
  .geo-detail-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .geo-detail-job-list { grid-template-columns:1fr; }
  .geo-detail-actions .btn.small,.geo-map-link { flex:1 1 calc(50% - 5px); text-align:center; justify-content:center; }
}

/* v0.8.27 — CRM client geography + fit all locations */
.geo-map-fit-actions {
  position:absolute;
  z-index:500;
  top:34px;
  left:70px;
  display:flex;
  gap:7px;
  align-items:center;
}
.geo-map-fit-actions .geo-map-fit-floating {
  position:static;
  top:auto;
  left:auto;
}
.geo-map-fit-floating.secondary {
  background:rgba(248,251,249,.96);
  color:#456158;
}
.geo-client-only-bubble { filter:drop-shadow(0 2px 4px rgba(35,96,72,.18)); }
.geo-detail-client-card {
  margin-bottom:9px;
  padding:11px;
  border:1px solid #dce8e2;
  border-radius:12px;
  background:linear-gradient(180deg,#fbfefc 0%,#f7fbf9 100%);
  box-shadow:0 3px 10px rgba(18,44,34,.03);
}
.geo-detail-client-card:last-child { margin-bottom:0; }
.geo-detail-section-title {
  margin:12px 12px 0;
  color:#6c7d75;
  font-size:8.5px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
@media (max-width:700px) {
  .geo-map-fit-actions { top:29px; left:64px; gap:5px; }
  .geo-map-fit-actions .geo-map-fit-floating { padding:0 8px; font-size:9px; }
}

/* v0.8.28 — modal/map stacking + period-scoped geography heat scale */
.modal-backdrop { z-index: 10000; }
.geo-map-wrap { position: relative; z-index: 0; isolation: isolate; }
.geo-performance-map.geo-leaflet-map { position: relative; z-index: 0; isolation: isolate; }
body.modal-open .geo-performance-map.geo-leaflet-map { pointer-events: none; }
body.modal-open .geo-map-fit-actions,
body.modal-open .geo-map-summary { pointer-events: none; }
.geo-scale-extents { display:flex; align-items:center; gap:5px; margin-top:3px; color:#5e6e66; font-size:8px; font-weight:750; white-space:nowrap; }
.geo-scale-extents b { color:#27473a; font-size:8.5px; }
.geo-scale-extents i { color:#9aa59f; font-style:normal; font-weight:700; }

/* v0.8.29 — quote client picker + lead-source geography */
.geo-source-control { min-width: 170px; }
.geo-source-mix {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:10px 12px 2px;
}
.geo-source-mix > span {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:2px 8px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #dce8e2;
  border-radius:11px;
  background:#fbfdfc;
}
.geo-source-mix b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#24342d; font-size:10px; }
.geo-source-mix strong { color:#287b4b; font-size:12px; }
.geo-source-mix small { grid-column:1 / -1; color:#7b8982; font-size:8.5px; }

.import-project-review.manual-client-project { grid-template-columns:1fr 1fr 1fr; align-items:start; }
.quote-client-picker {
  border:1px solid #d8e5dd;
  border-radius:14px;
  background:linear-gradient(180deg,#fbfefc 0%,#f8fcf9 100%);
  padding:13px;
  box-shadow:0 4px 16px rgba(26,67,48,.04);
}
.quote-client-picker.wide { grid-column:span 2; }
.quote-client-picker-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.quote-client-picker-head > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.quote-client-picker-head span,
.quote-inline-new-client-title span { color:#6f7e77; font-size:8px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.quote-client-picker-head strong { color:#17261f; font-size:13px; }
.quote-client-search { position:relative; }
.quote-client-search input { width:100%; padding-right:36px; background:#fff; }
.quote-client-search > span { position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#668074; font-size:16px; pointer-events:none; }
.quote-client-search-results { display:grid; gap:6px; margin-top:7px; }
.quote-client-search-results > button {
  appearance:none;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  padding:9px 10px;
  border:1px solid #e0e9e4;
  border-radius:10px;
  background:#fff;
  text-align:left;
  cursor:pointer;
}
.quote-client-search-results > button:hover { border-color:#68a97e; background:#f5fbf7; }
.quote-client-search-results strong { color:#1d2b25; font-size:10.5px; }
.quote-client-search-results small { color:#75827c; font-size:8.5px; }
.quote-client-selected {
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #cfe3d5;
  border-radius:12px;
  background:#fff;
}
.quote-client-avatar {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#173343;
  color:#fff;
  font-weight:900;
  font-size:11px;
  letter-spacing:.02em;
}
.quote-client-selected > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.quote-client-selected strong { color:#16251f; font-size:11px; }
.quote-client-selected small { color:#708078; font-size:8.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quote-inline-new-client { margin-top:10px; padding:12px; border:1px solid #bcd9c5; border-radius:12px; background:#f5fbf7; }
.quote-inline-new-client-title { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.quote-inline-new-client-title > div { display:flex; flex-direction:column; gap:2px; }
.quote-inline-new-client-title strong { font-size:11px; color:#173324; }
.quote-inline-new-client-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:10px; }
.import-project-review input[readonly] { background:#f3f6f4; color:#4c5a53; cursor:default; }
@media (max-width:900px) {
  .import-project-review.manual-client-project { grid-template-columns:1fr 1fr; }
  .quote-client-picker.wide { grid-column:1 / -1; }
  .geo-source-mix { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .import-project-review.manual-client-project { grid-template-columns:1fr; }
  .import-project-review.manual-client-project > * { grid-column:1 !important; }
  .quote-client-picker-head { align-items:flex-start; flex-direction:column; }
  .quote-client-selected { grid-template-columns:36px minmax(0,1fr); }
  .quote-client-selected .btn { grid-column:1 / -1; width:100%; }
}
.field-helper { display:block; margin-top:4px; color:#7d8b84; font-size:8px; font-weight:650; }

/* v0.8.30 — professional quote setup workspace */
.quote-entry-mode {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:190px;
  padding:10px 13px;
  border:1px solid #dce8e1;
  border-radius:12px;
  background:#fbfdfc;
  color:#22332a;
}
.quote-entry-dot {
  width:9px;
  height:9px;
  flex:0 0 9px;
  border-radius:50%;
  background:#3b934f;
  box-shadow:0 0 0 5px #e8f4eb;
}
.quote-entry-mode > div { display:grid; grid-template-columns:auto auto; align-items:baseline; gap:1px 8px; }
.quote-entry-mode small { grid-column:1 / -1; font-size:8px; line-height:1; font-weight:900; letter-spacing:.11em; color:#7b8a82; }
.quote-entry-mode strong { font-size:12px; color:#1a2d22; }
.quote-entry-mode em { font-size:9px; font-style:normal; font-weight:750; color:#478b3c; }

.quote-setup-shell { max-width:1180px; margin:0 auto 16px; }
.quote-setup-grid {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.quote-setup-card {
  position:relative;
  min-width:0;
  padding:20px;
  border:1px solid #dfe8e3;
  border-radius:17px;
  background:#fff;
  box-shadow:0 1px 2px rgba(22,53,37,.025), 0 8px 24px rgba(22,53,37,.035);
}
.quote-setup-project { grid-column:span 5; }
.quote-setup-client { grid-column:span 7; }
.quote-setup-location { grid-column:1 / -1; }
.quote-setup-card-head {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:12px;
  align-items:start;
  margin-bottom:17px;
}
.quote-setup-card-head-action { grid-template-columns:36px minmax(0,1fr) auto; }
.quote-setup-card-head > div { min-width:0; }
.quote-setup-index {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#edf6ef;
  color:#2e7e45;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}
.quote-setup-card-head small {
  display:block;
  margin:1px 0 3px;
  color:#5b8d68;
  font-size:8.5px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.1em;
}
.quote-setup-card-head h3 {
  margin:0;
  color:#17261f;
  font-size:16px;
  line-height:1.25;
  letter-spacing:-.015em;
}
.quote-setup-card-head p {
  margin:4px 0 0;
  max-width:560px;
  color:#7a8780;
  font-size:10px;
  line-height:1.45;
}
.quote-setup-fields { display:grid; gap:12px; }
.quote-setup-fields-two { grid-template-columns:1fr 1fr; }
.quote-setup-field { display:grid; gap:6px; min-width:0; }
.quote-setup-field > span {
  color:#66746d;
  font-size:9px;
  font-weight:850;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.quote-setup-field > span em {
  margin-left:4px;
  color:#9aa59f;
  font-size:8px;
  font-style:normal;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}
.quote-setup-field input,
.quote-client-search.professional input {
  min-height:44px;
  border-color:#d8e1dc;
  border-radius:11px;
  background:#fff;
  color:#17261f;
  font-size:13px;
  box-shadow:inset 0 1px 0 rgba(23,38,31,.01);
}
.quote-setup-field input::placeholder,
.quote-client-search.professional input::placeholder { color:#9aa49f; }
.quote-setup-field input:focus,
.quote-client-search.professional input:focus {
  border-color:#5b9c68;
  box-shadow:0 0 0 3px rgba(71,139,60,.11);
}

.quote-add-client-button {
  align-self:start;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:35px;
  padding:0 11px;
  border:1px solid #cfe0d4;
  border-radius:9px;
  background:#f8fcf9;
  color:#2b7140;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
  transition:background .15s,border-color .15s,transform .05s;
}
.quote-add-client-button span { font-size:15px; line-height:1; }
.quote-add-client-button:hover { border-color:#8ebd99; background:#eef7f0; }
.quote-add-client-button:active { transform:translateY(1px); }

.quote-client-search-stack { position:relative; }
.quote-client-search.professional { position:relative; }
.quote-client-search.professional input { padding-left:42px; padding-right:14px; }
.quote-search-icon {
  position:absolute;
  z-index:2;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  color:#60806a;
  font-size:17px;
  line-height:1;
  pointer-events:none;
}
.quote-search-helper {
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:7px;
  color:#849088;
  font-size:9px;
}
.quote-search-helper-dot { width:5px; height:5px; border-radius:50%; background:#9fc2a8; }
.quote-client-search-results.professional {
  position:absolute;
  z-index:15;
  top:52px;
  left:0;
  right:0;
  max-height:300px;
  overflow:auto;
  display:grid;
  gap:0;
  margin:0;
  padding:6px;
  border:1px solid #dbe5df;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(19,46,31,.15);
}
.quote-client-search-results.professional > button {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 24px;
  gap:10px;
  align-items:center;
  padding:9px;
  border:0;
  border-radius:9px;
  background:#fff;
}
.quote-client-search-results.professional > button + button { border-top:1px solid #edf1ee; }
.quote-client-search-results.professional > button:hover { background:#f3f8f4; }
.quote-result-avatar {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#183747;
  color:#fff;
  font-size:9px;
  font-weight:900;
}
.quote-result-copy { display:grid; gap:1px; min-width:0; text-align:left; }
.quote-result-copy strong { color:#1a2a22; font-size:10.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quote-result-copy small { color:#7f8b85; font-size:8.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quote-result-copy small:last-child { color:#61766a; }
.quote-result-arrow { color:#6d9a77; font-size:15px; }
.quote-search-empty { display:grid; gap:2px; padding:16px 12px; text-align:center; }
.quote-search-empty strong { color:#25362e; font-size:10px; }
.quote-search-empty span { color:#89948e; font-size:8.5px; }

.quote-client-selected.professional {
  min-height:68px;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:12px;
  padding:11px 12px;
  border:1px solid #cfe1d4;
  border-radius:12px;
  background:linear-gradient(180deg,#fbfefc,#f7fbf8);
  box-shadow:none;
}
.quote-client-selected.professional .quote-client-avatar {
  width:44px;
  height:44px;
  border-radius:11px;
  background:#173747;
  font-size:11px;
}
.quote-client-selected-main { display:grid !important; gap:2px !important; min-width:0; }
.quote-client-name-row { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.quote-client-name-row strong { color:#17261f; font-size:12px; }
.quote-client-linked-pill {
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:0 7px;
  border-radius:999px;
  background:#e8f5eb;
  color:#2f7d45;
  font-size:7.5px;
  font-weight:900;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.quote-client-selected.professional small { color:#718078; font-size:8.5px; }
.quote-client-location-line { color:#4f6659 !important; }
.quote-change-client-button {
  min-height:32px;
  padding:0 10px;
  border:1px solid #d7e2dc;
  border-radius:8px;
  background:#fff;
  color:#33463c;
  font-size:9px;
  font-weight:800;
}
.quote-change-client-button:hover { border-color:#9bbda4; background:#f7fbf8; }

.quote-inline-new-client.professional {
  margin-top:12px;
  padding:15px;
  border:1px solid #cfe1d4;
  border-radius:13px;
  background:#f8fcf9;
}
.quote-inline-new-client.professional .quote-inline-new-client-title { margin-bottom:12px; }
.quote-inline-new-client.professional .quote-inline-new-client-title strong { font-size:12px; }
.quote-inline-new-client.professional .quote-inline-new-client-title small { margin-top:2px; color:#7b8982; font-size:8.5px; }
.quote-new-client-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; }
.quote-new-client-grid .span-2 { grid-column:1 / -1; }
.quote-inline-new-client.professional .quote-inline-new-client-actions { margin-top:12px; }

.quote-setup-location .quote-setup-card-head { grid-template-columns:36px minmax(0,1fr) auto; margin-bottom:14px; }
.quote-profile-sync-pill {
  align-self:start;
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:0 9px;
  border-radius:999px;
  background:#edf7ef;
  color:#347c48;
  font-size:8px;
  font-weight:850;
  white-space:nowrap;
}
.quote-location-grid { display:grid; grid-template-columns:minmax(0,1fr) 190px; gap:12px; }
.quote-postcode-field input { text-transform:uppercase; }

.import-review-summary.manual-summary {
  max-width:1180px;
  gap:0;
  overflow:hidden;
  border:1px solid #dfe7e2;
  border-radius:13px;
  background:#fff;
  box-shadow:0 3px 14px rgba(22,53,37,.03);
}
.import-review-summary.manual-summary span {
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:12px 16px;
  border:0;
  border-right:1px solid #edf1ee;
  border-radius:0;
  background:#fff;
  color:#87918c;
  font-size:8.5px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.import-review-summary.manual-summary span:last-child { border-right:0; }
.import-review-summary.manual-summary strong { margin:0 0 2px; color:#192920; font-size:17px; letter-spacing:-.02em; }
.import-review-toolbar.manual-toolbar { margin-top:22px; margin-bottom:12px; }
.import-review-toolbar.manual-toolbar strong { font-size:15px; }
.import-review-toolbar.manual-toolbar small { margin-top:2px; font-size:9px; }

@media (max-width:980px) {
  .quote-setup-project, .quote-setup-client, .quote-setup-location { grid-column:1 / -1; }
  .quote-client-search-results.professional { position:static; margin-top:6px; box-shadow:0 10px 26px rgba(19,46,31,.1); }
}
@media (max-width:700px) {
  .quote-entry-mode { width:100%; min-width:0; }
  .quote-setup-card { padding:15px; border-radius:14px; }
  .quote-setup-card-head, .quote-setup-card-head-action, .quote-setup-location .quote-setup-card-head { grid-template-columns:32px minmax(0,1fr); }
  .quote-setup-index { width:32px; height:32px; }
  .quote-add-client-button, .quote-profile-sync-pill { grid-column:1 / -1; justify-self:start; margin-left:44px; }
  .quote-setup-fields-two, .quote-new-client-grid, .quote-location-grid { grid-template-columns:1fr; }
  .quote-new-client-grid .span-2 { grid-column:auto; }
  .quote-client-selected.professional { grid-template-columns:40px minmax(0,1fr); }
  .quote-client-selected.professional .quote-client-avatar { width:40px; height:40px; }
  .quote-change-client-button { grid-column:1 / -1; width:100%; }
  .import-review-summary.manual-summary { grid-template-columns:1fr 1fr; }
  .import-review-summary.manual-summary span:nth-child(2) { border-right:0; }
  .import-review-summary.manual-summary span:nth-child(-n+2) { border-bottom:1px solid #edf1ee; }
}


/* v0.8.31 — ensure Visual Designer always sits above quote/proposal/map layers */
body.windowcad-open { overflow: hidden; }
body.windowcad-open > .modal-backdrop { pointer-events: none; }
body.windowcad-open > .windowcad-designer-backdrop { pointer-events: auto; }
.windowcad-designer-backdrop { isolation: isolate; }
.windowcad-designer-shell { position: relative; z-index: 1; }


/* v0.8.32 — proposals reporting controls, sortable table and unified typography */
/* v0.8.33 — Google Inter variable font is now the primary application typeface */
body, .app-shell, .modal, .panel, .card, .toolbar, .table-wrap, .proposal-shell,
.quote-wizard, .windowcad-shell, .client-profile-shell, .dashboard-shell {
  font-family: var(--font-ui);
}

.proposals-panel { overflow: hidden; }
.proposals-table thead th { padding-top: 0; padding-bottom: 0; }
.proposals-table thead th.money .table-sort { justify-content: flex-end; width: 100%; }
.table-sort {
  width: 100%; min-height: 44px; border: 0; background: transparent; color: #646477;
  display: inline-flex; align-items: center; gap: 7px; padding: 0; text-align: left;
  font-family: var(--font-ui); font-size: 12px; font-weight: 760; letter-spacing: .01em;
}
.table-sort i {
  font-style: normal; color: #a4a5b1; font-size: 12px; line-height: 1;
  opacity: .72; transition: color .14s ease, opacity .14s ease, transform .14s ease;
}
.table-sort:hover { color: var(--ink); }
.table-sort:hover i { color: var(--primary); opacity: 1; }
.table-sort.active { color: var(--ink); }
.table-sort.active i { color: var(--primary); opacity: 1; }
.table-sort:focus-visible { outline: 2px solid rgba(71,139,60,.45); outline-offset: 3px; border-radius: 5px; }
.proposal-actions-column { width: 84px; }
.quotes-toolbar { margin-top: 14px; }
.quotes-filter-controls { min-width: min(420px, 100%); }



/* v0.8.45 — clearer client directory and modal client profile UX. */
.clients-table-polished { min-width: 1240px; table-layout: fixed; }
.clients-table-polished col.client-col-name { width: 260px; }
.clients-table-polished col.client-col-contact { width: 210px; }
.clients-table-polished col.client-col-address { width: 300px; }
.clients-table-polished col.client-col-postcode { width: 110px; }
.clients-table-polished col.client-col-activity { width: 160px; }
.clients-table-polished col.client-col-value { width: 150px; }
.clients-table-polished col.client-col-source { width: 140px; }
.clients-table-polished col.client-col-actions { width: 96px; }
.client-list-identity { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; align-items: center; min-width: 0; }
.client-name-link { max-width: none; }
.client-name-link strong { font-size: 13px; line-height: 1.2; }
.client-name-link small { margin-top: 4px; color: #7a857f; font-size: 10px; }
.client-list-badges { flex-wrap: wrap; margin-top: 4px; }
.client-location-stack { max-width: none; }
.client-location-stack > span { -webkit-line-clamp: 3; }
.client-postcode-column { text-align: left; }
.client-postcode-empty { color: #8a958f; font-size: 10px; }
.client-row { cursor: pointer; }
.client-row td:last-child { cursor: default; }

.client-profile-modal-shell { display: grid; gap: 14px; }
.client-profile-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: -4px; }
.client-profile-identity-no-avatar { grid-column: 1 / span 1; }
.client-profile-modal-shell .client-profile-banner { grid-template-columns: minmax(0,1fr) auto; }
.client-profile-modal-shell .client-profile-banner-aside { min-width: 185px; }
.client-profile-modal-shell .client-profile-tabs { margin-bottom: 0; }
@media (max-width: 900px) {
  .client-profile-modal-actions { justify-content: stretch; flex-wrap: wrap; }
  .client-profile-modal-actions .btn { flex: 1 1 180px; }
  .client-profile-modal-shell .client-profile-banner { grid-template-columns: 1fr; }
}

/* v0.8.44 — proposals filters and table brought into line with the polished Clients formatting. */
.quotes-directory-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  margin: 0 0 14px;
  border: 1px solid #e1e7e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(24,41,57,.035);
}
.proposal-filter-pills { width: 100%; }
.quotes-filter-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px,1fr) auto;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
}
.quotes-directory-search { position: relative; min-width: 0; }
.quotes-directory-search .search {
  width: 100%; max-width: none; min-width: 0; height: 43px;
  padding-left: 40px; border-color: #dce4df; background: #fbfcfb;
}
.quotes-directory-search .search:focus { background: #fff; }
.quotes-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 2; color: #718078; font-size: 21px; line-height: 1; pointer-events: none;
}
.quotes-clear-filters { height: 43px; white-space: nowrap; }

.proposal-directory-table-card {
  overflow: hidden;
  border: 1px solid #dfe6e1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(24,41,57,.045);
}
.proposal-directory-table-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-bottom: 1px solid #e8ece9;
  background: linear-gradient(180deg,#fff,#fbfdfb);
}
.proposal-directory-table-head h2 { margin: 0; color: #192b38; font-size: 15px; }
.proposal-directory-table-head p { margin: 4px 0 0; color: #84908a; font-size: 11px; }
.proposal-directory-count {
  min-width: 35px; height: 28px; padding: 0 10px; border-radius: 999px;
  display: inline-grid; place-items: center; background: #edf6ef; color: #347843;
  font-size: 11px; font-weight: 900;
}
.proposals-table-polished { min-width: 1180px; table-layout: fixed; }
.proposals-table-polished col.proposal-col-ref { width: 140px; }
.proposals-table-polished col.proposal-col-job { width: 320px; }
.proposals-table-polished col.proposal-col-client { width: 190px; }
.proposals-table-polished col.proposal-col-created { width: 140px; }
.proposals-table-polished col.proposal-col-status { width: 130px; }
.proposals-table-polished col.proposal-col-margin { width: 170px; }
.proposals-table-polished col.proposal-col-total { width: 150px; }
.proposals-table-polished col.proposal-col-actions { width: 84px; }
.proposals-table-polished thead th {
  padding: 11px 14px; color: #6d7872; background: #f8faf8; border-bottom-color: #e5eae6;
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.proposals-table-polished tbody td { padding: 14px; border-bottom-color: #edf0ee; vertical-align: middle; }
.proposals-table-polished tbody tr:last-child td { border-bottom: 0; }
.proposals-table-polished tbody tr:hover { background: #f7fbf8; }
.proposals-table-polished td.proposal-col-ref strong,
.proposals-table-polished td.proposal-col-total strong { color: #1f3228; }
.proposal-cell-text {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #2b3c34;
}
.proposals-table-polished td.proposal-col-margin { text-align: right; }
.proposals-table-polished td.proposal-col-margin strong { display:block; font-variant-numeric: tabular-nums; }
.proposals-table-polished td.proposal-col-margin small { display:block; margin-top: 2px; font-size: 10px; }
.proposals-table-polished td.proposal-col-total,
.proposals-table-polished th.proposal-col-total,
.proposals-table-polished td.proposal-col-margin,
.proposals-table-polished th.proposal-col-margin { text-align: right; }
.proposals-table-polished td.proposal-col-actions { text-align: right; }
.proposals-table-polished .table-actions { justify-content: flex-end; }
.proposals-table-polished .table-sort { min-height: auto; padding: 0; }
.proposals-table-polished .proposal-col-total .table-sort,
.proposals-table-polished .proposal-col-margin .table-sort { justify-content: flex-end; }

@media (max-width: 960px) {
  .quotes-filter-controls { grid-template-columns: 1fr; }
  .quotes-clear-filters { width: 100%; }
}

@media (max-width: 860px) {
  .quotes-toolbar { align-items: stretch; }
  .quotes-filter-controls { width: 100%; min-width: 0; }
}

/* v0.8.34 — typography parity with the OrderWolf Glazing demo
   Eco Glaze colours/branding stay unchanged; this block only normalises the
   type stack and the core UI hierarchy to the supplied glazing-demo stylesheet. */
:root {
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html, body,
button, input, select, textarea, table,
.app-shell, .modal, .panel, .toolbar, .table-wrap,
.quote-wizard, .windowcad-designer-shell, .client-profile-shell {
  font-family: var(--font-ui);
}
body { font-weight: 400; }

/* Main workspace typography — mirrors the glazing demo. */
.brand-title { font-size: 15px; line-height: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand-subtitle { font-size: 10px; line-height: 15px; }
.nav-item { font-size: 14px; line-height: 20px; font-weight: 450; }
.nav-item.active { font-weight: 650; }
.topbar h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.topbar p { margin: 4px 0 0; font-size: 13px; font-weight: 400; }
.btn { font-weight: 750; }
.btn.small { font-size: 12px; }
.panel-header h2, .panel h2, .team-panel-header h2 { font-size: 17px; font-weight: 700; }

/* Dashboard hierarchy — same compact Inter treatment as the glazing demo. */
.dashboard-kpi-top { font-size: 11px; font-weight: 800; letter-spacing: .025em; }
.dashboard-kpi > strong { font-size: 27px; line-height: 1; font-weight: 700; letter-spacing: -.045em; }
.dashboard-kpi > small { font-size: 11px; font-weight: 400; }
.pipeline-stage-name { font-size: 12px; font-weight: 750; }

/* Tables / filters. Keep sortable headings visually identical to normal demo headers. */
th, td { font-size: 13px; }
th { font-weight: 800; }
.pill { font-size: 12px; font-weight: 700; }
.table-sort { font-size: 13px; font-weight: 800; letter-spacing: 0; }
.table-subtitle { font-weight: 450; }

/* Forms and dialogs. */
.auth-card h2 { font-size: 30px; font-weight: 700; }
.auth-card label, .field { font-size: 13px; font-weight: 700; }
.modal-head h2 { font-size: 21px; font-weight: 700; }

/* Quote workflow values from the glazing-demo reference. */
.quote-wizard-topbar > strong { font-size: 19px; font-weight: 750; }
.quote-step { font-size: 14px; font-weight: 650; }
.quote-step-heading h2 { font-size: 25px; line-height: 1.15; letter-spacing: -.025em; font-weight: 780; }
.quote-step-heading p { font-size: 16px; font-weight: 400; }
.quote-field { font-size: 14px; font-weight: 650; }
.quote-field input, .quote-field select, .quote-field textarea, .quote-map-search input { font-size: 15px; font-weight: 430; }

/* Visual Designer stays compact but uses the same Inter hierarchy. */
.windowcad-designer-head h2 { font-size: 22px; font-weight: 700; }
.windowcad-designer-head p { font-size: 12px; font-weight: 400; }
.windowcad-tabs button { font-size: 11px; font-weight: 800; }
.windowcad-control-title h3 { font-size: 22px; font-weight: 700; }
.windowcad-control-title p { font-size: 12px; font-weight: 400; }
.windowcad-option-card strong { font-size: 12px; font-weight: 700; }
.windowcad-control-row label, .windowcad-dimension-grid label { font-size: 10px; font-weight: 800; }

@media (max-width: 760px) {
  .topbar h1 { font-size: 21px; }
  .dashboard-kpi > strong { font-size: 21px; }
}


/* v0.8.36 — quotation workspace visual parity with the OrderWolf Glazing demo.
   Styling only: all Eco Glaze quote fields, tabs, pricing controls and preview behaviour are unchanged. */
.modal-backdrop:has(.glazing-quote-modal) {
  padding: 0;
  background: #fff;
}
.glazing-quote-modal {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.glazing-quote-modal > .modal-body { height: 100vh; }
.glazing-editor-shell {
  background: #f7f8fc;
  color: #17172a;
}
.glazing-editor-topbar {
  min-height: 70px;
  padding: 0 max(22px, calc((100vw - 1500px) / 2));
  gap: 18px;
  border-bottom: 0;
  background: linear-gradient(90deg, #172735 0%, #203442 68%, #254e45 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.glazing-editor-title > button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  color: #d9e4e0;
}
.glazing-editor-title > button:hover { background: rgba(255,255,255,.11); color: #fff; }
.glazing-editor-title span { color: #8dc49b; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.glazing-editor-title strong { color: #fff; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.glazing-editor-tabs {
  align-self: center;
  height: 42px;
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 11px;
  background: rgba(255,255,255,.055);
}
.glazing-editor-tabs button {
  min-width: 90px;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  color: #bdc9c5;
  font-size: 13px;
  font-weight: 650;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.glazing-editor-tabs button:hover { background: rgba(255,255,255,.07); color: #fff; }
.glazing-editor-tabs button.active {
  background: #fff;
  color: #285f35;
  box-shadow: 0 2px 7px rgba(5,17,13,.18);
}
.glazing-editor-tabs button.active::after { display: none; }
.glazing-editor-actions .btn {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}
.glazing-editor-actions .btn.secondary {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  color: #f2f6f4;
}
.glazing-editor-actions .btn.secondary:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); }
.glazing-editor-actions .btn.primary {
  background: #2f8f53;
  border-color: #2f8f53;
  box-shadow: 0 7px 16px rgba(15,71,39,.22);
}
.glazing-editor-actions .btn.primary:hover { background: #287a47; }

.glazing-editor-workspace {
  grid-template-columns: minmax(650px, 1.28fr) minmax(430px, .72fr);
  background: #f7f8fc;
}
.glazing-editor-panel { padding: 26px 28px 44px; }
.glazing-preview-column {
  padding: 24px 28px 44px;
  border-left: 1px solid #e3e4ea;
  background: #f0f2f4;
}
.glazing-preview-toolbar {
  width: min(100%, 640px);
  margin-bottom: 12px;
  color: #777887;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .10em;
}
.glazing-preview-toolbar strong { color: #4f5260; font-size: 11px; font-weight: 700; }

.glazing-panel-card {
  max-width: 900px;
  padding: 26px;
  border: 1px solid #e4e2ea;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31,24,65,.04), 0 10px 28px rgba(31,24,65,.045);
}
.glazing-panel-card + .glazing-panel-card { margin-top: 18px; }
.glazing-panel-heading { margin-bottom: 24px; }
.glazing-panel-heading.compact { margin-bottom: 18px; }
.glazing-panel-heading > span,
.glazing-panel-heading > div > span {
  margin-bottom: 7px;
  color: #2f8f53;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}
.glazing-panel-heading h2 {
  color: #19182b;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: -.025em;
}
.glazing-panel-heading p {
  margin-top: 6px;
  color: #817f91;
  font-size: 14px;
  line-height: 1.5;
}
.glazing-mode-toggle {
  padding: 4px;
  margin-bottom: 22px;
  border-color: #e0dde7;
  border-radius: 10px;
  background: #f4f3f6;
}
.glazing-mode-toggle button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  color: #706d7b;
  font-size: 13px;
  font-weight: 650;
}
.glazing-mode-toggle button.active {
  color: #285f35;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31,24,65,.10);
}
.glazing-form-grid,
.glazing-opening-grid { gap: 17px 16px; }
.glazing-form-grid label,
.glazing-opening-grid label,
.glazing-spec-field {
  gap: 7px;
  color: #34323e;
  font-size: 13px;
  font-weight: 650;
}
.glazing-form-grid label small,
.glazing-opening-grid label small { color: #8c8998; font-size: 10px; font-weight: 500; }
.glazing-form-grid input,
.glazing-form-grid select,
.glazing-form-grid textarea,
.glazing-opening-grid input,
.glazing-opening-grid select,
.glazing-spec-field input {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dedbe6;
  border-radius: 9px;
  color: #242031;
  background: #fff;
  font-size: 14px;
  font-weight: 430;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.glazing-form-grid textarea { min-height: 96px; line-height: 1.45; }
.glazing-form-grid input:focus,
.glazing-form-grid select:focus,
.glazing-form-grid textarea:focus,
.glazing-opening-grid input:focus,
.glazing-opening-grid select:focus,
.glazing-spec-field input:focus {
  border-color: #4a9a64;
  box-shadow: 0 0 0 3px rgba(47,143,83,.11);
  outline: 0;
}

.glazing-pricing-shell {
  max-width: 1120px;
  grid-template-columns: 178px minmax(0,1fr);
  gap: 18px;
}
.glazing-spec-sidebar {
  padding: 7px;
  border-color: #e2dfe7;
  border-radius: 11px;
  box-shadow: 0 3px 14px rgba(31,24,65,.04);
}
.glazing-spec-sidebar button {
  min-height: 42px;
  border-radius: 8px;
  color: #655f75;
  font-size: 12px;
  font-weight: 650;
}
.glazing-spec-sidebar button:hover { background: #f6f7f6; color: #285f35; }
.glazing-spec-sidebar button.active { background: #edf7f1; color: #247044; }
.glazing-default-spec,
.glazing-openings-section { padding: 22px; }
.glazing-openings-section { margin-top: 16px !important; }
.glazing-add-actions .btn { min-height: 38px; padding: 0 12px; font-size: 12px; }
.glazing-opening-list { gap: 14px; }
.glazing-opening-card {
  border-color: #e3e0e8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31,24,65,.025);
}
.glazing-opening-head {
  padding: 14px 15px;
  border-bottom-color: #ece9ef;
  background: #fcfbfd;
}
.glazing-opening-head span { color: #2f8f53; font-size: 9px; font-weight: 850; }
.glazing-opening-head h3 { color: #252231; font-size: 14px; font-weight: 700; }
.glazing-opening-grid { padding: 16px; }
.glazing-opening-specs {
  margin: 0 16px 16px;
  border-color: #e3e0e8;
  border-radius: 9px;
}
.glazing-opening-specs summary { padding: 11px 12px; color: #554f60; font-size: 12px; font-weight: 700; }
.glazing-money-input b {
  border-color: #dedbe6;
  background: #f7f6f8;
  color: #777281;
}
.glazing-empty-openings {
  border-color: #d9d5df;
  background: #faf9fc;
  color: #716d7b;
}
.glazing-commercial-summary { gap: 12px; }
.glazing-commercial-summary > div {
  padding: 15px;
  border-color: #e3e0e8;
  border-radius: 10px;
  background: #fbfbfc;
}
.glazing-commercial-summary > div.primary { border-color: #cfe4d6; background: #f0f8f2; }
.glazing-commercial-summary span { color: #807b8e; }
.glazing-commercial-summary strong { color: #211f2b; font-size: 17px; font-weight: 750; }

.glazing-structure-list label {
  padding: 14px;
  border-color: #e3e0e8;
  border-radius: 10px;
  background: #fbfbfc;
}
.glazing-structure-list strong { color: #2a2734; font-size: 13px; }
.glazing-structure-list small { color: #807c89; font-size: 11px; }
.glazing-structure-callout { background: #eff7f1; color: #386047; }

.glazing-preview-paper {
  border-color: #dcdde2;
  border-radius: 2px;
  box-shadow: 0 10px 34px rgba(25,24,40,.11);
}

@media (max-width: 1180px) {
  .glazing-editor-topbar { padding: 9px 14px 0; }
  .glazing-editor-tabs {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    min-height: 42px;
    border-top: 0;
    margin-bottom: 8px;
  }
  .glazing-editor-workspace { grid-template-columns: minmax(560px,1fr) minmax(360px,.72fr); }
}
@media (max-width: 760px) {
  .glazing-quote-modal, .glazing-quote-modal > .modal-body { min-height: 100dvh; height: 100dvh !important; }
  .glazing-editor-topbar { padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .glazing-editor-tabs { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .glazing-editor-tabs button { min-width: 86px; }
  .glazing-editor-panel { padding: 14px; }
  .glazing-preview-column { padding: 18px 14px 30px; }
  .glazing-panel-card { padding: 18px; }
  .glazing-panel-heading h2 { font-size: 22px; }
  .glazing-form-grid label, .glazing-opening-grid label, .glazing-spec-field { font-size: 12px; }
}


/* v0.8.37 — Wolf AI importer presentation + canonical W × H dimension language. */
.wolf-ai-import-staging { min-height: calc(100vh - 80px); }
.wolf-ai-top-progress { margin-bottom: 28px; }
.wolf-ai-source-grid { align-items: stretch; }
.wolf-ai-upload-panel,
.wolf-ai-workflow { min-height: 388px; }
.wolf-ai-workflow { padding: 22px 24px; }
.wolf-ai-workflow-head { display:flex; align-items:center; gap:12px; margin-bottom:7px; }
.wolf-ai-workflow-head > div { min-width:0; }
.wolf-ai-workflow-head h3 { margin:0; font-size:17px; color:var(--ink); }
.wolf-ai-workflow-head p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.wolf-ai-badge { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; min-width:68px; height:28px; padding:0 9px; border-radius:8px; background:#172735; color:#7cdf9b; font-size:9px; font-weight:900; letter-spacing:.12em; }
.wolf-ai-workflow .import-explainer-step { position:relative; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; min-height:72px; padding:13px 0; transition:background .18s,border-color .18s; }
.wolf-ai-workflow .import-explainer-step > span { transition:background .18s,color .18s,box-shadow .18s; }
.wolf-step-state { align-self:center; padding:4px 7px; border-radius:999px; background:#f1f4f2; color:#84908a; font-size:8px; line-height:1; font-weight:850; text-transform:uppercase; letter-spacing:.05em; }
.wolf-ai-workflow .import-explainer-step.working { margin-inline:-9px; padding-inline:9px; border-radius:10px; background:#f2faf5; border-bottom-color:transparent; }
.wolf-ai-workflow .import-explainer-step.working > span { background:#2f8f53; color:#fff; box-shadow:0 0 0 5px #e8f5ec; }
.wolf-ai-workflow .import-explainer-step.working .wolf-step-state { background:#dff3e6; color:#1d7143; }
.wolf-ai-workflow .import-explainer-step.next .wolf-step-state { background:#fff7df; color:#9b6a12; }

.wolf-ai-processing-panel { width:min(1180px,100%); margin:18px auto 0; padding:16px 18px 14px; border:1px solid #cae4d3; border-radius:14px; background:linear-gradient(180deg,#f7fcf9,#f1f9f4); box-shadow:0 8px 24px rgba(32,86,54,.06); }
.wolf-ai-processing-panel[hidden] { display:none !important; }
.wolf-ai-processing-main { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:13px; }
.wolf-ai-processing-spinner { width:34px; height:34px; border:3px solid #d5eadc; border-top-color:#2f8f53; border-radius:50%; animation:wolf-ai-spin .85s linear infinite; }
@keyframes wolf-ai-spin { to { transform:rotate(360deg); } }
.wolf-ai-processing-main > div { min-width:0; display:grid; gap:2px; }
.wolf-ai-processing-kicker { color:#2f8f53; font-size:8px; font-weight:900; letter-spacing:.14em; }
.wolf-ai-processing-main strong { color:#172735; font-size:14px; line-height:1.3; }
.wolf-ai-processing-main p { margin:0; color:#607069; font-size:10.5px; line-height:1.45; }
.wolf-ai-processing-main > b { color:#2f6847; font-size:10px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wolf-ai-processing-track { position:relative; height:5px; margin:13px 0 9px; overflow:hidden; border-radius:999px; background:#deebe3; }
.wolf-ai-processing-track > span { position:absolute; top:0; bottom:0; left:-30%; width:30%; border-radius:999px; background:linear-gradient(90deg,rgba(47,143,83,.08),#2f8f53,rgba(47,143,83,.08)); animation:wolf-ai-track 1.35s ease-in-out infinite; }
@keyframes wolf-ai-track { 0%{ transform:translateX(0); } 100%{ transform:translateX(440%); } }
.wolf-ai-processing-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.wolf-ai-processing-footer span { color:#54645b; font-size:10px; }
.wolf-ai-processing-footer small { color:#7e8a84; font-size:9px; text-align:right; }

.dimension-standard-note { max-width:1180px; margin:0 auto 10px; display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid #d9e7de; border-radius:10px; background:#f6faf7; color:#607069; font-size:10px; line-height:1.45; }
.dimension-standard-note strong { flex:0 0 auto; color:#246a42; font-size:9px; letter-spacing:.04em; text-transform:uppercase; }
.dimension-standard-note b { color:#34483d; }

@media (max-width:900px) {
  .wolf-ai-upload-panel,.wolf-ai-workflow { min-height:0; }
  .wolf-ai-processing-main { grid-template-columns:34px minmax(0,1fr); }
  .wolf-ai-processing-main > b { grid-column:2; }
  .wolf-ai-processing-footer { align-items:flex-start; flex-direction:column; gap:4px; }
  .wolf-ai-processing-footer small { text-align:left; }
  .dimension-standard-note { flex-direction:column; gap:4px; }
}
@media (prefers-reduced-motion:reduce) {
  .wolf-ai-processing-spinner,.wolf-ai-processing-track > span { animation:none; }
  .wolf-ai-processing-track > span { left:0; width:55%; }
}


/* v0.8.46 — calendar month grid completed with adjacent-month placeholders, consistent cell sizing and subtle overflow/add controls. */
.month-only-calendar .month-grid {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  grid-auto-rows: 1fr;
}
.month-only-calendar .month-day {
  min-height: 156px;
  height: 156px;
  display: flex;
  flex-direction: column;
}
.month-only-calendar .month-day.outside {
  background: #fbfcfb;
}
.month-only-calendar .month-day.outside .outside-number {
  color: #a7b2ab;
  cursor: default;
}
.month-only-calendar .month-day > header {
  flex: 0 0 auto;
}
.month-only-calendar .month-events {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 135, 120, .35) transparent;
}
.month-only-calendar .month-events::-webkit-scrollbar {
  width: 6px;
}
.month-only-calendar .month-events::-webkit-scrollbar-track {
  background: transparent;
}
.month-only-calendar .month-events::-webkit-scrollbar-thumb {
  background: rgba(113, 135, 120, .32);
  border-radius: 999px;
}
.month-only-calendar .month-events.scrollable {
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 10px), transparent 100%);
}
.month-only-calendar .month-event {
  flex: 0 0 auto;
}
.month-only-calendar .month-more {
  display: none;
}
.month-only-calendar .month-add,
.compact-week-day .compact-day-add,
.compact-day-agenda .compact-agenda-add {
  color: #6e8f73;
  font-size: 13px;
  font-weight: 500;
  opacity: .75;
}
.month-only-calendar .month-add:hover,
.compact-week-day .compact-day-add:hover,
.compact-day-agenda .compact-agenda-add:hover {
  opacity: 1;
}
.compact-week-day {
  display: flex;
  flex-direction: column;
}
.compact-day-events {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 135, 120, .35) transparent;
}
.compact-day-events::-webkit-scrollbar {
  width: 6px;
}
.compact-day-events::-webkit-scrollbar-track {
  background: transparent;
}
.compact-day-events::-webkit-scrollbar-thumb {
  background: rgba(113, 135, 120, .32);
  border-radius: 999px;
}


/* v0.8.47 — month grid ends at the final relevant week and event cards have a fixed, non-stretching size. */
.month-only-calendar .month-events {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
}
.month-only-calendar .month-event {
  box-sizing: border-box;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  padding: 6px 9px;
  overflow: hidden;
}
.month-only-calendar .month-event > strong,
.month-only-calendar .month-event > small {
  line-height: 1.2;
}
.month-only-calendar .month-event > strong {
  height: 14px;
}
.month-only-calendar .month-event > small {
  height: 11px;
}

/* v0.8.48 — month cells comfortably show two fixed-height appointments before scrolling is needed. */
.month-only-calendar .month-day {
  min-height: 180px;
  height: 180px;
}


/* v0.8.49 — cleaner sortable headings and sortable lead-source share. */
.eco-source-sort,
.eco-sales-sort,
.table-sort {
  position: relative;
  border-bottom: 2px solid transparent;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.eco-source-sort.active,
.eco-sales-sort.active,
.table-sort.active {
  color: var(--primary);
  border-bottom-color: rgba(71,139,60,.55);
}
.eco-source-sort:hover,
.eco-sales-sort:hover,
.table-sort:hover {
  color: var(--ink);
}
.table-sort i { display: none !important; }


/* v0.8.50 — sort indicators only appear on the active sort column; no underline/tab treatment. */
.eco-source-sort,
.eco-sales-sort,
.table-sort {
  border-bottom: 0 !important;
  transition: color .14s ease, background .14s ease;
}
.eco-source-sort.active,
.eco-sales-sort.active,
.table-sort.active {
  color: var(--primary);
  border-bottom-color: transparent !important;
}
.sort-direction {
  display: inline-block;
  margin-left: 5px;
  color: currentColor;
  font-size: .95em;
  font-weight: 800;
  line-height: 1;
}
.eco-source-sort,
.eco-sales-sort {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.table-sort {
  gap: 0;
}


/* v0.8.51 — Proposal Builder navigation and toolbar consistency. */
.builder-top-actions .builder-download-link {
  text-decoration: none;
}
.builder-top-actions .builder-download-link:hover,
.builder-top-actions .builder-download-link:focus,
.builder-top-actions .builder-download-link:visited {
  text-decoration: none;
}
.builder-edit-quote {
  white-space: nowrap;
}

/* v0.8.59 — WindowCAD professional configurator: product-aware controls, provenance and low-clutter custom layouts. */
.windowcad-designer-body{grid-template-columns:minmax(0,1.7fr) minmax(330px,.62fr)}
.windowcad-preview-stage{padding:18px 20px 22px}
.windowcad-control-panel{padding:20px 18px 24px}
.windowcad-stage-meta{width:min(720px,100%);align-items:center;gap:12px}
.windowcad-stage-meta>span{min-width:110px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.windowcad-product-heading{display:flex;flex-direction:column;align-items:center;gap:1px;flex:1;min-width:0}
.windowcad-product-heading strong{font-size:13px;color:#172735}
.windowcad-product-heading small{font-size:9.5px;color:#7c8882;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.windowcad-product-card{margin-bottom:13px;padding:12px}
.windowcad-layout-filter{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:10px 0 12px;padding:4px;border:1px solid #dfe6e2;border-radius:10px;background:#f4f7f5}
.windowcad-layout-filter button{border:0;background:transparent;border-radius:7px;padding:7px 8px;font:inherit;font-size:10px;font-weight:800;color:#69766f;cursor:pointer}
.windowcad-layout-filter button.active{background:#fff;color:#277947;box-shadow:0 1px 4px rgba(22,43,34,.08)}
.windowcad-option-grid.compact-layouts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.windowcad-option-grid.compact-layouts .windowcad-option-card{min-height:58px;padding:8px 9px;gap:4px}
.windowcad-option-grid.compact-layouts .windowcad-option-card>span{font-size:19px}
.windowcad-pane-inspector{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px;border:1px solid #dfe7e3;border-radius:12px;background:#fbfcfb}
.windowcad-pane-inspector>label{display:flex;flex-direction:column;gap:5px;color:#6c7973;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.windowcad-pane-inspector select{width:100%;height:38px;border:1px solid #d7e0db;border-radius:8px;background:#fff;padding:0 9px;color:#1d3028;font:inherit;font-size:11px;font-weight:700;text-transform:none;letter-spacing:0}
.windowcad-pane-inspector .windowcad-pane-detail-grid{grid-column:1/-1;margin:0;padding:0;border:0}
.windowcad-master-check{grid-column:1/-1!important;display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:8px!important;padding:8px 9px;border:1px solid #e0e7e3;border-radius:9px;background:#fff}
.windowcad-master-check input{margin-top:2px}
.windowcad-master-check span{display:flex;flex-direction:column;gap:1px;text-transform:none;letter-spacing:0}
.windowcad-master-check strong{font-size:10px;color:#24372f}.windowcad-master-check small{font-size:9px;color:#7a8781}
.windowcad-draw-pane small{max-width:92%;font-size:7.5px;font-weight:700;color:#617069;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.windowcad-advanced-layout{border:1px solid #dfe7e3;border-radius:11px;background:#fbfcfb;overflow:hidden}
.windowcad-advanced-layout summary{cursor:pointer;list-style:none;padding:10px 12px;color:#30463d;font-size:10px;font-weight:800}
.windowcad-advanced-layout summary::-webkit-details-marker{display:none}
.windowcad-advanced-layout summary:after{content:'▾';float:right;color:#7c8982}.windowcad-advanced-layout[open] summary:after{content:'▴'}
.windowcad-advanced-body{padding:0 12px 12px;border-top:1px solid #e6ebe8}
.windowcad-advanced-body p{margin:9px 0;color:#78857e;font-size:9.5px;line-height:1.4}
.windowcad-advanced-body>small{display:block;margin-top:8px;color:#88938e;font-size:9px;line-height:1.4}
.windowcad-advanced-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.windowcad-advanced-actions button,.windowcad-draw-actions button{min-height:34px;border:1px solid #d9e2dd;border-radius:8px;background:#fff;color:#3b5147;font:inherit;font-size:9.5px;font-weight:750;cursor:pointer}
.windowcad-advanced-actions button:hover,.windowcad-draw-actions button:hover{background:#f1f7f3;border-color:#b7d1bf}.windowcad-advanced-actions button:disabled{opacity:.4;cursor:not-allowed}
.windowcad-provenance{display:inline-flex!important;align-self:flex-start;margin-top:1px;padding:2px 6px;border-radius:999px;background:#eef2ef;color:#65736c;font-size:8px!important;font-weight:800!important;letter-spacing:.02em!important;text-transform:none!important}
.windowcad-provenance.user-edited{background:#e8f5ec;color:#297348}.windowcad-provenance.ai-extracted{background:#eef3fa;color:#45637c}.windowcad-provenance.supplier,.windowcad-provenance.survey{background:#edf5ef;color:#3c6e4c}
.windowcad-dimension-grid.professional{grid-template-columns:1fr 1fr}
.windowcad-tech-readout em{display:inline-flex;align-self:flex-start;margin-top:2px;padding:1px 5px;border-radius:999px;background:#eef2ef;color:#728078;font-style:normal;font-size:7.5px;font-weight:800}
.windowcad-source-warning.review{border-color:#e8d9aa;background:#fff9e8;color:#675e43}.windowcad-source-warning.review strong{color:#8a6a18}
.windowcad-angle-control label{grid-template-columns:auto auto minmax(120px,1fr) auto 42px;gap:8px}
.windowcad-angle-control label>small{font-size:8px;color:#8a958f;white-space:nowrap}
.windowcad-angle-control.travel b,.windowcad-angle-control.fold b{color:#236e43}
.windowcad-3d-slider-pull{position:absolute;width:11px;height:36px;transform:translateY(-50%) translateZ(10px);z-index:10;display:grid;place-items:center}.windowcad-3d-slider-pull i{display:block;width:4px;height:28px;border-radius:999px;box-shadow:0 1px 2px rgba(0,0,0,.18)}
.windowcad-3d-handle.window{width:30px;height:30px}.windowcad-3d-handle.door{width:38px;height:38px}
.windowcad-3d-cill.threshold{height:8px;bottom:-21px;left:-16px;right:-16px;transform:translateZ(8px) rotateX(78deg);box-shadow:0 3px 6px rgba(26,42,36,.12)}
.opening-dimension-normalised{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:6px 0 2px;padding:6px 8px;border:1px solid #dbe7df;border-radius:8px;background:#f4f9f5;color:#66766e;font-size:9px}.opening-dimension-normalised strong{color:#244736}.opening-dimension-normalised i{font-style:normal;color:#3a8b57}
.opening-visual-review-note{display:flex;gap:7px;align-items:flex-start;margin:6px 0 2px;padding:7px 8px;border:1px solid #eadcaf;border-radius:8px;background:#fffaf0;color:#6f6547;font-size:9px;line-height:1.35}.opening-visual-review-note strong{color:#8a6a18;white-space:nowrap}
@media(max-width:1050px){.windowcad-designer-body{grid-template-columns:minmax(0,1.45fr) minmax(320px,.75fr)}}
@media(max-width:900px){.windowcad-designer-body{grid-template-columns:1fr}.windowcad-pane-inspector{grid-template-columns:1fr}.windowcad-master-check{grid-column:auto!important}.windowcad-angle-control label{grid-template-columns:1fr auto minmax(100px,1fr) auto 40px}.windowcad-stage-meta>span{min-width:0}.windowcad-product-heading{align-items:flex-start}.windowcad-product-heading small{white-space:normal}.windowcad-option-grid.compact-layouts{grid-template-columns:1fr 1fr}}
.windowcad-tech-readout{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.windowcad-tech-readout{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.windowcad-tech-readout{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v0.8.60 — WindowCAD premium refinement: product-specific hardware, cleaner dimensions and stronger 3D product geometry. */
.windowcad-control-panel{background:#fff}
.windowcad-control-title{margin-bottom:16px}
.windowcad-control-title>span{font-size:9px;letter-spacing:.12em;color:#2f8f53;font-weight:850}
.windowcad-control-title h3{margin:5px 0 5px;font-size:22px;line-height:1.05;color:#142633;letter-spacing:-.02em}
.windowcad-control-title p{max-width:36ch;margin:0;color:#78847e;font-size:11px;line-height:1.55}
.windowcad-form-section{margin-top:14px;padding:14px;border:1px solid #e0e7e3;border-radius:13px;background:#fbfcfb}
.windowcad-form-section>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:11px;padding-bottom:8px;border-bottom:1px solid #e9eeeb}
.windowcad-form-section>header strong{font-size:11px;color:#22372f}
.windowcad-form-section>header span{font-size:9px;color:#89938e;white-space:nowrap}
.windowcad-dimension-grid.professional{margin-top:0;gap:10px 12px}
.windowcad-dimension-grid.professional label{min-width:0;gap:5px}
.windowcad-dimension-grid.professional label>span{min-height:14px;line-height:1.25;color:#617069;font-size:9px;letter-spacing:.035em}
.windowcad-input-with-unit{display:flex;align-items:center;height:42px;border:1px solid #d7e0db;border-radius:10px;background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.windowcad-input-with-unit:focus-within{border-color:#5a9c6d;box-shadow:0 0 0 3px rgba(69,143,84,.10)}
.windowcad-input-with-unit input{min-width:0!important;flex:1;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;padding:0 10px!important;height:40px!important;font-size:13px!important;font-weight:750!important;color:#21332c!important}
.windowcad-input-with-unit b{display:grid;place-items:center;align-self:stretch;min-width:38px;border-left:1px solid #edf1ef;background:#f7f9f8;color:#79867f;font-size:9px;font-weight:800;text-transform:none}
.windowcad-control-row.compact{margin-top:0}
.windowcad-provenance{min-height:16px;margin-top:0!important;padding:2px 6px!important;border:1px solid transparent;background:#eef1ef!important;color:#69766f!important;font-size:7.5px!important;font-weight:800!important}
.windowcad-provenance.supplier{background:#edf2f7!important;border-color:#d9e2ec;color:#486075!important}
.windowcad-provenance.survey{background:#eef4f8!important;border-color:#dce7ee;color:#416779!important}
.windowcad-provenance.ai-extracted{background:#f3eff8!important;border-color:#e5daef;color:#6d5280!important}
.windowcad-provenance.presentation-default{background:#f0f2f1!important;border-color:#e4e8e6;color:#77827c!important}
.windowcad-provenance.user-edited{background:#eaf5ed!important;border-color:#d4e8d9;color:#287247!important}
.windowcad-dimension-interpretation{display:grid;grid-template-columns:1fr auto 1.12fr;align-items:center;gap:10px;margin-top:14px;padding:12px 13px;border:1px solid #dce7df;border-radius:12px;background:#f5faf6}
.windowcad-dimension-interpretation>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.windowcad-dimension-interpretation span{font-size:7.5px;letter-spacing:.08em;color:#7c8982;font-weight:850}
.windowcad-dimension-interpretation strong{font-size:10px;color:#355248}
.windowcad-dimension-interpretation b{font-size:12px;color:#17392a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.windowcad-dimension-interpretation i{font-style:normal;color:#7d9484;font-size:14px}
.windowcad-dimension-interpretation small{align-self:flex-start;margin-top:2px;padding:2px 6px;border-radius:999px;background:#e9f4ec;color:#35734a;font-size:7.5px;font-weight:800}
.windowcad-assumption-note{margin-top:14px;padding:11px 12px;border:1px solid #e0e7e3;border-radius:11px;background:#f8faf9;display:flex;flex-direction:column;gap:3px}
.windowcad-assumption-note strong{font-size:10px;color:#344b41}.windowcad-assumption-note span{font-size:9.5px;line-height:1.45;color:#77847d}
.windowcad-tech-readout{grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:7px}
.windowcad-tech-readout span{position:relative;min-width:0;padding:8px 9px 7px;gap:1px;border-color:#e2e8e5;border-radius:10px;background:#fcfdfc}
.windowcad-tech-readout strong{font-size:8.3px;color:#587066;letter-spacing:.045em}
.windowcad-tech-readout b{min-width:0;color:#263c33;font-size:10.5px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.windowcad-tech-readout em{margin-top:3px;border:1px solid transparent;font-size:7px!important}
.windowcad-tech-readout em.supplier{background:#edf2f7;color:#486075}.windowcad-tech-readout em.survey{background:#eef4f8;color:#416779}.windowcad-tech-readout em.ai-extracted{background:#f3eff8;color:#6d5280}.windowcad-tech-readout em.user-edited{background:#eaf5ed;color:#287247}

.windowcad-preview-stage{background-image:linear-gradient(rgba(225,232,228,.58) 1px,transparent 1px),linear-gradient(90deg,rgba(225,232,228,.58) 1px,transparent 1px);background-size:24px 24px;background-color:#f6f8f7}
.windowcad-preview-viewport{background:#f8faf9;border-color:#e0e7e3;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.windowcad-3d-scene{height:430px;background:linear-gradient(180deg,#fbfcfb 0%,#f1f5f2 70%,#edf2ef 100%)}
.windowcad-3d-sheet-frame{inset:16px;background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(249,251,250,.96));border-color:#dfe6e2}
.windowcad-3d-model{filter:drop-shadow(0 12px 15px rgba(24,41,34,.08))}
.windowcad-3d-outer{box-shadow:0 18px 30px rgba(27,44,37,.12),inset 0 0 0 1px rgba(255,255,255,.26)}
.windowcad-3d-pane{box-shadow:0 4px 10px rgba(19,30,25,.06),inset 0 0 0 1px rgba(255,255,255,.28)}
.windowcad-3d-pane.slider-fixed{transform:translateZ(0)!important;z-index:2}
.windowcad-3d-pane.slider-active{z-index:4;box-shadow:0 6px 13px rgba(19,30,25,.10),inset 0 0 0 1px rgba(255,255,255,.34)}
.windowcad-3d-track{position:absolute;left:-20px;right:-20px;bottom:-24px;height:12px;transform:translateZ(7px) rotateX(76deg);transform-origin:center top;background:#d7ddd9;border:1px solid rgba(92,111,102,.22);box-shadow:0 4px 7px rgba(28,42,36,.10);z-index:1}
.windowcad-3d-track i{position:absolute;left:4%;right:4%;height:2px;background:rgba(79,97,88,.46);border-radius:999px}.windowcad-3d-track i:first-child{top:3px}.windowcad-3d-track i:last-child{bottom:3px}
.windowcad-3d-view.product-sliding-door .windowcad-3d-cill.threshold{height:6px;bottom:-28px;transform:translateZ(4px) rotateX(80deg);background:#bfc8c3}
.windowcad-3d-slider-pull{position:absolute;width:32px;height:48px;z-index:12;display:grid;place-items:center;transform:translateY(-50%) translateZ(14px);pointer-events:none}
.windowcad-3d-slider-pull svg{display:block;width:100%;height:100%;filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))}
.windowcad-3d-handle{transform-origin:center center;pointer-events:none}
.windowcad-3d-handle.window{width:30px;height:30px}.windowcad-3d-handle.door{width:30px;height:44px}.windowcad-3d-handle svg{display:block;width:100%;height:100%;overflow:visible}
.windowcad-3d-view.product-sash-window .windowcad-3d-pane{transition:transform .2s ease-out}
.windowcad-3d-view.product-bifold .windowcad-3d-pane{transition:transform .18s ease-out}
.windowcad-3d-view-badge{padding:4px 7px!important;border-radius:999px!important;background:rgba(255,255,255,.90)!important;border:1px solid #dfe6e2!important;color:#4d6258!important;font-size:7.5px!important;letter-spacing:.05em!important}
.windowcad-3d-note{max-width:690px;padding:0 8px;text-align:center;color:#7a8781}.windowcad-3d-note strong{color:#2d6544}
.windowcad-angle-control{padding:10px 12px;border-radius:12px;background:#fcfdfc}
.windowcad-angle-control label{grid-template-columns:auto auto minmax(150px,1fr) auto 44px}
.windowcad-angle-control input{width:100%}

@media(max-width:900px){
  .windowcad-form-section>header{align-items:flex-start;flex-direction:column;gap:2px}
  .windowcad-dimension-grid.professional{grid-template-columns:1fr}
  .windowcad-dimension-interpretation{grid-template-columns:1fr}.windowcad-dimension-interpretation>i{transform:rotate(90deg);justify-self:center}
}
.windowcad-option-card.layout-diagram{display:grid;grid-template-columns:48px 1fr;align-items:center;min-height:64px;text-align:left;gap:8px}
.windowcad-option-card.layout-diagram>span{display:grid;place-items:center;width:46px;height:32px;margin:0;border:1px solid #e2e8e5;border-radius:7px;background:#fff}
.windowcad-option-card.layout-diagram>span svg{display:block;width:42px;height:26px}
.windowcad-option-card.layout-diagram>strong{font-size:10.5px;line-height:1.2;color:#273a32}
.windowcad-option-card.layout-diagram.active>span{border-color:#95c3a2;background:#f4faf5}
.windowcad-option-grid.compact-layouts .windowcad-option-card.layout-diagram{padding:8px 9px;min-height:64px}
.opening-visual-interpretation{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px 10px;margin:6px 0 2px;padding:7px 9px;border:1px solid #dce7df;border-radius:8px;background:#f8fbf9;color:#6b7972;font-size:9px}
.opening-visual-interpretation>span{font-weight:800;color:#557064}.opening-visual-interpretation>strong{min-width:0;color:#263f34;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.opening-visual-interpretation>em{padding:2px 6px;border-radius:999px;background:#eaf4ed;color:#34724a;font-size:8px;font-style:normal;font-weight:800;white-space:nowrap}
.opening-visual-interpretation.review{border-color:#eadcaf;background:#fffaf0}.opening-visual-interpretation.review>em{background:#f8edcc;color:#86681d}
@media(max-width:760px){.opening-visual-interpretation{grid-template-columns:1fr}.opening-visual-interpretation>em{justify-self:start}}
.windowcad-fixed-preview-note{display:flex;align-items:center;gap:9px;padding:9px 11px;margin-bottom:9px;border:1px solid #e1e7e4;border-radius:11px;background:#fcfdfc;color:#7a8781;font-size:9px}.windowcad-fixed-preview-note>span{font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:#60716a}.windowcad-fixed-preview-note>strong{font-size:10px;color:#31463d}.windowcad-fixed-preview-note>button{margin-left:auto;border:1px solid #d8e1dd;background:#fff;border-radius:8px;padding:7px 10px;font:inherit;font-size:9px;font-weight:800;color:#51615a;cursor:pointer}

/* v0.8.61 — WindowCAD centring, dedicated thumbnails and hardware alignment */
.opening-visual-wrap{justify-content:center;align-items:center;min-height:72px}
.windowcad-thumbnail{width:88px;height:66px;display:grid;place-items:center;border-radius:9px;background:#fbfdfc;overflow:hidden}
.windowcad-thumbnail svg{display:block;width:88px;height:64px;max-width:100%;max-height:100%}
.opening-number .windowcad-thumbnail{margin:4px auto 7px}
.windowcad-preview-viewport{position:relative;justify-content:center;align-items:center;overflow:auto;min-height:440px;padding:16px}
.windowcad-preview-viewport>#wcad-preview-model{display:flex;align-items:center;justify-content:center;width:100%;min-height:390px;transform-origin:center center}
.windowcad-preview-content .windowcad-visual{width:min(690px,100%);margin:auto;box-sizing:border-box}
.windowcad-preview-content .windowcad-visual svg{margin:auto}
.windowcad-3d-view{margin:auto}
.windowcad-3d-scene{margin:auto}
.windowcad-3d-model{top:50%;left:50%}
.windowcad-3d-handle,.windowcad-3d-slider-pull{will-change:transform}
.windowcad-3d-handle.window{width:28px;height:28px}
.windowcad-3d-handle.door{width:32px;height:44px}
.windowcad-3d-slider-pull{width:28px;height:46px}
.windowcad-angle-control label{min-width:0}
.windowcad-angle-control small{color:#829089;font-size:8.5px;white-space:nowrap}
@media(max-width:900px){
  .windowcad-preview-viewport{min-height:350px;padding:10px}
  .windowcad-preview-viewport>#wcad-preview-model{min-height:310px}
}
/* v0.8.61 — final desktop composition polish */
@media(min-width:1051px){
  .windowcad-designer-body{grid-template-columns:minmax(0,1.65fr) minmax(360px,.75fr)}
}
.windowcad-preview-viewport{overflow:visible}
.windowcad-dimension-grid.professional label{display:grid;grid-template-rows:24px 42px 18px;gap:5px;align-content:start}
.windowcad-dimension-grid.professional label>span{min-height:24px;display:flex;align-items:flex-end;line-height:1.25}
.windowcad-dimension-grid.professional .windowcad-input-with-unit{height:42px}
.windowcad-dimension-grid.professional .windowcad-provenance{align-self:start}
.windowcad-form-section>header strong{letter-spacing:-.01em}
.windowcad-dimension-interpretation{box-shadow:0 1px 2px rgba(20,40,31,.025)}

/* v0.8.62 — 3D opening readability + correct hardware-face visibility */
.windowcad-3d-inner{position:absolute;inset:0;transform-style:preserve-3d}
.windowcad-3d-aperture{position:absolute;inset:1px;z-index:0;background:linear-gradient(180deg,rgba(244,248,246,.72),rgba(236,242,239,.58));border:1px solid rgba(89,107,98,.20);box-shadow:inset 0 0 0 5px rgba(255,255,255,.38);transform:translateZ(-3px);pointer-events:none}
.windowcad-3d-pane{backface-visibility:visible;outline:1px solid rgba(89,107,98,.16);outline-offset:-1px}
.windowcad-3d-outer{outline:1px solid rgba(89,107,98,.20);outline-offset:-1px}
.windowcad-3d-view.product-window .windowcad-3d-pane,.windowcad-3d-view.product-other .windowcad-3d-pane{transition:transform .18s ease-out}
.windowcad-3d-glass{backface-visibility:visible}
.windowcad-3d-view-badge{z-index:20}

/* v0.8.63 — WindowCAD commercial QA: opening readability, hardware reliability, view clarity */
.windowcad-preview-toolbar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;width:min(700px,100%)}
.windowcad-face-switch{justify-self:center;display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid #dce5e0;border-radius:10px;background:#f5f8f6}
.windowcad-face-switch>span{padding:0 7px 0 5px;color:#7a8781;font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.windowcad-face-switch button{height:30px;min-width:64px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:#65746d;font:inherit;font-size:9.5px;font-weight:800;cursor:pointer}
.windowcad-face-switch button.active{background:#fff;color:#287647;box-shadow:0 1px 3px rgba(18,39,29,.08)}
.windowcad-product-heading{position:relative}
.windowcad-product-heading em{display:inline-flex;margin-top:2px;padding:2px 6px;border-radius:999px;background:#eef4f0;color:#607269;font-size:7.5px;font-style:normal;font-weight:850;letter-spacing:.04em;text-transform:uppercase}

/* Moving leaf depth must remain readable at larger presentation angles. */
.windowcad-3d-pane{overflow:visible;transform-style:preserve-3d;will-change:transform}
.windowcad-3d-sash-edge{position:absolute;display:block;background:linear-gradient(90deg,color-mix(in srgb,var(--frame) 80%,#fff),var(--frame));border:1px solid rgba(50,66,59,.18);box-sizing:border-box;pointer-events:none;z-index:6;opacity:.98}
.windowcad-3d-sash-edge.closing-right{top:calc(var(--sash-depth) * -1);right:calc(var(--sash-depth) * -1);bottom:calc(var(--sash-depth) * -1);width:var(--sash-depth);transform-origin:left center;transform:rotateY(90deg)}
.windowcad-3d-sash-edge.closing-left{top:calc(var(--sash-depth) * -1);left:calc(var(--sash-depth) * -1);bottom:calc(var(--sash-depth) * -1);width:var(--sash-depth);transform-origin:right center;transform:rotateY(-90deg)}
.windowcad-3d-sash-edge.closing-top{left:calc(var(--sash-depth) * -1);right:calc(var(--sash-depth) * -1);top:calc(var(--sash-depth) * -1);height:var(--sash-depth);transform-origin:center bottom;transform:rotateX(90deg)}
.windowcad-3d-sash-edge.closing-bottom{left:calc(var(--sash-depth) * -1);right:calc(var(--sash-depth) * -1);bottom:calc(var(--sash-depth) * -1);height:var(--sash-depth);transform-origin:center top;transform:rotateX(-90deg)}
.windowcad-3d-pane.is-open{box-shadow:0 8px 18px rgba(25,43,35,.10),inset 0 0 0 1px rgba(255,255,255,.34)}
.windowcad-3d-pane.is-open .windowcad-3d-glass{box-shadow:inset 0 0 18px rgba(255,255,255,.30),0 1px 2px rgba(29,47,39,.05)}

/* Hardware must stay above sash edges and remain legible without looking oversized. */
.windowcad-3d-handle,.windowcad-3d-slider-pull{z-index:30!important;overflow:visible}
.windowcad-3d-handle svg,.windowcad-3d-slider-pull svg{filter:drop-shadow(0 1px 1px rgba(255,255,255,.35)) drop-shadow(0 1px 2px rgba(13,24,19,.36))}
.windowcad-3d-handle.window{width:31px;height:31px}
.windowcad-3d-handle.door{width:34px;height:46px}
.windowcad-3d-slider-pull{width:30px;height:48px}

/* Keep the aperture readable behind open leaves without competing with the product. */
.windowcad-3d-aperture{background:linear-gradient(180deg,rgba(245,249,247,.88),rgba(235,241,238,.70));border-color:rgba(78,99,89,.24);box-shadow:inset 0 0 0 5px rgba(255,255,255,.50),inset 0 0 18px rgba(55,78,67,.035)}
.windowcad-3d-outer{z-index:1}
.windowcad-3d-inner{z-index:2}
.windowcad-3d-view.product-window .windowcad-3d-model,.windowcad-3d-view.product-other .windowcad-3d-model{transform-origin:center center}

/* Fit/preview composition: one deliberate, centred object region. */
.windowcad-preview-viewport{overflow:auto;overscroll-behavior:contain}
.windowcad-preview-viewport>#wcad-preview-model{margin:auto}
.windowcad-3d-scene{isolation:isolate}
.windowcad-3d-model{transform-style:preserve-3d}
.windowcad-3d-view-badge{box-shadow:0 1px 2px rgba(20,38,30,.05)}

@media(max-width:900px){
  .windowcad-preview-toolbar{grid-template-columns:1fr auto;gap:7px}
  .windowcad-face-switch{grid-column:1/-1;grid-row:2;justify-self:center}
}

/* v0.8.64 — decisive 3D swing readability + correctly sized 2D hardware */
.windowcad-3d-closed-position{position:absolute;box-sizing:border-box;z-index:1;border:2px solid color-mix(in srgb,var(--frame) 58%,#7d8b84);background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 4px rgba(255,255,255,.38);pointer-events:none;opacity:.42}
.windowcad-3d-closed-position:after{content:"";position:absolute;background:rgba(67,88,78,.38);border-radius:999px}
.windowcad-3d-closed-position.hinge-left:after{left:-2px;top:12%;bottom:12%;width:2px}
.windowcad-3d-closed-position.hinge-right:after{right:-2px;top:12%;bottom:12%;width:2px}
.windowcad-3d-closed-position.hinge-top:after{top:-2px;left:12%;right:12%;height:2px}
.windowcad-3d-closed-position.hinge-bottom:after{bottom:-2px;left:12%;right:12%;height:2px}
.windowcad-3d-pane.is-open{z-index:5;filter:drop-shadow(0 10px 9px rgba(24,42,34,.16))}
.windowcad-3d-pane.is-open .windowcad-3d-glass{border-color:rgba(255,255,255,.92)}
.windowcad-3d-view.product-window .windowcad-3d-handle.window,.windowcad-3d-view.product-other .windowcad-3d-handle.window{width:34px;height:34px}
.windowcad-visual svg svg{overflow:visible}

/* v0.8.66 — exact v0.8.59-style window 3D presentation path.
   Scoped so later door/slider/bifold architecture remains untouched. */
.windowcad-3d-view.v59-window-3d{width:min(700px,100%);display:flex;flex-direction:column;align-items:center;margin:auto}
.windowcad-3d-view.v59-window-3d .windowcad-3d-scene{position:relative;width:min(690px,100%);height:420px;perspective:1180px;cursor:grab;touch-action:none;user-select:none;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#f9fbfa 0%,#f1f5f2 100%);border:1px solid #dce5e0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 10px 26px rgba(17,35,28,.05);margin:auto;isolation:auto}
.windowcad-3d-view.v59-window-3d .windowcad-3d-sheet-frame{position:absolute;inset:18px;border:1px solid #e5ebe8;border-radius:6px;background:linear-gradient(180deg,rgba(255,255,255,.8),rgba(251,252,251,.92));box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.windowcad-3d-view.v59-window-3d .windowcad-3d-model{position:absolute;left:50%;top:49%;width:var(--model-w);height:var(--model-h);transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(var(--rx)) rotateY(var(--ry));transition:transform .08s linear;filter:none;transform-origin:center center}
.windowcad-3d-view.v59-window-3d .windowcad-3d-outer{position:absolute;inset:calc(var(--frame-depth) * -1);border:var(--frame-depth) solid var(--frame);border-radius:2px;box-shadow:0 22px 34px rgba(33,53,45,.12);transform:translateZ(-10px);background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.04));outline:none;z-index:auto}
.windowcad-3d-view.v59-window-3d .windowcad-3d-inner{position:absolute;inset:0;transform-style:preserve-3d;z-index:auto}
.windowcad-3d-view.v59-window-3d .windowcad-3d-pane{position:absolute;box-sizing:border-box;border:var(--sash-depth) solid var(--frame);transform-style:preserve-3d;transition:transform .25s ease;z-index:2;box-shadow:0 4px 10px rgba(19,30,25,.06);outline:none;filter:none;backface-visibility:visible;overflow:visible;will-change:auto}
.windowcad-3d-view.v59-window-3d .windowcad-3d-pane.is-open{box-shadow:0 4px 10px rgba(19,30,25,.06);filter:none;z-index:2}
.windowcad-3d-view.v59-window-3d .windowcad-3d-glass{position:absolute;inset:0;background:linear-gradient(180deg,color-mix(in srgb,var(--glass) 78%,white) 0%,color-mix(in srgb,var(--glass) 92%,transparent) 100%);border:2px solid rgba(255,255,255,.75);box-shadow:inset 0 0 14px rgba(255,255,255,.25);overflow:hidden}
.windowcad-3d-view.v59-window-3d .windowcad-3d-handle.window{width:30px;height:30px;z-index:9!important;overflow:visible;filter:none}
.windowcad-3d-view.v59-window-3d .windowcad-3d-handle.window svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 2px rgba(17,28,24,.18))}
.windowcad-3d-view.v59-window-3d .windowcad-3d-cill{position:absolute;left:-21px;right:-21px;height:13px;bottom:-29px;background:var(--frame);transform-origin:center top;transform:translateZ(calc(var(--cill-depth) * .45)) rotateX(72deg);box-shadow:0 5px 8px rgba(26,42,36,.18)}
.windowcad-3d-view.v59-window-3d .windowcad-3d-view-badge{position:absolute;left:0;top:-42px;padding:5px 8px!important;border-radius:7px!important;background:#eef7f0!important;border:1px solid #d3e7d8!important;color:#287647!important;font-size:8px!important;font-weight:900;letter-spacing:.05em!important;white-space:nowrap;transform:translateZ(3px);box-shadow:none}
.windowcad-3d-view.v59-window-3d .windowcad-3d-note{display:flex;gap:8px;align-items:baseline;margin-top:10px;color:#708078;font-size:10px;flex-wrap:wrap;justify-content:center;max-width:690px;padding:0 8px;text-align:center}
.windowcad-3d-view.v59-window-3d .windowcad-3d-aperture,.windowcad-3d-view.v59-window-3d .windowcad-3d-sash-edge,.windowcad-3d-view.v59-window-3d .windowcad-3d-closed-position{display:none!important}


/* v0.8.67 — dedicated hinged-door presentation path.
   Keeps the stationary frame obvious while only the door leaf rotates about its hinge. */
.windowcad-3d-view.v59-door-3d{width:min(700px,100%);display:flex;flex-direction:column;align-items:center;margin:auto}
.windowcad-3d-view.v59-door-3d .windowcad-3d-scene{position:relative;width:min(690px,100%);height:420px;perspective:1180px;cursor:grab;touch-action:none;user-select:none;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#f9fbfa 0%,#f1f5f2 100%);border:1px solid #dce5e0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 10px 26px rgba(17,35,28,.05);margin:auto;isolation:auto}
.windowcad-3d-view.v59-door-3d .windowcad-3d-model{position:absolute;left:50%;top:49%;width:var(--model-w);height:var(--model-h);transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(var(--rx)) rotateY(var(--ry));transition:transform .08s linear;filter:none;transform-origin:center center}
.windowcad-3d-view.v59-door-3d .windowcad-3d-outer{position:absolute;inset:calc(var(--frame-depth) * -1);border:var(--frame-depth) solid var(--frame);border-radius:2px;box-shadow:0 20px 30px rgba(33,53,45,.11);transform:translateZ(-10px);background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.03));outline:none;z-index:1}
.windowcad-3d-view.v59-door-3d .windowcad-3d-inner{position:absolute;inset:0;transform-style:preserve-3d;z-index:2}
.windowcad-3d-view.v59-door-3d .windowcad-3d-pane{position:absolute;box-sizing:border-box;border:var(--sash-depth) solid var(--frame);transform-style:preserve-3d;transition:transform .22s ease;z-index:3;box-shadow:0 4px 10px rgba(19,30,25,.07);outline:none;filter:none;backface-visibility:visible;overflow:visible}
.windowcad-3d-view.v59-door-3d .windowcad-3d-pane.is-open{z-index:6;box-shadow:0 12px 18px rgba(19,30,25,.13);filter:none}
.windowcad-3d-view.v59-door-3d .windowcad-3d-glass{position:absolute;inset:0;background:linear-gradient(180deg,color-mix(in srgb,var(--glass) 78%,white) 0%,color-mix(in srgb,var(--glass) 92%,transparent) 100%);border:2px solid rgba(255,255,255,.78);box-shadow:inset 0 0 14px rgba(255,255,255,.24);overflow:hidden}
.windowcad-3d-view.v59-door-3d .windowcad-3d-handle.door{width:34px;height:46px;z-index:20!important;overflow:visible;filter:none;transform-origin:center center}
.windowcad-3d-view.v59-door-3d .windowcad-3d-handle.door svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 2px rgba(17,28,24,.24))}
.windowcad-3d-view.v59-door-3d .windowcad-3d-cill.threshold{height:8px;bottom:-21px;left:-16px;right:-16px;transform:translateZ(8px) rotateX(78deg);box-shadow:0 3px 6px rgba(26,42,36,.12)}
.windowcad-3d-view.v59-door-3d .windowcad-3d-aperture,.windowcad-3d-view.v59-door-3d .windowcad-3d-sash-edge,.windowcad-3d-view.v59-door-3d .windowcad-3d-closed-position{display:none!important}
.windowcad-3d-view.v59-door-3d .windowcad-3d-view-badge{position:absolute;left:0;top:-42px;padding:5px 8px!important;border-radius:7px!important;background:#eef7f0!important;border:1px solid #d3e7d8!important;color:#287647!important;font-size:8px!important;font-weight:900;letter-spacing:.05em!important;white-space:nowrap;transform:translateZ(3px);box-shadow:none}

/* v0.8.68 — dedicated linked bi-fold presentation renderer */
.windowcad-3d-view.dedicated-bifold-3d .windowcad-3d-scene{height:440px}
.windowcad-3d-view.dedicated-bifold-3d .bifold-model{transform-style:preserve-3d}
.windowcad-3d-view.dedicated-bifold-3d .bifold-outer-frame{z-index:1;pointer-events:none}
.windowcad-bifold-aperture{position:absolute;inset:0;background:rgba(247,250,248,.84);border:1px solid rgba(98,119,109,.16);transform:translateZ(-8px);z-index:0}
.windowcad-bifold-chain{position:absolute;inset:0;transform-style:preserve-3d;z-index:4;pointer-events:none}
.windowcad-bifold-leaf{position:absolute;box-sizing:border-box;border:var(--sash-depth) solid var(--frame);background:var(--frame);transform-style:preserve-3d;box-shadow:0 7px 15px rgba(24,39,33,.10),inset 0 0 0 1px rgba(255,255,255,.32);transition:transform .12s ease-out;backface-visibility:visible}
.windowcad-bifold-leaf:before{content:"";position:absolute;inset:calc(var(--sash-depth) * -1);border:1px solid rgba(73,92,83,.12);pointer-events:none}
.windowcad-bifold-glass{position:absolute;inset:0;background:linear-gradient(180deg,color-mix(in srgb,var(--glass) 80%,white),color-mix(in srgb,var(--glass) 96%,transparent));border:2px solid rgba(255,255,255,.82);box-shadow:inset 0 0 16px rgba(255,255,255,.25);overflow:hidden}
.windowcad-bifold-glass:before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.24),transparent 42%,rgba(255,255,255,.09));pointer-events:none}
.windowcad-bifold-leaf>span{position:absolute;left:50%;bottom:5px;transform:translateX(-50%) translateZ(4px);padding:2px 5px;border-radius:999px;background:rgba(255,255,255,.88);border:1px solid rgba(112,130,121,.16);font-size:7px;font-weight:800;color:#385347;white-space:nowrap}
.windowcad-bifold-hinge{position:absolute;top:18%;bottom:18%;width:4px;z-index:15;transform:translateZ(7px);background:repeating-linear-gradient(to bottom,#7a8580 0 9px,#d9dedb 9px 14px);border-radius:2px;box-shadow:0 1px 2px rgba(20,31,26,.15)}
.windowcad-bifold-hinge.hinge-right{right:calc(var(--sash-depth) * -1 - 2px)}
.windowcad-bifold-hinge.hinge-left{left:calc(var(--sash-depth) * -1 - 2px)}
.windowcad-bifold-leaf .bifold-handle{z-index:20}
.windowcad-bifold-leaf .bifold-master{top:8px;bottom:auto;left:50%;right:auto;transform:translateX(-50%) translateZ(6px);background:#3f9460;color:#fff;border:none}
.windowcad-bifold-track{position:absolute;left:-10px;right:-10px;top:-14px;height:8px;transform:translateZ(1px) rotateX(78deg);transform-origin:center bottom;background:#d7ded9;border:1px solid rgba(90,109,100,.18);z-index:2}
.windowcad-bifold-track:after{content:"";position:absolute;left:0;right:0;top:calc(var(--model-h,300px) + 18px);height:8px;background:#cfd7d2;border:1px solid rgba(90,109,100,.18)}
.windowcad-bifold-track i{position:absolute;left:3%;right:3%;height:1px;background:rgba(75,95,85,.46)}
.windowcad-bifold-track i:first-child{top:2px}.windowcad-bifold-track i:last-child{bottom:2px}
.windowcad-3d-view.dedicated-bifold-3d .bifold-threshold{height:7px;bottom:-27px;transform:translateZ(3px) rotateX(80deg);background:#bdc7c1;box-shadow:0 3px 6px rgba(25,40,33,.11)}
.windowcad-3d-view.dedicated-bifold-3d .windowcad-3d-shadow{opacity:.75}
