/* ==========================================================================
   Libukeng Lelapa — Family Fleet
   Mobile-first consumer UI built on the Libukeng palette.
   ========================================================================== */

:root {
  --blue: #2f80ed;
  --blue-dark: #1e63c4;
  --blue-soft: #eaf4ff;
  --blue-wash: #f4f9ff;
  --orange: #f28a00;
  --orange-dark: #d97700;
  --orange-soft: #fff3e2;
  --navy: #12233f;
  --text: #1f2937;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --green: #198754;
  --green-soft: #e8f5ee;
  --red: #dc3545;
  --red-soft: #fdecee;
  --amber: #b7791f;
  --amber-soft: #fff7e6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sidebar: 248px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 360px at 90% -10%, rgba(47, 128, 237, 0.11), transparent 60%),
    radial-gradient(700px 300px at 10% 0%, rgba(242, 138, 0, 0.07), transparent 55%),
    var(--bg);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--navy);
}

h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.tiny {
  font-size: 11.5px;
}

.strong {
  font-weight: 700;
}

.center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.4);
  outline-offset: 2px;
}

::selection {
  background: var(--blue-soft);
}

/* ==========================================================================
   App shell
   ========================================================================== */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px;
  color: var(--navy);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(47, 128, 237, 0.28);
  flex: none;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand-name {
  --brand-large: 19.4px;   /* Libukeng */
  --brand-small: 12px;     /* Lelapa — 19.4 / 12 ≈ golden ratio */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1;
}

.brand-name .brand-lelapa {
  color: var(--orange);
  font-size: var(--brand-small);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: none;
}

.brand-name .brand-libukeng {
  color: var(--blue);
  font-size: var(--brand-large);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 1px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 9px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  color: #475569;
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: 0.85;
}

.nav-item:hover {
  background: #f8fafc;
  color: var(--navy);
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-color: #d5e9ff;
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item .nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 10.5px;
  display: grid;
  place-items: center;
}

.sidebar-spacer {
  flex: 1;
}

.side-card {
  background: linear-gradient(145deg, #12233f, #1b3b66);
  color: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(18, 35, 63, 0.2);
}

.side-card .pill {
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
}

.side-card h4 {
  margin: 9px 0 5px;
  font-size: 14px;
}

.side-card p {
  font-size: 11.5px;
  line-height: 1.45;
  color: #b9c8dd;
}

.side-card .button {
  margin-top: 12px;
  width: 100%;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.main-wrap {
  margin-left: var(--sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  padding: 0 clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(246, 248, 251, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 15;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-context {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid #d5e9ff;
  background: var(--blue-soft);
  color: var(--blue-dark);
  white-space: nowrap;
}

.plan-pill.plus {
  background: var(--orange-soft);
  border-color: #ffe0b3;
  color: #9a5b00;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #dbeafe;
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}

.main {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 34px) 56px;
  flex: 1;
}

.page {
  animation: pageIn 260ms ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.page-head-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 7px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

.page-head .button {
  margin-left: auto;
  flex: none;
}

.page-sub {
  margin-top: 7px;
  color: var(--muted);
  max-width: 680px;
  font-size: 13.5px;
}

.section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 17px;
}

.section-head .button {
  margin-left: auto;
}

/* ==========================================================================
   Buttons, pills, badges
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 15px;
  background: var(--blue);
  color: #fff;
  font-weight: 750;
  font-size: 13px;
  line-height: 1.2;
  box-shadow: 0 6px 16px rgba(47, 128, 237, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(47, 128, 237, 0.22);
}

.button:active {
  transform: translateY(0);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button.secondary {
  background: var(--navy);
  box-shadow: 0 6px 16px rgba(18, 35, 63, 0.16);
}

.button.secondary:hover {
  background: #1c3459;
}

.button.orange {
  background: var(--orange);
  box-shadow: 0 6px 16px rgba(242, 138, 0, 0.2);
}

.button.orange:hover {
  background: var(--orange-dark);
}

.button.soft {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: none;
  border-color: #d5e9ff;
}

.button.soft:hover {
  background: #dceeff;
}

.button.ghost {
  background: transparent;
  color: var(--navy);
  box-shadow: none;
  border-color: var(--border);
}

.button.ghost:hover {
  background: #f8fafc;
}

.button.danger {
  background: var(--red-soft);
  color: var(--red);
  box-shadow: none;
  border-color: #fbd5da;
}

.button.danger:hover {
  background: #fbdde1;
}

.button.small {
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 10px;
}

.button.block {
  width: 100%;
}

.button.icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 11px;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill.blue {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.orange {
  background: var(--orange-soft);
  color: #9a5b00;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   Hero and cards
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 28px;
  background:
    radial-gradient(500px 300px at 95% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(135deg, #12233f 0%, #1b3b66 58%, #24538f 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(18, 35, 63, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 22px;
  align-items: center;
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  right: -120px;
  bottom: -150px;
  border: 32px solid rgba(242, 138, 0, 0.16);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero .pill {
  background: rgba(255, 255, 255, 0.13);
  color: #dbeafe;
}

.hero h1 {
  color: #fff;
  margin-top: 11px;
  max-width: 620px;
}

.hero p {
  color: #b9c8dd;
  max-width: 560px;
  margin-top: 9px;
  font-size: 13.5px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero .button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

.hero .button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art svg {
  width: 100%;
  max-width: 280px;
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, 0.22));
}

.hero-stats {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-stat {
  min-width: 92px;
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 10.5px;
  color: #b9c8dd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.card.pad-lg {
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.card-head h3 {
  font-size: 14px;
}

.card-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.card-head .button,
.card-head .pill {
  margin-left: auto;
  flex: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-label svg {
  width: 14px;
  height: 14px;
}

.metric-value {
  margin-top: 7px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.metric-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 13px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  color: var(--navy);
  font-weight: 700;
  font-size: 12px;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.quick-action:hover {
  border-color: #bcd8f8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quick-action .qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.quick-action:nth-child(2) .qa-icon {
  background: var(--orange-soft);
  color: #9a5b00;
}

.quick-action:nth-child(3) .qa-icon {
  background: var(--green-soft);
  color: var(--green);
}

.quick-action:nth-child(4) .qa-icon {
  background: #f3e8ff;
  color: #7e22ce;
}

.quick-action svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Cars
   ========================================================================== */

.car-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.car-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.car-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cfe4fb;
}

.car-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--car-color, var(--blue));
}

.car-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.car-visual {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--car-color, var(--blue)) 12%, white);
  color: var(--car-color, var(--blue));
  display: grid;
  place-items: center;
  flex: none;
}

