/* Color Variables - Refined for a modern, natural feel */
:root {
    --primary-green: #2E7D32;   /* Deeper, more sophisticated green */
    --secondary-green: #66BB6A; /* Brighter, vibrant green for accents */
    --tertiary-green: #81C784;  /* Lighter green for subtle touches */
    --teal-accent: #00897B;     /* Richer teal for gradients and strong accents */
    --dark-text: #263238;       /* Very dark charcoal for primary text */
    --medium-text: #546E7A;     /* Softer gray for secondary text */
    --light-text: #ECEFF1;      /* Off-white for section backgrounds */
    --white: #FFFFFF;           /* Pure white for cards and elements on darker backgrounds */
    --off-white: #F8F9FA;       /* Slightly warmer off-white */

    /* Action Colors */
    --info-blue: #2196F3;
    --warning-orange: #FFB300;
    --error-red: #D32F2F;

    /* Shadows */
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-pill: 50px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; /* Modern font stack */
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-text);
    overflow-x: hidden; /* Prevent horizontal scroll due to animations */
    -webkit-font-smoothing: antialiased; /* Better font rendering */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
.navbar {
    background: var(--white);
    box-shadow: 0 4px 20px var(--shadow-light);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    padding: 0 20px;
}

.logo h1 {
    color: var(--primary-green);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Profile Menu with Navigation Dropdown */
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding-right: 0;
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid var(--secondary-green);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.profile-avatar:hover {
    border-color: var(--primary-green);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.1));
}

.nav-dropdown ul {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.nav-dropdown li {
    padding: 0;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-dropdown a:hover {
    background: linear-gradient(135deg, var(--secondary-green), var(--tertiary-green));
    color: var(--white);
}

.nav-dropdown .nav-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: #e9ecef;
    margin: 10px 20px;
}

.logout-item a {
    color: var(--error-red);
}

.logout-item a:hover {
    background: var(--error-red);
    color: var(--white);
}

/* Navigation links removed - keeping only logo */

/* Profile Avatar in Header - Simplified without dropdown */
.profile-menu {
    margin-left: auto;
}

.profile-avatar {
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.profile-avatar:hover {
    background-color: rgba(46, 125, 50, 0.1);
}

.profile-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-green);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-avatar:hover .profile-avatar-img {
    transform: scale(1.05);
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-green);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary-green);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-slider.round {
    border-radius: 34px;
}

.toggle-slider.round:before {
    border-radius: 50%;
}

/* Recent Journeys Section */
.recent-journeys {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-top: 20px;
}

.recent-journeys h3 {
    margin-bottom: 20px;
    color: var(--dark-text);
    font-size: 1.5rem;
}

.journeys-list {
    min-height: 100px;
}

