/* ============================================================================
   MODERN VEHICLE REPORT DESIGN
   Professional, clean, and responsive styling
   ============================================================================ */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: #f3f4f6;
    min-height: 100vh;
    padding-top: 2rem;
}

.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure all sections have proper background */
.report-container > .checks-grid {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

/* ============================================================================
   VEHICLE HEADER - Hero Section
   ============================================================================ */

.vehicle-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-left: 6px solid #667eea;
}

.vehicle-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.vehicle-reg-plate {
    background-color: hwb(49 8% 3%);
    color: #000;
    font-family: 'UKNumberPlate', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    padding: 0px 7px 0px 35px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
    max-height: 42px;
    line-height: 42px;
    text-align: center;
    letter-spacing: 5px;
    box-shadow: 0 2px 10px #a2a1a1 !important;
    background-image: url(/images/ukreg.png);
    background-repeat: no-repeat;
    background-size: auto 100%, 100% auto;
}

.vehicle-reg-small {
    background-color: #fff;
    color: #000;
    font-family: 'UKNumberPlate', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 5px 5px 0px 30px;
    border-radius: 3px;
    display: inline-block;
    letter-spacing: 3px;
    box-shadow: 0 1px 4px #a2a1a1;
    background-image: url(/images/ukreg.png);
    background-repeat: no-repeat;
    background-size: auto 100%;    
    min-height: 30px;
    line-height: 30px;
    vertical-align: middle;
}

.vehicle-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.vehicle-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ============================================================================
   CARDS & SECTIONS
   ============================================================================ */

.card {
    background: transparent;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: none;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-header i {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Mobile card header */
@media (max-width: 767px) {
    .card-header {
        padding: 1.25rem 1rem;
        font-size: 1rem;
        gap: 0.75rem;
    }
    
    .card-header i {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
}

.card-body {
    padding: 1.5rem;
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ============================================================================
   CHECK STATUS BOXES
   ============================================================================ */

/* Checks Grid Layout */
.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.check-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.check-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.check-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Status Badge */
.check-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Check Pass Styling */
.check-box.check-pass {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #86efac;
}

.check-box.check-pass::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.check-box.check-pass .check-status-badge {
    color: #059669;
}

.check-box.check-pass:hover {
    border-color: #10b981;
}

/* Check Warning Styling */
.check-box.check-warning {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    border-color: #fcd34d;
}

.check-box.check-warning::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.check-box.check-warning .check-status-badge {
    color: #d97706;
}

.check-box.check-warning:hover {
    border-color: #f59e0b;
}

/* Check Fail Styling */
.check-box.check-fail {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    border-color: #fca5a5;
}

.check-box.check-fail::before {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.check-box.check-fail .check-status-badge {
    color: #dc2626;
}

.check-box.check-fail:hover {
    border-color: #ef4444;
}

/* Check Icon */
.check-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
}

.check-box.check-pass .check-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.check-box.check-warning .check-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.check-box.check-fail .check-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.check-box:hover .check-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Check Label */
.check-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Check Value */
.check-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-box.check-pass .check-value {
    color: #059669;
}

.check-box.check-warning .check-value {
    color: #d97706;
}

.check-box.check-fail .check-value {
    color: #dc2626;
}
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================================
   ALERT BOXES
   ============================================================================ */

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.alert-modern {
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.alert-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.3s ease;
}

.alert-modern:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.alert-modern:hover::before {
    width: 6px;
}

.alert-modern:hover .alert-icon {
    transform: scale(1.05);
}

.alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.alert-content {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.65;
    font-weight: 500;
    padding: 0.125rem 0;
    color: inherit;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #991b1b;
}

.alert-danger::before {
    background: #ef4444;
}

.alert-danger .alert-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.alert-warning::before {
    background: #f59e0b;
}

.alert-warning .alert-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--success-color);
    color: #065f46;
}

.alert-success .alert-icon {
    background: var(--success-color);
    color: white;
}

/* ============================================================================
   CO2 RATING SECTION
   ============================================================================ */

.co2-rating-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--border-radius);
    border: 2px solid #bbf7d0;
}

