/* ==========================================================================
   Kilometerheld — shared styles (landing + app)
   ========================================================================== */

:root {
  --green-950: #082b1e;
  --green-900: #0c3b2a;
  --green-800: #0e4d36;
  --green-700: #106043;
  --green-600: #127550;
  --green-500: #17946a;
  --green-100: #ddf2e8;
  --green-50:  #eef8f2;
  --amber:     #f2b632;
  --amber-dark:#c98f16;
  --bg:        #f6f8f7;
  --surface:   #ffffff;
  --ink:       #14251d;
  --muted:     #5b6f66;
  --line:      #e2eae5;
  --red:       #b3402f;
  --red-50:    #fdf0ed;
  --gray:      #8a9791;
  --shadow-sm: 0 1px 2px rgba(12, 59, 42, .06);
  --shadow-md: 0 6px 24px rgba(12, 59, 42, .10);
  --radius:    12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 4px 14px rgba(16, 96, 67, .25); }
.btn-primary:hover { background: var(--green-600); }
.btn-amber { background: var(--amber); color: var(--green-950); box-shadow: 0 4px 14px rgba(242, 182, 50, .35); }
.btn-amber:hover { background: #f8c554; }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--green-500); color: var(--green-700); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-800); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 8px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.badge-green { background: var(--green-100); color: var(--green-800); }
.badge-gray { background: #edf1ef; color: var(--muted); }
.badge-amber { background: #fdf3dd; color: var(--amber-dark); }
.badge-pro { background: linear-gradient(135deg, #f7c948, var(--amber)); color: var(--green-950); }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Landing page
   ========================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--green-900); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--green-700);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.nav-links a:hover { color: var(--green-700); text-decoration: none; }
.nav-cta { margin-left: 6px; }

.hero { padding: 76px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-eyebrow { margin-bottom: 18px; }
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; }
.hero h1 .accent { color: var(--green-600); }
.hero-sub { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-proof { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--muted); }
.hero-proof span::before { content: "✓"; color: var(--green-600); font-weight: 800; margin-right: 8px; }

/* App mockup in hero */
.mockup {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-md); padding: 20px; position: relative;
}
.mockup::before {
  content: ""; position: absolute; inset: -14px -14px auto; height: 40px;
  background: var(--green-100); border-radius: 18px; z-index: -1;
}
.mockup-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mockup-title { font-weight: 700; font-size: 14px; }
.mockup-month { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 8px; }
.mockup-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mockup-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mockup-kpi .k { font-size: 11.5px; color: var(--muted); }
.mockup-kpi .v { font-size: 19px; font-weight: 800; color: var(--green-800); }
.mockup-kpi .v small { font-size: 12px; font-weight: 600; color: var(--muted); }
.trip-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; font-size: 13px; }
.trip-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-biz { background: var(--green-500); } .dot-priv { background: var(--gray); }
.trip-row .route { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-row .km { font-weight: 700; color: var(--green-800); }
.mockup-cta { margin-top: 10px; }
.mockup-float {
  position: absolute; right: -18px; bottom: 46px;
  background: var(--green-900); color: #fff; border-radius: 12px; padding: 10px 14px;
  font-size: 12.5px; box-shadow: var(--shadow-md); max-width: 200px;
}
.mockup-float b { color: var(--amber); display: block; font-size: 15px; }

.section { padding: 84px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head h2 { font-size: 38px; font-weight: 800; margin-bottom: 14px; }
.section-head p { font-size: 17.5px; color: var(--muted); }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-600); margin-bottom: 12px; }

.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.compare-card { padding: 28px 24px; position: relative; }
.compare-card h3 { font-size: 19px; margin-bottom: 8px; }
.compare-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.compare-card .price-note { font-size: 13.5px; font-weight: 600; color: var(--green-800); background: var(--green-50); border-radius: 8px; padding: 8px 12px; }
.compare-card.bad .price-note { color: var(--red); background: var(--red-50); }
.compare-card.winner { border-color: var(--green-500); box-shadow: var(--shadow-md); }
.winner-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color: var(--green-950); font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .03em;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px 24px; }
.step-num {
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-700); color: #fff;
  font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }
