/* GLOBAL STYLES: These rules apply across all pages (Home and Dashboard) */

/* === HTML/BODY RESET AND SETUP === */
html, body {
    /* KEY FIX: Ensure 0 margin/padding to prevent viewport overflow */
    margin: 0; padding: 0;
}
body {
    /* The body is the primary container for the whole app */
    font-family: 'Segoe UI', sans-serif;
    background-color: #f7faf7; /* Light background for a clean feel */
    height: 100vh; /* Make the body fill the entire viewport height */
    display: flex;
    flex-direction: column; /* Stack the nav and the main content vertically */
    /* NEW: Add padding to contain the home-layout margin removal */
    padding-bottom: 20px; /* Space needed below the home layout */
}

/* === LOGO STYLES === */
.logo { 
    /* My new logo name: Highway Health. This uses the CSS background trick to display the image. */
    display: block;
    width: 130px; /* Adjust size for the navigation bar */
    height: 60px; /* Matches the nav height */
    background-image: url('logo.png'); /* Assumes my image is named logo.png */
    background-size: contain; /* Ensure the full image is visible */
    background-repeat: no-repeat;
    background-position: left center;
    overflow: hidden; 
    border-radius: 4px; 
    
    /* FIX: Hide the original "Highway Health" text inside the div */
    text-indent: -9999px; /* Pushes the 'Highway Health' text out of view for screen readers */
    line-height: 0; 
    padding: 0;
}

/* === LOADING/SPINNER STYLES === */
#loading-overlay {
    /* Ensures the loading screen covers the entire window while data loads */
    display: none; /* Initially hidden, shown by JS */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95); z-index: 3000; /* High z-index to cover everything */
    justify-content: center; align-items: center; flex-direction: column;
}
.spinner {
    /* Creates the rotating circle animation */
    border: 6px solid #e8f5e9; /* Light green ring */ 
    border-top: 6px solid #4CAF50; /* Primary Green spin color */ 
    border-radius: 50%;
    width: 50px; height: 50px; 
    animation: spin 1s linear infinite;
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* === BUTTONS & INPUTS: Shared styling for primary user actions === */
.cta-button {
    /* The main call-to-action button */
    background-color: #4CAF50; /* Primary Green */
    color: white;
    font-size: 1.1em;
    padding: 12px 24px;
    border-radius: 6px;
    height: fit-content;
    border: none;
    cursor: pointer;
}
.cta-button:hover {
    background-color: #388E3C; /* Darker Green on hover */
    transform: translateY(-2px); /* Simple lift effect */
    transition: transform 0.2s, background-color 0.2s; 
}
/* General input styles */
input[type="range"] { width: 100%; cursor: pointer; }
input[type="text"] { flex: 1; }
button {
    /* Base style for all standard buttons */
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
button:hover { background-color: #388E3C; }
button:disabled { background-color: #ccc; cursor: not-allowed; }