.co2-value-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.co2-value-large {
    font-size: 4rem;
    font-weight: 800;
    color: #059669;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.co2-value-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.co2-band-display {
    margin-top: 0.5rem;
}

.co2-band-display .badge-modern {
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
    font-weight: 700;
}

.co2-rating-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.co2-rating-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.co2-info-text {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #0c4a6e;
}

.co2-info-text i {
    color: #0ea5e9;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.alert-content {
    flex: 1;
    line-height: 1.6;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table-modern thead th {
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-align: left;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.table-modern thead th:first-child {
    border-top-left-radius: var(--border-radius-sm);
}

.table-modern thead th:last-child {
    border-top-right-radius: var(--border-radius-sm);
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.table-modern tbody tr:hover {
    background: var(--bg-light);
}

.table-modern tbody tr:last-child {
    border-bottom: none;
}

.table-modern td {
    padding: 1rem 1.25rem;
    color: var(--text-primary);
}

.table-modern td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 35%;
}

/* Striped table variant */
.table-striped tbody tr:nth-child(even) {
    background: var(--bg-light);
}

/* ============================================================================
   INFO GRID - Vehicle Specifications
   ============================================================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    background: #f8fafc;
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.info-item:hover {
    background: #e0e7ff;
    border-left-color: var(--primary-dark);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================================================
   FUSION CHARTS WATERMARK COVER
   ============================================================================ */

.fusion-watermark-cover {
    position: relative;
    width: 105px;
    height: 30px;
    background: white;
    margin-top: -30px;
    z-index: 10;
}

#chartContainer {
    position: relative;
    padding-bottom: 10px;
}

/* ============================================================================
   NEXT STEPS SECTION
   ============================================================================ */

.next-steps-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid #3b82f6;
}

.next-steps-section:last-of-type {
    margin-bottom: 1rem;
}

.next-steps-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #cbd5e1;
}

