:root {
  --ink: #152b42;
  --muted: #63758a;
  --line: #dbe4ec;
  --surface: #fff;
  --canvas: #f3f7f9;
  --navy: #061137;
  --blue: #006191;
  --pink: #d50072;
  --cyan: #39b9e6;
  --shadow: 0 16px 50px rgba(23,48,70,.09);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(57,185,230,.14), transparent 30%),
    radial-gradient(circle at 92% 88%, rgba(213,0,114,.09), transparent 28%),
    linear-gradient(135deg, #edf7fb, #f3f7f9 48%, #f7f0f5);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(28px, calc((100vw - 1400px) / 2));
  border-bottom: 1px solid #cfe1eb;
  background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(241,249,252,.96));
  box-shadow: 0 6px 24px rgba(6,17,55,.06);
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.home-brand-lockup { gap: 6px; }
.brand-lockup .drivalia-logo { width: 190px; height: 54px; object-fit: contain; }
.brand-lockup .mansfield-logo { width: 126px; height: 50px; object-fit: contain; }
.brand-divider { width: 1px; height: 37px; flex: 0 0 1px; background: linear-gradient(180deg, var(--pink), var(--cyan)); }
.brand .portal-label { display: grid; line-height: 1.1; }
.brand strong { color: var(--navy); font-size: 27px; letter-spacing: -.04em; }
.brand small, .user-chip small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip > span:last-child { display: grid; }
.user-chip strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #e0edf5; font-weight: 750; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}
.button-primary { color: #fff; background: linear-gradient(135deg, var(--pink), #a90078 48%, var(--blue)); box-shadow: 0 8px 20px rgba(132,20,120,.24); }
.button-primary:hover { filter: brightness(.92); transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; filter: grayscale(.45); opacity: .55; transform: none; }
.button-quiet { color: var(--blue); background: linear-gradient(135deg, #e5f5fb, #f8eaf2); }
.button-ghost { min-height: 36px; padding: 0 8px; color: var(--muted); background: transparent; }
.button-wide { width: 100%; min-height: 52px; }

.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 70px; }
.heading { position: relative; margin: 32px 0 24px; padding: 42px 46px; overflow: hidden; border-radius: 24px; color: #fff; background: linear-gradient(125deg, #00618f 0%, #063b65 38%, #061137 78%, #130a36 100%); box-shadow: 0 20px 55px rgba(6,17,55,.2); }
.heading::after { position: absolute; width: 260px; height: 260px; right: -95px; bottom: -175px; border: 30px solid rgba(213,0,114,.42); border-radius: 50%; content: ""; }
.heading h1, .fleet-panel h1 { margin: 0; color: var(--navy); font-size: clamp(38px,5vw,56px); letter-spacing: -.05em; }
.heading h1 { position: relative; z-index: 1; color: #fff; }
.heading > p:last-child { position: relative; z-index: 1; margin: 14px 0 0; color: #d8eaf4; }
.heading .eyebrow { position: relative; z-index: 1; color: #7cd9f5; }
.eyebrow { margin: 0 0 12px; color: var(--pink); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.portal-layout { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); gap: 22px; align-items: start; }
.panel { position: relative; padding: 31px 28px 28px; overflow: hidden; border: 1px solid #d6e4eb; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 34px rgba(6,17,55,.07); }
.panel::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: linear-gradient(90deg, var(--pink), #8b3fa7 48%, var(--cyan)); }
.panel-title { display: flex; justify-content: space-between; margin-bottom: 22px; }
.panel-title h2 { margin: 0; font-size: 20px; }
.panel-title p, .panel-copy { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.panel-disabled { min-height: 360px; background: rgba(255,255,255,.55); }

.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.form label small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.form input, .form textarea, .form select, .flow-card input, .flow-card textarea, .flow-card select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd8e1;
  border-radius: 10px;
  color: var(--ink);
  background: #fbfcfd;
  outline: none;
}
.form input[type="file"] { height: auto; padding: 11px 13px; }
.form textarea, .flow-card textarea { min-height: 96px; padding: 13px 14px; resize: vertical; }
.form input:focus, .form textarea:focus, .flow-card input:focus, .flow-card textarea:focus, .flow-card select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,97,145,.12); }
.form input[name="vehicleReg"] { text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.alert { margin-bottom: 18px; padding: 12px 14px; border-left: 3px solid #bd3d3d; border-radius: 7px; color: #8b2929; background: #fff0f0; font-size: 13px; }
.cover-result { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding: 15px; border: 1px solid #a9dcea; border-radius: 12px; background: linear-gradient(135deg, #edfaff, #f9edf5); }
.cover-result > span { padding: 7px 10px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); font-size: 12px; font-weight: 800; }
.cover-result > div { display: grid; gap: 4px; }
.cover-result small { color: var(--muted); }
.cover-result.noCover { border-color: #efcaca; background: #fff4f4; }
.cover-result.noCover > span { background: #a43d3d; }
.cover-result.warranty { border-color: #ecd58f; background: #fff9e8; }
.cover-result.warranty > span { background: linear-gradient(135deg, #b06b00, var(--pink)); }
.vehicle-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.vehicle-details div { min-width: 0; padding: 12px 14px; background: #fff; }
.vehicle-details dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.vehicle-details dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 700; }
.warranty-callout { display: grid; gap: 5px; margin-bottom: 20px; padding: 15px; border-left: 4px solid #b06b00; border-radius: 8px; background: #fff7dc; font-size: 13px; }
.warranty-callout span { color: var(--muted); }
.warranty-callout a { color: var(--blue); font-size: 17px; font-weight: 800; }

.booking-page { width: min(1040px, calc(100% - 48px)); }
.booking-heading { margin-bottom: 22px; padding: 30px 38px; }
.booking-heading h1 { font-size: clamp(34px, 5vw, 48px); }
.booking-heading p:last-child { max-width: 680px; }
.flow-shell { scroll-margin-top: 20px; }
.lookup-shell { width: min(700px, 100%); margin: 0 auto; }
.flow-progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 0 0 16px; padding: 16px 18px; border: 1px solid #d7e3eb; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 8px 26px rgba(6,17,55,.06); list-style: none; }
.flow-progress li { position: relative; display: grid; justify-items: center; gap: 6px; color: #82909d; font-size: 11px; font-weight: 750; text-align: center; }
.flow-progress li::after { position: absolute; z-index: 0; top: 16px; left: calc(50% + 20px); width: calc(100% - 34px); height: 2px; background: #dce5eb; content: ""; }
.flow-progress li:last-child::after { display: none; }
.flow-progress li span, .progress-number { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #d6e0e7; border-radius: 50%; color: #748391; background: #fff; font-size: 13px; font-weight: 850; }
.flow-progress li.active, .flow-progress li.complete { color: var(--blue); }
.flow-progress li.active span { border-color: var(--pink); color: #fff; background: linear-gradient(135deg, var(--pink), var(--blue)); }
.flow-progress li.complete span { border-color: #29966c; color: #fff; background: #29966c; }
.flow-progress li.complete::after { background: #70bda0; }
.single-progress { display: flex; align-items: center; gap: 12px; }
.single-progress div { display: grid; gap: 3px; }
.single-progress small { color: var(--muted); }
.flow-card { padding: 34px; border: 1px solid #d7e3eb; border-radius: 20px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
.flow-card[hidden] { display: none; }
.flow-card label { display: grid; gap: 8px; margin-top: 18px; color: var(--ink); font-size: 13px; font-weight: 750; }
.flow-card label small { color: var(--muted); font-weight: 500; }
.step-heading { margin-bottom: 24px; }
.step-heading > span { color: var(--pink); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.step-heading h2 { margin: 7px 0 8px; color: var(--navy); font-size: clamp(25px, 4vw, 34px); letter-spacing: -.035em; }
.step-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.plate-label { margin-top: 0 !important; }
.registration-plate { display: grid; grid-template-columns: 46px 1fr; overflow: hidden; border: 4px solid #111; border-radius: 9px; background: #f4cf22; box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
.registration-plate > span { display: grid; place-items: center; color: #fff; background: #174caa; font-size: 13px; font-weight: 850; }
.registration-plate input { height: 76px; border: 0 !important; border-radius: 0 !important; color: #111; background: #f4cf22 !important; box-shadow: none !important; font-family: "Arial Black", Impact, ui-monospace, monospace; font-size: clamp(30px, 7vw, 48px); font-weight: 900; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.registration-form { gap: 22px; }
.vehicle-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid #d5e3eb; border-radius: 14px; background: #fff; }
.vehicle-strip > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.vehicle-strip small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.vehicle-strip a { color: var(--blue); font-size: 12px; font-weight: 800; }
.mini-plate { padding: 7px 10px; border: 2px solid #111; border-radius: 5px; color: #111; background: #f4cf22; font-family: "Arial Black", Impact, sans-serif; font-size: 15px; letter-spacing: .05em; }
.flow-alert { margin-bottom: 16px; }
.operator-script { margin-bottom: 22px; padding: 15px 17px; border-left: 4px solid var(--cyan); border-radius: 8px; color: #18445f; background: #ebf8fd; font-size: 14px; font-weight: 700; line-height: 1.55; }
.field-help { margin: -3px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.flow-card fieldset { margin: 22px 0 0; padding: 0; border: 0; }
.flow-card legend { margin-bottom: 10px; font-size: 14px; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: block !important; margin: 0 !important; cursor: pointer; }
.choice input, .segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice > span { min-height: 84px; display: grid; align-content: center; gap: 5px; padding: 15px 16px; border: 2px solid #d6e1e8; border-radius: 12px; background: #fbfcfd; font-size: 15px; }
.choice input:checked + span { border-color: var(--blue); background: #ebf7fb; box-shadow: 0 0 0 3px rgba(0,97,145,.1); }
.choice.caution input:checked + span { border-color: #c39013; background: #fff8de; }
.choice.danger input:checked + span { border-color: #b63232; background: #fff0f0; }
.location-choice-grid .choice > span { min-height: 108px; grid-template-columns: 44px 1fr; align-items: center; align-content: center; column-gap: 13px; text-align: left; }
.location-choice-grid .choice strong { color: var(--navy); font-size: 15px; }
.location-choice-grid .choice small { line-height: 1.45; }
.location-icon { grid-row: 1 / span 2; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 19px; font-weight: 900; font-style: normal; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.icon-safe { background: linear-gradient(145deg, #2c9a70, #187353); }
.icon-roadside { background: linear-gradient(145deg, var(--cyan), var(--blue)); }
.icon-motorway { background: linear-gradient(145deg, #3479b8, var(--navy)); }
.icon-live { background: linear-gradient(145deg, #e05858, #a21f2b); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { margin: 0; cursor: pointer; }
.segmented span { min-height: 48px; display: grid; place-items: center; border: 2px solid #d5e1e8; border-radius: 10px; background: #fbfcfd; }
.segmented input:checked + span { border-color: var(--blue); color: var(--blue); background: #eaf6fb; }
.incident-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.incident-choice label { margin: 0; cursor: pointer; }
.incident-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.incident-choice span { min-height: 116px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 18px; border: 2px solid #d5e1e8; border-radius: 14px; background: #fbfcfd; text-align: center; }
.incident-choice strong { color: var(--navy); font-size: 22px; }
.incident-choice small { line-height: 1.45; }
.incident-choice input:checked + span { border-color: var(--pink); background: linear-gradient(145deg, #fff1f7, #edf8fc); box-shadow: 0 0 0 3px rgba(213,0,114,.09); }
.breakdown-fields { margin-top: 22px; padding-top: 3px; border-top: 1px solid var(--line); }
.emergency-callout { margin-top: 20px; padding: 24px; border: 2px solid #b72e2e; border-radius: 14px; color: #7d1919; background: #fff0f0; text-align: center; }
.emergency-callout strong { font-size: 24px; }
.emergency-callout p { margin: 8px 0 16px; font-size: 18px; font-weight: 800; }
.emergency-button { color: #fff; background: #b72e2e; }
.safety-dialog { width: min(510px, calc(100% - 32px)); padding: 30px; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 30px 90px rgba(6,17,55,.35); text-align: center; }
.safety-dialog::backdrop { background: rgba(6,17,55,.68); backdrop-filter: blur(3px); }
.safety-dialog-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; color: #fff; background: #b72e2e; font-size: 30px; font-weight: 900; }
.safety-dialog h2 { margin: 0 0 10px; color: var(--navy); font-size: 26px; }
.safety-dialog p { margin: 0; color: var(--muted); font-size: 16px; font-weight: 650; line-height: 1.55; }
.safety-dialog-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.hidden { display: none !important; }
.conditional-field { padding: 15px; border-radius: 10px; background: #fff7df; }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.routing-preview { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 16px; border: 1px solid #b9dce9; border-radius: 10px; background: #edf9fd; }
.routing-preview span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.routing-preview.warranty { border-color: #e2c870; background: #fff8dc; }
.routing-preview.not-covered { border-color: #e6b0b0; color: #8b2929; background: #fff0f0; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.review-grid div { padding: 14px 16px; background: #fff; }
.review-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.review-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.placeholder { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); text-align: center; }
.placeholder span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #e4f3f8; font-size: 22px; font-weight: 800; }
.placeholder p { margin: 0; }

.message-card { width: min(500px,100%); margin: 20px auto; padding: 50px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.message-card h1 { margin: 0; }
.message-card p:not(.eyebrow) { margin: 15px 0 28px; color: var(--muted); line-height: 1.6; }
.message-lockup { justify-content: center; margin-bottom: 25px; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: #fff; background: #27996b; font-size: 28px; font-weight: 800; }
.fleet-page { padding-top: 60px; }
.fleet-panel { width: min(620px,100%); margin: 0 auto; }

.login-page { display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 20%, rgba(57,185,230,.2), transparent 32%), linear-gradient(135deg, #e8f4f9, #f5edf4); }
.login-shell { width: min(950px,100%); min-height: 590px; display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 35px 90px rgba(13,43,68,.16); }
.login-panel { display: flex; flex-direction: column; justify-content: flex-start; padding: 120px 64px 64px; }
.login-brand { display: grid; gap: 14px; margin-bottom: 72px; }
.brand-lockup-login { align-items: center; }
.brand-lockup-login .drivalia-logo { width: min(260px,62%); height: auto; }
.brand-lockup-login .mansfield-logo { width: min(150px,34%); height: auto; }
.login-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.login-note { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.microsoft-mark { width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.microsoft-mark i:nth-child(1) { background: #f25022; }.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }.microsoft-mark i:nth-child(4) { background: #ffb900; }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg,#005786,#061137 72%); }
.login-art p { position: relative; z-index: 2; font-size: 40px; line-height: 1.1; letter-spacing: -.04em; }
.login-art strong { color: var(--cyan); font-size: 46px; }
.art-grid { position: absolute; inset: 70px; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; opacity: .13; transform: rotate(-8deg) scale(1.2); }
.art-grid span { border: 1px solid #fff; border-radius: 14px; background: rgba(255,255,255,.12); }
.orb { position: absolute; border-radius: 50%; }.orb-one { width: 260px; height: 260px; top: -100px; right: -80px; background: rgba(57,185,230,.25); }
.orb-two { width: 180px; height: 180px; bottom: -70px; left: -60px; background: rgba(213,0,114,.2); }

@media (max-width: 850px) {
  .portal-layout, .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .user-chip { display: none; }
  .flow-progress small { display: none; }
}
@media (max-width: 580px) {
  .site-header { height: auto; padding: 14px 16px; }
  .brand img { width: 150px; height: 48px; }
  .brand .portal-label { display: none; }
  .brand-lockup { gap: 8px; }
  .brand-lockup .drivalia-logo { width: 135px; height: 43px; }
  .brand-lockup .mansfield-logo { width: 88px; height: 38px; }
  .brand-divider { height: 30px; }
  .page { width: min(100% - 30px,1180px); }
  .heading { margin-top: 20px; padding: 32px 24px; }
  .panel { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .vehicle-details { grid-template-columns: 1fr; }
  .booking-heading { padding: 26px 22px; }
  .flow-card { padding: 23px 18px; }
  .flow-progress { padding: 12px 8px; }
  .flow-progress li::after { left: calc(50% + 17px); width: calc(100% - 28px); }
  .flow-progress li span { width: 30px; height: 30px; }
  .choice-grid, .review-grid, .incident-choice { grid-template-columns: 1fr; }
  .vehicle-strip { grid-template-columns: auto 1fr; }
  .vehicle-strip a { grid-column: 1 / -1; }
  .registration-plate { grid-template-columns: 38px 1fr; }
  .step-actions .button { flex: 1; padding: 0 10px; }
  .login-page { padding: 15px; }
  .login-panel { padding: 50px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
