/* style.css - Modern Professional Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #2563eb;       /* Modern Blue */
    --primary-dark: #1e40af;
    --secondary: #64748b;     /* Slate Gray */
    --success: #10b981;       /* Emerald Green */
    --danger: #ef4444;        /* Soft Red */
    --warning: #f59e0b;       /* Amber */
    --background: #f3f4f6;    /* Light Gray BG */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Navbar --- */
.navbar {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 20px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn.logout { background: #fee2e2; color: #991b1b; }
.nav-btn.logout:hover { background: #fecaca; }

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* --- Cards (Metrics) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.card h3 {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 5px;
    color: var(--text-main);
}

.card.blue { border-left: 5px solid var(--primary); }
.card.green { border-left: 5px solid var(--success); }
.card.red { border-left: 5px solid var(--danger); }

/* --- Action Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.btn-danger { background: var(--danger); }
.btn-secondary { background: linear-gradient(135deg, #991b1b, #ef4444); }

/* --- Tables --- */
.table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--background);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--background);
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background-color: #f9fafb; }

/* --- Form Elements --- */
input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="month"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 5px;
    background: #f9fafb;
    transition: border 0.2s;
    box-sizing: border-box; /* Important for padding */
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

        /* --- FORCE STICKY FOOTER --- */
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        .container {
            flex: 1; /* This pushes the footer down */
            width: 100%;
            max-width: 1200px; /* Optional: keep content centered */
            margin: 0 auto;
            padding: 20px;
            box-sizing: border-box;
        }
        /* Make form elements look good */
        input, select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-sizing: border-box; 
        }

        /* --- DROPDOWN MENU STYLES --- */
        .dropdown { position: relative; display: inline-block; }
        
        .dropbtn { 
            background: none; 
            border: none; 
            color: var(--text-muted); 
            font-weight: 600; 
            cursor: pointer; 
            font-size: 1rem; 
            font-family: inherit; 
            padding: 5px 10px;
            transition: color 0.3s;
        }
        .dropbtn:hover { color: var(--primary); }

        .dropdown-content { 
            display: none; 
            position: absolute; 
            right: 0; 
            background-color: white; 
            min-width: 220px; 
            box-shadow: 0 8px 16px rgba(0,0,0,0.15); 
            z-index: 1000; 
            border-radius: 8px; 
            border: 1px solid #eee; 
            overflow: hidden; 
            padding: 5px 0;
        }

        .dropdown-content a { 
            color: #333; 
            padding: 12px 20px; 
            text-decoration: none; 
            display: block; 
            font-size: 0.95rem; 
            transition: background 0.2s; 
            border-bottom: 1px solid #f9f9f9;
        }
        .dropdown-content a:last-child { border-bottom: none; }
        
        .dropdown-content a:hover { background-color: #f3f4f6; color: var(--primary); padding-left: 25px; }
        
        /* Show dropdown on hover */
        .dropdown:hover .dropdown-content { display: block; }