/* ============================================
   The Service Book — Purple Brand Theme
   ============================================ */
:root {
    --tsb-purple: #453A79;
    --tsb-purple-rgb: 69, 58, 121;
    --tsb-purple-hover: #362E61;
    --tsb-purple-dark: #2A2350;
    --tsb-purple-darker: #1E1940;
    --tsb-purple-light: #E8E5F0;
    --tsb-purple-lighter: #F3F1F8;
    --tsb-purple-muted: #6E6399;

    --bs-primary: var(--tsb-purple);
    --bs-primary-rgb: var(--tsb-purple-rgb);
    --bs-link-color: var(--tsb-purple);
    --bs-link-color-rgb: var(--tsb-purple-rgb);
    --bs-link-hover-color: var(--tsb-purple-hover);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vrm-input {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.vrm-input::placeholder {
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
}

.hero-section {
    background:
        linear-gradient(135deg, rgba(42, 35, 80, 0.82) 0%, rgba(69, 58, 121, 0.75) 100%),
        url('/img/hero-bg.avif') center/cover no-repeat;
    position: relative;
}

.hero-section h1,
.hero-section .lead {
    color: #fff !important;
}

.hero-section .lead {
    opacity: 0.85;
}

.hero-section .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.card {
    border: none;
    border-radius: 0.75rem;
}

.badge.bg-primary {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn-primary {
    --bs-btn-bg: var(--tsb-purple);
    --bs-btn-border-color: var(--tsb-purple);
    --bs-btn-hover-bg: var(--tsb-purple-hover);
    --bs-btn-hover-border-color: var(--tsb-purple-hover);
    --bs-btn-active-bg: var(--tsb-purple-hover);
    --bs-btn-active-border-color: var(--tsb-purple-dark);
    --bs-btn-disabled-bg: var(--tsb-purple-muted);
    --bs-btn-disabled-border-color: var(--tsb-purple-muted);
}

.btn-outline-primary {
    --bs-btn-color: var(--tsb-purple);
    --bs-btn-border-color: var(--tsb-purple);
    --bs-btn-hover-bg: var(--tsb-purple);
    --bs-btn-hover-border-color: var(--tsb-purple);
    --bs-btn-active-bg: var(--tsb-purple-hover);
    --bs-btn-active-border-color: var(--tsb-purple-hover);
}

/* --- Badges --- */
.badge.bg-primary {
    background-color: var(--tsb-purple) !important;
}

.badge.bg-secondary {
    background-color: var(--tsb-purple-muted) !important;
}

/* --- Navbar & Footer --- */
.navbar.bg-dark {
    background-color: var(--tsb-purple-dark) !important;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

footer.bg-dark {
    background-color: var(--tsb-purple-dark) !important;
}

/* --- Progress bar --- */
.progress-bar {
    background-color: var(--tsb-purple);
}

/* --- Report accents --- */
.border-primary {
    border-color: var(--tsb-purple) !important;
}

/* --- Form focus --- */
.form-control:focus {
    border-color: var(--tsb-purple-muted);
    box-shadow: 0 0 0 0.25rem rgba(var(--tsb-purple-rgb), 0.25);
}

/* ============================================
   Device Mockup — Homepage
   ============================================ */
.device-mockup-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2.5rem;
    padding: 1rem 0;
}

/* --- Laptop --- */
.device-laptop {
    width: 520px;
    flex-shrink: 0;
}

/* Lid / display assembly */
.laptop-lid {
    background: #c0c0c4;
    border-radius: 12px 12px 0 0;
    padding: 12px 12px 8px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
}

.laptop-screen {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Webcam dot */
.laptop-lid::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: #888;
    border-radius: 50%;
    margin: 0 auto 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

/* Hinge */
.laptop-hinge {
    height: 8px;
    background: linear-gradient(to bottom, #a8a8ad, #bbbbbe, #a8a8ad);
    margin: 0 20px;
    border-radius: 0 0 2px 2px;
}

/* Keyboard body */
.laptop-body {
    background: linear-gradient(to bottom, #c8c8cc, #bbbbbe);
    border-radius: 0 0 8px 8px;
    padding: 10px 16px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Keyboard grid */
.laptop-keyboard {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.laptop-key {
    background: #a3a3a8;
    border-radius: 2px;
    height: 10px;
    grid-column: span 2;
    box-shadow: 0 1px 0 #909095, inset 0 1px 0 rgba(255,255,255,0.15);
}

.laptop-key.wide { grid-column: span 3; }
.laptop-key.spacebar { grid-column: span 10; }

/* Trackpad */
.laptop-trackpad {
    width: 120px;
    height: 28px;
    background: #b0b0b5;
    border-radius: 4px;
    margin: 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.2);
}

/* --- iPhone --- */
.device-phone {
    width: 170px;
    flex-shrink: 0;
    position: relative;
}

/* Outer frame (titanium/steel look) */
.phone-frame {
    background: #2c2c2e;
    border-radius: 28px;
    padding: 8px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
}

/* Side button (power) */
.phone-frame::before {
    content: '';
    position: absolute;
    right: -2px;
    top: 70px;
    width: 3px;
    height: 28px;
    background: #3a3a3c;
    border-radius: 0 2px 2px 0;
}

/* Volume buttons */
.phone-frame::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 55px;
    width: 3px;
    height: 20px;
    background: #3a3a3c;
    border-radius: 2px 0 0 2px;
    box-shadow: 0 28px 0 #3a3a3c;
}

.phone-screen {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 9 / 19.5;
    position: relative;
}

/* Dynamic Island */
.phone-dynamic-island {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 12px;
    background: #1c1c1e;
    border-radius: 20px;
    z-index: 3;
}

/* Home indicator bar */
.phone-home-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: #ccc;
    border-radius: 2px;
    z-index: 3;
}

/* --- Mockup report content --- */
.mockup-content {
    font-family: 'Inter', sans-serif;
}

.laptop-screen .mockup-content {
    font-size: 9px;
    padding: 14px 12px;
}

.phone-screen .mockup-content {
    font-size: 6.5px;
    padding: 22px 8px 14px;
}

.mockup-header {
    margin-bottom: 6px;
}

.mockup-title {
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.laptop-screen .mockup-title { font-size: 13px; }
.phone-screen .mockup-title { font-size: 8.5px; }

.mockup-badge {
    display: inline-block;
    background-color: var(--tsb-purple-muted);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-top: 3px;
}

.mockup-meta {
    display: flex;
    gap: 8px;
    color: #6c757d;
    margin-top: 4px;
    flex-wrap: wrap;
}

.mockup-meta span { font-size: 0.85em; }

.mockup-divider {
    height: 1px;
    background: #e9ecef;
    margin: 6px 0;
}

.mockup-records-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.laptop-screen .mockup-records-title { font-size: 10px; }
.phone-screen .mockup-records-title { font-size: 7px; }

.mockup-record {
    background: #fafafa;
    border-radius: 4px;
    padding: 5px 6px;
    margin-bottom: 4px;
    border-left: 2px solid var(--tsb-purple);
}

.mockup-record-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.mockup-record-type {
    font-weight: 600;
    color: #1a1a2e;
}

.mockup-record-date {
    color: #6c757d;
    font-size: 0.9em;
}

.mockup-record-detail {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.85em;
    margin-top: 1px;
}

.mockup-work-items { margin-top: 3px; }

.mockup-work-item {
    padding-left: 6px;
    border-left: 1.5px solid var(--tsb-purple-light);
    color: #666;
    font-size: 0.8em;
    margin-bottom: 1px;
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
    .device-mockup-container {
        justify-content: center;
    }
    .device-phone {
        width: 210px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .device-laptop { width: 400px; }
    .device-phone { width: 150px; }
}

@media print {
    .device-mockup-container { display: none; }
}

/* ============================================
   Homepage Sections
   ============================================ */

/* --- Logo Carousel Strip (inside hero) --- commented out for now
.logo-carousel-strip {
    background: rgba(var(--tsb-purple-rgb), 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.logo-carousel-strip .logo-slide img {
    filter: none;
}
*/

/* --- Logo Carousel --- */
.logo-carousel {
    overflow: hidden;
    position: relative;
    /* mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); */
}

.logo-track {
    display: flex;
    gap: 4rem;
    animation: scroll-logos 90s linear infinite;
    width: max-content;
}

.logo-slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
}

.logo-slide img {
    height: 76px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    /* filter: opacity(0.5);
    transition: filter 0.3s; */
}

/* .logo-slide img:hover {
    filter: opacity(1);
} */

@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}

/* --- Feature Badge Cards (purple bg) --- */
.feature-badge-card {
    background: linear-gradient(135deg, var(--tsb-purple) 0%, var(--tsb-purple-dark) 100%);
    border-radius: 0.75rem;
    height: 100%;
}

/* --- Check / Cross Lists --- */
.check-list,
.cross-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li,
.cross-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.05rem;
}

.check-list li:last-child,
.cross-list li:last-child {
    border-bottom: none;
}

.check-list li svg,
.cross-list li svg {
    flex-shrink: 0;
}

/* --- Step Numbers --- */
.step-number {
    width: 48px;
    height: 48px;
    background: var(--tsb-purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

/* --- Stats Bar --- */
.stats-bar {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.stat-item {
    padding: 1rem 0;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tsb-purple);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, var(--tsb-purple-dark) 0%, var(--tsb-purple) 100%);
}

/* --- Brand Logo Grid --- */
.brand-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    transition: box-shadow 0.2s;
    height: 100%;
}

.brand-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-card img {
    height: 40px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.brand-name {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 6px;
    font-weight: 500;
}

/* --- FAQ Accordion --- */
.accordion-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.accordion-button {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--tsb-purple-lighter);
    color: var(--tsb-purple-dark);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--tsb-purple-rgb), 0.15);
    border-color: transparent;
}

.accordion-button::after {
    filter: brightness(0) saturate(100%);
}

.accordion-button:not(.collapsed)::after {
    filter: none;
}

/* ============================================
   REG / VIN Toggle + Plate Input
   ============================================ */

/* Toggle switcher — segmented tabs at top of card */
.input-toggle {
    display: flex;
    background: white;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 6px 6px 0;
    gap: 4px;
    border-bottom: 1px solid #e9ecef;
}

.input-toggle-btn {
    flex: 1;
    border: none;
    background: rgba(var(--tsb-purple-rgb), 0.08);
    color: var(--tsb-purple-muted);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.5rem 0.5rem 0 0;
}

.input-toggle-btn.active {
    background: var(--tsb-purple);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--tsb-purple-rgb), 0.3);
}

