@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --ink: #1C2126;
  --ink-soft: #676879;
  --paper: #F6F7FB;
  --panel: #FFFFFF;
  --line: #E9EBF2;

  /* teal (primary) + white, brand-matched to the official Renault Kwid proposal document */
  --teal: #0F7C86;
  --teal-deep: #0A4A50;
  --gold: #17A2AE;
  --gold-soft: #E3F5F6;

  --danger: #E2445C;
  --danger-soft: #FDE4E8;
  --ok: #00C875;
  --ok-soft: #DBF7EC;
  --wait: #FDAB3D;
  --wait-soft: #FFF1DE;

  /* monday.com-style saturated status colors, used for solid pills / group bars */
  --m-green: #00C875;
  --m-orange: #FDAB3D;
  --m-red: #E2445C;
  --m-grey: #9AA3AC;
  --m-blue: #0073EA;

  /* radius scale - noticeably larger / softer than the old 8-10px flat-card look */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;

  /* layered, low-contrast "ambient" shadows instead of one hard drop shadow */
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.05), 0 12px 28px rgba(16, 24, 40, 0.04);
  --shadow-lift: 0 4px 10px rgba(16, 24, 40, 0.06), 0 16px 36px rgba(16, 24, 40, 0.10);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 124, 134, 0.06), transparent 40%),
    radial-gradient(circle at 100% 12%, rgba(23, 162, 174, 0.05), transparent 42%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--gold-soft); color: var(--teal-deep); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, .brand {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

a { color: var(--teal); }

.mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 0.85em; }

button, .btn {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.7rem 1.3rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
button:active { transform: translateY(1px) scale(0.99); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(15,124,134,0.18), 0 6px 16px rgba(15,124,134,0.22); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,124,134,0.2), 0 10px 24px rgba(15,124,134,0.28); }
.btn-gold { background: linear-gradient(135deg, var(--teal), var(--gold)); color: #fff; box-shadow: 0 2px 6px rgba(15,124,134,0.25), 0 10px 24px rgba(15,124,134,0.28); }
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,124,134,0.28), 0 14px 30px rgba(15,124,134,0.32); }
.btn-ghost { background: #fff; color: var(--teal); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); border-color: #CBD1E0; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 4px 12px rgba(226,68,92,0.22); }
.btn-danger:hover { filter: brightness(1.06); transform: translateY(-2px); }
.btn-ok { background: var(--ok); color: #fff; box-shadow: 0 4px 12px rgba(0,200,117,0.22); }
.btn-ok:hover { filter: brightness(1.06); transform: translateY(-2px); }
button[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.icon { width: 1em; height: 1em; flex: none; }

input, select, textarea {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  padding: 0.68rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #C6CCE0; }
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 124, 134, 0.12);
  outline: none;
}
input:disabled, select:disabled, textarea:disabled { background: #F6F7FB; color: var(--ink-soft); }
label { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 0.4rem; letter-spacing: 0.01em; }

/* Fixed-value field (e.g. Cover, which is always Comprehensive on this scheme) - looks like
   the other inputs but isn't editable, since there's nothing for the client to choose here. */
.static-field {
  font-size: 0.92rem; padding: 0.68rem 0.85rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #F6F7FB; color: var(--ink-soft);
}

/* Two tick-boxes standing in for a Yes/No dropdown - clearer for a client to scan than a
   select with only two options. Mutually exclusive (wired in client.js): ticking one
   un-ticks the other, and keeps the paired hidden input in sync for form submission. */
.tick-choice { display: flex; gap: 1.2rem; padding: 0.68rem 0.2rem; }
.tick-option { display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; font-weight: 400; color: var(--ink); margin-bottom: 0; cursor: pointer; }
.tick-option input[type="checkbox"] { width: 1.1rem; height: 1.1rem; padding: 0; flex-shrink: 0; cursor: pointer; accent-color: var(--teal); }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
@media (max-width: 860px) { .auth-shell { grid-template-columns: 1fr; } }

.auth-side {
  background:
    radial-gradient(circle at 85% 8%, rgba(23,162,174,0.55), transparent 45%),
    radial-gradient(circle at 8% 92%, rgba(255,255,255,0.08), transparent 40%),
    linear-gradient(160deg, var(--teal-deep), var(--teal) 70%);
  color: #EAF7F7;
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 860px) { .auth-side { padding: 2.6rem 1.6rem; } }
@media (max-width: 480px) { .auth-side { padding: 2rem 1.2rem; } .auth-side .pitch h2 { font-size: 1.6rem; } }
.auth-side .top-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.3rem; }
.auth-side .brand { color: #fff; font-size: 1.5rem; margin: 0; }
.auth-side .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: var(--gold-soft); font-weight: 600; margin: 0 0 0.2rem; }
.auth-side .pitch h2 { color: #fff; font-size: 2.1rem; line-height: 1.2; margin: 1rem 0 0.8rem; }
.auth-side .pitch p { color: #D6D8FA; font-size: 0.98rem; line-height: 1.55; max-width: 34ch; }
.ledger { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.5rem; }
.ledger-step { display: flex; gap: 0.8rem; align-items: baseline; }
.ledger-step .num { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--gold); font-size: 0.85rem; }
.ledger-step .txt { color: #EAEBFC; font-size: 0.9rem; }

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeUp 0.4s var(--ease);
}
@media (max-width: 480px) { .auth-main { padding: 1.5rem 1.1rem; } }
.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-card h1 { font-size: 1.75rem; margin-bottom: 0.2rem; }
.auth-card .sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.9rem; }
.auth-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(15,124,134,0.4), 0 1px 0 rgba(255,255,255,0.3) inset;
  margin-bottom: 1.5rem;
}
.field { margin-bottom: 1rem; }
.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}
.form-error.show { display: block; }
.form-notice {
  background: var(--gold-soft);
  color: var(--teal-deep);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.auth-card .switch { margin-top: 1.4rem; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- App shell (dashboards) ---------- */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
@media (max-width: 780px) { .app-shell { grid-template-columns: 1fr; } }

/* ---------- mobile top bar + off-canvas nav drawer ---------- */
.mobile-topbar { display: none; }
@media (max-width: 780px) {
  .mobile-topbar {
    display: flex; align-items: center; gap: 0.85rem;
    position: sticky; top: 0; z-index: 45;
    background: var(--teal-deep); color: #fff;
    padding: 0.85rem 1.1rem;
  }
  .mobile-topbar .hamburger-btn {
    background: rgba(255,255,255,0.14); border: none; color: #fff;
    width: 36px; height: 36px; border-radius: 8px; flex: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .mobile-topbar .hamburger-btn:hover { background: rgba(255,255,255,0.22); }
  .mobile-topbar-brand { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.95rem; }

  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 260px; max-width: 82vw;
    transform: translateX(-100%); transition: transform 0.22s var(--ease);
    z-index: 70; box-shadow: 0 0 40px rgba(0,0,0,0.35);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(6, 20, 22, 0.5); z-index: 60;
  }
  .sidebar-backdrop.show { display: block; }
}

.sidebar {
  background: linear-gradient(195deg, var(--teal-deep), #072A2E 80%);
  color: #E3F6F5;
  padding: 1.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 1px 0 0 rgba(255,255,255,0.04) inset, 4px 0 24px rgba(4, 18, 20, 0.18);
}
.sidebar-top { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.35rem; }
.mark {
  width: 58px; height: 38px; border-radius: 10px; flex: none;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(15,124,134,0.35), 0 1px 0 rgba(255,255,255,0.25) inset;
  padding: 4px;
}
.mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sidebar .brand { color: #fff; font-size: 1.08rem; margin: 0; line-height: 1.15; }
.sidebar .role-tag {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold); font-weight: 700; margin: 0 0 2rem;
  padding-left: 2.85rem;
}
.sidebar .who {
  font-size: 0.82rem; color: #B4B7E6; margin-bottom: 2rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 0.8rem 0.9rem;
  backdrop-filter: blur(6px);
}
.sidebar .who strong { color: #fff; display: block; font-size: 0.95rem; margin-top: 0.1rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  color: #C9CBF2; text-decoration: none; font-size: 0.88rem; font-weight: 500;
  padding: 0.66rem 0.8rem; border-radius: var(--radius-sm);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  position: relative;
}
.nav-item .icon { opacity: 0.85; transition: opacity 0.18s ease; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(15,124,134,0.55), rgba(23,162,174,0.28));
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.nav-item.active .icon { color: var(--gold); opacity: 1; }
@keyframes navItemNudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}
.nav-item-nudge { animation: navItemNudge 0.3s ease; }
.sidebar-spacer { flex: 1; }
.logout-link {
  color: #C9CBF2; font-size: 0.85rem; text-decoration: none; border: 1px solid rgba(255,255,255,0.14);
  padding: 0.65rem 0.8rem; border-radius: var(--radius-sm); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.logout-link:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); }

.main {
  padding: 2.6rem 3rem 4rem;
  max-width: 1020px;
  animation: fadeUp 0.35s var(--ease);
}
.main.main-wide { max-width: 1440px; }
@media (max-width: 780px) { .main { padding: 1.4rem; } }
@media (max-width: 480px) { .main { padding: 1rem; } }

/* ---------- topbar greeting ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--ink-soft); font-weight: 600;
  margin-bottom: 1.5rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.topbar #greeting { color: var(--ink); font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.topbar-date { font-weight: 500; color: var(--ink-soft); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }

/* ---------- global topbar search (leads + claims + tickets) ---------- */
.topbar-search { position: relative; flex: 0 1 320px; margin: 0 1rem; }
.topbar-search input {
  width: 100%; padding: 0.5rem 0.85rem; font-size: 0.85rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
}
.topbar-search input:focus { background: #fff; }
.topbar-search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; width: 100%; min-width: 320px;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(16,24,40,0.16), 0 4px 12px rgba(16,24,40,0.08);
  z-index: 70; max-height: 380px; overflow-y: auto; padding: 0.4rem 0;
}
.global-search-group {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); padding: 0.5rem 0.9rem 0.25rem;
}
.global-search-row {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.9rem;
  text-decoration: none; color: inherit; font-size: 0.85rem;
}
.global-search-row:hover { background: var(--paper); }
.global-search-row-title { font-weight: 600; color: var(--ink); }
.global-search-row-sub { font-size: 0.75rem; color: var(--ink-soft); }
.global-search-empty { padding: 0.7rem 0.9rem; font-size: 0.82rem; color: var(--ink-soft); }

