/* Header Links for Portal */
.header-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chat Icon Button */
.chat-icon-btn {
    position: relative;
    z-index: 10;
}

.chat-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* iMessage-Style Chat UI */
#chatModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 85vh;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}

#chatModal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

#chatModal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

#chatModalContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.chat-date-header {
    text-align: center;
    padding: 12px 0;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    width: 100%;
    display: block;
}

.chat-message-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.chat-message-group.sent-group {
    align-items: flex-end;
}

.chat-message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: messageSlideIn 0.2s ease-out;
    margin: 0;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: #141414;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message-bubble.received {
    align-self: flex-start;
    background: #e5e7eb;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* System message styles */
.chat-message-bubble.system-message {
    align-self: flex-start;
    background: #f0f9ff;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    border-left: 3px solid #0ea5e9;
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.1);
}

.chat-system-label {
    font-size: 0.7rem;
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 4px;
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-message-group.system-group {
    align-items: flex-start;
}

.chat-message-timestamp {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
    text-align: left;
}

.chat-message-status {
    font-size: 0.65rem;
    color: #059669;
    margin-top: 4px;
    font-weight: 500;
    text-align: right;
    padding: 0 4px;
}

.chat-input-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f0f0f0;
    border-radius: 24px;
    padding: 8px 12px;
    min-height: 44px;
}

.chat-input-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #1a1a1a;
    resize: none;
    max-height: 120px;
    min-height: 28px;
    padding: 8px 0;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-input-field::placeholder {
    color: #9ca3af;
}

.chat-send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.chat-send-button:hover {
    background: linear-gradient(135deg, #FFC700 0%, #FFD700 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.chat-send-button:active {
    transform: scale(0.95);
}

.chat-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-info-message {
    text-align: center;
    padding: 12px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    margin: 12px;
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.5;
}

.chat-info-message strong {
    color: #1a1a1a;
    font-weight: 600;
}

.chat-appointment-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 12px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

.chat-appointment-card-label {
    font-size: 0.75rem;
    color: #6a6a6a;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-appointment-card-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

/* Typing indicator */
.chat-typing-indicator {
    align-self: flex-start;
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: messageSlideIn 0.2s ease-out;
}

.chat-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chat-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6a6a6a;
    animation: typingDot 1.4s infinite ease-in-out;
}

.chat-typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.chat-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #chatModal .modal-content {
        height: 90vh;
        max-height: 90vh;
        border-radius: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    #chatModal .modal-header {
        border-radius: 0;
    }
    
    .chat-message-bubble {
        max-width: 75%;
        font-size: 0.9rem;
        padding: 9px 13px;
    }
    
    .chat-input-container {
        padding-bottom: calc(12px + max(env(safe-area-inset-bottom), 8px));
    }
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure all interactive elements have adequate touch targets on mobile */
@media (max-width: 768px) {
    button,
    a.button,
    input[type="submit"],
    input[type="button"],
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent text size adjustment on iOS */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Improve scrolling on mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }

    /* Better tap highlighting */
    a, button {
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.2);
    }
}

.header-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-link:hover {
    color: #FFD700;
}

.header-link span:first-child {
    font-size: 1.1rem;
    display: inline-block;
    line-height: 1;
}

/* Portal Page Styles */
.portal-section {
    padding: 0 !important;
    padding-top: 60px !important;
    background: #f5f5f5;
    min-height: 100vh;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Hero Banner - Premium Mobile-First Design */
.hero-banner {
    position: relative;
    width: 100%;
    max-width: 100vw;
    min-height: 360px;
    height: 360px; /* Fixed height to prevent layout shifts */
    margin: 0;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    
    /* Premium background image - close-up of hands exchanging car keys */
    /* Using Unsplash royalty-free stock photo */
    background-color: #0a0a0a;
    background-image: 
        linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.5) 40%,
            rgba(0, 0, 0, 0.4) 60%,
            rgba(0, 0, 0, 0.6) 100%
        ),
        url('https://images.unsplash.com/photo-1605559424843-9e4c228bf1c2?w=1200&q=80&auto=format&fit=crop');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    
    /* Ensure proper rendering */
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    
    /* Display and alignment - ensure content is centered */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Prevent layout shifts - reserve space for content */
    contain: layout style paint;
}

