/* SeaCalm 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%);

    /* Table borders */
    --table-border-header: rgba(255, 255, 255, 0.15);
    --table-border-row: rgba(255, 255, 255, 0.08);

    /* Form Fields */
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(14, 165, 233, 0.15);
    --input-color: #f8fafc;

    /* Footer */
    --bg-footer: #050a0f;

    /* Badges */
    --badge-low-bg: rgba(16, 185, 129, 0.15);
    --badge-low-color: #34d399;
    --badge-low-border: rgba(16, 185, 129, 0.3);

    --badge-med-bg: rgba(245, 158, 11, 0.15);
    --badge-med-color: #fbbf24;
    --badge-med-border: rgba(245, 158, 11, 0.3);

    --badge-high-bg: rgba(239, 68, 68, 0.15);
    --badge-high-color: #fca5a5;
    --badge-high-border: rgba(239, 68, 68, 0.3);

    /* Alerts */
    --alert-success-bg: rgba(16, 185, 129, 0.1);
    --alert-success-border: rgba(16, 185, 129, 0.3);
    --alert-success-text: #a7f3d0;
    --alert-error-bg: rgba(239, 68, 68, 0.1);
    --alert-error-border: rgba(239, 68, 68, 0.3);
    --alert-error-text: #fecaca;

    /* Inner card backgrounds */
    --bg-inner-card: rgba(15, 23, 42, 0.4);
}

:root.light-mode {
    /* Color Palette for Light Mode */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.96);
    --border-color: rgba(6, 182, 212, 0.22);
    --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%, #0284c7 100%);

    /* Table borders */
    --table-border-header: rgba(15, 23, 42, 0.15);
    --table-border-row: rgba(15, 23, 42, 0.08);

    /* Form Fields */
    --input-bg: #ffffff;
    --input-border: rgba(6, 182, 212, 0.35);
    --input-color: #0f172a;

    /* Footer */
    --bg-footer: #e2e8f0;

    /* Badges */
    --badge-low-bg: rgba(16, 185, 129, 0.1);
    --badge-low-color: #047857;
    --badge-low-border: rgba(16, 185, 129, 0.25);

    --badge-med-bg: rgba(245, 158, 11, 0.1);
    --badge-med-color: #b45309;
    --badge-med-border: rgba(245, 158, 11, 0.25);

    --badge-high-bg: rgba(239, 68, 68, 0.1);
    --badge-high-color: #b91c1c;
    --badge-high-border: rgba(239, 68, 68, 0.25);

    /* Alerts */
    --alert-success-bg: rgba(16, 185, 129, 0.08);
    --alert-success-border: rgba(16, 185, 129, 0.3);
    --alert-success-text: #065f46;
    --alert-error-bg: rgba(239, 68, 68, 0.08);
    --alert-error-border: rgba(239, 68, 68, 0.3);
    --alert-error-text: #991b1b;

    /* Inner card backgrounds */
    --bg-inner-card: #f1f5f9;
}

/* Universal Light Mode Component Overrides */
:root.light-mode .adaptive-title,
:root.light-mode .page-header h1 {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root.light-mode .track-card {
    background: #ffffff !important;
    border-color: rgba(6, 182, 212, 0.2) !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
}
:root.light-mode .track-card h4 {
    color: #0f172a !important;
}
:root.light-mode .track-card span {
    color: #475569 !important;
}

:root.light-mode .option-content {
    background: #ffffff !important;
    border-color: rgba(6, 182, 212, 0.25) !important;
    color: #0f172a !important;
}

:root.light-mode .calc-card-option input:checked + .option-content {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: var(--primary) !important;
}

:root.light-mode .step-card,
:root.light-mode .info-card {
    background: #ffffff !important;
    border-color: rgba(6, 182, 212, 0.2) !important;
}

:root.light-mode .sim-btn {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
}
:root.light-mode .sim-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.modal-box {
    background: var(--bg-header) !important;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

:root.light-mode .modal-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
}

/* P6 Acupressure Timer Component */
/* P6 Acupressure Timer Component */
.p6-timer-card {
    background: var(--bg-inner-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.35rem;
    margin: 1.25rem 0;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
    align-self: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    width: 100%;
}

:root.light-mode .p6-timer-card {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.22) !important;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08) !important;
}

.p6-timer-header {
    width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
}

.p6-timer-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
}

.p6-timer-sub {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.p6-timer-guidance {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    width: 100%;
}

:root.light-mode .p6-timer-guidance {
    background: rgba(2, 132, 199, 0.05) !important;
    border-color: rgba(2, 132, 199, 0.2) !important;
}

.p6-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

:root.light-mode .p6-progress-track {
    background: rgba(2, 132, 199, 0.12) !important;
}

.p6-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.4s linear;
}