.next-steps-header i {
    font-size: 1.5rem;
    color: #3b82f6;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.next-steps-header h6 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.next-steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.next-step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.next-step-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateX(4px);
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.step-content {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}

.step-content strong {
    color: #1e293b;
    font-weight: 600;
}

.step-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.step-content a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.step-content a i {
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.next-steps-note {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.next-steps-note i {
    color: #d97706;
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.next-steps-note span {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #78350f;
}

.next-steps-note strong {
    font-weight: 700;
    color: #92400e;
}

/* ============================================================================
   BADGES & LABELS
   ============================================================================ */

.badge-modern {
    display: inline-flex;
    align-items: center;
    /* Mobile-first: Smaller padding and font */
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Tablet and up */
@media (min-width: 768px) {
    .badge-modern {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

/* ============================================================================
   TIMELINE - Owner Changes
   ============================================================================ */

.timeline {
    position: relative;
    /* Mobile-first: Smaller left padding */
    padding-left: 1.5rem;
}

/* Tablet and up */
@media (min-width: 768px) {
    .timeline {
        padding-left: 2rem;
    }
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    /* Mobile-first: Smaller padding */
    padding-bottom: 1.5rem;
}

/* Tablet and up */
@media (min-width: 768px) {
    .timeline-item {
        padding-bottom: 2rem;
    }
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    /* Mobile-first: Smaller marker */
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--border-color);
}

/* Tablet and up */
@media (min-width: 768px) {
    .timeline-marker {
        width: 18px;
        height: 18px;
    }
}

.timeline-content {
    background: var(--bg-light);
    /* Mobile-first: Smaller padding */
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

/* Tablet and up */
@media (min-width: 768px) {
    .timeline-content {
        padding: 1rem 1.25rem;
    }
}

.timeline-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.timeline-title {
    /* Mobile-first: Slightly smaller font */
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tablet and up */
@media (min-width: 768px) {
    .timeline-title {
        font-size: 1rem;
    }
}

/* ============================================================================
   STAT CARDS
   ============================================================================ */

.stat-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================================================================
   LIST GROUPS
   ============================================================================ */

.list-group-modern {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.list-group-item-modern {
    padding: 1.25rem 1.5rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.list-group-item-modern:last-child {
    border-bottom: none;
}

.list-group-item-modern:hover {
    background: var(--bg-light);
}

.list-group-item-danger {
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .vehicle-header {
        padding: 2rem 1.5rem;
    }
    
    .vehicle-reg-plate {
        font-size: 2rem;
        letter-spacing: 4px;
    }
    
    .vehicle-title {
        font-size: 1.5rem;
    }
    
    .checks-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-modern td,
    .table-modern th {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================================================
   PRINT STYLES - Ink-Friendly Version
   ============================================================================ */

@media print {
    body {
        background: white !important;
        padding: 0 !important;
        color: #000 !important;
    }
    
    .report-container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        page-break-inside: avoid;
        margin-bottom: 1rem;
        background: white !important;
    }
    
    .card:hover {
        transform: none !important;
    }
    
    .vehicle-header {
        background: white !important;
        color: #000 !important;
        border: 3px solid #000 !important;
        page-break-after: avoid;
    }
    
    .vehicle-header::before {
        display: none;
    }
    
    .vehicle-reg-plate {
        background: white !important;
        color: #000 !important;
        border: 3px solid #000 !important;
    }
    
    .vehicle-title,
    .vehicle-subtitle {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .card-header {
        background: white !important;
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        font-weight: 700 !important;
    }
    
    .check-box {
        background: white !important;
        border: 2px solid #000 !important;
    }
    
    .check-box-success .check-icon {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .check-box-warning .check-icon {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .check-box-danger .check-icon {
        background: #000 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .check-title,
    .check-value {
        color: #000 !important;
    }
    
    .badge-modern {
        background: white !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .badge-danger {
        background: #000 !important;
        color: white !important;
    }
    
    .alert-modern {
        background: white !important;
        border: 2px solid #000 !important;
    }
    
    .alert-danger {
        border-left: 5px solid #000 !important;
    }
    
    .alert-icon {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .checks-grid {
        page-break-inside: avoid;
        background: white !important;
        border: 2px solid #000 !important;
    }
    
    .info-grid {
        page-break-inside: avoid;
    }
    
    .info-item {
        background: white !important;
        border: 1px solid #000 !important;
        border-left: 4px solid #000 !important;
    }
    
    .info-label,
    .info-value {
        color: #000 !important;
    }
    
    .table-modern {
        page-break-inside: avoid;
        border: 2px solid #000 !important;
    }
    
    .table-modern thead {
        background: white !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .table-modern thead th {
        color: #000 !important;
        font-weight: 700 !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .table-modern tbody tr {
        border-bottom: 1px solid #000 !important;
    }
    
    .table-modern td {
        color: #000 !important;
    }
    
    .stat-card {
        background: white !important;
        border: 2px solid #000 !important;
    }
    
    .stat-value {
        color: #000 !important;
    }
    
    .stat-label {
        color: #000 !important;
    }
    
    /* Hide icons in print to save ink */
    .fas, .fa {
        display: none !important;
    }
}

/* Print mode when print=y parameter is present */
body.print-mode {
    background: white !important;
    padding: 1rem !important;
}

body.print-mode .report-container {
    max-width: 1200px;
}

body.print-mode .vehicle-header {
    margin-bottom: 1.5rem;
    page-break-after: avoid;
    background: white !important;
    color: #000 !important;
    border: 3px solid #000 !important;
}

body.print-mode .vehicle-reg-plate {
    background: white !important;
    color: #000 !important;
    border: 3px solid #000 !important;
}

body.print-mode .vehicle-title,
body.print-mode .vehicle-subtitle {
    color: #000 !important;
}

body.print-mode .card {
    box-shadow: none !important;
    border: 2px solid #000 !important;
    page-break-inside: avoid;
    background: white !important;
}

body.print-mode .card-header {
    background: white !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
}

body.print-mode .checks-grid {
    box-shadow: none !important;
    background: white !important;
    border: 2px solid #000 !important;
}

body.print-mode .check-box {
    background: white !important;
    border: 2px solid #000 !important;
}

body.print-mode .info-item {
    background: white !important;
    border: 1px solid #000 !important;
}

body.print-mode .badge-modern {
    background: white !important;
    color: #000 !important;
    border: 1px solid #000 !important;
}

body.print-mode .alert-modern {
    background: white !important;
    border: 2px solid #000 !important;
}

/* ============================================================================
   ANIMATION & TRANSITIONS
   ============================================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-muted); }

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ============================================================================
   MOBILE-FIRST RESPONSIVE DESIGN
   Optimized for mobile users (majority of traffic)
   ============================================================================ */

/* Base: Mobile First (320px+) */
@media (max-width: 767px) {
    body {
        padding: 0.5rem 0;
        overflow-x: hidden;
    }
    
    .report-container {
        padding: 0.75rem;
    }
    
    /* Hero Header - Mobile Optimized */
    .vehicle-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .vehicle-header::before {
        width: 150px;
        height: 150px;
    }
    
    .vehicle-reg-plate {        
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        display: block;
        text-align: center;
    }
    
    .vehicle-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .vehicle-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    /* Cards - Touch Friendly */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .card-header i {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Check Grid - 2 Columns on Mobile */
    .checks-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .check-box {
        padding: 0.875rem;
        min-height: 100px;
    }
    
    .check-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .check-title {
        font-size: 0.7rem;
    }
    
    .check-value {
        font-size: 0.875rem;
    }
    
    /* Tables - Horizontal Scroll */
    .card-body > .table-modern {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .table-modern thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .table-modern tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Info Grid - Single Column */
    .info-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .info-item {
        padding: 1rem;
        min-height: 60px;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 0.95rem;
    }
    
    /* Alerts - Touch Friendly */
    .alert-modern {
        gap: 0.75rem;
        padding: 1rem;
        flex-direction: row;
    }
    
    .alert-icon {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
    
    .alert-content {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* CO2 Rating - Mobile */
    .co2-rating-container {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 1.25rem;
    }
    
    .co2-value-section {
        align-items: center;
        width: 100%;
    }
    
    .co2-value-large {
        font-size: 3rem;
    }
    
    .co2-value-label {
        font-size: 1.1rem;
    }
    
    .co2-info-text {
        font-size: 0.85rem;
        padding: 0.875rem 1rem;
    }
    
    /* Next Steps - Mobile */
    .next-steps-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .next-steps-header {
        gap: 0.625rem;
    }
    
    .next-steps-header i {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
    
    .next-steps-header h6 {
        font-size: 1.1rem;
    }
    
    .next-step-item {
        padding: 0.875rem;
        gap: 0.875rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.875rem;
    }
    
    .step-content {
        font-size: 0.875rem;
    }
    
    .next-steps-note {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    /* Timeline - Mobile Friendly */
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.4rem;
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
    
    .timeline-content {
        padding: 0.875rem 1rem;
    }
    
    .timeline-title {
        font-size: 0.9rem;
    }
    
    /* Badges - Smaller */
    .badge-modern {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Stat Cards */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Improve Touch Targets */
    button,
    a.btn,
    .check-box,
    .info-item,
    .timeline-content {
        min-height: 44px;
    }
}

/* Tablet: 768px to 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .checks-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    .checks-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Touch Device Optimization - Disable Hover Effects */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .check-box:hover,
    .info-item:hover,
    .table-modern tbody tr:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}
.mb-3 { margin-bottom: 1rem; }
