/* --- UNIVERSAL STYLES & COLOR PALETTE --- */
:root {
    --primary-color: #4A90E2; /* A strong, friendly blue */
    --primary-hover: #357ABD;
    --secondary-color: #F5A623; /* A warm accent orange */
    --background-color: #F8F9FA; /* A very light grey */
    --card-background: #FFFFFF;
    --text-color: #4A4A4A; /* A dark, soft grey */
    --heading-color: #333333;
    --border-color: #E0E7ED;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
}

body, html {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h2, h3 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}

/* --- MAIN LAYOUT & NAVIGATION --- */
.main-nav {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-links a {
    font-weight: 500;
}

.logout-button {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.logout-button:hover {
    background-color: var(--primary-hover);
    color: white;
}

.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.page-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* --- CARD STYLES --- */
.card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 7px 14px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card-grid-halves {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

/* --- FORM & BUTTON STYLES --- */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: 1em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.button-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.button-primary:hover {
    background-color: var(--primary-hover);
}
.button-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.button-secondary {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}
.button-secondary:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

/* --- SPECIFIC COMPONENT STYLES --- */

/* Dashboard */
.stat-large {
    font-size: 2.8em;
    font-weight: 600;
    color: var(--heading-color);
    margin: 5px 0 10px 0;
    font-family: var(--font-heading);
}
.card-cta {
    background-color: var(--primary-color);
    color: white;
}
.card-cta h3, .card-cta p {
    color: white;
}
.card-cta .button-primary {
    background-color: white;
    color: var(--primary-color);
}

/* Employee Management */
.employee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}
.staff-type {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    color: white;
    font-weight: bold;
}
.staff-type.front { background-color: var(--success-color); }
.staff-type.kitchen { background-color: var(--secondary-color); }

/* Tip Entry Page */
.validation-summary {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    margin: 20px 0;
    background-color: var(--background-color);
    border-radius: 5px;
    font-weight: bold;
    font-family: var(--font-heading);
}
.validation-summary #remaining-div.invalid { color: var(--danger-color); }
.validation-summary #remaining-div.valid { color: var(--success-color); }
.employee-entry.simple {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 15px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.employee-entry.simple:last-child {
    border-bottom: none;
}

/* Reports Page */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.report-table th, .report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.report-table th {
    background-color: var(--background-color);
    font-family: var(--font-heading);
    font-weight: 600;
}
.report-table tbody tr:hover {
    background-color: #fdfaf5;
}

/* Login Page (if using this stylesheet) */
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-card { max-width: 400px; margin: 0 auto; }
.error-message { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; border-radius: 5px; padding: 10px; margin-bottom: 15px; }

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #888;
    font-size: 0.9em;
}



/* Tab Navigation Styles */
/* In css/style.css, replace your old .tab-nav styles with this */

/* Tab Navigation Styles */
.tab-nav {
    display: flex;
    margin-bottom: -1px; /* Overlap the card border */
    position: relative;
    z-index: 2; /* Ensure tabs are on top */
}

.tab-nav a {
    padding: 10px 20px;
    margin-right: 5px;
    font-weight: 500;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background-color: #f0f2f5;
    font-family: var(--font-heading);
}

.tab-nav a:not(.active):hover {
    background-color: #e9ecef;
    color: var(--primary-hover);
}

.tab-nav a.active {
    background-color: var(--card-background); /* Same as the card */
    color: var(--heading-color);
    border-bottom: 1px solid var(--card-background); /* Hide bottom border */
    font-weight: 600;
}








/* --- RESPONSIVE DESIGN --- */
/* Media Query for tablets and smaller devices (less than 768px wide) */
@media (max-width: 768px) {

    /* --- GLOBAL FONT SIZE ADJUSTMENT --- */
    body {
        font-size: 14px; /* Slightly smaller base font on mobile */
    }

    h2 {
        font-size: 1.5em; /* Reduce heading size */
    }

    h3 {
        font-size: 1.2em;
    }

    .main-content {
        margin-top: 20px;
        padding: 0 15px;
    }

    /* --- LAYOUT ADJUSTMENTS --- */
    .card-grid,
    .card-grid-halves {
        grid-template-columns: 1fr; /* Stack cards vertically */
    }

    /* --- NAVIGATION --- */
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    .nav-links {
        margin-top: 10px;
        flex-wrap: wrap; /* Allow links to wrap if needed */
        justify-content: center;
    }

    /* --- DASHBOARD & FORMS --- */
    .stat-large {
        font-size: 2.2em; /* Smaller stat font */
    }

    .filter-form {
        flex-direction: column; /* Stack filter inputs vertically */
        align-items: stretch;
    }
    
    .filter-form button {
        margin-top: 10px;
    }

    .employee-entry.simple {
        grid-template-columns: 1fr; /* Stack employee entry on mobile */
        gap: 5px;
    }
    
    .employee-entry.simple label {
        padding-bottom: 5px;
    }

    /* --- TABS --- */
    .tab-nav {
        font-size: 0.9em; /* Smaller tab text */
    }
    .tab-nav a {
        padding: 8px 12px;
    }
}


.status-pending {
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}
.button-small.button-success {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}



/* Status Badge Styles */
.status-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.status-badge.pending { 
    background-color: var(--secondary-color); /* Orange */
}

.status-badge.paid { 
    background-color: var(--success-color); /* Green */
}















