:root {
  --green-950: #032d22;
  --green-900: #064c37;
  --green-800: #096245;
  --green-700: #0d7a55;
  --lime: #c8e64a;
  --ink: #17201d;
  --muted: #66736e;
  --line: #dfe7e3;
  --surface: #ffffff;
  --soft: #f2f7f4;
  --danger: #b42318;
  --shadow: 0 20px 60px rgba(3, 45, 34, 0.12);
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background: #f7faf8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #f7faf8; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.is-hidden { display: none !important; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 88px;
  padding: 0 clamp(24px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(10, 78, 56, .1);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--green-950);
  background: var(--lime);
  clip-path: polygon(50% 0, 96% 18%, 88% 77%, 50% 100%, 12% 77%, 4% 18%);
  font-weight: 900;
  letter-spacing: -2px;
  transform: skew(-4deg);
}
.brand-mark span { transform: skew(4deg); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 16px; color: var(--green-950); letter-spacing: .5px; }
.brand-copy small { font-size: 8px; color: var(--green-700); letter-spacing: 2.25px; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.secure-pill svg, .logout-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logout-button { border: 0; background: transparent; color: var(--green-800); display: inline-flex; align-items: center; gap: 8px; padding: 10px; font-size: 12px; font-weight: 700; }

main { flex: 1; }
.login-view {
  min-height: calc(100vh - 154px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  padding: 72px clamp(24px, 8vw, 130px);
  background:
    radial-gradient(circle at 14% 12%, rgba(200,230,74,.25), transparent 24%),
    linear-gradient(118deg, var(--green-950) 0 53%, #eef5f1 53% 100%);
  position: relative;
  overflow: hidden;
}
.login-view::before {
  content: "";
  position: absolute;
  inset: auto auto -180px -120px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(200,230,74,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(200,230,74,.025), 0 0 0 140px rgba(200,230,74,.02);
}
.login-intro { color: white; max-width: 670px; position: relative; z-index: 1; }
.eyebrow { display: block; color: var(--green-700); font-size: 10px; font-weight: 800; letter-spacing: 2px; margin-bottom: 12px; }
.eyebrow.light { color: var(--lime); }
.login-intro .eyebrow { color: var(--lime); }
.login-intro h1, .welcome-copy h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -2.7px; }
.login-intro p { max-width: 590px; font-size: 17px; color: #c9d9d3; line-height: 1.75; margin: 24px 0 36px; }
.feature-list { display: grid; gap: 16px; color: #f2f7f4; font-size: 13px; }
.feature-list > div { display: flex; align-items: center; gap: 12px; }
.feature-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--green-950); background: var(--lime); font-weight: 900; }

.login-card { position: relative; z-index: 1; max-width: 480px; width: 100%; justify-self: end; background: white; border-radius: 20px; padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.mini-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--green-950); color: var(--lime); font-weight: 900; font-size: 13px; }
.card-heading p { margin: 0 0 4px; color: var(--green-700); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.card-heading h2 { margin: 0; font-size: 21px; color: var(--green-950); }
form label { display: block; margin: 18px 0 8px; color: #33403b; font-size: 11px; font-weight: 700; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 14px; top: 50%; width: 18px; transform: translateY(-50%); fill: none; stroke: #7c8b85; stroke-width: 1.8; stroke-linecap: round; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; outline: none; transition: .2s ease; }
input, select { height: 48px; padding: 0 14px; }
textarea { padding: 13px 14px; resize: vertical; line-height: 1.5; }
.input-wrap input { padding-left: 44px; }
.password-wrap input { padding-right: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(13,122,85,.1); }
.icon-button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #7c8b85; padding: 8px; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.form-error { min-height: 18px; color: var(--danger); font-size: 10px; margin: 8px 0 0; }
.primary-button { width: 100%; min-height: 50px; border: 0; border-radius: 10px; color: white; background: var(--green-800); font-size: 12px; font-weight: 800; box-shadow: 0 8px 20px rgba(6,76,55,.18); transition: transform .2s, background .2s; }
.primary-button:hover { background: var(--green-900); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .72; transform: none; }
.demo-button { width: 100%; border: 0; background: transparent; color: var(--green-700); font-size: 10px; font-weight: 700; padding: 13px 0 0; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.account-action { min-height: 44px; padding: 8px 12px; border: 1px solid #cbd9d2; border-radius: 10px; color: var(--green-800); background: #fff; font-size: 12px; font-weight: 800; line-height: 1.35; transition: .2s ease; }
.account-action:hover { border-color: var(--green-700); background: var(--soft); transform: translateY(-1px); }
.account-action.primary-action { color: var(--green-950); border-color: rgba(200,230,74,.7); background: rgba(200,230,74,.38); }
.account-action.primary-action:hover { background: rgba(200,230,74,.58); }
.login-help { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 20px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.login-help svg { flex: 0 0 18px; width: 18px; fill: none; stroke: var(--green-700); stroke-width: 1.8; }
.login-help a { color: var(--green-700); font-weight: 700; }

.portal-view { background: #f7faf8; }
.welcome-section { padding: 58px clamp(24px, 7vw, 110px) 72px; background: linear-gradient(140deg, var(--green-950), #0a5e43); color: white; }
.welcome-copy { display: inline-block; }
.welcome-copy .eyebrow { color: var(--lime); }
.welcome-copy h1 { font-size: clamp(32px, 5vw, 52px); }
.welcome-copy p { color: #cfe0da; font-size: 13px; }
.vehicle-selector { float: right; width: min(360px, 42%); margin-top: 8px; }
.vehicle-selector label { display: block; color: #cfe0da; font-size: 9px; margin-bottom: 8px; }
.select-wrap { position: relative; }
.select-wrap svg { position: absolute; z-index: 1; left: 14px; top: 50%; width: 21px; transform: translateY(-50%); fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; }
.vehicle-selector select { appearance: none; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: white; padding-left: 46px; font-size: 11px; }
.vehicle-selector option { color: var(--ink); }
.vehicle-card { clear: both; transform: translateY(36px); display: grid; grid-template-columns: 240px 1fr 1.2fr; align-items: center; gap: 32px; background: white; color: var(--ink); border-radius: 18px; padding: 20px 34px 20px 18px; box-shadow: var(--shadow); }
.vehicle-visual svg { width: 100%; overflow: visible; }
.car-shadow { stroke: #d7e0dc; stroke-width: 4; stroke-linecap: round; }
.car-body { fill: var(--green-800); }
.car-window { fill: #cce2d9; }
.car-detail { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linecap: round; }
.tire { fill: #18241f; }
.hub { fill: #9aaba4; stroke: #eef4f1; stroke-width: 2; }
.vehicle-title > span:first-child { color: var(--green-700); font-size: 9px; font-weight: 800; }
.vehicle-title h2 { margin: 5px 0 12px; font-size: 19px; line-height: 1.35; }
.plate { display: inline-flex; align-items: center; height: 27px; padding: 0 10px; border: 1px solid #bac7c1; border-radius: 5px; color: #29342f; background: #f7f9f8; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.vehicle-stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.vehicle-stats > div { padding: 5px 18px; border-left: 1px solid var(--line); }
.vehicle-stats dt { color: var(--muted); font-size: 8px; line-height: 1.5; }
.vehicle-stats dd { margin: 7px 0 0; color: var(--green-950); font-size: 12px; font-weight: 800; }
.vehicle-stats .status-ok { color: var(--green-700); display: flex; align-items: center; gap: 6px; }
.status-ok span { width: 7px; height: 7px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.12); }

.maintenance-section { padding: 90px clamp(24px, 7vw, 110px) 86px; max-width: 1440px; margin: 0 auto; }
.section-heading, .history-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-heading h2, .history-header h2, .booking-copy h2 { margin: 0; color: var(--green-950); font-size: clamp(24px, 3vw, 34px); letter-spacing: -1.2px; }
.text-action { border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 800; padding: 12px 0; }
.text-action span { color: var(--green-950); margin-left: 5px; }
.maintenance-card { display: grid; grid-template-columns: 72px 1fr; gap: 22px; margin-top: 22px; padding: 28px; border: 1px solid #d9e7df; border-radius: 16px; background: linear-gradient(100deg, #edf7f1, #fff); }
.maintenance-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; color: var(--green-800); background: rgba(200,230,74,.58); }
.maintenance-icon svg { width: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.maintenance-main > p { margin: 1px 0 6px; color: var(--muted); font-size: 9px; }
.maintenance-main h3 { margin: 0; color: var(--green-950); font-size: 17px; }
.maintenance-targets { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 17px; }
.maintenance-targets span { display: flex; align-items: center; gap: 7px; color: #52615b; font-size: 9px; }
.maintenance-targets svg { width: 16px; fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linecap: round; }
.progress-track { height: 7px; border-radius: 10px; background: #dce7e1; overflow: hidden; margin: 20px 0 7px; }
.progress-track span { display: block; width: 64%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-700), #72a92d); }
.maintenance-main small { color: var(--muted); font-size: 8px; }
.history-header { margin-top: 64px; }
.history-count { color: var(--muted); font-size: 10px; }
.history-list { margin-top: 20px; display: grid; gap: 12px; }
.history-item { display: grid; grid-template-columns: 116px 1fr auto; gap: 24px; align-items: start; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 24px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.history-item:hover { transform: translateY(-2px); border-color: #bcd4c8; box-shadow: 0 10px 30px rgba(3,45,34,.07); }
.history-date { display: grid; gap: 5px; }
.history-date strong { color: var(--green-950); font-size: 11px; }
.history-date span { color: var(--muted); font-size: 9px; }
.history-work h3 { margin: 0 0 9px; color: var(--green-950); font-size: 13px; }
.history-work p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.history-ot { color: var(--green-700); background: var(--soft); border-radius: 999px; padding: 6px 9px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.empty-history { padding: 34px; text-align: center; color: var(--muted); background: white; border: 1px dashed var(--line); border-radius: 14px; font-size: 11px; }

.booking-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(460px, 1.2fr); gap: clamp(40px, 8vw, 110px); align-items: center; padding: 70px clamp(24px, 7vw, 110px); background: var(--green-950); color: white; }
.booking-copy h2 { color: white; font-size: clamp(28px, 4vw, 42px); }
.booking-copy > p { max-width: 510px; color: #c5d6d0; font-size: 12px; line-height: 1.7; }
.schedule { display: grid; gap: 8px; margin-top: 25px; color: #e9f1ee; font-size: 10px; }
.schedule span { display: flex; gap: 12px; }
.schedule b { color: var(--lime); min-width: 66px; }
.booking-form { padding: 26px 28px 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.07); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field.full { grid-column: 1 / -1; }
.booking-form label { color: #e3ece8; }
.booking-form input, .booking-form select, .booking-form textarea { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.booking-form select option { color: var(--ink); }
.booking-form input::-webkit-calendar-picker-indicator { filter: invert(1); }
.booking-form input::placeholder, .booking-form textarea::placeholder { color: #aebfba; }
.booking-form .light-button { width: auto; min-width: 240px; color: var(--green-950); background: var(--lime); box-shadow: none; }
.booking-form > small { display: block; color: #aebfba; font-size: 8px; margin-top: 10px; line-height: 1.5; }
.booking-error { color: #ffb4ab; }

footer { min-height: 66px; padding: 16px clamp(24px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); background: white; border-top: 1px solid var(--line); font-size: 9px; }
footer div { display: flex; gap: 15px; align-items: center; }
footer strong { color: var(--green-900); }
footer a { color: var(--green-700); font-weight: 700; text-decoration: none; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: min(400px, calc(100vw - 48px)); display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 16px; border-radius: 14px; color: var(--ink); background: white; box-shadow: 0 18px 60px rgba(0,0,0,.18); transform: translateY(130%); opacity: 0; transition: .35s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-950); background: var(--lime); border-radius: 50%; font-weight: 900; }
.toast strong { font-size: 11px; }
.toast p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.toast button { align-self: start; border: 0; background: transparent; color: var(--muted); font-size: 20px; }

.access-dialog { width: min(650px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: transparent; box-shadow: 0 30px 90px rgba(0,0,0,.32); overflow: auto; }
.access-dialog::backdrop { background: rgba(3,45,34,.76); backdrop-filter: blur(5px); }
.access-dialog-panel { position: relative; padding: 34px; background: #fff; }
.dialog-close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--muted); background: var(--soft); font-size: 24px; line-height: 1; }
.dialog-close:hover { color: var(--green-950); background: #e5eee9; }
.access-heading { display: flex; align-items: center; gap: 14px; padding-right: 42px; }
.access-heading p { margin: 0 0 5px; color: var(--green-700); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.access-heading h2 { margin: 0; color: var(--green-950); font-size: 25px; }
.access-intro { margin: 22px 0 4px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.access-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.access-field.full { grid-column: 1 / -1; }
.access-form label { margin-top: 17px; font-size: 13px; }
.access-form input { font-size: 15px; }
.access-security { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 13px 14px; border-radius: 11px; color: #45564f; background: var(--soft); font-size: 12px; line-height: 1.5; }
.access-security svg { flex: 0 0 20px; width: 20px; fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.access-error { min-height: 21px; margin: 11px 0 0; font-size: 12px; line-height: 1.45; }
.dialog-actions { display: grid; grid-template-columns: minmax(120px, .55fr) 1fr; gap: 12px; margin-top: 8px; }
.secondary-button { min-height: 50px; border: 1px solid #cbd9d2; border-radius: 10px; color: var(--green-800); background: #fff; font-size: 12px; font-weight: 800; }
.secondary-button:hover { border-color: var(--green-700); background: var(--soft); }

@media (max-width: 980px) {
  .login-view { grid-template-columns: 1fr; background: linear-gradient(180deg, var(--green-950) 0 51%, #eef5f1 51% 100%); gap: 54px; padding-top: 62px; }
  .login-card { justify-self: center; }
  .vehicle-card { grid-template-columns: 200px 1fr; }
  .vehicle-stats { grid-column: 1 / -1; }
  .vehicle-stats > div:first-child { border-left: 0; }
  .booking-section { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { height: 72px; padding: 0 18px; }
  .brand-mark { width: 38px; height: 43px; font-size: 12px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 7px; letter-spacing: 1.7px; }
  .secure-pill span, .logout-button span { display: none; }
  .login-view { min-height: 0; padding: 42px 18px 50px; gap: 46px; }
  .login-intro h1 { font-size: 37px; letter-spacing: -2px; }
  .login-intro p { font-size: 13px; margin: 19px 0 28px; }
  .feature-list { font-size: 11px; }
  .login-card { padding: 26px 21px; }
  .account-actions { grid-template-columns: 1fr; }
  .access-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 16px; }
  .access-dialog-panel { padding: 26px 18px 22px; }
  .access-heading h2 { font-size: 21px; }
  .access-intro { font-size: 13px; }
  .access-field-grid { grid-template-columns: 1fr; }
  .access-field.full { grid-column: auto; }
  .dialog-actions { grid-template-columns: 1fr; }
  .dialog-actions .secondary-button { order: 2; }
  .welcome-section { padding: 40px 18px 64px; }
  .welcome-copy { display: block; }
  .welcome-copy p { line-height: 1.6; }
  .vehicle-selector { float: none; width: 100%; margin: 26px 0 0; }
  .vehicle-card { transform: translateY(30px); grid-template-columns: 1fr; gap: 7px; padding: 18px; }
  .vehicle-visual { max-height: 138px; overflow: hidden; }
  .vehicle-visual svg { margin-top: -12px; }
  .vehicle-title { text-align: center; }
  .vehicle-stats { grid-template-columns: 1fr 1fr; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
  .vehicle-stats > div { padding: 4px 12px; }
  .vehicle-stats > div:first-child { border-left: 0; }
  .vehicle-stats > div:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; }
  .vehicle-stats .status-ok { justify-content: center; }
  .maintenance-section { padding: 78px 18px 58px; }
  .section-heading, .history-header { align-items: flex-start; }
  .maintenance-card { grid-template-columns: 1fr; padding: 21px; }
  .maintenance-icon { width: 50px; height: 50px; }
  .maintenance-targets { display: grid; gap: 10px; }
  .history-header { margin-top: 48px; }
  .history-count { max-width: 90px; text-align: right; line-height: 1.5; }
  .history-item { grid-template-columns: 1fr auto; gap: 12px; padding: 20px; }
  .history-work { grid-column: 1 / -1; grid-row: 2; }
  .history-ot { grid-column: 2; grid-row: 1; }
  .booking-section { padding: 55px 18px; gap: 30px; }
  .booking-form { padding: 20px 16px; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .booking-form .light-button { width: 100%; min-width: 0; }
  footer { align-items: flex-start; }
  footer div { display: grid; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
