﻿/* CSS Variables */
:root {
    --primary: var(--ari-blue);
    --primary-dark: #00264D; /* darker blue for gradients/hover */
    --bg-gray: var(--ari-gray);
    --border: var(--ari-light-gray);
    --text: var(--ari-dark-gray);
    --ari-red: #CC0000;
    --ari-blue: #003366;
    --ari-light-blue: #0066CC;
    --ari-white: #FFFFFF;
    --ari-gray: #F5F5F5;
    --ari-dark-gray: #333333;
    --ari-light-gray: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;

    /* Admin Color Palette - Harmonized */
    --admin-primary: #667eea;
    --admin-primary-dark: #5a6fd6;

    /* Status Colors */
    --status-success: #27ae60;
    --status-success-bg: #d4edda;
    --status-success-text: #155724;

    --status-warning: #f39c12;
    --status-warning-bg: #fff3cd;
    --status-warning-text: #856404;

    --status-danger: #e74c3c;
    --status-danger-bg: #f8d7da;
    --status-danger-text: #721c24;

    --status-info: #3498db;
    --status-info-bg: #d1ecf1;
    --status-info-text: #0c5460;

    --status-pending: #f39c12;
    --status-pending-bg: #fff3cd;
    --status-pending-text: #856404;

    /* Priority Colors */
    --priority-hot: #e74c3c;
    --priority-warm: #f39c12;
    --priority-cold: #3498db;

    /* Application Type Colors */
    --type-owner: #2e7d32;
    --type-owner-bg: #e8f5e9;
    --type-fleet: #e65100;
    --type-fleet-bg: #fff3e0;
    --type-driver: #1565c0;
    --type-driver-bg: #e3f2fd;

    /* Neutral */
    --neutral-100: #f8f9fa;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-400: #ced4da;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-800: #343a40;
    --neutral-900: #212529;
}

/* ===========================================
   ADMIN SHARED STYLES - Harmonized UI
   =========================================== */

/* Status Badges - Unified */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-badge.success,
.admin-badge.approved,
.admin-badge.verified {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

.admin-badge.warning,
.admin-badge.pending,
.admin-badge.in-progress {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
}

.admin-badge.danger,
.admin-badge.rejected,
.admin-badge.overdue {
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
}

.admin-badge.info,
.admin-badge.submitted {
    background: var(--status-info-bg);
    color: var(--status-info-text);
}

/* Priority Dots - Unified */
.admin-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-priority-dot.hot { background: var(--priority-hot); }
.admin-priority-dot.warm { background: var(--priority-warm); }
.admin-priority-dot.cold { background: var(--priority-cold); }

/* Owner Initials Avatar - Unified */
.admin-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--status-info-bg);
    color: var(--status-info-text);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
}

/* Application Type Chips - Unified */
.admin-type-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-type-chip.owner {
    background: var(--type-owner-bg);
    color: var(--type-owner);
}

.admin-type-chip.fleet {
    background: var(--type-fleet-bg);
    color: var(--type-fleet);
}

.admin-type-chip.driver {
    background: var(--type-driver-bg);
    color: var(--type-driver);
}

/* Card Actions - Unified */
.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--neutral-300);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: var(--neutral-600);
    transition: all 0.15s;
}

.admin-action-btn:hover {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
    color: var(--neutral-700);
}

.admin-action-btn.primary:hover {
    background: var(--status-info-bg);
    border-color: var(--status-info);
    color: var(--status-info);
}

.admin-action-btn.success:hover {
    background: var(--status-success-bg);
    border-color: var(--status-success);
    color: var(--status-success);
}

.admin-action-btn.danger:hover {
    background: var(--status-danger-bg);
    border-color: var(--status-danger);
    color: var(--status-danger);
}

/* Admin Card Base - Unified */
.admin-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
}

.admin-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.admin-card.overdue {
    border-left: 3px solid var(--status-danger);
    background: #fffbfb;
}

/* Admin Table - Unified */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--neutral-200);
}

.admin-table th {
    background: var(--neutral-100);
    font-weight: 600;
    font-size: 12px;
    color: var(--neutral-600);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-table tbody tr:hover {
    background: var(--neutral-100);
}

/* Filter Controls - Unified */
.admin-filter {
    padding: 6px 10px;
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    font-size: 13px;
    background: white;
    color: var(--neutral-700);
}

.admin-filter:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--ari-dark-gray);
    background: var(--ari-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--ari-blue);
}

h1 {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: var(--ari-light-blue);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: var(--ari-red);
    }

