/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #ecf0f1;
    --dark-bg: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Login Page */
.center-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.logo {
    height: 80px;
    margin-bottom: 20px;
}

/* Card Background */
.card-bg {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.dark-mode .card-bg {
    background-color: rgba(30, 30, 30, 0.95);
    color: white;
}

/* Stats Cards */
.stats-row {
    margin-top: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 24px;
}

.stat-content h3 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

.stat-content p {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Loader */
.loader {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid var(--secondary-color);
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Styles */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Button Styles */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Modal Styles */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-radius: 10px 10px 0 0;
}

/* Form Controls */
.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Toast Styles */
.toast-container {
    z-index: 9999;
}

.toast {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode */
.dark-mode {
    background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    color: #f5f5f5;
}

.dark-mode .table {
    color: #f5f5f5;
}

.dark-mode .table th {
    background-color: #2c3e50;
}

.dark-mode .form-control {
    background-color: #2c3e50;
    border-color: #4a6572;
    color: white;
}

.dark-mode .stat-card {
    background-color: #2c3e50;
    color: white;
}

.dark-mode .stat-content p {
    color: #bdc3c7;
}

/* Payslip Styles */
.payslip-container {
    font-family: 'Arial', sans-serif;
    padding: 20px;
    background: white;
    color: #333;
}

.payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.payslip-title {
    text-align: center;
    background-color: #f8f9fa;
    padding: 10px;
    border: 2px solid #000;
    margin: 15px 0;
}

.payslip-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.payslip-table th,
.payslip-table td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
}

.payslip-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.payslip-total {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 2px solid #000;
    font-size: 18px;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}