:root {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --ink: #17172a;
  --muted: #74728a;
  --border: #e6e2f2;
  --sidebar: #172735;
  --sidebar-hover: rgba(120,81,255,.24);
  --sidebar-text: #c7d0d8;
  --sidebar-muted: #8696a4;
  --primary: #7851ff;
  --primary-soft: #f1edff;
  --pink: #f451a5;
  --green: #2f8f53;
  --orange: #e99a1c;
  --red: #d94d4d;
  --shadow: 0 1px 2px rgba(31, 24, 65, .05), 0 12px 30px rgba(31, 24, 65, .055);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { min-height: 100vh; }
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: #6841ef; }
.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: #6741d9; 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: #6741d9; }
.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; }
.gev-charger-marker { background: transparent; border: 0; }
.gev-charger-marker span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: #6741d9; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 16px; }
.leaflet-container { font-family: Inter, sans-serif; }
.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; }
.gev-template-charger-marker { background: transparent; border: 0; }
.gev-template-charger-marker > span { display: grid; place-items: center; width: 34px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.gev-template-charger-marker svg { width: 34px; height: 40px; fill: #2563eb; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gev-template-charger-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 Inter, sans-serif;
}
.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: #7851ff; --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 platform and GEV workspace 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 shell is the GEV workspace layer. */
.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: #9278ff; }
.nav-item.active .nav-icon { color: #b5a5ff; }
.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, #7851ff, #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, #7851ff, #6740ef); box-shadow: 0 7px 16px rgba(120,81,255,.18); }
.btn.primary:hover { background: linear-gradient(135deg, #6841ef, #5932db); }
.btn.secondary:hover { border-color: #bfb4df; background: #fbf9ff; }
.pill.active { background: linear-gradient(135deg, #7851ff, #6740ef); }
/* 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: #7851ff; }
.calendar-day.today { background: #faf8ff; box-shadow: inset 0 3px 0 #7851ff; }
.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/gev-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.gev { 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.gev 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,#1b1831,#4f34bc) !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-gev-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: #f1edff; 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; }
}