.input-toggle-btn:hover:not(.active) {
    background: rgba(var(--tsb-purple-rgb), 0.15);
    color: var(--tsb-purple);
}

/* Plate-style input */
.plate-input-wrap {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}


.plate-input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Inter', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    outline: none;
    min-width: 0;
    background: #FFD700;
    color: #333;
}

.plate-input::placeholder {
    color: #999;
    font-weight: 600;
    letter-spacing: 3px;
}

/* VIN mode: grey plate background */
.plate-vin .plate-input {
    background: #d4d4d8;
    color: #333;
}

/* Check Now button (green like ServiceStamp) */
.btn-check-now {
    background: var(--tsb-purple);
    color: white;
    border: none;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 14px 0;
    border-radius: 50px;
    transition: background 0.2s;
}

.btn-check-now:hover {
    background: var(--tsb-purple-hover);
    color: white;
}

/* ============================================
   Report Page — Redesign
   ============================================ */

/* --- VRM Plate Display --- */
.vrm-plate {
    display: inline-block;
    background: #FFD700;
    color: #333;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 4px;
    font-family: 'Inter', monospace;
    border: 1px solid #e0c200;
}

/* --- Report Stat Cards --- */
.report-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.report-stat-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.report-stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.report-stat-icon.blue { background: #e3f2fd; color: #1565c0; }
.report-stat-icon.purple { background: var(--tsb-purple-lighter); color: var(--tsb-purple); }
.report-stat-icon.orange { background: #fff3e0; color: #e65100; }

.report-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.report-stat-label {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.1rem;
}

/* --- Timeline --- */
.service-timeline {
    position: relative;
    padding-left: 2rem;
}

.service-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    z-index: 1;
}

.timeline-item:first-child .timeline-dot {
    background: #2e7d32;
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.15);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.timeline-date {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
}

.timeline-badge-latest {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-mileage {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
    white-space: nowrap;
}

.timeline-dealer {
    color: #666;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.timeline-work-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-work-items li {
    font-size: 0.85rem;
    color: #555;
    padding: 2px 0 2px 12px;
    position: relative;
}

.timeline-work-items li::before {
    content: '\00B7';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #999;
}

/* --- MOT Section --- */
.mot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 4px;
}

.mot-badge-passed {
    background: #e8f5e9;
    color: #2e7d32;
}

.mot-badge-failed {
    background: #ffebee;
    color: #c62828;
}

.mot-record {
    background: #f9f9fb;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.mot-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.mot-record-header .left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mot-record-date {
    font-weight: 600;
    color: #333;
}

.mot-record-mileage {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.mot-record-expiry {
    font-size: 0.85rem;
    color: #888;
}

.mot-advisories {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e8e8e8;
}

.mot-advisory-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e65100;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.mot-advisory-item {
    font-size: 0.85rem;
    color: #555;
    padding: 2px 0 2px 12px;
    position: relative;
}

.mot-advisory-item::before {
    content: '\00B7';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #e65100;
}

/* --- Mileage History Table --- */
.mileage-table {
    width: 100%;
    border-collapse: collapse;
}

.mileage-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e9ecef;
}

.mileage-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #333;
}

