/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d2d2d;
    background: linear-gradient(135deg, #1f2b44 0%, #2d3a58 45%, #1f2b44 100%);
    min-height: 100vh;
}

::selection {
    background: rgba(52, 152, 219, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0 20px;
}

.nav-brand {
    margin-right: 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #34495e;
}

/* Forms */
.hidden {
    display: none !important;
}

.form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 1rem;
    text-align: left;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 6px;
}

.form-row input[type="date"] {
    max-width: 180px;
}

.form-section {
    max-width: 100%;
}

.form-section button {
    margin-top: 0.5rem;
}

button.primary {
    background: #4b6ef5;
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    transition: filter 0.2s;
}

button.primary:hover {
    filter: brightness(1.1);
}

button.primary:active {
    transform: scale(0.97);
}

    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #5b6cf7;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(91, 108, 247, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 108, 247, 0.35);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(91, 108, 247, 0.25);
}

/* Tables */
.table-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin-top: 0.5rem;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.error-message {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: none;
}

/* Salary */
.salary-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.salary-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.salary-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-top: 0.5rem;
}

/* Admin */
.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.admin-section .table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.admin-section table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-section th,
.admin-section td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-section th {
    background: rgba(0,0,0,0.04);
}


/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .container {
        padding: 10px;
    }
}