/* ==========================================================================
   DriverHub.Directory — Design System
   Layer 1: Bootstrap 5 remapped onto design tokens (tokens.css)
   Layer 2: dh- component library (cards, tags, badges, nav, states)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base & typography
   -------------------------------------------------------------------------- */

body {
    font-family: var(--dh-font-body);
    font-size: var(--dh-fs-body);
    line-height: var(--dh-lh-body);
    color: var(--dh-text);
    background-color: var(--dh-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-5, .display-6 {
    font-family: var(--dh-font-heading);
    color: var(--dh-primary-dark);
    line-height: var(--dh-lh-heading);
    font-weight: 700;
}

h1, .h1 { font-size: var(--dh-fs-h1); font-weight: 800; }
h2, .h2 { font-size: var(--dh-fs-h2); }
h3, .h3 { font-size: var(--dh-fs-h3); }
h4, .h4 { font-size: var(--dh-fs-h4); }

.dh-display {
    font-family: var(--dh-font-heading);
    font-size: clamp(2rem, 5vw, var(--dh-fs-display));
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.dh-eyebrow {
    font-size: var(--dh-fs-caption);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dh-primary);
}

a { color: var(--dh-primary); text-decoration: none; }
a:hover { color: var(--dh-primary-hover); }

.text-muted { color: var(--dh-text-muted) !important; }

/* Not a stock Bootstrap 5 utility. A flex/grid item defaults to min-width:auto,
   which refuses to shrink below its content's intrinsic width — silently
   defeating .text-truncate on any long string (e.g. a full pickup→destination
   line) and letting it overflow past the card edge instead of ellipsizing. */
.min-width-0 { min-width: 0; }

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--dh-primary-ring);
    border-radius: var(--dh-radius-sm);
}

/* --------------------------------------------------------------------------
   2. Buttons — min touch target 44px, one primary per screen
   -------------------------------------------------------------------------- */

.btn {
    font-family: var(--dh-font-body);
    font-weight: 600;
    border-radius: var(--dh-radius-md);
    min-height: var(--dh-touch-target);
    padding: 0.625rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--dh-transition), color var(--dh-transition),
                border-color var(--dh-transition), box-shadow var(--dh-transition);
}
.btn:focus-visible { box-shadow: 0 0 0 3px var(--dh-primary-ring); }
.btn-sm { min-height: 36px; padding: 0.375rem 0.875rem; font-size: var(--dh-fs-small); border-radius: var(--dh-radius-sm); }
.btn-lg { min-height: 52px; padding: 0.75rem 1.75rem; font-size: 1.0625rem; }

.btn-primary {
    --bs-btn-bg: var(--dh-primary);
    --bs-btn-border-color: var(--dh-primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--dh-primary-hover);
    --bs-btn-hover-border-color: var(--dh-primary-hover);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--dh-primary-hover);
    --bs-btn-active-border-color: var(--dh-primary-hover);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--dh-primary);
    --bs-btn-disabled-border-color: var(--dh-primary);
    --bs-btn-disabled-color: #fff;
    box-shadow: var(--dh-shadow-sm);
}

.btn-secondary {
    --bs-btn-bg: var(--dh-navy-soft);
    --bs-btn-border-color: transparent;
    --bs-btn-color: var(--dh-primary-dark);
    --bs-btn-hover-bg: rgba(15, 23, 42, 0.10);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-hover-color: var(--dh-primary-dark);
    --bs-btn-active-bg: rgba(15, 23, 42, 0.12);
    --bs-btn-active-border-color: transparent;
    --bs-btn-active-color: var(--dh-primary-dark);
}

.btn-ghost {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-color: var(--dh-primary-dark);
    --bs-btn-hover-bg: var(--dh-primary-softer);
    --bs-btn-hover-color: var(--dh-primary-dark);
    --bs-btn-active-bg: var(--dh-primary-soft);
    --bs-btn-active-color: var(--dh-primary-dark);
}

.btn-danger {
    --bs-btn-bg: var(--dh-error);
    --bs-btn-border-color: var(--dh-error);
    --bs-btn-hover-bg: #DC2626;
    --bs-btn-hover-border-color: #DC2626;
}