.car-visual svg {
  width: 28px;
  height: 28px;
}

.car-title {
  min-width: 0;
}

.car-title h3 {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.car-title p {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.car-card .pill {
  margin-left: auto;
}

.car-meta {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
}

.car-meta div span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.car-meta div strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.car-card.add-car {
  border-style: dashed;
  background: linear-gradient(180deg, #fff, #f8fbff);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blue-dark);
  min-height: 188px;
  cursor: pointer;
}

.car-card.add-car::before {
  display: none;
}

.add-car-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px dashed #9dc7f5;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.add-car-icon svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Lists
   ========================================================================== */

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 150ms ease, background 150ms ease;
}

.list-item:hover {
  border-color: #cfe4fb;
  background: #fbfdff;
}

.list-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  flex: none;
}

.list-icon svg {
  width: 18px;
  height: 18px;
}

.list-icon.orange {
  background: var(--orange-soft);
  color: #9a5b00;
}

.list-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.list-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.list-main {
  min-width: 0;
  flex: 1;
}

.list-main h4 {
  font-size: 13px;
  font-weight: 750;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-main p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  text-align: right;
  flex: none;
}

.list-meta strong {
  display: block;
  font-size: 13px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.list-meta span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 2px;
}

.empty {
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
}

.empty h3 {
  font-size: 14px;
}

.empty p {
  color: var(--muted);
  font-size: 12px;
  max-width: 360px;
  margin: 5px auto 12px;
}

/* ==========================================================================
   Car detail / tabs
   ========================================================================== */

.car-hero {
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(400px 200px at 90% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(135deg, var(--car-color, #2f80ed), #12233f);
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
}

.car-hero-art {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  flex: none;
}

.car-hero-art svg {
  width: 50px;
  height: 50px;
}

.car-hero-copy {
  min-width: 0;
}

.car-hero-copy h1 {
  color: #fff;
  font-size: 26px;
}

.car-hero-copy p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
}

.car-hero-copy .pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.car-hero-stats {
  margin-left: auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.car-hero-stats span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.64);
  font-weight: 700;
}

.car-hero-stats strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 20px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 750;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab:hover {
  color: var(--navy);
}

.tab.active {
  color: var(--blue-dark);
  border-color: var(--blue);
}

/* ==========================================================================
   Progress / reports
   ========================================================================== */

.progress {
  height: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.progress.orange > span {
  background: var(--orange);
}

.progress.green > span {
  background: var(--green);
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.bar-row .bar-label {
  color: var(--muted);
  font-weight: 650;
}

.bar-row .bar-value {
  text-align: right;
  font-weight: 750;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar-row:nth-child(2) .bar-track > span {
  background: var(--orange);
}

.bar-row:nth-child(3) .bar-track > span {
  background: #7e22ce;
}

.bar-row:nth-child(4) .bar-track > span {
  background: var(--green);
}

.bar-row:nth-child(5) .bar-track > span {
  background: var(--red);
}

.insight {
  display: flex;
  gap: 11px;
  padding: 12px;
  border-radius: 14px;
  background: var(--blue-wash);
  border: 1px solid #d9ecff;
  color: #1e3a5f;
  font-size: 12px;
}

.insight svg {
  width: 18px;
  height: 18px;
  color: var(--blue-dark);
  flex: none;
  margin-top: 1px;
}

.insight.warn {
  background: var(--amber-soft);
  border-color: #ffe2b8;
  color: #6b4a12;
}

.insight.warn svg {
  color: var(--amber);
}

.insight.good {
  background: var(--green-soft);
  border-color: #cdebd9;
  color: #14532d;
}

.insight.good svg {
  color: var(--green);
}

/* ==========================================================================
   Plans / paywall
   ========================================================================== */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card.featured {
  border-color: #ffd18a;
  background:
    radial-gradient(300px 160px at 100% 0%, rgba(242, 138, 0, 0.1), transparent 70%),
    var(--surface);
  box-shadow: 0 16px 36px rgba(242, 138, 0, 0.1);
}

.plan-card.current {
  border-color: #b7d9ff;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.08);
}

.plan-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}

.plan-sub {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}

.plan-price {
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price strong {
  font-size: 30px;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.plan-price span {
  color: var(--muted);
  font-size: 11.5px;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #334155;
  font-size: 12px;
}

.plan-features svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: none;
  margin-top: 2px;
}

.plan-features li.off {
  color: var(--muted-2);
}

.plan-features li.off svg {
  color: var(--muted-2);
}

.plan-card .button {
  margin-top: auto;
}

.paywall {
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(400px 240px at 100% 0%, rgba(242, 138, 0, 0.16), transparent 65%),
    linear-gradient(135deg, #12233f, #1f3d68);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.paywall h2 {
  color: #fff;
  font-size: 22px;
}

.paywall p {
  color: #c4d2e6;
  font-size: 12.5px;
  margin-top: 6px;
  max-width: 460px;
}

.paywall-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0;
}

.paywall-price strong {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.paywall-price span {
  color: #b9c8dd;
  font-size: 11.5px;
}

.paywall .button {
  margin-right: 6px;
  margin-top: 5px;
}

.paywall .button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.paywall-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  margin: 14px 0 4px;
}

.paywall-list div {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: #dbe7f7;
  font-size: 11.5px;
}

.paywall-list svg {
  width: 14px;
  height: 14px;
  color: #8fd3a8;
  flex: none;
  margin-top: 2px;
}

.billing-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
}

.billing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}

.billing-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  font-weight: 800;
  color: var(--navy);
}

.billing-row span:first-child {
  color: var(--muted);
}

/* ==========================================================================
   Forms and modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 160ms ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheetIn 220ms ease both;
}

@keyframes sheetIn {
  from { transform: translateY(24px); opacity: 0.7; }
  to { transform: none; opacity: 1; }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 13px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  font-size: 18px;
}

.modal-head p {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 3px;
}

.modal-head .button {
  margin-left: auto;
  flex: none;
}

.modal-body {
  padding: 18px 20px 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  padding: 10px 11px;
  font-size: 13px;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.13);
}

.field textarea {
  min-height: 74px;
  resize: vertical;
}

.field .help {
  color: var(--muted);
  font-size: 10.5px;
}

.field .error {
  color: var(--red);
  font-size: 10.5px;
  font-weight: 650;
}

.form-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  gap: 2px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--muted);
}

.segmented button.active {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.switch-row:last-child {
  border-bottom: 0;
}

.switch-copy {
  flex: 1;
  min-width: 0;
}

.switch-copy strong {
  display: block;
  font-size: 12.5px;
  color: var(--navy);
}

.switch-copy span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  position: relative;
  flex: none;
  transition: background 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.switch.on {
  background: var(--blue);
  border-color: var(--blue);
}

.switch.on::after {
  transform: translateX(18px);
}

.switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 30px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--navy);
  color: #fff;
  border-radius: 13px;
  padding: 11px 13px;
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  line-height: 1.4;
  animation: toastIn 200ms ease both;
  pointer-events: auto;
}

.toast svg {
  width: 17px;
  height: 17px;
  color: #8fd3a8;
  flex: none;
  margin-top: 1px;
}

.toast.error svg {
  color: #ffb3bc;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Welcome / onboarding
   ========================================================================== */

.welcome {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(47, 128, 237, 0.14), transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(242, 138, 0, 0.1), transparent 55%),
    #f7f9fc;
}

.welcome-left {
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}

.welcome-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 28px;
}