.hero-content {
    position: relative;
    z-index: 9999 !important; /* Higher than car animation overlay (9998) to ensure text stays on top */
    text-align: center !important;
    color: #ffffff;
    padding: 60px 24px;
    max-width: 1200px;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 360px;
    height: 100%; /* Fill parent height to ensure centering */
    box-sizing: border-box;
    margin: 0 auto !important;
    /* Ensure perfect centering */
    left: 0 !important;
    right: 0 !important;
    /* Prevent layout shifts */
    contain: layout style;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 12px auto !important;
    color: #ffffff;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6);
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 10000 !important; /* Higher than hero-content (9999) to ensure text stays on top */
    /* Ensure perfect centering */
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0 auto !important;
    font-style: italic;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 10000 !important; /* Higher than hero-content (9999) to ensure text stays on top */
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.6);
    opacity: 0.95;
    display: block !important;
    visibility: visible;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Service Hub Quote */
.service-hub-quote {
    text-align: center;
    padding: 24px 20px 24px;
    margin: 0 0 30px 0;
    background: #f5f5f5;
}

.quote-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    font-style: italic;
    letter-spacing: 0.3px;
    position: relative;
    padding: 0 30px;
}

.quote-text::before {
    content: '"';
    font-size: 2rem;
    color: #FFD700;
    position: absolute;
    left: 5px;
    top: -5px;
}

.quote-text::after {
    content: '"';
    font-size: 2rem;
    color: #FFD700;
    position: absolute;
    right: 5px;
    top: -5px;
}

@media (max-width: 768px) {
    .service-hub-quote {
        padding: 18px 16px 20px;
        margin: 0 0 24px 0;
    }
    
    .quote-text {
        font-size: 1.25rem;
        padding: 0 30px;
    }
    
    .quote-text::before,
    .quote-text::after {
        font-size: 1.5rem;
    }
}

/* Portal Container - Add padding for content below hero */
.portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}


/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #000000;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-logo-container {
    margin-bottom: 16px;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a1a;
}

/* Service Records Vehicle Info Card - More compact headline style */
#vehicleInfoCard {
    padding: 16px 24px !important;
    margin-bottom: 24px !important;
    border: 2px solid #000000 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

#vehicleInfoCard .welcome-content {
    margin: 0;
    padding: 0;
}

#vehicleInfoCard .welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    text-align: left;
}

#vehicleInfoCard .welcome-subtitle {
    font-size: 0.95rem;
    margin: 0;
    text-align: left;
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: #6a6a6a;
    font-weight: 500;
}

.new-booking-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.new-booking-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: #141414;
    padding: 16px 48px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    letter-spacing: 0.5px;
}

.new-booking-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #FFC700 0%, #FFD700 100%);
}

/* Main Action Grid */
.main-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    border-radius: 18px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: #1a1a1a;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.18),
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 6px 12px rgba(0, 0, 0, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 140px;
    position: relative;
    overflow: visible;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
}

/* Top edge highlight for 3D effect */
.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.action-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.25),
        0 28px 56px rgba(0, 0, 0, 0.22),
        0 16px 32px rgba(0, 0, 0, 0.18),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.15);
}

.action-card:active {
    transform: translateY(2px) translateZ(0);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: linear-gradient(to bottom, #f5f5f5 0%, #f0f0f0 100%);
}

.action-card:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.action-icon {
    font-size: 4rem;
    margin-bottom: 8px;
}

.action-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.action-subtitle {
    font-size: 1rem;
    color: #6a6a6a;
    margin: 0;
}

/* Upcoming Appointments Carousel */
.upcoming-appointments-carousel-section {
    margin: 24px 0;
    padding: 0 20px;
}

.upcoming-appointments-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    padding: 0 4px;
}

.upcoming-appointments-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 4px 0 16px 0;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.upcoming-appointments-carousel::-webkit-scrollbar {
    height: 6px;
}

.upcoming-appointments-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.upcoming-appointments-carousel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.upcoming-appointments-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.upcoming-appointment-card {
    flex: 0 0 280px;
    min-width: 280px;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 84px;
}