/* Skip to Content Link - Accessibility (WCAG 2.1 - 2.4.1) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ari-blue);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
    font-weight: bold;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--ari-red);
    outline-offset: 2px;
    color: white;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

/* Backdrop for mobile menu */
.menu-backdrop {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    z-index: 1001;
}

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    display: none;
    color: var(--text);
}

@media (min-width: 640px) {
    .logo-text {
        display: block;
    }
}

.mobile-header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: var(--bg-gray);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

    .mobile-header-phone:hover {
        background: white;
        border-color: var(--primary);
    }

    .mobile-header-phone:active {
        transform: scale(0.98);
    }

.mobile-phone-icon {
    font-size: 1.125rem;
}

.mobile-phone-text {
    display: inline;
}

@media (min-width: 1024px) {
    .mobile-header-phone {
        display: none;
    }
}

@media (max-width: 380px) {
    .mobile-phone-text {
        display: none;
    }
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
}

    .mobile-menu-btn:hover {
        border-color: var(--primary);
        background: var(--bg-gray);
    }

    .mobile-menu-btn:active {
        transform: scale(0.95);
    }

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Nav */
.nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 90%;
    max-width: 320px;
    height: calc(100vh - 70px);
    background: white;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1001;
}

    .nav.open {
        left: 0 !important;
    }

    .nav a {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        font-size: 1rem;
        border-bottom: 1px solid var(--border);
        transition: background 0.2s ease;
        min-height: 56px;
    }

        .nav a:hover {
            background: var(--bg-gray);
            color: var(--primary);
        }

.nav-footer {
    padding: 0.75rem 1.5rem;
    background: white;
    display: none;
}

.nav-logo-bottom {
    text-align: center;
    display: block;
}

    .nav-logo-bottom img {
        display: inline-block;
        height: 230px;
        width: auto;
        opacity: 0.95;
        transition: var(--transition);
        pointer-events: none;
        user-select: none;
    }

@media (max-width: 1023.98px) {
    .nav.open .nav-footer {
        display: block;
    }
}

@media (min-width: 1024px) {
    .nav-footer {
        display: none !important;
    }
}

.nav-contact {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--border);
}

.nav-phone {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem !important;
    background: var(--bg-gray);
    border-radius: 8px;
    border: none !important;
    color: var(--primary) !important;
    font-weight: 600;
}

.phone-icon {
    font-size: 1.25rem;
}

.phone-number {
    font-size: 1.125rem;
}

