:root {
    --primary-red: #ff0000;
    --primary-black: #000000;
    --primary-white: #ffffff;
    --dark-red: #cc0000;
    --light-gray: #f4f4f4;
    --dark-gray: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-white);
    color: var(--primary-black);
    line-height: 1.6;
}

/* Header Styles */
.header {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary-red);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-container h1 {
    font-size: 1.5rem;
    color: var(--primary-white);
}

/* Navigation */
.nav-menu {
    background-color: var(--dark-gray);
    padding: 0.5rem 2rem;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--primary-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: var(--primary-red);
    border-radius: 4px;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--primary-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--light-gray);
}

tr:hover {
    background-color: var(--light-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--primary-white);
}

.btn-primary:hover {
    background-color: var(--dark-red);
}

.btn-secondary {
    background-color: var(--primary-black);
    color: var(--primary-white);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--primary-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-black);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(255,0,0,0.1);
}

/* Dashboard Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--primary-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-red);
}

.stat-card h3 {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-black);
}

/* Department totals */
.department-totals {
    background: var(--primary-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.department-totals h2 {
    color: var(--primary-red);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 0.5rem;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dept-item {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 4px;
}

.dept-name {
    font-weight: bold;
    color: var(--primary-black);
}

.dept-total {
    font-size: 1.2rem;
    color: var(--primary-red);
}

/* Login/Register Forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--primary-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container .logo {
    display: block;
    margin: 0 auto 2rem;
    height: 60px;
}

.auth-container h2 {
    text-align: center;
    color: var(--primary-black);
    margin-bottom: 2rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.footer {
    background-color: var(--primary-black);
    color: var(--primary-white);
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    border-top: 2px solid var(--primary-red);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .footer {
        position: static;
    }
}