.btn-success {
    --bs-btn-bg: var(--dh-success);
    --bs-btn-border-color: var(--dh-success);
    --bs-btn-hover-bg: var(--dh-primary-hover);
    --bs-btn-hover-border-color: var(--dh-primary-hover);
}

.btn-outline-primary {
    --bs-btn-color: var(--dh-primary);
    --bs-btn-border-color: var(--dh-primary);
    --bs-btn-hover-bg: var(--dh-primary);
    --bs-btn-hover-border-color: var(--dh-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--dh-primary);
    --bs-btn-active-color: #fff;
}

.btn-outline-secondary {
    --bs-btn-color: var(--dh-text);
    --bs-btn-border-color: var(--dh-border-strong);
    --bs-btn-hover-bg: var(--dh-navy-soft);
    --bs-btn-hover-border-color: var(--dh-border-strong);
    --bs-btn-hover-color: var(--dh-primary-dark);
    --bs-btn-active-bg: var(--dh-navy-soft);
    --bs-btn-active-color: var(--dh-primary-dark);
}

.btn-outline-danger {
    --bs-btn-color: var(--dh-error);
    --bs-btn-border-color: var(--dh-error);
    --bs-btn-hover-bg: var(--dh-error);
    --bs-btn-hover-color: #fff;
}

/* Legacy Bootstrap variants still present in partials — map into palette */
.btn-info, .btn-warning, .btn-outline-info, .btn-outline-warning, .btn-outline-dark {
    --bs-btn-color: var(--dh-primary-dark);
    --bs-btn-bg: var(--dh-surface);
    --bs-btn-border-color: var(--dh-border-strong);
    --bs-btn-hover-bg: var(--dh-navy-soft);
    --bs-btn-hover-color: var(--dh-primary-dark);
    --bs-btn-hover-border-color: var(--dh-border-strong);
    --bs-btn-active-bg: var(--dh-navy-soft);
    --bs-btn-active-color: var(--dh-primary-dark);
}
.btn-outline-light {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.6);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #fff;
}

.btn:disabled, .btn.disabled { opacity: 0.5; }

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}
.btn-loading::after {
    content: "";
    position: absolute;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dh-spin 0.7s linear infinite;
}
.btn-loading.btn-secondary::after,
.btn-loading.btn-ghost::after,
.btn-loading.btn-outline-primary::after {
    border-color: var(--dh-primary-ring);
    border-top-color: var(--dh-primary);
}
@keyframes dh-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   3. Forms
   -------------------------------------------------------------------------- */

.form-label {
    font-weight: 600;
    font-size: var(--dh-fs-small);
    color: var(--dh-primary-dark);
    margin-bottom: var(--dh-space-2);
}

.form-control, .form-select {
    min-height: var(--dh-touch-target);
    border: 1px solid var(--dh-border-strong);
    border-radius: var(--dh-radius-md);
    color: var(--dh-primary-dark);
    padding: 0.625rem 0.875rem;
    font-size: var(--dh-fs-body);
    transition: border-color var(--dh-transition), box-shadow var(--dh-transition);
}
.form-control::placeholder { color: var(--dh-text-muted); }
.form-control:focus, .form-select:focus {
    border-color: var(--dh-primary);
    box-shadow: 0 0 0 3px var(--dh-primary-ring);
}
textarea.form-control { min-height: 96px; }

.form-check-input { width: 1.25em; height: 1.25em; border-color: var(--dh-border-strong); }
.form-check-input:checked { background-color: var(--dh-primary); border-color: var(--dh-primary); }
.form-check-input:focus { border-color: var(--dh-primary); box-shadow: 0 0 0 3px var(--dh-primary-ring); }

.form-text { color: var(--dh-text-muted); font-size: var(--dh-fs-small); }

/* Search input with leading icon */
.dh-search {
    position: relative;
}
.dh-search > .bi {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dh-text-muted);
    pointer-events: none;
}
.dh-search > .form-control { padding-left: 2.5rem; border-radius: var(--dh-radius-pill); }

