:root {
    --ink: #152333;
    --muted: #667586;
    --line: #dbe3e9;
    --paper: #ffffff;
    --soft: #f3f6f8;
    --accent: #e44732;
    --accent-dark: #bb2f1f;
    --navy: #0c263d;
    --success: #16835b;
    --shadow: 0 18px 45px rgba(12, 38, 61, .09);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.55;
}

/* Taller: panel diario, productos y productividad */
.daily-work { margin: .85rem 0 1rem; padding: .9rem 1rem 1rem; }
.daily-work > summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; list-style:none; cursor:pointer; }
.daily-work > summary::-webkit-details-marker { display:none; }
.daily-work > summary .eyebrow { margin-bottom:.15rem; }
.daily-work > summary strong { display:block; font-size:1.35rem; line-height:1.2; }
.work-toggle { display:grid; place-items:center; width:2rem; height:2rem; border:1px solid var(--line); border-radius:999px; color:var(--navy); font-size:1.35rem; line-height:1; transition:transform .18s ease; }
.daily-work[open] > summary .work-toggle { transform:rotate(180deg); }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; }
.section-heading h2, .section-heading h3 { margin:.05rem 0 0; }
.daily-work .section-heading h2 { font-size:1.35rem; line-height:1.2; }
.daily-work .eyebrow { font-size:.68rem; }
.work-board { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.65rem; margin-top:.65rem; }
.work-column { min-width:0; padding:.55rem; border:1px solid #d8e2ea; border-radius:13px; background:#f5f8fa; }
.work-column > header { display:flex; justify-content:space-between; align-items:center; gap:.45rem; margin-bottom:.35rem; }
.work-column > header h3 { margin:0; font-size:.88rem; line-height:1.15; }
.work-column > header small { display:block; margin-top:.18rem; color:#718096; font-size:.68rem; line-height:1.25; }
.work-column > header span { min-width:1.55rem; padding:.08rem .38rem; border-radius:999px; background:#e74735; color:#fff; text-align:center; font-size:.75rem; font-weight:800; }
.work-card { display:block; margin:.35rem 0 0; padding:.48rem .58rem; border:1px solid #d7e0e7; border-radius:10px; background:#fff; color:#102a43; text-decoration:none; box-shadow:0 3px 9px rgba(16,42,67,.04); }
.work-card:hover { border-color:#e74735; transform:translateY(-1px); }
.work-card-meta { display:flex; align-items:center; justify-content:space-between; gap:.45rem; color:#d83a29; font-size:.67rem; font-weight:900; letter-spacing:.03em; }
.work-card-meta b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.work-card-meta em { flex:none; color:#68788a; font-style:normal; font-weight:700; letter-spacing:0; }
.work-card > strong, .work-card > small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.work-card > strong { margin:.12rem 0 0; font-size:.84rem; line-height:1.2; }
.work-card > small { color:#68788a; font-size:.72rem; line-height:1.2; }
.work-empty { margin:.35rem 0; color:#718096; font-size:.78rem; }
.product-picker { position:relative; max-width:760px; margin:.8rem 0 1rem; }
.product-picker label { display:block; }
.product-search-results { position:absolute; z-index:30; top:100%; left:0; right:0; max-height:330px; overflow:auto; border:1px solid #cbd8e2; border-radius:0 0 14px 14px; background:#fff; box-shadow:0 16px 32px rgba(16,42,67,.18); }
.product-search-result { width:100%; display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.85rem 1rem; border:0; border-bottom:1px solid #e6edf2; background:#fff; color:#102a43; text-align:left; cursor:pointer; }
.product-search-result:hover { background:#fff3f0; }
.product-search-result span, .product-search-result small { display:block; }
.product-search-result small { margin-top:.18rem; color:#64748b; }
.product-linked-line { background:#f0fbf7; }
.staff-productivity { margin:1rem 0; padding:1.25rem; }
.staff-productivity-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.85rem; margin-top:1rem; }
.staff-productivity-grid article { padding:1rem; border:1px solid #d8e2ea; border-radius:14px; background:#f8fafc; }
.staff-productivity-grid article span, .staff-productivity-grid article strong, .staff-productivity-grid article small { display:block; }
.staff-productivity-grid article strong { margin:.25rem 0; color:#0b3a64; font-size:1.55rem; }
.customer-repair-actions { display:flex; flex-wrap:wrap; gap:.65rem; margin:1rem 0; }

@media (max-width: 980px) {
  .work-board { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .daily-work { padding:.7rem; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .work-board { display:flex; gap:.75rem; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:.35rem; }
  .work-column { flex:0 0 82vw; scroll-snap-align:start; }
  .product-picker { max-width:none; }
  .product-search-result { align-items:flex-start; }
  .customer-repair-actions .button { width:100%; }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-size: 17px; background: radial-gradient(circle at 90% 0, #e7eef3 0, transparent 28rem), var(--soft); }
a { color: inherit; }
.shell { width: min(1760px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.brand img { width: 190px; height: 52px; object-fit: contain; }
.internal-brand-label { display: inline-flex; align-items: center; max-width: 190px; padding: 7px 10px; border: 1px solid #f2b2aa; border-radius: 9px; color: var(--accent-dark); background: #fff7f5; font-size: .72rem; line-height: 1.15; font-weight: 800; letter-spacing: 0; }
.admin-only-note { margin: 8px auto 0; max-width: 680px; color: var(--muted); font-size: 1rem; text-align: center; }
.shop-link { color: var(--ink) !important; }
.internal-access { color: var(--accent-dark) !important; }
nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
nav a { text-decoration: none; font-size: 1rem; font-weight: 700; color: var(--muted); }
nav a:hover { color: var(--accent); }
.nav-form { display: inline; }
.nav-form button { border: 0; padding: 0; background: none; color: var(--muted); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.nav-form button:hover { color: var(--accent); }
main { padding: 54px 0 76px; min-height: calc(100vh - 150px); }
footer { background: var(--navy); color: #c9d5df; padding: 28px 0; font-size: .9rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 4.7rem); line-height: 1.02; letter-spacing: -.055em; max-width: 900px; }
h2 { letter-spacing: -.025em; }
.eyebrow { color: var(--accent); font-size: .94rem; font-weight: 850; letter-spacing: .035em; text-transform: none; display: block; margin-bottom: 15px; }
.hero .eyebrow { font-size: 1rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); gap: 42px; align-items: center; min-height: 500px; }
.hero > div > p { color: var(--muted); font-size: 1.17rem; max-width: 720px; }
.hero-card { background: var(--navy); color: white; border-radius: 26px; padding: 34px; box-shadow: var(--shadow); }
.hero-card strong { font-size: 1.35rem; }
.hero-card ol { margin: 25px 0 0; padding-left: 22px; color: #dce6ed; }
.hero-card li + li { margin-top: 14px; }
.service-coverage { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: 42px; align-items: center; margin: 18px 0 24px; padding: 42px; overflow: hidden; background: linear-gradient(135deg, #fff 0%, #f8fbfd 100%); }
.coverage-copy h2 { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.08; margin-bottom: 16px; }
.coverage-copy > p { color: var(--muted); font-size: 1.05rem; }
.coverage-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 28px 0 20px; }
.coverage-stats div { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.coverage-stats strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.12; }
.coverage-stats .coverage-primary-stat strong { color: var(--accent); font-size: 1.8rem; }
.coverage-stats span { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; font-weight: 750; line-height: 1.25; }
.coverage-map { position: relative; min-height: 360px; display: grid; place-items: center; border-radius: 22px; background: radial-gradient(circle at 62% 40%, rgba(228,71,50,.11), transparent 10rem), linear-gradient(145deg, #e9f1f5, #dce8ee); overflow: hidden; }
.coverage-map svg { width: min(100%, 650px); height: auto; padding: 22px; filter: drop-shadow(0 18px 22px rgba(12,38,61,.16)); }
.coverage-country { stroke: #254a65; stroke-width: 2.2; stroke-linejoin: round; }
.coverage-spain { fill: #123650; }
.coverage-portugal { fill: #1d4a66; }
.coverage-country-label { fill: rgba(255,255,255,.4); font-size: 15px; font-weight: 900; letter-spacing: .14em; text-anchor: middle; pointer-events: none; }
.coverage-label-portugal { font-size: 10px; }
.coverage-marker { cursor: pointer; outline: none; }
.coverage-pulse { fill: rgba(228,71,50,.2); transition: transform .2s ease, fill .2s ease; transform-box: fill-box; transform-origin: center; }
.coverage-dot { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.coverage-marker-count { fill: #fff; font-size: 6px; font-weight: 900; text-anchor: middle; pointer-events: none; }
.coverage-marker:hover .coverage-pulse, .coverage-marker:focus .coverage-pulse, .coverage-marker.is-active .coverage-pulse { transform: scale(1.18); fill: rgba(228,71,50,.38); }
.coverage-marker:focus .coverage-dot, .coverage-marker.is-active .coverage-dot { stroke-width: 4; }
.coverage-map-hint { position: absolute; z-index: 2; top: 12px; left: 14px; max-width: 290px; margin: 0; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.88); color: #526878; font-size: .68rem; font-weight: 750; line-height: 1.3; box-shadow: 0 5px 15px rgba(12,38,61,.08); }
.coverage-map.has-active-marker .coverage-map-hint { visibility: hidden; }
.coverage-tooltip { position: absolute; z-index: 4; top: 12px; left: 50%; width: min(330px, calc(100% - 24px)); padding: 12px 42px 12px 14px; transform: translateX(-50%); border: 1px solid rgba(228,71,50,.28); border-radius: 14px; background: rgba(255,255,255,.97); color: var(--ink); box-shadow: 0 14px 30px rgba(12,38,61,.18); }
.coverage-tooltip[hidden] { display: none; }
.coverage-tooltip strong, .coverage-tooltip span, .coverage-tooltip small { display: block; }
.coverage-tooltip strong { color: var(--accent-dark); font-size: 1rem; }
.coverage-tooltip span { margin-top: 2px; font-weight: 850; }
.coverage-tooltip small { margin-top: 2px; color: var(--muted); font-size: .74rem; }
.coverage-tooltip button { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: #fff0ed; color: var(--accent-dark); font-size: 1.25rem; font-weight: 900; cursor: pointer; }
.coverage-map-label { position: absolute; right: 18px; bottom: 16px; color: #526878; font-size: .78rem; font-weight: 800; }
.coverage-map-credit { position: absolute; left: 18px; bottom: 16px; color: #738591; font-size: .62rem; }
.coverage-map-credit a { color: inherit; }
.coverage-map-hint, .coverage-map-label, .coverage-map-credit, .coverage-country-label { display: none !important; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.button { appearance: none; border: 0; border-radius: 10px; padding: 13px 20px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; user-select: none; transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .12s ease, box-shadow .16s ease, opacity .16s ease; }
.button.primary { background: var(--accent); color: white; box-shadow: 0 9px 20px rgba(228,71,50,.22); }
.button.primary:hover,
.button.primary:focus-visible { background: var(--accent-dark); color: white; }
.button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.secondary:hover,
.button.secondary:focus-visible { color: var(--accent-dark); border-color: #efb5ad; background: #fff7f5; }
.button:not(:disabled):active,
.button.is-button-active { transform: translateY(1px) scale(.985); box-shadow: 0 3px 10px rgba(239, 71, 53, .24); }
.button.secondary.is-button-active { color: #fff; border-color: var(--accent); background: var(--accent); }
.button:disabled,
.button[aria-disabled="true"] { cursor: not-allowed; opacity: .62; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.request-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.request-type-grid .card { display: flex; flex-direction: column; align-items: flex-start; }
.request-type-grid p { color: var(--muted); flex: 1; }
.account-access { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; padding: 22px 26px; }
.account-access strong { display: block; font-size: 1.05rem; }
.account-access p { margin: 4px 0 0; color: var(--muted); }
.account-access-active { border-color: #98d7be; background: #f2fbf7; }
.card, .table-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card { padding: 30px; }
.feature-number { color: var(--accent); font-weight: 900; letter-spacing: .1em; }
.feature-grid h2 { margin: 18px 0 8px; }
.feature-grid p, .muted { color: var(--muted); }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: clamp(2.3rem, 5vw, 4rem); margin-bottom: 12px; }
.page-heading p { color: var(--muted); font-size: 1.06rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-grid .wide { grid-column: 1 / -1; }
.measure-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.measure-grid legend { padding: 0 7px; color: #344354; font-size: 1rem; font-weight: 800; }
.vehicle-identifiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.unit-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid #bdc9d2; border-radius: 9px; background: var(--soft); }
.unit-input input { border: 0; border-radius: 0; }
.unit-input span { padding: 0 12px; color: var(--muted); font-size: .95rem; font-weight: 800; }
.unit-input:focus-within { outline: 3px solid rgba(228,71,50,.15); border-color: var(--accent); }
.unit-input:focus-within input { outline: 0; }
label { display: grid; gap: 8px; color: #344354; font-size: 1rem; font-weight: 750; }
.field-caption { display: inline-flex; align-items: baseline; gap: 5px; min-height: 24px; }
input, textarea, select { width: 100%; border: 1px solid #bdc9d2; border-radius: 9px; padding: 13px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: white; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(228,71,50,.15); border-color: var(--accent); }
.postal-place-select { margin-top: 2px; }
.postal-lookup-status { color: var(--muted); font-size: .86rem; font-weight: 650; }
.postal-lookup-status:empty { display: none; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; gap: 11px; font-weight: 600; }
.check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--accent); }
.upload-help { padding: 18px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.upload-help p { margin: 4px 0 0; color: var(--muted); }
.attachment-list { margin: 0 0 28px; padding-left: 20px; }
.attachment-list li + li { margin-top: 8px; }
.attachment-list a { color: var(--accent-dark); font-weight: 750; }
.trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.notice { border-radius: 12px; padding: 15px 18px; margin-bottom: 22px; border: 1px solid; }
.notice.error { color: #8c241a; background: #fff0ed; border-color: #efb5ad; }
.notice.success { color: #0d6143; background: #eaf8f2; border-color: #98d7be; }
.success-card { max-width: 820px; margin: 40px auto; text-align: center; }
.success-card h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); margin-inline: auto; }
.success-mark { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--success); font-size: 2rem; margin: 0 auto 24px; }
.credentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0 14px; }
.credentials div { background: var(--soft); border: 1px dashed #9babb8; border-radius: 12px; padding: 20px; }
.credentials small { display: block; color: var(--muted); font-weight: 800; letter-spacing: .1em; }
.credentials strong { display: block; margin-top: 7px; font-size: 1.35rem; letter-spacing: .06em; }
.success-card .actions { justify-content: center; }
.lookup-form { max-width: 620px; display: grid; gap: 20px; }
.admin-login-page { width: min(620px, 100%); min-height: calc(100vh - 334px); margin: 0 auto; display: flex; flex-direction: column; justify-content: center; }
.admin-login-page .page-heading { text-align: center; }
.admin-login-page .page-heading h1 { margin-inline: auto; }
.admin-login-form { width: 100%; margin: 0 auto; }
.status-heading, .admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.status-heading > div { width: 100%; }
.status-heading h1, .admin-heading h1 { margin-bottom: 5px; }
.repair-page-heading { margin-bottom: 18px; }
.repair-heading-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(640px, 655px); gap: 32px; align-items: stretch; }
.repair-identity h1 { margin: 4px 0 4px; font-size: clamp(2rem, 3vw, 2.65rem); }
.repair-identity p { margin: 0; }
.repair-reference { font-size: 1.08rem; letter-spacing: .09em; }
.repair-order-reference { display:block; margin-top: 2px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.repair-identity, .repair-heading-controls { display:flex; flex-direction:column; min-width:0; }
.repair-identity { display:grid; grid-template-rows:auto auto auto auto; min-height:0; align-items:start; }
.repair-identity-main { display:flex; flex-direction:column; justify-content:flex-start; min-width:0; }
.repair-payment-badge { display:block; margin-top:2px; font-size:.96rem; line-height:1.2; color:#173e63; }
.repair-payment-badge.is-paid { color:#087443; font-weight:700; }
.repair-heading-controls { align-self:stretch; gap:18px; justify-items:end; }
.repair-top-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 205px); justify-content:end; align-items:stretch; gap:10px; margin:0; }
.repair-top-actions.actions-3 .deliver-repair-form { grid-column:1; }
.repair-top-actions.actions-3 .invoice-top-action { grid-column:2; }
.repair-top-actions.actions-3 .back-link { grid-column:3; }
.repair-top-actions.actions-2 .deliver-repair-form,
.repair-top-actions.actions-2.no-delivery .invoice-top-action { grid-column:1; }
.repair-top-actions.actions-2.has-delivery .back-link { grid-column:2; }
.repair-top-actions.actions-2.no-delivery .back-link { grid-column:2; }
.repair-top-actions.actions-1 .back-link { grid-column:1; }
.repair-top-actions .back-link { width:205px; min-height:48px; margin-bottom:0; }
.repair-top-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:stretch;
  gap:10px;
}
.repair-top-actions > .deliver-repair-form,
.repair-top-actions > .invoice-top-action,
.repair-top-actions > .back-link {
  flex:0 0 205px;
  grid-column:auto!important;
}
.invoice-top-action { width:205px; }
.invoice-top-action .button { width:100%; min-height:48px; }
.repair-top-actions .button { width:205px; min-height:48px; }
.repair-top-actions .deliver-repair-form { width:205px; margin:0; }
.repair-top-actions .deliver-repair-form .button { grid-column: auto; width: 100%; }
.repair-top-actions .back-link, .repair-top-actions .button { display:flex; align-items:center; justify-content:center; padding:10px 12px; font-size:.9rem; line-height:1.15; text-align:center; white-space:nowrap; }
.repair-status-controls { display: grid; grid-template-columns: repeat(3, 205px); gap: 10px; justify-content: end; }
.repair-status-controls { width: 100%; justify-content: end; }
.repair-heading-controls .repair-top-actions { margin-top:auto; }
.repair-identity .repair-document-actions { margin-top:0; }
.repair-status-controls select, .repair-status-controls input { min-height: 48px; }
.repair-status-controls input[readonly] { background: #eef3f6; color: var(--navy); cursor: default; }
.repair-status-controls .deliver-repair-form { align-self: end; margin: 0; }
.vehicle-history .table-wrap { overflow-x: auto; }
.vehicle-history table { min-width: 1050px; }
.vehicle-history td { vertical-align: top; }
.vehicle-history td:nth-child(4), .vehicle-history td:nth-child(5) { min-width: 230px; white-space: normal; }
.table-wrap details { margin-top: .45rem; }
.table-wrap details summary { cursor: pointer; color: #52657c; }
.table-wrap pre { max-width: 700px; overflow: auto; white-space: pre-wrap; font: .78rem/1.35 Consolas, monospace; background: #f2f5f7; padding: .7rem; border-radius: .5rem; }
.repair-document-actions { display:grid; grid-template-columns:repeat(3,205px); justify-content:start; gap:10px; margin-top:22px; align-items: center; }
.repair-document-actions .button { display:flex; align-items:center; justify-content:center; width:205px; min-width:0; min-height:48px; padding:10px 12px; font-size:.9rem; line-height:1.15; text-align:center; white-space:nowrap; }
.quote-action { display:flex; align-items:center; gap:10px; min-width:0; min-height:48px; }
.quote-restore-form { margin: 0; }
.quote-restore-form .button { flex: 0 0 205px; }
.quote-action .button { flex:0 0 205px; }
.quote-admin-status { color: var(--muted); font-size:.82rem; line-height:1.25; white-space:nowrap; display:inline-flex; flex-direction:column; align-items:flex-start; }
.quote-admin-status strong { color: var(--navy); }
.quote-status { display:flex; align-items:baseline; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.quote-status strong { white-space:nowrap; }
.repair-save-actions { justify-content:flex-end; }
.repair-toolbar { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(190px, 220px)) minmax(24px, 1fr) repeat(2, minmax(220px, 260px)); align-items: end; gap: 12px; margin-top: 24px; }
.repair-toolbar > :nth-child(3) { grid-column: 4; }
.repair-toolbar > :nth-child(4) { grid-column: 5; }
.repair-toolbar .button { width: 100%; min-height: 48px; padding-inline: 14px; }
.repair-toolbar select { min-height: 48px; }
.repair-toolbar input[readonly] { min-height: 48px; background: #eef3f6; color: var(--navy); cursor: default; }
.status-pill { background: #e9f2f7; color: var(--navy); border: 1px solid #bed2de; border-radius: 999px; padding: 9px 15px; font-size: .9rem; font-weight: 850; white-space: nowrap; }
.status-pill.small { padding: 6px 10px; font-size: .9rem; }
.status-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 22px; align-items: start; }
.lead { font-size: 1.08rem; }
.summary { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; display: grid; gap: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 20px; }
dt { color: var(--muted); font-size: .95rem; font-weight: 750; text-transform: none; letter-spacing: 0; }
dd { margin: 0; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 27px 22px; }
.timeline li::before { content: ""; position: absolute; width: 11px; height: 11px; background: var(--accent); border: 4px solid white; border-radius: 50%; left: -25px; top: 2px; box-shadow: 0 0 0 1px var(--line); }
.timeline time, .timeline small { display: block; color: var(--muted); font-size: .9rem; }
.timeline p { margin: 5px 0 0; }
.timeline.compact { max-height: 500px; overflow: auto; }
.metric { font-weight: 850; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dashboard-grid a, .dashboard-grid div, .dashboard-grid button { display: grid; gap: 2px; padding: 18px 20px; color: var(--ink); text-decoration: none; text-align: left; font: inherit; background: var(--paper); border: 1px solid #b8c7d2; border-radius: 10px; cursor: pointer; }
.dashboard-grid a:hover, .dashboard-grid button:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.dashboard-grid strong { color: var(--navy); font-size: 1.8rem; line-height: 1; }
.dashboard-grid span { font-size: .95rem; font-weight: 800; text-transform: none; }
.dashboard-grid .has-alerts { background: #fff3ef; border-color: #efb5ad; }
.dashboard-grid .has-alerts strong { color: var(--accent-dark); }
.advanced-search { flex: 1 0 100%; margin-top: .2rem; }
.advanced-search > summary { display: inline-block; color: var(--navy); font-weight: 800; cursor: pointer; }
.advanced-search-fields { display:flex; align-items:end; flex-wrap:wrap; gap:.75rem; margin-top:.7rem; padding-top:.7rem; border-top:1px solid var(--line); }
.advanced-search-fields label { display:grid; gap:.25rem; color:var(--muted); font-size:.82rem; font-weight:750; }
.advanced-search-fields input { min-height:42px; }
.results-caption { margin:.1rem 0 .6rem; color:var(--muted); font-size:.86rem; }
.pagination { display:flex; justify-content:center; gap:.4rem; margin:1rem 0; }
.pagination a { display:grid; place-items:center; min-width:2.35rem; height:2.35rem; padding:0 .55rem; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--navy); font-weight:800; text-decoration:none; }
.pagination a.active, .pagination a:hover { border-color:var(--accent); background:var(--accent); color:#fff; }
.alerts-dialog { width: min(1500px, 96vw); max-height: 88vh; padding: 0; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.alerts-dialog::backdrop { background: rgba(7,25,40,.72); }
.alerts-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.alerts-dialog-header h2 { margin: 2px 0 5px; }
.alerts-dialog-header p { margin: 0; color: var(--muted); }
.alerts-table-wrap { max-height: 58vh; overflow: auto; padding: 0 28px; }
.alerts-table-wrap table { min-width: 1050px; }
.alerts-table-wrap th { position: sticky; top: 0; z-index: 1; background: var(--soft); }
.alerts-table-wrap td:nth-child(5) { min-width: 290px; font-weight: 700; color: var(--accent-dark); }
.alerts-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 18px 28px 24px; border-top: 1px solid var(--line); }
.filters { display: grid; grid-template-columns: minmax(360px, 1fr) 180px 175px 110px 110px; gap: 12px; padding: 18px; margin-bottom: 18px; align-items: end; }
.filters > * { min-width: 0; }
.filters > input, .filters > select, .filters > label > input, .filters > .button { height: 42px; min-height: 42px; box-sizing: border-box; }
.filters > select { font-size: .86rem; padding: 10px 30px 10px 12px; font-weight: 400; line-height: 20px; }
.filters > label { gap: 4px; white-space: nowrap; font-size: .82rem; font-weight: 400; }
.filters > label > input { width: 100%; min-width: 0; font-size: .86rem; padding: 10px 8px; font-weight: 400; }
.filters > .button { padding: 10px 12px; white-space: nowrap; }
.filters > .advanced-search { grid-column: 1 / -1; flex: none; margin-top: 0; }
.filters > .advanced-search:not([open]) .advanced-search-fields { display: none; }
.filters > .advanced-search[open] .advanced-search-fields { justify-content: flex-start; }
.filters > .advanced-search-fields { grid-column: 1 / -1; }
.table-card { overflow-x: auto; }
.table-action { display: inline-flex; margin-left: 8px; padding: 6px 10px; font-size: .78rem; white-space: nowrap; }
.inline-order-state { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; white-space: nowrap; }
.inline-order-state select { width: 150px; min-height: 36px; padding: 7px 28px 7px 10px; font: inherit; font-size: .82rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.inline-order-state .table-action { margin-left: 0; min-height: 36px; }
.table-card td { vertical-align: middle; }
table { width: 100%; border-collapse: collapse; }
.admin-repairs-table { table-layout: fixed; min-width: 1050px; }
.admin-repairs-table .col-reference { width: 190px; }
.admin-repairs-table .col-date { width: 125px; }
.admin-repairs-table .col-type { width: 150px; }
.admin-repairs-table .col-customer { width: 30%; }
.admin-repairs-table .col-vehicle { width: 32%; }
.admin-repairs-table .col-status { width: 270px; }
.admin-repairs-table th:nth-child(4), .admin-repairs-table td:nth-child(4),
.admin-repairs-table th:nth-child(5), .admin-repairs-table td:nth-child(5) { white-space: normal; overflow-wrap: anywhere; }
.admin-repairs-table th, .admin-repairs-table td { text-transform: uppercase; }
th, td { text-align: left; padding: 15px 17px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: #4f6070; background: #f8fafb; font-size: .95rem; font-weight: 750; text-transform: none; letter-spacing: 0; }
td a { color: var(--accent-dark); font-weight: 850; }
.admin-detail { display: block; }
.admin-work-form { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.admin-work-form .span2 { grid-column: span 2; }
.invoice-lines { overflow-x: auto; }
.invoice-lines table { background: white; border: 1px solid var(--line); }
.invoice-lines table input { min-width: 100px; }
.invoice-lines th, .invoice-lines td { padding: 8px; }
.invoice-lines th:first-child { width: 55%; }
.invoice-lines .line-remove { border: 0; background: #fff0ed; color: #a52b1d; border-radius: 7px; width: 34px; height: 34px; font-size: 1.4rem; cursor: pointer; }
.invoice-lines .labor-line { background: #f1f7fa; }
.invoice-lines .labor-line input[readonly] { background: #edf3f6; color: var(--navy); font-weight: 800; }
.invoice-lines.invoice-locked input[readonly] { background: #edf3f6; color: #526b80; cursor: not-allowed; }
.invoice-lines.invoice-locked .muted { font-size: 0.86rem; white-space: nowrap; }
.labor-lock { display: inline-block; color: var(--muted); font-size: .9rem; font-weight: 800; white-space: nowrap; }
.invoice-controls-row { display: flex; align-items: center; justify-content: flex-end; gap: 22px; margin-top: 16px; }
.diagnostic-fee-controls { display: flex; align-items: center; gap: 18px; margin-right: auto; }
.diagnostic-fee-control, .diagnostic-fee-amount { display: inline-flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap; }
.diagnostic-fee-control input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.diagnostic-fee-amount input { width: 140px; min-height: 54px; margin: 0; }
.invoice-controls-row > .button { min-height: 54px; }
.invoice-controls-row > .button { white-space: nowrap; }
.invoice-total-row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-height: 49px; margin: 0; white-space: nowrap; }
.invoice-total-row strong { font-size: 1.3rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.sale-form { display: grid; gap: 18px; }
.sale-customer-picker { display: grid; gap: 18px; }
.sale-mode-actions, .sale-section-heading, .sale-meta { display: flex; gap: 12px; align-items: end; justify-content: space-between; }
.sale-meta { justify-content: flex-start; margin-bottom: 18px; }
.sale-meta label { width: min(320px, 100%); }
.sale-customer-results { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.sale-customer-result { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 13px 16px; background: white; text-align: left; cursor: pointer; display: grid; gap: 2px; }
.sale-customer-result:last-child { border-bottom: 0; }
.sale-customer-result:hover { background: #f2f7fa; }
.sale-customer-result span { color: var(--muted); font-size: .85rem; }
.sale-paid { margin-top: 20px; padding: 16px; border: 1px solid #b9d8cb; background: #f1faf6; border-radius: 10px; }
.sale-paid small { display: block; color: var(--muted); }
.repair-invoice-options { display: grid; grid-template-columns: minmax(170px, 230px) minmax(210px, 280px) minmax(190px, 1fr); gap: 14px; align-items: end; margin: 0; }
.repair-invoice-options .check { align-self: center; }
.detail-section, .logistics-section { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.detail-section h2, .logistics-section h2 { margin-bottom: 14px; }
.repair-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.repair-section-heading h2 { margin: 0; }
.repair-section-save { min-width: 170px; min-height: 46px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.repair-save-action {
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.repair-save-action:hover,
.repair-save-action:focus-visible {
    color: var(--accent-dark);
    border-color: #efb5ad;
    background: #fff7f5;
}
.repair-save-action:active,
.repair-save-action.is-processing,
.repair-save-action.is-processing:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(239, 71, 53, .24);
}
.repair-summary-section textarea { background: white; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.detail-grid .detail-full { grid-column: 1 / -1; }
.logistics-section .measure-grid { background: white; }
.logistics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.report-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 140px; align-items: end; gap: 14px; margin-bottom: 18px; }
.sales-summary-section { margin-bottom: 18px; }
.sales-summary-section .sales-summary { margin-bottom: 0; }
.sales-summary-section .section-heading { margin-bottom: 12px; }
.report-controls { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto auto; align-items: end; gap: 12px; margin-bottom: 20px; }
.report-controls.report-filters-inline { display: grid; }
.report-module-action { flex: 0 0 auto; }
.report-controls input, .report-controls select, .report-controls .button { height: 56px; min-height: 56px; box-sizing: border-box; }
.report-module-action { align-self: end; }
.report-module-action { display: flex; align-items: end; gap: 10px; }
.report-module-action .button { height: 56px; min-height: 56px; display: inline-flex; align-items: center; white-space: nowrap; }
.report-export-popover { position: relative; }
.report-export-popover > summary { list-style: none; cursor: pointer; }
.report-export-popover > summary::-webkit-details-marker { display: none; }
.report-export-popover > form { position: absolute; z-index: 5; right: 0; top: calc(100% + 8px); display: grid; grid-template-columns: 150px 150px auto; gap: 10px; padding: 14px; min-width: 470px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.report-export-popover > form label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 750; }
.report-export-popover > form input, .report-export-popover > form .button { height: 42px; min-height: 42px; box-sizing: border-box; }
.sales-summary-section .report-filters-inline { grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto auto; margin: 0 0 22px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.sales-summary-section .report-filters-inline label { gap: 5px; }
.sales-summary-section .report-filters-inline input { min-height: 42px; }
.sales-summary-section .report-filters-inline .button { min-height: 42px; padding: 9px 16px; }
.sales-summary article.highlight { background: #eaf7f1; border-color: #9bd8bc; }
.report-filters > label { min-width: 0; }
.report-filters > label > input, .report-filters > label > select { min-width: 0; }
.sales-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.sales-summary article { display: grid; gap: 3px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.sales-summary span, .sales-summary small { color: var(--muted); font-weight: 750; }
.sales-summary strong { color: var(--navy); font-size: 1.55rem; }
.report-open-button { justify-self: end; white-space: nowrap; }
.report-dialog { width: min(920px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.report-dialog::backdrop { background: rgba(7,25,40,.72); }
.report-dialog-inner { padding: 26px; overflow: auto; }
.report-dialog .section-heading { margin: 0 0 18px; }
.report-dialog .section-heading p { margin: 5px 0 0; color: var(--muted); }
.report-dialog-close { width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.report-dialog-period { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.report-dialog-period label { display: grid; gap: 6px; color: var(--muted); font-weight: 750; }
.report-dialog-period select { min-height: 44px; }
.report-dialog-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.report-dialog-summary article { display: grid; gap: 4px; padding: 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.report-dialog-summary article.highlight { background: #eaf7f1; border-color: #9bd8bc; }
.report-dialog-summary span { color: var(--muted); font-weight: 750; }
.report-dialog-summary strong { color: var(--navy); font-size: 1.35rem; }
.report-dialog-payment h3 { margin: 0 0 10px; }
.report-dialog-payment table { width: 100%; }
.report-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.report-dialog-actions form { margin: 0; }
.sales-report-table table { min-width: 1320px; }
.history-panel { margin-top: 18px; }
.preview-dialog { width: min(1000px, 96vw); height: 94vh; padding: 0; border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.preview-dialog::backdrop { background: rgba(7,25,40,.72); }
.preview-toolbar { height: 62px; padding: 10px 16px; display: flex; justify-content: flex-end; gap: 10px; border-bottom: 1px solid var(--line); }
.preview-dialog iframe { width: 100%; height: calc(94vh - 62px); border: 0; background: #777; }
.payment-dialog { width: min(940px, 95vw); padding: 0; border: 0; border-radius: 18px; box-shadow: var(--shadow); }
.payment-dialog::backdrop { background: rgba(7,25,40,.72); }
.payment-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.payment-dialog-header h2 { margin: 0; }
.payment-dialog-header .eyebrow { margin-bottom: 5px; }
.payment-total { display: flex; align-items: center; justify-content: space-between; margin: 22px 28px; padding: 18px 20px; color: var(--navy); background: #eef5f8; border: 1px solid #c8d9e2; border-radius: 12px; }
.payment-total strong { font-size: 1.55rem; }
.payment-row { display: grid; grid-template-columns: 1.1fr .8fr .8fr; gap: 14px; padding: 0 28px 20px; }
.payment-row[hidden] { display: none !important; }
.payment-second-toggle { margin: 0 28px 20px; }
.payment-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 28px 20px; }
.payment-result div { display: grid; gap: 4px; padding: 14px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.payment-result span { color: var(--muted); }
.payment-result strong { color: var(--navy); font-size: 1.15rem; }
.workshop-report { margin: 22px 0; }
.workshop-report .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.workshop-report h2 { margin: 5px 0 0; }
.report-assumption { max-width: 390px; color: var(--muted); font-size: .82rem; text-align: right; }
.workshop-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workshop-metrics article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfd; }
.workshop-metrics article.highlight { color: inherit; border-color: var(--line); background: #f8fbfd; }
.workshop-metrics span, .workshop-metrics small { display: block; }
.workshop-metrics span { font-weight: 800; }
.workshop-metrics strong { display: block; margin: 8px 0; color: var(--accent); font-size: 1.65rem; }
.workshop-metrics .highlight strong { color: var(--accent); }
.workshop-metrics small { color: var(--muted); line-height: 1.3; }
.workshop-metrics .highlight small { color: var(--muted); }
.daily-productivity, .invoice-detail-list { margin-top: 18px; }
.daily-productivity > summary, .invoice-detail-list > summary { cursor: pointer; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 850; }
.daily-productivity[open] > summary, .invoice-detail-list[open] > summary { margin-bottom: 12px; }
.payment-dialog > .notice { margin: 0 28px 20px; }
.payment-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 28px; border-top: 1px solid var(--line); }
.delivery-setup-dialog .delivery-setup-body { display: grid; gap: 1rem; padding: 1.25rem 1.75rem; }
.delivery-setup-dialog label { display: grid; gap: .4rem; font-weight: 700; }
.delivery-setup-dialog textarea { min-height: 9rem; resize: vertical; }
.customer-data dl { display: grid; gap: 18px; }
.customer-data dl div { border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.customer-data dd { margin-top: 5px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    margin-bottom: 18px;
    padding: 9px 14px;
    color: var(--navy);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(12, 43, 68, .08);
    font-size: .98rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.back-link:hover { color: var(--accent-dark); border-color: #efb5ad; transform: translateX(-2px); }
.menu-toggle { display: none; }
.header-actions { display: inline-flex; align-items: center; gap: 10px; }
.language-switcher { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f6f9fb; }
.language-switcher a { min-width: 29px; padding: 5px 6px; border-radius: 6px; text-align: center; font-size: .72rem; }
.language-switcher a.active { color: #fff; background: var(--navy); }

@media (max-width: 800px) {
    .site-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 6px 20px rgba(12,38,61,.1); }
    .header-inner { position: relative; min-height: 62px; align-items: center; padding: 7px 0; }
    .brand img { width: 142px; height: auto; }
    .internal-brand-label { display: none; }
    .brand span { display: none; }
    .header-actions { margin-left: auto; gap: 7px; }
    .header-actions .language-switcher { flex: 0 0 auto; }
    .header-actions .language-switcher a { min-width: 27px; padding: 5px 4px; }
    .menu-toggle { display: inline-flex; width: 46px; height: 46px; padding: 11px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .menu-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--navy); }
    .menu-toggle b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    #site-navigation { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; padding: 12px 4vw 18px; gap: 4px; align-items: stretch; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(12,38,61,.13); }
    #site-navigation.open { display: flex; }
    #site-navigation > a, #site-navigation .nav-form button { display: flex; width: 100%; min-height: 46px; align-items: center; padding: 10px 12px; border-radius: 9px; font-size: .95rem; }
    #site-navigation > a:hover, #site-navigation .nav-form button:hover { background: #f1f6f9; }
    main { padding-top: 24px; }
    .shell { width: min(100% - 28px, 1180px); }
    .hero, .status-layout, .admin-detail, .service-coverage { grid-template-columns: 1fr; }
    .hero { min-height: auto; gap: 28px; padding: 34px 0 26px; }
    .hero h1 { font-size: clamp(2.35rem, 12vw, 3.2rem); }
    .hero .actions { display: grid; grid-template-columns: 1fr; }
    .hero .button { width: 100%; min-height: 54px; justify-content: center; }
    .hero-card { padding: 26px 24px; border-radius: 20px; }
    .service-coverage { padding: 22px; gap: 22px; }
    .coverage-copy h2 { font-size: 2rem; }
    .coverage-stats { grid-template-columns: 1fr; }
    .coverage-stats div { padding: 16px; }
    .coverage-map { min-height: 235px; margin: 0 -8px; }
    .coverage-map svg { padding: 10px 8px 30px; }
    .coverage-map-hint { top: 7px; left: 8px; max-width: calc(100% - 16px); padding: 5px 8px; font-size: .58rem; }
    .coverage-tooltip { top: 7px; width: calc(100% - 16px); padding: 9px 38px 9px 11px; }
    .coverage-tooltip strong { font-size: .88rem; }
    .coverage-tooltip span { font-size: .78rem; }
    .coverage-tooltip small { font-size: .66rem; }
    .coverage-tooltip button { top: 5px; right: 6px; width: 28px; height: 28px; }
    .coverage-map-label { right: 12px; bottom: 8px; font-size: .63rem; }
    .coverage-map-credit { left: 12px; bottom: 8px; font-size: .5rem; }
    .card { padding: 20px; border-radius: 18px; }
    input, select, textarea { min-height: 50px; font-size: 16px; }
    textarea { min-height: 130px; }
    .button { min-height: 50px; justify-content: center; }
    .feature-grid { grid-template-columns: 1fr; }
    .request-type-grid { grid-template-columns: 1fr; }
    .account-access { align-items: flex-start; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .admin-work-form .span2 { grid-column: auto; }
    .measure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-identifiers { grid-template-columns: 1fr; }
    .logistics-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid .detail-full { grid-column: auto; }
    .repair-section-heading { align-items: center; gap: 10px; }
    .repair-section-save { min-width: 132px; min-height: 42px; padding: 9px 10px; font-size: .82rem; white-space: nowrap; }
    .credentials { grid-template-columns: 1fr; }
    .status-heading, .admin-heading { align-items: flex-start; flex-direction: column; }
    .repair-heading-main { grid-template-columns: 1fr; gap: 18px; }
    .repair-identity { grid-template-rows:auto auto auto; min-height:0; }
    .repair-heading-controls { padding-top: 0; }
    .repair-top-actions { grid-template-columns: 1fr 1fr; }
    .repair-top-actions.actions-3 .deliver-repair-form { grid-column: 1; }
    .repair-top-actions.actions-3 .invoice-top-action { grid-column: 2; }
    .repair-top-actions.actions-3 .back-link { grid-column: 1 / -1; }
    .repair-top-actions.actions-2 .deliver-repair-form,
    .repair-top-actions.actions-2.no-delivery .invoice-top-action { grid-column: 1; }
    .repair-top-actions.actions-2.has-delivery .back-link,
    .repair-top-actions.actions-2.no-delivery .back-link { grid-column: 2; }
    .repair-top-actions.actions-1 .back-link { grid-column: 1; }
    .repair-top-actions { display:flex; justify-content:flex-end; }
    .repair-top-actions > .deliver-repair-form,
    .repair-top-actions > .invoice-top-action,
    .repair-top-actions > .back-link { flex:1 1 calc(50% - 5px); width:auto!important; grid-column:auto!important; }
    .repair-top-actions .button { grid-column: auto; }
    .repair-top-actions > .deliver-repair-form,
    .repair-top-actions > .back-link,
    .repair-top-actions > .invoice-top-action { width: auto!important; }
    .repair-top-actions .deliver-repair-form .button,
    .repair-top-actions .invoice-top-action .button { width: 100%; }
    .repair-top-actions .back-link, .repair-top-actions > .button { padding-inline: 8px; font-size: .88rem; white-space: nowrap; }
    .repair-status-controls { grid-template-columns: 1fr; }
    .repair-document-actions { grid-template-columns: 1fr; align-items: stretch; }
    .repair-document-actions .button { width: 100%; min-width: 0; }
    .quote-action { width:100%; }
    .quote-action .button { flex:1 1 auto; width:auto; }
    .quote-admin-status { white-space:normal; }
    /* En móvil, cada línea del presupuesto se apila para que nunca obligue a desplazar la página. */
    .quote-card { overflow:hidden; padding:16px; }
    .quote-card .quote-status { align-items:flex-start; justify-content:flex-start; gap:4px 12px; margin-bottom:12px; font-size:1rem; }
    .quote-card .quote-status span { flex:1 1 auto; min-width:0; }
    .quote-card .quote-status strong { flex:0 0 auto; }
    .quote-card .table-wrap { overflow:visible; width:100%; }
    .quote-card table,
    .quote-card thead,
    .quote-card tbody,
    .quote-card tr,
    .quote-card th,
    .quote-card td { display:block; width:100%; }
    .quote-card thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .quote-card tbody tr { margin:0 0 10px; padding:9px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; }
    .quote-card tbody tr:last-child { margin-bottom:0; }
    .quote-card td { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:6px 0; border:0; white-space:normal; text-align:right; }
    .quote-card td:first-child { display:block; padding-bottom:8px; color:var(--navy); font-weight:750; font-size:1rem; text-align:left; }
    .quote-card td:nth-child(2)::before { content:'Unidades'; color:var(--muted); font-size:.86rem; text-align:left; }
    .quote-card td:nth-child(3)::before { content:'Precio'; color:var(--muted); font-size:.86rem; text-align:left; }
    .quote-card td:nth-child(4)::before { content:'Total'; color:var(--muted); font-size:.86rem; text-align:left; }
    .quote-card .muted { margin:12px 0; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1fr; }
    .repair-toolbar { grid-template-columns: 1fr; }
    .repair-toolbar > :nth-child(3), .repair-toolbar > :nth-child(4) { grid-column: auto; }
    .repair-invoice-options, .report-filters, .sales-summary { grid-template-columns: 1fr; }
    .report-controls { display: flex; flex-direction: column; align-items: stretch; }
    .report-controls.report-filters-inline { display: grid; }
    .report-open-button { width: 100%; justify-self: stretch; }
    .report-export-popover > form { position: static; min-width: 0; grid-template-columns: 1fr; }
    .report-dialog { width: min(96vw, 620px); }
    .report-dialog-inner { padding: 20px; }
    .report-dialog-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-dialog-actions { flex-direction: column; }
    .report-dialog-actions .button { width: 100%; }
    .invoice-controls-row { align-items: stretch; flex-direction: column; }
    .invoice-total-row { justify-content: flex-start; }
    .payment-row, .payment-result { grid-template-columns: 1fr; }
    .sale-mode-actions, .sale-section-heading, .sale-meta { align-items: stretch; flex-direction: column; }
    .workshop-report .section-heading { align-items: flex-start; flex-direction: column; }
    .report-assumption { text-align: left; }
    .workshop-metrics { grid-template-columns: 1fr; }
}
@media (min-width: 1400px) {
    main { padding-top: 28px; }
    .card { padding: 22px; }
    .page-heading { margin-bottom: 18px; }
    .page-heading h1 { font-size: 2.6rem; }
}
 .email-exists-warning { display: block; margin-top: .45rem; color: #a1261b; font-weight: 600; }
.status { display: inline-block; border-radius: 999px; padding: .25rem .6rem; font-size: .85rem; font-weight: 700; }
.status-paid { background: #e5f6ed; color: #087443; }
.status-pending { background: #fff3d8; color: #8a5a00; }