.welcome-brand .brand-mark {
  width: 44px;
  height: 44px;
}

.welcome-brand .brand-lelapa {
  font-size: 13px;
}

.welcome-brand .brand-libukeng {
  font-size: 21px;
}

.welcome h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 680px;
}

.welcome h1 .accent {
  color: var(--blue);
}

.welcome-lede {
  margin-top: 18px;
  color: #475569;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.55;
  max-width: 590px;
}

.welcome-points {
  display: grid;
  gap: 10px;
  margin: 24px 0 28px;
  max-width: 560px;
}

.welcome-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #334155;
  font-size: 13px;
}

.welcome-point .point-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}

.welcome-point .point-check svg {
  width: 13px;
  height: 13px;
}

.welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.welcome-actions .button {
  padding: 12px 18px;
}

.welcome-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

.welcome-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.welcome-right::before {
  content: "";
  position: absolute;
  inset: 8% 5%;
  border-radius: 40px;
  background: linear-gradient(145deg, #eaf4ff, #fff);
  border: 1px solid #dbeafe;
  transform: rotate(-2deg);
}

.welcome-preview {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  background: #fff;
  border-radius: 30px;
  border: 1px solid var(--border);
  box-shadow: 0 40px 90px rgba(18, 35, 63, 0.18);
  padding: 18px;
  transform: rotate(1.5deg);
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
}

.preview-top strong {
  display: block;
  font-size: 12px;
  color: var(--navy);
}

.preview-top span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.preview-car {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(145deg, #12233f, #24538f);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.preview-car::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 24px solid rgba(242, 138, 0, 0.2);
}

.preview-car h3 {
  color: #fff;
  font-size: 16px;
}

.preview-car p {
  color: #b9c8dd;
  font-size: 10.5px;
  margin-top: 3px;
}

.preview-car-art {
  margin: 12px 0 4px;
  display: flex;
  justify-content: flex-end;
}

.preview-car-art svg {
  width: 120px;
  height: 60px;
  opacity: 0.95;
}

.preview-car-meta {
  display: flex;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.preview-car-meta span {
  display: block;
  color: #9db1ca;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.preview-car-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.preview-list {
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.preview-row .mini-icon {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: var(--orange-soft);
  color: #9a5b00;
  display: grid;
  place-items: center;
  flex: none;
}

.preview-row .mini-icon svg {
  width: 13px;
  height: 13px;
}

.preview-row strong {
  display: block;
  font-size: 10.5px;
  color: var(--navy);
}

.preview-row span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  margin-top: 2px;
}

.preview-row .mini-badge {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 999px;
  padding: 3px 6px;
}

.floating-note {
  position: absolute;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 750;
  color: var(--navy);
}

.floating-note .note-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
}

.floating-note svg {
  width: 14px;
  height: 14px;
}

.floating-note.one {
  left: 2%;
  bottom: 18%;
  transform: rotate(-3deg);
}

.floating-note.two {
  right: 1%;
  top: 15%;
  transform: rotate(3deg);
}

.welcome-foot {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10.5px;
}

.welcome-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.welcome-foot svg {
  width: 13px;
  height: 13px;
  color: var(--green);
}

/* ==========================================================================
   Profile / settings
   ========================================================================== */

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--blue), #1e63c4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  flex: none;
}

