/* DG E-booker - styles matched to demobooker.dgcars.co.uk
   Brand: green #418a49, light green #acd8b0, page #f5f8fd, ink #242936, footer #202228
   Font: Questrial (free stand-in for ITC Avant Garde Gothic used by the demo) */
@font-face { font-family: 'Questrial'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/questrial-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Questrial'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/questrial-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
    --green: #418a49;
    --green-dark: #2f6b36;
    --green-light: #acd8b0;
    --title: #142b17;
    --ink: #242936;
    --muted: #8a93a3;
    --line: #e3ebf1;
    --page: #f5f8fd;
    --panel: #eaf1fa;
    --danger: #d64545;
    --warning: #e0952b;
    --footer: #202228;
    --font: 'Questrial', 'Century Gothic', 'Avant Garde', 'Open Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 16px; color: #000; background: var(--page); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 6px; left: 6px; z-index: 999; background: #fff; padding: 8px 12px; }
.inline { display: inline; margin: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; display: flex; align-items: stretch; background: #fff; height: 75px; box-shadow: 0 2px 8px rgba(36, 41, 54, .06); }
.brand { width: 165px; flex: 0 0 165px; background: #2d2d2d; border-bottom: 4px solid var(--green); display: flex; align-items: center; justify-content: center; }
.brand img { height: 48px; }
.main-nav { display: flex; flex: 1; align-items: stretch; }
.main-nav > a, .main-nav .nav-link { white-space: nowrap; display: flex; align-items: center; padding: 0 30px; color: var(--ink); font-size: 18px; text-decoration: none; border-right: 1px solid #eef1f6; background: none; border-top: 0; border-bottom: 0; border-left: 0; font-family: var(--font); cursor: pointer; height: 100%; }
.main-nav > a:hover, .main-nav .nav-link:hover { background: var(--page); }
.main-nav > a.active, .main-nav .nav-link.active { box-shadow: inset 0 -4px 0 var(--green); }
.main-nav .logout .nav-link { border-right: 0; border-left: 1px solid #eef1f6; }
.nav-spacer { flex: 1; }
.nav-account { align-self: center; font-size: 14px; color: var(--green); padding: 4px 12px; border: 1px solid var(--green-light); border-radius: 99px; margin-right: 12px; }
.caret { font-size: 14px; margin-left: 6px; color: #aab; }
.dropdown { position: relative; display: flex; }
.dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .12); border-top: 3px solid var(--green); z-index: 10; }
.dropdown-menu a { display: block; padding: 14px 20px; color: var(--ink); text-decoration: none; border-bottom: 1px solid #f0f2f6; }
.dropdown-menu a:hover { background: var(--page); color: var(--green); }
.nav-toggle { display: none; }

/* ---------- Layout ---------- */
main { flex: 1; }
.page { padding: 30px; max-width: 1340px; width: 100%; margin: 0 auto; }
.page-section { width: 100%; }
.alert { max-width: 900px; margin: 0 auto 18px; padding: 12px 16px; border-left: 4px solid; background: #fff; }
.alert-success { border-color: var(--green); color: var(--green-dark); }
.alert-error { border-color: var(--danger); color: #a02d2d; }
.alert-info { border-color: #4c7cc9; color: #2b4f8a; }
.booking-page ~ .alert, .booking-body .alert { position: relative; z-index: 2; }

/* Section title: "MY PROFILE ----------" */
.section-title { display: flex; align-items: center; gap: 22px; font-size: 32px; font-weight: 700; letter-spacing: .5px; color: var(--title); margin: 4px 0 26px; text-transform: uppercase; }
.section-title::after { content: ""; flex: 1; height: 3px; background: var(--green-light); }
.empty { text-align: center; color: var(--danger); font-weight: 700; font-size: 20px; }
.empty-cell { text-align: center; padding: 26px; color: var(--muted); }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
    width: 100%; height: 50px; padding: 0 15px; border: 2px solid var(--line); background: #fff; font: 16px/1.2 var(--font); color: #000; border-radius: 0; margin: 0 0 15px; appearance: auto;
}
textarea { height: auto; padding: 12px 15px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
label { display: block; font-size: 14px; color: var(--ink); }
.field-error { color: var(--danger); font-size: 14px; margin: -10px 0 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.check { display: inline-flex; gap: 6px; align-items: center; }
.check input { width: 16px; height: 16px; margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.phone-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.password-wrap { position: relative; }
.password-wrap .reveal { position: absolute; right: 10px; top: 12px; border: 0; background: none; cursor: pointer; font-size: 16px; opacity: .6; }
.strength { height: 26px; margin: -10px 0 12px; background: #c7c7c7; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.strength.s1 { background: var(--danger); } .strength.s2 { background: var(--warning); } .strength.s3 { background: #7fb24b; } .strength.s4, .strength.s5 { background: var(--green); }

/* ---------- Buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 34px; border-radius: 100px; border: 2px solid var(--green); background: var(--green); color: #fff; font: 700 13px var(--font); letter-spacing: .8px; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green-light); }
.btn-outline:hover { background: #f0f8f1; color: var(--green); border-color: var(--green); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #b33434; border-color: #b33434; }
.btn-warning { background: var(--warning); border-color: var(--warning); }
.btn-sm { min-height: 36px; padding: 0 20px; font-size: 12px; }
.btn-xs { min-height: 30px; padding: 0 14px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-google { width: 100%; margin-top: 12px; background: #fff; color: #444; border-color: #dadce0; }
.btn-google:hover { background: #f7f8f8; color: #222; border-color: #c8cbd0; }
.btn-google .g { font-weight: 900; color: #4285f4; font-size: 16px; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.btn-row > * { flex: 1; }
.btn-row.single > * { flex: 0 0 100%; }

/* ---------- Tabs (Regular/Corporate, Now/Later) ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; }
.tabs button { height: 46px; border: 0; border-top: 3px solid transparent; background: linear-gradient(#f5f8fd, #eef3fa); font: 16px var(--font); color: #000; cursor: pointer; }
.tabs button.active { background: #fff; border-top-color: var(--green); font-weight: 700; }
.tabs.small button { height: 42px; }

/* ---------- Auth pages ---------- */
.auth { max-width: 600px; margin: 20px auto 40px; }
.auth-icon { color: var(--green); text-align: center; }
.auth-icon svg { width: 124px; height: 124px; }
.line-title { display: flex; align-items: center; gap: 22px; color: var(--title); font-size: 32px; font-weight: 700; margin: 8px 0 0; }
.line-title::before, .line-title::after { content: ""; flex: 1; height: 3px; background: var(--green-light); }
.auth .tabs { margin-top: 0; }
.auth .tabs button { border-top: 0; border-bottom: 3px solid transparent; }
.auth .tabs button.active { border-bottom-color: var(--green); background: transparent; }
.auth-form { padding-top: 14px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 15px; margin: 2px 0 18px; }
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--green); }
.auth-links.center { justify-content: center; }

/* ---------- Booking page (map + left panel) ---------- */
.booking-body main.page, main.booking-main { padding: 0; max-width: none; }
.booking-page { position: relative; min-height: calc(100vh - 75px); }
.booking-page .map { position: absolute; inset: 0; z-index: 0; background: #aad3df; }
.booking-panel { position: relative; z-index: 1; width: 600px; max-width: calc(100% - 32px); margin: 0 0 30px 30px; top: 85px; background: #fff; padding: 15px; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.panel-heading { font-size: 20px; color: var(--title); margin: 4px 0 14px; }
.booking-panel fieldset { border: 0; padding: 0; margin: 0; }
.step-title { font-weight: 700; color: var(--title); margin: 10px 0; padding: 0; }
.address-field { position: relative; }
.address-field input[data-address-input] { padding-right: 46px; height: 50px; }
.search-icon { position: absolute; right: 14px; top: 12px; font-size: 22px; color: #333; pointer-events: none; }
.address-field.via .remove-via { position: absolute; right: 8px; top: 9px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; color: var(--danger); cursor: pointer; }
.suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: 48px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border: 2px solid var(--green); border-top: 0; max-height: 260px; overflow: auto; box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.suggestions .sr-head { text-align: center; font-weight: 700; padding: 4px 0 8px; }
.suggestions li.item { padding: 7px 14px; text-align: center; font-size: 14px; cursor: pointer; }
.suggestions li.item:hover, .suggestions li.item.active { background: #f0f8f1; color: var(--green-dark); }
.suggestions li.none { text-align: center; color: var(--muted); font-size: 14px; padding: 6px; }
.add-via { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; border-bottom: 3px solid var(--green); color: var(--green); font: 16px var(--font); padding: 4px 0 8px; margin: -4px 0 0; cursor: pointer; text-align: left; }
.add-via .plus { display: inline-flex; width: 18px; height: 18px; border: 1.5px solid var(--green); border-radius: 50%; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.vias { margin-bottom: 15px; }
.time-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; align-items: end; }
.time-row label { font-size: 15px; }
.quick-addresses { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.chip { border: 1px solid var(--green-light); background: #f3faf4; color: var(--green-dark); border-radius: 99px; padding: 5px 12px; cursor: pointer; font: 13px var(--font); }
.account-box { border: 2px solid var(--line); padding: 12px; margin-bottom: 15px; }
.account-box strong { display: block; margin-bottom: 8px; color: var(--title); }
.radio-row { display: flex; gap: 18px; margin-bottom: 12px; }
.radio-row label { display: flex; gap: 6px; align-items: center; font-size: 15px; }
.estimate { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; background: #f0f8f1; border-left: 4px solid var(--green); margin-bottom: 15px; }
.estimate strong { font-size: 22px; color: var(--green-dark); }
.steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 13px; padding: 8px 0; background: var(--page); color: var(--muted); counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.active { background: var(--green); color: #fff; }
.step-nav { display: flex; gap: 10px; margin: 0 0 12px; }
.step-nav .btn { flex: 1; }
.leaflet-container { font-family: var(--font); }
.map-inline { height: 380px; margin-top: 22px; }

/* ---------- Panels (profile) ---------- */
.panel { background: var(--panel); padding: 30px; }
.grid-form { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-bottom: 24px; }
.panel-label { margin: 0; font-size: 18.7px; color: var(--title); }
.grid-form .fields label { display: grid; grid-template-columns: 160px minmax(0, 300px); align-items: center; gap: 10px; color: #a8a8a8; font-size: 16px; text-align: right; margin-bottom: 6px; }
.grid-form .fields input { border: 0; border-bottom: 2px solid #a8a8a8; background: transparent; height: 36px; margin: 0; padding: 5px 6px; }
.grid-form .fields .phone-row { grid-template-columns: 96px 1fr; text-align: left; }
.grid-form .fields .phone-row select { height: 36px; margin: 0; padding: 0 4px; background: transparent; border: 0; border-bottom: 2px solid #a8a8a8; }
.grid-form .fields .field-error { margin: 0 0 8px 170px; }
.grid-form .fields > div, .grid-form .fields > p { margin-left: 170px; }

/* ---------- Filters + tables ---------- */
.filters, .template-form { display: block; }
.filters label, .template-form .row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; font-weight: 700; font-size: 15px; color: #000; gap: 16px; }
.filters label input, .filters label select { margin: 0 0 15px; }
.filters-actions { text-align: center; margin: 14px 0 30px; }
.filters-actions .btn, .template-form .btn-row .btn { min-width: 300px; }
.template-form { background: transparent; padding: 0; }
.template-form .row > label { font-weight: 700; font-size: 15px; }
.template-form .row > div { min-width: 0; }
.template-form .add-via { justify-content: center; background: var(--green); color: #fff; border-radius: 99px; height: 50px; border: 0; margin-bottom: 15px; font-size: 0; }
.template-form .add-via .plus { font-size: 22px; border: 0; width: auto; height: auto; color: #fff; }
.template-form .btn-row { justify-content: space-around; }
.template-form .btn-row > * { flex: 0 0 auto; }
.table-tools { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.col-toggle summary { cursor: pointer; font-size: 13px; border: 1px solid var(--line); background: #fff; padding: 6px 10px; display: inline-block; }
.col-toggle label { display: inline-flex; gap: 4px; margin: 6px 10px 0 0; font-size: 13px; }
.search-box label { display: flex; align-items: center; gap: 8px; }
.search-box input { height: 34px; margin: 0; width: 220px; }
.table-wrap { overflow-x: auto; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: var(--green); color: #fff; font-weight: 700; text-align: center; padding: 12px 10px; white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.data-table tbody tr:nth-child(even) td { background: #f7fafd; }
.data-table td.actions { white-space: nowrap; }
.data-table td.actions > * { margin: 2px; }

/* ---------- Booking cards / detail ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.booking-card { background: #fff; padding: 18px; border-top: 4px solid var(--green); box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.booking-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.booking-card p { margin: 6px 0; font-size: 15px; }
.booking-card .when { font-weight: 700; color: var(--title); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9aa; margin-right: 8px; }
.dot.green { background: var(--green); } .dot.red { background: var(--danger); }
.via-line { padding-left: 4px; color: #555; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e7eef8; color: #2b4f8a; margin: 0; }
.status-complete { background: #e2f3e4; color: var(--green-dark); }
.status-cancelled, .status-no-show { background: #fbe4e4; color: #a02d2d; }
.status-prebooking, .status-scheduled { background: #fff4e0; color: #9a5d00; }
.booking-detail dl { display: grid; grid-template-columns: 180px 1fr; gap: 10px 20px; margin: 18px 0; }
.booking-detail dt { font-weight: 700; color: var(--title); }
.booking-detail dd { margin: 0; }
.booking-detail .btn-row > * { flex: 0 0 auto; }
.card.narrow { max-width: 640px; margin: 40px auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #fff; }
.footer-inner { max-width: 1340px; margin: 0 auto; padding: 0 30px 20px; }
.footer-logo { display: block; width: 140px; padding-top: 18px; border-top: 7px solid var(--green); margin-bottom: 18px; }
.social { display: flex; gap: 18px; margin-bottom: 18px; }
.social a { color: #fff; display: inline-flex; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid #3a3d45; padding-top: 16px; font-size: 14px; color: #c9ccd3; }
.legal a { color: #fff; text-decoration: none; margin-right: 22px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .site-header { height: 64px; }
    .brand { width: 110px; flex-basis: 110px; }
    .brand img { height: 38px; }
    .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; padding: 0 20px; background: none; border: 0; cursor: pointer; }
    .nav-toggle span { width: 26px; height: 3px; background: var(--ink); }
    .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, .1); }
    .main-nav.open { display: flex; }
    .main-nav > a, .main-nav .nav-link, .main-nav form .nav-link { padding: 16px 20px; border-right: 0; border-bottom: 1px solid #eef1f6; height: auto; width: 100%; }
    .dropdown { flex-direction: column; }
    .dropdown-menu { position: static; box-shadow: none; border-top: 0; }
    .nav-spacer { display: none; }
    .page { padding: 18px 16px; }
    .section-title, .line-title { font-size: 24px; }
    .booking-panel { margin: 0 auto; top: 0; max-width: 100%; width: 100%; box-shadow: none; }
    .booking-page { display: flex; flex-direction: column-reverse; }
    .booking-page .map { position: relative; height: 260px; inset: auto; }
    .grid-form { grid-template-columns: 1fr; }
    .grid-form .fields label { grid-template-columns: 1fr; text-align: left; }
    .grid-form .fields > div, .grid-form .fields > p, .grid-form .fields .field-error { margin-left: 0; }
    .filters label, .template-form .row { grid-template-columns: 1fr; gap: 4px; }
    .filters-actions .btn, .template-form .btn-row .btn { min-width: 0; width: 100%; }
    .booking-detail dl { grid-template-columns: 1fr; }
    .auth-links { flex-wrap: wrap; gap: 8px; }
    .table-tools { flex-direction: column; }
}

/* Questrial has one weight - thicken headings/bold text so they read like the demo's bold Avant Garde */
.section-title, .line-title, .panel-label, .step-title, .tabs button.active, .filters label, .template-form .row > label, .data-table th, .booking-detail dt, .empty, strong, b {
    -webkit-text-stroke: .035em currentColor;
}
.btn { -webkit-text-stroke: .02em currentColor; }
.account-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f0f8f1; border-left: 4px solid var(--green); padding: 8px 12px; margin-bottom: 14px; font-size: 14px; }
@media (max-width: 1100px) { .main-nav > a, .main-nav .nav-link { padding: 0 18px; font-size: 16px; } }