/* Mobile Responsive - Dashboard Optimized */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Dashboard Header Mobile */
    .dashboard-header {
        padding: 30px 0;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .user-avatar {
        width: 70px;
        height: 70px;
    }
    
    .welcome-wrapper h2 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .welcome-wrapper p {
        text-align: center;
        font-size: 1rem;
    }
    
    /* Dashboard Content Mobile */
    .dashboard-content {
        padding: 30px 0;
    }
    
    .stat-card {
        padding: 1.5rem;
        min-height: 120px;
    }
    
    .chart-container {
        padding: 20px;
        overflow-x: auto;
    }
    
    .chart-container h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .action-btn {
        padding: 15px 20px;
        font-size: 0.9rem;
        min-height: 55px;
    }
    
    .recent-journeys {
        padding: 20px;
        margin-top: 15px;
    }
    
    /* General Mobile Styles */
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        height: 60px;
        padding: 0 10px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Dashboard Header Small Mobile */
    .dashboard-header {
        padding: 25px 0;
    }
    
    .user-info {
        gap: 12px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .welcome-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .welcome-wrapper p {
        font-size: 0.9rem;
    }
    
    /* Dashboard Content Small Mobile */
    .dashboard-content {
        padding: 20px 0;
    }
    
    .stat-card {
        padding: 1.2rem;
        min-height: 110px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-container h3 {
        font-size: 1.2rem;
    }
    
    .chart-container canvas {
        max-height: 250px !important;
        height: 250px !important;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-btn {
        padding: 14px 16px;
        font-size: 0.85rem;
        min-height: 50px;
    }
    
    .recent-journeys {
        padding: 15px;
    }
    
    .recent-journeys h3 {
        font-size: 1.3rem;
    }
    
    /* General Small Mobile Styles */
    .hero {
        padding: 60px 0 80px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 60px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
}

/* Tablet Responsive Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-header {
        padding: 35px 0;
    }
    
    .user-info {
        max-width: 700px;
        gap: 18px;
    }
    
    .user-avatar {
        width: 75px;
        height: 75px;
    }
    
    .welcome-wrapper h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
    
    .stat-card {
        padding: 1.8rem;
    }
    
    .chart-container {
        padding: 25px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* Large Desktop Enhancements */
@media (min-width: 1400px) {
    .dashboard-header {
        padding: 50px 0;
    }
    
    .user-info {
        max-width: 900px;
        gap: 25px;
    }
    
    .user-avatar {
        width: 90px;
        height: 90px;
    }
    
    .welcome-wrapper h2 {
        font-size: 2.5rem;
    }
    
    .welcome-wrapper p {
        font-size: 1.2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        max-width: 1300px;
        margin: 0 auto 40px auto;
    }
    
    .stat-card {
        padding: 2.5rem;
        min-height: 160px;
    }
    
    .chart-container {
        max-width: 1300px;
        margin: 0 auto 30px auto;
    }
    
    .action-buttons {
        max-width: 1000px;
        margin: 0 auto 40px auto;
        grid-template-columns: repeat(4, 1fr);
    }
    
    .recent-journeys {
        max-width: 1300px;
        margin: 20px auto 0 auto;
    }
}

/* Main Content Padding */
main {
    margin-top: 0; /* Sticky navbar handles this visually */
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--teal-accent) 100%);
    color: var(--white);
    padding: 100px 0 120px 0; /* More vertical padding */
    text-align: center;
    overflow: hidden;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%); /* Subtle wave effect at bottom */
}

.hero::before { /* Subtle background pattern */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="rgba(255,255,255,0.08)" fill-rule="evenodd"><path d="M54.167 6V.833h-2v5.167h2zM36.667 6V.833h-2v5.167h2zM19.167 6V.833h-2v5.167h2zM1.667 6V.833h-2v5.167h2zM54.167 54v-5.167h-2V54h2zM36.667 54v-5.167h-2V54h2zM19.167 54v-5.167h-2V54h2zM1.667 54v-5.167h-2V54h2zM6 54.167H.833v-2H6v2zM6 36.667H.833v-2H6v2zM6 19.167H.833v-2H6v2zM6 1.667H.833v-2H6v2zM54 54.167h-5.167v-2H54v2zM54 36.667h-5.167v-2H54v2zM54 19.167h-5.167v-2H54v2zM54 1.667h-5.167v-2H54v2z"/></g></svg>'); /* Subtle dots */
    opacity: 0.1;
    z-index: -1;
}

.hero h2 {
    font-size: 3.5rem; /* Larger hero heading */
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.4rem; /* Larger subtitle */
    margin-bottom: 80px;
    opacity: 0.95;
    font-weight: 300;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Slightly wider min width */
    gap: 35px; /* Increased gap */
    margin-bottom: 100px; /* More space below */
}

.feature-card {
    background: rgba(255,255,255,0.2); /* More translucent */
    padding: 35px 25px; /* More padding */
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px); /* Stronger blur */
    border: 1px solid rgba(255,255,255,0.3); /* Clearer border */
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    color: var(--white); /* Ensure text is white */
    box-shadow: 0 6px 20px rgba(0,0,0,0.15); /* Soft initial shadow */
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.03); /* More pronounced lift and slight scale */
    background: rgba(255,255,255,0.35); /* More opaque on hover */
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); /* Stronger shadow */
}

.feature-icon {
    font-size: 3.5rem; /* Larger icons */
    margin-bottom: 20px;
    color: var(--secondary-green); /* Brighter green for icons */
    text-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.feature-card h3 {
    font-size: 1.5rem; /* Larger heading */
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    opacity: 0.95;
    font-weight: 300;
}

.cta-section {
    background: rgba(255,255,255,0.2); /* More translucent */
    padding: 50px; /* More padding */
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(12px); /* Stronger blur */
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-section h3 {
    font-size: 2.2rem; /* Larger heading */
    margin-bottom: 35px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-weight: 700;
}

.cta-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-green) !important; /* Green text for contrast */
    padding: 18px 45px; /* More padding for a bigger button */
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-weight: 700; /* Bolder text */
    font-size: 1.2rem; /* Larger text */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px var(--shadow-heavy);
    background: var(--off-white);
    color: var(--teal-accent) !important; /* Teal on hover */
}

.cta-subtitle {
    margin-top: 20px;
    opacity: 0.9;
    font-weight: 300;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 100px 0; /* More padding */
    background: var(--off-white);
    text-align: center;
}

.how-it-works h2 {
    font-size: 2.8rem; /* Larger heading */
    margin-bottom: 70px;
    color: var(--dark-text);
    font-weight: 700;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Wider min width */
    gap: 40px;
}