/* Role selection as tappable cards (signup) */
.dh-role-card input[type="radio"] { position: absolute; opacity: 0; }
.dh-role-card label {
    display: flex;
    align-items: flex-start;
    gap: var(--dh-space-3);
    width: 100%;
    padding: var(--dh-space-4);
    border: 1.5px solid var(--dh-border);
    border-radius: var(--dh-radius-md);
    cursor: pointer;
    transition: border-color var(--dh-transition), background-color var(--dh-transition);
}
.dh-role-card input[type="radio"]:checked + label {
    border-color: var(--dh-primary);
    background-color: var(--dh-primary-softer);
}
.dh-role-card input[type="radio"]:focus-visible + label {
    box-shadow: 0 0 0 3px var(--dh-primary-ring);
}

/* --------------------------------------------------------------------------
   4. Cards
   -------------------------------------------------------------------------- */

.card {
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-lg);
    background-color: var(--dh-surface);
    box-shadow: var(--dh-shadow-sm);
}
.card-header {
    background-color: var(--dh-surface);
    border-bottom: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-lg) var(--dh-radius-lg) 0 0 !important;
    font-weight: 700;
    font-family: var(--dh-font-heading);
    color: var(--dh-primary-dark);
    padding: var(--dh-space-4);
}

.dh-card-hover { transition: box-shadow var(--dh-transition), transform var(--dh-transition); }
.dh-card-hover:hover { box-shadow: var(--dh-shadow-md); transform: translateY(-1px); }

/* Metric card (trust metrics) */
.dh-metric {
    text-align: center;
    padding: var(--dh-space-4);
}
.dh-metric__value {
    font-family: var(--dh-font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dh-primary-dark);
    line-height: 1.1;
}
.dh-metric__label {
    font-size: var(--dh-fs-caption);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dh-text-muted);
    margin-top: var(--dh-space-1);
}

/* Avatars (initials fallback keeps palette, no stock photos) */
.dh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--dh-primary-soft);
    color: var(--dh-primary);
    font-family: var(--dh-font-heading);
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    width: 48px; height: 48px; font-size: 1rem;
}
.dh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dh-avatar--sm { width: 36px; height: 36px; font-size: 0.8125rem; }
.dh-avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }
.dh-avatar--xl { width: 112px; height: 112px; font-size: 2.25rem; }
.dh-avatar--navy { background-color: var(--dh-navy-soft); color: var(--dh-primary-dark); }

/* Recommendation banner */
.dh-recommendation {
    display: flex;
    align-items: center;
    gap: var(--dh-space-3);
    background-color: var(--dh-primary-softer);
    border: 1px solid var(--dh-primary-soft);
    border-radius: var(--dh-radius-md);
    padding: var(--dh-space-3) var(--dh-space-4);
    color: var(--dh-primary-dark);
    font-size: var(--dh-fs-small);
    font-weight: 600;
}
.dh-recommendation .bi { color: var(--dh-primary); font-size: 1.25rem; }

/* --------------------------------------------------------------------------
   5. Tags (trust tags) & badges (verification)
   -------------------------------------------------------------------------- */

.dh-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--dh-radius-pill);
    background-color: var(--dh-primary-soft);
    color: var(--dh-primary-dark);
    font-size: var(--dh-fs-small);
    font-weight: 600;
    line-height: 1.2;
}
.dh-tag__count {
    font-size: var(--dh-fs-caption);
    font-weight: 700;
    color: var(--dh-primary);
}

.dh-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--dh-radius-pill);
    font-size: var(--dh-fs-caption);
    font-weight: 600;
    background-color: var(--dh-success-soft);
    color: var(--dh-primary-dark);
}
.dh-badge .bi { color: var(--dh-success); }
.dh-badge--pending { background-color: var(--dh-warning-soft); }
.dh-badge--pending .bi { color: var(--dh-warning); }
.dh-badge--muted { background-color: var(--dh-navy-soft); }
.dh-badge--muted .bi { color: var(--dh-text-muted); }