.nav-apply-btn {
    margin: 1rem 1.5rem !important;
    padding: 0.875rem 1.5rem !important;
    background: linear-gradient(135deg, var(--ari-red), #FF0000) !important;
    color: white !important;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none !important;
    min-height: 48px !important;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

    .nav-apply-btn:hover {
        background: linear-gradient(135deg, #B80000, #B80000) !important;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
        color: white !important;
    }

@media (min-width: 1024px) {
    .nav {
        position: static;
        left: auto;
        width: auto;
        max-width: none;
        height: auto;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        padding: 0;
        box-shadow: none;
        overflow: visible;
    }

        .nav a {
            padding: 0.5rem 1rem;
            border: none;
            min-height: auto;
        }

    .nav-contact {
        padding: 0;
        border: none;
        margin-left: 0.5rem;
    }

    .nav-phone {
        padding: 0.625rem 1rem !important;
        min-height: auto !important;
    }

    .phone-number {
        font-size: 1rem;
    }

    .nav-apply-btn {
        margin: 0 0 0 0.5rem !important;
        padding: 0.75rem 1.5rem !important;
        min-height: 48px !important;
    }
}

/* Main content padding (room for fixed header and mobile bottom bar) */
.main {
    padding-top: 70px;
    min-height: 100vh;
    padding-bottom: 80px;
}

@media (min-width: 768px) {
    .main {
        padding-bottom: 0;
    }
}

/* Mobile Bottom CTA */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .mobile-bottom-bar {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .page > footer {
        padding-bottom: 85px !important;
    }
}

.mobile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    min-height: 50px;
    transition: all 0.2s ease;
    border-right: 1px solid var(--border);
}

    .mobile-btn:last-child {
        border-right: none;
    }

.mobile-call {
    background: var(--primary);
    color: white;
}

.mobile-quote {
    background: white;
    color: var(--primary);
}

.mobile-apply {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.mobile-btn:active {
    opacity: 0.9;
    transform: scale(0.98);
}

/* Flash both ICON and TEXT inside the mobile apply CTA */
@keyframes applyFlash {
    0%, 100% {
        color: white;
    }

    50% {
        color: var(--ari-red);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-apply .btn-icon,
    .mobile-apply .btn-text {
        animation: applyFlash 1.4s ease-in-out infinite;
    }
}

.btn-icon {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.btn-text {
    font-size: 0.625rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    padding: 2.5rem 0; /* consistent top/bottom padding for all non-large heroes */
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-highlight {
    color: #FFD700;
    display: block;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .hero-highlight {
        font-size: 1.55em;
    }
}

.hero-requirements {
    background: var(--ari-white);
    border: 2px solid var(--ari-red);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: inline-block;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
    user-select: text;
    color: var(--text);
}

    .hero-requirements strong {
        color: var(--ari-red);
    }

    .hero-requirements::selection,
    .hero-requirements *::selection {
        background: rgba(204, 0, 0, 0.15);
        color: var(--text);
    }

    .hero-requirements:focus,
    .hero-requirements:active,
    .hero-requirements:focus-within {
        outline: none;
        border: 2px solid var(--ari-red);
    }

.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slide {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--ari-white);
    padding: 2rem 0;
    text-align: center;
}

.hero-title {
    color: white;
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: white;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}

.trust-badges .badge {
    background: rgba(255, 255, 255, 0.95);
    color: #000 !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

@media (max-width: 480px) {
    .trust-badges {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .trust-badges .badge {
        text-align: center;
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Buttons (global) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem; /* Increased for better mobile tap targets */
    min-height: 44px; /* Accessibility: minimum tap target size */
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

@media (min-width: 768px) {
    .btn {
        padding: 0.75rem 2rem;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--ari-red), #FF0000);
    color: var(--ari-white);
    box-shadow: var(--shadow-md);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        color: var(--ari-white);
    }

.btn-secondary {
    background: var(--ari-white);
    color: var(--ari-blue);
    border: 2px solid var(--ari-blue);
}

    .btn-secondary:hover {
        background: var(--ari-blue);
        color: var(--ari-white);
    }

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

    .btn-outline-secondary:hover {
        background: #6c757d;
        color: var(--ari-white);
    }

.btn-link {
    background: none;
    border: none;
    color: var(--ari-light-blue);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

    .btn-link:hover {
        color: var(--ari-red);
        text-decoration: underline;
    }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    width: 100%;
}

@media (min-width: 576px) {
    .btn-lg {
        width: auto;
    }
}

/* Section */
.section {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

    .section-title h1,
    .section-title h2 {
        position: relative;
        display: inline-block;
    }

/* About Section */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.about-content {
    width: 100%;
}

.about-logo {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

    .about-logo img {
        width: 100%;
        height: auto;
    }

@media (min-width: 768px) {
    .about-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }

    .about-logo {
        max-width: 400px;
    }
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .glass-card {
        padding: 2rem;
    }
}

/* Cards */
.card {
    background: var(--ari-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
    }

.card-header {
    background: linear-gradient(135deg, var(--ari-blue), var(--ari-light-blue));
    color: var(--ari-white);
    padding: 1.5rem;
    cursor: pointer;
}

.card-body {
    padding: 1.5rem;
}

/* Features Section */
.features {
    padding: 3rem 0;
    background: var(--ari-gray);
}

@media (min-width: 768px) {
    .features {
        padding: 4rem 0;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.feature-card {
    background: var(--ari-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
    }

.feature-icon {
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .feature-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Forms (global + wizard compatible) */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--ari-dark-gray);
    font-size: 14px;
}

    .form-label .required {
        color: var(--ari-red);
        margin-left: 2px;
    }

/* IMPORTANT: 16px font-size to avoid mobile zoom */
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--ari-light-gray);
    border-radius: var(--border-radius);
    font-size: 16px; /* >= 16px to prevent iOS zoom */
    transition: all 0.2s ease;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--ari-light-blue);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    .form-control.is-invalid {
        border-color: var(--ari-red);
        background: rgba(204, 0, 0, 0.03);
    }

        .form-control.is-invalid:focus {
            box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
        }

.form-text {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.5rem;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

/* Footer */
.footer {
    background: var(--ari-dark-gray);
    color: var(--ari-white) !important;
    margin-top: 3rem;
}

.footer-main {
    padding: 2rem 0;
    background: var(--ari-dark-gray);
}

@media (min-width: 768px) {
    .footer-main {
        padding: 3rem 0;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-column h3 {
    color: var(--ari-white) !important;
    margin-bottom: 1rem;
    font-size: clamp(1.125rem, 2.5vw, 1.25rem);
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .footer-logo {
        height: 60px;
    }
}

.footer-description {
    opacity: 0.9;
    line-height: 1.8;
    font-size: 0.875rem;
    color: var(--ari-white) !important;
}

@media (min-width: 768px) {
    .footer-description {
        font-size: 1rem;
    }
}

.footer-links {
    list-style: none;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 0.75rem;
        color: var(--ari-white) !important;
    }

    .footer-links a {
        color: var(--ari-white) !important;
        opacity: 0.9;
        font-size: 0.875rem;
        text-decoration: none;
    }

@media (min-width: 768px) {
    .footer-links a {
        font-size: 1rem;
    }
}

.footer-links a:hover {
    opacity: 1;
    color: var(--ari-red) !important;
    text-decoration: none;
}

/* Footer Contact */
.footer-contact {
    font-style: normal;
    opacity: 0.9;
    font-size: 0.875rem;
    color: var(--ari-white) !important;
}

    .footer-contact p {
        color: var(--ari-white) !important;
    }

    .footer-contact strong {
        color: var(--ari-white) !important;
    }

@media (min-width: 768px) {
    .footer-contact {
        font-size: 1rem;
    }
}

.footer-contact a {
    color: var(--ari-white) !important;
    text-decoration: none;
}

    .footer-contact a:hover {
        color: var(--ari-red) !important;
        text-decoration: underline;
    }

/* Footer Bottom */
.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
    .footer-bottom {
        padding: 1.5rem 0;
    }
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--ari-white) !important;
}

    .footer-bottom-content p {
        color: var(--ari-white) !important;
        margin: 0;
    }

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        font-size: 1rem;
    }
}

.footer-legal {
    display: flex;
    gap: 1rem;
    align-items: center;
}

    .footer-legal span {
        color: var(--ari-white) !important;
    }

    .footer-legal a {
        color: var(--ari-white) !important;
        opacity: 0.9;
        text-decoration: none;
    }

        .footer-legal a:hover {
            opacity: 1;
            color: var(--ari-red) !important;
            text-decoration: underline;
        }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--ari-light-gray);
}

@media (min-width: 768px) {
    th, td {
        padding: 1rem;
    }
}

th {
    background: var(--ari-gray);
    font-weight: 600;
    color: var(--ari-blue);
}

tr:hover {
    background: var(--ari-gray);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

/* Center on Mobile */
.center-mobile {
    display: inline-block;
}

@media (max-width: 767px) {
    .center-mobile {
        display: block;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
    }
}

/* Responsive Image */
.img-responsive {
    max-width: 100%;
    height: auto;
}

/* Loading Spinner - single definition */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--ari-light-gray);
    border-top-color: var(--ari-light-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Not Found Page */
.not-found {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

/* Hide on mobile */
@media (max-width: 767px) {
    .d-none-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .d-none-desktop {
        display: none !important;
    }
}

/* ========================================
   WIZARD / JOIN FORM STYLING
   ======================================== */

.wizard-page {
    min-height: 100vh;
    background: var(--ari-gray);
}

/* Hero Section with Marketing Copy */
.wizard-hero {
    position: relative;
    background: linear-gradient(135deg, var(--ari-blue) 0%, var(--ari-light-blue) 100%);
    color: var(--ari-white);
    padding: 60px 20px 40px;
    overflow: hidden;
    text-align: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

    .hero-content h1 {
        margin: 0 0 15px 0;
        font-size: 42px;
        font-weight: 700;
        letter-spacing: -0.5px;
        color: var(--ari-white);
    }

.hero-tagline {
    margin: 0 0 30px 0;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0.95;
    color: var(--ari-white);
}

.hero-benefits {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ari-white);
}

.benefit-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    color: var(--ari-white);
    font-weight: bold;
}

.hero-subtext {
    margin: 20px 0 0 0;
    font-size: 15px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--ari-white);
}

@media (max-width: 576px) {
    .wizard-hero {
        padding: 40px 15px 30px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-tagline {
        font-size: 14px;
    }

    .hero-benefits {
        gap: 15px;
        margin: 20px 0;
    }

    .benefit-item {
        font-size: 13px;
    }
}

/* Wizard Container */
.wizard-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Progress Section */
.progress-section {
    background: var(--ari-white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.progress-wrapper {
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--ari-light-gray);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ari-blue), var(--ari-light-blue));
    transition: width 0.3s ease;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ari-light-blue);
    letter-spacing: 0.5px;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ari-dark-gray);
}

/* Step Card */
.step-card {
    background: var(--ari-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.step-header {
    text-align: center;
    margin-bottom: 35px;
    border-bottom: none;
    padding-bottom: 0;
}

    .step-header h2 {
        margin: 0 0 10px 0;
        font-size: 26px;
        color: var(--ari-blue);
        font-weight: 700;
    }

.step-description {
    margin: 0;
    color: var(--ari-dark-gray);
    font-size: 15px;
}

/* Wizard Form Sections */
.form-section {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 576px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Support for col-sm-* classes within form-row (2/3 + 1/3 layout) */
    .form-row:has(.col-sm-8) {
        grid-template-columns: 2fr 1fr;
    }

    /* Full width column */
    .form-row .col-sm-12 {
        grid-column: 1 / -1;
    }
}

/* Mobile-first: all columns stack on small screens */
.col-sm-4, .col-sm-6, .col-sm-8, .col-sm-12,
.col-md-4, .col-md-6, .col-md-8, .col-md-12 {
    width: 100%;
}

/* Validation & Errors */
.invalid-feedback {
    color: var(--ari-red);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Verification Section */
.verification-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--ari-light-blue);
    margin-top: 20px;
}

    /* Scoped title style for verification to avoid breaking global .section-title */
    .verification-section .section-title {
        margin: 0 0 10px 0;
        font-size: 18px;
        font-weight: 600;
        color: var(--ari-dark-gray);
    }

.section-description {
    margin: 0 0 20px 0;
    color: var(--ari-dark-gray);
    font-size: 14px;
}

.code-input {
    font-size: 18px;
    letter-spacing: 6px;
    text-align: center;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.verification-info {
    margin: 20px 0;
    padding: 12px;
    background: var(--ari-white);
    border-radius: var(--border-radius);
    border-left: 3px solid #ff9800;
}

.timer-text {
    margin: 0;
    color: #ff9800;
    font-size: 14px;
    font-weight: 500;
}

.timer-expired {
    margin: 0;
    color: var(--ari-red);
    font-size: 14px;
    font-weight: 500;
}

/* Success State */
.success-state {
    background: linear-gradient(135deg, #f1f8f5 0%, #e8f5e9 100%);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid #4caf50;
    margin-top: 20px;
}

.success-message {
    margin-bottom: 25px;
}

.success-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: #4caf50;
    color: var(--ari-white);
    border-radius: 50%;
    font-size: 32px;
    line-height: 60px;
    margin-bottom: 15px;
    font-weight: bold;
}

.success-message p {
    margin: 10px 0 0 0;
    color: #2e7d32;
    font-weight: 600;
    font-size: 16px;
}

/* Wizard Buttons / Navigation */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

    .form-actions.verification-actions {
        justify-content: space-between;
        margin-top: 20px;
    }

.wizard-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Alerts (single canonical set) */
.alert {
    padding: 16px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    font-size: 14px;
}

    .alert h3 {
        margin: 0 0 10px 0;
        font-size: 16px;
    }

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid var(--ari-light-blue);
    color: #1565c0;
}

.alert-danger {
    background: #ffebee;
    border-left: 4px solid var(--ari-red);
    color: #c62828;
}

.alert-success {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #e65100;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

/* Mobile Responsive for Wizard */
@media (max-width: 576px) {
    .wizard-container {
        padding: 20px 15px;
    }

    .step-card {
        padding: 25px 15px;
        margin-bottom: 15px;
    }

    .step-header h2 {
        font-size: 22px;
    }

    .form-actions {
        flex-direction: column;
    }

        .form-actions.verification-actions {
            flex-direction: column;
            gap: 10px;
        }

        .form-actions button {
            width: 100%;
        }

    .progress-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .step-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .verification-section {
        padding: 15px;
    }

    .success-state {
        padding: 30px 15px;
    }
}
/* ============================
   Custom Places Autocomplete UI
   ============================ */

/* Make sure dropdown can be positioned under fields */
.form-group {
    position: relative;
}

/* Wrapper for inputs that have autocomplete */
.ari-autocomplete-wrapper {
    position: relative;
}

/* Dropdown container */
.ari-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--ari-white);
    border: 1px solid var(--ari-light-gray);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-md);
    max-height: 260px;
    overflow-y: auto;
    margin-top: 2px;
}

/* Single suggestion row */
.ari-autocomplete-item {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--ari-dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

    /* Leading icon dot */
    .ari-autocomplete-item::before {
        content: "📍";
        font-size: 14px;
        opacity: 0.8;
    }

    /* Hover/active state */
    .ari-autocomplete-item:hover,
    .ari-autocomplete-item.ari-active {
        background: var(--ari-gray);
    }

/* Small "no results" state */
.ari-autocomplete-empty {
    padding: 8px 12px;
    font-size: 13px;
    color: #999;
}

/* On mobile, make sure it doesn't overflow screen */
@media (max-width: 576px) {
    .ari-autocomplete-list {
        max-height: 200px;
    }
}

/* ============================
   Employer Autocomplete Styles
   ============================ */
.employer-autocomplete-wrapper {
    position: relative;
}

.employer-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2000;
    background: white;
    border: 1px solid var(--ari-light-gray);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 2px;
}

.employer-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

    .employer-autocomplete-item:last-child {
        border-bottom: none;
    }

    .employer-autocomplete-item:hover {
        background-color: var(--ari-gray);
    }

.employer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ari-dark-gray);
    margin-bottom: 2px;
}

.employer-location {
    font-size: 12px;
    color: #666;
}

.employer-autocomplete-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

.dot-number-display {
    margin-top: 8px;
}

    .dot-number-display .alert {
        margin-bottom: 0;
        padding: 8px 12px;
        font-size: 13px;
    }

        .dot-number-display .alert i {
            margin-right: 6px;
        }

@media (max-width: 576px) {
    .employer-autocomplete-list {
        max-height: 250px;
    }
}

/* Employment Record Card Styling */
.employment-record-card .form-row {
    margin-bottom: 1.25rem;
}

.employment-record-card .form-group {
    margin-bottom: 1rem;
}

.employment-record-card .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Badge styles for FMCSA status and CDL endorsements/certifications */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.5rem;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Badge container */
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

/* Badge color variants */
.badge.bg-success,
.badge.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge.bg-danger {
    background-color: #dc3545;
    color: #fff;
}

.badge.bg-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge.bg-info,
.badge.badge-info {
    background-color: var(--ari-blue);
    color: #fff;
}

.badge.badge-primary {
    background-color: var(--ari-light-blue);
    color: #fff;
}

/* Badge hover effect */
.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* ============================
   Truck Summary Cards (Step 4)
   ============================ */
.added-trucks-section {
    margin-bottom: 30px;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--ari-dark-gray);
    margin-bottom: 15px;
}

.truck-summary-card {
    background: var(--ari-gray);
    border: 1px solid var(--ari-light-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

    .truck-summary-card:hover {
        border-color: var(--ari-light-blue);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
    }

.truck-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 1rem;
}

    .truck-summary-header strong {
        color: var(--ari-blue);
        font-size: 15px;
    }

.truck-summary-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

    .truck-summary-details .text-muted {
        color: #666;
        font-size: 13px;
    }

/* Info boxes for step descriptions */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--ari-light-blue);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: #1565c0;
}

    .info-box p {
        margin: 0;
    }

    .info-box strong {
        font-weight: 600;
    }

/* Input group for VIN + Decode button */
.input-group {
    display: flex;
    gap: 8px;
}

    .input-group .form-control {
        flex: 1;
    }

    .input-group .btn {
        white-space: nowrap;
    }

@media (max-width: 576px) {
    .input-group {
        flex-direction: column;
    }

        .input-group .btn {
            width: 100%;
        }

    .truck-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

        .truck-summary-header .btn {
            width: 100%;
        }
}

/* Text utility classes */
.text-success {
    color: #4caf50;
}

.text-danger {
    color: var(--ari-red);
}

.text-muted {
    color: #666;
}

/* ============================================
   License Scan Styles
   ============================================ */

/* Scan License Prompt */
.scan-license-prompt {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.scan-license-prompt i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Scanner Modal */
.scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.2s ease-in;
}

.scanner-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    z-index: 10000;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.scanner-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--ari-blue);
}