.upcoming-appointment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, 
        rgba(255, 215, 0, 0.8) 0%,
        rgba(255, 215, 0, 0.4) 50%,
        rgba(255, 215, 0, 0.8) 100%);
}

.upcoming-appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.1);
}

.upcoming-appointment-card:active {
    transform: translateY(0);
}

.upcoming-appointment-service {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.upcoming-appointment-datetime {
    font-size: 0.85rem;
    color: #6a6a6a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.upcoming-appointment-vehicle {
    font-size: 0.85rem;
    color: #4a4a4a;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.upcoming-appointment-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.upcoming-appointment-status-badge.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.upcoming-appointment-status-badge.in-progress {
    background: #d1fae5;
    color: #065f46;
}

.upcoming-appointment-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 768px) {
    .upcoming-appointments-carousel-section {
        margin: 20px 0;
        padding: 0 12px;
    }

    .upcoming-appointments-header {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .upcoming-appointment-card {
        flex: 0 0 260px;
        min-width: 260px;
        padding: 10px;
        min-height: 80px;
    }

    /* Ensure thumbnail container is fixed size on mobile */
    .upcoming-appointment-card > div > div:first-child {
        width: 56px !important;
        height: 56px !important;
        flex-shrink: 0 !important;
    }

    .upcoming-appointment-card img {
        width: 56px !important;
        height: 56px !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .upcoming-appointment-service {
        font-size: 0.75rem;
    }

    .upcoming-appointment-datetime {
        font-size: 0.8rem;
    }

    .upcoming-appointment-vehicle {
        font-size: 0.8rem;
    }
}

.section-header-with-back {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.back-button {
    background: #f3f4f6;
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-button:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

.service-records-section {
    margin-bottom: 40px;
}

.vehicles-with-records-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.vehicle-record-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.vehicle-record-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #000000;
}

.vehicle-record-photo {
    width: 100%;
    height: 360px;
    object-fit: contain;
    border-radius: 0;
    background: #e8e8e8;
    margin-bottom: 16px;
    padding: 20px;
    box-sizing: border-box;
    border: 2px solid #d0d0d0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-record-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.vehicle-record-info p {
    font-size: 0.9rem;
    color: #6a6a6a;
    margin: 4px 0;
}

.vehicle-record-count {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vehicle-record-count span {
    font-size: 0.95rem;
    color: #1a1a1a;
    font-weight: 600;
}

.vehicle-record-count .count-badge {
    background: #FFD700;
    color: #141414;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .main-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-card {
        padding: 18px 14px;
        min-height: 120px;
        border-radius: 16px;
    }

    .action-icon {
        font-size: 3.5rem;
    }

    .action-title {
        font-size: 1.3rem;
    }
    
    .action-subtitle {
        font-size: 0.95rem;
    }

    .vehicles-with-records-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Portal Tabs */
.portal-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid #e5e5e5;
}

.portal-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6a6a6a;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-tab:hover {
    color: #1a1a1a;
}

.portal-tab.active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

/* Profile Section */
.profile-section {
    display: none;
}

.profile-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 24px;
}

/* Page Title in Header */
.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-align: center;
    flex: 1;
}

/* Small Back Button */
.back-button-small {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
    min-width: 40px;
    min-height: 40px;
}

.back-button-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    transition: transform 0.3s ease;
    visibility: visible !important;
    opacity: 1 !important;
}

.bottom-nav.hidden {
    transform: translateY(100%);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 60px;
}

.bottom-nav-item.active {
    color: #FFD700;
}

.bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFD700;
}

.bottom-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Bookings Section */
.bookings-section {
    margin-bottom: 40px;
}

.bookings-headline {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.booking-filters-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.booking-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #e5e5e5;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 120px;
}

.filter-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    background: #fffef5;
}

.filter-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: #141414;
    border-color: #FFD700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.bookings-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .bookings-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bookings-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.booking-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.booking-card.home-page-card {
    border: 9px solid #000000 !important;
    border-width: 9px !important;
}

.booking-card.home-page-card:active,
.booking-card.home-page-card.touched {
    background: #fafafa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.booking-card.home-page-card:focus {
    background: #fafafa !important;
    outline: none;
}