.step-card {
    background: var(--white);
    padding: 40px; /* More padding */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--subtle-gray); /* Subtle border */
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.step-icon {
    font-size: 2.8rem; /* Larger icon */
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 25px;
    width: 75px; /* Larger circle */
    height: 75px;
    border-radius: 50%;
    border: 4px solid var(--secondary-green); /* Brighter, thicker border */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tertiary-green); /* Light green background */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.08); /* Stronger inner shadow */
    color: var(--white); /* White text inside icon circle */
}

.step-card h3 {
    font-size: 1.6rem; /* Larger heading */
    margin-bottom: 18px;
    color: var(--dark-text);
    font-weight: 700;
}

.step-card p {
    color: var(--medium-text);
    line-height: 1.7;
}

.secondary-cta-button {
    background: var(--medium-text); /* Darker gray for secondary button */
    color: var(--white);
    margin-top: 60px; /* More margin */
    padding: 15px 40px;
    border-radius: var(--border-radius-pill);
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.secondary-cta-button:hover {
    background: var(--dark-text); /* Even darker on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* --- Benefits Section --- */
.benefits {
    padding: 100px 0;
    background: var(--white); /* White background */
    text-align: center;
}

.benefits h2 {
    font-size: 2.8rem;
    margin-bottom: 70px;
    color: var(--dark-text);
    font-weight: 700;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.benefit {
    text-align: center;
    padding: 35px 25px;
    background: var(--off-white); /* Light background for benefit cards */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 6px 20px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid var(--subtle-gray);
}

.benefit:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-medium);
    background: var(--white);
}

.benefit h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
    color: var(--primary-green);
    font-weight: 700;
}

.benefit h4::before { /* For icon */
    margin-right: 12px;
    font-size: 2.5rem; /* Larger icon */
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
    color: var(--secondary-green); /* Brighter color for icons */
}

/* --- Testimonials Section --- */
.testimonials {
    padding: 100px 0;
    background: var(--light-text);
    text-align: center;
}

.testimonials h2 {
    font-size: 2.8rem;
    margin-bottom: 70px;
    color: var(--dark-text);
    font-weight: 700;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px var(--shadow-light);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px; /* More consistent height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--subtle-gray);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.testimonial-card p {
    font-size: 1.2rem; /* Larger text */
    color: var(--medium-text);
    margin-bottom: 30px;
    flex-grow: 1;
    line-height: 1.7;
    font-style: italic; /* Emphasize quotes */
}

.testimonial-card .user-info {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 20px;
}

.testimonial-card .user-avatar {
    width: 60px; /* Larger avatar */
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.testimonial-card .user-info span {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1.15rem;
}

/* --- Footer --- */
footer {
    background: var(--dark-text); /* Deep charcoal footer */
    color: var(--white);
    padding: 50px 0;
    text-align: center;
    border-top: 8px solid var(--primary-green); /* Thicker, prominent green top border */
}

footer p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-green);
}

/* --- Dashboard Styles --- */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--teal-accent) 100%);
    color: var(--white);
    padding: 40px 0;
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--white);
    object-fit: cover;
    flex-shrink: 0;
}

.welcome-wrapper {
    flex: 1;
}

.welcome-wrapper h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: left;
}

.welcome-wrapper p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
    text-align: left;
}

.hi-fixed {
    display: inline-block;
}

.wave {
    display: inline-block;
    animation: wave 2s infinite;
}

@keyframes wave {
    0%, 50%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px; /* Increased gap */
    margin-bottom: 25px;
}

.user-avatar {
    width: 70px; /* Larger avatar */
    height: 70px;
    border-radius: 50%;
    border: 4px solid var(--white); /* Thicker white border */
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2); /* Subtle outer glow */
    object-fit: cover;
}

.welcome-text h2 {
    font-size: 2.5rem; /* Larger heading */
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.wave {
    display: inline-block;
    animation: wave-animation 2s infinite;
    transform-origin: 70% 70%;
}

/* Dashboard Content */
.dashboard-content {
    padding: 40px 0;
}

.dashboard-content .container {
    max-width: 1200px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-light);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--subtle-gray);
}

/* Staggered animation delay for stats (adjust to flow with page) */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Hover Interaction */
.stat-card:hover {
    transform: translateY(-8px); /* More pronounced lift */
    box-shadow: 0 15px 35px var(--shadow-medium);
}

/* Icon Styling with Pulse Animation */
.stat-icon {
    font-size: 3rem; /* Larger icon */
    margin-bottom: 1rem;
    color: var(--secondary-green); /* Vibrant green for icons */
    animation: pulseIcon 2s ease-in-out infinite;
}

/* Number Styling */
.stat-value {
    font-size: 2.2rem; /* Larger value */
    font-weight: 800;
    color: var(--primary-green); /* Consistent green */
    margin-bottom: 0.5rem;
}