.scanner-header .btn-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.scanner-header .btn-close:hover {
    opacity: 1;
}

/* License Scan Container */
.license-scan-container {
    padding: 1rem;
}

/* Scan Method Selection */
.scan-method-selection {
    text-align: center;
    padding: 2rem;
}

.scan-method-selection h3 {
    margin-bottom: 0.5rem;
    color: var(--ari-blue);
}

.method-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.method-buttons .btn {
    min-width: 200px;
}

.method-buttons .btn i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Camera Preview */
.camera-preview {
    text-align: center;
    margin-bottom: 1rem;
}

.camera-preview video {
    border: 3px solid var(--ari-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.capture-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* File Upload */
.file-upload-section {
    text-align: center;
    padding: 2rem;
}

.upload-box {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 3rem 2rem;
    background: #f9f9f9;
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
}

.upload-box:hover,
.upload-box:focus-within {
    border-color: var(--ari-blue);
    background: #f0f8ff;
}

.upload-box i {
    font-size: 3rem;
    color: var(--ari-blue);
    display: block;
    margin-bottom: 0.5rem;
}

/* Image Preview */
.image-preview {
    text-align: center;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.image-preview img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview h4 {
    margin-bottom: 1rem;
    color: var(--ari-blue);
}

/* Processing */
.processing {
    padding: 3rem 2rem;
}

.processing h3 {
    color: var(--ari-blue);
    margin-bottom: 1rem;
}

/* Scan Results */
.scan-results {
    padding: 1rem;
}

.scan-results h3 {
    color: var(--ari-green);
    margin-bottom: 1.5rem;
}

.scan-results h3 i {
    font-size: 1.8rem;
    margin-right: 0.5rem;
}

.scanned-data {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--ari-green);
}

.scanned-data h4 {
    color: var(--ari-blue);
    margin-bottom: 1rem;
}

.scanned-data p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.scanned-data strong {
    color: #333;
    display: inline-block;
    min-width: 150px;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scan Error */
.scan-error {
    padding: 2rem;
}

.scan-error .alert {
    text-align: left;
}

.scan-error h3 {
    margin-bottom: 1rem;
}

.scan-error h3 i {
    color: #dc3545;
    margin-right: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scanner-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
    }

    .method-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .method-buttons .btn {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* ============================
   SMS Confirmation Modal (Step 7)
   ============================ */
.sms-confirmation-modal {
    max-width: 600px;
    width: 95%;
}

.sms-confirmation-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.sms-confirmation-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.sms-confirmation-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.sms-confirmation-modal .modal-body {
    padding: 1.5rem;
}

.confirmation-intro {
    margin-bottom: 1rem;
    color: #333;
}

.drivers-to-invite {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.driver-invite-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.driver-invite-preview:last-child {
    margin-bottom: 0;
}

.driver-invite-preview .driver-info strong {
    display: block;
    color: #333;
}

.driver-invite-preview .driver-phone {
    font-size: 0.9rem;
    color: #666;
}

.driver-invite-preview .driver-truck {
    font-size: 0.9rem;
    color: #666;
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.sms-preview {
    margin-bottom: 1.5rem;
}

.sms-preview h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.sms-message-box {
    background: #e8f4e8;
    border-left: 4px solid #28a745;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #155724;
}

.sms-message-box p {
    margin: 0;
}

.confirmation-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    background: #fff3cd;
    padding: 0.75rem;
    border-radius: 6px;
}

.confirmation-note i {
    color: #856404;
}

.sms-confirmation-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* ============================
   Emergency Contacts (Step 2)
   ============================ */
.emergency-contact-card {
    background: var(--ari-gray);
    border: 1px solid var(--ari-light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
}

.emergency-contact-card.optional-contact {
    background: #f9f9f9;
    border-style: dashed;
    opacity: 0.85;
}

.emergency-contact-card.optional-contact:focus-within {
    opacity: 1;
    border-style: solid;
}

.contact-header {
    font-size: 16px;
    font-weight: 600;
    color: var(--ari-dark-gray);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.optional-badge {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    font-style: italic;
}

.section-note {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .emergency-contact-card {
        padding: 15px;
    }

    .contact-header {
        font-size: 15px;
    }
}

/* ============================
   SMS Confirmation Overlay & Modal (Dashboard)
   ============================ */
.sms-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.sms-confirmation-overlay .sms-confirmation-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.sms-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.sms-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}

.sms-modal-header .close-btn:hover {
    color: #333;
}

.sms-modal-body {
    padding: 1.5rem;
}

.sms-modal-body .warning-text {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.sms-modal-body .info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sms-modal-body .info-section p {
    margin: 0 0 0.5rem;
    color: #333;
}

.sms-modal-body .info-section ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.sms-modal-body .info-section li {
    color: #555;
    margin-bottom: 0.25rem;
}

.sms-modal-body .info-section .note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

.sms-modal-body .sms-recipients-section {
    margin-bottom: 1rem;
}

.sms-modal-body .sms-recipients-section h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.sms-modal-body .sms-preview-box {
    background: #e8f4e8;
    border-left: 4px solid #28a745;
    padding: 1rem;
    border-radius: 4px;
}

.sms-modal-body .sms-preview-text {
    margin: 0;
    font-size: 0.95rem;
    color: #155724;
    line-height: 1.5;
}

.sms-modal-body .sms-note {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.sms-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.sms-modal-footer .btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}

.sms-modal-footer .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.sms-modal-footer .btn-danger:hover:not(:disabled) {
    background: #c82333;
    border-color: #bd2130;
}

.sms-modal-footer .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Date Input Component Styles ===== */
.date-input-group {
    width: 100%;
}

.date-input-fields {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

/* Base styling for all date selects - match Bootstrap form-control */
.date-input-fields select,
.date-input-fields .form-select {
    display: block;
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.date-input-fields select:focus,
.date-input-fields .form-select:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Month dropdown - widest */
.date-input-fields .date-month {
    flex: 2.5;
    min-width: 0;
}

/* Day dropdown - smallest */
.date-input-fields .date-day {
    flex: 1.2;
    min-width: 0;
}

/* Year dropdown - medium */
.date-input-fields .date-year {
    flex: 1.5;
    min-width: 0;
}

/* Error state - highlight all three fields */
.date-input-group.is-invalid select,
.date-input-group.is-invalid .form-select {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dc3545' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.date-input-group.is-invalid select:focus,
.date-input-group.is-invalid .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .date-input-fields {
        gap: 0.35rem;
    }

    .date-input-fields select,
    .date-input-fields .form-select {
        padding: 0.5rem 1.75rem 0.5rem 0.5rem;
        font-size: 0.9rem;
        background-position: right 0.5rem center;
    }

    .date-input-fields .date-month {
        flex: 2;
    }

    .date-input-fields .date-day {
        flex: 1;
    }

    .date-input-fields .date-year {
        flex: 1.3;
    }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 360px) {
    .date-input-fields {
        gap: 0.25rem;
    }

    .date-input-fields select,
    .date-input-fields .form-select {
        padding: 0.45rem 1.5rem 0.45rem 0.35rem;
        font-size: 0.85rem;
        background-position: right 0.35rem center;
        background-size: 12px 10px;
    }
}

/* Touch-friendly size for mobile */
@media (hover: none) and (pointer: coarse) {
    .date-input-fields select,
    .date-input-fields .form-select {
        min-height: 44px;
    }
}

/* ==========================================================================
   Mobile Overflow Prevention & iOS Auto-Zoom Fix
   ========================================================================== */

/* Prevent horizontal overflow on all pages */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* iOS Safari auto-zooms on input focus when font-size < 16px */
/* Set minimum 16px font on all form inputs to prevent auto-zoom */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    input[type="url"],
    input[type="date"],
    textarea,
    select,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }
}

/* Ensure all containers respect viewport width */
.wizard-container,
.step-container,
.step-form,
.form-section,
.step-content {
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific fixes for small screens */
@media (max-width: 480px) {
    /* Reduce container padding on very small screens */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Ensure wizard content fits */
    .wizard-container {
        padding: 0.75rem;
    }

    /* Reduce form section padding */
    .form-section {
        padding: 0.75rem;
    }

    /* Make buttons stack on very narrow screens */
    .btn-group,
    .button-group,
    .wizard-buttons,
    .step-buttons {
        flex-wrap: wrap;
    }

    /* Reduce button padding on mobile */
    .btn {
        padding: 0.75rem 1rem;
    }

    /* Ensure alerts fit within container with slight padding */
    .alert {
        margin-left: 0;
        margin-right: 0;
        word-wrap: break-word;
    }

    /* Wizard step alerts - match form content width */
    .step-card .alert,
    .wizard-container .alert {
        margin-bottom: 1rem;
    }

    /* Make flex containers wrap on mobile */
    [style*="display: flex"],
    [style*="display:flex"] {
        flex-wrap: wrap !important;
    }
}

/* Ensure all positioned elements stay within viewport */
.ari-autocomplete-list {
    max-width: 100%;
    overflow: hidden;
}

/* Prevent text from causing overflow */
.step-title,
.section-title,
.form-label {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure button toggle groups wrap on mobile */
.btn-group-toggle {
    flex-wrap: wrap;
}

/* Fix for d-flex utility class */
@media (max-width: 480px) {
    .d-flex {
        flex-wrap: wrap;
    }

    /* Stack action buttons vertically on small screens */
    .d-flex.gap-2 {
        gap: 0.5rem;
    }
}