.mileage-table tbody tr:last-child td {
    border-bottom: none;
}

.mileage-source-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

.mileage-source-badge.service {
    background: var(--tsb-purple-lighter);
    color: var(--tsb-purple);
}

.mileage-source-badge.mot {
    background: #e3f2fd;
    color: #1565c0;
}

/* --- Report Section Headers --- */
.report-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.report-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.report-section-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.report-section-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1565c0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Mileage Anomaly Warnings --- */
.mileage-warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #f9a825;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.mileage-warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #e65100;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.mileage-warning-detail {
    font-size: 0.88rem;
    color: #555;
    padding: 0.35rem 0;
    line-height: 1.5;
}

.mileage-anomaly-row {
    background: #fff5f5;
}

.mileage-anomaly-row td {
    border-color: #fecaca;
}

/* --- Report Tabs Navigation --- */
.report-tabs-nav {
    /* Uses Bootstrap row/col for layout */
}

.report-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e0dce6;
    border-radius: 12px;
    background: #fff;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.report-tab-btn:hover {
    border-color: var(--tsb-purple);
    color: var(--tsb-purple);
    box-shadow: 0 2px 8px rgba(var(--tsb-purple-rgb), 0.12);
}

.report-tab-btn.active {
    background: var(--tsb-purple);
    color: #fff;
    border-color: var(--tsb-purple);
    box-shadow: 0 2px 10px rgba(var(--tsb-purple-rgb), 0.3);
}

