/*
 * Biometric Lead brand theme, built on Bootstrap 5.3 CSS variables.
 * Mobile first; no !important overrides of Bootstrap.
 */

/* ---- Brand colours ------------------------------------------------------ */
:root,
[data-bs-theme="light"] {
  --brand: #0f766e;          /* teal-700: 5.5:1 on white */
  --brand-rgb: 15, 118, 110;
  --brand-hover: #115e59;    /* button fill: 7.6:1 with white text */
  --brand-active: #134e4a;
  --brand-accent: #10b981;   /* emerald, decorative gradients only */
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-primary-text-emphasis: #134e4a;
  --bs-primary-bg-subtle: #ccfbf1;
  --bs-primary-border-subtle: #99f6e4;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-active);
  --bs-link-hover-color-rgb: 19, 78, 74;
  --bs-focus-ring-color: rgba(var(--brand-rgb), 0.35);
  --bs-border-radius: 0.75rem;
  --bs-border-radius-lg: 1rem;
  --bs-border-radius-xl: 1.25rem;
  --bs-box-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.06);
  --bs-box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.08);
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --surface-muted: #f3f7f6;
  --bottom-nav-height: 64px;
  /* Chart colours (validated with the dataviz checks against #ffffff). */
  --chart-surface: #ffffff;
  --chart-grid: #e7e8ec;
  --chart-series-1: #2a78d6;
  --chart-series-2: #eb6834;
  --chart-status-open: #008300;
  --chart-status-assigned: #6250d6;
  --chart-status-submitted: #eda100;
  --chart-status-approved: #2a78d6;
  --chart-status-cancelled: #e34948;
  --chart-status-closed: #6c757d;
}

[data-bs-theme="dark"] {
  --brand: #0d9488;
  --brand-rgb: 13, 148, 136;
  --brand-hover: #0f766e;    /* button fill keeps white text (5.5:1) */
  --brand-active: #115e59;
  --brand-accent: #34d399;
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-primary-text-emphasis: #99f6e4;
  --bs-primary-bg-subtle: #042f2e;
  --bs-primary-border-subtle: #115e59;
  --bs-link-color: #5eead4;  /* 11:1 on the dark body */
  --bs-link-color-rgb: 94, 234, 212;
  --bs-link-hover-color: #99f6e4;
  --bs-link-hover-color-rgb: 153, 246, 228;
  --bs-box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --surface-muted: #121a1b;
  /* Dark steps of the same hues, validated against the dark card (#212529). */
  --chart-surface: #212529;
  --chart-grid: #343a40;
  --chart-series-1: #3987e5;
  --chart-series-2: #d95926;
  --chart-status-open: #008300;
  --chart-status-assigned: #9085e9;
  --chart-status-submitted: #c98500;
  --chart-status-approved: #3987e5;
  --chart-status-cancelled: #e66767;
  --chart-status-closed: #868e96;
}

.btn-primary {
  --bs-btn-bg: var(--brand-hover);
  --bs-btn-border-color: var(--brand-hover);
  --bs-btn-hover-bg: var(--brand-active);
  --bs-btn-hover-border-color: var(--brand-active);
  --bs-btn-active-bg: var(--brand-active);
  --bs-btn-active-border-color: var(--brand-active);
  --bs-btn-disabled-bg: var(--brand-hover);
  --bs-btn-disabled-border-color: var(--brand-hover);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--bs-link-color);
  --bs-btn-border-color: var(--bs-link-color);
  --bs-btn-hover-bg: var(--brand-hover);
  --bs-btn-hover-border-color: var(--brand-hover);
  --bs-btn-active-bg: var(--brand-active);
  --bs-btn-active-border-color: var(--brand-active);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.text-primary { color: var(--bs-link-color); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand-hover); }
.pagination {
  --bs-pagination-color: var(--bs-link-color);
  --bs-pagination-hover-color: var(--bs-link-hover-color);
  --bs-pagination-focus-color: var(--bs-link-hover-color);
  --bs-pagination-active-bg: var(--brand-hover);
  --bs-pagination-active-border-color: var(--brand-hover);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(var(--brand-rgb), 0.6);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}
.form-check-input:checked {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
}

/* ---- Modern refresh: type, buttons, cards ------------------------------- */
h1, h2, h3, .h1, .h2, .h3, .display-5 { letter-spacing: -0.02em; }
h4, h5, h6, .h4, .h5, .h6, .navbar-brand { letter-spacing: -0.01em; }
::selection { background: rgba(var(--brand-rgb), 0.2); }

.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-border-radius: var(--bs-border-radius-lg); }
.btn-primary { box-shadow: 0 1px 2px rgba(var(--brand-rgb), 0.25), 0 4px 12px rgba(var(--brand-rgb), 0.2); }
.btn-primary:hover { box-shadow: 0 2px 4px rgba(var(--brand-rgb), 0.3), 0 8px 20px rgba(var(--brand-rgb), 0.25); }
.btn:active { transform: translateY(1px); }

.card {
  --bs-card-border-color: var(--bs-border-color-translucent);
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
}
.card.shadow-sm { transition: box-shadow 0.2s ease; }
.badge { font-weight: 600; letter-spacing: 0.01em; }
.form-control, .form-select { border-radius: var(--bs-border-radius); }
.dropdown-menu {
  --bs-dropdown-border-color: var(--bs-border-color-translucent);
  --bs-dropdown-link-active-bg: var(--brand-hover);
  box-shadow: var(--bs-box-shadow);
  padding: 0.4rem;
}
.dropdown-item { border-radius: 0.5rem; }

/* ---- Layout ------------------------------------------------------------- */
html { scroll-padding-top: 5rem; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--surface-muted);
  overflow-x: hidden;
}
main:focus { outline: none; }