/* Label Styling */
.stat-label {
    font-size: 1rem; /* Slightly larger label */
    color: var(--medium-text);
    font-weight: 500;
}

/* Chart Container */
.chart-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-bottom: 30px;
    overflow-x: auto;
    height: 450px; /* Slightly taller chart */
    position: relative;
    border: 1px solid var(--subtle-gray);
}

.chart-container canvas {
    max-height: 380px !important;
    height: 380px !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-btn {
    background: var(--primary-green);
    color: var(--white);
    padding: 18px 30px;
    border: none;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.action-btn:hover {
    background: var(--teal-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Form Styles */
.form-container {
    max-width: 650px; /* Slightly wider form */
    margin: 40px auto;
    background: var(--white);
    padding: 50px; /* More padding */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px var(--shadow-medium);
    border: 1px solid var(--subtle-gray);
}

.form-group {
    margin-bottom: 30px; /* More space between groups */
}

.form-group label {
    display: block;
    margin-bottom: 10px; /* More space below label */
    font-weight: 600;
    color: var(--dark-text);
    font-size: 1.05rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px; /* More padding in fields */
    border: 2px solid var(--subtle-gray); /* Lighter border */
    border-radius: var(--border-radius-sm);
    font-size: 1.05rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2); /* Green glow on focus */
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
    padding: 15px 35px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-primary:hover {
    background: var(--teal-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.btn-secondary {
    background: var(--medium-text);
    color: var(--white);
    padding: 15px 35px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: var(--dark-text);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Login Page */
.login-container {
    min-height: calc(100vh - 75px); /* Adjusted for new navbar height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--tertiary-green) 0%, var(--light-text) 100%);
}

.login-box {
    background: var(--white);
    padding: 60px 50px; /* More padding */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 45px var(--shadow-medium);
    text-align: center;
    max-width: 450px; /* Slightly wider */
    width: 100%;
    border: 1px solid var(--subtle-gray);
}

.login-box h2 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 2.5rem; /* Larger heading */
    font-weight: 700;
}

.login-box p {
    color: var(--medium-text);
    margin-bottom: 50px; /* More space */
    font-size: 1.1rem;
}

.google-btn {
    background: #4285f4; /* Standard Google blue */
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* More space */
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.google-btn:hover {
    background: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Leaderboard */
.leaderboard-table {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    margin: 40px 0;
    border: 1px solid var(--subtle-gray);
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 22px; /* More padding */
    text-align: left;
    border-bottom: 1px solid var(--subtle-gray);
}

.leaderboard-table th {
    background: var(--off-white);
    font-weight: 700;
    color: var(--dark-text);
    font-size: 1.05rem;
}

.leaderboard-table td {
    color: var(--medium-text);
}

.leaderboard-table .rank {
    font-size: 1.6rem; /* Larger rank */
    font-weight: 800;
}

.leaderboard-table .rank.gold { color: #FFD700; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.leaderboard-table .rank.silver { color: #C0C0C0; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.leaderboard-table .rank.bronze { color: #CD7F32; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }

.current-user {
    background: var(--tertiary-green) !important; /* Highlight current user */
    color: var(--white) !important;
    font-weight: 600;
}
.current-user td {
    color: var(--white) !important; /* Ensure text inside is white */
}


/* Rewards */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin: 40px 0;
}

.badge-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--shadow-light);
    text-align: center;
    border: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.badge-card.unlocked {
    border-color: var(--primary-green); /* Green border for unlocked */
    box-shadow: 0 12px 35px rgba(46, 125, 50, 0.2); /* Green glow for unlocked */
}

.badge-card.locked {
    opacity: 0.7; /* Slightly less opaque */
    filter: grayscale(80%); /* Grayscale for locked badges */
    border-color: var(--subtle-gray);
}

.badge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.badge-icon {
    font-size: 4.5rem; /* Larger icon */
    margin-bottom: 25px;
    color: var(--secondary-green); /* Green for badge icons */
}

.badge-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-text);
}

.badge-requirement {
    color: var(--medium-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.badge-status {
    padding: 10px 20px; /* More padding */
    border-radius: var(--border-radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block; /* Ensure padding works */
}

.badge-status.unlocked {
    background: var(--tertiary-green);
    color: var(--white);
}

.badge-status.locked {
    background: var(--subtle-gray);
    color: var(--medium-text);
}

/* Tax Deduction */
.tax-info {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--teal-accent) 100%);
    color: var(--white);
    padding: 50px; /* More padding */
    border-radius: var(--border-radius-lg);
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.tax-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tax-amount {
    font-size: 4rem; /* Much larger amount */
    font-weight: 800;
    margin: 25px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.tax-info p {
    font-size: 1.15rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* GPS Tracking */
.gps-controls {
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin: 30px 0;
    text-align: center;
    border: 1px solid var(--subtle-gray);
}

.gps-status {
    font-size: 1.3rem; /* Larger status text */
    margin-bottom: 25px;
    padding: 18px; /* More padding */
    border-radius: var(--border-radius-md);
    font-weight: 600;
    display: inline-flex; /* For better icon alignment */
    align-items: center;
    gap: 10px;
}

.gps-status.tracking {
    background: var(--tertiary-green);
    color: var(--primary-green);
}

.gps-status.stopped {
    background: #FFEBEE; /* Light red */
    color: var(--error-red);
}

.distance-display {
    font-size: 3rem; /* Larger distance */
    font-weight: 800;
    color: var(--primary-green);
    margin: 25px 0;
}

/* Error Page */
.error-container {
    min-height: calc(100vh - 75px); /* Adjusted for navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--off-white);
}

.error-content h2 {
    font-size: 7rem; /* Very large error code */
    color: var(--primary-green);
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.error-content h3 {
    font-size: 2.5rem; /* Larger message */
    color: var(--dark-text);
    margin-bottom: 25px;
    font-weight: 700;
}

.error-content p {
    color: var(--medium-text);
    margin-bottom: 40px;
    font-size: 1.15rem;
    line-height: 1.7;
}

/* QR Scanner Styles */
.qr-scanner-container {
    max-width: 650px;
    margin: 40px auto;
    text-align: center;
    padding: 20px;
}

.scanner-box {
    position: relative;
    width: 100%;
    max-width: 450px; /* Slightly larger */
    margin: 30px auto;
    border: 4px solid var(--primary-green); /* Thicker border */
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.scanner-box video {
    width: 100%;
    height: 350px; /* Taller video feed */
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 250px; /* Larger frame */
    height: 250px;
    border: 3px solid var(--white); /* Thicker white frame */
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.4); /* Darker overlay */
}

.scanner-controls {
    margin: 30px 0;
}

.scan-result, .journey-active {
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin: 25px 0;
    border: 1px solid var(--subtle-gray);
}

.vehicle-info, .journey-info {
    text-align: left;
    margin: 25px 0;
}

.vehicle-info p, .journey-info p {
    margin: 12px 0;
    font-size: 1.15rem;
    color: var(--medium-text);
}

.error-msg {
    background: #FFEBEE;
    color: var(--error-red);
    padding: 18px;
    border-radius: var(--border-radius-md);
    margin: 25px 0;
    font-weight: 600;
    border: 1px solid #EF9A9A;
}

/* Driver Dashboard Styles */
.driver-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main content and sidebar */
    gap: 35px;
    margin: 40px 0;
}

.driver-main-content {
    grid-column: 1 / 2;
}

.driver-sidebar {
    grid-column: 2 / 3;
}

.vehicle-status-card, .passengers-section, .map-section {
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-bottom: 30px; /* Space between sections */
    border: 1px solid var(--subtle-gray);
}

.vehicle-status-card {
    grid-column: 1 / -1; /* Spans full width */
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--subtle-gray);
    font-size: 1.05rem;
}

.status-item:last-child {
    border-bottom: none; /* No border on last item */
}

.status-item label {
    font-weight: 600;
    color: var(--dark-text);
}

.status-active {
    color: var(--primary-green);
    font-weight: 700;
}

.status-inactive {
    color: var(--error-red);
    font-weight: 700;
}

.vehicle-controls {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    justify-content: center; /* Center buttons */
}

.passengers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.passengers-header h3 {
    color: var(--dark-text);
    font-size: 1.6rem;
    font-weight: 700;
}

.passenger-count {
    background: var(--primary-green);
    color: var(--white);
    padding: 8px 18px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 1rem;
}

.passengers-list {
    max-height: 450px; /* Taller list */
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}
/* Custom Scrollbar for better looks */
.passengers-list::-webkit-scrollbar {
  width: 8px;
}
.passengers-list::-webkit-scrollbar-track {
  background: var(--off-white);
  border-radius: 10px;
}
.passengers-list::-webkit-scrollbar-thumb {
  background: var(--tertiary-green);
  border-radius: 10px;
}
.passengers-list::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-green);
}


.passenger-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px; /* More padding */
    border: 1px solid var(--subtle-gray);
    border-radius: var(--border-radius-md);
    margin-bottom: 15px; /* More space */
    background: var(--off-white);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.passenger-card:hover {
    background: var(--white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.passenger-avatar {
    width: 45px; /* Slightly larger avatar */
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-green);
}

.passenger-info {
    flex: 1;
}

.passenger-name {
    font-weight: 700;
    color: var(--dark-text);
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.passenger-email, .passenger-id {
    font-size: 0.9rem;
    color: var(--medium-text);
}

.no-passengers {
    text-align: center;
    color: var(--medium-text);
    padding: 40px;
    font-style: italic;
    font-size: 1.1rem;
}

.driver-map {
    height: 350px; /* Taller map */
    border-radius: var(--border-radius-md);
    overflow: hidden; /* Ensure content stays within border-radius */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: var(--subtle-gray); /* Placeholder background */
}

.map-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

/* QR Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8); /* Darker overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.qr-modal.active {
    opacity: 1;
    pointer-events: all;
}

.qr-modal-content {
    background: var(--white);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 15px 45px var(--shadow-heavy);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 0.4s ease forwards;
}

.qr-code-display {
    margin: 25px 0;
    padding: 15px;
    background: var(--off-white);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--subtle-gray);
}
.qr-code-display img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below image */
    margin: 0 auto;
}

/* Real-time Map Styles */
.realtime-map-container {
    margin: 40px 0;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px var(--shadow-light);
    border: 1px solid var(--subtle-gray);
}

.tracking-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--medium-text);
}

.status-indicator.active {
    background: var(--secondary-green);
    animation: pulse 1.5s infinite;
}

.journey-controls {
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px;
    border: 1px solid var(--subtle-gray);
}

.mode-selector select {
    padding: 12px 15px;
    border: 2px solid var(--subtle-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1.05rem;
    color: var(--dark-text);
    background-color: var(--white);
    transition: border-color 0.3s ease;
}

.mode-selector select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.journey-buttons {
    display: flex;
    gap: 15px;
}

.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.live-stats .stat-card { /* Reusing stat-card style with adjustments */
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--subtle-gray);
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Add hover for live stats */
}
.live-stats .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.live-stats .stat-icon {
    font-size: 2.5rem; /* Slightly smaller for live stats */
    margin-bottom: 0; /* Remove margin-bottom from inherited stat-icon */
    color: var(--teal-accent); /* Use teal for live stat icons */
    animation: none; /* No pulsing on these */
}

.stat-info {
    flex: 1;
    text-align: left; /* Align text left within live stat cards */
}

.live-stats .stat-value {
    font-size: 1.8rem; /* Adjusted size */
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.live-stats .stat-label {
    color: var(--medium-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.map-container {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px var(--shadow-light);
    margin-bottom: 35px;
    border: 1px solid var(--subtle-gray);
}

.realtime-map {
    height: 450px; /* Taller map */
    border-radius: var(--border-radius-sm);
    background-color: var(--subtle-gray); /* Placeholder background */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05); /* Inner shadow for map */
}

.speed-verification {
    background: #FFF3E0; /* Light orange for warning */
    border: 1px solid #FFCC80; /* Orange border */
    padding: 25px;
    border-radius: var(--border-radius-md);
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.verification-alert h4 {
    color: #E65100; /* Dark orange text */
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
}

.verification-alert p {
    color: #E65100;
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.verification-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.journey-summary {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow-light);
    margin: 30px 0;
    border: 1px solid var(--subtle-gray);
}

.journey-summary h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--dark-text);
    font-weight: 700;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--subtle-gray);
    font-size: 1.05rem;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item label {
    font-weight: 600;
    color: var(--dark-text);
}

.summary-item span {
    color: var(--primary-green);
    font-weight: 700;
}

/* Vehicle and User Markers */
.vehicle-marker, .user-marker {
    text-align: center;
    line-height: 1;
    border: 3px solid var(--white);
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.vehicle-marker { color: var(--teal-accent); font-size: 2.5rem; padding: 5px; }
.user-marker { color: var(--primary-green); font-size: 2.2rem; padding: 5px; }


/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; } /* Added */
.mb-50 { margin-bottom: 50px; } /* Added */
.mb-60 { margin-bottom: 60px; } /* Added */
.mb-70 { margin-bottom: 70px; } /* Added */
.mb-80 { margin-bottom: 80px; } /* Added */

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; } /* Added */
.mt-50 { margin-top: 50px; } /* Added */
.mt-60 { margin-top: 60px; } /* Added */

.hidden { display: none; }
.visible { display: block; }

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px); /* More pronounced slide */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp { /* Already defined and used by stat cards */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse { /* For status indicator */
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulseIcon { /* For stat-card icons */
    0% { transform: scale(1); }
    50% { transform: scale(1.15); } /* More pronounced pulse */
    100% { transform: scale(1); }
}

@keyframes wave-animation {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

@keyframes fadeSlideUp { /* For general dashboard sections */
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp { /* For individual dashboard cards */
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInCard { /* For passenger cards */
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float { /* For map section */
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); } /* More movement */
}

@keyframes blink { /* For specific blinking elements, if used */
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* Animation Sequencing (Adjusted for full site structure) */

/* Initial page load animations for main sections */
.hero { animation: fadeIn 1s ease-out forwards; animation-delay: 0.1s; }
.how-it-works { animation: fadeIn 1s ease-out forwards; animation-delay: 0.3s; }
.benefits { animation: fadeIn 1s ease-out forwards; animation-delay: 0.5s; }
.testimonials { animation: fadeIn 1s ease-out forwards; animation-delay: 0.7s; }

/* Staggered animations within sections (using general classes) */
.hero .feature-card { animation: slideUp 0.6s ease-out forwards; }
.hero .feature-card:nth-child(1) { animation-delay: 0.8s; }
.hero .feature-card:nth-child(2) { animation-delay: 0.9s; }
.hero .feature-card:nth-child(3) { animation-delay: 1.0s; }
.hero .feature-card:nth-child(4) { animation-delay: 1.1s; }
.hero .feature-card:nth-child(5) { animation-delay: 1.2s; }
.hero .feature-card:nth-child(6) { animation-delay: 1.3s; }

.hero .cta-section { animation: slideUp 0.8s ease-out forwards; animation-delay: 1.5s; }

.how-it-works .step-card { animation: slideUp 0.6s ease-out forwards; }
.how-it-works .step-card:nth-child(1) { animation-delay: 0.8s; }
.how-it-works .step-card:nth-child(2) { animation-delay: 1.0s; }
.how-it-works .step-card:nth-child(3) { animation-delay: 1.2s; }

.benefits .benefit { animation: slideUp 0.6s ease-out forwards; }
.benefits .benefit:nth-child(1) { animation-delay: 0.8s; }
.benefits .benefit:nth-child(2) { animation-delay: 1.0s; }
.benefits .benefit:nth-child(3) { animation-delay: 1.2s; }
.benefits .benefit:nth-child(4) { animation-delay: 1.4s; }

.testimonials .testimonial-card { animation: slideUp 0.6s ease-out forwards; }
.testimonials .testimonial-card:nth-child(1) { animation-delay: 0.8s; }
.testimonials .testimonial-card:nth-child(2) { animation-delay: 1.0s; }
.testimonials .testimonial-card:nth-child(3) { animation-delay: 1.2s; }


/* Dashboard entry animations (ensure these are applied when dashboard loads) */
.driver-dashboard { animation: fadeSlideUp 0.8s ease-out both; animation-delay: 0.1s; }
.vehicle-status-card { animation: slideInUp 0.6s ease-out forwards; animation-delay: 0.3s; }
.passengers-section { animation: slideInUp 0.6s ease-out forwards; animation-delay: 0.5s; }
.map-section { animation: slideInUp 0.6s ease-out forwards; animation-delay: 0.7s; }
.passenger-card { animation: fadeInCard 0.4s ease-in both; } /* Stagger with JS on load if many */

/* Utility Hover animations */
.btn-primary:hover, .cta-button:hover, .action-btn:hover, .secondary-cta-button:hover, .google-btn:hover {
    animation: pulse 0.5s ease; /* Using the simpler pulse for button hovers */
}


/* Skeleton Loading States */
.skeleton {
    background-color: var(--subtle-gray);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%, /* Slightly more visible shimmer */
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Skeleton variants */
.skeleton-text {
    height: 1.1em; /* Adjusted height */
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.6em;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 70%; /* Shorter last line */
}

.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 220px; /* Taller card skeleton */
    border-radius: var(--border-radius-md);
}

.skeleton-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

/* Dashboard skeleton specific */
.skeleton-stat-card {
    height: 180px; /* Taller stat card skeleton */
    border-radius: var(--border-radius-md);
}

.skeleton-chart {
    height: 450px; /* Taller chart skeleton */
    border-radius: var(--border-radius-md);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 45px; /* Larger spinner */
    height: 45px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite; /* Bouncy spin */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px; /* More space for loader */
    background: var(--off-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px var(--shadow-light);
}

/* Page transition overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-green);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none; /* Disable clicks during loading */
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px; /* Slightly larger spinner */
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Form field loading */
.skeleton-input {
    border: none !important;
    background-color: var(--subtle-gray) !important;
    color: transparent !important;
}

.skeleton-input::placeholder {
    color: transparent !important;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark-text);
    color: var(--white);
    padding: 18px 30px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 1001;
    transform: translateY(120px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy transition */
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--primary-green);
}

.toast.error {
    background: var(--error-red);
}

.toast.warning {
    background: var(--warning-orange);
    color: var(--dark-text);
}

/* Progress bar */
.progress-bar {
    height: 6px; /* Thicker progress bar */
    background: rgba(0,0,0,0.1); /* Lighter background */
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    margin-top: 15px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--secondary-green); /* Green fill */
    width: 0;
    transition: width 0.4s ease-out;
}

/* Ripple effect (buttons, etc.) */
.ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0); /* Force GPU acceleration */
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5); /* Stronger white ripple */
    transform: scale(0);
    animation: ripple 0.7s ease-out; /* Slightly longer, smoother ripple */
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Bounce animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); } /* More bounce */
}

.bounce {
    animation: bounce 1.2s infinite; /* Slower, smoother bounce */
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); } /* More float */
}

.float {
    animation: float 3.5s ease-in-out infinite; /* Slower, smoother float */
}

/* Rotating animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate {
    animation: rotate 2.5s linear infinite; /* Slower rotate */
}