/* Compact language switcher (EN/ES pill toggle) */
.dh-lang-toggle {
    display: inline-flex;
    padding: 2px;
    border-radius: var(--dh-radius-pill);
    background-color: var(--dh-navy-soft);
}
.dh-lang-btn {
    border: 0;
    background: transparent;
    padding: 0.25rem 0.625rem;
    border-radius: var(--dh-radius-pill);
    font-size: var(--dh-fs-caption);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--dh-text-muted);
    transition: background-color var(--dh-transition), color var(--dh-transition);
}
.dh-lang-btn:hover { color: var(--dh-primary-dark); }
.dh-lang-btn.active {
    background-color: var(--dh-surface);
    color: var(--dh-primary-dark);
    box-shadow: var(--dh-shadow-sm);
}

/* Status badges (reservations) — soft bg + navy text + colored dot */
.dh-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--dh-radius-pill);
    font-size: var(--dh-fs-caption);
    font-weight: 700;
    color: var(--dh-primary-dark);
    background-color: var(--dh-navy-soft);
}
.dh-status::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background-color: var(--dh-text-muted);
}
.dh-status--pending { background-color: var(--dh-warning-soft); }
.dh-status--pending::before { background-color: var(--dh-warning); }
.dh-status--accepted { background-color: var(--dh-success-soft); }
.dh-status--accepted::before { background-color: var(--dh-success); }
.dh-status--completed { background-color: var(--dh-primary-soft); }
.dh-status--completed::before { background-color: var(--dh-primary); }
.dh-status--rejected { background-color: var(--dh-error-soft); }
.dh-status--rejected::before { background-color: var(--dh-error); }
.dh-status--cancelled::before { background-color: var(--dh-text-muted); }

/* Keep legacy Bootstrap badges in palette (partials, allauth pages) */
.badge.text-bg-success { background-color: var(--dh-success-soft) !important; color: var(--dh-primary-dark) !important; }
.badge.text-bg-warning { background-color: var(--dh-warning-soft) !important; color: var(--dh-primary-dark) !important; }
.badge.text-bg-danger  { background-color: var(--dh-error-soft) !important; color: var(--dh-primary-dark) !important; }
.badge.text-bg-primary { background-color: var(--dh-primary-soft) !important; color: var(--dh-primary-dark) !important; }
.badge.text-bg-secondary { background-color: var(--dh-navy-soft) !important; color: var(--dh-primary-dark) !important; }

/* --------------------------------------------------------------------------
   6. Navigation — top bar + mobile bottom nav
   -------------------------------------------------------------------------- */

.dh-topbar {
    background-color: var(--dh-surface);
    border-bottom: 1px solid var(--dh-border);
}
.dh-topbar .navbar-brand {
    font-family: var(--dh-font-heading);
    font-weight: 800;
    color: var(--dh-primary-dark);
}
.dh-topbar .navbar-brand .bi { color: var(--dh-primary); }
.dh-topbar .nav-link {
    color: var(--dh-text);
    font-weight: 600;
    font-size: var(--dh-fs-small);
    border-radius: var(--dh-radius-sm);
}
.dh-topbar .nav-link:hover { color: var(--dh-primary-dark); background-color: var(--dh-primary-softer); }
.dh-topbar .nav-link.active { color: var(--dh-primary); }

.dh-bottomnav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: var(--dh-z-bottomnav);
    display: flex;
    background-color: var(--dh-surface);
    border-top: 1px solid var(--dh-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: calc(var(--dh-bottomnav-height) + env(safe-area-inset-bottom, 0px));
}
.dh-bottomnav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--dh-text-muted);
    font-size: var(--dh-fs-caption);
    font-weight: 600;
    min-height: var(--dh-touch-target);
    position: relative;
}
.dh-bottomnav__item .bi { font-size: 1.35rem; line-height: 1; }
.dh-bottomnav__item:hover { color: var(--dh-primary-dark); }
.dh-bottomnav__item.active { color: var(--dh-primary); }
.dh-bottomnav__item .dh-nav-dot {
    position: absolute;
    top: 8px; right: calc(50% - 16px);
    width: 8px; height: 8px;
    border-radius: 50%;
    background-color: var(--dh-error);
}
@media (min-width: 992px) {
    .dh-bottomnav { display: none; }
}
/* Reserve space for the bottom nav on mobile. !important overrides Bootstrap's
   .py-4 utility on <main>, which sets padding-bottom with !important and would
   otherwise leave content hidden behind the fixed bottom nav. */