.report-tab-btn.locked {
    border-color: #e0dce6;
    color: #999;
    background: #fafafa;
}

.report-tab-btn.locked:hover {
    border-color: var(--tsb-purple-muted);
    color: var(--tsb-purple-muted);
    background: #fff;
}

/* Tab content panels — carousel slide transition */
.tab-panels-wrapper {
    overflow: hidden;
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: slideInRight 0.3s ease both;
}

.tab-panel.slide-left.active {
    animation: slideInLeft 0.3s ease both;
}

.tab-panel.slide-right.active {
    animation: slideInRight 0.3s ease both;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Unlock card */
.unlock-card {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* --- Report responsive --- */
@media (max-width: 767.98px) {
    .report-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-timeline {
        padding-left: 1.75rem;
    }
    .timeline-header {
        flex-direction: column;
        gap: 0.15rem;
    }
    .mot-record-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Spec Check Checkbox (Payment Page) --- */
.spec-check-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e0dce8;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin: 0;
}

.spec-check-option:hover {
    border-color: var(--tsb-purple-light);
    background: rgba(var(--tsb-purple-rgb), 0.03);
}

.spec-check-option:has(.spec-check-input:checked) {
    border-color: var(--tsb-purple);
    background: rgba(var(--tsb-purple-rgb), 0.06);
}

.spec-check-input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--tsb-purple);
    cursor: pointer;
}

.spec-check-content {
    flex: 1;
    min-width: 0;
}

.spec-check-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a1a2e;
}

.spec-check-desc {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 2px;
}

.spec-check-price {
    font-weight: 700;
    font-size: 1rem;
    color: var(--tsb-purple);
    white-space: nowrap;
}

/* --- Factory Spec Grid (Report Page) --- */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.spec-item {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.spec-item:nth-child(odd) {
    border-right: 1px solid #f0f0f0;
}

.spec-item-label {
    font-size: 0.78rem;
    color: #6c757d;
    text-transform: capitalize;
}

.spec-item-value {
    font-weight: 600;
    font-size: 0.92rem;
    color: #1a1a2e;
}

@media (max-width: 575.98px) {
    .spec-grid {
        grid-template-columns: 1fr;
    }
    .spec-item:nth-child(odd) {
        border-right: none;
    }
}

/* --- Email input pulse animation (Payment page) --- */
@keyframes email-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(69, 58, 121, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(69, 58, 121, 0); }
}
.email-pulse {
    animation: email-pulse 1s ease-in-out 2;
    border-color: var(--tsb-purple) !important;
}