.site-navbar {
  --bs-bg-opacity: 0;         /* the frosted ::before layer paints the background */
  --bs-border-color: var(--bs-border-color-translucent);
  padding-top: max(0.5rem, env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
/* Frosted glass on a pseudo-element: backdrop-filter on the navbar itself would make
   it the containing block of the fixed offcanvas menus and widen the page on phones. */
.site-navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(var(--bs-body-bg-rgb), 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
.nav-icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-body-color);
}
.notif-badge {
  --bs-bg-opacity: 1;  /* the navbar sets 0 for its own glass background; the badge must stay solid red */
  position: absolute;
  top: 2px;
  left: 1.1rem;
  font-size: 0.65rem;
}
@media (max-width: 991.98px) {
  .notif-badge { position: static; margin-left: 0.5rem; }
  .offcanvas .nav-link { padding-top: 0.75rem; padding-bottom: 0.75rem; }
}
.offcanvas {
  padding-bottom: env(safe-area-inset-bottom);
}

.site-footer {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.site-toasts {
  z-index: 1090;
  /* below the sticky navbar so toasts never cover the menu */
  padding-top: calc(4.25rem + env(safe-area-inset-top));
  max-width: 100%;
}
.site-toasts .toast {
  --bs-toast-bg: var(--bs-body-bg);   /* opaque, so text stays readable */
  --bs-toast-header-bg: var(--bs-tertiary-bg);
  --bs-toast-max-width: min(360px, calc(100vw - 2rem));
}

/* ---- Forms -------------------------------------------------------------- */
/* 16px+ inputs stop iOS Safari from zooming in on focus. */
.form-control,
.form-select,
.form-control-sm,
.form-select-sm {
  font-size: max(1rem, 16px);
}
.form-floating > .form-control,
.form-floating > .form-select {
  font-size: max(1rem, 16px);
}

.mobile-input .country-code {
  flex: 0 0 7.5rem;
  max-width: 7.5rem;
}
.mobile-input .country-code .form-select {
  padding-right: 1.75rem;
}
.mobile-input > .form-floating { min-width: 0; }
/* Long floating labels get an ellipsis instead of widening the page. */
.form-floating > label { max-width: 100%; }
.otp-input {
  letter-spacing: 0.5em;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Honeypot: off-screen for humans, still in the DOM for bots. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.password-strength .progress { background-color: var(--bs-secondary-bg); }
.asteriskField { margin-left: 0.15rem; color: var(--bs-danger-text-emphasis); }

/* ---- Touch targets ------------------------------------------------------ */
@media (pointer: coarse) {
  .btn:not(.btn-close):not(.btn-sm),
  .nav-link,
  .page-link,
  .dropdown-item {
    min-height: 44px;
  }
  .btn,
  .nav-link { display: inline-flex; align-items: center; justify-content: center; }
  .nav-link { justify-content: flex-start; }
  .btn-sm { min-height: 36px; }
  .form-check-input { width: 1.35em; height: 1.35em; }
  .btn-close { padding: 0.75rem; }
}

/* ---- Components --------------------------------------------------------- */
.auth-icon { width: 64px; height: 64px; }
.auth-card { border-radius: var(--bs-border-radius-lg); }
.profile-avatar { width: 96px; height: 96px; flex: 0 0 96px; }
.hero-mark { font-size: 12rem; opacity: 0.85; }
.quick-link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.quick-link:hover,
.quick-link:focus-visible { transform: translateY(-2px); }

/* Visible focus for keyboard users everywhere. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), 0.6);
  outline-offset: 2px;
}

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

/* ---- Print -------------------------------------------------------------- */
@media print {
  .site-navbar,
  .site-footer,
  .site-toasts,
  .btn,
  form { display: none; }
  body { background: #fff; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}

/* ---- Home: hero & trust strip ------------------------------------------- */
.hero {
  background:
    radial-gradient(60rem 28rem at 85% -10%, rgba(var(--brand-rgb), 0.16), transparent 60%),
    radial-gradient(40rem 22rem at -10% 10%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.05), transparent);
}
.hero-mark {
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 12px 24px rgba(var(--brand-rgb), 0.25));
}
.trust-item {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1rem 0.75rem;
  text-align: center;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.trust-item:hover { transform: translateY(-2px); box-shadow: var(--bs-box-shadow); }
.trust-value { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.2; color: var(--bs-link-color); font-variant-numeric: tabular-nums; }
.trust-label { display: block; font-size: 0.8rem; color: var(--bs-secondary-color); }

/* ---- Lead lists --------------------------------------------------------- */
.lead-table th { white-space: nowrap; font-size: 0.85rem; }
.lead-title-cell { max-width: 12rem; }
@media (min-width: 1400px) { .lead-title-cell { max-width: 15rem; } }
/* In the lead table the title column takes the space that is left and truncates. */
td.lead-title-cell { max-width: 0; width: 100%; min-width: 6rem; }
.lead-card-actions > .btn { flex: 1 1 auto; }
.my-leads-tabs { scrollbar-width: thin; }
.status-badge { font-weight: 600; }

@media (min-width: 992px) {
  .filters-sidebar { position: sticky; top: 5.5rem; }
  .filters-panel .offcanvas-body {
    background: var(--bs-body-bg);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-box-shadow-sm);
    padding: 1.25rem;
  }
  .action-sticky { top: 5.5rem; z-index: 1; }
}

/* ---- Lead progress (horizontal on md+, vertical on phones) -------------- */
.lead-progress { display: flex; flex-direction: column; gap: 0.75rem; position: relative; }
.lead-progress-step { display: flex; align-items: center; gap: 0.6rem; position: relative; }
.lead-progress-dot {
  width: 2rem; height: 2rem; flex: 0 0 2rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  background: var(--bs-secondary-bg); color: var(--bs-secondary-color);
  border: 2px solid var(--bs-border-color);
  position: relative; z-index: 1;
}
.lead-progress-step.is-done .lead-progress-dot { background: var(--bs-success); border-color: var(--bs-success); color: #fff; }
.lead-progress-step.is-current .lead-progress-dot { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.lead-progress-step.is-current .lead-progress-label { font-weight: 700; }
.lead-progress-step:not(:last-child)::after {
  content: ""; position: absolute; left: calc(1rem - 1px); top: 2rem;
  width: 2px; height: 0.75rem; background: var(--bs-border-color);
}
.lead-progress-step.is-done:not(:last-child)::after { background: var(--bs-success); }
@media (min-width: 768px) {
  .lead-progress { flex-direction: row; gap: 0; }
  .lead-progress-step { flex: 1 1 0; flex-direction: column; text-align: center; gap: 0.4rem; }
  .lead-progress-step:not(:last-child)::after {
    left: calc(50% + 1rem); right: calc(-50% + 1rem); top: 1rem; width: auto; height: 2px;
  }
  .lead-progress-label { font-size: 0.85rem; }
}

/* ---- Lightbox ------------------------------------------------------------ */
.lightbox-img { max-width: 100%; max-height: calc(100dvh - 8rem); object-fit: contain; }
.lightbox-modal .modal-content { padding-bottom: env(safe-area-inset-bottom); }

/* ---- Work submission, proof files, payment ------------------------------ */
.min-w-0 { min-width: 0; }
.proof-icon { width: 88px; height: 88px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.5rem; border-radius: var(--bs-border-radius); background: var(--bs-secondary-bg); }
.upi-qr { width: 160px; height: 160px; }
.star-input { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.star-input .btn { min-width: 3.25rem; }
fieldset > legend.h6 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

@media print {
  .page-lead-detail .action-panel,
  .page-lead-detail #requests,
  .page-lead-detail #submit-work,
  .page-lead-detail .breadcrumb,
  .lead-progress { display: none; }
  .page-lead-detail .col-lg-8 { width: 100%; }
  .payment-card dl { font-size: 1rem; }
}

/* ---- Notifications ------------------------------------------------------ */
.notification-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-primary-bg-subtle); color: var(--bs-link-color); font-size: 1.1rem;
}
.notification-unread { background: rgba(var(--brand-rgb), 0.06); }
.notification-unread .notification-title { font-weight: 700; }
.unread-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--brand-hover); margin-top: 0.4rem; }
.filter-chips { scrollbar-width: thin; }
.filter-chips .nav-link { border: 1px solid var(--bs-border-color); font-size: 0.875rem; }

/* ---- Message thread ----------------------------------------------------- */
.message-thread { max-height: 24rem; overflow-y: auto; overscroll-behavior: contain; }
.message-bubble { max-width: min(85%, 32rem); padding: 0.5rem 0.75rem; border-radius: 1rem; word-wrap: break-word; }
.message-mine { background: var(--brand-hover); color: #fff; border-bottom-right-radius: 0.25rem; }
.message-mine a { color: #fff; }
.message-theirs { background: var(--bs-secondary-bg); border-bottom-left-radius: 0.25rem; }
.message-time { display: block; font-size: 0.7rem; opacity: 0.8; margin-top: 0.15rem; }
.message-form textarea { resize: vertical; }

/* ---- Dashboard ---------------------------------------------------------- */
.dashboard .card { border: 0; box-shadow: var(--bs-box-shadow-sm); background: var(--chart-surface); }
.stat-card { transition: transform 0.15s ease; }
.stat-card:hover, .stat-card:focus-within { transform: translateY(-2px); box-shadow: var(--bs-box-shadow); }
.stat-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--bs-secondary-color); }
.stat-label .bi { color: var(--bs-link-color); font-size: 1.1rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin: 0.35rem 0; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 0.85rem; font-weight: 500; color: var(--bs-secondary-color); }
.stat-attention { box-shadow: inset 4px 0 0 var(--bs-warning), var(--bs-box-shadow-sm); }
.chart-box { position: relative; height: 260px; min-height: 220px; }
.chart-card[data-chart="status"] .chart-box { height: 300px; }
.chart-box canvas { position: absolute; inset: 0; }
.chart-skeleton { position: absolute; inset: 0; display: flex; }
.chart-skeleton .placeholder { opacity: 0.15; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0; }
.chart-empty[hidden], .chart-box canvas[hidden], .chart-skeleton[hidden] { display: none; }
.chart-table summary { cursor: pointer; color: var(--bs-link-color); }
.quick-links .list-group-item { background: transparent; }

/* ---- Home: Why section ---------------------------------------------------- */
.hero-points li { max-width: 22rem; }
.why-section { background: var(--bs-body-bg); }
.why-tag { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.why-tag-problem { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.why-tag-solution { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.why-card { background: var(--surface-muted); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.why-card:hover { transform: translateY(-2px); box-shadow: var(--bs-box-shadow); }
.why-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.why-icon-problem { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.why-icon-solution { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }

/* Fade-in on scroll (class added by JS only when motion is allowed). */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- How It Works timeline ----------------------------------------------
   phones: vertical line on the left · tablets (md): 2-column grid ·
   desktop (lg+): horizontal numbered circles joined by a line            */
.how-tabs .nav-link { border: 1px solid var(--bs-border-color); }
.how-steps { position: relative; display: flex; flex-direction: column; gap: 1.25rem; padding-left: 0; }
.how-step { position: relative; display: flex; gap: 1rem; align-items: flex-start; }
.how-num {
  flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-hover), var(--brand-active)); color: #fff; font-weight: 700; font-size: 1.1rem;
  position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bs-body-bg), 0 4px 12px rgba(var(--brand-rgb), 0.3);
}
.how-body { background: var(--bs-body-bg); border-radius: var(--bs-border-radius-lg); padding: 0.9rem 1rem; box-shadow: var(--bs-box-shadow-sm); flex: 1; }
.how-icon { font-size: 1.4rem; color: var(--bs-link-color); display: block; margin-bottom: 0.25rem; }
.how-step:not(:last-child)::before {   /* vertical connector (phones) */
  content: ""; position: absolute; left: calc(1.375rem - 1px); top: 2.75rem; bottom: -1.25rem;
  width: 2px; background: rgba(var(--brand-rgb), 0.3);
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .how-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .how-step:not(:last-child)::before { display: none; }
}
@media (min-width: 992px) {
  .how-steps { flex-direction: row; gap: 1rem; }
  .how-step { flex: 1 1 0; flex-direction: column; align-items: center; text-align: center; }
  .how-step:not(:last-child)::before {   /* horizontal connector */
    left: calc(50% + 1.375rem); right: calc(-50% - 1rem + 1.375rem); top: calc(1.375rem - 1px);
    bottom: auto; width: auto; height: 2px;
  }
  .how-body { width: 100%; height: 100%; }
}
.how-section { background: var(--surface-muted); }

/* ---- Status flow ---------------------------------------------------------- */
.status-chip { font-size: 0.85rem; padding: 0.55em 0.9em; cursor: help; min-height: 32px; }
@media (pointer: coarse) { .status-chip { min-height: 44px; padding: 0.75em 1em; } }

/* ---- Video facade ---------------------------------------------------------- */
.video-play {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 4.5rem; height: 4.5rem; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
}
.video-facade iframe { border: 0; }

/* ---- Final call to action -------------------------------------------------- */
.final-cta {
  background:
    radial-gradient(30rem 16rem at 90% 0%, rgba(52, 211, 153, 0.35), transparent 60%),
    linear-gradient(135deg, #134e4a, #115e59 55%, #0f766e);
  color: #fff;
}
.final-cta .cta-sub { color: rgba(255, 255, 255, 0.88); }
.final-cta .btn-light { color: #134e4a; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }

/* ---- Bottom navigation (phones) ------------------------------------------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  background: rgba(var(--bs-body-bg-rgb), 0.9); border-top: 1px solid var(--bs-border-color-translucent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.06);
  padding: 0.25rem max(0.25rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0.25rem, env(safe-area-inset-left));
}
.bottom-nav li { flex: 1 1 0; text-align: center; }
.bottom-nav-link, .bottom-nav-create {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 44px; min-height: 52px; padding: 0.25rem 0.35rem;
  color: var(--bs-secondary-color); text-decoration: none; font-size: 0.7rem; line-height: 1.2;
}
.bottom-nav-link .bi { font-size: 1.3rem; }
.bottom-nav-link.active { color: var(--bs-link-color); font-weight: 600; }
.bottom-nav-create { color: var(--bs-body-color); }
.bottom-nav-create-btn {
  width: 3.25rem; height: 3.25rem; margin-top: -1.5rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-hover), var(--brand-active)); color: #fff; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0.35rem 0.9rem rgba(var(--brand-rgb), 0.45), 0 0 0 4px var(--bs-body-bg);
}
.bottom-nav-badge { position: absolute; top: 0.1rem; left: 50%; margin-left: 0.35rem; font-size: 0.6rem; }
@media (max-width: 767.98px) {
  body.has-bottom-nav { padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .site-toasts { padding-top: calc(4.25rem + env(safe-area-inset-top)); }
}
@media print { .bottom-nav, .final-cta, .how-tabs, .status-flow { display: none; } }

/* ---- Site-wide polish ------------------------------------------------------- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; }
.card-title, .card h2.h5, .card h2.h6 { font-weight: 700; }
.form-label, .form-floating > label, legend { font-weight: 500; }

/* Navbar links: medium weight, tinted pill for the current page. */
.site-navbar .nav-link { font-weight: 500; color: var(--bs-secondary-color); border-radius: 0.6rem; }
.site-navbar .nav-link:hover { color: var(--bs-body-color); }
.site-navbar .nav-link.active { color: var(--bs-link-color); }
@media (min-width: 992px) {
  .site-navbar .navbar-nav .nav-link { padding-left: 0.75rem; padding-right: 0.75rem; }
  .site-navbar .nav-link:hover { background: var(--bs-tertiary-bg); }
  .site-navbar .nav-link.active { background: var(--bs-primary-bg-subtle); }
  /* keep the unread badge from sitting on the next link */
  .site-navbar .nav-link:has(.notif-badge:not(.d-none)) { margin-right: 0.6rem; }
}

/* Inline codes (token number, UPI ID) in brand colours instead of pink. */
code {
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  padding: 0.15em 0.45em;
  border-radius: 0.4rem;
  font-size: 0.85em;
}

/* Tables: quiet uppercase header, compact cells, rounded inside cards. */
.table { --bs-table-hover-bg: rgba(var(--brand-rgb), 0.04); }
.table > thead > tr > th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table > :not(caption) > * > * { padding: 0.75rem 0.6rem; }
.table > :not(caption) > * > *:first-child { padding-left: 1rem; }
.table > :not(caption) > * > *:last-child { padding-right: 1rem; }
/* Clip the header corners on the card itself so the table can still scroll sideways. */
.card:has(> .table-responsive) { overflow: hidden; }
.lead-table .btn-sm { white-space: nowrap; }

/* Soft pills */
.badge.border { border-width: 1px; }
.nav-pills .nav-link:not(.active):hover { background: var(--bs-tertiary-bg); }
.nav-pills .nav-link { font-weight: 500; }

/* Dashboard stat tiles: icon in a tinted square. */
.stat-label .bi {
  width: 2rem; height: 2rem; flex: 0 0 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.6rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  font-size: 1rem;
}
.stat-value { font-weight: 800; letter-spacing: -0.02em; }
.dashboard .card { border: 1px solid var(--bs-border-color-translucent); }

/* ---- Dashboard refresh: hero, accented tiles, activity lists ---------------- */
.dashboard .card { border-radius: var(--bs-border-radius-lg); }
.dashboard .card-body { padding: 1.25rem; }

.dash-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--bs-border-radius-xl);
  color: #fff;
  background:
    radial-gradient(22rem 12rem at 90% -10%, rgba(52, 211, 153, 0.5), transparent 70%),
    radial-gradient(16rem 10rem at 0% 120%, rgba(45, 212, 191, 0.3), transparent 70%),
    linear-gradient(135deg, #134e4a, #0f766e 55%, #0d9488);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.25);
}
.dash-hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.dash-hero-sub { color: rgba(255, 255, 255, 0.85); }
.dash-hero .btn-primary {
  --bs-btn-bg: #fff;
  --bs-btn-color: #134e4a;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: #ccfbf1;
  --bs-btn-hover-color: #134e4a;
  --bs-btn-hover-border-color: #ccfbf1;
  --bs-btn-active-bg: #99f6e4;
  --bs-btn-active-color: #134e4a;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
@media (min-width: 768px) { .dash-hero { padding: 2rem 2.25rem; } }

/* each tile gets its own accent: a top bar and a tinted icon */
.stat-grid > :nth-child(1) { --accent: #0f766e; }
.stat-grid > :nth-child(2) { --accent: #2563eb; }
.stat-grid > :nth-child(3) { --accent: #7c3aed; }
.stat-grid > :nth-child(4) { --accent: #d97706; }
.stat-grid > :nth-child(5) { --accent: #4f46e5; }
.stat-grid > :nth-child(6) { --accent: #059669; }
.stat-grid > :nth-child(7) { --accent: #db2777; }
.stat-grid > :nth-child(8) { --accent: #ea580c; }
[data-bs-theme="dark"] .stat-grid > :nth-child(1) { --accent: #2dd4bf; }
[data-bs-theme="dark"] .stat-grid > :nth-child(2) { --accent: #60a5fa; }
[data-bs-theme="dark"] .stat-grid > :nth-child(3) { --accent: #a78bfa; }
[data-bs-theme="dark"] .stat-grid > :nth-child(4) { --accent: #fbbf24; }
[data-bs-theme="dark"] .stat-grid > :nth-child(5) { --accent: #818cf8; }
[data-bs-theme="dark"] .stat-grid > :nth-child(6) { --accent: #34d399; }
[data-bs-theme="dark"] .stat-grid > :nth-child(7) { --accent: #f472b6; }
[data-bs-theme="dark"] .stat-grid > :nth-child(8) { --accent: #fb923c; }

.stat-grid .stat-card { overflow: hidden; }
.stat-grid .stat-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent));
  pointer-events: none;
}
.stat-grid .stat-label .bi {
  width: 2.5rem; height: 2.5rem; flex-basis: 2.5rem;
  border-radius: 0.8rem;
  font-size: 1.15rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.stat-grid .stat-label { font-weight: 600; color: var(--bs-body-color); }
.stat-grid .stat-value { font-size: 2rem; margin: 0.6rem 0 0.25rem; }
.stat-grid .stretched-link { font-weight: 600; color: var(--accent); text-decoration: none; }
.stat-grid .stat-card:hover .stretched-link { text-decoration: underline; }
.stat-card:hover, .stat-card:focus-within { transform: translateY(-3px); }
.stat-grid .stat-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* charts, quick links and activity cards */
.dashboard .chart-card h3,
.dashboard section > .card-body h2,
.dashboard .card-body > h3 { font-weight: 700; }
.quick-links .list-group-item {
  border-radius: 0.6rem; border: 0; margin-bottom: 0.15rem;
  font-weight: 500; transition: background-color 0.15s ease, padding-left 0.15s ease;
}
.quick-links .list-group-item .bi { color: var(--bs-link-color); }
.quick-links .list-group-item:hover { background: var(--bs-primary-bg-subtle); padding-left: 1.4rem; }

.activity-list > li {
  --bs-border-color: var(--bs-border-color-translucent);
  padding-left: 0.5rem; padding-right: 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 0.6rem;
  transition: background-color 0.15s ease;
}
.activity-list > li:hover { background: var(--bs-tertiary-bg); }
.activity-list > li > .bi {
  width: 2rem; height: 2rem; flex: 0 0 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bs-primary-bg-subtle);
}
@media (prefers-reduced-motion: reduce) {
  .stat-card, .quick-links .list-group-item, .activity-list > li { transition: none; }
  .stat-card:hover, .stat-card:focus-within { transform: none; }
}

/* Breadcrumbs, alerts, modals, list groups */
.breadcrumb { font-size: 0.875rem; --bs-breadcrumb-divider-color: var(--bs-tertiary-color); }
.breadcrumb a { text-decoration: none; font-weight: 500; }
.alert { border-radius: var(--bs-border-radius-lg); }
.modal { --bs-modal-border-radius: var(--bs-border-radius-xl); --bs-modal-border-color: transparent; }
.modal-content { box-shadow: var(--bs-box-shadow); }
.offcanvas { --bs-offcanvas-border-color: var(--bs-border-color-translucent); }
.list-group { --bs-list-group-border-color: var(--bs-border-color-translucent); }
.accordion {
  --bs-accordion-border-color: var(--bs-border-color-translucent);
  --bs-accordion-active-bg: var(--bs-primary-bg-subtle);
  --bs-accordion-active-color: var(--bs-primary-text-emphasis);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}
.accordion-button { font-weight: 600; }

/* Footer: brand teal in both themes, light text */
.site-footer {
  --footer-text: rgba(255, 255, 255, 0.78);
  --footer-muted: rgba(255, 255, 255, 0.6);
  position: relative;
  padding-top: 3rem;
  color: var(--footer-text);
  background:
    radial-gradient(40rem 16rem at 100% 0%, rgba(52, 211, 153, 0.22), transparent 70%),
    linear-gradient(160deg, #0b3f3b, #0f4f4a 55%, #115e59);
  border-top: 3px solid var(--brand-accent);
}
.site-footer a { text-decoration: none; color: var(--footer-text); transition: color 0.15s ease; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; }
.site-footer a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 0.25rem; }

.site-footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; font-weight: 800; }
.site-footer .site-footer-brand { color: #fff; }
.site-footer-logo {
  width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.8rem; font-size: 1.35rem; color: #fff;
  background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.site-footer-tagline { margin: 0.85rem 0 1rem; max-width: 22rem; font-size: 0.9rem; line-height: 1.6; }
.site-footer-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.site-footer-badges li {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.site-footer-badges .bi { color: var(--brand-accent); }

.site-footer-heading {
  margin-bottom: 0.9rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #fff;
}
.site-footer-links li + li { margin-top: 0.55rem; }
.site-footer-links a { position: relative; font-size: 0.92rem; }
.site-footer-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.site-footer-links a:hover::after { transform: scaleX(1); }

.site-footer-contact li + li { margin-top: 0.6rem; }
.site-footer-contact a { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; word-break: break-word; }
.site-footer-icon {
  flex: 0 0 2rem; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--brand-accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-footer-contact a:hover .site-footer-icon { background: var(--brand-accent); color: #0b3f3b; }
.site-footer-social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.site-footer-social a {
  width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1.05rem; background: rgba(255, 255, 255, 0.1);
}
.site-footer-social a:hover { background: var(--brand-accent); color: #0b3f3b; }

.site-footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  margin-top: 2.5rem; padding: 1.25rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem; color: var(--footer-muted);
}
.site-footer-bottom .bi-heart-fill { color: #f87171; font-size: 0.75rem; margin: 0 0.15rem; }
.site-footer .site-footer-top {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem; border-radius: 999px; font-weight: 600;
  background: rgba(255, 255, 255, 0.1); color: #fff;
}
.site-footer .site-footer-top:hover { background: #fff; color: #0b3f3b; }
@media (max-width: 767.98px) {
  .site-footer { padding-top: 2.25rem; text-align: left; }
  .site-footer-bottom { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer a, .site-footer-links a::after, .site-footer-icon { transition: none; }
}

/* ---- Login / logout popup ---------------------------------------------------- */
.auth-popup .modal-content { overflow: hidden; border: 0; }
.auth-popup .modal-dialog { max-width: 22rem; }
.auth-popup-band {
  position: relative;
  height: 7.5rem;
  display: flex; align-items: flex-end; justify-content: center;
  background:
    radial-gradient(14rem 7rem at 80% 0%, rgba(52, 211, 153, 0.55), transparent 70%),
    linear-gradient(135deg, #134e4a, #0f766e 60%, #0d9488);
}
.auth-popup-logout .auth-popup-band {
  background:
    radial-gradient(14rem 7rem at 80% 0%, rgba(148, 163, 184, 0.45), transparent 70%),
    linear-gradient(135deg, #1e293b, #334155 60%, #475569);
}
.auth-popup-icon {
  width: 4.5rem; height: 4.5rem; margin-bottom: -2.25rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bs-body-bg); color: var(--bs-link-color); font-size: 2rem;
  box-shadow: 0 0 0 6px rgba(var(--bs-body-bg-rgb), 0.35), 0 10px 24px rgba(0, 0, 0, 0.18);
  position: relative; z-index: 1;
  transform: scale(0.4); opacity: 0;
}
.auth-popup-logout .auth-popup-icon { color: var(--bs-secondary-color); }
.auth-popup.is-shown .auth-popup-icon { animation: auth-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.auth-popup .modal-body { padding-top: 3rem; }
.auth-popup.is-shown .modal-body > * { animation: auth-rise 0.45s ease both; }
.auth-popup.is-shown .modal-body > :nth-child(2) { animation-delay: 0.08s; }
.auth-popup.is-shown .modal-body > :nth-child(3) { animation-delay: 0.16s; }

/* little sparkles drifting up out of the band */
.auth-popup-spark {
  position: absolute; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: rgba(255, 255, 255, 0.75); opacity: 0;
}
.auth-popup-spark.s1 { left: 18%; bottom: 1.5rem; }
.auth-popup-spark.s2 { left: 32%; bottom: 3.5rem; width: 0.35rem; height: 0.35rem; }
.auth-popup-spark.s3 { right: 22%; bottom: 2rem; }
.auth-popup-spark.s4 { right: 36%; bottom: 4.5rem; width: 0.3rem; height: 0.3rem; }
.auth-popup.is-shown .auth-popup-spark { animation: auth-spark 1.6s ease-out 0.2s both; }
.auth-popup.is-shown .auth-popup-spark.s2 { animation-delay: 0.35s; }
.auth-popup.is-shown .auth-popup-spark.s3 { animation-delay: 0.3s; }
.auth-popup.is-shown .auth-popup-spark.s4 { animation-delay: 0.5s; }

/* auto-close timer bar; hovering or focusing the popup pauses it */
.auth-popup-timer { height: 4px; background: var(--bs-tertiary-bg); }
.auth-popup-timer span {
  display: block; height: 100%; width: 100%; transform-origin: left;
  background: linear-gradient(90deg, var(--brand), var(--brand-accent));
}
.auth-popup-logout .auth-popup-timer span { background: var(--bs-secondary-color); }
.auth-popup.is-shown .auth-popup-timer span { animation: auth-timer 4.5s linear forwards; }
.auth-popup .modal-content:focus-within .auth-popup-timer span { animation-play-state: paused; }

@keyframes auth-pop { to { transform: scale(1); opacity: 1; } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes auth-spark {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-2.5rem) scale(1.2); }
}
@keyframes auth-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .auth-popup-icon { transform: none; opacity: 1; }
  .auth-popup-timer { display: none; }
}

/* ---- Error & legal pages ---------------------------------------------------- */
.legal-page h2 { scroll-margin-top: 5rem; }

/* ---- Offline page ----------------------------------------------------------- */
.offline-page { min-height: 100dvh; }
.offline-card { max-width: 28rem; width: 100%; }

/* ---- Create / edit lead form ------------------------------------------------ */
.lead-form-hero {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.5rem; margin-bottom: 1.25rem;
  border-radius: var(--bs-border-radius-xl);
  color: #fff;
  background:
    radial-gradient(20rem 10rem at 95% -20%, rgba(52, 211, 153, 0.5), transparent 70%),
    linear-gradient(135deg, #134e4a, #0f766e 55%, #0d9488);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.22);
}
.lead-form-hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.lead-form-hero p { color: rgba(255, 255, 255, 0.86); }
.lead-form-hero-icon {
  flex: 0 0 3.25rem; width: 3.25rem; height: 3.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 1rem; font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.lead-form-perks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.lead-form-perks li {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
}
@media (min-width: 768px) { .lead-form-hero { padding: 2rem; } }

/* each fieldset is a card with a numbered icon */
.lead-form { counter-reset: form-section; }
.lead-form .form-section {
  counter-increment: form-section;
  position: relative;
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.lead-form .form-section:hover { transform: translateY(-1px); box-shadow: var(--bs-box-shadow); }
.lead-form .form-section:focus-within {
  border-color: rgba(var(--brand-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.08), var(--bs-box-shadow);
}
.lead-form .form-section > legend {
  float: left; width: 100%;  /* Bootstrap's float keeps the legend inside the card, not on its border */
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--bs-border-color);
}
.form-section-icon {
  position: relative; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.8rem; font-size: 1.15rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.form-section-icon::after {
  content: counter(form-section);
  position: absolute; top: -0.4rem; right: -0.4rem;
  min-width: 1.2rem; height: 1.2rem; padding: 0 0.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  background: var(--brand-hover); color: #fff; box-shadow: 0 0 0 2px var(--bs-body-bg);
}
.lead-form .form-section:focus-within .form-section-icon { background: var(--brand-hover); color: #fff; }
.form-section-title { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.form-section-hint { display: block; font-size: 0.82rem; font-weight: 400; color: var(--bs-secondary-color); }

/* fields */
.lead-form .form-label { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; }
.lead-form .asteriskField { color: var(--bs-danger); margin-left: 0.15rem; }
.lead-form .form-control,
.lead-form .form-select {
  min-height: 2.9rem; font-size: 1rem;
  background-color: var(--surface-muted);
  border-color: var(--bs-border-color-translucent);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-form .form-control:hover:not(:focus),
.lead-form .form-select:hover:not(:focus) { border-color: rgba(var(--brand-rgb), 0.45); }
.lead-form .form-control:focus,
.lead-form .form-select:focus { background-color: var(--bs-body-bg); }
.lead-form .form-control::placeholder { color: var(--bs-tertiary-color); }
.lead-form .form-text { font-size: 0.8rem; }
.lead-form .invalid-feedback { font-weight: 500; }

.work-type-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 600;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
  border: 1px solid var(--bs-primary-border-subtle);
}

/* radio buttons drawn as pills (urgency coloured by level, owner/tenant in the brand colour) */
.choice-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; clear: left; }
.choice-pills .form-check { --pill: var(--brand); position: relative; margin: 0; padding: 0; }
.choice-pills .form-check-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-pills .form-check-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.6rem; padding: 0.45rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--bs-border-color); background: var(--surface-muted);
  font-weight: 600; cursor: pointer; user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.choice-pills .form-check-label::before {
  content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pill);
}
.urgency-pills .form-check:nth-child(1) { --pill: var(--bs-success); }
.urgency-pills .form-check:nth-child(2) { --pill: var(--bs-info); }
.urgency-pills .form-check:nth-child(3) { --pill: var(--bs-warning); }
.urgency-pills .form-check:nth-child(4) { --pill: var(--bs-danger); }
.choice-pills .form-check-input:hover + .form-check-label { border-color: var(--pill); }
.choice-pills .form-check-input:checked + .form-check-label {
  border-color: var(--pill); color: var(--bs-body-color);
  background: color-mix(in srgb, var(--pill) 16%, var(--bs-body-bg));
  box-shadow: inset 0 0 0 1px var(--pill);
}
.choice-pills .form-check-input:focus-visible + .form-check-label { box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color); }

/* private token section */
.lead-form .form-section-private {
  background: linear-gradient(180deg, rgba(var(--bs-warning-rgb), 0.07), transparent 60%), var(--bs-body-bg);
  border-color: rgba(var(--bs-warning-rgb), 0.35);
}
.lead-form .form-section-private .form-section-icon { background: rgba(var(--bs-warning-rgb), 0.18); color: var(--bs-warning-text-emphasis); }

/* image upload as a drop area */
.lead-form .form-section-upload input[type="file"] {
  min-height: 5.5rem; padding: 1.75rem 1rem; text-align: center; cursor: pointer;
  border: 2px dashed rgba(var(--brand-rgb), 0.35); background: rgba(var(--brand-rgb), 0.04);
}
.lead-form .form-section-upload input[type="file"]:hover { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.08); }
.lead-form .form-section-upload input[type="file"]::file-selector-button {
  margin-right: 0.75rem; border: 0; border-radius: 999px; padding: 0.4rem 1rem;
  background: var(--brand-hover); color: #fff; font-weight: 600;
}

/* actions stay in reach while scrolling */
.lead-form-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem;
  margin: 1.25rem -0.25rem 0; padding: 0.85rem 1rem;
  border-radius: var(--bs-border-radius-lg);
  background: rgba(var(--bs-body-bg-rgb), 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: 0 -0.25rem 1.25rem rgba(16, 24, 40, 0.08);
}
.lead-form-actions .btn-primary { min-width: 11rem; }
@media (max-width: 575.98px) {
  .lead-form-actions .btn { flex: 1 1 auto; }
  .lead-form .form-section { padding: 1rem 1rem 0.25rem; }
}
@media (max-width: 767.98px) {
  body.has-bottom-nav .lead-form-actions { bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 0.25rem); }
}
@media (prefers-reduced-motion: reduce) {
  .lead-form .form-section, .lead-form .form-section-icon,
  .lead-form .form-control, .lead-form .form-select, .choice-pills .form-check-label { transition: none; }
  .lead-form .form-section:hover { transform: none; }
}

/* ---- Dashboard, second pass: hero to-dos, section titles, tiles, timeline -------- */
.dash-hero-date { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.75); }
.dash-hero-todo { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.dash-hero-todo a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transition: background-color 0.15s ease;
}
.dash-hero-todo a:hover, .dash-hero-todo a:focus-visible { background: rgba(255, 255, 255, 0.28); color: #fff; }
.dash-hero .btn-lg { padding: 0.65rem 1.4rem; }

.dash-section-title {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.25rem 0 0.85rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.dash-section-title::after { content: ""; flex: 1; height: 1px; background: var(--bs-border-color-translucent); }
.dash-section-title .bi { color: var(--bs-link-color); font-size: 0.95rem; }

.dash-card-title {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1rem; font-weight: 700; margin-bottom: 0.9rem;
}
.chart-card .dash-card-title { margin-bottom: 0.1rem; }
.dash-card-icon {
  flex: 0 0 2rem; width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.6rem; font-size: 1rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
}
.dashboard .card { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.dashboard .card:hover { box-shadow: var(--bs-box-shadow); }

/* quick links: icon tiles */
.quick-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.quick-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
  padding: 0.85rem; border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color-translucent); background: var(--surface-muted);
  color: var(--bs-body-color); font-size: 0.875rem; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.quick-tile .bi { font-size: 1.3rem; color: var(--bs-link-color); }
.quick-tile:hover, .quick-tile:focus-visible {
  transform: translateY(-2px); color: var(--bs-body-color);
  border-color: rgba(var(--brand-rgb), 0.45); background: var(--bs-primary-bg-subtle);
}

/* notifications: a dot marks unread ones */
.activity-list > li.is-unread { background: rgba(var(--brand-rgb), 0.05); }
.activity-list > li.is-unread::after {
  content: ""; flex: 0 0 0.5rem; width: 0.5rem; height: 0.5rem; margin: 0.6rem 0 0 auto;
  border-radius: 50%; background: var(--brand-accent);
}

/* status updates: a vertical timeline, the marker takes the status colour */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before {
  content: ""; position: absolute; left: 0.35rem; top: 0.5rem; bottom: 0.5rem;
  width: 2px; border-radius: 2px; background: var(--bs-border-color);
}
.timeline-item { position: relative; display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.4rem; top: 0.75rem;
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--marker, var(--bs-secondary)); box-shadow: 0 0 0 3px var(--chart-surface);
}
.timeline-success { --marker: var(--bs-success); }
.timeline-primary { --marker: var(--brand); }
.timeline-warning { --marker: var(--bs-warning); }
.timeline-info { --marker: var(--bs-info); }
.timeline-danger { --marker: var(--bs-danger); }
.timeline-secondary { --marker: var(--bs-secondary); }
.timeline-item .badge { flex-shrink: 0; margin-top: 0.15rem; }
.timeline-item > .min-w-0 { flex: 1 1 auto; }
.timeline-item > .min-w-0 > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* long titles end in "…" */

@media (prefers-reduced-motion: reduce) {
  .dash-hero-todo a, .quick-tile, .dashboard .card { transition: none; }
  .quick-tile:hover { transform: none; }
}

/* ---- My Leads: page hero, tabs with counts, filter card, table, phone cards ------- */
.page-hero {
  padding: 1.25rem 1.5rem;
  border-radius: var(--bs-border-radius-xl);
  color: #fff;
  background:
    radial-gradient(20rem 10rem at 95% -20%, rgba(52, 211, 153, 0.5), transparent 70%),
    linear-gradient(135deg, #134e4a, #0f766e 55%, #0d9488);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.22);
}
.page-hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { color: rgba(255, 255, 255, 0.86); }
.page-hero-icon {
  flex: 0 0 3rem; width: 3rem; height: 3rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.9rem; font-size: 1.45rem;
  background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.page-hero-btn { color: #134e4a; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); }
@media (max-width: 575.98px) { .page-hero-btn { width: 100%; } }

/* tabs: a segmented control with counts */
.my-leads-tabs {
  gap: 0.25rem; padding: 0.3rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent);
  border-radius: 999px; box-shadow: var(--bs-box-shadow-sm);
}
.my-leads-tabs .nav-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.95rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; color: var(--bs-secondary-color);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.my-leads-tabs .nav-link:hover { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.my-leads-tabs .nav-link.active { color: #fff; background: var(--brand-hover); box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3); }
.tab-count {
  min-width: 1.5rem; padding: 0.05rem 0.45rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
  background: var(--bs-secondary-bg); color: var(--bs-body-color);
}
.my-leads-tabs .nav-link.active .tab-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.my-leads-tabs .nav-link { white-space: nowrap; }
@media (max-width: 575.98px) {
  /* phones: three equal segments, labels may wrap, icons dropped to save room */
  .my-leads-tabs { width: 100%; border-radius: 1rem; }
  .my-leads-tabs .nav-item { flex: 1 1 0; min-width: 0; }
  .my-leads-tabs .nav-link {
    height: 100%; justify-content: center; flex-wrap: wrap; text-align: center; white-space: normal;
    gap: 0.25rem; padding: 0.45rem 0.4rem; border-radius: 0.8rem; font-size: 0.78rem; line-height: 1.2;
  }
  .my-leads-tabs .nav-link > .bi { display: none; }
}

/* filter panel (shared with Find Work on the home page) */
.filters-head { align-items: center; gap: 0.5rem; margin-bottom: 1rem; padding-bottom: 0.85rem; border-bottom: 1px dashed var(--bs-border-color); }
.filters-head h2 { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.filter-form .form-label { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--bs-secondary-color); }
.filter-form .form-control,
.filter-form .form-select {
  background-color: var(--surface-muted); border-color: var(--bs-border-color-translucent);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.filter-form .form-control:hover:not(:focus),
.filter-form .form-select:hover:not(:focus) { border-color: rgba(var(--brand-rgb), 0.45); }
.filter-form .form-control:focus,
.filter-form .form-select:focus { background-color: var(--bs-body-bg); }
@media (min-width: 992px) {
  .filters-panel .offcanvas-body { border: 1px solid var(--bs-border-color-translucent); }
}

/* table */
.my-leads-table thead th {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bs-secondary-color); background: var(--surface-muted);
  border-bottom: 1px solid var(--bs-border-color-translucent); padding-top: 0.8rem; padding-bottom: 0.8rem;
}
.my-leads-table tbody td { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.my-leads-table tbody tr { transition: background-color 0.15s ease; }
.my-leads-table tbody tr:hover > * { --bs-table-bg-state: rgba(var(--brand-rgb), 0.05); }
.my-leads-table .lead-title-cell { color: var(--bs-secondary-color); margin-top: 0.15rem; }
.ref-chip {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 0.45rem;
  font-family: var(--bs-font-monospace); font-size: 0.8rem; font-weight: 700; text-decoration: none;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
  border: 1px solid var(--bs-primary-border-subtle);
}
.ref-chip:hover { background: var(--brand-hover); color: #fff; border-color: var(--brand-hover); }

/* phone cards: a status-coloured edge */
.lead-mini-card {
  border: 1px solid var(--bs-border-color-translucent); box-shadow: var(--bs-box-shadow-sm);
  border-left: 4px solid var(--edge, var(--bs-secondary));
}
.lead-mini-card .h6 { font-weight: 700; }
.edge-success { --edge: var(--bs-success); }
.edge-primary { --edge: var(--brand); }
.edge-warning { --edge: var(--bs-warning); }
.edge-info { --edge: var(--bs-info); }
.edge-danger { --edge: var(--bs-danger); }
.edge-secondary { --edge: var(--bs-secondary); }

/* empty list */
.empty-state-icon {
  width: 4.5rem; height: 4.5rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 2rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
}

@media (prefers-reduced-motion: reduce) {
  .my-leads-tabs .nav-link, .filter-form .form-control, .filter-form .form-select, .my-leads-table tbody tr { transition: none; }
}

/* Server status bar under the header: green = working, red = not working */
.server-status-bar {
  border-bottom: 1px solid var(--bs-border-color-translucent);
  background: var(--bs-body-bg);
  font-size: 0.82rem;
}
.server-status-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.server-status-title {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem;
  color: var(--bs-secondary-color);
}
.server-status-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.server-pill {
  --state: var(--bs-success);
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.75rem 0.2rem 0.6rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--state) 45%, transparent);
  background: color-mix(in srgb, var(--state) 12%, var(--bs-body-bg));
  font-weight: 600; cursor: default;
}
.server-pill.is-down { --state: var(--bs-danger); }
.server-dot {
  position: relative; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--state);
}
.server-dot::after {  /* a soft pulse so the state catches the eye */
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--state);
  animation: server-pulse 1.8s ease-out infinite;
}
.server-name { color: var(--bs-body-color); }
.server-state { color: color-mix(in srgb, var(--state) 80%, var(--bs-body-color)); font-weight: 700; }
.server-note { font-weight: 500; color: var(--bs-secondary-color); }
@keyframes server-pulse { from { transform: scale(1); opacity: 0.6; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .server-dot::after { animation: none; display: none; } }
@media print { .server-status-bar { display: none; } }

/* Scrolling notice above How It Works (pauses on hover/focus; still for reduced motion) */
.notice-ticker {
  display: flex; align-items: stretch; margin-bottom: 2rem; overflow: hidden;
  border-radius: 999px; border: 1px solid rgba(var(--bs-warning-rgb), 0.45);
  background: rgba(var(--bs-warning-rgb), 0.12);
  box-shadow: var(--bs-box-shadow-sm);
}
.notice-ticker-label {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff; background: linear-gradient(135deg, #b45309, #d97706);
}
.notice-ticker-label .bi { animation: notice-ring 2.4s ease-in-out infinite; }
.notice-ticker-track { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.notice-ticker-track::before, .notice-ticker-track::after {  /* soft fade at both edges */
  content: ""; position: absolute; top: 0; bottom: 0; width: 1.5rem; z-index: 1; pointer-events: none;
}
.notice-ticker-track::before { left: 0; background: linear-gradient(90deg, var(--notice-bg), transparent); }
.notice-ticker-track::after { right: 0; background: linear-gradient(-90deg, var(--notice-bg), transparent); }
.notice-ticker { --notice-bg: color-mix(in srgb, var(--bs-warning) 12%, var(--bs-body-bg)); }
.notice-ticker-move { display: flex; width: max-content; animation: notice-scroll 28s linear infinite; }
.notice-ticker-text {
  padding: 0.55rem 3rem 0.55rem 1.25rem; white-space: nowrap;
  font-size: 0.95rem; font-weight: 600; color: var(--bs-warning-text-emphasis);
}
.notice-ticker:hover .notice-ticker-move,
.notice-ticker-track:focus .notice-ticker-move { animation-play-state: paused; }
.notice-ticker-track:focus-visible { outline: 2px solid var(--bs-warning); outline-offset: -2px; }
@keyframes notice-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes notice-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 85% { transform: rotate(12deg); } }
@media (max-width: 575.98px) {
  .notice-ticker { border-radius: var(--bs-border-radius-lg); }
  .notice-ticker-label span, .notice-ticker-label { font-size: 0.72rem; padding: 0.5rem 0.7rem; }
  .notice-ticker-text { font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .notice-ticker-move { animation: none; width: auto; }
  .notice-ticker-text { white-space: normal; }
  .notice-ticker-text[aria-hidden="true"] { display: none; }
  .notice-ticker-label .bi { animation: none; }
}

/* "Posted between": two date inputs inside one bordered box */
.filter-form legend.form-label { float: none; width: auto; font-size: 0.8rem; }
.date-range {
  border: 1px solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius);
  background: var(--surface-muted); overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.date-range:hover { border-color: rgba(var(--brand-rgb), 0.45); }
.date-range:focus-within { border-color: var(--brand); box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color); background: var(--bs-body-bg); }
.date-range-row { display: flex; align-items: center; margin: 0; cursor: text; }
.date-range-row + .date-range-row { border-top: 1px dashed var(--bs-border-color); }
.date-range-label {
  flex: 0 0 3rem; padding-left: 0.75rem;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color);
}
.date-range input {
  flex: 1 1 auto; min-width: 0; padding: 0.5rem 0.75rem 0.5rem 0.25rem;
  border: 0; background: transparent; color: var(--bs-body-color); font: inherit; outline: 0;
}
.date-range input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; }
[data-bs-theme="dark"] .date-range input::-webkit-calendar-picker-indicator { filter: invert(1); }

/* result count + active filter chips above lead lists */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; }
.active-filters-count { font-size: 0.85rem; font-weight: 700; color: var(--bs-secondary-color); margin-right: 0.25rem; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.5rem 0.3rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
  border: 1px solid var(--bs-primary-border-subtle);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.filter-chip .bi {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.1rem; height: 1.1rem; border-radius: 50%; font-size: 0.6rem;
  background: rgba(var(--brand-rgb), 0.15);
}
.filter-chip:hover, .filter-chip:focus-visible { background: var(--brand-hover); color: #fff; border-color: var(--brand-hover); }
.filter-chip:hover .bi { background: rgba(255, 255, 255, 0.25); }

/* ---- Header: brand tile, underline for the current page, account menu ------------ */
.brand-tile {
  width: 2.3rem; height: 2.3rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3);
}
.brand-tile-sm { width: 2rem; height: 2rem; font-size: 1.1rem; border-radius: 0.6rem; }
.site-navbar .navbar-brand { font-size: 1.2rem; letter-spacing: -0.02em; }

@media (min-width: 992px) {
  .site-navbar .navbar-nav .nav-link { position: relative; }
  .site-navbar .navbar-nav .nav-link.active { background: transparent; font-weight: 600; }
  .site-navbar .navbar-nav .nav-link.active::after {  /* a short teal bar under the current page */
    content: ""; position: absolute; left: 50%; bottom: -0.15rem; width: 1.4rem; height: 3px;
    border-radius: 3px; background: var(--brand); transform: translateX(-50%);
  }
  .site-navbar .nav-bell { font-size: 1.15rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }
  .site-navbar .nav-bell.active::after { bottom: -0.25rem; }
}
.nav-cta { font-weight: 600; border-radius: 999px; padding-left: 1.1rem; padding-right: 1.1rem; box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.25); }

.user-avatar {
  flex: 0 0 auto; width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(135deg, #0d9488, #10b981);
}
.nav-user {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.25rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem; border: 1px solid var(--bs-border-color-translucent); border-radius: 999px;
  background: var(--bs-body-bg); color: var(--bs-secondary-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nav-user:hover, .nav-user[aria-expanded="true"] { border-color: rgba(var(--brand-rgb), 0.5); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.1); }
.user-menu { min-width: 15rem; padding: 0.4rem; border-radius: var(--bs-border-radius-lg); border-color: var(--bs-border-color-translucent); box-shadow: var(--bs-box-shadow); }
.user-menu-head { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.6rem 0.75rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.user-menu .dropdown-item { display: flex; align-items: center; gap: 0.6rem; border-radius: 0.5rem; padding: 0.5rem 0.65rem; font-weight: 500; }
.user-menu .dropdown-item .bi { width: 1.1rem; color: var(--bs-secondary-color); }
.user-menu .dropdown-item.text-danger .bi { color: inherit; }
.user-menu .dropdown-item:active { background: var(--bs-primary-bg-subtle); color: var(--bs-body-color); }

/* phone menu (offcanvas) */
@media (max-width: 991.98px) {
  .site-menu { --bs-offcanvas-width: min(20rem, 88vw); }
  .site-menu .offcanvas-header { border-bottom: 1px solid var(--bs-border-color-translucent); }
  .site-menu .nav-link { display: flex; align-items: center; gap: 0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; border-radius: 0.65rem; }
  .site-menu .nav-link .bi { width: 1.2rem; font-size: 1.1rem; color: var(--bs-secondary-color); }
  .site-menu .nav-link.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
  .site-menu .nav-link.active .bi { color: inherit; }
  .menu-user {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding: 0.75rem;
    border-radius: var(--bs-border-radius-lg); text-decoration: none; color: var(--bs-body-color);
    background: var(--surface-muted); border: 1px solid var(--bs-border-color-translucent);
  }
  .menu-user .user-avatar { width: 2.75rem; height: 2.75rem; font-size: 0.95rem; }
  .menu-divider { margin: 0.5rem 0; border-top: 1px solid var(--bs-border-color-translucent); }
  .menu-logout { margin-top: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .nav-user { transition: none; } }

/* ---- Login, register, password pages: brand panel + form ------------------------ */
.auth-shell {
  display: grid; grid-template-columns: 1fr;
  overflow: hidden;
  border-radius: var(--bs-border-radius-xl);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.1);
}
@media (min-width: 992px) { .auth-shell { grid-template-columns: 5fr 7fr; } }

.auth-aside {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 1.25rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  background:
    radial-gradient(22rem 14rem at 110% 0%, rgba(52, 211, 153, 0.45), transparent 70%),
    radial-gradient(18rem 12rem at -20% 110%, rgba(45, 212, 191, 0.3), transparent 70%),
    linear-gradient(150deg, #0b3f3b, #0f766e 60%, #0d9488);
}
.auth-aside-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; }
.auth-aside-brand:hover { color: #fff; }
.auth-aside-logo {
  width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.auth-aside-body { display: none; }
.auth-aside-title { font-size: 1.6rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; color: #fff; margin-bottom: 1.5rem; }
.auth-aside-points li { display: flex; gap: 0.85rem; align-items: flex-start; }
.auth-aside-points li + li { margin-top: 1.1rem; }
.auth-aside-points li > span {
  flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.7rem; background: rgba(255, 255, 255, 0.12); color: var(--brand-accent); font-size: 1.05rem;
}
.auth-aside-points strong { display: block; color: #fff; font-size: 0.95rem; }
.auth-aside-points div { font-size: 0.85rem; line-height: 1.5; }
@media (min-width: 992px) {
  .auth-aside { padding: 2.5rem; }
  .auth-aside-body { display: flex; flex-direction: column; flex: 1; justify-content: center; margin-top: 2rem; }
}

.auth-main { padding: 1.5rem; }
@media (min-width: 576px) { .auth-main { padding: 2.25rem 2.5rem; } }
@media (min-width: 992px) { .auth-main { padding: 3rem; } }
.auth-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.auth-head .auth-icon {
  flex: 0 0 3.25rem; width: 3.25rem; height: 3.25rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 1rem; font-size: 1.5rem;
  background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis);
}
.auth-head h1 { font-weight: 800; letter-spacing: -0.02em; }

.auth-form .form-control,
.auth-form .form-select {
  background-color: var(--surface-muted); border-color: var(--bs-border-color-translucent);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form .form-control:hover:not(:focus),
.auth-form .form-select:hover:not(:focus) { border-color: rgba(var(--brand-rgb), 0.45); }
.auth-form .form-control:focus,
.auth-form .form-select:focus { background-color: var(--bs-body-bg); }
.auth-form .form-floating > label { color: var(--bs-secondary-color); }
.auth-form .asteriskField { color: var(--bs-danger); }
.auth-form .btn-primary.btn-lg {
  padding-top: 0.8rem; padding-bottom: 0.8rem; font-weight: 700;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-form .btn-primary.btn-lg:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(var(--brand-rgb), 0.35); }
.auth-after:has(*) { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--bs-border-color); }
.auth-after p { margin: 0; text-align: center; color: var(--bs-secondary-color); }
.auth-after a { font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .auth-form .form-control, .auth-form .form-select, .auth-form .btn-primary.btn-lg { transition: none; }
  .auth-form .btn-primary.btn-lg:hover { transform: none; }
}