/* Booking Card Details - Scrollable */
.booking-card-details {
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.booking-card-details[data-expanded="true"] {
    overflow: visible !important;
    max-height: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important; /* Ensure it's in normal document flow */
    z-index: auto !important; /* Don't create a stacking context */
}

.booking-card-details[data-expanded="true"] > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.booking-card-details[data-expanded="true"] > div > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Active Appointments Section */
.active-appointments-section {
    width: 100%;
    margin: 0 0 40px 0;
    padding: 0;
}

.active-appointments-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 9px solid #000000;
}

.active-appointments-headline {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    padding: 0;
}

.active-appointments-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.no-active-appointments {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 9px solid #000000;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .active-appointments-container {
        padding: 24px 16px;
        border-radius: 12px;
        margin: 0 16px;
    }
    
    .active-appointments-headline {
        font-size: 1.5rem;
        margin: 0 0 20px 0;
    }
    
    .active-appointments-section {
        margin: 0 0 32px 0;
    }
    
    .no-active-appointments {
        padding: 32px 16px;
    }
}

/* Booking Carousel Styles */
.booking-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.booking-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but handle horizontal swipes */
    cursor: grab;
    user-select: none;
}

.booking-carousel-track.dragging {
    transition: none;
    cursor: grabbing;
}

.booking-carousel-track:active {
    cursor: grabbing;
}

.booking-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.booking-carousel-slide > .booking-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0 20px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: #FFD700;
    width: 10px;
    height: 10px;
}

.carousel-indicator:hover {
    background: #9ca3af;
}

.carousel-indicator.active:hover {
    background: #FFC700;
}

@media (max-width: 768px) {
    .booking-carousel-slide {
        padding: 0 5px;
    }
    
    .carousel-indicators {
        gap: 6px;
        margin-top: 10px;
    }
    
    .carousel-indicator {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicator.active {
        width: 8px;
        height: 8px;
    }
}

/* Touch highlight for mobile */
@media (max-width: 768px) {
    .booking-card.home-page-card:active {
        background: #f8f9fa !important;
    }
}

.booking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #FFD700;
}

.booking-card.pending {
    border-color: #f59e0b !important; /* Yellow/Amber */
    border-width: 3px !important;
}

.booking-card.scheduled {
    border-color: #3b82f6 !important; /* Blue */
    border-width: 3px !important;
}

.booking-card.in-progress {
    border-color: #059669 !important; /* Green */
    border-width: 3px !important;
}

.booking-card.completed {
    border-color: #059669 !important; /* Green */
    border-width: 3px !important;
}

.booking-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.booking-status-badge.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.booking-status-badge.in-progress {
    background: #d1fae5;
    color: #065f46;
}

.booking-status-badge.completed {
    background: #f3f4f6;
    color: #374151;
}

.booking-status-badge.payment-due,
.upcoming-appointment-status-badge.payment-due {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 600;
}

/* Profile Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 100%;
}

.profile-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
}

.profile-form input {
    padding: 12px 16px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #f5f5f5;
    color: #1a1a1a;
    cursor: not-allowed;
}

.profile-form input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.profile-form input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.profile-form input:not([readonly]) {
    background: #ffffff;
    cursor: text;
}

.edit-profile-btn {
    background: transparent;
    color: #6a6a6a;
    border: 1px solid #e5e5e5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-profile-btn:hover {
    background: #f3f4f6;
    color: #1a1a1a;
    border-color: #d1d1d1;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.profile-actions .cancel-btn {
    flex: 1;
    background: #f3f4f6;
    color: #1a1a1a;
    border: 1px solid #d1d1d1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.profile-actions .cancel-btn:hover {
    background: #e5e7eb;
}

.profile-actions .save-btn {
    flex: 1;
    background: #FFD700;
    color: #1a1a1a;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.profile-actions .save-btn:hover {
    background: #FFC700;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 2rem;
}

.stat-details {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #6a6a6a;
    margin: 4px 0 0 0;
}

/* Vehicles List */
.vehicles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.vehicle-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.vehicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.vehicle-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.vehicle-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6a6a6a;
}

/* Modal Styles */
.modal-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: 10000;
    overflow-y: auto;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e5e5;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6a6a6a;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 2px solid #e5e5e5;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

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

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.notification-message {
    font-size: 0.9rem;
    color: #6a6a6a;
    margin: 0;
}