.step .time { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--green-600); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px 24px; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--green-100);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px;
}
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

.pdf-showcase { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pdf-doc {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 28px 26px; font-size: 13px; position: relative;
}
.pdf-doc::after {
  content: "PDF"; position: absolute; top: -12px; right: 18px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 11px;
  padding: 3px 9px; border-radius: 6px;
}
.pdf-doc h4 { text-align: center; font-size: 15px; margin-bottom: 2px; letter-spacing: .04em; text-transform: uppercase; }
.pdf-doc .pdf-sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.pdf-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12px; margin-bottom: 12px; border-bottom: 1.5px solid var(--ink); padding-bottom: 8px; }
.pdf-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.pdf-table th { text-align: left; border-bottom: 1px solid var(--ink); padding: 4px 6px; font-size: 10.5px; }
.pdf-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.pdf-total { display: flex; justify-content: space-between; margin-top: 12px; font-weight: 700; font-size: 13px; }
.pdf-note { margin-top: 18px; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.pdf-showcase-body h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.pdf-showcase-body p { color: var(--muted); font-size: 16px; }
.pdf-bullets { list-style: none; padding: 0; margin: 18px 0 26px; }
.pdf-bullets li { padding: 5px 0; font-size: 15px; }
.pdf-bullets li::before { content: "✓"; color: var(--green-600); font-weight: 800; margin-right: 10px; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card { padding: 32px 26px; display: flex; flex-direction: column; position: relative; }
.price-card.popular { border-color: var(--green-500); box-shadow: var(--shadow-md); }
.price-card h3 { font-size: 19px; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: var(--green-800); }
.price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.price-sub { font-size: 13px; color: var(--muted); min-height: 20px; }
.price-features { list-style: none; padding: 0; margin: 20px 0 26px; flex: 1; }
.price-features li { padding: 7px 0; font-size: 14.5px; border-bottom: 1px dashed var(--line); }
.price-features li:last-child { border-bottom: 0; }
.price-features li::before { content: "✓"; color: var(--green-600); font-weight: 800; margin-right: 10px; }
.price-features li.no::before { content: "–"; color: var(--gray); font-weight: 700; margin-right: 10px; }
.price-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card { padding: 26px 24px; }
.quote-card .stars { color: var(--amber); letter-spacing: 2px; margin-bottom: 10px; font-size: 15px; }
.quote-card blockquote { margin: 0 0 16px; font-size: 15px; color: var(--ink); }
.quote-card figcaption { font-size: 13.5px; color: var(--muted); font-weight: 600; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 12px; padding: 0 22px; }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 15.5px; padding: 18px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::after { content: "+"; font-size: 22px; color: var(--green-600); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 14.5px; padding-bottom: 18px; margin: 0; }

.final-cta {
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
  color: #fff; text-align: center; padding: 84px 0; border-radius: 0;
}
.final-cta h2 { font-size: 38px; font-weight: 800; margin-bottom: 12px; }
.final-cta p { color: #cfe6da; font-size: 17px; margin-bottom: 28px; }
.final-cta .fine { font-size: 13px; color: #9fc7b4; margin-top: 16px; }

.site-footer { background: var(--green-950); color: #b8ccc2; padding: 56px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer h5 { color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b8ccc2; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; }

/* ==========================================================================
   App
   ========================================================================== */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-sidebar {
  width: 224px; background: var(--green-950); color: #cfe0d7;
  display: flex; flex-direction: column; padding: 20px 14px; flex-shrink: 0;
}
.app-sidebar .logo { color: #fff; padding: 0 10px; margin-bottom: 26px; }
.app-sidebar nav a {
  display: flex; align-items: center; gap: 11px; color: #b9cdc3;
  padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 14.5px; margin-bottom: 4px;
}
.app-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.app-sidebar nav a.active { background: var(--green-700); color: #fff; }
.app-sidebar .side-foot { margin-top: auto; padding: 12px; font-size: 12px; color: #7fa392; border-top: 1px solid rgba(255,255,255,.1); }
.side-plan { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 10px 12px; background: rgba(255,255,255,.06); border-radius: 10px; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  background: #fff; border-bottom: 1px solid var(--line); padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav button {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 34px; height: 34px;
  cursor: pointer; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
}
.month-nav button:hover { border-color: var(--green-500); color: var(--green-700); }
.month-label { font-weight: 800; font-size: 17px; min-width: 150px; text-align: center; }
.app-content { padding: 28px; max-width: 1060px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 28px; font-weight: 800; color: var(--green-800); margin-top: 4px; }
.kpi .v small { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 20px; }
.panel { padding: 20px; }
.panel h3 { font-size: 15.5px; margin-bottom: 14px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.chart-bars { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; height: 122px; border-radius: 5px; overflow: hidden; }
.chart-seg-biz { background: var(--green-500); }
.chart-seg-priv { background: #c9d4cf; }
.chart-col .lbl { font-size: 10.5px; color: var(--muted); }
.chart-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.savings-row { display: flex; gap: 14px; flex-wrap: wrap; }
.savings-box { flex: 1; min-width: 210px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.savings-box .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.savings-box .v { font-size: 21px; font-weight: 800; color: var(--green-800); margin-top: 2px; }
.savings-box .v small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.savings-box .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.banner {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid #f0dcb4; background: #fdf7e7; border-radius: 12px;
  padding: 14px 16px; font-size: 14px; margin-bottom: 20px;
}
.banner .banner-ico { font-size: 20px; }
.banner strong { display: block; }
.banner p { margin: 0; color: #7a6230; }
.usage-meter { height: 8px; background: var(--green-100); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.usage-meter > div { height: 100%; background: var(--green-600); border-radius: 99px; }

/* Trip list */
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-pill {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.filter-pill.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.search-input {
  margin-left: auto; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px;
  font: inherit; font-size: 13.5px; min-width: 200px;
}
.trip-list { display: flex; flex-direction: column; gap: 8px; }
.trip-item {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px;
}
.trip-date { text-align: center; min-width: 62px; border-right: 1px solid var(--line); padding-right: 14px; }
.trip-date .d { font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.trip-date .n { font-size: 21px; font-weight: 800; color: var(--green-800); line-height: 1.1; }
.trip-body { flex: 1; min-width: 0; }
.trip-route { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-route .arrow { color: var(--muted); font-weight: 400; margin: 0 7px; }
.trip-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-km { font-weight: 800; font-size: 16px; color: var(--green-800); white-space: nowrap; }
.trip-km small { font-size: 11.5px; color: var(--muted); font-weight: 600; display: block; }
.trip-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-size: 15px; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--green-50); color: var(--green-700); border-color: var(--line); }
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .big { font-size: 42px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* Vehicles */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vehicle-card { padding: 20px; }
.vehicle-card .veh-ico {
  width: 42px; height: 42px; border-radius: 10px; background: var(--green-100);
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px;
}
.vehicle-card h3 { font-size: 16px; margin-bottom: 2px; }
.vehicle-card .plate {
  display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 13px;
  border: 1.5px solid var(--ink); border-radius: 5px; padding: 2px 8px; letter-spacing: .08em; margin-bottom: 12px;
}
.vehicle-card .veh-stats { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.add-card { border: 2px dashed var(--line); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14.5px; min-height: 170px; }
.add-card:hover { border-color: var(--green-500); color: var(--green-700); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input, .field select {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14.5px;
  background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--green-100); border-color: var(--green-500); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.radio-row { display: flex; gap: 10px; }
.radio-pill { flex: 1; }
.radio-pill input { display: none; }
.radio-pill span {
  display: block; text-align: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 9px;
  font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted);
}
.radio-pill input:checked + span.biz { border-color: var(--green-600); background: var(--green-50); color: var(--green-800); }
.radio-pill input:checked + span.priv { border-color: var(--gray); background: #f2f4f3; color: var(--ink); }
.km-preview { background: var(--green-50); border-radius: 9px; padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--green-800); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 30, 21, .55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(8,30,21,.35);
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 28px;
}
.modal h2 { font-size: 21px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal-close { float: right; }
.upgrade-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.upgrade-plan { border: 1.5px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; }
.upgrade-plan.selected { border-color: var(--green-600); background: var(--green-50); }
.upgrade-plan .plan-name { font-weight: 800; font-size: 15px; }
.upgrade-plan .plan-price { font-size: 24px; font-weight: 800; color: var(--green-800); margin: 6px 0 2px; }
.upgrade-plan .plan-price small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.upgrade-plan .plan-desc { font-size: 12px; color: var(--muted); }
.upgrade-save { background: var(--amber); color: var(--green-950); font-size: 11.5px; font-weight: 800; border-radius: 6px; padding: 2px 8px; margin-left: 6px; }
.pay-note { font-size: 12px; color: var(--muted); background: #f6f8f7; border-radius: 8px; padding: 10px 12px; margin-top: 14px; }

/* Toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--green-950); color: #fff; border-radius: 12px; padding: 13px 18px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); max-width: 340px;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Legal pages */
.legal { max-width: 760px; margin: 48px auto 80px; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.legal h2 { font-size: 19px; margin: 28px 0 10px; }
.legal p, .legal li { font-size: 14.5px; color: #33443c; }
.legal .placeholder-box { background: #fdf7e7; border: 1px solid #f0dcb4; border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #7a6230; margin: 18px 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .pdf-showcase { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .compare-grid, .steps, .features-grid, .testimonials, .pricing-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .app-sidebar { width: 70px; }
  .app-sidebar .logo span:not(.logo-mark), .app-sidebar nav a span, .side-foot, .side-plan span { display: none; }
  .app-sidebar nav a { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-input { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .nav-links a { display: none; }
  .nav-links .nav-cta { display: inline-flex; }
  .hero { padding: 48px 0; }
  .section { padding: 56px 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   iOS / PWA — safe areas, dynamic viewport, touch ergonomics
   ========================================================================== */

/* Safari's collapsible URL bar makes 100vh taller than the visible area;
   use the dynamic viewport unit where supported (falls back to vh). */
.app-shell { min-height: 100vh; min-height: 100dvh; }
.modal { max-height: 92vh; max-height: 92dvh; }

/* Notch & home-indicator safe areas (standalone / full-screen PWA). */
.site-nav { padding-top: env(safe-area-inset-top); }
.hero { padding-top: calc(76px + env(safe-area-inset-top)); }
.app-topbar { padding-top: calc(12px + env(safe-area-inset-top)); }
.app-sidebar { padding-top: calc(20px + env(safe-area-inset-top)); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.app-content { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.modal-backdrop { padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); }
.modal { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.toast-wrap { bottom: calc(22px + env(safe-area-inset-bottom)); right: calc(22px + env(safe-area-inset-right)); }
.final-cta { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.site-footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* Prevent iOS Safari auto-zoom on focus: inputs < 16px trigger the zoom. */
@media (max-width: 960px), (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}

/* Bigger, thumb-friendly touch targets on touch devices (Apple HIG ≈ 44px). */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; font-size: 17px; }
  .month-nav button { width: 44px; height: 44px; }
  .btn-sm { min-height: 40px; }
  .app-sidebar nav a { padding: 13px 12px; }
  .filter-pill { padding: 9px 16px; }
  .trip-actions { gap: 6px; }
  .modal-close { width: 44px; height: 44px; }
}
