:root {
  --red: #e21b2d;
  --red-dark: #b70f1e;
  --red-soft: #fff0f2;
  --ink: #0b0b0d;
  --muted: #686870;
  --line: #e7e7ea;
  --paper: #ffffff;
  --wash: #f5f5f7;
  --green: #15885b;
  --amber: #c47a08;
  --shadow: 0 18px 50px rgba(17, 17, 20, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: linear-gradient(180deg, #eeeeef 0, var(--wash) 260px); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }

.topbar {
  height: 78px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(11,11,13,.97);
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
}
.brand { display:flex; align-items:center; gap:12px; border:0; color:white; background:none; padding:0; text-align:left; }
.brand-logo { display:block; width:205px; height:46px; object-fit:contain; object-position:left center; }
.top-actions { display:flex; align-items:center; gap:10px; }
.privacy-pill { border:1px solid #35353b; background:#1a1a1e; border-radius:999px; padding:8px 12px; font-size:12px; color:#d6d6da; display:flex; align-items:center; gap:7px; }
.privacy-pill span { width:7px; height:7px; border-radius:50%; background:#48c78e; box-shadow:0 0 0 4px rgba(72,199,142,.12); }

main { width:min(1380px, 100%); margin:0 auto; padding:32px clamp(16px, 4vw, 54px) 64px; }
.loading-screen { min-height:calc(100vh - 180px); display:grid; place-items:center; align-content:center; text-align:center; gap:12px; }
.loading-screen h1 { font-size:clamp(30px,5vw,48px); }
.loading-screen p { margin:0 0 12px; color:var(--muted); }
.loading-mark { width:74px; height:74px; display:grid; place-items:center; border-radius:18px; background:var(--ink); color:white; border-bottom:5px solid var(--red); font-weight:950; font-style:italic; letter-spacing:-.06em; box-shadow:var(--shadow); }
.error-state .loading-mark { border-bottom-color:#c51d2c; }
.ghost-button, .secondary-button, .primary-button, .danger-button, .icon-button { border-radius:10px; border:1px solid transparent; min-height:42px; padding:0 16px; font-weight:750; transition:.18s ease; }
.ghost-button { color:#dddde1; border-color:#33333a; background:#17171a; }
.ghost-button:hover { background:#242429; }
.secondary-button { background:white; border-color:var(--line); color:var(--ink); }
.secondary-button:hover { border-color:#bbb; background:#fafafa; }
.primary-button { background:var(--red); color:white; box-shadow:0 8px 20px rgba(226,27,45,.2); }
.primary-button:hover { background:var(--red-dark); transform:translateY(-1px); }
.danger-button { color:#bd1726; background:#fff0f2; border-color:#ffd3d8; }
.icon-button { width:40px; padding:0; border-color:var(--line); background:white; font-size:18px; }
.link-button { padding:0; border:0; background:none; color:var(--red); font-weight:800; }

.welcome { min-height:calc(100vh - 174px); display:grid; place-items:center; }
.welcome-panel { width:min(990px, 100%); background:var(--paper); border:1px solid var(--line); border-radius:28px; overflow:hidden; box-shadow:var(--shadow); display:grid; grid-template-columns:1.15fr .85fr; }
.welcome-main { padding:clamp(34px, 6vw, 72px); position:relative; overflow:hidden; }
.welcome-main:after { content:"MSA"; position:absolute; right:-28px; bottom:-62px; font-size:180px; font-weight:950; font-style:italic; color:#f6f6f7; z-index:0; }
.welcome-main > * { position:relative; z-index:1; }
.welcome-logo-shell { width:116px; height:100px; display:grid; place-items:center; border-radius:18px; background:var(--ink); padding:9px; margin-bottom:25px; box-shadow:0 14px 32px rgba(11,11,13,.16); }
.welcome-logo { display:block; width:100%; height:100%; object-fit:contain; }
.eyebrow { margin:0 0 12px; text-transform:uppercase; letter-spacing:.15em; font-size:12px; color:var(--red); font-weight:900; }
h1 { font-size:clamp(36px, 5vw, 62px); line-height:.98; letter-spacing:-.055em; margin:0; max-width:620px; }
.lead { font-size:17px; line-height:1.55; color:var(--muted); max-width:620px; margin:22px 0 32px; }
.welcome-side { background:var(--ink); color:white; padding:clamp(28px, 5vw, 54px); display:flex; flex-direction:column; justify-content:center; }
.welcome-side h2 { font-size:23px; margin:0 0 8px; }
.welcome-side p { color:#aaaab0; line-height:1.5; margin:0 0 22px; }
.role-buttons { display:grid; gap:12px; }
.role-card { color:white; text-align:left; display:grid; grid-template-columns:44px 1fr auto; gap:13px; align-items:center; background:#1b1b1f; border:1px solid #34343a; border-radius:15px; padding:15px; }
.role-card:hover { border-color:var(--red); background:#21191b; }
.role-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:11px; background:var(--red); font-size:20px; font-weight:900; }
.role-card strong { display:block; font-size:15px; }
.role-card small { display:block; color:#9e9ea5; margin-top:4px; }
.role-arrow { color:var(--red); font-size:22px; }

.view-header { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:24px; }
.view-header h1 { font-size:clamp(30px, 4vw, 45px); }
.view-header p { margin:10px 0 0; color:var(--muted); }
.header-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.workshop-layout { display:grid; grid-template-columns:250px minmax(0,1fr); gap:22px; align-items:start; }
.sidebar { background:var(--ink); border-radius:18px; padding:12px; color:white; position:sticky; top:100px; box-shadow:var(--shadow); }
.sidebar-label { color:#74747c; font-size:10px; font-weight:900; letter-spacing:.15em; text-transform:uppercase; margin:14px 12px 8px; }
.nav-button { width:100%; display:flex; align-items:center; gap:12px; min-height:46px; border:0; border-radius:10px; background:transparent; color:#a8a8af; padding:0 12px; font-weight:700; text-align:left; }
.nav-button:hover, .nav-button.active { background:#242429; color:white; }
.nav-button.active { box-shadow:inset 3px 0 var(--red); }
.nav-icon { width:25px; color:var(--red); font-size:17px; text-align:center; }
.content-stack { min-width:0; display:grid; gap:18px; }
.erp-commandbar { min-height:42px; padding:0 24px; display:flex; align-items:center; justify-content:space-between; gap:18px; color:white; background:linear-gradient(90deg,var(--red-dark),var(--red)); border-bottom:1px solid rgba(0,0,0,.12); }
.erp-command-title,.erp-command-user { display:flex; align-items:center; gap:11px; font-size:13px; font-weight:800; }
.erp-menu-mark { padding:4px 7px; background:#fff; color:var(--red); border-radius:4px; font-size:10px; letter-spacing:.08em; }
.erp-command-user { font-size:12px; font-weight:650; }
.erp-user-badge { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; color:var(--ink); background:#fff; font-size:10px; font-weight:900; }
.sidebar-heading { padding:12px 12px 18px; margin-bottom:4px; border-bottom:1px solid #2d2d32; }
.sidebar-heading img { display:block; width:176px; max-width:100%; height:45px; object-fit:contain; object-position:left center; }
.sidebar-heading small { display:block; margin-top:4px; color:#75757c; font-size:9px; font-weight:900; letter-spacing:.16em; }
.sidebar-bottom { margin-top:auto; padding-top:18px; border-top:1px solid #2d2d32; }
.settings-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.settings-grid .role-card { min-height:92px; }
.erp-workspace { min-width:0; padding:28px clamp(22px,3.2vw,48px) 52px; background:#f5f5f7; }
.erp-active { background:#f5f5f7; }
.erp-active .topbar { height:60px; padding:0 24px; box-shadow:none; border-bottom:3px solid var(--red); }
.erp-active .brand-logo { width:184px; height:42px; }
.erp-active main { width:100%; max-width:none; margin:0; padding:0; }
.erp-active .portal-footer { display:none; }
.erp-active .workshop-layout { grid-template-columns:238px minmax(0,1fr); gap:0; align-items:stretch; min-height:calc(100vh - 102px); }
.erp-active .sidebar { display:flex; flex-direction:column; position:sticky; top:102px; min-height:calc(100vh - 102px); max-height:calc(100vh - 102px); overflow:auto; border-radius:0; padding:12px; box-shadow:5px 0 18px rgba(0,0,0,.08); }
.erp-active .view-header { align-items:center; padding-bottom:22px; margin-bottom:18px; border-bottom:1px solid #dedee2; }
.erp-active .view-header h1 { font-size:clamp(29px,3vw,38px); letter-spacing:-.04em; }
.erp-active .stat-card,.erp-active .card { border-radius:7px; box-shadow:0 2px 8px rgba(17,17,20,.035); }
.erp-active .stat-card { border-top:3px solid var(--red); }
.stats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:14px; }
.stat-card { background:white; border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:0 5px 20px rgba(17,17,20,.03); }
.stat-card small { color:var(--muted); font-weight:700; }
.stat-value { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-top:10px; }
.stat-value strong { font-size:30px; letter-spacing:-.04em; }
.stat-icon { width:38px; height:38px; border-radius:10px; background:var(--red-soft); color:var(--red); display:grid; place-items:center; font-weight:900; }
.card { background:white; border:1px solid var(--line); border-radius:18px; padding:22px; box-shadow:0 5px 20px rgba(17,17,20,.03); min-width:0; }
.card-header { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.card-header h2 { font-size:19px; margin:0; letter-spacing:-.02em; }
.card-header p { color:var(--muted); margin:5px 0 0; font-size:13px; }
.search { position:relative; min-width:min(330px, 100%); }
.search input { width:100%; height:43px; border:1px solid var(--line); border-radius:10px; padding:0 14px 0 40px; outline:none; background:#fafafa; }
.search input:focus { border-color:var(--red); background:white; box-shadow:0 0 0 3px rgba(226,27,45,.08); }
.search span { position:absolute; left:14px; top:11px; color:#8d8d94; }
.table-wrap { width:100%; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th { text-align:left; font-size:11px; color:#8a8a91; text-transform:uppercase; letter-spacing:.08em; padding:11px 12px; border-bottom:1px solid var(--line); }
td { padding:14px 12px; border-bottom:1px solid #eeeeef; font-size:14px; }
tr:last-child td { border-bottom:0; }
tbody tr { transition:.15s; }
tbody tr:hover { background:#fafafa; }
.person-cell { display:flex; align-items:center; gap:10px; }
.avatar { width:35px; height:35px; border-radius:10px; display:grid; place-items:center; color:white; background:linear-gradient(145deg,#29292e,#0b0b0d); font-size:12px; font-weight:900; }
.person-cell strong { display:block; }
.person-cell small { color:var(--muted); }
.plate { display:inline-flex; align-items:center; justify-content:center; min-width:78px; height:29px; background:#f4f4f5; border:1px solid #d6d6da; border-radius:6px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:900; letter-spacing:.08em; }
.status { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; border-radius:999px; font-size:11px; font-weight:850; white-space:nowrap; }
.status:before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status.ok { color:var(--green); background:#eaf8f2; }
.status.soon { color:var(--amber); background:#fff6e5; }
.status.overdue { color:#c51d2c; background:#fff0f2; }
.row-actions { display:flex; gap:7px; }
.mini-button { border:1px solid var(--line); background:white; border-radius:8px; padding:7px 9px; font-size:12px; font-weight:800; color:#38383e; }
.mini-button:hover { border-color:var(--red); color:var(--red); }
.mini-button.red { background:var(--red); color:white; border-color:var(--red); }
.maintenance-list { display:grid; gap:10px; }
.maintenance-item { display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:12px; padding:12px; background:#fafafa; border:1px solid #eeeef0; border-radius:12px; }
.maintenance-icon { width:42px; height:42px; border-radius:11px; display:grid; place-items:center; color:var(--red); background:var(--red-soft); font-weight:900; }
.maintenance-item strong { display:block; font-size:14px; }
.maintenance-item small { color:var(--muted); display:block; margin-top:3px; }

.vehicle-catalog-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.vehicle-catalog-card { padding-bottom:26px; }
.vehicle-catalog-list { display:grid; gap:10px; }
.vehicle-brand,.vehicle-model { border:1px solid var(--line); background:#fff; overflow:hidden; }
.vehicle-brand { border-radius:10px; }
.vehicle-brand > summary,.vehicle-model > summary { list-style:none; cursor:pointer; user-select:none; display:flex; align-items:center; gap:14px; }
.vehicle-brand > summary::-webkit-details-marker,.vehicle-model > summary::-webkit-details-marker { display:none; }
.vehicle-brand > summary { min-height:64px; padding:12px 18px; background:#fafafa; border-left:4px solid var(--red); }
.vehicle-brand > summary:hover { background:#f5f5f6; }
.vehicle-brand > summary > span:first-child { display:flex; align-items:baseline; gap:12px; min-width:0; }
.vehicle-brand > summary strong { font-size:17px; }
.vehicle-brand > summary small,.vehicle-model > summary small { color:var(--muted); font-size:12px; }
.catalog-chevron { margin-left:auto; color:var(--red); font-size:21px; font-weight:900; transition:transform .18s ease; }
.vehicle-brand[open] > summary .catalog-chevron,.vehicle-model[open] > summary .catalog-chevron { transform:rotate(180deg); }
.vehicle-model-list { display:grid; gap:8px; padding:12px 14px 14px; background:#f5f5f7; border-top:1px solid var(--line); }
.vehicle-model { border-radius:8px; }
.vehicle-model > summary { min-height:48px; padding:10px 14px; font-weight:800; }
.vehicle-model > summary:hover { background:#fafafa; }
.vehicle-model > summary > span:first-child { min-width:0; flex:1; }
.engine-options { display:flex; flex-wrap:wrap; gap:8px; padding:4px 14px 14px; }
.engine-options span { display:inline-flex; align-items:center; min-height:34px; padding:7px 11px; border-radius:7px; color:#fff; background:var(--ink); font-size:13px; font-weight:800; }
.engine-options span.configured { background:var(--green); }
.engine-options .engine-empty { color:var(--muted); background:var(--wash); border:1px dashed #cfcfd4; }
.vehicle-catalog-empty { padding:44px 16px; }
.model-profile-actions { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border-top:1px solid var(--line); background:#fff; }
.model-profile-actions strong,.model-profile-actions small { display:block; }
.model-profile-actions small { margin-top:3px; color:var(--muted); font-size:12px; }
.model-profile-body { display:grid; gap:16px; }
.model-profile-engine { display:grid; grid-template-columns:140px minmax(0,1fr); align-items:center; gap:14px; padding:14px; color:white; background:var(--ink); border-radius:10px; }
.model-profile-engine label { font-weight:850; }
.model-profile-engine select { width:100%; min-height:43px; padding:0 12px; border:1px solid #414148; border-radius:8px; background:#fff; color:var(--ink); }
.model-profile-custom-engine { width:100%; min-height:43px; margin-top:8px; padding:0 12px; border:1px solid #414148; border-radius:8px; background:#fff; color:var(--ink); }
.profile-section { display:grid; gap:14px; padding:18px; border:1px solid var(--line); border-radius:10px; }
.profile-section h3 { margin:0; font-size:17px; }
.profile-section > div:first-child > p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.profile-price { max-width:360px; }
.currency-input { display:grid; grid-template-columns:44px 1fr; align-items:center; border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.currency-input span { height:43px; display:grid; place-items:center; color:white; background:var(--ink); font-weight:900; }
.currency-input input { border:0; border-radius:0; }
.service-category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.service-category-grid label { display:flex; align-items:center; gap:10px; min-height:45px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fafafa; font-size:13px; font-weight:750; cursor:pointer; }
.service-category-grid input { width:18px; height:18px; accent-color:var(--red); }
.brake-suggestions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.brake-suggestions button { display:grid; grid-template-columns:1fr auto; gap:3px 10px; text-align:left; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.brake-suggestions button:hover { border-color:var(--red); background:var(--red-soft); }
.brake-suggestions strong { color:var(--red); }
.brake-suggestions small { grid-column:1; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brake-suggestions button > span { grid-column:2; grid-row:1/3; align-self:center; font-size:12px; font-weight:850; }

.detail-hero { background:var(--ink); color:white; border-radius:20px; padding:24px; display:grid; grid-template-columns:1fr auto; gap:20px; align-items:center; overflow:hidden; position:relative; }
.detail-hero:after { content:"MSA"; font-size:110px; line-height:1; font-weight:950; font-style:italic; color:#18181c; position:absolute; right:140px; bottom:-32px; }
.detail-hero > * { position:relative; z-index:1; }
.detail-hero h2 { margin:0; font-size:27px; }
.vehicle-line { display:flex; align-items:center; gap:11px; flex-wrap:wrap; margin-top:12px; color:#b6b6bc; }
.vehicle-line .plate { background:white; color:var(--ink); }
.odometer { text-align:right; }
.odometer strong { display:block; font-size:30px; }
.odometer small { color:#93939a; }
.timeline { position:relative; display:grid; gap:14px; }
.timeline:before { content:""; position:absolute; left:18px; top:14px; bottom:14px; width:2px; background:#ededf0; }
.timeline-item { display:grid; grid-template-columns:38px 1fr; gap:14px; position:relative; }
.timeline-dot { width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:var(--ink); border:6px solid white; color:white; z-index:1; font-size:10px; font-weight:900; }
.timeline-content { border:1px solid var(--line); border-radius:14px; padding:16px; }
.timeline-top { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.timeline-top h3 { margin:0; font-size:15px; }
.timeline-top time { color:var(--muted); font-size:12px; white-space:nowrap; }
.timeline-meta { color:var(--muted); font-size:12px; margin-top:5px; }
.timeline-notes { margin:11px 0 0; color:#44444a; line-height:1.45; font-size:13px; }
.photo-strip { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.photo-strip img { width:74px; height:58px; object-fit:cover; border-radius:9px; border:1px solid var(--line); cursor:zoom-in; }
.two-column { display:grid; grid-template-columns:1.15fr .85fr; gap:18px; align-items:start; }

.client-login { min-height:calc(100vh - 174px); display:grid; place-items:center; }
.auth-page { min-height:calc(100vh - 174px); display:grid; grid-template-columns:minmax(0,1.15fr) minmax(390px,.85fr); background:#fff; border:1px solid var(--line); border-radius:24px; overflow:hidden; box-shadow:0 24px 70px rgba(10,10,12,.14); }
.auth-image { min-height:680px; position:relative; background:#111 url('/assets/hero-taller-msa.png') 68% center/cover no-repeat; color:white; }
.auth-image-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(5,5,6,.15),rgba(5,5,6,.3) 48%,rgba(5,5,6,.92)); }
.auth-image-copy { position:absolute; z-index:1; left:clamp(28px,5vw,68px); right:clamp(28px,5vw,68px); bottom:clamp(34px,6vw,72px); }
.auth-image-copy img { width:min(300px,78%); height:auto; display:block; margin-bottom:25px; }
.auth-image-copy p { max-width:520px; margin:0; font-size:clamp(19px,2.1vw,29px); line-height:1.25; font-weight:760; letter-spacing:-.025em; }
.auth-panel { display:grid; place-items:center; background:#fff; }
.auth-panel-inner { width:min(470px,100%); padding:clamp(34px,5vw,68px); }
.auth-panel h1 { font-size:clamp(37px,4vw,55px); }
.auth-lead { color:var(--muted); line-height:1.55; margin:16px 0 30px; }
.auth-form { display:grid; gap:18px; }
.auth-form label { display:grid; gap:8px; color:#323237; font-weight:750; font-size:14px; }
.auth-form input { width:100%; min-height:52px; border:1px solid #d8d8dd; border-radius:9px; background:#fff; padding:0 15px; font-size:16px; color:var(--ink); }
.auth-form input:focus { border-color:var(--red); box-shadow:0 0 0 4px rgba(226,27,45,.08); outline:none; }
.auth-submit { width:100%; min-height:52px; margin-top:2px; }
.auth-forgot { text-align:right; margin-top:-7px; }
.auth-switch { margin:24px 0 0; text-align:center; color:var(--muted); }
.auth-help { border-top:1px solid var(--line); margin:30px 0 0; padding-top:22px; color:var(--muted); font-size:13px; text-align:center; }
.auth-help a { color:var(--ink); font-weight:800; text-decoration:none; }
.auth-success { display:none; color:var(--green); background:#edf9f4; border:1px solid #bce8d6; border-radius:9px; padding:12px; line-height:1.45; margin:0; }
.auth-success.visible { display:block; }
.account-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; max-width:1100px; margin:auto; align-items:start; }
.account-grid .registration-intro { width:100%; margin:0; }
.account-actions { max-width:1100px; margin:22px auto; align-items:center; }
.security-card form { display:grid; gap:15px; margin-top:24px; }
.account-back { margin-top:18px; }
.login-card { width:min(900px,100%); display:grid; grid-template-columns:1fr .85fr; overflow:hidden; background:white; border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); }
.login-form { padding:clamp(28px,5vw,58px); }
.login-form h1 { font-size:36px; }
.login-form .lead { font-size:15px; margin:14px 0 26px; }
.demo-help { background:var(--ink); color:white; padding:clamp(28px,5vw,48px); display:flex; flex-direction:column; justify-content:center; }
.demo-logo { display:block; width:min(235px, 100%); height:auto; margin:0 0 24px; }
.demo-help h2 { margin:0 0 9px; font-size:21px; }
.demo-help p { color:#aaaab0; line-height:1.5; margin:0 0 18px; }
.demo-credential { background:#1c1c20; border:1px solid #34343a; border-radius:13px; padding:15px; margin-bottom:12px; }
.demo-credential small { display:block; color:#898991; margin-bottom:7px; }
.demo-credential strong { display:block; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.04em; }
.client-view { display:grid; gap:20px; }
.client-hero { border-radius:22px; overflow:hidden; background:var(--ink); color:white; padding:clamp(26px,5vw,48px); position:relative; }
.client-hero:after { content:""; position:absolute; width:320px; height:320px; border-radius:50%; background:radial-gradient(circle, rgba(226,27,45,.42), transparent 64%); right:-70px; top:-110px; }
.client-hero > * { position:relative; z-index:1; }
.client-hero h1 { font-size:clamp(31px,5vw,50px); }
.client-hero p { color:#b2b2b9; margin:12px 0 0; }
.client-summary { margin-top:30px; display:grid; grid-template-columns:1.4fr repeat(2,.8fr); gap:10px; }
.client-summary > div { background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:13px; padding:15px; }
.client-summary small { color:#a9a9af; display:block; margin-bottom:7px; }
.client-summary strong { font-size:17px; }
.recommendation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.recommendation { border:1px solid var(--line); border-top:4px solid var(--green); border-radius:13px; padding:15px; background:white; }
.recommendation.soon { border-top-color:var(--amber); }
.recommendation.overdue { border-top-color:var(--red); }
.recommendation small { color:var(--muted); }
.recommendation h3 { margin:7px 0; font-size:15px; }
.recommendation p { color:#505057; font-size:12px; line-height:1.4; margin:0; }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.field { display:grid; gap:7px; min-width:0; }
.field.full { grid-column:1/-1; }
.field label { font-size:12px; font-weight:850; color:#424249; }
.field input, .field select, .field textarea { width:100%; border:1px solid #d9d9de; border-radius:10px; padding:11px 12px; outline:none; background:white; color:var(--ink); }
.field textarea { resize:vertical; min-height:82px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--red); box-shadow:0 0 0 3px rgba(226,27,45,.08); }
.chile-phone-field { display:flex; align-items:stretch; width:100%; border:1px solid #d9d9de; border-radius:10px; background:white; overflow:hidden; }
.chile-phone-field:focus-within { border-color:var(--red); box-shadow:0 0 0 3px rgba(226,27,45,.08); }
.chile-phone-field b { display:flex; align-items:center; padding:0 12px; border-right:1px solid #e1e1e5; white-space:nowrap; color:#34343a; font-size:13px; }
.field .chile-phone-field input { min-width:0; border:0; border-radius:0; box-shadow:none; }
.field-hint { color:var(--muted); font-size:11px; line-height:1.4; }
.upload-zone { border:1.5px dashed #c9c9cf; background:#fafafa; border-radius:12px; padding:18px; text-align:center; color:var(--muted); }
.upload-zone input { margin-top:10px; max-width:100%; }
.form-error { color:#bd1726; background:#fff0f2; border:1px solid #ffd2d8; border-radius:9px; padding:10px 12px; font-size:12px; display:none; }
.form-error.visible { display:block; }

.modal-backdrop { position:fixed; inset:0; z-index:50; background:rgba(6,6,8,.68); backdrop-filter:blur(3px); display:grid; place-items:center; padding:18px; }
.modal { width:min(660px,100%); max-height:92vh; overflow:auto; background:white; border-radius:20px; box-shadow:0 30px 80px rgba(0,0,0,.32); }
.modal.wide { width:min(820px,100%); }
.modal-header { display:flex; align-items:start; justify-content:space-between; gap:20px; padding:22px 24px; border-bottom:1px solid var(--line); }
.modal-header h2 { margin:0; font-size:21px; }
.modal-header p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.modal-body { padding:24px; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:18px 24px; border-top:1px solid var(--line); }
.empty { padding:44px 20px; text-align:center; color:var(--muted); }
.empty strong { display:block; color:var(--ink); margin-bottom:7px; }
.toast { position:fixed; z-index:100; right:22px; bottom:22px; max-width:380px; transform:translateY(120px); opacity:0; pointer-events:none; transition:.25s ease; background:var(--ink); color:white; border-left:4px solid var(--green); border-radius:11px; padding:14px 17px; box-shadow:0 18px 50px rgba(0,0,0,.28); font-size:13px; }
.toast.show { transform:translateY(0); opacity:1; }
.toast.error { border-left-color:var(--red); }

@media (max-width:1050px) {
  .stats { grid-template-columns:repeat(2,1fr); }
  .two-column { grid-template-columns:1fr; }
  .recommendation-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:820px) {
  .settings-grid { grid-template-columns:1fr; }
  .welcome-panel, .login-card, .auth-page, .account-grid { grid-template-columns:1fr; }
  .auth-image { min-height:300px; }
  .auth-image-copy { bottom:30px; }
  .auth-image-copy img { width:230px; margin-bottom:15px; }
  .welcome-side { min-height:320px; }
  .workshop-layout,.erp-active .workshop-layout { grid-template-columns:1fr; min-height:0; }
  .sidebar,.erp-active .sidebar { position:static; min-height:0; max-height:none; display:flex; flex-direction:row; overflow:auto; gap:6px; border-radius:0; box-shadow:none; }
  .sidebar-heading { display:none; }
  .sidebar-bottom { display:contents; }
  .sidebar-label { display:none; }
  .nav-button { width:auto; min-width:max-content; }
  .erp-workspace { padding:24px 16px 44px; }
  .erp-commandbar { padding:0 14px; }
  .erp-command-user > span:first-child { display:none; }
  .view-header { align-items:start; flex-direction:column; }
  .header-actions { justify-content:flex-start; }
  .client-summary { grid-template-columns:1fr 1fr; }
  .client-summary > div:first-child { grid-column:1/-1; }
  .model-profile-actions { align-items:stretch; flex-direction:column; }
  .model-profile-actions button { width:100%; }
  .model-profile-engine { grid-template-columns:1fr; }
  .service-category-grid,.brake-suggestions { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .topbar { height:70px; padding:0 14px; }
  .brand-logo { width:170px; height:40px; }
  .privacy-pill { display:none; }
  main { padding:22px 13px 46px; }
  .auth-page { border-radius:16px; }
  .auth-image { min-height:235px; }
  .auth-image-copy { left:22px; right:22px; bottom:22px; }
  .auth-image-copy p { font-size:17px; }
  .auth-panel-inner { padding:32px 22px; }
  .stats, .recommendation-grid, .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .card { padding:17px; border-radius:15px; }
  .card-header { align-items:start; flex-direction:column; }
  .search { min-width:100%; }
  .detail-hero { grid-template-columns:1fr; }
  .odometer { text-align:left; }
  .detail-hero:after { display:none; }
  .timeline-top { flex-direction:column; }
  .client-summary { grid-template-columns:1fr; }
  .client-summary > div:first-child { grid-column:auto; }
  .modal-footer { flex-direction:column-reverse; }
  .modal-footer button { width:100%; }
}

.button-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.registration-layout { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); gap:24px; align-items:start; max-width:1100px; margin:auto; }
.registration-layout h1,.registration-intro h1,.access-preview h1,.privacy-document h1 {font-size:clamp(28px,4vw,40px);line-height:1.12;letter-spacing:-.035em;}
.registration-layout p,.registration-intro p,.privacy-document p {line-height:1.6;color:var(--muted);}
.registration-layout .form-grid {margin-top:24px;}
.registration-aside {background:var(--ink);color:white;}
.registration-aside p {color:#ceced3;}
.access-logo {background:#0b0b0d;padding:12px;width:min(280px,100%);height:85px;object-fit:contain;border-radius:12px;}
.pilot-note {padding:16px;border:1px solid #48484e;border-left:4px solid var(--red);border-radius:8px;margin:22px 0;}
.pilot-note p {margin-bottom:0;}
.identity-email {margin:0!important;overflow-wrap:anywhere;}
.consent-line {display:flex;gap:12px;align-items:flex-start;margin:22px 0;line-height:1.55;font-size:14px;}
.consent-line input {width:20px;height:20px;flex-shrink:0;margin-top:2px;accent-color:var(--red);}
.full {grid-column:1/-1;}
.registration-intro {max-width:760px;margin:30px auto;padding:clamp(24px,5vw,46px);}
.registration-intro .header-actions {justify-content:flex-start;margin:24px 0;}
.request-details {display:grid;grid-template-columns:90px 1fr;gap:12px;padding:20px;background:var(--wash);border-radius:12px;}
.request-details dt {color:var(--muted);}
.request-details dd {margin:0;overflow-wrap:anywhere;}
.request-row {display:flex;justify-content:space-between;gap:18px;align-items:center;padding:22px 0;border-top:1px solid var(--line);}
.request-row h3 {margin:14px 0 8px;}
.request-row p {margin:6px 0;color:var(--muted);overflow-wrap:anywhere;}
.request-row .header-actions {flex-shrink:0;}
.preview-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px 0;}
.role-preview {padding:20px;display:grid;gap:10px;text-align:left;border:1px solid var(--line);border-radius:12px;background:var(--wash);}
.role-preview:hover {border-color:var(--red);}
.role-preview span {color:var(--muted);}
.privacy-document {max-width:850px;margin:auto;line-height:1.6;}
.privacy-document h2 {margin-top:26px;}
.portal-footer {padding:12px 24px 30px;text-align:center;}
.vehicle-selector {display:flex;gap:16px;align-items:center;margin:18px 0;}
.vehicle-selector select {padding:10px;border:1px solid var(--line);border-radius:8px;max-width:100%;}
.field input,.field select,.field textarea {font-size:16px;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {outline:3px solid #e21b2d;outline-offset:3px;}
@media(max-width:750px){.registration-layout{grid-template-columns:1fr;}.request-row{display:block;}.request-row .header-actions{justify-content:flex-start;margin-top:16px;}.preview-grid{grid-template-columns:1fr;}.privacy-pill{display:none;}.brand-logo{width:170px;}.topbar{gap:12px;}.request-details{grid-template-columns:1fr;gap:6px;}.request-details dd{margin-bottom:12px;}}

[hidden] {display:none!important;}