.notif-bell-wrap { position: relative; }
.notif-bell-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-soft); cursor: pointer; padding: 0;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow-soft);
}
.notif-bell-btn:hover { background: var(--bg-soft, #f5f5f7); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.notif-bell-btn .icon { width: 17px; height: 17px; }
.notif-bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: var(--m-red); color: #fff; font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1; border: 2px solid var(--panel);
}
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-width: calc(100vw - 2rem); max-height: 380px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(16,24,40,0.16), 0 4px 12px rgba(16,24,40,0.08);
  z-index: 60; overflow: hidden; display: flex; flex-direction: column;
  animation: fadeUp 0.18s var(--ease);
}
@media (max-width: 480px) {
  .notif-dropdown { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-width: none; border-radius: 16px 16px 0 0; }
}
.notif-dropdown-head {
  padding: 0.8rem 1rem; font-weight: 700; font-size: 0.85rem; border-bottom: 1px solid var(--line);
}
.notif-list { overflow-y: auto; max-height: 320px; }
.notif-item {
  display: block; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; transition: background 0.12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-soft, #f5f5f7); }
.notif-item.unread { background: rgba(255, 196, 61, 0.08); }
.notif-item-title { font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.notif-item-body { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.15rem; }
.notif-item-time { font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.25rem; }

/* Wrapping row that holds all the small status chips under a lead's name/email, so they get
   their own line and never fight the name text for space on narrow boards. */
.name-cell-info { min-width: 0; }
.name-badges { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }

/* One shared geometry for every soft-tint status chip in the app - aging/renewal/SLA badges,
   the excess "High risk" flag, and the consent Reviewed/Not Reviewed badges all used to carry
   their own near-duplicate padding/radius/font rules that had quietly drifted apart. Colors
   still vary per meaning (danger/ok/neutral), but size, shape and weight are now one system. */
.aging-badge, .renewal-badge, .sla-countdown, .excess-risk-badge,
.consent-reviewed-badge, .consent-not-reviewed-badge, .expired-badge {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0; flex-shrink: 0;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em;
  border-radius: 999px; padding: 0.28rem 0.65rem 0.28rem 0.55rem; width: fit-content;
  border: 1px solid transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  white-space: nowrap; line-height: 1.3;
  transition: transform 0.15s ease;
}
.aging-badge svg, .renewal-badge svg, .sla-countdown svg, .excess-risk-badge svg { width: 11px; height: 11px; flex: none; }

.aging-badge {
  color: #B0223A; background: linear-gradient(180deg, #FDEEF0, #FCE1E5);
  border-color: rgba(226, 74, 74, 0.18);
}

.renewal-badge {
  color: var(--teal-deep); background: linear-gradient(180deg, #EFFBFB, var(--gold-soft));
  border-color: #BFE6E8;
}

.expired-badge {
  color: #565D6D; background: linear-gradient(180deg, #F1F2F5, #E6E8ED);
  border-color: rgba(86, 93, 109, 0.2);
}

/* Live 4-hour SLA countdown on submitted leads (admin board) - three states: plenty of time
   left (neutral), inside the last 30 minutes (amber "review soon"), and expired (red, pulsing
   alert once the internal turnaround target has been missed). */
.sla-countdown {
  color: var(--ink-soft); background: linear-gradient(180deg, #fff, var(--paper, #f5f5f7));
  border-color: var(--line);
}
.sla-countdown.sla-warn {
  color: #92590A; background: linear-gradient(180deg, #FFF6E8, #FDECCC); border-color: rgba(255, 149, 0, 0.28);
}
.sla-countdown.sla-overdue {
  color: #fff; background: linear-gradient(180deg, #EA5B71, var(--m-red)); border-color: var(--m-red);
  box-shadow: 0 2px 6px rgba(226, 74, 74, 0.35);
  animation: slaOverduePulse 1.6s ease-in-out infinite;
}
@keyframes slaOverduePulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(226, 74, 74, 0.35), 0 0 0 0 rgba(226, 74, 74, 0.45); }
  50% { box-shadow: 0 2px 6px rgba(226, 74, 74, 0.35), 0 0 0 5px rgba(226, 74, 74, 0); }
}

/* ---------- toasts ---------- */
.toast-stack {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 200;
  display: flex; flex-direction: column; gap: 0.6rem; max-width: 340px;
}
@media (max-width: 480px) {
  .toast-stack { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
}
.toast {
  background: rgba(28, 33, 38, 0.92); backdrop-filter: blur(10px); color: #fff; padding: 0.8rem 1.1rem; border-radius: 12px;
  font-size: 0.85rem; font-weight: 600; box-shadow: 0 16px 36px rgba(0,0,0,0.24), 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer; opacity: 0; transform: translateY(10px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  border-left: 4px solid var(--m-blue, #4a7dfc);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: var(--m-green, #2fb974); }
.toast-error { border-left-color: var(--m-red, #e24a4a); }
.toast-info { border-left-color: var(--m-blue, #4a7dfc); }

.page-head {
  margin-bottom: 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.page-head h1 { font-size: 1.95rem; margin: 0 0 0.3rem; }
@media (max-width: 480px) { .page-head h1 { font-size: 1.5rem; } }
.page-head p { color: var(--ink-soft); margin: 0; }

/* Sticky fill-bar tracking how far through the (long, 13-section) proposal form the client
   currently is - updated via IntersectionObserver as they scroll, see setupFormProgress() in
   client.js. Sits just above the form so it's visible without competing with the page header. */
.form-progress {
  position: sticky; top: 0.6rem; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-soft);
}
.form-progress-track { height: 5px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.form-progress-fill {
  height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.35s var(--ease);
}
.form-progress-label {
  margin-top: 0.4rem; font-size: 0.76rem; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
@media (max-width: 480px) { .panel { padding: 1.2rem 1.15rem; } }
.panel h2 { font-size: 1.04rem; margin: 0 0 1.15rem; display: flex; align-items: center; gap: 0.6rem; }
.panel h2 .step-num {
  font-family: 'Poppins', sans-serif; color: var(--teal); font-size: 0.72rem; font-weight: 700;
  background: var(--gold-soft); width: 23px; height: 23px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* status pill */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.32rem 0.7rem; border-radius: 999px;
}
.pill-draft { background: #EDEEF4; color: #5B5E70; }
.pill-submitted { background: var(--wait-soft); color: #B87418; }
.pill-approved { background: var(--ok-soft); color: #0A8A55; }
.pill-denied { background: var(--danger-soft); color: var(--danger); }

/* monday.com-style solid pills */
.pill-solid { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.34rem 0.75rem; border-radius: 8px; color: #fff; }
.pill-solid.s-draft { background: var(--m-grey); }
.pill-solid.s-submitted { background: var(--m-orange); }
.pill-solid.s-approved { background: var(--m-green); }
.pill-solid.s-denied { background: var(--m-red); }
.pill-solid.s-paid { background: var(--m-blue); }

/* Clickable pill-shaped approve/deny actions on the admin board - same visual language as
   .pill-solid above (colored, rounded, uppercase), but a real <button> so it stays actionable. */
.pill-action {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 0.34rem 0.7rem; border-radius: 8px;
  border: none; color: #fff; cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease;
}
.pill-action:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pill-action-approve { background: var(--m-green); }
.pill-action-deny { background: var(--m-red); }

/* status ledger / stepper (signature element) */
.stepper { display: flex; gap: 0; margin: 1.2rem 0 1.8rem; }
.step { flex: 1; text-align: center; position: relative; padding-bottom: 0.7rem; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 0.4rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 600;
  background: #EDEEF4; color: #6B6F84; border: 2px solid #EDEEF4;
}
.step .lbl { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.step::after {
  content: ''; position: absolute; top: 13px; right: -50%; width: 100%; height: 2px; background: #EDEEF4; z-index: 0;
}
.step:last-child::after { display: none; }
.step.done .dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.step.done::after { background: var(--teal); }
.step.current .dot { background: var(--wait); border-color: var(--wait); color: #fff; }
.step.denied .dot { background: var(--danger); border-color: var(--danger); color: #fff; }

/* documents checklist */
.doc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0.6rem; margin: 0 -0.6rem; border-bottom: 1px solid var(--line);
  border-radius: 8px; gap: 1rem; flex-wrap: wrap;
  transition: background 0.15s ease;
}
.doc-row:hover { background: #F7F8FD; }
.doc-row:last-child { border-bottom: none; }
.doc-name { font-weight: 600; font-size: 0.92rem; }
.doc-status { font-size: 0.8rem; color: var(--ink-soft); }
.doc-status.have { color: var(--ok); }
.doc-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.file-label {
  display: inline-block; background: var(--paper); border: 1px dashed var(--line); border-radius: 8px;
  padding: 0.5rem 0.9rem; font-size: 0.82rem; cursor: pointer; color: var(--teal);
}
.file-label:hover { background: #ECEEF7; }
.file-label input { display: none; }

.policy-upload-row {
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  margin: 0.7rem 0 1.2rem; padding: 0.8rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.policy-upload-row input[type="text"] {
  flex: 1; min-width: 180px; padding: 0.5rem 0.7rem; border: 1px solid var(--line);
  border-radius: 8px; font-size: 0.85rem; font-family: inherit;
}
@media (max-width: 480px) {
  .policy-upload-row { flex-direction: column; align-items: stretch; }
  .policy-upload-row input[type="text"] { min-width: 0; }
}

/* ---------- Cardinal daily activity log ---------- */
.cardinal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cardinal-summary-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700;
  padding: 0.4rem 0.85rem; border-radius: 999px; white-space: nowrap;
  background: #EAF7EE; color: var(--m-green);
}
.cardinal-summary-chip.has-gaps { background: #FDEEEC; color: var(--m-red); }
.cardinal-daynav { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.cardinal-daynav .btn { padding: 0.45rem 0.6rem; }
.cardinal-daynav input[type="date"] { max-width: 190px; }
.cardinal-weekday-tag { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; margin-left: 0.2rem; }
.cardinal-tracker-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.6rem 0 0.9rem; }
.cardinal-upload-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.cardinal-upload-card.has-pdf { background: #F7FBF8; border-color: #CFE8D6; }
.cardinal-upload-card.missing { background: #FBF8F1; border: 1px dashed #E8D8B0; }
.cardinal-upload-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 9px; flex-shrink: 0;
}
.cardinal-upload-card.has-pdf .cardinal-upload-icon { background: #DEF2E4; color: var(--m-green); }
.cardinal-upload-card.missing .cardinal-upload-icon { background: #F3E7C9; color: #9A7B1F; }
.cardinal-upload-info { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.cardinal-upload-text { min-width: 0; }
tr.weekend-row td { color: var(--ink-soft); }
tr.weekend-row .weekend-tag { font-size: 0.72rem; color: var(--ink-soft); font-style: italic; }

.notice { padding: 0.85rem 1.05rem; border-radius: 10px; font-size: 0.87rem; margin-bottom: 1.3rem; }
.notice-info { background: var(--gold-soft); color: var(--teal-deep); }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-warn { background: var(--wait-soft); color: #B87418; }

/* Excess Cover Option cards - Options 1/2 visually emphasized over Option 3, per the
   intentional upsell toward carrying excess protection. */
.excess-options { display: flex; flex-direction: column; gap: 0.7rem; }
.excess-card {
  display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.9rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  background: var(--panel);
}
.excess-card input[type="radio"] { width: auto; margin-top: 0.25rem; flex-shrink: 0; }
.excess-card input[type="radio"]:disabled { cursor: not-allowed; }
.excess-card:has(input:disabled) { cursor: not-allowed; opacity: 0.7; }
.excess-card:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.excess-card-recommended { background: linear-gradient(180deg, var(--gold-soft) 0%, var(--panel) 55%); }
.excess-card-plain { background: var(--paper); }
.excess-card-body { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.excess-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.15rem; }
.excess-card-badge {
  display: inline-block; background: var(--gold); color: #fff; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 0.18rem 0.55rem; border-radius: 999px;
}
.excess-card-badge-recommended { background: var(--danger); }
.excess-risk-badge {
  text-transform: uppercase; letter-spacing: 0.02em; font-size: 0.68rem;
  border-color: rgba(226, 74, 74, 0.2);
  color: #B0223A; background: linear-gradient(180deg, #FDEEF0, #FCE1E5);
  animation: riskBadgePulse 2.6s ease-in-out infinite;
}

/* Slow, gentle pulse to draw the eye to this being a real financial risk, without being
   obnoxious or looking broken - a soft glow breathing in and out rather than a hard flash. */
@keyframes riskBadgePulse {
  0%, 100% { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 0 0 0 rgba(226, 34, 58, 0.35); }
  50% { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 0 0 5px rgba(226, 34, 58, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .excess-risk-badge { animation: none; }
}
.excess-card-price { font-weight: 700; color: var(--teal-deep, var(--ink)); font-size: 0.95rem; }
.excess-card-price small { font-weight: 500; color: var(--ink-soft); font-size: 0.72rem; }
.excess-card-desc { color: var(--ink-soft); font-size: 0.85rem; line-height: 1.45; }

/* "See more details" per excess option card - the exact excess structure/limits/exclusions
   from the official proposal form, without cluttering the card by default. */
.excess-card-more-btn {
  align-self: flex-start; background: none; border: none; padding: 0.2rem 0; margin-top: 0.15rem;
  color: var(--teal); font-size: 0.78rem; font-weight: 700; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.excess-card-more-btn:hover { color: var(--gold); }
.excess-card-details {
  margin-top: 0.4rem; padding-top: 0.6rem; border-top: 1px dashed var(--line);
}
.excess-card-details p { margin: 0 0 0.55rem; font-size: 0.82rem; line-height: 1.55; color: var(--ink-soft); }
.excess-card-details p:last-child { margin-bottom: 0; }
.excess-card-details strong { color: var(--ink); }

/* Option 3 risk warning - only shown once "I do not want excess cover" is actually selected,
   with an attention-grabbing entrance animation so it isn't missed alongside a quiet upsell nudge
   back to Option 1. */
.excess-option3-warning {
  display: flex; align-items: flex-start; gap: 0.65rem;
  margin-top: 0.65rem; padding: 0.75rem 0.9rem;
  background: #fdf2e9; border: 1.5px solid #f0a860; border-radius: var(--radius-sm);
  animation: excessWarnIn 0.4s ease, excessWarnPulse 1.6s ease-in-out 0.4s 2;
}
.excess-option3-warning .icon { flex-shrink: 0; width: 22px; height: 22px; color: #d9782a; margin-top: 0.1rem; }
.excess-option3-warning strong { display: block; color: #a84f10; font-size: 0.85rem; margin-bottom: 0.25rem; }
.excess-option3-warning span { display: block; color: #8a4a1a; font-size: 0.8rem; line-height: 1.5; }
.excess-warning-switch-btn {
  display: inline-block; margin-top: 0.5rem; background: #d9782a; color: #fff; border: none;
  border-radius: 999px; padding: 0.35rem 0.85rem; font-size: 0.76rem; font-weight: 700;
  cursor: pointer;
}
.excess-warning-switch-btn:hover { background: #b8611e; }
.excess-warning-table-toggle {
  background: none; color: #a84f10; border: 1px solid #e2a15c; padding: 0.32rem 0.75rem;
  margin-right: 0.5rem;
}
.excess-warning-table-toggle:hover { background: #f6e0c8; }
.excess-warning-table-wrap { margin-top: 0.6rem; overflow-x: auto; }
.excess-warning-table {
  width: 100%; border-collapse: collapse; font-size: 0.74rem; background: #fff;
  border: 1px solid #eecda3; border-radius: 6px; overflow: hidden;
}
.excess-warning-table th, .excess-warning-table td {
  padding: 0.4rem 0.55rem; text-align: right; border-bottom: 1px solid #f2e0c4; white-space: nowrap;
}
.excess-warning-table th:first-child, .excess-warning-table td:first-child { text-align: left; white-space: normal; }
.excess-warning-table thead th {
  background: #f6e0c8; color: #8a4a1a; font-weight: 700; text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.03em;
}
.excess-warning-table tbody tr:last-child td { border-bottom: none; }
.excess-warning-table tr.ewt-highlight td { background: #fdf2e9; }
.excess-warning-table tr.ewt-total td { background: #f6e0c8; font-weight: 700; color: #8a4a1a; }
.excess-warning-table-note { margin: 0.5rem 0 0; font-size: 0.72rem; color: #8a4a1a; line-height: 1.5; }
.excess-warning-table th.ewt-your-col, .excess-warning-table td.ewt-your-col {
  background: #0F7C86; color: #fff; position: relative;
}
.excess-warning-table tr.ewt-highlight td.ewt-your-col { background: #0F7C86; }
.excess-warning-table tr.ewt-total td.ewt-your-col { background: #0b5d64; color: #fff; }
.excess-warning-table thead th.ewt-your-col::after {
  content: 'Your vehicle'; display: block; font-size: 0.58rem; font-weight: 700;
  text-transform: none; letter-spacing: normal; color: #d9f2f0; margin-top: 0.15rem;
}
@keyframes excessWarnIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes excessWarnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 120, 42, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(217, 120, 42, 0); }
}

/* Excess info modal - condensed version of the official excess waiver/reducer explainer,
   shown as a mandatory read-through before the excess radios unlock. */
.excess-info-card {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  margin-bottom: 0.7rem; background: var(--paper);
}
.excess-info-card p { margin: 0.3rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }
.excess-info-card-highlight { background: linear-gradient(180deg, var(--gold-soft) 0%, var(--panel) 65%); border-color: var(--gold); }
.excess-info-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.3rem; }
.excess-info-video-wrap {
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1rem; background: #000;
  box-shadow: var(--shadow);
}
.excess-info-video { display: block; width: 100%; max-height: 320px; background: #000; }
.excess-example-callout {
  border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem; font-size: 0.85rem; line-height: 1.55; color: var(--teal-deep, var(--ink)); margin-top: 0.4rem;
}

/* Broker Appointment - the compulsory appointment text, with the client's own name/address/
   effective date interpolated in from earlier steps rather than re-entered. */
.broker-appointment-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
}
.broker-appointment-box p { margin: 0; font-size: 0.87rem; line-height: 1.65; color: var(--ink); }

/* Generic explainer-modal content (POPIA / Terms & Conditions / Record of Advice) - same visual
   vocabulary as the excess-info-card set above, just not excess-specific. */
.info-modal-card {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  margin-bottom: 0.7rem; background: var(--paper);
}
.info-modal-card p { margin: 0.3rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }
.info-modal-card p:first-child { margin-top: 0; }
.info-modal-card-title { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.info-modal-list { margin: 0.35rem 0 0; padding-left: 1.15rem; font-size: 0.85rem; line-height: 1.6; color: var(--ink-soft); }
.info-modal-list li { margin-bottom: 0.3rem; }
.info-modal-list li strong { color: var(--ink); }

/* Declaration checkboxes (POPIA / T&Cs / Record of Advice) start locked - the client must open
   and acknowledge the matching explainer modal (see .info-modal-card above) before the checkbox
   itself becomes tickable, same "must be genuinely informed" gate the excess options already
   use. Once reviewed, a small badge replaces the "Read details" prompt. */
.consent-row { margin-top: 0.9rem; }
.consent-row:first-child { margin-top: 0; }
.consent-row-actions { display: flex; align-items: center; gap: 0.6rem; margin: 0.35rem 0 0 1.75rem; }
.consent-review-btn { padding: 0.32rem 0.75rem; font-size: 0.78rem; }
.consent-reviewed-badge { color: #0A8A55; background: var(--ok-soft); border-color: rgba(10,138,85,0.18); }
/* The [hidden] attribute alone loses to the shared class's explicit `display` (equal
   specificity, class rule wins) - without this, a brand-new lead that's never been reviewed
   would still show the green "Reviewed" badge because `hidden` silently has no effect. */
.consent-reviewed-badge[hidden] { display: none; }
.consent-not-reviewed-badge { color: #B0223A; background: linear-gradient(180deg, #FDEEF0, #FCE1E5); border-color: rgba(226, 74, 74, 0.18); }
.consent-not-reviewed-badge[hidden] { display: none; }
.consent-check input:disabled + span { color: var(--ink-soft); }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
@media (max-width: 780px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem 1.15rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.7rem;
  overflow: hidden; isolation: isolate;
  transition: transform 0.22s var(--ease), box-shadow 0.22s ease, border-color 0.22s ease;
}
.stat-card::before {
  /* accent bar along the top, tinted per-tone */
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--stat-accent, var(--teal)); opacity: 0.9;
}
.stat-card::after {
  /* soft oversized watermark shape in the corner for a bit of depth */
  content: ''; position: absolute; right: -18px; bottom: -22px; width: 96px; height: 96px;
  background: var(--stat-accent, var(--teal)); opacity: 0.07; border-radius: 26px;
  transform: rotate(16deg); z-index: -1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #DCE1EC; }
.stat-card:hover::after { transform: rotate(6deg) scale(1.1); opacity: 0.11; }
.stat-card .stat-icon {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--stat-accent-soft, var(--gold-soft)); color: var(--stat-accent, var(--teal));
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.07);
}
.stat-card .stat-value { font-family: 'Poppins', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 0.72rem; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card.tone-wait { --stat-accent: #B87418; --stat-accent-soft: var(--wait-soft); }
.stat-card.tone-ok { --stat-accent: #0A8A55; --stat-accent-soft: var(--ok-soft); }
.stat-card.tone-danger { --stat-accent: var(--danger); --stat-accent-soft: var(--danger-soft); }
.stat-card.tone-neutral { --stat-accent: var(--teal); --stat-accent-soft: var(--gold-soft); }
.stat-card.tone-wait .stat-icon { background: var(--wait-soft); color: #B87418; }
.stat-card.tone-ok .stat-icon { background: var(--ok-soft); color: #0A8A55; }
.stat-card.tone-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-card.tone-neutral .stat-icon { background: var(--gold-soft); color: var(--teal); }

/* admin table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); }
td { padding: 0.9rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; transition: background 0.15s ease; }
tr.clickable:hover { background: var(--paper); }
tr:last-child td { border-bottom: none; }
.avatar-chip {
  width: 33px; height: 33px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--gold)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; flex: none; margin-right: 0.65rem;
  box-shadow: 0 2px 8px rgba(15,124,134,0.28);
}
.name-cell { display: flex; align-items: center; }

.filters { display: flex; gap: 0.5rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.filter-btn {
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.filter-btn:hover { border-color: #C6CCE0; transform: translateY(-1px); }
.filter-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 12px rgba(15,124,134,0.25); }

/* ---------- monday.com-style toolbar ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.4rem; flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem; min-width: 260px; flex: 1; max-width: 360px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 480px) { .search-box { min-width: 0; max-width: none; width: 100%; } }
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,124,134,0.12); }
.search-box .icon { color: var(--ink-soft); flex: none; }
.search-box input { border: none; padding: 0; width: 100%; }
.search-box input:focus { box-shadow: none; }
.view-tabs { display: flex; gap: 0.3rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.25rem; }
.view-tab {
  border: none; background: transparent; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600;
  padding: 0.4rem 0.8rem; border-radius: 7px; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.view-tab.active { background: #fff; color: var(--teal); box-shadow: 0 1px 3px rgba(50,51,56,0.12); }

/* ---------- board column header ---------- */
.board-col-head {
  display: grid; grid-template-columns: 1.4fr 1fr minmax(140px, 0.9fr) 130px 130px auto;
  gap: 1rem; padding: 0 1.1rem 0.55rem; margin-top: 0.2rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--ink-soft);
}
@media (max-width: 900px) { .board-col-head { display: none; } }

/* ---------- monday.com-style board groups ---------- */
.board-group { margin-bottom: 1.4rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.board-group-head {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.8rem 1.1rem; cursor: pointer; color: #fff; font-weight: 700; font-size: 0.9rem;
  user-select: none;
}
.board-group-head .chev { transition: transform 0.2s ease; flex: none; }
.board-group.collapsed .chev { transform: rotate(-90deg); }
.board-group-head .count {
  background: rgba(255,255,255,0.25); border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  padding: 0.1rem 0.55rem; margin-left: 0.2rem;
}
.board-group-head .grp-label { flex: 1; }
.group-draft .board-group-head { background: var(--m-grey); }
.group-submitted .board-group-head { background: var(--m-orange); }
.group-approved .board-group-head { background: var(--m-green); }
.group-denied .board-group-head { background: var(--m-red); }
.group-under_review .board-group-head { background: var(--m-grey); }
.group-paid .board-group-head { background: var(--m-blue); }

.board-group-body { background: #fff; }
.board-group.collapsed .board-group-body { display: none; }

.row-item {
  display: grid; grid-template-columns: 1.4fr 1fr minmax(140px, 0.9fr) 130px 130px auto;
  align-items: center; gap: 1rem;
  padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  cursor: pointer; transition: background 0.15s ease, border-left-color 0.15s ease;
  position: relative;
}
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: #F7F8FD; }
.group-draft .row-item:hover { border-left-color: var(--m-grey); }
.group-submitted .row-item:hover { border-left-color: var(--m-orange); }
.group-approved .row-item:hover { border-left-color: var(--m-green); }
.group-denied .row-item:hover { border-left-color: var(--m-red); }
.group-under_review .row-item:hover { border-left-color: var(--m-grey); }
.group-paid .row-item:hover { border-left-color: var(--m-blue); }
.row-item .name-cell { display: flex; align-items: flex-start; gap: 0.6rem; min-width: 0; }
.row-item .name-cell > div { min-width: 0; }
.row-item .name-cell .avatar-chip { margin-right: 0; margin-top: 0.1rem; }
.row-item .name-cell strong { display: block; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Only the name/email/ref meta line truncates to one line - badge chips (.name-badges) live
   below it in their own wrapping row and must never be caught by this rule (a bare descendant
   "span" selector used to also match badge <span>s and clip their text mid-word). */
.row-item .name-cell-meta { display: block; color: var(--ink-soft); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .vehicle-cell { color: var(--ink-soft); font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .dealer-cell { min-width: 0; }
.row-item .updated-cell { color: var(--ink-soft); font-size: 0.8rem; }
.row-item .row-actions { display: flex; gap: 0.35rem; align-items: center; justify-self: end; }
.row-actions button { padding: 0.35rem 0.6rem; font-size: 0.76rem; }
.row-actions .btn-ok, .row-actions .btn-danger { padding: 0.35rem 0.5rem; }
.row-actions .icon { width: 13px; height: 13px; }

@media (max-width: 900px) {
  .row-item {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name actions" "vehicle vehicle" "dealer dealer" "progress progress";
    row-gap: 0.5rem;
  }
  .row-item .name-cell { grid-area: name; }
  .row-item .row-actions { grid-area: actions; flex-wrap: wrap; justify-content: flex-end; }
  .row-item .vehicle-cell { grid-area: vehicle; white-space: normal; }
  .row-item .dealer-cell { grid-area: dealer; }
  .row-item .progress-cell { grid-area: progress; }
  .row-item .updated-cell { display: none; }
}
@media (max-width: 420px) {
  .row-item { padding: 0.85rem 0.85rem; }
  .row-item .name-cell strong, .row-item .name-cell-meta { white-space: normal; }
}

/* modal */
@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center; padding: 3rem 1rem; overflow-y: auto; z-index: 50;
}
.modal-backdrop.show { display: flex; animation: fadeUp 0.2s var(--ease); }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 720px; width: 100%;
  padding: 2.2rem; box-shadow: 0 30px 80px rgba(16,24,40,0.24), 0 8px 24px rgba(16,24,40,0.12);
  border: 1px solid rgba(255,255,255,0.6);
  animation: modalPop 0.22s var(--ease);
}
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; align-items: stretch; }
  /* !important beats the inline max-width every individual modal sets (style="max-width:NNNpx")
     to size itself on desktop - without it, that inline style would win over this media query on
     every screen size, and modals would never go full-screen on mobile. */
  .modal { max-width: none !important; min-height: 100vh; border-radius: 0; padding: 1.3rem; }
}

/* Small centered access-code prompts (Users/Clients tab gate) - distinct from the big
   scrollable detail modals above, which deliberately anchor near the top instead of centering. */
.pin-gate-backdrop { align-items: center; padding: 1rem; }
.pin-gate-modal { max-width: 300px; padding: 1.6rem 1.5rem; }
@media (max-width: 640px) {
  .pin-gate-backdrop { align-items: center; }
  .pin-gate-modal { max-width: 300px; min-height: auto; border-radius: var(--radius-lg); }
}

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.35rem; padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); }
.modal-close {
  background: var(--paper); border: 1px solid var(--line); border-radius: 9px; width: 31px; height: 31px;
  font-size: 1.2rem; cursor: pointer; color: var(--ink-soft); padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.modal-close:hover { background: #ECEEF7; color: var(--ink); transform: rotate(90deg); }

/* ---------- document preview lightbox (admin "Preview" button) ---------- */
.doc-preview-backdrop {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.72);
  display: none; align-items: center; justify-content: center; padding: 2rem 1rem; z-index: 90;
}
.doc-preview-backdrop.show { display: flex; animation: fadeUp 0.2s var(--ease); }
.doc-preview-box {
  background: #fff; border-radius: var(--radius-lg); max-width: 900px; width: 100%; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(16,24,40,0.35);
}
.doc-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--line); }
.doc-preview-head strong { font-size: 0.9rem; }
.doc-preview-body { flex: 1; overflow: auto; background: #F3F4F8; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.doc-preview-body img { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; }
.doc-preview-body iframe { width: 100%; height: 78vh; border: none; }
.doc-preview-fallback { padding: 2rem; text-align: center; color: var(--ink-soft); font-size: 0.85rem; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 1.5rem; font-size: 0.87rem; margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px dashed var(--line); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } }
.kv div span.k { display: block; color: var(--ink-soft); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.15rem; }
.kv div span.v { font-weight: 500; }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--ink-soft); }
.empty-state .icon { width: 40px; height: 40px; color: #C4C9D9; margin-bottom: 0.9rem; }
.empty-state h3 { color: var(--ink); margin-bottom: 0.4rem; }

/* ---------- lead progress bar (per-row status) ---------- */
.lead-bar { display: flex; flex-direction: column; gap: 5px; width: 100%; max-width: 140px; }
.lead-bar-track { display: flex; gap: 4px; }
.bar-seg { flex: 1; height: 7px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; transition: background 0.25s ease; }
.bar-seg.seg-done { background: var(--teal); }
.bar-seg.seg-current { background: var(--wait); }
.bar-seg.seg-ok { background: var(--ok); }
.bar-seg.seg-denied { background: var(--danger); }
.bar-seg.seg-current::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: bar-seg-shimmer 1.8s ease-in-out infinite;
}
@keyframes bar-seg-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.lead-bar-label { font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; letter-spacing: 0.01em; }

/* ---------- dealer select (person-column style) ---------- */
.dealer-select {
  width: 100%; max-width: 170px; padding: 0.32rem 0.6rem; font-size: 0.78rem; font-weight: 600;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.dealer-select-modal { max-width: 200px; width: auto; }
/* Read-only label shown once a lead already has a dealership attached (the default now that
   leads originate at the dealership) - no picker needed, nothing to second-guess. */
.dealer-cell-label {
  display: inline-block; max-width: 170px; padding: 0.32rem 0.6rem; font-size: 0.78rem; font-weight: 600;
  border-radius: 999px; background: var(--paper); color: var(--ink-soft); border: 1.5px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- stat card tone: purple (unassigned) ---------- */
.stat-card.tone-purple .stat-icon { background: rgba(15, 124, 134, 0.12); color: var(--teal); }

/* ---------- dealers page ---------- */
.dealer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
@media (max-width: 400px) { .dealer-grid { grid-template-columns: 1fr; } }
.dealer-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.45rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, border-color 0.2s ease;
}
.dealer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #DCE1EC; }
.dealer-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.dealer-lead-count { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--ink); display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.dealer-lead-count span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 600; }
.dealer-card h3 { margin: 0.1rem 0 0; font-size: 1.05rem; }
.dealer-city { margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
.dealer-contact { font-size: 0.82rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: 0.1rem; }
.dealer-note { font-style: italic; font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.15rem; }
.dealer-stat-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.dealer-stat-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; font-weight: 600;
  padding: 0.24rem 0.6rem 0.24rem 0.5rem; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); color: var(--ink-soft);
}
.dealer-stat-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--chip-color); flex: none; }
.dealer-login-badge {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 600;
  color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 0.35rem 0.7rem; align-self: flex-start;
}
.dealer-login-badge .icon { width: 13px; height: 13px; }
.dealer-login-badge-pending { color: #B87418; background: var(--wait-soft); }
.dealer-remove {
  margin-top: 0.3rem; align-self: flex-start; font-size: 0.78rem; padding: 0.4rem 0.8rem;
  color: var(--danger); border-color: var(--danger-soft);
}
.dealer-remove:hover { background: var(--danger-soft); border-color: var(--danger-soft); }

/* ---------- comments / internal chat thread ---------- */
.comment-list { display: flex; flex-direction: column; gap: 0.6rem; max-height: 240px; overflow-y: auto; margin-bottom: 0.8rem; padding-right: 0.2rem; }
.comment-bubble { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; }
.comment-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.2rem; }
.comment-head strong { font-size: 0.82rem; }
.comment-head > span { font-size: 0.7rem; color: var(--ink-soft); }
.comment-author-group { display: flex; align-items: baseline; gap: 0.4rem; }
.role-tag {
  display: inline-flex; align-items: center; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; border-radius: 999px; padding: 0.1rem 0.45rem;
}
.role-tag-admin { color: var(--teal-deep); background: var(--gold-soft); border: 1px solid #BFE6E8; }
.role-tag-dealer { color: #6B4EFF; background: rgba(107, 78, 255, 0.1); border: 1px solid rgba(107, 78, 255, 0.22); }
.comment-bubble p { margin: 0; font-size: 0.85rem; color: var(--ink); white-space: pre-wrap; }
.comment-empty { color: var(--ink-soft); font-size: 0.85rem; font-style: italic; }
.comment-composer { display: flex; gap: 0.6rem; align-items: flex-end; }
.comment-composer textarea { flex: 1; resize: vertical; }
.comment-composer-name { max-width: 220px; }
@media (max-width: 480px) { .comment-composer { flex-direction: column; align-items: stretch; } }

/* Discreet per-lead "new dealer comment" indicator on the admin board - clears itself the
   moment the lead detail is opened. */
.comment-bell-badge {
  display: inline-flex; align-items: center; margin-top: 0.3rem; font-size: 0.8rem;
  width: fit-content; animation: bellPulse 1.6s ease-in-out infinite;
}
@keyframes bellPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---------- signature pad ---------- */
.signature-pad-wrap { border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 0.6rem; background: #FBFCFE; }
.signature-pad { width: 100%; height: 180px; display: block; border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.signature-pad.locked { cursor: not-allowed; opacity: 0.6; }
.signature-pad-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.signature-status { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.signature-status.signed { color: var(--ok); }
.signature-frame { border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem; background: #fff; display: inline-block; }
.signature-frame img { max-width: 100%; height: auto; display: block; }

/* ---------- static dealer chip (client's read-only lead list) ---------- */
.dealer-chip {
  display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--gold-soft); color: var(--teal-deep);
  border: 1px solid #BFE6E8;
}
.dealer-chip.dealer-chip-empty { background: var(--paper); color: var(--ink-soft); border-color: var(--line); }
.client-col-head { grid-template-columns: 1.4fr 1fr minmax(140px, 0.9fr) 130px 130px auto; }

/* ---------- reports page ---------- */
.report-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.4rem; }
@media (max-width: 900px) { .report-grid { grid-template-columns: 1fr; } }

.breakdown { display: flex; flex-direction: column; gap: 0.9rem; }
.breakdown-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 0.8rem; }
.breakdown-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.breakdown-track { height: 10px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: 999px; transition: width 0.4s var(--ease); }
.breakdown-count { font-size: 0.82rem; font-weight: 700; color: var(--ink); text-align: right; }
.breakdown-pct { font-weight: 500; color: var(--ink-soft); }

.trend-chart { display: flex; align-items: flex-end; gap: 0.7rem; height: 160px; padding-top: 0.5rem; overflow-x: auto; }
@media (max-width: 560px) { .trend-chart { gap: 0.4rem; } .trend-col { min-width: 32px; } }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 0.3rem; }
.trend-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.trend-bar { width: 100%; background: linear-gradient(180deg, var(--teal), var(--gold)); border-radius: 5px 5px 2px 2px; min-height: 4px; transition: height 0.4s var(--ease); }
.trend-value { font-size: 0.72rem; font-weight: 700; color: var(--ink); }
.trend-label { font-size: 0.65rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }

.activity-feed { display: flex; flex-direction: column; gap: 0.9rem; max-height: 360px; overflow-y: auto; }
.activity-item { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.86rem; color: var(--ink); }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 0.35rem; flex: none; }
.activity-time { font-size: 0.74rem; color: var(--ink-soft); margin-top: 0.1rem; }

/* ---------- dealer notice (client page) ---------- */
.dealer-notice {
  display: flex; gap: 0.75rem; align-items: flex-start; background: var(--gold-soft);
  border: 1px solid #BFE6E8; border-radius: var(--radius-sm); padding: 0.85rem 1.05rem;
  margin-bottom: 1.3rem; font-size: 0.88rem; color: var(--teal-deep);
}
.dealer-notice-icon {
  width: 33px; height: 33px; border-radius: 9px; background: #fff; display: flex;
  align-items: center; justify-content: center; color: var(--teal); flex: none;
  box-shadow: var(--shadow-soft);
}
.dealer-notice-sub { color: var(--ink-soft); font-size: 0.8rem; margin-top: 0.15rem; }

/* ---------- reference code tag ---------- */
.ref-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.02em;
}
.row-item .name-cell .ref-code { font-size: 0.72rem; }

/* ---------- brand logos + footer ---------- */
.auth-logos { display: flex; align-items: center; gap: 1.5rem; row-gap: 0.8rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.auth-logos img { height: 42px; width: auto; display: block; }
.auth-logos img.logo-smartsure { height: 46px; }
.auth-logos img.logo-guardrisk { height: 36px; }
.auth-logos img.logo-renault { height: 64px; }

.site-footer {
  margin-top: 2.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.site-footer .footer-logos { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.site-footer img { height: 38px; width: auto; display: block; opacity: 0.92; }
.site-footer img.logo-smartsure { height: 46px; }
.site-footer img.logo-guardrisk { height: 34px; }
.site-footer .footer-note { font-size: 0.76rem; color: var(--ink-soft); }

/* ---------- approved body shops panel ---------- */
.body-shops-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem;
}
.body-shop-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
  background: var(--paper);
}
.body-shop-card .bs-name { font-weight: 700; font-size: 0.86rem; color: var(--ink); }
.body-shop-card .bs-province { display: inline-block; margin: 0.25rem 0 0.35rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--teal); }
.body-shop-card .bs-address { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }
.body-shop-card .bs-phone { font-size: 0.8rem; color: var(--ink); margin: 0.3rem 0 0; font-weight: 600; }
.body-shop-area-heading {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--ink-soft); margin: 1rem 0 0.4rem; padding-bottom: 0.25rem; border-bottom: 1px dashed var(--line);
}
.body-shop-area-heading:first-child { margin-top: 0; }
.body-shop-area-group {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem; margin-bottom: 0.3rem;
}

/* ---------- version badge ---------- */
.version-badge {
  position: fixed; right: 0.7rem; bottom: 0.6rem; z-index: 40;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.22rem 0.6rem; opacity: 0.55;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  pointer-events: none; user-select: none;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 640px) {
  .version-badge { display: none; }
}

/* ---------- claims pipeline (Kanban) ---------- */
.claims-stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.85rem; margin-bottom: 1.4rem; }
.claims-stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; box-shadow: var(--shadow-soft);
}
.claims-stat-card .cs-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.claims-stat-card .cs-value { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.25; margin-top: 0.2rem; }
.claims-stat-card .cs-sub { font-size: 0.72rem; color: var(--ink-soft); margin-top: 0.15rem; }
.claims-stat-card.tone-danger { border-color: var(--danger); background: var(--danger-soft); }
.claims-stat-card.tone-danger .cs-value { color: var(--danger); }

.kanban-board {
  display: flex; gap: 0.9rem; overflow-x: auto; padding-bottom: 0.6rem;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 270px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 320px); min-height: 220px;
}
@media (max-width: 640px) { .kanban-col { flex-basis: 82vw; } }
.kanban-col-head {
  padding: 0.75rem 0.9rem 0.6rem; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  position: sticky; top: 0; background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; z-index: 1;
}
.kanban-col-title { font-size: 0.8rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 0.4rem; }
.kanban-col-title .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kanban-col-count { font-size: 0.7rem; font-weight: 700; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.5rem; }
.kanban-col-value { font-size: 0.7rem; color: var(--ink-soft); padding: 0 0.9rem 0.6rem; margin-top: -0.3rem; }
.kanban-col-body { flex: 1; overflow-y: auto; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.6rem; min-height: 60px; }
.kanban-col-body.drag-over { background: rgba(15, 124, 134, 0.08); outline: 2px dashed var(--teal); outline-offset: -4px; }
.kanban-col-empty { font-size: 0.76rem; color: var(--ink-soft); text-align: center; padding: 1.2rem 0.4rem; font-style: italic; }

.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem; cursor: grab; box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.kanban-card:hover { box-shadow: var(--shadow-lift); border-color: #DCE1EC; transform: translateY(-2px); }
.kanban-card.dragging { opacity: 0.5; }
.kanban-card.overdue { border-color: var(--danger); background: linear-gradient(180deg, var(--danger-soft) 0%, #fff 30%); }
.kanban-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.4rem; }
.kanban-card-type { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.kanban-card-ref { font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.1rem; }
.kanban-card-meta { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.45rem; line-height: 1.4; }
.kanban-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.55rem; gap: 0.4rem; }
.kanban-card-assignee {
  font-size: 0.7rem; font-weight: 700; color: var(--teal); background: var(--gold-soft);
  border-radius: 999px; padding: 0.15rem 0.55rem; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kanban-card-assignee.unassigned { color: var(--ink-soft); background: #F0F1F5; }
.kanban-card-overdue-tag { font-size: 0.68rem; font-weight: 700; color: var(--danger); display: flex; align-items: center; gap: 0.2rem; }
.kanban-move-select {
  margin-top: 0.55rem; width: 100%; font-size: 0.75rem; padding: 0.3rem 0.4rem;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}

/* ---------- unified claim activity timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 0.7rem; padding: 0.55rem 0; border-left: 2px solid var(--line); margin-left: 0.5rem; padding-left: 1rem; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -6px; top: 0.7rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.timeline-item.tl-status::before { background: var(--m-orange); }
.timeline-item.tl-comment::before { background: var(--teal); }
.timeline-item.tl-document::before { background: var(--m-blue); }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.timeline-head strong { font-size: 0.82rem; color: var(--ink); }
.timeline-head span { font-size: 0.7rem; color: var(--ink-soft); }
.timeline-tag { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.timeline-body p { margin: 0.2rem 0 0; font-size: 0.84rem; color: var(--ink); white-space: pre-wrap; }

.assignee-select { font-size: 0.82rem; padding: 0.45rem 0.6rem; }

/* ---------- client dashboard: claim form, contact cards, FAQ ---------- */
#claimForm details, #claimFormModalBackdrop details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; margin-top: 1rem; background: var(--paper);
}
#claimForm details summary, #claimFormModalBackdrop details summary {
  cursor: pointer; font-weight: 700; font-size: 0.85rem; color: var(--teal);
}
#claimForm details[open] summary { margin-bottom: 0.4rem; }

.contact-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.85rem 1rem; background: var(--paper); }
.contact-card .cc-title { font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.contact-card .cc-line { font-size: 0.85rem; color: var(--ink); margin-top: 0.3rem; display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.contact-card .cc-line span:first-child { color: var(--ink-soft); }
.contact-card .cc-line a { color: var(--teal); font-weight: 600; text-decoration: none; }
.contact-card.cc-emergency { border-color: var(--danger); background: var(--danger-soft); }
.contact-card.cc-emergency .cc-title { color: var(--danger); }
@media (max-width: 640px) { .grid-2 > .contact-card { grid-column: auto; } }

.faq-item { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 0.88rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--teal); flex: none; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 0.5rem 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--ink-soft); }

.enquiry-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; background: var(--panel); cursor: pointer; transition: box-shadow 0.18s ease, border-color 0.18s ease; margin-bottom: 0.6rem; }
.enquiry-row:hover { box-shadow: var(--shadow-soft); border-color: #DCE1EC; }
.enquiry-row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.enquiry-row-subject { font-weight: 700; font-size: 0.86rem; color: var(--ink); }
.enquiry-row-meta { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.2rem; }
