:root {
  --brand-red: #f03832;
  --brand-red-dark: #cf2824;
  --ink: #20242a;
  --muted: #747b85;
  --line: #e8eaed;
  --panel: #ffffff;
  --background: #f6f7f9;
  --success: #239b67;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; margin: 0; }
a { text-decoration: none; }
h1, h2, p { margin-top: 0; }
.btn { border-radius: 9px; font-weight: 700; padding: .72rem 1.1rem; }
.btn-primary { background: var(--brand-red); border-color: var(--brand-red); }
.btn-primary:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); }
.btn-dark { background: #252930; border-color: #252930; }
.btn-light { background: #fff; border: 1px solid var(--line); }
.form-control, .form-select { border: 1px solid #dfe2e6; border-radius: 9px; min-height: 46px; padding: .7rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(240, 56, 50, .12); }
.alert:empty { display: none; }
.alert { border: 0; border-radius: 9px; font-size: .9rem; }
.eyebrow { color: var(--brand-red); font-size: .73rem; font-weight: 800; letter-spacing: .14em; margin-bottom: .45rem; text-transform: uppercase; }

/* Login */
.login-body { background: #fff; min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: minmax(460px, 1.12fr) minmax(410px, .88fr); min-height: 100vh; }
.login-brand-panel { background: #24272c url("../images/repuestera-background.jpg") center / cover; color: #fff; min-height: 100vh; overflow: hidden; position: relative; }
.login-overlay { background: linear-gradient(135deg, rgba(20, 22, 25, .95), rgba(32, 35, 40, .78) 58%, rgba(240, 56, 50, .72)); inset: 0; position: absolute; }
.login-brand-content { display: flex; flex-direction: column; height: 100%; justify-content: space-between; max-width: 760px; padding: 7vh 7vw; position: relative; z-index: 1; }
.login-white-mark { background: #fff; border-radius: 8px; height: 74px; object-fit: contain; padding: 8px 14px; width: 330px; }
.brand-kicker { color: #ff938e; display: block; font-size: .78rem; font-weight: 800; letter-spacing: .18em; margin-bottom: 1.2rem; text-transform: uppercase; }
.login-brand-content h1 { font-size: clamp(2.45rem, 4vw, 4.25rem); font-weight: 750; letter-spacing: -.06em; line-height: 1.02; max-width: 690px; }
.login-brand-content p { color: rgba(255, 255, 255, .74); font-size: 1.12rem; line-height: 1.7; max-width: 600px; }
.login-feature-list { display: flex; flex-wrap: wrap; gap: .7rem; }
.login-feature-list span { border: 1px solid rgba(255, 255, 255, .22); border-radius: 50px; color: rgba(255, 255, 255, .9); font-size: .78rem; font-weight: 700; padding: .55rem .85rem; }
.login-form-panel { align-items: center; display: flex; justify-content: center; padding: 3rem 5vw; }
.login-form { max-width: 430px; width: 100%; }
.login-form h2 { font-size: 2.25rem; font-weight: 750; letter-spacing: -.05em; margin-bottom: .55rem; }
.muted { color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: .82rem; font-weight: 750; margin-bottom: .45rem; }
.form-field > span { color: #c62f2a; display: block; font-size: .77rem; margin-top: .3rem; }
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 4.8rem; }
.password-toggle { background: transparent; border: 0; color: var(--brand-red); font-size: .77rem; font-weight: 800; position: absolute; right: .75rem; top: .88rem; }
.remember-check { align-items: center; color: var(--muted); display: flex; font-size: .85rem; gap: .55rem; margin: .3rem 0 1.4rem; }
.remember-check input { accent-color: var(--brand-red); }
.login-submit { min-height: 50px; width: 100%; }
.login-help { color: var(--muted); font-size: .78rem; margin-top: 2rem; text-align: center; }
.mobile-logo { display: none; }

/* Authenticated application */
.app-body { background: var(--background); min-height: 100vh; }
.sidebar { background: #202328; bottom: 0; color: #fff; display: flex; flex-direction: column; left: 0; min-height: 0; position: fixed; top: 0; width: 248px; }
.sidebar-brand { background: #fff; border-bottom: 1px solid #eee; display: block; padding: 1.15rem 1.25rem; }
.sidebar-brand img { height: 46px; object-fit: contain; width: 100%; }
.sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 1.2rem .8rem; scrollbar-color: rgba(255, 255, 255, .28) transparent; scrollbar-width: thin; }
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 999px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .34); }
.sidebar-nav a { align-items: center; border-radius: 8px; color: rgba(255, 255, 255, .73); display: flex; font-size: .9rem; gap: .72rem; margin-bottom: .18rem; padding: .78rem .7rem; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-nav a span { color: #ff706b; font-size: 1.25rem; width: 17px; }
.sidebar-nav a small { background: rgba(255, 255, 255, .1); border-radius: 20px; font-size: .57rem; margin-left: auto; padding: .2rem .42rem; text-transform: uppercase; }
.sidebar-nav .disabled { opacity: .55; pointer-events: none; }
.sidebar-nav p { color: rgba(255, 255, 255, .34); font-size: .65rem; font-weight: 800; letter-spacing: .14em; margin: 1.65rem .7rem .55rem; text-transform: uppercase; }
.sidebar-footer { align-items: center; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; gap: .65rem; margin-top: auto; padding: 1rem; }
.sidebar-footer > span { align-items: center; background: var(--brand-red); border-radius: 8px; display: flex; font-size: 1.1rem; font-weight: 800; height: 37px; justify-content: center; width: 37px; }
.sidebar-footer strong, .sidebar-footer small, .topbar strong, .topbar span, .user-menu small { display: block; }
.sidebar-footer strong { font-size: .75rem; }
.sidebar-footer small { color: rgba(255, 255, 255, .45); font-size: .68rem; }
.app-main { margin-left: 248px; min-height: 100vh; }
.topbar { align-items: center; background: #fff; border-bottom: 1px solid var(--line); display: flex; height: 74px; justify-content: space-between; padding: 0 2.3rem; }
.topbar > div:first-child strong { font-size: .92rem; }
.topbar > div:first-child span { color: var(--muted); font-size: .74rem; }
.user-menu { align-items: center; display: flex; gap: .65rem; }
.avatar { align-items: center; background: #ffe7e5; border-radius: 50%; color: var(--brand-red); display: inline-flex; font-size: .8rem; font-weight: 800; height: 36px; justify-content: center; text-transform: uppercase; width: 36px; }
.user-menu strong { font-size: .82rem; }
.user-menu small { color: var(--success); font-size: .68rem; }
.user-menu form { margin-left: .8rem; }
.user-menu button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .75rem; font-weight: 700; padding: .45rem .65rem; }
.page-content { margin: auto; max-width: 1480px; padding: 2.2rem 2.4rem; }
.page-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 1.55rem; }
.page-heading h1 { font-size: 2rem; font-weight: 760; letter-spacing: -.055em; margin-bottom: .35rem; }
.page-description { color: var(--muted); font-size: .92rem; margin-bottom: 0; }
.status-pill { align-items: center; background: #eaf8f1; border-radius: 50px; color: #198257; display: flex; font-size: .76rem; font-weight: 750; gap: .45rem; padding: .48rem .75rem; }
.status-pill span { background: #27b276; border-radius: 50%; height: 7px; width: 7px; }
.hero-card { align-items: center; background: linear-gradient(110deg, #272a30, #3b3f46); border-radius: 15px; color: #fff; display: flex; justify-content: space-between; min-height: 255px; overflow: hidden; padding: 2.15rem 2.4rem; position: relative; }
.hero-card > div { position: relative; z-index: 1; }
.hero-label { color: #ff8c87; display: block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; margin-bottom: 1rem; text-transform: uppercase; }
.hero-card h2 { font-size: 2.05rem; font-weight: 750; letter-spacing: -.055em; max-width: 620px; }
.hero-card p { color: rgba(255, 255, 255, .68); max-width: 600px; }
.hero-card .btn { font-size: .85rem; margin-top: .45rem; opacity: 1; }
.hero-card .btn small { display: inline-block; font-size: .6rem; margin-left: .45rem; opacity: .72; text-transform: uppercase; }
.hero-card img { mix-blend-mode: screen; opacity: .14; position: absolute; right: -75px; top: -220px; width: 560px; }
.metric-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); margin: 1rem 0; }
.metric-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: .9rem; padding: 1.25rem; }
.metric-icon { align-items: center; border-radius: 9px; display: flex; font-size: 1rem; font-weight: 800; height: 43px; justify-content: center; width: 43px; }
.metric-icon.red { background: #ffe7e5; color: var(--brand-red); }
.metric-icon.green { background: #e5f7ef; color: var(--success); }
.metric-icon.gray { background: #edf0f2; color: #727983; }
.metric-card strong, .metric-card span { display: block; }
.metric-card strong { font-size: 1.45rem; line-height: 1.15; }
.metric-card div span { color: var(--muted); font-size: .78rem; }
.content-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.quick-card { align-items: center; display: flex; justify-content: space-between; padding: 1.45rem; }
.quick-card h2 { font-size: 1.25rem; font-weight: 750; margin-bottom: .25rem; }
.quick-card p:last-child { color: var(--muted); font-size: .85rem; margin-bottom: 0; }
.table-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; padding: 1rem; }
.search-box { align-items: center; background: #f7f8f9; border: 1px solid #eceef0; border-radius: 8px; display: flex; max-width: 430px; padding: 0 .75rem; width: 100%; }
.search-box span { color: var(--muted); font-size: 1.3rem; }
.search-box input { background: transparent; border: 0; font-size: .83rem; outline: 0; padding: .7rem .5rem; width: 100%; }
.record-count { color: var(--muted); font-size: .78rem; }
.app-table { border-collapse: collapse; min-width: 980px; width: 100%; }
.app-table th { color: #9298a0; font-size: .65rem; letter-spacing: .08em; padding: .86rem 1rem; text-transform: uppercase; }
.app-table td { border-top: 1px solid #eff0f2; color: #565d65; font-size: .81rem; padding: .85rem 1rem; vertical-align: middle; }
.person-cell { align-items: center; display: flex; gap: .7rem; }
.person-cell strong, .person-cell small { display: block; }
.person-cell strong { color: var(--ink); font-size: .84rem; }
.person-cell small { color: #979da5; font-size: .72rem; }
.badge-state { border-radius: 30px; font-size: .7rem; font-weight: 750; padding: .35rem .58rem; }
.badge-state.active { background: #e7f7ef; color: #198257; }
.badge-state.inactive { background: #f0f1f3; color: #747b85; }
.badge-state.permission { background: #fff2dd; color: #a96500; display: inline-block; margin: .1rem; }
.table-action { color: var(--brand-red); font-size: .77rem; font-weight: 750; }
.edit-form { padding: 1.35rem; }
.form-section-heading { align-items: flex-start; display: flex; gap: .85rem; margin-bottom: 1rem; }
.form-section-heading > span { align-items: center; background: #ffe7e5; border-radius: 50%; color: var(--brand-red); display: flex; font-size: .7rem; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.form-section-heading h2 { font-size: 1.05rem; font-weight: 750; margin-bottom: .15rem; }
.form-section-heading p { color: var(--muted); font-size: .78rem; margin-bottom: 0; }
.form-grid { display: grid; gap: .25rem 1rem; grid-template-columns: repeat(3, 1fr); }
.form-field.wide { grid-column: span 2; }
.form-divider { border-top: 1px solid var(--line); margin: 1.2rem 0; }
.switch-field { align-items: center; align-self: end; display: flex; gap: .65rem; margin-bottom: 1.15rem; }
.switch-field input { display: none; }
.switch { background: #c9cdd2; border-radius: 20px; height: 24px; position: relative; transition: .2s; width: 42px; }
.switch::after { background: #fff; border-radius: 50%; content: ""; height: 18px; left: 3px; position: absolute; top: 3px; transition: .2s; width: 18px; }
.switch-field input:checked + .switch { background: var(--success); }
.switch-field input:checked + .switch::after { transform: translateX(18px); }
.switch-field strong, .switch-field small { display: block; }
.switch-field strong { font-size: .82rem; }
.switch-field small { color: var(--muted); font-size: .72rem; }
.form-actions { border-top: 1px solid var(--line); display: flex; gap: .6rem; justify-content: flex-end; margin: 1.2rem -1.35rem -1.35rem; padding: 1rem 1.35rem; }
.permission-grid { display: grid; gap: .55rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.permission-check { align-items: center; background: #f8f9fa; border: 1px solid #eef0f2; border-radius: 8px; color: #555d66; display: flex; font-size: .78rem; gap: .5rem; min-height: 42px; padding: .55rem .65rem; }
.permission-check input { accent-color: var(--brand-red); }
.exchange-rate-table { min-width: 1040px; }
.exchange-rate-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.exchange-rate-note { background: #fff7e9; border-radius: 8px; color: #875b00; font-size: .8rem; margin: 0; padding: .75rem .85rem; }
.brand-summary-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.brand-metric-card { padding: 1.1rem; }
.brand-metric-card span, .brand-metric-card small { color: var(--muted); display: block; }
.brand-metric-card span { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brand-metric-card strong { display: block; font-size: 2rem; font-weight: 820; letter-spacing: -.06em; line-height: 1; margin: .35rem 0; }
.car-brand-table { min-width: 980px; }
.brand-name { color: var(--ink); letter-spacing: .01em; }
.brand-state { border-radius: 999px; display: inline-flex; font-size: .68rem; font-weight: 850; padding: .35rem .62rem; text-transform: uppercase; }
.brand-state.is-active { background: #e7f7ef; color: #198257; }
.brand-state.is-inactive { background: #f0f1f3; color: #667085; }
.brand-status-toggle { align-items: center; background: #f8f9fb; border: 1px solid #e4e7ec; border-radius: 12px; display: flex; gap: .75rem; grid-column: 1 / -1; margin: 0; padding: .9rem 1rem; }
.brand-status-toggle input { accent-color: var(--brand-red); height: 20px; width: 20px; }
.brand-status-toggle strong, .brand-status-toggle small { display: block; }
.brand-status-toggle strong { color: var(--ink); font-size: .85rem; }
.brand-status-toggle small { color: var(--muted); font-size: .74rem; margin-top: .12rem; }
.audit-card { background: linear-gradient(135deg, #f8f9fb, #fff); border: 1px solid #e4e7ec; border-radius: 14px; display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; padding: 1rem; }
.audit-card span { color: var(--muted); display: block; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.audit-card strong { display: block; font-size: .82rem; margin-top: .25rem; word-break: break-word; }
.model-dashboard { display: grid; gap: 1rem; grid-template-columns: 1.4fr .8fr .8fr; margin-bottom: 1rem; }
.model-highlight-card { background: linear-gradient(135deg, #272a30, #3a3f46); border: 0; color: #fff; min-height: 122px; padding: 1.25rem; }
.model-highlight-card span, .model-highlight-card small { display: block; }
.model-highlight-card span { color: #ff8c87; font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.model-highlight-card strong { display: block; font-size: 2rem; font-weight: 820; letter-spacing: -.06em; line-height: 1; margin: .45rem 0; }
.model-highlight-card small { color: rgba(255, 255, 255, .68); font-size: .78rem; }
.car-model-table { min-width: 1120px; }
.product-brand-table { min-width: 980px; }
.model-brand-chip { background: #ffe7e5; border-radius: 999px; color: var(--brand-red-dark); display: inline-flex; font-size: .66rem; font-weight: 850; margin-right: .45rem; padding: .28rem .5rem; vertical-align: middle; }
.model-form-grid { grid-template-columns: .7fr 1fr 1.3fr; }
.access-denied { margin: 10vh auto; max-width: 620px; padding: 2.6rem; text-align: center; }
.access-denied > span { align-items: center; background: #ffe7e5; border-radius: 50%; color: var(--brand-red); display: flex; font-size: 1.45rem; font-weight: 800; height: 58px; justify-content: center; margin: 0 auto 1.2rem; width: 58px; }
.access-denied h1 { font-size: 2rem; font-weight: 760; letter-spacing: -.055em; }
.access-denied p:not(.eyebrow) { color: var(--muted); margin-bottom: 1.4rem; }
.customer-heading { align-items: flex-start; }
.customer-kpi-grid { display: grid; gap: 1rem; grid-template-columns: 1.15fr 1fr 1fr 1fr; margin-bottom: 1rem; }
.customer-kpi-card { overflow: hidden; padding: 1.15rem; position: relative; }
.customer-kpi-card::after { background: #eef0f2; border-radius: 999px; content: ""; height: 58px; position: absolute; right: -22px; top: -22px; width: 58px; }
.customer-kpi-card.primary { background: linear-gradient(135deg, #272a30, #424851); border: 0; color: #fff; }
.customer-kpi-card.primary::after { background: rgba(240, 56, 50, .86); }
.customer-kpi-card span, .customer-kpi-card small { display: block; }
.customer-kpi-card span { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.customer-kpi-card.primary span, .customer-kpi-card.primary small { color: rgba(255, 255, 255, .72); }
.customer-kpi-card strong { display: block; font-size: 2.15rem; font-weight: 850; letter-spacing: -.055em; line-height: 1; margin: .5rem 0 .3rem; position: relative; z-index: 1; }
.customer-filter-form { align-items: end; display: grid; gap: .75rem; grid-template-columns: 190px minmax(260px, 1fr) auto; width: min(820px, 100%); }
.customer-filter-form label { margin: 0; }
.customer-filter-form label span, .customer-edit-card label, .customer-modal-search label { color: #344054; display: block; font-size: .68rem; font-weight: 850; letter-spacing: .07em; margin-bottom: .35rem; text-transform: uppercase; }
.customer-table { min-width: 1320px; }
.customer-type { border-radius: 999px; display: inline-flex; font-size: .68rem; font-weight: 850; padding: .35rem .62rem; text-transform: uppercase; }
.customer-type.customer { background: #e7f7ef; color: #198257; }
.customer-type.provider { background: #fff2dd; color: #a96500; }
.customer-document { color: var(--ink); font-variant-numeric: tabular-nums; }
.customer-name-cell strong, .customer-name-cell small, .customer-audit, .customer-audit span { display: block; }
.customer-name-cell strong { color: var(--ink); }
.customer-name-cell small, .customer-audit { color: var(--muted); font-size: .72rem; }
.customer-address-count { background: #f2f4f7; border-radius: 999px; color: #46515d; display: inline-flex; font-size: .72rem; font-weight: 850; min-width: 28px; padding: .24rem .52rem; justify-content: center; }
.customer-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; justify-content: flex-end; }
.customer-actions form { margin: 0; }
.customer-actions button { background: transparent; border: 0; padding: 0; }
.customer-edit-card { overflow: hidden; }
.customer-edit-layout { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr) 320px; padding: 1.35rem; }
.customer-form-grid { grid-template-columns: .72fr .74fr .74fr; }
.customer-wide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-active-toggle { margin-bottom: 1rem; }
.person-kind-tabs { background: #f6f7f9; border: 1px solid #e4e7ec; border-radius: 10px; display: inline-grid; gap: .25rem; grid-template-columns: repeat(2, minmax(120px, 1fr)); margin: .15rem 0 1rem; padding: .25rem; }
.person-kind-tabs label { margin: 0 !important; }
.person-kind-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.person-kind-tabs span { align-items: center; border-radius: 7px; color: #59616a; display: flex; font-size: .78rem; font-weight: 850; justify-content: center; min-height: 38px; padding: .45rem .75rem; text-transform: uppercase; }
.person-kind-tabs input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); color: var(--brand-red-dark); }
.person-kind-panel { margin-bottom: 1rem; }
.customer-address-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.customer-address-editor { display: grid; gap: .75rem; }
.customer-address-edit-row { align-items: end; background: #fafbfc; border: 1px solid #eef0f2; border-radius: 12px; display: grid; gap: .75rem; grid-template-columns: minmax(260px, 1.2fr) minmax(160px, .75fr) 100px 92px 78px auto; padding: .9rem; }
.customer-address-edit-row .form-field { margin-bottom: 0; }
.customer-address-field { min-width: 0; }
.customer-row-check { align-items: center; color: #59616a !important; display: inline-flex !important; font-size: .75rem !important; font-weight: 800 !important; gap: .42rem; margin: 0 0 .85rem !important; text-transform: none !important; }
.customer-row-check input { accent-color: var(--brand-red); }
.customer-side-panel { display: grid; gap: 1rem; align-content: start; }
.customer-side-card { background: linear-gradient(135deg, #272a30, #424851); border-radius: 14px; color: #fff; padding: 1.2rem; }
.customer-side-card span, .customer-side-card small { color: rgba(255, 255, 255, .68); display: block; }
.customer-side-card span { font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.customer-side-card strong { display: block; font-size: 1.65rem; letter-spacing: -.04em; margin: .45rem 0; word-break: break-word; }
.customer-audit-card { grid-template-columns: 1fr; margin: 0; }
.customer-audit-card small { color: var(--muted); display: block; font-size: .72rem; line-height: 1.45; margin-top: .2rem; word-break: break-word; }
.document-rule-card { background: #fff7e9; border: 1px solid #ffdca8; border-radius: 12px; color: #764a00; padding: 1rem; }
.document-rule-card strong, .document-rule-card span { display: block; }
.document-rule-card strong { font-size: .86rem; margin-bottom: .35rem; }
.document-rule-card span { font-size: .76rem; line-height: 1.45; }
.customer-name-picker { display: grid; gap: .55rem; grid-template-columns: minmax(0, 1fr) auto; }
.quote-customer-address-field { grid-column: 1 / -1; }
.customer-modal-search { background: #fafbfc; border: 1px solid #eef0f2; border-radius: 12px; display: grid; gap: .45rem; margin-bottom: 1rem; padding: 1rem; }
.customer-modal-search > div { display: flex; gap: .65rem; }
.customer-modal-search .form-control { flex: 1; }
.customer-modal-search small, .customer-modal-message { color: var(--muted); font-size: .78rem; }
.customer-search-table { min-width: 920px; }
.customer-address-choice { min-width: 360px; }
.quotes-placeholder { padding: 3.2rem; text-align: center; }
.quotes-placeholder > span { color: var(--brand-red); display: block; font-size: 3rem; line-height: 1; }
.quotes-placeholder h2 { font-size: 1.4rem; font-weight: 760; letter-spacing: -.035em; margin-top: .7rem; }
.quotes-placeholder p { color: var(--muted); margin: auto; max-width: 650px; }
.quote-draft-pill { background: #fff2dd; border-radius: 30px; color: #a96500; font-size: .72rem; font-weight: 800; padding: .48rem .7rem; text-transform: uppercase; }
.quote-heading-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-end; }
.quote-location-pill { color: var(--brand-red); font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.quote-context-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: .75rem; }
.customer-card, .product-search-card, .quote-lines-card { padding: 1rem 1.15rem; }
.quote-card-heading { align-items: flex-start; display: flex; gap: .75rem; margin-bottom: .7rem; }
.quote-card-heading .eyebrow { margin-bottom: .18rem; }
.quote-card-heading h2 { font-size: 1.05rem; font-weight: 760; margin-bottom: .1rem; }
.quote-card-heading p:last-child { color: var(--muted); font-size: .78rem; margin-bottom: 0; }
.quote-step { align-items: center; background: #ffe7e5; border-radius: 50%; color: var(--brand-red); display: flex; flex: 0 0 auto; font-size: .68rem; font-weight: 800; height: 32px; justify-content: center; width: 32px; }
.seller-profile { align-items: center; display: flex; gap: .72rem; margin: 1.1rem 0; }
.quote-avatar { height: 46px; width: 46px; }
.seller-profile strong, .seller-profile small { display: block; }
.seller-profile strong { font-size: .94rem; }
.seller-profile small { color: var(--muted); font-size: .74rem; }
.quote-meta { display: grid; gap: .65rem; grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.quote-meta div { background: #f7f8f9; border-radius: 8px; padding: .7rem; }
.quote-meta dt { color: var(--muted); font-size: .65rem; letter-spacing: .07em; text-transform: uppercase; }
.quote-meta dd { font-size: .82rem; font-weight: 750; margin-bottom: 0; margin-top: .2rem; }
.ruc-search-form, .product-search-form { display: flex; gap: .55rem; }
.ruc-search-form .form-control, .product-search-form .form-control { flex: 1; }
.customer-quote-form { display: grid; gap: .55rem .7rem; grid-template-columns: minmax(0, 1fr) 180px; }
.customer-quote-form label { margin: 0; }
.customer-quote-form label > span { color: #344054; display: block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; margin-bottom: .35rem; text-transform: uppercase; }
.customer-quote-form small { color: var(--muted); display: block; font-size: .68rem; line-height: 1.4; margin-top: .35rem; }
.customer-name-field, .customer-email-field, .customer-observation-field { grid-column: 1 / -1; }
.customer-observation-field textarea { min-height: 58px; resize: vertical; }
.customer-message { background: #fff7e9; border-radius: 7px; color: #996000; font-size: .78rem; margin: .75rem 0 0; padding: .65rem .75rem; }
.customer-result { border-left: 3px solid var(--success); margin-top: .85rem; padding: .1rem 0 .1rem .85rem; }
.customer-result strong, .customer-result span { display: block; }
.customer-result strong { font-size: .9rem; }
.customer-result span { color: var(--muted); font-size: .74rem; margin-top: .18rem; }
.customer-result p { color: #59616a; font-size: .76rem; margin: .45rem 0; }
.customer-result small { background: #e7f7ef; border-radius: 20px; color: #198257; display: inline-block; font-size: .62rem; font-weight: 750; margin-right: .28rem; padding: .25rem .45rem; }
.product-search-card { margin-bottom: .75rem; }
.product-picker-toolbar, .selected-product-panel { align-items: center; display: flex; gap: 1rem; }
.product-picker-toolbar { background: #fafbfc; border: 1px solid #eceff3; border-radius: 12px; justify-content: space-between; padding: .8rem .95rem; }
.product-picker-toolbar span, .selected-product-copy span, .selected-product-copy small { color: #667085; display: block; }
.product-picker-actions { display: flex; gap: .65rem; }
.selected-product-empty { border: 1px dashed #d7dce3; border-radius: 12px; color: #667085; margin-top: .65rem; padding: .75rem .9rem; }
.selected-product-panel { background: rgba(239, 58, 52, .04); border: 1px solid rgba(239, 58, 52, .2); border-radius: 14px; justify-content: space-between; margin-top: 1rem; padding: 1rem 1.1rem; }
.selected-product-copy { flex: 1; }
.selected-product-label, .selected-quantity span, .selected-price span { color: #344054; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.selected-quantity { width: 110px; }
.selected-price { width: 155px; }
.selected-product-message { color: #16794b; font-size: .78rem; font-weight: 700; margin: .65rem 0 0; min-height: 1.15rem; }
.product-search-modal .modal-content { border: 0; border-radius: 18px; box-shadow: 0 22px 54px rgba(16, 24, 40, .2); max-height: calc(100vh - 48px); }
.product-search-modal .modal-dialog { max-width: min(1720px, calc(100vw - 72px)); }
.product-search-modal .modal-header { padding: 1.2rem 1.35rem; }
.product-search-modal .modal-body { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 1.35rem; }
.structured-product-search { background: #fafbfc; border: 1px solid #e4e7ec; border-radius: 14px; padding: 1rem; }
.product-filter-grid { align-items: end; display: grid; gap: .75rem; grid-template-columns: minmax(190px, 240px) minmax(220px, 300px) minmax(360px, 1fr) 112px; }
.product-filter-grid label { margin: 0; }
.product-filter-grid span { color: #344054; display: block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; margin-bottom: .4rem; text-transform: uppercase; }
.product-search-submit { height: 58px; }
.product-search-actions { margin-top: .8rem; }
.product-search-actions p { color: #667085; font-size: .74rem; margin: 0; }
.all-stores-stock-form label { color: #344054; display: block; font-size: .78rem; font-weight: 800; margin-bottom: .55rem; }
.all-stores-stock-form > div { display: flex; gap: .55rem; }
.all-stores-stock-form .form-control { flex: 1; }
.all-stores-stock-form small, .all-stores-product-summary small { color: #667085; display: block; font-size: .72rem; margin-top: .45rem; }
.all-stores-product-summary { background: #f8f9fb; border-left: 3px solid var(--brand-red); margin-top: 1rem; padding: .8rem .9rem; }
.all-stores-product-summary span { color: #667085; display: block; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.all-stores-product-summary strong { display: block; font-size: .92rem; margin-top: .25rem; }
.all-stores-stock-message { color: #667085; font-size: .76rem; margin: 1rem 0 .65rem; }
.stock-locations-grid { display: grid; gap: .55rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stock-location-card { align-items: center; border: 1px solid #e4e7ec; border-radius: 9px; display: flex; justify-content: space-between; padding: .7rem .8rem; }
.stock-location-card strong, .stock-location-card small { display: block; }
.stock-location-card strong { font-size: .8rem; }
.stock-location-card small { color: #667085; font-size: .68rem; margin-top: .15rem; }
.stock-location-card > span { border-radius: 30px; font-size: .78rem; font-weight: 800; padding: .35rem .55rem; white-space: nowrap; }
.stock-location-card.has-stock > span { background: #e7f7ef; color: #198257; }
.stock-location-card.no-stock > span { background: #f0f1f3; color: #747b85; }
.search-result-caption { align-items: center; color: var(--muted); display: flex; flex: 0 0 auto; font-size: .76rem; justify-content: space-between; margin-top: 1rem; padding: .2rem .2rem .5rem; }
.product-results-scroll { flex: 1 1 auto; min-height: 240px; overflow: auto; }
.product-results-scroll thead th { background: #fff; box-shadow: inset 0 -1px 0 #eef0f2; position: sticky; top: 0; z-index: 3; }
.product-table { min-width: 1250px; }
.product-description, .product-code { display: block; }
.product-description { color: var(--ink); font-size: .8rem; }
.product-code { color: var(--muted); font-size: .68rem; margin-top: .2rem; }
button.table-action { background: transparent; border: 0; white-space: nowrap; }
.empty-search-result, .quote-empty-row td { color: var(--muted); font-size: .8rem; padding: 1.6rem !important; text-align: center; }
.quote-lines-table { min-width: 720px; }
.quote-quantity, .quote-price { border: 1px solid #dfe2e6; border-radius: 7px; padding: .45rem; }
.quote-quantity { max-width: 76px; }
.quote-price { max-width: 105px; }
.quote-summary { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 1.5rem; justify-content: flex-end; padding-top: 1rem; }
.quote-summary div { min-width: 100px; text-align: right; }
.quote-summary span, .quote-summary strong { display: block; }
.quote-summary span { color: var(--muted); font-size: .67rem; text-transform: uppercase; }
.quote-summary strong { font-size: 1rem; margin-top: .15rem; }
.quote-summary .btn small { display: block; font-size: .56rem; text-transform: uppercase; }
.quote-validation-message { color: #b42318; font-size: .78rem; font-weight: 700; margin: .75rem 0 0; min-height: 1.15rem; text-align: right; }
.printable-quote { display: none; }
.quote-print-actions { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; padding: 1.25rem; }
.quote-print-actions h1 { font-size: 1.8rem; font-weight: 820; letter-spacing: -.05em; margin-bottom: .2rem; }
.quote-print-actions p:last-child { color: var(--muted); font-size: .86rem; margin-bottom: 0; }
.quote-print-buttons { align-items: center; display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-end; }
.quote-email-form { align-items: center; display: flex; gap: .55rem; }
.quote-email-form .form-control { min-width: 245px; }
.saved-printable-quote { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 45px rgba(16, 24, 40, .08); margin: 0 auto; max-width: 980px; overflow: hidden; }
.saved-quote-hero { align-items: center; background: #fff; border-bottom: 5px solid var(--brand-red); display: flex; justify-content: space-between; min-height: 155px; padding: 1.35rem 2rem; }
.saved-quote-logo { height: 118px; object-fit: contain; object-position: left center; width: min(48%, 430px); }
.saved-quote-plusparts { height: 138px; object-fit: contain; object-position: right center; transform: scale(1.18); transform-origin: right center; width: min(48%, 430px); }
.saved-quote-title { align-items: center; display: flex; justify-content: space-between; padding: 1.45rem 2rem; }
.saved-quote-title h2 { font-size: 1.75rem; font-weight: 820; letter-spacing: -.055em; margin-bottom: 0; }
.saved-quote-title > strong { color: var(--brand-red-dark); font-size: 2rem; }
.saved-quote-grid { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4fr 1fr .75fr; }
.saved-quote-grid article { border-right: 1px solid var(--line); padding: 1rem 2rem; }
.saved-quote-grid article:last-child { border-right: 0; }
.saved-quote-grid span, .saved-quote-observation span, .saved-quote-footer span, .saved-quote-total span { color: #667085; display: block; font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.saved-quote-grid strong, .saved-quote-grid small { display: block; }
.saved-quote-grid strong { margin-top: .25rem; }
.saved-quote-grid small { color: #667085; font-size: .75rem; margin-top: .18rem; }
.saved-quote-observation { background: #fff7f6; border-bottom: 1px solid #ffd1cd; padding: 1rem 2rem; }
.saved-quote-observation p { color: #424a53; margin: .35rem 0 0; white-space: pre-wrap; }
.saved-quote-lines { border-collapse: collapse; width: 100%; }
.saved-quote-lines th { background: #f8f9fb; color: #667085; font-size: .67rem; letter-spacing: .08em; padding: .85rem .9rem; text-align: left; text-transform: uppercase; }
.saved-quote-lines td { border-top: 1px solid #eef0f2; color: #4d5660; font-size: .8rem; padding: .95rem .9rem; vertical-align: top; }
.saved-quote-lines td:nth-child(1), .saved-quote-lines td:nth-child(4), .saved-quote-lines td:nth-child(5), .saved-quote-lines td:nth-child(6),
.saved-quote-lines th:nth-child(1), .saved-quote-lines th:nth-child(4), .saved-quote-lines th:nth-child(5), .saved-quote-lines th:nth-child(6) { text-align: right; }
.saved-quote-lines td:nth-child(2) { width: 44%; }
.saved-quote-lines strong { color: var(--ink); }
.saved-quote-lines small { color: #667085; display: block; font-size: .68rem; margin-top: .24rem; }
.saved-quote-footer { align-items: flex-end; background: #fafbfc; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 1.2rem 2rem; }
.saved-quote-footer p { color: #667085; font-size: .78rem; margin: .35rem 0 0; max-width: 520px; }
.saved-quote-conditions { color: #667085; font-size: .78rem; line-height: 1.65; margin: .45rem 0 0; max-width: 610px; padding-left: 1.1rem; }
.quote-history-dashboard { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.quote-history-toolbar { justify-content: flex-start; }
.quote-history-toolbar .search-box { max-width: 560px; }
.quote-history-list { display: grid; gap: .8rem; padding: 1rem; }
.quote-history-card { align-items: center; background: #fff; border: 1px solid #eef0f2; border-radius: 12px; display: grid; gap: 1rem; grid-template-columns: minmax(280px, 1.4fr) .55fr .55fr auto; padding: 1rem; }
.quote-history-card span, .quote-history-card small { color: #667085; display: block; }
.quote-history-card > div > span:not(.quote-history-number), .quote-history-total span { font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.quote-history-card strong { display: block; margin-top: .2rem; }
.quote-history-number { color: var(--brand-red) !important; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.quote-history-total { text-align: right; }
.quote-history-total strong { color: var(--brand-red-dark); font-size: 1.25rem; }
.quote-history-actions { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: flex-end; }
.quote-history-empty { color: var(--muted); padding: 2.2rem; text-align: center; }
.quote-history-empty strong, .quote-history-empty span { display: block; }
.saved-quote-total { text-align: right; }
.saved-quote-total strong { color: var(--brand-red-dark); display: block; font-size: 2rem; letter-spacing: -.04em; }
.voided-heading { align-items: flex-start; }
.voided-filter-card { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; padding: 1rem; }
.voided-filter-form { align-items: end; display: flex; flex-wrap: wrap; gap: .75rem; }
.voided-filter-form label { margin: 0; }
.voided-filter-form label span { color: #344054; display: block; font-size: .68rem; font-weight: 850; letter-spacing: .07em; margin-bottom: .35rem; text-transform: uppercase; }
.voided-filter-form .form-control { min-width: 170px; }
.voided-filter-summary { background: #f8f9fb; border: 1px solid #edf0f2; border-radius: 10px; padding: .75rem .9rem; text-align: right; }
.voided-filter-summary strong, .voided-filter-summary span { display: block; }
.voided-filter-summary strong { font-size: .86rem; }
.voided-filter-summary span { color: var(--muted); font-size: .74rem; margin-top: .15rem; }
.voided-kpi-grid { display: grid; gap: 1rem; grid-template-columns: 1.05fr 1fr 1fr 1.25fr; margin-bottom: 1rem; }
.voided-kpi-card { overflow: hidden; padding: 1.15rem; position: relative; }
.voided-kpi-card::after { background: #edf0f2; border-radius: 999px; content: ""; height: 52px; position: absolute; right: -22px; top: -22px; width: 52px; }
.voided-kpi-card.primary { background: linear-gradient(135deg, #262a30, #383e47); border: 0; color: #fff; }
.voided-kpi-card.primary::after { background: rgba(240, 56, 50, .9); }
.voided-kpi-card span, .voided-kpi-card small { display: block; }
.voided-kpi-card span { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.voided-kpi-card.primary span, .voided-kpi-card.primary small { color: rgba(255, 255, 255, .72); }
.voided-kpi-card strong { display: block; font-size: 2.35rem; font-weight: 850; letter-spacing: -.055em; line-height: 1; margin: .45rem 0 .35rem; position: relative; z-index: 1; }
.voided-kpi-card small { color: var(--muted); font-size: .78rem; min-height: 1.1rem; }
.voided-analytics-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); margin-bottom: 1rem; }
.voided-ranking-card, .voided-donut-card { padding: 1.1rem; }
.voided-card-title { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 1rem; }
.voided-card-title h2 { font-size: 1.14rem; font-weight: 780; letter-spacing: -.03em; margin-bottom: 0; }
.voided-card-title > span { background: #f0f1f3; border-radius: 999px; color: #606872; font-size: .72rem; font-weight: 800; padding: .42rem .62rem; }
.voided-bar-list { display: grid; gap: .72rem; }
.voided-bar-row { align-items: center; border: 1px solid #eef0f2; border-radius: 10px; color: inherit; display: grid; gap: .8rem; grid-template-columns: minmax(230px, .8fr) minmax(180px, 1fr) 60px; padding: .8rem .9rem; }
.voided-bar-row:hover { background: #fafbfc; border-color: #dfe3e8; }
.voided-bar-meta strong, .voided-bar-meta span { display: block; }
.voided-bar-meta strong { color: var(--ink); font-size: .86rem; }
.voided-bar-meta span { color: var(--muted); font-size: .72rem; margin-top: .15rem; }
.voided-bar-track { background: #eef1f4; border-radius: 999px; height: 13px; overflow: hidden; }
.voided-bar-fill { background: linear-gradient(90deg, #f03832, #12a594); border-radius: inherit; display: block; height: 100%; min-width: 3px; }
.voided-bar-value { color: var(--brand-red-dark); font-size: 1rem; text-align: right; }
.voided-donut-card { align-items: center; display: flex; flex-direction: column; }
.voided-card-title.compact { align-self: stretch; }
.voided-donut, .voided-mini-donut { background: conic-gradient(#f03832 0 var(--bc), #12a594 var(--bc) calc(var(--bc) + var(--fc)), #f2aa3c calc(var(--bc) + var(--fc)) 100%); border-radius: 50%; position: relative; }
.voided-donut { height: 250px; margin: .55rem auto 1rem; width: 250px; }
.voided-donut::after, .voided-mini-donut::after { background: #fff; border-radius: 50%; content: ""; inset: 18%; position: absolute; }
.voided-donut.is-empty { background: #eef1f4; }
.voided-donut > div { align-items: center; display: flex; flex-direction: column; inset: 28%; justify-content: center; position: absolute; z-index: 1; }
.voided-donut strong { font-size: 2.2rem; font-weight: 850; letter-spacing: -.055em; line-height: 1; }
.voided-donut span { color: var(--muted); font-size: .73rem; font-weight: 800; margin-top: .2rem; text-transform: uppercase; }
.voided-legend { align-self: stretch; display: grid; gap: .5rem; }
.voided-legend span { align-items: center; color: #59616a; display: flex; font-size: .78rem; font-weight: 750; gap: .5rem; }
.voided-legend i { border-radius: 50%; height: 10px; width: 10px; }
.voided-legend .bc, .voided-mini-bars .bc { background: #f03832; }
.voided-legend .fc, .voided-mini-bars .fc { background: #12a594; }
.voided-legend .other, .voided-mini-bars .other { background: #f2aa3c; }
.voided-store-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
.voided-store-card { padding: 1rem; scroll-margin-top: 92px; }
.voided-store-header { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 1rem; }
.voided-store-header span { color: var(--brand-red); display: block; font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.voided-store-header h2 { font-size: 1rem; font-weight: 780; margin: .18rem 0 0; }
.voided-store-header > strong { color: var(--brand-red-dark); font-size: 1.8rem; line-height: 1; }
.voided-mini-chart { align-items: center; display: grid; gap: 1rem; grid-template-columns: 86px 1fr; }
.voided-mini-donut { height: 86px; width: 86px; }
.voided-mini-bars { display: grid; gap: .55rem; }
.voided-mini-bars div { display: grid; gap: .4rem; grid-template-columns: 64px 34px 1fr; }
.voided-mini-bars span { color: #667085; font-size: .68rem; font-weight: 800; }
.voided-mini-bars strong { font-size: .76rem; text-align: right; }
.voided-mini-bars i { background: #eef1f4; border-radius: 999px; display: block; height: 8px; margin-top: .25rem; overflow: hidden; }
.voided-mini-bars b { border-radius: inherit; display: block; height: 100%; min-width: 2px; }
.voided-store-footer { border-top: 1px solid #eef0f2; display: flex; gap: .6rem; justify-content: space-between; margin-top: 1rem; padding-top: .75rem; }
.voided-store-footer span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.voided-empty { color: var(--muted); padding: 2rem 1rem; text-align: center; }
.voided-table { min-width: 980px; }

@media (max-width: 900px) {
  .login-shell { display: block; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; }
  .mobile-logo { display: block; margin-bottom: 2.4rem; }
  .mobile-logo img { height: 58px; object-fit: contain; width: 260px; }
  .sidebar { width: 76px; }
  .sidebar-brand { padding: .8rem .35rem; }
  .sidebar-brand img { object-position: left; width: 66px; }
  .sidebar-nav a { justify-content: center; }
  .sidebar-nav a:not(.disabled) { font-size: 0; }
  .sidebar-nav a span { font-size: 1.3rem; }
  .sidebar-nav a small, .sidebar-nav p, .sidebar-footer div { display: none; }
  .sidebar-footer { justify-content: center; }
  .app-main { margin-left: 76px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.wide { grid-column: auto; }
  .permission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-context-grid { grid-template-columns: 1fr; }
  .product-filter-grid { grid-template-columns: 1fr; }
  .product-search-submit { width: 100%; }
  .brand-summary-grid, .audit-card, .model-dashboard, .model-form-grid, .customer-kpi-grid, .customer-edit-layout, .customer-form-grid, .customer-wide-grid, .customer-address-edit-row, .voided-kpi-grid, .voided-analytics-grid, .voided-store-grid { grid-template-columns: 1fr; }
  .customer-filter-form { grid-template-columns: 1fr; width: 100%; }
  .customer-address-heading, .customer-modal-search > div { align-items: stretch; flex-direction: column; }
  .voided-filter-card { align-items: stretch; flex-direction: column; }
  .voided-filter-summary { text-align: left; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 1rem; }
  .topbar > div:first-child, .user-menu div { display: none; }
  .page-content { padding: 1.35rem 1rem; }
  .page-heading { align-items: flex-start; gap: .8rem; }
  .status-pill { display: none; }
  .hero-card { padding: 1.5rem; }
  .hero-card h2 { font-size: 1.65rem; }
  .metric-grid { grid-template-columns: 1fr; }
  .quick-card { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .ruc-search-form, .product-search-form, .product-search-actions { align-items: stretch; flex-direction: column; }
  .customer-quote-form { grid-template-columns: 1fr; }
  .customer-name-field, .quote-customer-address-field, .customer-observation-field { grid-column: auto; }
  .customer-name-picker { grid-template-columns: 1fr; }
  .product-picker-toolbar, .selected-product-panel { align-items: stretch; flex-direction: column; }
  .product-search-modal .modal-dialog { max-width: calc(100vw - 20px); }
  .product-picker-actions, .all-stores-stock-form > div { flex-direction: column; }
  .stock-locations-grid { grid-template-columns: 1fr; }
  .selected-quantity, .selected-price { min-width: 0; width: 100%; }
  .quote-summary { align-items: stretch; flex-direction: column; gap: .65rem; }
  .quote-summary div { text-align: left; }
  .permission-grid { grid-template-columns: 1fr; }
  .quote-print-actions, .quote-print-buttons, .quote-email-form { align-items: stretch; flex-direction: column; }
  .quote-email-form .form-control { min-width: 0; width: 100%; }
  .saved-quote-hero { align-items: flex-start; flex-direction: column; gap: .8rem; }
  .quote-history-dashboard, .quote-history-card { grid-template-columns: 1fr; }
  .voided-bar-row { align-items: stretch; grid-template-columns: 1fr; }
  .voided-bar-value { text-align: left; }
  .voided-donut { height: 210px; width: 210px; }
  .voided-mini-chart { grid-template-columns: 1fr; }
  .voided-mini-donut { margin: auto; }
  .voided-store-footer { flex-direction: column; }
  .quote-history-total { text-align: left; }
  .saved-quote-title, .saved-quote-footer { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .saved-quote-grid { grid-template-columns: 1fr; }
  .saved-quote-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .saved-quote-logo, .saved-quote-plusparts { height: 86px; transform: none; width: 100%; }
}

@media print {
  @page { margin: 12mm; size: A4; }
  body { background: #fff; color: #20242a; }
  body * { visibility: hidden; }
  .printable-quote, .printable-quote *, .saved-printable-quote, .saved-printable-quote * { visibility: visible; }
  .printable-quote { display: block; font-family: "Segoe UI", Arial, sans-serif; left: 0; position: absolute; top: 0; width: 100%; }
  .saved-printable-quote { border: 0; border-radius: 0; box-shadow: none; left: 0; max-width: none; position: absolute; top: 0; width: 100%; }
  .saved-quote-hero { background: #fff; border-bottom: 3px solid var(--brand-red); min-height: 92px; padding: 0 0 10px; }
  .saved-quote-logo { height: 82px; }
  .saved-quote-plusparts { height: 98px; transform: scale(1.12); transform-origin: right center; }
  .saved-quote-title, .saved-quote-grid article, .saved-quote-observation, .saved-quote-footer { padding-left: 0; padding-right: 0; }
  .saved-quote-title h2 { font-size: 22px; }
  .saved-quote-title > strong, .saved-quote-total strong { font-size: 22px; }
  .saved-quote-lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9px; padding: 7px 6px; }
  .saved-quote-lines td { font-size: 10px; padding: 7px 6px; }
  .saved-quote-footer { background: #fff; }
  .printable-quote-header { align-items: center; border-bottom: 3px solid var(--brand-red); display: flex; justify-content: space-between; padding-bottom: 12px; }
  .printable-quote-header img { height: 52px; object-fit: contain; width: 245px; }
  .printable-quote-header div { text-align: right; }
  .printable-quote-header h1 { font-size: 25px; letter-spacing: -.04em; margin-bottom: 2px; text-transform: uppercase; }
  .printable-quote-header p { color: #667085; font-size: 11px; margin-bottom: 0; }
  .printable-quote-meta, .printable-customer { border: 1px solid #dfe2e6; display: grid; gap: 0; margin-top: 15px; }
  .printable-quote-meta { grid-template-columns: .7fr 1.4fr 1fr; }
  .printable-customer { grid-template-columns: .75fr 2fr; }
  .printable-quote-meta div, .printable-customer div { border-right: 1px solid #dfe2e6; padding: 8px 10px; }
  .printable-quote-meta div:last-child, .printable-customer div:nth-child(2) { border-right: 0; }
  .print-observation { border-right: 0 !important; border-top: 1px solid #dfe2e6; grid-column: 1 / -1; }
  .printable-quote span { color: #667085; display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; margin-bottom: 3px; text-transform: uppercase; }
  .printable-quote strong, .printable-quote p { font-size: 11px; }
  .print-observation p { margin-bottom: 0; white-space: pre-wrap; }
  .printable-lines-table { border-collapse: collapse; margin-top: 16px; width: 100%; }
  .printable-lines-table th { background: #20242a; color: #fff; font-size: 9px; letter-spacing: .06em; padding: 8px; text-align: left; text-transform: uppercase; }
  .printable-lines-table td { border-bottom: 1px solid #dfe2e6; font-size: 10px; padding: 9px 8px; vertical-align: top; }
  .printable-lines-table td:first-child { width: 55%; }
  .printable-lines-table td:nth-child(n+2), .printable-lines-table th:nth-child(n+2) { text-align: right; }
  .printable-lines-table small { color: #667085; display: block; font-size: 9px; margin-top: 2px; }
  .printable-total { align-items: end; border-top: 2px solid #20242a; display: flex; flex-direction: column; margin-left: auto; margin-top: 14px; padding-top: 8px; width: 210px; }
  .printable-total strong { color: var(--brand-red-dark); font-size: 20px; }
  .printable-note { border-top: 1px solid #dfe2e6; color: #667085; font-size: 9px !important; margin-top: 28px; padding-top: 8px; }
}