.profile-head h2 {
  font-size: 18px;
}

.profile-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

.member-copy {
  flex: 1;
  min-width: 0;
}

.member-copy strong {
  display: block;
  font-size: 12.5px;
  color: var(--navy);
}

.member-copy span {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 1px;
}

.member-row .pill {
  margin-left: auto;
}

.danger-zone {
  border: 1px solid #fbd5da;
  background: #fffafa;
  border-radius: 16px;
  padding: 14px;
}

.danger-zone h3 {
  color: var(--red);
  font-size: 13px;
}

.danger-zone p {
  color: var(--muted);
  font-size: 11.5px;
  margin: 3px 0 10px;
}

/* ==========================================================================
   Mobile navigation
   ========================================================================== */

.mobile-nav {
  display: none;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .grid-4,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }

  .car-hero {
    flex-wrap: wrap;
  }

  .car-hero-stats {
    margin-left: 0;
    width: 100%;
    padding-top: 4px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main-wrap {
    margin-left: 0;
  }

  .topbar {
    height: 62px;
    padding: 0 16px;
  }

  .topbar-title {
    display: none;
  }

  .main {
    padding: 18px 16px 92px;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
  }

  .mobile-nav-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    font-weight: 750;
    padding: 4px 8px;
    min-width: 52px;
  }

  .mobile-nav-item svg {
    width: 21px;
    height: 21px;
  }

  .mobile-nav-item.active {
    color: var(--blue-dark);
  }

  .mobile-nav-add {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid #fff;
    background: var(--orange);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(242, 138, 0, 0.35);
    margin-top: -22px;
  }

  .mobile-nav-add svg {
    width: 22px;
    height: 22px;
  }

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .grid-2,
  .grid-3,
  .plan-grid,
  .car-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .page-head .button {
    margin-left: 0;
  }

  .hero {
    padding: 22px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .modal {
    border-radius: 22px 22px 0 0;
  }

  .welcome {
    grid-template-columns: 1fr;
  }

  .welcome-left {
    padding: 28px 22px 12px;
  }

  .welcome-right {
    padding: 10px 22px 34px;
  }

  .welcome-preview {
    transform: none;
    max-width: 390px;
  }

  .floating-note {
    display: none;
  }

  .welcome h1 {
    font-size: clamp(34px, 10vw, 46px);
  }
}