body.has-bottomnav main {
    padding-bottom: calc(var(--dh-bottomnav-height) + env(safe-area-inset-bottom, 0px) + var(--dh-space-6)) !important;
}
@media (min-width: 992px) {
    body.has-bottomnav main { padding-bottom: var(--dh-space-8) !important; }
}

/* Sticky CTA bar (driver public profile, mobile) */
.dh-sticky-cta {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: var(--dh-z-sticky);
    background-color: var(--dh-surface);
    border-top: 1px solid var(--dh-border);
    padding: var(--dh-space-3) var(--dh-space-4) calc(var(--dh-space-3) + env(safe-area-inset-bottom, 0px));
    display: flex;
    gap: var(--dh-space-3);
    box-shadow: var(--dh-shadow-lg);
}
body.has-bottomnav .dh-sticky-cta { bottom: calc(var(--dh-bottomnav-height) + env(safe-area-inset-bottom, 0px)); box-shadow: none; }
@media (min-width: 992px) {
    .dh-sticky-cta { position: static; box-shadow: none; border: 0; padding: 0; }
}
body.has-sticky-cta main { padding-bottom: calc(var(--dh-bottomnav-height) + 88px) !important; }
@media (min-width: 992px) {
    body.has-sticky-cta main { padding-bottom: var(--dh-space-8); }
}

/* --------------------------------------------------------------------------
   7. States — empty, skeleton, alerts/toasts
   -------------------------------------------------------------------------- */

.dh-empty {
    text-align: center;
    padding: var(--dh-space-12) var(--dh-space-6);
    color: var(--dh-text-muted);
}
.dh-empty .bi {
    font-size: 2.5rem;
    color: var(--dh-border-strong);
    display: block;
    margin-bottom: var(--dh-space-3);
}
.dh-empty__title {
    font-family: var(--dh-font-heading);
    font-weight: 700;
    color: var(--dh-primary-dark);
    font-size: var(--dh-fs-h4);
    margin-bottom: var(--dh-space-1);
}

.dh-skeleton {
    background: linear-gradient(90deg, var(--dh-border) 25%, var(--dh-bg) 50%, var(--dh-border) 75%);
    background-size: 200% 100%;
    animation: dh-shimmer 1.4s infinite;
    border-radius: var(--dh-radius-sm);
    color: transparent;
    min-height: 1em;
}
@keyframes dh-shimmer { to { background-position: -200% 0; } }

.alert { border-radius: var(--dh-radius-md); border: 1px solid var(--dh-border); font-size: var(--dh-fs-small); }
.alert-success { background-color: var(--dh-success-soft); border-color: rgba(34, 197, 94, 0.3); color: var(--dh-primary-dark); }
.alert-danger  { background-color: var(--dh-error-soft); border-color: rgba(239, 68, 68, 0.3); color: var(--dh-primary-dark); }
.alert-warning { background-color: var(--dh-warning-soft); border-color: rgba(245, 158, 11, 0.3); color: var(--dh-primary-dark); }
.alert-info    { background-color: var(--dh-primary-softer); border-color: var(--dh-primary-soft); color: var(--dh-primary-dark); }

.dh-toasts {
    position: fixed;
    top: var(--dh-space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--dh-z-toast);
    width: min(92vw, 420px);
}

/* --------------------------------------------------------------------------
   8. Timeline (reservation detail)
   -------------------------------------------------------------------------- */