.p6-timer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.p6-timer-clock {
    font-size: 1.85rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    letter-spacing: 0.05em;
}

.p6-timer-btn {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    padding: 0.65rem 1.35rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.p6-timer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45);
}

/* Medical Neuroscience Breakdown Tabs */
.mech-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.55rem 1.15rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mech-tab-btn:hover,
.mech-tab-btn.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

:root.light-mode .mech-tab-btn {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

:root.light-mode .mech-tab-btn:hover,
:root.light-mode .mech-tab-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

:root.light-mode * {
    scrollbar-color: rgba(100, 116, 139, 0.3) transparent;
}

/* WebKit Custom Sleek & Minimal Scrollbar System */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.45);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Light Mode WebKit Scrollbar Styling */
:root.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.25);
}

:root.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(2, 132, 199, 0.45);
}

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) !important;
    font-weight: 700;
}

.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: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.25rem 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1.35fr 1.35fr 1.05fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    margin-bottom: 0.85rem;
    color: var(--text-main);
    font-size: 1.35rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 320px;
}

.footer-links h4 {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.4rem;
    white-space: nowrap;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(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-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.65rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
    color: #ffffff !important;
}

.btn-secondary {
    background: rgba(14, 165, 233, 0.06);
    border: 2px solid rgba(14, 165, 233, 0.35);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    color: var(--text-main);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25);
}

:root.light-mode .btn-secondary {
    background: #ffffff;
    border: 2px solid rgba(2, 132, 199, 0.4);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

:root.light-mode .btn-secondary:hover {
    background: rgba(2, 132, 199, 0.06);
    border-color: var(--primary);
    transform: translateY(-2px);
    color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.25);
}

/* 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: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--input-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control option,
select option {
    background-color: var(--input-bg);
    color: var(--input-color);
}

/* Fallback color styles for inputs/dropdowns */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background-color: var(--input-bg);
    color: var(--input-color);
    max-width: 100%;
}

select {
    text-overflow: ellipsis;
}

.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: var(--alert-success-bg);
    border: 1px solid var(--alert-success-border);
    color: var(--alert-success-text);
}

.alert-error {
    background-color: var(--alert-error-bg);
    border: 1px solid var(--alert-error-border);
    color: var(--alert-error-text);
}

/* 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) {
    .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;
}
@media (min-width: 769px) {
    .nav-item.has-submenu:hover > a::after {
        transform: rotate(180deg);
    }
    .nav-item.has-submenu:hover .submenu {
        display: block;
    }
}
.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);
}
.submenu li a.active {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #38bdf8 !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--primary);
    padding-left: 1.1rem !important;
}
:root.light-mode .submenu li a.active {
    background-color: rgba(2, 132, 199, 0.12) !important;
    color: #0284c7 !important;
}

/* 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-top: 0.5rem;
    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;
}

/* ==========================================
   COMPREHENSIVE MOBILE & SMARTPHONE RESPONSIVE SYSTEM
   ========================================== */

/* Tablet & Medium Displays (<= 900px) */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    .footer-brand {
        grid-column: span 2;
    }
}

/* Mobile Devices & Smartphones (<= 768px) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Input zoom fix for iOS Safari & Chrome */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Navigation Container */
    .nav-container {
        padding: 0.75rem 1rem;
        position: relative;
    }

    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        font-size: 1.3rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(6, 182, 212, 0.15);
        border-color: var(--primary);
    }

    /* Mobile Vertical Sliding Menu Drawer */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 1.25rem 1.5rem;
        display: none;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
        z-index: 999;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
    }

    :root.light-mode .nav-menu {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    :root.light-mode .nav-item {
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .nav-item a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 0.5rem;
        font-size: 1rem;
        font-weight: 600;
        width: 100%;
        color: var(--text-muted);
    }

    .nav-item a:hover,
    .nav-item.active > a {
        color: var(--primary) !important;
    }

    .nav-item.has-submenu {
        padding-right: 0;
        width: 100%;
    }

    .nav-item.has-submenu.active-submenu > a::after {
        transform: rotate(180deg);
    }

    /* Mobile Submenu Accordion Drawer */
    .submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--primary);
        border-radius: 0 8px 8px 0;
        background: rgba(0, 0, 0, 0.25);
        margin: 0.25rem 0 0.75rem 0.5rem;
        padding: 0.25rem 0;
        width: calc(100% - 0.5rem);
        min-width: 0;
    }

    :root.light-mode .submenu {
        background: rgba(241, 245, 249, 0.95);
        border-left: 3px solid var(--primary);
    }

    .nav-item.has-submenu.active-submenu .submenu {
        display: block !important;
    }

    .submenu li a {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        color: var(--text-muted) !important;
    }

    .submenu li a:hover,
    .submenu li a.active {
        color: var(--primary) !important;
    }

    /* Layout & Cards Spacing */
    main {
        padding: 1.25rem 1rem;
    }

    main > section,
    main > div,
    main > .glass-card {
        margin-bottom: 1.75rem !important;
    }

    .glass-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .grid-2col {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .tracks-grid {
        grid-template-columns: 1fr !important;
        row-gap: 1rem !important;
    }

    /* Tables Responsive Overflow Container */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Small Smartphones (<= 550px) */
@media (max-width: 550px) {
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .page-header {
        margin-bottom: 2rem !important;
    }

    .page-header h1 {
        font-size: 2rem !important;
        line-height: 1.25 !important;
    }

    .page-header p {
        font-size: 0.98rem !important;
    }

    /* Form Buttons full-width on mobile */
    .btn-mobile-block {
        width: 100% !important;
    }
}

/* Global Risk Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.risk-low {
    background-color: var(--badge-low-bg) !important;
    color: var(--badge-low-color) !important;
    border: 1px solid var(--badge-low-border) !important;
}
.risk-med {
    background-color: var(--badge-med-bg) !important;
    color: var(--badge-med-color) !important;
    border: 1px solid var(--badge-med-border) !important;
}
.risk-high {
    background-color: var(--badge-high-bg) !important;
    color: var(--badge-high-color) !important;
    border: 1px solid var(--badge-high-border) !important;
}

/* Interactive FAQ Accordion Component */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 920px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-inner-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.12);
}

.faq-item.active {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
}

:root.light-mode .faq-item {
    background: #ffffff;
    border: 1px solid rgba(2, 132, 199, 0.18);
}

:root.light-mode .faq-item.active {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.12);
}

.faq-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.faq-header:hover {
    color: var(--primary);
}

.faq-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-title-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

.faq-chevron {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, color 0.3s ease;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    background: var(--primary);
    color: #ffffff;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
    padding: 0 1.5rem;
    opacity: 0;
}

.faq-item.active .faq-content {
    max-height: 600px;
    padding: 0 1.5rem 1.35rem 1.5rem;
    opacity: 1;
}

.faq-body {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.7;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

/* Admin Dashboard Interactive Stat Cards */
.admin-stat-card {
    background: var(--bg-inner-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.35rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    user-select: none;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.18);
    background: rgba(14, 165, 233, 0.06);
}

:root.light-mode .admin-stat-card {
    background: #ffffff;
    border: 1px solid rgba(2, 132, 199, 0.18);
}

:root.light-mode .admin-stat-card:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15);
}

.admin-stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-stat-val {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
}

.admin-stat-hint {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.6rem;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-stat-card:hover .admin-stat-hint {
    opacity: 1;
    transform: translateX(2px);
}

/* Chrome/Safari Autofill Yellow Background Override */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-inner-card) inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

:root.light-mode input:-webkit-autofill,
:root.light-mode input:-webkit-autofill:hover, 
:root.light-mode input:-webkit-autofill:focus,
:root.light-mode textarea:-webkit-autofill,
:root.light-mode textarea:-webkit-autofill:hover,
:root.light-mode textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

/* Admin Sidebar & Action Badges Refinement */
.admin-sidebar {
    background: var(--bg-inner-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
}

:root.light-mode .admin-sidebar {
    background: #ffffff;
    border: 1px solid rgba(2, 132, 199, 0.16);
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.06);
}

:root.light-mode .btn-sidebar {
    color: #334155;
}

:root.light-mode .btn-sidebar.submenu-btn {
    color: #475569;
}

:root.light-mode .btn-sidebar.submenu-btn:hover {
    color: var(--primary);
    background: rgba(2, 132, 199, 0.08);
}

.admin-badge-lock {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
    background: rgba(245, 158, 11, 0.1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

:root:not(.light-mode) .admin-badge-lock {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.admin-badge-lock:hover {
    background: rgba(245, 158, 11, 0.2);
}

.admin-badge-reset {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(2, 132, 199, 0.35);
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

:root:not(.light-mode) .admin-badge-reset {
    color: #38bdf8;
    background: rgba(6, 182, 212, 0.12);
}

.admin-badge-reset:hover {
    background: rgba(2, 132, 199, 0.18);
}

.admin-badge-delete {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    text-decoration: none;
    transition: all 0.2s ease;
}

:root:not(.light-mode) .admin-badge-delete {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}

.admin-badge-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.admin-logout-btn {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    text-align: center;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

:root:not(.light-mode) .admin-logout-btn {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

.admin-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}


