*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--odo-canvas);
    color: var(--odo-ink);
    font-family: var(--odo-font);
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.site-container {
    width: calc(100% - 2 * var(--odo-gutter));
    max-width: var(--odo-container);
    margin-inline: auto;
    min-width: 0;
}
.skip-link { position: absolute; top: 8px; left: 16px; z-index: 100; padding: 12px 16px; border-radius: 8px; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
a { color: var(--odo-steel); text-underline-offset: 3px; }
a:hover { color: var(--odo-petrol); }
h1, h2, h3 { color: var(--odo-petrol); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.035em; }
h2 { font-size: 1.125rem; letter-spacing: -0.02em; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--odo-steel);
    outline-offset: 3px;
}
[hidden] { display: none !important; }
.site-header {
    width: 100%;
    background: var(--odo-petrol);
    color: #fff;
    border-bottom: 3px solid var(--odo-blood);
}
.site-header-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 16px;
}
.brand-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: contain;
    padding: 3px;
    border-radius: 8px;
    background: #fff;
}
.brand { display: grid; gap: 3px; min-width: 0; margin-right: auto; }
.brand-title { color: #fff; font-size: 1.25rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.brand-subtitle { color: #C4D9E8; font-size: 0.75rem; line-height: 1.35; }
.brand { flex: 1 1 160px; }
.auth-nav { max-width: 100%; }
.auth-nav > form { min-width: 0; }
.auth-nav { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.auth-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #6E8DA4;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}
.auth-nav a:hover { background: #2B5574; }
.site-vehicle-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 0.875rem; }
.site-vehicle-status strong { letter-spacing: 0.07em; color: #fff; }
.site-vehicle-status span { color: #C4D9E8; }
.site-vehicle-status select {
    width: 100%;
    max-width: 300px;
    min-height: 44px;
    border: 1px solid #6E8DA4;
    border-radius: 8px;
    background: var(--odo-petrol);
    color: #fff;
    padding: 8px 12px;
    font-weight: 600;
}
.site-vehicle-status option { color: var(--odo-ink); background: #fff; }
main.site-container { flex: 1; padding-block: var(--odo-space) 40px; }
footer { margin-top: auto; border-top: 1px solid var(--odo-border); color: var(--odo-muted); background: #fff; font-size: 0.8125rem; }
footer .site-container { padding-block: 20px; }
footer .site-container { overflow-wrap: anywhere; }
summary { min-height: 44px; padding-block: 8px; cursor: pointer; }
.card-grid { display: grid; gap: var(--odo-space); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { min-width: 0; background: #fff; border: 1px solid var(--odo-border); border-radius: var(--odo-radius); padding: var(--odo-space); box-shadow: var(--odo-shadow); }
.btn, .btn-primary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--odo-blood);
    color: #fff;
    font: inherit;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 150ms, border-color 150ms;
}
.btn:hover, .btn-primary:hover { background: #80162A; color: #fff; }
.btn-outline, .btn-ghost { background: #fff; color: var(--odo-petrol); border-color: var(--odo-border); }
.btn-outline:hover, .btn-ghost:hover { background: var(--odo-ice); color: var(--odo-petrol); border-color: var(--odo-steel); }
.btn:disabled, .btn-primary:disabled { background: #E2E8EE; color: #526779; cursor: not-allowed; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #B9CBD8;
    border-radius: 8px;
    background: #fff;
    color: var(--odo-ink);
    font-size: 1rem;
}
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--odo-steel); }
input::placeholder, textarea::placeholder { color: #667C8D; opacity: 1; }
label, .form-label { color: var(--odo-ink); font-size: 0.875rem; font-weight: 600; }
small, .meta { color: var(--odo-muted); font-size: 0.8125rem; }
.errorlist { color: var(--odo-blood); font-size: 0.875rem; margin: 4px 0; padding-left: 20px; }
.message-list { list-style: none; padding: 0; margin: 0 0 var(--odo-space); }
.message { padding: 12px 16px; border: 1px solid var(--odo-border); border-radius: 8px; margin-bottom: 8px; }
.message.success { background: #EDF7F1; color: #245D40; border-color: #BFDCCB; }
.message.error, .form-errors { background: #FCF0F2; color: #80162A; border-color: #E9C5CC; }
.message.info { background: var(--odo-ice); color: var(--odo-petrol); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: #fff; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--odo-border); text-align: left; vertical-align: top; }
th { color: var(--odo-muted); background: var(--odo-ice); font-size: 0.75rem; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.sticky-table-wrap { max-width: 100%; max-height: 68vh; overflow: auto; border: 1px solid var(--odo-border); border-radius: 8px; }
.sticky-header-table th { position: sticky; top: 0; z-index: 2; }
.page-back-link { margin-bottom: var(--odo-space); }
.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 50;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #176E43;
    color: #fff;
    box-shadow: 0 3px 12px rgb(23 61 92 / 16%);
}
.whatsapp-float:hover { background: #125836; color: #fff; }
.whatsapp-float svg { width: 28px; height: 28px; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
    .site-header-inner { gap: 10px; padding-block: 12px; }
    .brand-title { font-size: 1.125rem; }
    .auth-nav { width: 100%; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #41627B; }
    .site-vehicle-status { flex: 1; }
    .site-vehicle-status select { max-width: 100%; }
    main.site-container { padding-bottom: 24px; }
    footer .site-container { padding-block: 16px calc(80px + env(safe-area-inset-bottom)); }
}
@media (min-width: 601px) and (max-width: 900px) {
    .auth-nav { flex-basis: 100%; justify-content: flex-start; }
}
@media (max-width: 600px) {
    .auth-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .auth-nav .site-workshop-form, .auth-nav .site-fuel-link { grid-column: 1 / -1; }
    .auth-nav .site-workshop-only { grid-column: auto; }
    .auth-nav .site-vehicle-status select { max-width: 100%; }
    .auth-nav > a { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.auth-nav .site-fuel-link { border-color: transparent; background: var(--odo-blood); }
.auth-nav .site-fuel-link:hover { background: #80162A; }
@media (max-width: 600px) {
    .auth-nav { flex-wrap: wrap; }
    .auth-nav .site-fuel-link { width: 100%; }
}
.brand-title { text-decoration: none; }
.auth-nav { flex-wrap: wrap; }
.site-workshop-form { margin: 0; min-width: 0; max-width: 240px; }
.site-workshop-form select { border-color: #6E8DA4; background: var(--odo-petrol); color: #fff; }
.site-workshop-form option { color: var(--odo-ink); background: #fff; }
.odo-consent-field { display: flex; align-items: flex-start; gap: 8px; }
.odo-consent-field input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; margin: 3px 0 0; }
.odo-invitations { padding: 12px 16px; margin-bottom: var(--odo-space); border: 1px solid var(--odo-border); background: var(--odo-ice); border-radius: var(--odo-radius); }
.odo-invitations summary { cursor: pointer; font-weight: 600; }
.odo-invitations .odo-actions { margin-top: 12px; }
@media (max-width: 600px) { .site-workshop-form { width: 100%; max-width: none; } }
.site-header .brand-title:hover { color: #fff; }
.signup-field.odo-consent-field, .odo-field.odo-consent-field > label { display: flex; align-items: flex-start; gap: 8px; }
.signup-field, .odo-panel p, .brand-subtitle { overflow-wrap: anywhere; }
:root { --odo-case-border: #d9e5ed; }
.odo-case-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: 0; list-style: none; margin: 0 0 1rem; }
.odo-case-stages li { border-bottom: 3px solid var(--odo-case-border); padding: .65rem .35rem; font-size: .85rem; color: #526b7d; }
.odo-case-stages [aria-current] { border-color: #9E1B32; color: #173D5C; font-weight: 700; }
.odo-case-row { display: grid; gap: .3rem; padding: .85rem 0; border-bottom: 1px solid var(--odo-case-border); text-decoration: none; overflow-wrap: anywhere; }
.odo-case-row span { color: #526b7d; font-size: .85rem; }
.odo-case-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.odo-case-filters .odo-actions, .odo-case-filters .errorlist { grid-column: 1 / -1; }
.odo-budget-editor { min-width: 0; border: 1px solid var(--odo-case-border); border-radius: 10px; padding: .85rem; }
.odo-budget-row { display: grid; grid-template-columns: 1fr 2fr .8fr 1fr .8fr auto; gap: .6rem; align-items: end; border-bottom: 1px solid var(--odo-case-border); padding: .75rem 0; }
.odo-budget-row .odo-field { min-width: 0; }
.odo-budget-row input, .odo-budget-row select { width: 100%; min-width: 0; }
.odo-budget-remove input { width: auto; }
.odo-budget-lines > div { display: grid; gap: .3rem; padding: .65rem 0; border-bottom: 1px solid var(--odo-case-border); overflow-wrap: anywhere; }
.odo-budget-lines span { font-size: .85rem; color: #526b7d; }
.odo-case-timeline { padding-left: 1.25rem; }
.odo-case-timeline li { padding: .6rem 0; }
.odo-case-timeline span { display: block; font-size: .8rem; color: #526b7d; }
.odo-case-documents { margin-bottom: 1rem; }
.odo-case-order { padding-block: 1rem; }
@media (max-width: 700px) {
    .odo-case-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .odo-budget-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .odo-case-stages { gap: .25rem; }
    .odo-case-stages li { font-size: .72rem; }
}

/* Shared visual identifiers for the dossier lifecycle. */
.odo-case-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; vertical-align: middle; }
.odo-case-row-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; min-width: 0; }
.odo-case-status {
    --status-ink: #475569; --status-bg: #f1f5f9; --status-border: #d4dee7;
    display: inline-flex; align-items: center; gap: .4rem; width: fit-content; max-width: 100%;
    padding: .35rem .65rem; border: 1px solid var(--status-border); border-radius: .5rem;
    background: var(--status-bg); font-size: .8125rem; font-weight: 600; line-height: 1.4;
}
.odo-case-row .odo-case-status, .odo-case-status { color: var(--status-ink); }
.odo-case-status--sent { --status-ink: #8a410d; --status-bg: #fff5e9; --status-border: #edcba8; }
.odo-case-status--approved { --status-ink: #2B648C; --status-bg: #EAF3F9; --status-border: #bfd5e5; }
.odo-case-status--in_progress { --status-ink: #17633e; --status-bg: #edf8f1; --status-border: #b9ddc6; }
.odo-case-status--paused { --status-ink: #805400; --status-bg: #fff8e5; --status-border: #e7d18d; }
.odo-case-status--completed { --status-ink: #9E1B32; --status-bg: #fdf0f2; --status-border: #e6bbc3; }
.odo-case-status--rejected { --status-ink: #85451a; --status-bg: #faf2ea; --status-border: #e5ccb5; }
.odo-case-current-status { margin: 0 0 1rem; }
.odo-case-stages li { display: flex; align-items: flex-start; gap: .45rem; min-width: 0; }
.odo-case-stages .odo-case-icon { width: 1.1rem; height: 1.1rem; margin-top: .05rem; }
.odo-case-stages li[aria-current] { background: #EAF3F9; border-color: #2B648C; border-radius: .4rem .4rem 0 0; }
.odo-case-stages li.is-complete { border-color: #bfd5e5; color: #2B648C; }
@media (max-width: 600px) {
    .odo-case-stages li { flex-direction: column; gap: .35rem; }
    .odo-case-row-heading { align-items: flex-start; }
}
@media (forced-colors: active) { .odo-case-status { border-color: CanvasText; } }