/* Pulse opacity animation */
@keyframes pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; } /* More subtle pulse */
}

.pulse-opacity {
    animation: pulse-opacity 2.5s ease-in-out infinite; /* Slower pulse */
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); } /* More shake */
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.6s ease-in-out; /* Slightly slower shake */
}

/* Fade in up */
.fade-in-up {
    animation: fadeInUp 0.7s ease-out;
}

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

/* Skeleton content example */
.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 18px; /* More gap */
    padding: 25px;
}

/* Responsive animations - important! */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Design Overrides */
@media (max-width: 992px) { /* Tablet adjustments */
    .hero h2 {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .how-it-works h2, .benefits h2, .testimonials h2, .dashboard-header h2 {
        font-size: 2.5rem;
    }
    .dashboard-content {
        grid-template-columns: 1fr; /* Stack main and sidebar */
    }
    .dashboard-main, .dashboard-sidebar {
        grid-column: 1 / -1;
    }
    .driver-dashboard {
        grid-template-columns: 1fr; /* Stack driver sections */
    }
    .vehicle-status-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) { /* Mobile adjustments */
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px; /* Reduced padding */
    }
    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .login-btn {
        margin-top: 10px;
        width: 100%;
        padding: 12px 20px;
    }
    main {
        margin-top: 0; /* Sticky navbar handles this visually */
    }
    .hero {
        padding: 80px 0 100px 0;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%); /* Less pronounced wave */
    }
    .hero h2 {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 50px;
    }
    .features-grid, .steps-grid, .benefits-grid, .testimonials-grid, .stats-grid, .action-buttons, .badges-grid, .summary-stats, .live-stats {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .feature-card, .step-card, .benefit, .testimonial-card, .stat-card, .chart-container, .form-container, .login-box, .tax-info, .gps-controls, .scan-result, .journey-active, .vehicle-status-card, .passengers-section, .map-section, .journey-summary, .realtime-map-container .tracking-header, .journey-controls, .live-stats .stat-card, .map-container, .speed-verification {
        padding: 25px; /* Reduced padding for smaller screens */
    }
    .step-icon {
        width: 65px;
        height: 65px;
        font-size: 2.4rem;
    }
    .login-box {
        padding: 40px 30px;
    }
    .login-box h2 {
        font-size: 2rem;
    }
    .login-box p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .google-btn, .cta-button, .secondary-cta-button, .action-btn, .btn-primary, .btn-secondary {
        padding: 15px 25px;
        font-size: 1rem;
        width: 100%;
        margin-left: 0; /* Remove left margin for secondary button */
    }
    .btn-secondary { /* Ensure margin between stacked buttons */
        margin-top: 15px;
    }
    .leaderboard-table th, .leaderboard-table td {
        padding: 15px;
        font-size: 0.9rem;
    }
    .leaderboard-table .rank {
        font-size: 1.3rem;
    }
    .badge-icon {
        font-size: 3.5rem;
    }
    .tax-amount {
        font-size: 3rem;
    }
    .gps-status {
        font-size: 1.1rem;
        padding: 12px;
    }
    .distance-display {
        font-size: 2.2rem;
    }
    .error-content h2 {
        font-size: 4rem;
    }
    .error-content h3 {
        font-size: 1.8rem;
    }
    .scanner-box video {
        height: 250px;
    }
    .scanner-frame {
        width: 180px;
        height: 180px;
    }
    .driver-map, .realtime-map {
        height: 300px;
    }
    .qr-modal-content {
        padding: 30px;
    }
    .live-stats .stat-icon {
        font-size: 2rem;
    }
    .live-stats .stat-value {
        font-size: 1.4rem;
    }
    .summary-item {
        font-size: 1rem;
    }
}


/* Driver Setup Styles */
.driver-setup-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.setup-header {
    text-align: center;
    margin-bottom: 40px;
}

.setup-header h2 {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 15px;
}

.driver-setup-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 40px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