@media (max-width: 560px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric {
    padding: 12px;
  }

  .metric-value {
    font-size: 19px;
  }

  .hero-stats {
    gap: 12px;
  }

  .hero-stat {
    min-width: 76px;
  }

  .hero-stat strong {
    font-size: 19px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .modal-body {
    padding: 15px 16px 22px;
  }

  .modal-head {
    padding: 15px 16px 11px;
  }

  .paywall-list {
    grid-template-columns: 1fr;
  }

  .car-hero {
    padding: 18px;
    gap: 13px;
  }

  .car-hero-art {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .car-hero-art svg {
    width: 36px;
    height: 36px;
  }

  .car-hero-copy h1 {
    font-size: 21px;
  }

  .tabs {
    margin-top: 14px;
  }

  .page-sub {
    font-size: 12.5px;
  }

  .top-actions .plan-pill {
    font-size: 10px;
    padding: 5px 8px;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .welcome-left {
    padding: 22px 18px 8px;
  }

  .welcome-right {
    padding: 8px 18px 30px;
  }

  .welcome h1 {
    font-size: 36px;
  }

  .welcome-lede {
    font-size: 13.5px;
  }

  .welcome-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .welcome-actions .button {
    width: 100%;
  }

  .welcome-foot {
    margin-top: 22px;
  }

  .toast-wrap {
    bottom: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.add-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.add-menu-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 750;
  font-size: 12.5px;
  color: var(--navy);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.add-menu-btn:hover {
  border-color: #bcd8f8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.add-menu-btn .qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue-dark);
  flex: none;
}

.add-menu-btn:nth-child(2) .qa-icon { background: var(--orange-soft); color: #9a5b00; }
.add-menu-btn:nth-child(3) .qa-icon { background: var(--green-soft); color: var(--green); }
.add-menu-btn:nth-child(4) .qa-icon { background: #f3e8ff; color: #7e22ce; }
.add-menu-btn:nth-child(5) .qa-icon { background: var(--red-soft); color: var(--red); }
.add-menu-btn:nth-child(6) .qa-icon { background: var(--amber-soft); color: var(--amber); }
.add-menu-btn svg { width: 18px; height: 18px; }

.form-error {
  border: 1px solid #fbd5da;
  background: #fff5f6;
  color: var(--red);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11.5px;
  font-weight: 650;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px dashed var(--border-strong);
  background: #fbfdff;
  border-radius: 11px;
  padding: 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.attachment-row svg { width: 17px; height: 17px; color: var(--blue-dark); flex: none; }

@media (max-width: 560px) {
  .add-menu-grid { grid-template-columns: 1fr; }
}

.topbar .brand.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .topbar .brand.mobile-only {
    display: flex;
  }
}

.plan-pill svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 720px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
  .modal {
    border-radius: 24px;
  }
}

.car-visual {
  background: #eaf4ff;
  background: color-mix(in srgb, var(--car-color, var(--blue)) 12%, white);
}

.photo-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px dashed var(--border-strong);
  background: #fbfdff;
  border-radius: 13px;
  padding: 10px;
}

.photo-preview {
  width: 96px;
  height: 60px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border: 1px solid #d5e9ff;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview svg {
  width: 24px;
  height: 24px;
}

.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.photo-button {
  cursor: pointer;
}

.photo-button input {
  display: none;
}

.car-photo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  flex: none;
  border: 1px solid #d5e9ff;
  background: #eaf4ff;
}

.car-hero-photo {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  object-fit: cover;
  flex: none;
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  background: rgba(255,255,255,.12);
}

@media (max-width: 560px) {
  .photo-field {
    flex-direction: column;
  }
  .car-hero-photo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .mobile-nav-item {
    min-width: 44px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 8.5px;
  }
  .mobile-nav-add {
    width: 44px;
    height: 44px;
  }
}

.boot-fallback {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--navy);
  background: var(--bg);
  font-family: var(--font);
}

.boot-fallback strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.boot-fallback span {
  color: var(--muted);
  font-size: 12px;
}

.boot-error {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 999;
  background: #fdecee;
  color: #9f1c2b;
  border-bottom: 1px solid #f5bcc4;
  padding: 12px 16px;
  font: 600 12px/1.4 var(--font);
  text-align: center;
}

/* Mobile overflow guards */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.main-wrap,
.main,
.page,
.section,
.card,
.card-head,
.grid-2,
.grid-3,
.grid-4,
.metric-grid,
.car-grid,
.plan-grid,
.list,
.list-item,
.switch-row,
.switch-copy {
  min-width: 0;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.metric-grid > *,
.car-grid > *,
.plan-grid > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .plan-grid,
  .car-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-nav {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
}

.card-head {
  flex-wrap: wrap;
}

.card-head .button,
.card-head .pill {
  flex: none;
}

.list-main,
.list-meta {
  min-width: 0;
}

.list-main p {
  min-width: 0;
}

@media (max-width: 900px) {
  .topbar .brand-name {
    --brand-large: 17.8px;
    --brand-small: 11px;
  }
}

/* Account sign-in */
.auth-page {
  display: block;
  min-height: 100vh;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
  padding-top: clamp(48px, 12vh, 120px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 12px;
}

.field-label {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: 3px solid rgba(47, 128, 237, 0.22);
  border-color: var(--blue);
}

.auth-form .button {
  margin-top: 4px;
}

.auth-form .button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.auth-back {
  align-self: flex-start;
}

.auth-hint {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

/* intl-tel-input: keep the widget inside the existing field design */
.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 112px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
.phone-row .iti { flex: 1 1 auto; min-width: 0; width: 100%; }
.iti { width: 100%; }
.iti__country-list { max-height: 260px; }
.iti__selected-flag { border-radius: 12px 0 0 12px; padding: 0 8px 0 10px; }
.iti--separate-dial-code .iti__selected-dial-code { font-size: 15px; }
.phone-row select[hidden] { display: none; }
/* intl-tel-input: our .auth-form input padding was overriding the search icon inset */
.iti .iti__search-input { padding-left: 36px; }
.iti .iti__country-list { border-radius: 12px; }
.iti .iti__country { padding: 7px 10px; }