.dh-timeline { list-style: none; margin: 0; padding: 0; }
.dh-timeline__item {
    position: relative;
    padding-left: var(--dh-space-8);
    padding-bottom: var(--dh-space-6);
}
.dh-timeline__item::before {
    content: "";
    position: absolute;
    left: 11px; top: 26px; bottom: 0;
    width: 2px;
    background-color: var(--dh-border);
}
.dh-timeline__item:last-child::before { display: none; }
.dh-timeline__dot {
    position: absolute;
    left: 0; top: 2px;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background-color: var(--dh-navy-soft);
    color: var(--dh-text-muted);
}
.dh-timeline__item--done .dh-timeline__dot { background-color: var(--dh-primary); color: #fff; }
.dh-timeline__item--error .dh-timeline__dot { background-color: var(--dh-error); color: #fff; }
.dh-timeline__item--muted { opacity: 0.5; }

/* --------------------------------------------------------------------------
   9. Wizard progress (reservation flow)
   -------------------------------------------------------------------------- */

.dh-steps { display: flex; gap: var(--dh-space-2); margin-bottom: var(--dh-space-6); }
.dh-steps__bar {
    flex: 1;
    height: 4px;
    border-radius: var(--dh-radius-pill);
    background-color: var(--dh-border);
    transition: background-color var(--dh-transition);
}
.dh-steps__bar.active { background-color: var(--dh-primary); }

.dh-wizard-step { display: none; }
.dh-wizard-step.active { display: block; }
/* No-JS fallback: show everything */
.no-js .dh-wizard-step { display: block; }

/* --------------------------------------------------------------------------
   10. Misc
   -------------------------------------------------------------------------- */

.dh-hero {
    background: linear-gradient(135deg, var(--dh-primary-dark) 0%, #134E4A 55%, var(--dh-primary) 130%);
    color: #fff;
    border-radius: var(--dh-radius-lg);
}
.dh-hero h1, .dh-hero h2, .dh-hero .dh-display { color: #fff; }

.dh-divider-label {
    display: flex;
    align-items: center;
    gap: var(--dh-space-3);
    color: var(--dh-text-muted);
    font-size: var(--dh-fs-caption);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.dh-divider-label::before, .dh-divider-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--dh-border);
}

.dh-qr-frame {
    background-color: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-lg);
    padding: var(--dh-space-6);
    display: inline-block;
    box-shadow: var(--dh-shadow-md);
}

.accordion-button:not(.collapsed) {
    background-color: var(--dh-primary-softer);
    color: var(--dh-primary-dark);
    box-shadow: none;
}
.accordion-button:focus { box-shadow: 0 0 0 3px var(--dh-primary-ring); }

/* HTMX request indicator */
.htmx-request { opacity: 0.6; pointer-events: none; }

/* --------------------------------------------------------------------------
   Map picker (Leaflet + Nominatim)
   -------------------------------------------------------------------------- */

.dh-map {
    height: 300px;
    border-radius: var(--dh-radius-md);
    border: 1px solid var(--dh-border);
    z-index: 0;
}
.dh-map-pin span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid #fff;
    box-shadow: var(--dh-shadow-sm);
}
.dh-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: var(--dh-z-sticky);
    background: var(--dh-surface);
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-md);
    box-shadow: var(--dh-shadow-md);
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
}
.dh-autocomplete:empty { display: none; }
.dh-autocomplete__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    color: var(--dh-text);
    font-size: var(--dh-fs-small);
    line-height: 1.35;
    cursor: pointer;
}
.dh-autocomplete__item:hover { background: var(--dh-primary-softer); color: var(--dh-primary-dark); }

.dh-map-legend {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 2px;
}

.dh-map-target { display: flex; gap: var(--dh-space-2); }
.dh-map-target .btn.active {
    background-color: var(--dh-primary-soft);
    border-color: var(--dh-primary);
    color: var(--dh-primary-dark);
}

/* Budget negotiation offer bubbles (reservation detail) */
.dh-offer {
    border: 1px solid var(--dh-border);
    border-radius: var(--dh-radius-md);
    padding: var(--dh-space-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--dh-space-3);
}
.dh-offer--mine { background-color: var(--dh-primary-softer); border-color: var(--dh-primary-soft); }
.dh-offer__amount { font-family: var(--dh-font-heading); font-weight: 800; color: var(--dh-primary-dark); }

/* Table polish (dashboards/history) */
.table { color: var(--dh-text); }
.table thead th {
    font-size: var(--dh-fs-caption);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dh-text-muted);
    background-color: var(--dh-bg);
    border-bottom: 1px solid var(--dh-border);
}
.table td { border-color: var(--dh-border); }

/* List groups */
.list-group-item { border-color: var(--dh-border); color: var(--dh-text); }