.close-notification {
    background: none;
    border: none;
    font-size: 2rem;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.close-notification:hover {
    background: #f3f4f6;
}

/* Sidebar Menu Styles */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.open {
    right: 0;
}

.sidebar-header {
    background: #1a1a1a;
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 32px;
    padding: 0 20px;
}

.sidebar-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.sidebar-item:hover {
    background: #f3f4f6;
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-text {
    flex: 1;
    font-weight: 500;
}

.menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .sidebar-menu {
        width: 100%;
        right: -100%;
    }
    
    .sidebar-menu.open {
        right: 0;
    }

    .sidebar-item {
        min-height: 44px;
        padding: 14px 16px;
    }

    .sidebar-close {
        min-width: 44px;
        min-height: 44px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-header h2 {
        font-size: 1.25rem;
    }

    .portal-section {
        padding: 0 !important;
    }

    .portal-container {
        padding: 0 12px;
    }

    /* Welcome card */
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
        border-radius: 16px;
        border-width: 1.5px;
    }

    .welcome-logo {
        width: 60px;
        height: 60px;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
    }

    .new-booking-container {
        margin-bottom: 24px;
    }

    .new-booking-btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 24px;
        font-size: 1rem;
        border-radius: 50px;
    }

    .bookings-headline {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }

    .booking-filters-container {
        margin-bottom: 20px;
    }

    .booking-filters {
        gap: 8px;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 12px 16px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .header-links {
        gap: 4px;
        flex-wrap: nowrap;
    }

    .header-icon-btn {
        min-width: 36px;
        min-height: 36px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .menu-toggle-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 1.3rem;
        padding: 4px;
    }
}

@media (max-width: 768px) {
    .portal-section {
        padding: 0 !important;
        padding-top: 50px !important;
        padding-bottom: 80px !important; /* Space for bottom nav */
    }

    .bottom-nav {
        padding: 10px 0;
    }

    .bottom-nav-item {
        padding: 8px 8px;
        min-width: 50px;
    }

    .bottom-nav-icon {
        font-size: 1.3rem;
    }

    .bottom-nav-label {
        font-size: 0.65rem;
    }
    
    .hero-banner {
        min-height: 280px !important;
        height: 280px !important; /* Fixed height to prevent layout shifts on mobile */
        max-width: 100vw !important;
        width: 100% !important;
        margin-bottom: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        
        /* Prevent layout shifts - reserve space for content */
        contain: layout style paint;
        
        /* Mobile-optimized gradient overlay */
        background-image: 
            linear-gradient(to bottom, 
                rgba(0, 0, 0, 0.8) 0%,
                rgba(0, 0, 0, 0.55) 35%,
                rgba(0, 0, 0, 0.45) 55%,
                rgba(0, 0, 0, 0.65) 100%
            ),
            url('https://images.unsplash.com/photo-1605559424843-9e4c228bf1c2?w=1200&q=80&auto=format&fit=crop');
    }
    
    .hero-content {
        padding: 8px 15px !important;
        min-height: 280px !important;
        height: 100% !important; /* Fill parent height to ensure centering */
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        z-index: 9999 !important; /* Higher than car animation overlay (9998) */
        position: relative !important;
        box-sizing: border-box !important;
        /* Ensure perfect centering */
        left: 0 !important;
        right: 0 !important;
        /* Prevent layout shifts */
        contain: layout style;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
        margin: 0 auto 3px auto !important;
        line-height: 1.2 !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 10000 !important; /* Higher than hero-content (9999) */
        /* Ensure perfect centering */
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: block !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 0.95 !important;
        margin: 0 auto !important;
        line-height: 1.2 !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 10000 !important; /* Higher than hero-content (9999) */
    }
    
    .portal-container {
        padding: 24px 12px 80px; /* Space for bottom nav */
    }

    /* Profile form mobile centering */
    .profile-card {
        max-width: 100%;
        margin: 0 auto;
        padding: 20px 16px;
    }

    .profile-form {
        max-width: 100%;
        margin: 0 auto;
    }

    .profile-form-row {
        flex-direction: column;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-group {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-title {
        width: 100%;
        margin-bottom: 0;
    }
}

