/* --- Global Reset & Layout --- */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0;
    background: #f4f7f6; 
    display: flex; /* Keeps layout structure aligned */
    min-height: 100vh;
}

/* --- Fixed Sidebar --- */
.sidebar { 
    width: 250px; 
    background: #2c3e50; 
    color: white; 
    position: fixed; /* Fixes sidebar to the side */
    height: 100vh;   /* Full screen height */
    left: 0;
    top: 0;
    overflow-y: auto; /* Scrollable if nav items exceed height */
    z-index: 1000;   /* Highest level: Sidebar stays on TOP of header/footer */
    transition: all 0.3s ease;
}

.sidebar h2 { 
    text-align: center; 
    padding: 20px 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 2px;
}

.sidebar a { 
    display: flex; 
    align-items: center;
    color: rgba(255,255,255,0.8); 
    padding: 12px 25px; 
    text-decoration: none; 
    font-size: 15px;
    border-left: 4px solid transparent;
    transition: 0.3s;
}

.sidebar a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    color: #ffffff; /* Ensures icons are pure white */
}

.sidebar a:hover { 
    background: rgba(255,255,255,0.1); 
    color: white;
    border-left: 4px solid #3498db;
}

.sidebar a.active {
    background: #3498db;
    color: white;
    font-weight: bold;
    border-left: 4px solid #ffffff;
}

/* --- Navigation Labels (Management/System) --- */
.nav-label {
    padding: 20px 25px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: #7f8c8d;
    letter-spacing: 1px;
}

/* --- Main Content Area --- */
.main-content { 
    flex: 1; 
    margin-left: 250px; /* Essential: pushes content to the right of fixed sidebar */
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    width: calc(100% - 250px);
}

header { 
    background: white; 
    padding: 15px 30px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    position: sticky; /* Header stays at top of content area on scroll */
    top: 0;
    z-index: 900; /* Lower than sidebar */
}

footer {
    background: white; 
    padding: 20px 30px; 
    border-top: 1px solid #ddd;
    margin-top: auto; /* Pushes footer to bottom of page */
    z-index: 900; /* Lower than sidebar */
    display: flex;
    justify-content: space-between;
}

.content-area { 
    padding: 30px; 
    flex: 1; 
}

/* --- Form & Table Components --- */
.emp-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
}

.emp-table th { 
    background: #34495e; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
    font-size: 12px;
}

.emp-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #f0f0f0; 
}

/* --- Tab Navigation (for Profile/Edit pages) --- */
.tabs-nav { 
    display: flex; 
    border-bottom: 2px solid #ddd; 
    margin-bottom: 0; 
    gap: 5px; 
}

.tab-link { 
    padding: 12px 25px; 
    border: none; 
    background: #e9ecef; 
    cursor: pointer; 
    border-radius: 5px 5px 0 0; 
    font-weight: bold; 
    color: #7f8c8d; 
    transition: 0.3s;
}

.tab-link.active { 
    background: #3498db; 
    color: white; 
}

.tab-content { 
    display: none; 
    background: white; 
    padding: 30px; 
    border-radius: 0 0 8px 8px; 
    border: 1px solid #ddd; 
    border-top: none; 
}

.tab-content.active { 
    display: block; 
    animation: fadeIn 0.3s; 
}

/* --- Login Page --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2c3e50;
}

.login-container { 
    width: 350px; 
    padding: 40px; 
    background: white; 
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
}

/* --- Utilities --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }