/* --- Premium Global Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Muted, low-opacity brand colors for backgrounds and accents */
    --ccl-blue-soft: rgba(0, 51, 160, 0.15);
    --ccl-light-green-soft: rgba(144, 238, 144, 0.25);
    --ccl-neon-yellow-soft: rgba(223, 255, 0, 0.3);
    /* Core Layout Colors */
    --ccl-white: #ffffff;
    --ccl-dark: #212529;
    --ccl-gray-light: #f8f9fa;
    --ccl-gradient: linear-gradient(to right, rgba(0, 51, 160, 0.2) 0%, rgba(144, 238, 144, 0.25) 50%, rgba(223, 255, 0, 0.2) 100%);
}

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(0, 0, 0, 0.3);
    }

/* FIX: Changed height: 100% to min-height: 100vh to allow dynamic viewport expansion */
html {
    scroll-behavior: smooth;
    min-height: 100vh;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--ccl-gray-light);
    color: var(--ccl-dark);
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

/* Tighten letter spacing on headings */
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.5px;
}

h1, .display-3, .display-5 {
    letter-spacing: -1px;
}

/* Add slight spread to functional text for readability */
.btn, .badge, .text-uppercase, .nav-link, .sidebar-link {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.5px;
}

main {
    flex-shrink: 0;
    flex-grow: 1;
    margin-top: 80px;
}

/* --- Header & Navigation --- */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    background-color: #ffffff;
    padding-right: 0 !important;
}

.navbar-ccl {
    background: var(--ccl-gradient);
    min-height: 80px;
}

.header-left, .header-right {
    width: 33.33%;
}

.header-center {
    width: 33.33%;
    text-align: center;
}

.sub-header {
    position: absolute;
    width: 100%;
    top: 100%;
    left: 0;
    background-color: var(--ccl-white);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
}

.header-wrapper:hover .sub-header {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-header a {
    color: var(--ccl-dark);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

    .sub-header a:hover {
        color: #0033A0;
    }

/* --- Minimalist Buttons --- */
.btn-ccl-muted {
    background-color: rgba(223, 255, 0, 0.6);
    color: var(--ccl-dark);
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 5px;
    transition: all 0.2s ease;
}

    .btn-ccl-muted:hover {
        background-color: rgba(223, 255, 0, 0.4);
    }

.btn-outline-dark {
    border-radius: 5px;
    font-weight: 600;
}

/* --- Minimalist Cards / Forms --- */
.ccl-card {
    background-color: var(--ccl-white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.footer-ccl {
    background: var(--ccl-gradient);
    margin-top: auto;
}

/* --- Dashboard Layout --- */
.sidebar-ccl {
    width: 280px;
    background: linear-gradient(to bottom, rgba(0, 51, 160, 0.15) 0%, rgba(144, 238, 144, 0.20) 50%, rgba(223, 255, 0, 0.15) 100%);
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* --- Dashboard Sidebar --- */
.sidebar-link {
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 12px 20px;
    font-size: 1.05rem;
}

    .sidebar-link:hover, .sidebar-link.active {
        background-color: rgba(255, 255, 255, 0.75) !important;
        color: #000 !important;
        transform: translateX(3px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }

/* --- Strava Integration --- */
.strava-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(3px);
    z-index: 10;
}

.btn-strava {
    background-color: #fc4c02;
    color: white;
    font-weight: 700;
    border: none;
    transition: background-color 0.2s;
}

    .btn-strava:hover {
        background-color: #e34402;
        color: white;
    }

/* --- Premium UI Overrides --- */
.premium-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04) !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

    .premium-card:hover {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
        transform: translateY(-2px);
    }

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    transition: all 0.2s ease-in-out;
}

.btn-outline-dark:hover {
    background-color: #212529;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(33, 37, 41, 0.2);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

    .password-toggle:hover {
        color: var(--ccl-dark);
    }

.password-wrapper input {
    padding-right: 45px !important;
}
