/* TravelCalm Modern Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

html {
    font-size: 15px;
}

:root {
    /* Color Palette */
    --bg-main: #0b131a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --bg-header: rgba(15, 23, 42, 0.95);
    --border-color: rgba(14, 165, 233, 0.15);
    --primary: #06b6d4;      /* Calm Teal */
    --primary-hover: #0891b2;
    --primary-gradient: linear-gradient(135deg, #0ea5e9, #0d9488);
    --secondary: #64748b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-accent: #38bdf8;
    --error: #ef4444;
    --success: #10b981;
    --accent-glow: rgba(6, 182, 212, 0.15);

    /* Shadows & Blur */
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --glass-blur: blur(12px);

    /* Fonts */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --heading-gradient: linear-gradient(135deg, #fff 40%, var(--primary) 100%);
}

:root.light-mode {
    /* Color Palette for Light Mode */
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-header: rgba(241, 245, 249, 0.97);
    --border-color: rgba(6, 182, 212, 0.2);
    --primary: #0284c7;      /* Soft Blue */
    --primary-hover: #0369a1;
    --primary-gradient: linear-gradient(135deg, #0284c7, #0d9488);
    --secondary: #64748b;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.08);
    --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --heading-gradient: linear-gradient(135deg, #0f172a 40%, var(--primary) 100%);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--text-main);
}

/* Header & Navigation */
header {
    background-color: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--primary);
}

.nav-btn {
    background: var(--primary-gradient);
    color: #fff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.25rem 1.25rem;
}

/* Footer */
footer {
    background-color: #050a0f;
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
    font-size: 1.4rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.footer-links h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Glassmorphism Card Utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 15px 35px -5px rgba(6, 182, 212, 0.15);
}

/* Typography Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.page-header h1 {
    font-size: 3rem;
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: var(--text-main);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

/* AdSense placeholder styled neatly */
.adsense-placeholder {
    background: rgba(15, 23, 42, 0.4);
    border: 1px dashed rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-header);
        backdrop-filter: var(--glass-blur);
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0.5rem;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        padding: 0.35rem 0;
    }
    
    .light-mode .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }
    
    .nav-item a {
        display: block;
        width: 100%;
        padding: 0.5rem 0.25rem;
        font-size: 1.05rem;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        text-align: center;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-header h1 {
        font-size: 2.25rem;
    }
}

/* Admin Dashboard Styling Helper Classes */
.active-tab {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.admin-table th, .admin-table td {
    padding: 12px 10px;
}

.admin-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
}

.admin-table tr {
    transition: background-color 0.2s ease;
}

.admin-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.light-mode .admin-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Submenu & Dropdown styles */
.nav-item.has-submenu {
    position: relative;
}
.nav-item.has-submenu > a::after {
    content: "▾";
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 0.4rem;
    transition: transform 0.3s ease;
}
.nav-item.has-submenu:hover > a::after {
    transform: rotate(180deg);
}
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    width: max-content;
    background-color: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0;
    box-shadow: var(--card-shadow);
    z-index: 1000;
}
.submenu li {
    list-style: none;
}
.submenu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.submenu li a:hover {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--primary);
}
.nav-item.has-submenu:hover .submenu {
    display: block;
}

/* User Settings & Account Dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
}
.user-menu-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}
.user-menu-btn:hover {
    border-color: var(--primary);
    background-color: rgba(6, 182, 212, 0.05);
}
.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 220px;
    background-color: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 0;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    margin-top: 0.5rem;
}
.user-dropdown.show {
    display: block;
}
.dropdown-header {
    padding: 0.5rem 1.25rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-accent);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    word-break: break-all;
}
.dropdown-item {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--primary) !important;
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Responsive Grid System */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.grid-2col.col-1-1 {
    grid-template-columns: 1fr 1fr;
}
.grid-2col.col-1-12 {
    grid-template-columns: 1fr 1.2fr;
}
.grid-2col.col-1-15 {
    grid-template-columns: 1fr 1.5fr;
}
.grid-2col.col-1-25 {
    grid-template-columns: 1fr 2.5fr;
}
.grid-2col.col-12-1 {
    grid-template-columns: 1.2fr 1fr;
}
.tracks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.25rem;
    row-gap: 1.4rem;
}

/* Horizontal Scroll Tabs for mobile selectors */
.vehicle-tabs-container {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.vehicle-tabs-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.veh-tab {
    flex-shrink: 0 !important;
}

/* Mobile responsive navigation styles */
@media (max-width: 768px) {
    .nav-item.has-submenu {
        padding-right: 0;
        width: 100%;
    }
    .nav-item.has-submenu.active-submenu > a::after {
        transform: rotate(180deg);
    }
    .submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2.5px solid var(--primary);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.02);
        margin: 0.5rem 0 0.5rem 0.75rem;
        padding: 0.25rem 0;
        width: calc(100% - 0.75rem);
        min-width: 0;
    }
    .light-mode .submenu {
        background: rgba(0, 0, 0, 0.01);
    }
    .nav-item.has-submenu.active-submenu .submenu {
        display: block;
    }
    .user-menu-container {
        width: 100%;
        margin-top: 0.5rem;
    }
    .user-menu-btn {
        width: 100%;
        justify-content: space-between;
    }
    .user-dropdown {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border-color);
        border-radius: 0;
        background: rgba(0, 0, 0, 0.1);
        margin: 0.25rem 0 0 0.5rem;
        padding: 0.25rem 0;
        min-width: 0;
    }
    .user-menu-container.active-submenu .user-dropdown {
        display: block;
    }
    
    /* Responsive margins and card padding scaling */
    html {
        font-size: 14px;
    }
    main > section,
    main > div,
    main > .glass-card {
        margin-bottom: 2rem !important;
    }
    .nav-container {
        padding: 0.75rem 1rem;
    }
    main {
        padding: 1.5rem 1rem;
    }
    footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    .glass-card {
        padding: 1.25rem !important;
    }
    .grid-2col {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .tracks-grid {
        grid-template-columns: 1fr !important;
        row-gap: 1rem !important;
    }
}
