:root {
    --ink: #111827;
    --muted: #667085;
    --line: #e6e8ec;
    --surface: #ffffff;
    --canvas: #f5f6f8;
    --brand: #f97316;
    --brand-contrast: #ffffff;
    --brand-shadow: rgba(249,115,22,.22);
    --brand-focus: rgba(249,115,22,.14);
    --brand-dark: #d95c08;
    --brand-soft: #fff2e8;
    --green: #15803d;
    --red: #b42318;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px 18px; color: #d5dae3; background: #11151d; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.sidebar .brand { color: white; padding: 0 9px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: var(--brand); color: var(--brand-contrast); font-size: 20px; font-weight: 850; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.autoorc-icon { width: 44px; height: 44px; flex: none; display: block; object-fit: contain; padding: 3px; border-radius: 11px; background: white; filter: drop-shadow(0 5px 12px rgba(20,85,181,.18)); }
.brand span:last-child, .user-chip span:last-child, .sidebar-company span:last-child { display: grid; }
.brand strong { letter-spacing: -.02em; font-size: 18px; }
.brand small, .user-chip small, .sidebar-company small { color: #8f98a8; font-size: 11px; margin-top: 2px; }
.main-nav { display: grid; gap: 5px; margin-top: 48px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 10px; color: #aeb6c5; text-decoration: none; font-size: 14px; font-weight: 650; transition: .16s ease; }
.main-nav a:hover { color: white; background: #1c222d; transform: translateX(2px); }
.nav-icon { width: 22px; text-align: center; color: #818b9c; font-size: 20px; line-height: 1; }
.sidebar-help { display: grid; gap: 7px; margin-top: auto; padding: 17px; background: #1a202a; border: 1px solid #272e3a; border-radius: 12px; }
.sidebar-help strong { color: white; font-size: 13px; }
.sidebar-help small { color: #939dad; font-size: 11px; line-height: 1.5; }
.sidebar-company { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 13px 9px 2px; }
.sidebar-company strong { color: #e8ebf0; font-size: 12px; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2b3340; color: white; font-size: 12px; font-weight: 800; text-transform: uppercase; }

.app-content { min-width: 0; }
.topbar { min-height: 80px; display: flex; align-items: center; gap: 20px; padding: 14px clamp(20px, 3vw, 42px); background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 21px; letter-spacing: -.025em; margin: 2px 0 0; }
.eyebrow { color: var(--brand-dark); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.user-chip strong { font-size: 12px; }
.avatar-light { background: var(--brand-soft); color: var(--brand-dark); }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.icon-button { width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; cursor: pointer; }
.icon-button:hover { color: var(--red); border-color: #f5b7b1; }
.page-content { padding: clamp(22px, 3vw, 42px); }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 750; font-size: 13px; cursor: pointer; transition: .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: var(--brand-contrast); background: var(--brand); box-shadow: 0 4px 11px var(--brand-shadow); }
.button-primary:hover { background: var(--brand-dark); color: white; }
.button-secondary { color: #344054; background: white; border-color: #d8dce3; }
.button-danger { color: var(--red); background: #fff4f2; border-color: #ffd0ca; }
.button-compact { min-height: 37px; padding: 0 13px; }
.button-block { width: 100%; }
.button-action-choice { min-height: 68px; justify-content: flex-start; gap: 11px; padding: 11px 13px; text-align: left; }
.action-choice-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--brand-dark); background: var(--brand-soft); font-size: 18px; font-weight: 900; }
.action-choice-copy { min-width: 0; display: grid; gap: 3px; }
.action-choice-copy strong { font-size: 12px; }
.action-choice-copy small { color: var(--muted); font-size: 10px; font-weight: 550; line-height: 1.35; }
.button-danger .action-choice-icon { color: var(--red); background: #ffe9e5; }
.button-danger .action-choice-copy small { color: #8f514a; }
.link { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-heading h2 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 13px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 137px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card::after { content: ""; position: absolute; width: 76px; height: 76px; right: -27px; bottom: -30px; border-radius: 50%; background: var(--brand-soft); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-value { display: block; margin-top: 16px; font-size: 28px; font-weight: 820; letter-spacing: -.04em; }
.metric-caption { display: block; margin-top: 5px; color: #8a94a4; font-size: 11px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 20px; }
.split-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.75fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 16px; }
.empty-state { padding: 50px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { padding: 11px 16px; color: #7a8494; background: #fafafa; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.data-table td { padding: 15px 16px; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdfdfd; }
.cell-title { display: grid; gap: 3px; }
.cell-title strong { font-size: 13px; }
.cell-title small { color: var(--muted); font-size: 11px; }
.text-right { text-align: right !important; }
.nowrap { white-space: nowrap; }

.status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.status-neutral { color: #475467; background: #f2f4f7; }
.status-info { color: #175cd3; background: #eff8ff; }
.status-purple { color: #6941c6; background: #f4f3ff; }
.status-success { color: #067647; background: #ecfdf3; }
.status-danger { color: #b42318; background: #fef3f2; }
.status-dark { color: white; background: #344054; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field label { color: #344054; font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #d7dbe2; border-radius: 8px; outline: none; transition: .15s ease; }
.field textarea { min-height: 94px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-focus); }
.field-hint { color: var(--muted); font-size: 10px; }
.field-validation-error, .validation-summary-errors { color: var(--red); font-size: 11px; }
.validation-summary-errors ul { margin: 6px 0; padding-left: 18px; }
.input-with-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.input-with-action input[readonly] { color: #475467; background: #f9fafb; cursor: pointer; }
.adjustment-input { min-height: 43px; display: flex; align-items: center; overflow: hidden; background: white; border: 1px solid #d7dbe2; border-radius: 8px; transition: .15s ease; }
.field .adjustment-input input { min-width: 0; min-height: 41px; padding-left: 10px; padding-right: 10px; border: 0; border-radius: 0; box-shadow: none; }
.field .adjustment-input input:focus { border: 0; box-shadow: none; }
.adjustment-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-focus); }
.adjustment-symbol { flex: none; padding: 0 12px; color: #475467; font-size: 12px; font-weight: 800; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10,15,24,.62); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal-panel { width: min(720px,100%); max-height: min(760px,calc(100vh - 40px)); overflow-y: auto; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(16,24,40,.28); }
.modal-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px 18px; background: white; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 4px; font-size: 22px; letter-spacing: -.03em; }
.modal-header p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-close { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 9px; color: #667085; background: white; font-size: 24px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--red); border-color: #f5b7b1; }
.modal-body { padding: 22px 24px; }
.modal-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; background: #fafafa; border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }
.confirm-dialog-backdrop { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(10,15,24,.68); backdrop-filter: blur(5px); }
.confirm-dialog-backdrop[hidden] { display: none; }
.confirm-dialog { position: relative; width: min(470px,100%); display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 0 16px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 28px 80px rgba(16,24,40,.3); animation: confirm-dialog-in .16s ease-out; }
.confirm-dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: #667085; background: transparent; border: 0; border-radius: 8px; font-size: 22px; cursor: pointer; }
.confirm-dialog-close:hover { color: var(--ink); background: #f2f4f7; }
.confirm-dialog-icon { width: 52px; height: 52px; display: grid; place-items: center; grid-row: 1; color: var(--brand-dark); background: var(--brand-soft); border: 7px solid color-mix(in srgb, var(--brand) 7%, white); border-radius: 50%; font-size: 18px; font-weight: 900; }
.confirm-dialog-content { min-width: 0; padding: 2px 28px 0 0; }
.confirm-dialog-content h2 { margin: 5px 0 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
.confirm-dialog-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.confirm-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #eef0f3; }
.confirm-dialog-danger .confirm-dialog-icon { color: #b42318; background: #fef3f2; border-color: #fff5f4; }
.button-danger-solid { color: white; background: #d92d20; border-color: #d92d20; box-shadow: 0 4px 11px rgba(217,45,32,.2); }
.button-danger-solid:hover { color: white; background: #b42318; border-color: #b42318; }
@keyframes confirm-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.search-bar { display: flex; gap: 10px; padding: 14px; }
.search-bar input, .search-bar select { min-height: 40px; padding: 8px 12px; border: 1px solid #d7dbe2; border-radius: 8px; background: white; }
.search-bar input { flex: 1; }

.alert { margin-bottom: 18px; padding: 13px 15px; border-radius: 9px; font-size: 12px; font-weight: 650; }
.alert-success { color: #086b45; background: #ecfdf3; border: 1px solid #abefc6; }
.alert-error { color: #b42318; background: #fef3f2; border: 1px solid #fecdca; }
.callout { padding: 15px; border-radius: 10px; background: #fffaeb; border: 1px solid #fedf89; color: #7a2e0e; font-size: 12px; line-height: 1.55; }
.callout-danger { color: #912018; background: #fff4f2; border-color: #fecdca; }

.vehicle-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.vehicle-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.vehicle-card strong { display: block; margin-bottom: 5px; }
.vehicle-card span { color: var(--muted); font-size: 11px; }
.detail-list { display: grid; gap: 14px; }
.detail-row { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 1px solid #eff1f3; font-size: 12px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { font-weight: 650; text-align: right; }

.quote-services-body { display: grid; gap: 14px; }
.quote-composer { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(260px,1.35fr) 90px 130px 44px; gap: 10px; align-items: end; padding: 14px; border: 1px solid #cfd8e5; border-radius: 11px; background: #f8fafc; }
.quote-composer .field { gap: 5px; }
.quote-composer-service > div { display: grid; gap: 5px; margin-top: 7px; }
.quote-composer-service > div[hidden] { display: none; }
.confirm-line { width: 44px; height: 42px; display: grid; place-items: center; border: 1px solid #15803d; border-radius: 8px; color: white; background: #15803d; cursor: pointer; box-shadow: 0 6px 14px rgba(21,128,61,.18); transition: .15s ease; }
.confirm-line:hover { background: #116b33; border-color: #116b33; transform: translateY(-1px); }
.confirm-line:focus-visible { outline: 3px solid rgba(21,128,61,.2); outline-offset: 2px; }
.confirm-line svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.quote-composer-message { padding: 10px 12px; border: 1px solid #fecaca; border-radius: 8px; color: #991b1b; background: #fef2f2; font-size: 12px; font-weight: 650; }
.quote-composer-message[hidden] { display: none; }
.quote-selected-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 3px; }
.quote-selected-heading > div { display: grid; gap: 3px; }
.quote-selected-heading strong { color: var(--ink); font-size: 13px; }
.quote-selected-heading span:not(.quote-item-count) { color: var(--muted); font-size: 11px; }
.quote-item-count { min-width: 26px; height: 26px; display: grid; place-items: center; padding: 0 8px; border-radius: 999px; color: #1455b5; background: #eaf3ff; font-size: 11px; font-weight: 800; }
.quote-lines { display: grid; gap: 8px; }
.quote-selected-item { display: grid; grid-template-columns: minmax(180px,1fr) minmax(250px,1.35fr) 90px 130px 42px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.quote-selected-main { min-width: 0; display: grid; gap: 3px; }
.quote-selected-main strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.quote-selected-main span { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.quote-selected-description { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.quote-selected-value { display: grid; gap: 3px; }
.quote-selected-value span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.quote-selected-value strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.quote-selected-item .remove-line { width: 38px; height: 38px; display: grid; place-items: center; justify-self: end; border: 1px solid #f2c6c1; border-radius: 8px; color: var(--red); background: white; cursor: pointer; transition: .15s ease; }
.quote-selected-item .remove-line:hover { color: white; background: var(--red); border-color: var(--red); }
.quote-selected-item .remove-line svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quote-lines-empty { display: grid; justify-items: center; gap: 5px; margin-top: 10px; padding: 24px; color: var(--muted); background: #fafafa; border: 1px dashed #d7dbe2; border-radius: 10px; text-align: center; }
.quote-lines-empty[hidden] { display: none; }
.quote-lines-empty strong { color: var(--ink); font-size: 13px; }
.quote-lines-empty span { font-size: 11px; }
.summary-box { display: grid; gap: 11px; padding: 18px; border: 1px solid #b7e4ca; border-radius: 11px; background: #f0fdf4; color: #101828; }
.summary-row { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; color: #344054; }
.summary-row > span { color: #1d2939; font-weight: 700; }
.summary-row strong { color: #101828; }
.summary-total { margin-top: 5px; padding-top: 13px; border-top: 1px solid #b7e4ca; font-size: 18px; font-weight: 800; }
.action-panel { display: grid; gap: 9px; }
.action-panel form { display: grid; gap: 8px; }
.inline-form { display: flex !important; gap: 8px; }
.inline-form select, .inline-form input { min-width: 0; flex: 1; border: 1px solid #d7dbe2; border-radius: 8px; padding: 0 9px; }
.inline-form .adjustment-input { min-width: 140px; flex: 1; }
.inline-form .adjustment-input input { width: 100%; min-width: 0; min-height: 41px; padding: 0 9px; border: 0; border-radius: 0; box-shadow: none; }

.auth-body {
    --brand: #1c74e7;
    --brand-dark: #1455b5;
    --brand-soft: #eaf3ff;
    --brand-contrast: #ffffff;
    --brand-shadow: rgba(28,116,231,.24);
    --brand-focus: rgba(28,116,231,.14);
    background: #0f141c;
}
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px,.85fr) minmax(440px,1.15fr); }
.auth-brand-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 5vw, 72px); color: white; background: radial-gradient(circle at 18% 8%, rgba(28,116,231,.25), transparent 34%), radial-gradient(circle at 10% 82%, rgba(48,196,200,.08), transparent 30%), linear-gradient(145deg,#171d27 0%,#0d1118 70%); }
.auth-autoorc-brand { width: fit-content; display: grid; justify-items: center; gap: 5px; }
.auth-autoorc-brand small { color: #aeb8c8; font-size: 11px; letter-spacing: .02em; }
.auth-autoorc-logo { width: 142px; height: 104px; display: block; object-fit: contain; padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: white; box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.brand-inverse { color: white; }
.auth-pitch { max-width: 580px; }
.auth-pitch h1 { max-width: 520px; margin: 13px 0 18px; font-size: clamp(37px,4vw,61px); line-height: 1.01; letter-spacing: -.055em; }
.auth-pitch p { max-width: 510px; color: #b2bac7; line-height: 1.7; }
.auth-pitch ul { display: grid; gap: 11px; padding: 20px 0 0; list-style: none; color: #d4d9e1; font-size: 13px; }
.auth-pitch li::before { content: "✓"; color: var(--brand); margin-right: 10px; font-weight: 900; }
.eyebrow-light { color: #74ddd0; }
.auth-product-signature { width: max-content; max-width: 100%; align-self: flex-end; display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.045); }
.auth-product-logo { width: 48px; height: 56px; flex: none; object-fit: contain; padding: 4px; border-radius: 8px; background: white; }
.auth-product-copy { display: grid; gap: 2px; }
.auth-product-copy small { color: #8f98a8; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }
.auth-product-copy strong { color: white; font-size: 12px; letter-spacing: .02em; }
.auth-product-copy > span { color: #aeb6c5; font-size: 9px; }
.auth-form-panel { display: grid; place-items: center; padding: 30px; background: #f7f8fa; }
.auth-form-wrap { width: min(430px,100%); }
.auth-form-wrap h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.04em; }
.auth-form-wrap > p { margin: 0 0 28px; color: var(--muted); line-height: 1.55; }
.auth-card { padding: 25px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 45px rgba(16,24,40,.08); }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.login-options a, .auth-back-link { color: var(--brand-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.login-options a:hover, .auth-back-link:hover { text-decoration: underline; }
.auth-back-link { justify-self: center; }
.auth-success, .auth-error { display: grid; gap: 6px; margin-bottom: 18px; padding: 14px; border-radius: 10px; }
.auth-success { color: #05603a; border: 1px solid #a6f4c5; background: #ecfdf3; }
.auth-error { color: #912018; border: 1px solid #fecdca; background: #fef3f2; }
.auth-success strong, .auth-error strong { font-size: 13px; }
.auth-success span, .auth-error span { font-size: 11px; line-height: 1.5; }

.print-document { width: 210mm; min-height: 297mm; margin: 20px auto; padding: 18mm; background: white; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.print-toolbar { width: 210mm; margin: 20px auto 0; display: flex; justify-content: flex-end; gap: 10px; }
.document-header { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 18px; border-bottom: 3px solid var(--document-color, var(--brand)); }
.document-brand h1 { margin: 0; font-size: 24px; }
.document-brand p, .document-meta p { margin: 4px 0; color: #667085; font-size: 11px; }
.document-meta { text-align: right; }
.document-title { margin: 28px 0 18px; }
.document-title h2 { margin: 0; font-size: 24px; }
.document-title span { color: var(--document-color, var(--brand)); font-weight: 800; }
.document-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.document-box { padding: 14px; border: 1px solid #e4e7ec; border-radius: 8px; }
.document-box h3 { margin: 0 0 9px; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: #667085; }
.document-box p { margin: 4px 0; font-size: 11px; }
.document-total { width: 290px; margin: 18px 0 18px auto; }
.document-notes { margin-top: 25px; padding-top: 18px; border-top: 1px solid #e4e7ec; font-size: 11px; color: #475467; line-height: 1.6; }
.document-footer { margin-top: 38px; text-align: center; color: #98a2b3; font-size: 9px; }

.sidebar-backdrop { display: none; }

.dashboard-filter-card { margin-bottom: 14px; padding: 14px; }
.dashboard-filters { display: grid; grid-template-columns: minmax(180px,1fr) minmax(220px,1.25fr) auto auto; gap: 10px; align-items: end; }
.dashboard-filters .field { gap: 5px; }
.dashboard-filters .button { min-height: 42px; }
.dashboard-filter-help { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef1f5; color: var(--muted); font-size: 10px; }
.metric-card-value { border-color: rgba(28,116,231,.3); background: linear-gradient(145deg,#ffffff 0%,#f4f8ff 100%); }
.metric-caption-highlight { color: var(--brand-dark); font-weight: 750; }
.section-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 7px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; vertical-align: middle; }
.status-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.status-stack-heading { justify-content: flex-end; }
.status-payment { color: #087443; background: #dcfae6; border: 1px solid #a6f4c5; }
.button-payment { color: white; background: #15803d; border-color: #15803d; box-shadow: 0 4px 11px rgba(21,128,61,.2); }
.button-payment:hover { color: white; background: #116b33; border-color: #116b33; }
.payment-received-panel { display: grid; gap: 10px; padding: 13px; border: 1px solid #a6f4c5; border-radius: 10px; background: #ecfdf3; }
.payment-received-panel > div { display: grid; gap: 4px; }
.payment-received-panel strong { color: #067647; font-size: 12px; }
.payment-received-panel span { color: #397659; font-size: 10px; }
.button-link-danger { justify-self: start; padding: 0; border: 0; color: #a53a31; background: transparent; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; text-decoration: underline; }

.report-filter-card { margin-bottom: 14px; padding: 14px; }
.report-filters { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(190px,1fr) minmax(145px,.8fr) minmax(145px,.8fr) auto auto; gap: 10px; align-items: end; }
.report-filters .field { gap: 5px; }
.report-filters .button { min-height: 42px; }
.report-custom-date[hidden] { display: none; }
.report-filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 11px; padding-top: 11px; border-top: 1px solid #edf0f4; color: var(--muted); font-size: 11px; }
.report-filter-footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
.report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.report-metric { min-height: 118px; display: grid; align-content: center; gap: 8px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.report-metric > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.report-metric > strong { color: var(--ink); font-size: 23px; letter-spacing: -.04em; }
.report-metric > small { color: #8a94a4; font-size: 10px; }
.report-metric-approved { border-color: #cfe0ff; background: #f6f9ff; }
.report-metric-received { border-color: #b7e4ca; background: #f0fdf4; }
.report-metric-lost { border-color: #fed2cc; background: #fff8f6; }
.report-chart-grid, .report-ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.report-chart-card { min-height: 315px; }
.report-bars, .report-months { display: grid; align-content: start; gap: 13px; }
.report-bar-row { display: grid; grid-template-columns: 115px minmax(100px,1fr) 45px; gap: 10px; align-items: center; }
.report-bar-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.report-bar-row > div:first-child strong { font-size: 11px; }
.report-bar-track { overflow: hidden; height: 8px; border-radius: 999px; background: #eef1f5; }
.report-bar-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--brand); }
.report-bar-row > small { color: var(--muted); font-size: 10px; text-align: right; }
.report-legend { display: flex; gap: 14px; color: var(--muted); font-size: 9px; }
.report-legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--brand); }
.report-legend span:last-child::before { background: #22a06b; }
.report-month-row { display: grid; grid-template-columns: 52px minmax(120px,1fr); gap: 7px 10px; align-items: center; }
.report-month-row > strong { grid-row: 1 / 3; font-size: 10px; }
.report-month-row > div { position: relative; height: 14px; border-radius: 4px; background: #eef1f5; }
.report-month-row > div span { position: absolute; left: 0; height: 6px; border-radius: 3px; }
.report-month-quoted { top: 0; background: var(--brand); }
.report-month-received { bottom: 0; background: #22a06b; }
.report-month-row > small { color: var(--muted); font-size: 9px; }
.report-ranking { display: grid; gap: 0; }
.report-ranking > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eef1f4; }
.report-ranking > div:last-child { border-bottom: 0; }
.report-ranking > div > span { min-width: 0; display: grid; gap: 3px; }
.report-ranking > div > span strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-ranking small { color: var(--muted); font-size: 9px; }
.report-ranking > div > strong { font-size: 11px; white-space: nowrap; }
.report-print-document { --document-color: var(--brand); }
.report-print-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 24px 0; }
.report-print-metrics > div { display: grid; gap: 5px; padding: 11px; border: 1px solid #e4e7ec; border-top: 3px solid var(--document-color, var(--brand)); border-radius: 7px; }
.report-print-metrics span { color: #667085; font-size: 9px; text-transform: uppercase; }
.report-print-metrics strong { font-size: 14px; }
.report-print-title { margin: 24px 0 12px; color: var(--brand-dark); font-size: 16px; }

@media (max-width: 1050px) {
    .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .report-filters { grid-template-columns: 1fr 1fr; }
    .dashboard-filters { grid-template-columns: 1fr 1fr; }
    .quote-composer { grid-template-columns: minmax(175px,.8fr) minmax(210px,1.1fr) 80px 115px 44px; }
    .quote-selected-item { grid-template-columns: minmax(160px,1fr) minmax(190px,1.15fr) 75px 115px 38px; gap: 9px; }
    .user-chip { display: none; }
}
@media (max-width: 800px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: -280px; width: 258px; transition: left .2s ease; }
    .sidebar.open { left: 0; }
    .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(3,7,18,.52); }
    .menu-button { display: block; }
    .topbar { padding: 12px 18px; }
    .topbar-actions .button { display: none; }
    .page-content { padding: 22px 16px; }
    .split-grid { grid-template-columns: 1fr; }
    .report-chart-grid, .report-ranking-grid { grid-template-columns: 1fr; }
    .quote-composer, .quote-selected-item { grid-template-columns: 1fr 1fr; }
    .quote-composer .confirm-line, .quote-selected-item .remove-line { grid-column: 2; justify-self: end; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; }
}
@media (max-width: 560px) {
    .metrics, .form-grid, .vehicle-grid, .document-parties { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .search-bar { flex-direction: column; }
    .dashboard-filters { grid-template-columns: 1fr; }
    .report-filters, .report-metrics { grid-template-columns: 1fr; }
    .report-filter-footer { align-items: flex-start; flex-direction: column; }
    .report-filter-footer > div { width: 100%; }
    .report-filter-footer .button { flex: 1; }
    .report-bar-row { grid-template-columns: 100px minmax(70px,1fr) 38px; }
    .dashboard-filter-help { display: grid; }
    .status-stack-heading { justify-content: flex-start; }
    .quote-composer, .quote-selected-item { grid-template-columns: 1fr; }
    .quote-composer .confirm-line, .quote-selected-item .remove-line { grid-column: 1; }
    .topbar h1 { font-size: 17px; }
}
@media print {
    .input-with-action { grid-template-columns: 1fr; }
    .modal-backdrop { align-items: end; padding: 0; }
    .modal-panel { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
    .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
    body { background: white; }
    .print-toolbar { display: none !important; }
    .print-document { width: auto; min-height: auto; margin: 0; padding: 12mm; box-shadow: none; }
    @page { size: A4; margin: 0; }
}

.button-small { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.vehicle-card .form-actions { justify-content: flex-start; margin-top: 12px; padding-top: 10px; }
.vehicle-card .form-actions form { margin: 0; }
.quote-live-summary { display: grid; gap: 10px; padding: 18px 20px; color: #d8dde6; background: #171c25; border-radius: 12px; }
.quote-live-summary > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.quote-live-summary strong { color: white; font-size: 13px; }
.quote-live-summary .quote-live-total { margin-top: 4px; padding-top: 14px; border-top: 1px solid #343b47; align-items: center; }
.quote-live-summary .quote-live-total span, .quote-live-summary .quote-live-total strong { color: white; font-size: 18px; font-weight: 800; }
.quote-live-summary small { color: #8f99a8; text-align: right; }
.quote-line .adjustment-input input { min-width: 0; width: 100%; }
.whatsapp-send-panel { display: grid; gap: 10px; padding: 14px; border: 1px solid #b7e4ca; border-radius: 10px; background: #f0fdf4; }
.whatsapp-send-panel > div:first-child { display: grid; gap: 4px; }
.whatsapp-send-panel small { color: #557064; font-size: 10px; line-height: 1.45; }
.whatsapp-send-panel form { display: grid; }
.other-delivery-panel { display: grid; gap: 10px; padding: 14px; border: 1px solid #d7dce5; border-radius: 10px; background: #f8fafc; }
.other-delivery-panel > div { display: grid; gap: 4px; }
.other-delivery-panel small { color: #667085; font-size: 10px; line-height: 1.45; }
.other-delivery-form { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 8px !important; }
.other-delivery-form select { min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid #d7dbe2; border-radius: 8px; background: white; }
.button-whatsapp { color: white; background: #128c7e; border-color: #128c7e; }
.button-whatsapp:hover { background: #087569; border-color: #087569; }
.share-divider { display: flex !important; align-items: center; gap: 8px !important; color: #718078; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.share-divider::before, .share-divider::after { content: ""; height: 1px; flex: 1; background: #cfe8d9; }
.share-status { min-height: 15px; }
.button[disabled] { cursor: wait; opacity: .65; }
.brand-logo { width: 42px; height: 42px; flex: none; object-fit: contain; padding: 4px; border-radius: 10px; background: white; }
.company-logo-editor { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 24px; align-items: center; }
.company-logo-preview { width: 180px; height: 120px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cfd4dc; border-radius: 12px; background: #fafafa; }
.company-logo-preview img { width: 100%; height: 100%; padding: 12px; object-fit: contain; }
.company-logo-preview span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; color: var(--brand-contrast); background: var(--brand); font-size: 26px; font-weight: 850; }
.color-input { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 8px; }
.field .color-input input[type="color"] { min-height: 43px; padding: 4px; cursor: pointer; }
.document-brand-wrap { min-width: 0; display: flex; align-items: flex-start; gap: 14px; }
.document-logo { width: 82px; height: 58px; flex: none; object-fit: contain; }
.document-brand { min-width: 0; }
.document-title p { max-width: 660px; margin: 8px 0 0; color: #667085; font-size: 11px; line-height: 1.55; }
@media (max-width: 560px) { .company-logo-editor { grid-template-columns: 1fr; } }
.team-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.team-summary div { display: grid; gap: 4px; padding: 16px 18px; background: var(--brand-soft); border: 1px solid color-mix(in srgb,var(--brand) 20%,white); border-radius: 11px; }
.team-summary strong { color: var(--brand-dark); font-size: 23px; letter-spacing: -.03em; }
.team-summary span { color: #475467; font-size: 11px; font-weight: 700; }
.team-member-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.table-actions form { margin: 0; }
.team-form-card { max-width: 900px; }
.team-permissions-help { display: grid; gap: 6px; margin-top: 16px; color: #475467; background: #f8fafc; border-color: #dfe4ea; }
.team-permissions-help strong { color: var(--ink); }
.team-permissions-help span { font-size: 11px; }

@media (max-width: 760px) {
    .team-summary { grid-template-columns: 1fr; }
    .table-actions { justify-content: flex-start; }
}
.logo-selection-state { display: inline-flex; align-items: center; min-height: 24px; color: #067647; font-size: 11px; font-weight: 750; }
.logo-selection-state.logo-selection-pending { width: fit-content; padding: 5px 8px; color: #175cd3; background: #eff8ff; border-radius: 7px; }
