/* ============================================
   VaultVehicle — Site Styles
   Modern SaaS top-nav layout, Bootstrap 5
   ============================================ */

:root {
    --vv-primary:     #2563eb;
    --vv-primary-dk:  #1d4ed8;
    --vv-success:     #16a34a;
    --vv-warning:     #d97706;
    --vv-danger:      #dc2626;
    --vv-body-bg:     #f8fafc;
    --vv-nav-bg:      #ffffff;
    --vv-card-radius: 12px;
    --vv-border:      #e2e8f0;
}

/* ---- Base ---- */
html { height: 100%; }
body { background: var(--vv-body-bg); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* ---- Navbar ---- */
.vv-navbar {
    background: var(--vv-nav-bg);
    border-bottom: 1px solid var(--vv-border);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.vv-navbar .navbar-brand { color: #0f172a; font-size: 1.1rem; }
.vv-navbar .navbar-brand:hover { color: var(--vv-primary); }

.vv-nav-pill {
    color: #64748b;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.vv-nav-pill:hover { background: #f1f5f9; color: #0f172a; }
.vv-nav-pill.active  { background: #eff6ff; color: var(--vv-primary); }

/* ---- Avatar ---- */
.vv-avatar {
    width: 34px; height: 34px;
    background: var(--vv-primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0;
}

/* ---- Main ---- */
.vv-main { min-height: calc(100vh - 130px); padding-top: 60px; /* offset for fixed navbar */ }

/* ---- Footer ---- */
.vv-footer { border-top: 1px solid var(--vv-border); background: var(--vv-nav-bg); }

/* ---- Cards ---- */
.vv-card {
    background: white;
    border-radius: var(--vv-card-radius);
    border: 1px solid var(--vv-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    padding: 1.5rem;
}

.vv-stat-card {
    background: white;
    border-radius: var(--vv-card-radius);
    border: 1px solid var(--vv-border);
    padding: 1rem 1.25rem;
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 80px;
    text-decoration: none;
    color: inherit;
}
.vv-stat-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    transform: translateY(-1px);
    color: inherit;
}
.vv-stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.vv-stat-card > div { flex-grow: 1; }

/* ---- Vehicle Card ---- */
.vv-vehicle-card {
    background: white;
    border-radius: var(--vv-card-radius);
    border: 1px solid var(--vv-border);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.vv-vehicle-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border-color: var(--vv-primary);
    transform: translateY(-2px);
}
.vv-vehicle-card .card-header {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

/* ---- Property Card ---- */
.vv-property-card {
    background: white;
    border-radius: var(--vv-card-radius);
    border: 1px solid var(--vv-border);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.vv-property-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border-color: var(--vv-success);
    transform: translateY(-2px);
}
.vv-property-card .card-header {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}
.vv-property-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.35);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────────────────
   UK Number Plate — authentic yellow rear plate
   Usage: <span class="vv-plate">AU67 ZWF</span>
   ────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap');

.vv-plate {
    display:         inline-block;
    background:      #FFD700;          /* exact UK plate yellow */
    border:          none;
    border-radius:   4px;
    padding:         0.1em 0.65em;
    font-family:     'Oswald', 'Arial Black', Arial, sans-serif;
    font-weight:     700;
    font-size:       1rem;
    letter-spacing:  0.12em;
    color:           #000;
    white-space:     nowrap;
    vertical-align:  middle;
    line-height:     1.3;
    text-decoration: none;
    user-select:     none;
}
.vv-plate::before,
.vv-plate::after { content: none; }

/* ---- Status badges ---- */
.badge-mot-ok     { background: #dcfce7; color: #15803d; }
.badge-mot-warn   { background: #fef9c3; color: #a16207; }
.badge-mot-danger { background: #fee2e2; color: #b91c1c; }

/* ---- Document rows ---- */
.vv-doc-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.25rem;
    border-radius: 8px;
    transition: background 0.15s;
}
.vv-doc-row:hover { background: #f8fafc; }
.vv-doc-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ---- Reminder strips ---- */
.vv-reminder-overdue { border-left: 4px solid var(--vv-danger); }
.vv-reminder-urgent  { border-left: 4px solid var(--vv-warning); }
.vv-reminder-due     { border-left: 4px solid var(--vv-primary); }

/* ---- Page headers ---- */
.vv-page-header { margin-bottom: 1.75rem; }
.vv-page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem;
}
.vv-page-header p { color: #64748b; margin: 0; font-size: 0.9rem; }

/* ---- Forms ---- */
.vv-form-card {
    background: white;
    border-radius: var(--vv-card-radius);
    border: 1px solid var(--vv-border);
    padding: 2rem;
    max-width: 740px;
}
.form-label { font-weight: 500; font-size: 0.875rem; color: #374151; margin-bottom: 0.3rem; }
.form-control, .form-select {
    border-radius: 8px;
    border-color: #d1d5db;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--vv-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* ---- Buttons ---- */
.btn { border-radius: 8px; font-size: 0.875rem; font-weight: 500; }
.btn-primary { background: var(--vv-primary); border-color: var(--vv-primary); }
.btn-primary:hover { background: var(--vv-primary-dk); border-color: var(--vv-primary-dk); }

/* ---- Empty states ---- */
.vv-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}
.vv-empty i { display: block; margin-bottom: 0.75rem; }

/* ---- Dropdown polish ---- */
.dropdown-menu {
    border-radius: 10px;
    border: 1px solid var(--vv-border);
}
.dropdown-item { border-radius: 6px; font-size: 0.875rem; padding: 0.5rem 0.9rem; }
.dropdown-item:hover { background: #f1f5f9; }

/* ---- Hover bg utility ---- */
.hover-bg { transition: background 0.15s; }
.hover-bg:hover { background: #f8fafc; }

/* ---- Validation summary: hide when no errors ---- */
.validation-summary-valid { display: none !important; }
.validation-summary-errors { display: block; }
.field-validation-valid { display: none; }
.field-validation-error { display: block; color: #dc2626; font-size: .8rem; margin-top: .25rem; }
input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}

/* ---- Section dividers in forms ---- */
.vv-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vv-primary);
    margin-bottom: 1rem;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 575px) {
    .vv-card { padding: 1rem; }
    .vv-form-card { padding: 1.25rem; }
    .vv-page-header h1 { font-size: 1.3rem; }
}


/* ═══════════════════════════════════════════════════════════════
   VERTICAL TIMELINE — Centred alternating layout
   ═══════════════════════════════════════════════════════════════ */

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

/* Central gradient line */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom,
        #1e1b4b 0%,
        #4f46e5 18%,
        #2563eb 38%,
        #0ea5e9 58%,
        #06b6d4 78%,
        #1e1b4b 100%);
    border-radius: 999px;
}

/* Top / bottom terminal caps */
.tl-cap {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1e1b4b;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.tl-cap-top    { margin-bottom: 4px; }
.tl-cap-bottom { margin-top: 4px; }

/* ── Each row (3-column grid: left | axis | right) ─── */
.tl-row {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    align-items: center;
    margin-bottom: 2.25rem;
    position: relative;
}

/* ── Axis (centre column — just holds the dot) ─── */
.tl-axis {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* ── Hollow circle dot ─── */
.tl-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--evt-color, #6B7280);
    box-shadow: 0 0 0 3px rgba(255,255,255,.95),
                0 0 0 5px var(--evt-color, #6B7280);
    flex-shrink: 0;
    transition: transform .15s;
}
.tl-row:hover .tl-circle { transform: scale(1.25); }

/* ── Side panels ─── */
.tl-side-left, .tl-side-right { padding: 0 1.1rem; }
.tl-side-left  { display: flex; justify-content: flex-end;  }
.tl-side-right { display: flex; justify-content: flex-start; }

/* ── Date label ─── */
.tl-date-block { text-align: center; line-height: 1.2; }
.tl-date-month {
    display: block;
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: capitalize;
    letter-spacing: .04em;
}
.tl-date-year {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
}

/* ── Event card ─── */
.tl-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    width: 100%;
    max-width: 350px;
    text-align: left;
    transition: box-shadow .15s, transform .15s;
}
.tl-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
    transform: translateY(-2px);
}

.tl-card-body { padding: .8rem 1rem; }

.tl-card-label {
    display: inline-block;
    padding: .22rem .7rem;
    border-radius: 9999px;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: .45rem;
}

/* Mobile-only date shown inside the card (hidden on desktop) */
.tl-mob-date {
    font-size: .7rem;
    color: #6b7280;
    margin-top: .25rem;
    margin-bottom: .1rem;
}

.tl-card-title {
    font-size: .9rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .2rem;
}

.tl-card-desc {
    font-size: .77rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0;
}

.tl-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    font-size: .75rem;
    color: #374151;
    margin-top: .45rem;
    padding-top: .45rem;
    border-top: 1px solid #f3f4f6;
}

.tl-card-footer {
    padding: .45rem 1rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: .5rem;
}

/* Previous-owner dimmed */
.tl-prev .tl-card { background: #f9fafb; opacity: .82; }

/* Meta item */
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: #374151;
}

.meta-item i {
    flex-shrink: 0;
    font-size: .8rem;
}

/* Currency icon sits flush against the amount — no gap */
.meta-item .bi-currency-pound {
    margin-right: -.25rem;
}

/* ── End cap label ─── */
.timeline-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: #9CA3AF;
    font-size: .8rem;
    margin-top: .25rem;
}

/* ── Stat chips (summary row above timeline) ─── */
.stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    background: #fff;
    gap: 0.1rem;
}

.stat-chip i { font-size: 1.2rem; }
.stat-count  { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.stat-label  { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6B7280; }

.stat-mot         { border-top: 3px solid #2563EB; } .stat-mot i, .stat-mot .stat-count { color: #2563EB; }
.stat-service     { border-top: 3px solid #16A34A; } .stat-service i, .stat-service .stat-count { color: #16A34A; }
.stat-consumable  { border-top: 3px solid #D97706; } .stat-consumable i, .stat-consumable .stat-count { color: #D97706; }
.stat-improvement { border-top: 3px solid #7C3AED; } .stat-improvement i, .stat-improvement .stat-count { color: #7C3AED; }
.stat-prev        { border-top: 3px solid #9CA3AF; } .stat-prev i, .stat-prev .stat-count { color: #6B7280; }
.stat-spend       { border-top: 3px solid #0EA5E9; } .stat-spend i, .stat-spend .stat-count { color: #0EA5E9; }
.stat-tyres       { border-top: 3px solid #B45309; } .stat-tyres i, .stat-tyres .stat-count { color: #B45309; }
.stat-battery     { border-top: 3px solid #CA8A04; } .stat-battery i, .stat-battery .stat-count { color: #CA8A04; }
.stat-exhaust     { border-top: 3px solid #57534E; } .stat-exhaust i, .stat-exhaust .stat-count { color: #57534E; }
.stat-brakes      { border-top: 3px solid #DC2626; } .stat-brakes i, .stat-brakes .stat-count { color: #DC2626; }
.stat-windscreen  { border-top: 3px solid #0284C7; } .stat-windscreen i, .stat-windscreen .stat-count { color: #0284C7; }

/* ── Legend dots ────────────────────────────────────────────── */
.legend-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #374151;
}

.legend-dot::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot, #6B7280);
    flex-shrink: 0;
}

/* ── Inter-event delta strip ─── */
.tl-delta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .75rem;
    margin-top: .5rem;
    padding-top: .45rem;
    border-top: 1px dashed #e5e7eb;
    font-size: .72rem;
    color: #6b7280;
}
.tl-delta-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.tl-delta-item i {
    font-size: .75rem;
    flex-shrink: 0;
}
.tl-delta-label {
    font-size: .65rem;
    color: #9ca3af;
    margin-left: .15rem;
}

/* ── Mobile: single-column left-aligned ─── */
@media (max-width: 767px) {
    .timeline-container::before { left: 1.1rem; transform: none; }
    .tl-cap { margin-left: 1.1rem; transform: translateX(-50%); }
    .tl-row {
        grid-template-columns: 40px 1fr;
        grid-template-areas: "axis card";
    }
    .tl-axis { grid-area: axis; }
    .tl-card { max-width: 100%; }

    /* Card is on the LEFT side → show left panel in card area, hide right (date) */
    .tl-card-left  .tl-side-left  { display: flex; justify-content: flex-start; padding: 0 .5rem; grid-area: card; }
    .tl-card-left  .tl-side-right { display: none; }

    /* Card is on the RIGHT side → show right panel in card area, hide left (date) */
    .tl-card-right .tl-side-right { display: flex; justify-content: flex-start; padding: 0 .5rem; grid-area: card; }
    .tl-card-right .tl-side-left  { display: none; }
    .stat-chip { padding: 0.5rem 0.25rem; }
    .stat-count { font-size: 0.95rem; }
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION / PLANS
   ═══════════════════════════════════════════════════════════════ */

/* Plan cards */
.plan-card {
    border-radius: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 1px solid #e5e7eb;
}
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}
.plan-card-popular {
    border: 2px solid #2563EB;
    box-shadow: 0 4px 20px rgba(37,99,235,0.15) !important;
}
.plan-card-current {
    border: 2px solid #16A34A;
}
.plan-popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563EB;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* Checkout steps */
.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.checkout-step .step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid #d1d5db;
    color: #9ca3af;
    background: #fff;
}
.checkout-step.active .step-num {
    border-color: #2563EB;
    color: #2563EB;
    background: #eff6ff;
}
.checkout-step.completed .step-num {
    border-color: #16A34A;
    color: #fff;
    background: #16A34A;
}
.checkout-step .step-label {
    font-size: 0.7rem;
    color: #6b7280;
    white-space: nowrap;
}
.checkout-step.active .step-label,
.checkout-step.completed .step-label {
    color: #111827;
    font-weight: 600;
}
.checkout-step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin-bottom: 1rem;
}
.checkout-step-line.completed { background: #16A34A; }

/* Success animation */
.success-animation {
    display: flex;
    justify-content: center;
}
.success-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16A34A, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
    box-shadow: 0 0 0 12px rgba(22,163,74,0.12), 0 0 0 24px rgba(22,163,74,0.06);
    animation: pulse-success 1s ease-out;
}
@keyframes pulse-success {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}

/* Upgrade banner on dashboard */
.upgrade-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    border-radius: 0.75rem;
    color: #fff;
    padding: 1.25rem 1.5rem;
}
.upgrade-banner h6 { color: #fff; }
.upgrade-banner p  { color: rgba(255,255,255,0.75); }

/* ============================================
   Timeline Gap Indicators (centred layout)
   ============================================ */

.tl-gap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.25rem;
    position: relative;
    z-index: 2;
}

.tl-gap-line {
    width: 3px;
    height: 22px;
    background: repeating-linear-gradient(
        to bottom,
        #94a3b8 0, #94a3b8 5px,
        transparent 5px, transparent 10px
    );
}

.tl-gap-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #f8fafc;
    border: 1.5px dashed #94a3b8;
    border-radius: 8px;
    padding: .3rem 1rem;
    font-size: .73rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.tl-gap-dates {
    font-size: .65rem;
    font-weight: 400;
    color: #94a3b8;
    display: block;
}

/* Severity tints */
.gap-medium .tl-gap-badge { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.gap-medium .tl-gap-line  { background: repeating-linear-gradient(to bottom, #f59e0b 0, #f59e0b 5px, transparent 5px, transparent 10px); }
.gap-long   .tl-gap-badge { border-color: #ef4444; color: #991b1b; background: #fef2f2; }
.gap-long   .tl-gap-line  { background: repeating-linear-gradient(to bottom, #ef4444 0, #ef4444 5px, transparent 5px, transparent 10px); }

/* ============================================
   Gallery Page
   ============================================ */

.gallery-card {
    background: #fff;
    border: 1px solid var(--vv-border);
    border-radius: var(--vv-card-radius);
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}
.gallery-card:hover {
    box-shadow: 0 8px 28px rgba(37,99,235,0.13);
    transform: translateY(-2px);
}

.gallery-card-header {
    padding: 1.25rem 1.25rem 1rem;
    color: #fff;
}
.gallery-header-vehicle {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}
.gallery-header-property {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
}

.gallery-type-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.gallery-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.gallery-card-subtitle {
    font-size: .8rem;
    color: rgba(255,255,255,0.8);
    margin-top: .2rem;
}

.gallery-card-body {
    padding: 1rem 1.25rem;
}

.gallery-stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}
.gallery-stat {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: #374151;
}
.gallery-stat i { font-size: .75rem; }

.gallery-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .75rem;
    color: #6b7280;
    border-top: 1px solid var(--vv-border);
    padding-top: .75rem;
}

.gallery-card-footer {
    padding: .75rem 1.25rem 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE APP SHELL
   ═══════════════════════════════════════════════════════════════ */

/* ── Body base ─── */
.vv-body {
    /* On desktop: nothing extra */
}

/* ── Mobile top bar ─── */
.mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-top));
    background: #ffffff;
    border-bottom: 1px solid var(--vv-border);
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    display: flex;
    align-items: flex-end;
    padding: 0 1rem;
    padding-top: env(safe-area-inset-top);
    padding-bottom: 0.5rem;
    gap: 0.75rem;
    z-index: 1030;
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.mobile-topbar-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.mobile-topbar-avatar {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 38px;
    height: 38px;
}
.mobile-topbar-avatar:active { opacity: 0.75; }

/* ── Mobile bottom tab bar ─── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--vv-border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    display: flex;
    align-items: stretch;
    z-index: 1030;
    /* safe-area-inset for iPhone home bar */
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
}

/* ── Tab item ─── */
.mob-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.4rem 0;
    min-height: 44px;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mob-tab i {
    font-size: 1.25rem;
    line-height: 1;
}
.mob-tab span { line-height: 1.1; }
.mob-tab:hover { color: #64748b; }
.mob-tab--active { color: var(--vv-primary) !important; }

/* ── FAB centre button ─── */
.mob-fab-wrap {
    flex: 1;
    position: relative;
    align-items: center;
}

.mob-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(37,99,235,0.4);
    margin-bottom: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.mob-fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}

/* ── Bottom drawer (offcanvas) ─── */
.mobile-drawer {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 70vh !important;
}
.mobile-drawer .offcanvas-header {
    padding: 1.1rem 1.25rem 0.9rem;
}
.mobile-drawer .offcanvas-body {
    padding: 0.75rem 1.25rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    overflow-y: auto;
}

/* ── Drawer row items ─── */
.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: #111827;
    font-size: 0.92rem;
    transition: background 0.13s;
    -webkit-tap-highlight-color: transparent;
    min-height: 52px;
}
.mobile-drawer-item:hover, .mobile-drawer-item:active { background: #f1f5f9; }

.mobile-drawer-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* ── Body offsets so content isn't hidden under fixed bars ─── */
@media (max-width: 991.98px) {
    .vv-body {
        padding-top: calc(56px + env(safe-area-inset-top));
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    .vv-main { min-height: unset; padding-top: 0; }  /* body already offset for mobile topbar */

    /* ✅ Real fix: push the inner content container's bottom UP
       so the last element scrolls fully above the tab bar.
       This extends the scroll area, not just the body padding. */
    .vv-main > .container-xl,
    .vv-main > .container-fluid {
        padding-bottom: 2.5rem !important;
    }
}

/* ── General mobile polish ─── */
@media (max-width: 767px) {

    /* Tighter page containers */
    .container-xl { padding-left: 0.75rem; padding-right: 0.75rem; }

    /* Cards */
    .vv-card { padding: 1rem; border-radius: 10px; }
    .vv-stat-card {
        padding: .75rem;
        gap: .6rem;
        min-height: 72px;
    }
    .vv-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 8px;
    }
    .vv-vehicle-card .card-header { padding: 0.875rem 1rem; }

    /* Forms */
    .vv-form-card { padding: 1rem; }
    .form-control, .form-select { font-size: 1rem; } /* prevents iOS zoom on focus */

    /* Buttons — bigger tap targets */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }

    /* Page headers */
    .vv-page-header h1 { font-size: 1.25rem; }
    .vv-page-header { margin-bottom: 1rem; }

    /* Vehicle / gallery cards */
    .gallery-card-header { padding: 1rem; }

    /* Modals — full width, aligned to bottom on mobile */
    .modal-dialog {
        margin: 0 0 0 0;
        max-width: 100%;
        width: 100%;
        align-self: flex-end;
    }
    .modal { align-items: flex-end !important; }
    .modal-content {
        border-radius: 18px 18px 0 0;
        max-height: 90vh;
        overflow-y: auto;
        border-bottom: none;
    }
    .modal-xl .modal-content,
    .modal-lg .modal-content { max-height: 96vh; }

    /* Breadcrumbs — smaller */
    .breadcrumb { font-size: 0.78rem; }

    /* Stat chips row — horizontal scroll */
    .tl-stat-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; -webkit-overflow-scrolling: touch; }
    .tl-stat-row > [class*="col-"] { flex: 0 0 auto; width: auto; min-width: 75px; }

    /* Document rows — wrap buttons below text on mobile */
    .vv-doc-row {
        flex-wrap: wrap;
        padding: 0.75rem 0.1rem;
        gap: 0.5rem 0.75rem;
    }
    .vv-doc-row .flex-grow-1 { min-width: 0; width: calc(100% - 52px); }
    .vv-doc-row .d-flex.gap-1.flex-shrink-0 {
        width: 100%;
        padding-left: 52px; /* indent to align under text (icon width + gap) */
        flex-shrink: unset;
    }

    /* Alerts */
    .alert { font-size: 0.85rem; }
}

/* ── Utility: hide on mobile only ─── */
@media (max-width: 991.98px) {
    .d-mobile-none { display: none !important; }
}

/* ── Utility: touch-action passthrough on scrollable areas ─── */
.offcanvas-body { touch-action: pan-y; }



/* ── Timeline: Photo cards ───────────────────────────────────────────────── */
.tl-card-photo {
    border-left: 3px solid #7C3AED;
}

.tl-photo-thumb {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
    cursor: zoom-in;
    transition: opacity .15s ease;
}

.tl-photo-thumb:hover {
    opacity: .88;
}

/* ── Timeline: Off Road cards ────────────────────────────────────────────── */
.tl-card-offroad {
    border-left: 3px solid #94A3B8;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 6px,
        rgba(148,163,184,.06) 6px,
        rgba(148,163,184,.06) 12px
    );
}

/* ── Timeline: photo lightbox overlay ───────────────────────────────────── */
#tlPhotoOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
#tlPhotoOverlay.active { display: flex; }
#tlPhotoOverlay img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
}
#tlPhotoOverlay .tl-overlay-close {
    position: absolute;
    top: 16px; right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: .8;
}
#tlPhotoOverlay .tl-overlay-close:hover { opacity: 1; }
#tlPhotoOverlay .tl-overlay-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: .9rem;
    background: rgba(0,0,0,.5);
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
