/* --- Global Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

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

/* --- Horizontal Header Layout --- */
.site-header {
    display: flex;
    flex-direction: row;        
    align-items: center;        
    justify-content: flex-start;
    gap: 30px;
    width: 100%;
    background-color: #fdfaf5;
    padding: 10px 20px;
    border-bottom: 1px solid #e8e2d9;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.logo-container {
    width: 120px;               
    height: 120px;
    flex-shrink: 0;             
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    width: 100%; 
}

.main-nav a {
    text-decoration: none;
    color: #4a5d4e;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* --- Dropdown Styles --- */
.dropdown { position: relative; display: flex; align-items: center; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 5px;
    padding: 10px 0; 
}
.dropdown-content a { color: #4a5d4e; padding: 8px 16px; display: block; text-transform: none; font-size: 0.85rem; }
.dropdown-content a:hover { background-color: #fdfaf5; color: #c09e85; }
.dropdown:hover .dropdown-content { display: block; }

/* --- Content & Cards --- */
.nav-grid { display: flex; flex-direction: column; gap: 15px; }
.nav-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e1e4e8;
}
.nav-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #3498db; }
.nav-card strong { display: block; font-size: 1.1em; margin-bottom: 5px; color: #2980b9; }

.total-display { font-size: 1.2em; font-weight: bold; color: #4a5d4e; margin-top: 20px; background: #fdfaf5; padding: 15px; border-radius: 10px; border: 1px solid #e8e2d9; }
.row { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.line-total { font-weight: bold; color: #555; width: 80px; }
form input, form select { padding: 8px; border: 1px solid #ddd; border-radius: 5px; }

/* --- Login Form & Logout Link --- */
.login-form { display: flex; gap: 5px; align-items: center; }
.login-form input { padding: 5px 8px; border: 1px solid #e8e2d9; border-radius: 4px; font-size: 0.8rem; width: 100px; background-color: #ffffff; }
.login-form button { padding: 5px 10px; background-color: #4a5d4e; color: #ffffff; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.8rem; }
.login-form button:hover { background-color: #c09e85; }

.login-link { color: #c09e85 !important; text-decoration: none; font-weight: bold; font-family: 'Georgia', serif; font-size: 0.9rem; text-transform: uppercase; }
.user-indicator { font-size: 0.9rem; color: #4a5d4e; font-weight: bold; font-family: 'Georgia', serif; margin-right: 10px; }

/* --- Mobile Toggle Styles --- */
.menu-toggle { display: none; cursor: pointer; padding: 15px; font-weight: bold; color: #4a5d4e; border: 1px solid #4a5d4e; border-radius: 5px; }

/* --- Mobile Adjustments --- */
@media screen and (max-width: 768px) {
    /* Ensure header wraps */
    .site-header { 
        flex-wrap: wrap !important; 
        justify-content: space-between !important; 
    }
    
    /* Show the hamburger toggle */
    .menu-toggle { 
        display: block !important; 
        order: 1; 
    }
    
    /* FORCE HIDE the main nav on mobile by default */
    .main-nav { 
        display: none !important; 
        width: 100% !important; 
        text-align: center !important; 
        flex-basis: 100% !important; 
        order: 2 !important; 
    }
    
    /* When the .show class is added by JS, reveal the menu */
    .main-nav.show { 
        display: flex !important; 
        flex-direction: column !important; 
    }

    /* Stack links vertically */
    .main-nav a, .main-nav form { 
        display: block !important; 
        padding: 15px !important; 
        border-bottom: 1px solid #eee !important; 
    }
    
    /* Make the dropdown work nicely on mobile */
    .dropdown { display: block !important; }
    .dropdown-content { position: static !important; box-shadow: none !important; width: 100% !important; text-align: center !important; }
}