/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7fafc;
    min-height: 100vh;
    color: #333;
}

/* Body background for login page */
body:has(#loginPage.active) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Fallback for browsers that don't support :has() */
.login-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.page {
    display: none !important;
}

.page.active {
    display: block !important;
}

/* Ensure main app is completely hidden when not active */
#mainApp {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -9999px !important;
}

#mainApp.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    top: auto !important;
    flex-direction: column;
    min-height: 100vh;
}

/* Login Page Styles */
#loginPage {
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    z-index: 9999;
}

#loginPage.active {
    display: flex !important;
}

/* When login page is active, hide everything else */
#loginPage.active ~ #mainApp {
    display: none !important;
    visibility: hidden !important;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header h1 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 24px;
}

.company-selector {
    margin-bottom: 30px;
}

.company-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.company-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s;
}

.company-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #4a5568;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 6px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    min-width: 0;
    height: 32px;
}

.form-group input[type="file"] {
    padding: 2px;
    font-size: 12px;
    height: 30px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

.auth-form p {
    text-align: center;
    margin-top: 20px;
    color: #718096;
}

.auth-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* Main Application Styles */
#mainApp {
    min-height: 100vh;
    background: #f7fafc;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Hide navbar when main app is not active */
#mainApp:not(.active) .navbar {
    display: none !important;
    visibility: hidden !important;
}

.nav-brand h1 {
    color: white;
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-brand span {
    color: #e2e8f0;
    font-size: 12px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Content Pages */
.content-page {
    display: none;
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - 60px); /* Subtract navbar height */
}

.content-page.active {
    display: flex;
    flex-direction: column;
}

.page-header {
    background: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
}

.page-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.page-header h2 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 28px;
}

/* Tab Styles */
.page-tabs,
.download-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: auto;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.tab-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tab-btn:hover:before {
    left: 100%;
}

.tab-content {
    display: none !important;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tab-content.active {
    display: block !important;
}

.tab-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #4a5568;
}

.download-tab-content {
    display: none;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.download-tab-content.active {
    display: block;
}

/* Enhanced Download Page Styles */
.download-tab-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-tab-content h3:before {
    content: '📄';
    font-size: 24px;
}

/* Employee 360 Styles */
.employee360-preview {
    margin-top: 20px;
}

.employee360-container {
    max-width: 100%;
}

.employee360-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.employee360-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.employee360-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-weight: 600;
    color: #6c757d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 14px;
    color: #212529;
    font-weight: 500;
}

.employee360-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.employee360-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.employee360-table th {
    background: #1e3a8a;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #dee2e6;
}

.employee360-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    font-size: 13px;
}

.employee360-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.employee360-table tbody tr:hover {
    background-color: #e3f2fd;
}

.employee360-controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Responsive design for Employee 360 */
@media (max-width: 768px) {
    .employee360-info-grid {
        grid-template-columns: 1fr;
    }
    
    .employee360-table {
        font-size: 11px;
    }
    
    .employee360-table th,
    .employee360-table td {
        padding: 6px 4px;
    }
}

/* Employee 360 Comprehensive Table Styles */
.employee360-comprehensive {
    margin: 20px 0;
}

.employee360-header {
    margin-bottom: 20px;
}

.employee360-header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.employee360-header-table td {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
}

.employee360-header-table td:first-child {
    font-weight: bold;
    background-color: #e9ecef;
    width: 150px;
}

.employee360-main-table {
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.employee360-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background-color: white;
}

.employee360-data-table th {
    background-color: #003d82;
    color: white;
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #002a5c;
    font-weight: bold;
    font-size: 11px;
}

.employee360-data-table td {
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    background-color: white;
    font-size: 11px;
}

.employee360-data-table .row-header {
    background-color: #f8f9fa;
    font-weight: bold;
    text-align: left;
    padding-left: 12px;
    width: 120px;
    border-right: 2px solid #003d82;
}

.employee360-data-table .total-col {
    background-color: #e3f2fd;
    font-weight: bold;
    border-left: 2px solid #003d82;
}

.employee360-data-table .section-header td {
    background-color: #f0f8ff;
    font-weight: bold;
}

.employee360-data-table .net-payable-row td {
    background-color: #e8f5e8;
    font-weight: bold;
    color: #2e7d32;
}

.employee360-data-table tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

.employee360-data-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* Employee selection styles */
.employee360-btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.employee360-btn:hover {
    background-color: #0056b3;
}

.employee360-btn.secondary {
    background-color: #6c757d;
}

.employee360-btn.secondary:hover {
    background-color: #545b62;
}

.employee360-btn.success {
    background-color: #28a745;
}

.employee360-btn.success:hover {
    background-color: #1e7e34;
}

.employee360-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive adjustments for comprehensive table */
@media (max-width: 768px) {
    .employee360-data-table {
        font-size: 10px;
    }
    
    .employee360-data-table th,
    .employee360-data-table td {
        padding: 4px 3px;
    }
    
    .employee360-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .employee360-controls select {
        min-width: 100%;
    }
}

/* Salary Statement Tabs */
.salary-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.salary-tabs .tab-btn {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}

.salary-tabs .tab-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.salary-tabs .tab-btn:hover {
    background: white;
    border-color: #3b82f6;
    color: #3b82f6;
}

.salary-tabs .tab-btn.active:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Salary Tab Content */
.salary-tab-content {
    display: none;
}

.salary-tab-content.active {
    display: block;
}

/* Abstract View Styles */
.abstract-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid #000;
    background: white;
}

.company-info h1 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.company-info h2 {
    margin: 5px 0 0 0;
    font-size: 18px;
    font-weight: normal;
    color: #000;
}

.location-selector {
    margin-top: 10px;
}

.location-selector select {
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #000;
    background: #f0f8ff;
    color: #000;
    border-radius: 4px;
    min-width: 200px;
}

.abstract-title {
    margin-top: 20px;
}

.abstract-title h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    display: inline;
}

.month-selector {
    display: inline-block;
    margin-left: 10px;
}

.month-selector select {
    padding: 5px 15px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #000;
    background: #e8f5e8;
    color: #000;
    border-radius: 4px;
}

/* Abstract Table Styles */
.abstract-table-container {
    margin: 20px 0;
    border: 2px solid #000;
    background: white;
}

.abstract-data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Arial', sans-serif;
}

.abstract-data-table th {
    background: #f0f0f0;
    color: #000;
    padding: 12px;
    text-align: center;
    border: 1px solid #000;
    font-weight: bold;
    font-size: 14px;
}

.abstract-data-table td {
    padding: 10px 12px;
    border: 1px solid #000;
    text-align: left;
    font-size: 13px;
    color: #000;
}

.abstract-data-table td:first-child {
    text-align: center;
    font-weight: bold;
    width: 60px;
}

.abstract-data-table td:nth-child(2) {
    font-weight: bold;
    width: 40%;
}

.abstract-data-table td:nth-child(3) {
    text-align: center;
    width: 15%;
    font-weight: bold;
}

.abstract-data-table td:nth-child(4) {
    text-align: right;
    width: 25%;
    font-weight: bold;
    position: relative;
    cursor: help;
}

/* Tooltip styles */
.amount-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.amount-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.amount-cell:hover .amount-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Total row styling */
.abstract-data-table .total-row {
    background: #e6f3ff;
    font-weight: bold;
}

.abstract-data-table .total-row td {
    font-size: 14px;
    font-weight: bold;
}

/* Abstract Actions */
.abstract-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding: 20px;
}

.abstract-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.abstract-actions button:first-child {
    background: #dc3545;
    color: white;
}

.abstract-actions button:first-child:hover {
    background: #c82333;
}

.abstract-actions button:nth-child(2) {
    background: #28a745;
    color: white;
}

.abstract-actions button:nth-child(2):hover {
    background: #218838;
}

.abstract-actions button:last-child {
    background: #6c757d;
    color: white;
}

.abstract-actions button:last-child:hover {
    background: #5a6268;
}

/* Print Styles */
@media print {
    .abstract-header {
        border: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .abstract-data-table,
    .abstract-data-table th,
    .abstract-data-table td {
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .abstract-actions {
        display: none;
    }
    
    .salary-tabs,
    .salary-filters {
        display: none;
    }
}

/* Responsive Abstract View */
@media (max-width: 768px) {
    .company-info h1 {
        font-size: 18px;
    }
    
    .company-info h2 {
        font-size: 14px;
    }
    
    .abstract-title h3 {
        font-size: 14px;
    }
    
    .abstract-data-table {
        font-size: 12px;
    }
    
    .abstract-data-table th,
    .abstract-data-table td {
        padding: 6px 4px;
    }
    
    .abstract-actions {
        flex-direction: column;
    }
}

/* User Management Styles */
.admin-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 10px 0 20px 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-notice::before {
    content: "🔒";
    font-size: 16px;
}

.user-management-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.user-management-section h3 {
    color: #374151;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 18px;
}

.user-tab-content {
    display: none;
    padding: 20px;
}

.user-tab-content.active {
    display: block;
}

.user-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.user-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.user-form .form-group {
    display: flex;
    flex-direction: column;
}

.user-form .form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.user-form .form-group input,
.user-form .form-group select {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-form .form-group input:focus,
.user-form .form-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.user-form .form-group small {
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

.permission-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.permission-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.permission-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.form-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
}

.form-actions button[type="button"] {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.form-actions button[type="button"]:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* User Management Controls */
.user-management-controls,
.user-list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.user-list-controls {
    gap: 15px;
    flex-wrap: wrap;
}

.user-list-controls input,
.user-list-controls select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.user-list-controls button {
    padding: 8px 15px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-list-controls button:hover {
    background: #2563eb;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-controls input,
.search-controls select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-actions button:hover {
    background: #1d4ed8;
}

/* Users Table */
.users-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.users-table th {
    background: linear-gradient(135deg, #1e3a8a, #3730a3);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 3px solid #1e40af;
}

.users-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 13px;
}

.users-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.users-table tbody tr:hover {
    background-color: #e0f2fe;
    transition: background-color 0.2s;
}

/* User Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge.inactive {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.role-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.role-badge.admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.role-badge.user {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn.edit {
    background: #fef3c7;
    color: #92400e;
}

.action-btn.edit:hover {
    background: #fde68a;
}

.action-btn.delete {
    background: #fef2f2;
    color: #991b1b;
}

.action-btn.delete:hover {
    background: #fecaca;
}

.action-btn.toggle {
    background: #e0f2fe;
    color: #0c4a6e;
}

.action-btn.toggle:hover {
    background: #bae6fd;
}

/* Activity Log Styles */
.activity-controls {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-controls input,
.filter-controls select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.filter-controls button {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-log-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th {
    background: linear-gradient(135deg, #1e3a8a, #3730a3);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.activity-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.activity-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Activity Type Badges */
.activity-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-type-badge.login {
    background: #dcfce7;
    color: #166534;
}

.activity-type-badge.logout {
    background: #fef2f2;
    color: #991b1b;
}

.activity-type-badge.create {
    background: #dbeafe;
    color: #1e40af;
}

.activity-type-badge.edit {
    background: #fef3c7;
    color: #92400e;
}

.activity-type-badge.delete {
    background: #fce7f3;
    color: #be185d;
}

.activity-type-badge.export {
    background: #f0fdf4;
    color: #15803d;
}

/* Responsive Design for User Management */
@media (max-width: 768px) {
    .user-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .user-management-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .search-controls input,
    .search-controls select {
        width: 100%;
    }
    
    .permission-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

.payslip-controls,
.esi-controls,
.pf-controls,
.ff-controls,
.bonus-controls,
.bank-upload-controls {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.payslip-controls .form-group,
.esi-controls .form-group,
.pf-controls .form-group,
.ff-controls .form-group,
.bonus-controls .form-group,
.bank-upload-controls .form-group {
    margin-bottom: 15px;
}

.payslip-controls label,
.esi-controls label,
.pf-controls label,
.ff-controls label,
.bonus-controls label,
.bank-upload-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.payslip-controls input,
.payslip-controls select,
.esi-controls input,
.esi-controls select,
.pf-controls input,
.pf-controls select,
.ff-controls input,
.ff-controls select,
.bonus-controls input,
.bonus-controls select,
.bank-upload-controls input,
.bank-upload-controls select {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.payslip-controls input:focus,
.payslip-controls select:focus,
.esi-controls input:focus,
.esi-controls select:focus,
.pf-controls input:focus,
.pf-controls select:focus,
.ff-controls input:focus,
.ff-controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.form-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.form-actions button:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.form-actions button:not(:first-child) {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.form-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.form-actions button:first-child:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.payslip-preview,
.statement-preview,
.settlement-preview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 200px;
    position: relative;
}

.payslip-preview:empty:after,
.statement-preview:empty:after,
.settlement-preview:empty:after {
    content: 'Preview will appear here after generation';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-style: italic;
    height: 180px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

/* Employee Form Styles */
.employee-form {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    align-items: end;
}

/* Two column layout for certain rows */
.form-row.two-column {
    grid-template-columns: repeat(2, 1fr);
}

/* Three column layout for certain rows */
.form-row.three-column {
    grid-template-columns: repeat(3, 1fr);
}

/* Full width for single items */
.form-row.full-width {
    grid-template-columns: 1fr;
}

.form-group {
    margin-bottom: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 4px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group input,
.form-group select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    background: white;
    height: 36px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    height: auto;
    margin-right: 8px;
}

.form-group.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-start;
}

.form-group.checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    white-space: nowrap;
    font-size: 13px;
}

.form-group.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* File input styling */
.form-group input[type="file"] {
    padding: 6px;
    font-size: 13px;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .form-row,
    .form-row.two-column,
    .form-row.three-column {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .employee-form {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .form-row,
    .form-row.two-column,
    .form-row.three-column {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}

.form-actions button {
    width: auto;
    padding: 6px 16px;
    font-size: 13px;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #1e3a8a;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.data-table tr:hover {
    background-color: #f7fafc;
}

.data-table input {
    width: 80px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

/* Salary Table Print Styles */
#salaryTable {
    font-size: 11px;
}

#salaryTable {
    table-layout: fixed;
    width: 100%;
}

#salaryTable th {
    font-size: 10px;
    padding: 6px 2px;
    text-align: center;
    white-space: normal;
    line-height: 1.1;
}

#salaryTable td {
    font-size: 10px;
    padding: 4px 2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific column width adjustments */
#salaryTable th:nth-child(1),
#salaryTable td:nth-child(1) { /* S.No */
    width: 3%;
    min-width: 30px;
}

#salaryTable th:nth-child(2),
#salaryTable td:nth-child(2) { /* Employee Code */
    width: 6%;
    min-width: 60px;
}

#salaryTable th:nth-child(3),
#salaryTable td:nth-child(3) { /* Employee Name */
    width: 10%;
    min-width: 90px;
    text-align: left;
    white-space: normal;
}

#salaryTable th:nth-child(4),
#salaryTable td:nth-child(4) { /* Designation */
    width: 8%;
    min-width: 70px;
    text-align: left;
    white-space: normal;
}

#salaryTable th:nth-child(5),
#salaryTable td:nth-child(5), /* Present Days */
#salaryTable th:nth-child(6),
#salaryTable td:nth-child(6), /* Absent Days */
#salaryTable th:nth-child(7),
#salaryTable td:nth-child(7), /* ESI Days */
#salaryTable th:nth-child(8),
#salaryTable td:nth-child(8) { /* PH Days */
    width: 4%;
    min-width: 35px;
}

#salaryTable th:nth-child(9),
#salaryTable td:nth-child(9) { /* OT Hours */
    width: 4%;
    min-width: 40px;
}

#salaryTable th:nth-child(10),
#salaryTable td:nth-child(10), /* Basic */
#salaryTable th:nth-child(11),
#salaryTable td:nth-child(11), /* Allowance */
#salaryTable th:nth-child(12),
#salaryTable td:nth-child(12) { /* Total */
    width: 6%;
    min-width: 55px;
}

#salaryTable th:nth-child(13),
#salaryTable td:nth-child(13), /* PH Amount */
#salaryTable th:nth-child(14),
#salaryTable td:nth-child(14), /* OT Amount */
#salaryTable th:nth-child(15),
#salaryTable td:nth-child(15) { /* Attendance Bonus */
    width: 5%;
    min-width: 45px;
}

#salaryTable th:nth-child(16),
#salaryTable td:nth-child(16), /* PF Deduction */
#salaryTable th:nth-child(17),
#salaryTable td:nth-child(17), /* ESI Deduction */
#salaryTable th:nth-child(18),
#salaryTable td:nth-child(18) { /* Professional Tax */
    width: 5%;
    min-width: 45px;
}

#salaryTable th:nth-child(19),
#salaryTable td:nth-child(19) { /* Net Pay */
    width: 7%;
    min-width: 60px;
    font-weight: bold;
}

/* Directory Actions */
.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.directory-actions {
    display: flex;
    gap: 10px;
}

.directory-actions button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.delete-bulk-btn {
    background: #c53030 !important;
    color: white !important;
    border: 1px solid #9b2c2c !important;
}

.delete-bulk-btn:hover {
    background: #9b2c2c !important;
    transform: translateY(-1px);
}

/* Salary Statement Filters */
.salary-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.salary-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.salary-actions .salary-tabs {
    display: flex;
    gap: 5px;
}

.salary-actions .download-actions {
    display: flex;
    gap: 10px;
}

.salary-actions button,
.download-actions button {
    width: auto;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.salary-actions button:hover,
.download-actions button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: white;
    transform: none;
    box-shadow: none;
}

.salary-actions .tab-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.salary-actions .tab-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.salary-actions .tab-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Data Entry Styles */
.month-selector {
    margin-bottom: 20px;
}

.data-entry-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-entry-actions {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.data-entry-actions button {
    width: auto;
    padding: 12px 30px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.data-entry-actions button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: white;
    transform: none;
    box-shadow: none;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup.active {
    display: flex;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.popup-content h3 {
    margin-bottom: 20px;
    color: #4a5568;
}

.popup-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.popup-content button {
    width: auto;
    padding: 10px 20px;
    margin-right: 10px;
}

/* Download Styles */
.payslip-controls,
.esi-controls,
.pf-controls,
.ff-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.payslip-preview,
.statement-preview,
.settlement-preview {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-top: 20px;
}

/* Increment and Bonus Lists */
.increment-list,
.bonus-list {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.increment-controls,
.bonus-controls {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: auto;
}

.edit-btn {
    background: #4299e1;
    color: white;
}

.delete-btn {
    background: #e53e3e;
    color: white;
}

.delete-permanent-btn {
    background: #c53030;
    color: white;
    border: 1px solid #9b2c2c;
}

.delete-permanent-btn:hover {
    background: #9b2c2c;
}

.status-btn {
    background: #48bb78;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 8px 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .salary-filters {
        grid-template-columns: 1fr;
    }

    .page-tabs,
    .download-tabs {
        flex-wrap: wrap;
    }

    .directory-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .directory-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .content-page {
        padding: 15px;
    }

    .page-header {
        padding: 15px;
    }

    .employee-form {
        padding: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .salary-actions {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .salary-actions .salary-tabs {
        justify-content: center;
    }

    .salary-actions .download-actions {
        justify-content: center;
    }

    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .page-header,
    .form-actions,
    .directory-actions,
    .salary-actions,
    .data-entry-actions {
        display: none !important;
    }

    .content-page {
        padding: 0;
        margin: 0;
        max-width: none;
    }

    .table-container {
        box-shadow: none;
        border: 1px solid #000;
    }

    .data-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    /* Salary Table Print Optimization */
    #salaryTable {
        font-size: 9px;
        width: 100%;
        page-break-inside: avoid;
        table-layout: fixed;
    }

    #salaryTable th {
        font-size: 8px;
        padding: 4px 2px;
        border: 1px solid #000;
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    #salaryTable td {
        font-size: 8px;
        padding: 3px 2px;
        border: 1px solid #000;
    }

    /* Maintain column widths in print */
    #salaryTable th:nth-child(1), #salaryTable td:nth-child(1) { width: 3%; }
    #salaryTable th:nth-child(2), #salaryTable td:nth-child(2) { width: 6%; }
    #salaryTable th:nth-child(3), #salaryTable td:nth-child(3) { width: 10%; }
    #salaryTable th:nth-child(4), #salaryTable td:nth-child(4) { width: 8%; }
    #salaryTable th:nth-child(5), #salaryTable td:nth-child(5),
    #salaryTable th:nth-child(6), #salaryTable td:nth-child(6),
    #salaryTable th:nth-child(7), #salaryTable td:nth-child(7),
    #salaryTable th:nth-child(8), #salaryTable td:nth-child(8) { width: 4%; }
    #salaryTable th:nth-child(9), #salaryTable td:nth-child(9) { width: 4%; }
    #salaryTable th:nth-child(10), #salaryTable td:nth-child(10),
    #salaryTable th:nth-child(11), #salaryTable td:nth-child(11),
    #salaryTable th:nth-child(12), #salaryTable td:nth-child(12) { width: 6%; }
    #salaryTable th:nth-child(13), #salaryTable td:nth-child(13),
    #salaryTable th:nth-child(14), #salaryTable td:nth-child(14),
    #salaryTable th:nth-child(15), #salaryTable td:nth-child(15),
    #salaryTable th:nth-child(16), #salaryTable td:nth-child(16),
    #salaryTable th:nth-child(17), #salaryTable td:nth-child(17),
    #salaryTable th:nth-child(18), #salaryTable td:nth-child(18) { width: 5%; }
    #salaryTable th:nth-child(19), #salaryTable td:nth-child(19) { width: 7%; }

    @page {
        size: A4 landscape;
        margin: 0.25in;
    }
}

/* Payslip Styles */
.payslip-container {
    margin-bottom: 30px;
}

.payslip {
    background: white;
    border: 1px solid #ddd;
    padding: 30px;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
}

.payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.company-info h2 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.company-info p {
    margin: 5px 0 0 0;
    color: #666;
}

.company-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    max-width: 70px;
    max-height: 70px;
}

.logo-placeholder {
    width: 80px;
    height: 60px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
}

.employee-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-item {
    flex: 1;
    display: flex;
}

.info-item label {
    font-weight: bold;
    width: 120px;
    color: #333;
}

.info-item span {
    color: #666;
}

.payslip-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.payslip-table th,
.payslip-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.payslip-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

.payslip-table .total-row {
    background-color: #f9f9f9;
    font-weight: bold;
}

.net-pay {
    border: 2px solid #333;
    padding: 15px;
    margin: 20px 0;
    background-color: #f9f9f9;
}

.net-pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.net-pay label {
    font-weight: bold;
    font-size: 14px;
}

.net-pay span {
    font-weight: bold;
    font-size: 16px;
    color: #2d5a27;
}

.net-pay-words {
    display: flex;
    flex-direction: column;
}

.net-pay-words label {
    font-weight: bold;
    margin-bottom: 5px;
}

.payslip-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 10px;
}

/* Statement Styles */
.statement-preview {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.statement-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.statement-header h3 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
}

.statement-header p {
    margin: 5px 0;
    color: #4a5568;
    font-size: 14px;
}

.statement-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.statement-table th,
.statement-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 12px;
}

.statement-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.statement-table .total-row {
    background-color: #f0f0f0;
    font-weight: bold;
}

.statement-info {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 4px solid #667eea;
}

/* Settlement Styles */
.settlement-preview {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.settlement-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.settlement-section {
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
}

.settlement-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

.detail-row.total {
    border-top: 2px solid #333;
    margin-top: 15px;
    padding-top: 10px;
    font-size: 16px;
}

.detail-row label {
    font-weight: 500;
    color: #4a5568;
}

.detail-row span {
    color: #2d3748;
}

/* Bulk Operations */
.bulk-operations {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.bulk-operations h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4a5568;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-badge.resigned {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Summary Styles */
.summary-details {
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-row.total {
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    background-color: #f7fafc;
    padding: 15px 0;
    margin-top: 10px;
}

.summary-row label {
    font-weight: 500;
    color: #4a5568;
}

.summary-row span {
    color: #2d3748;
    font-weight: 500;
}

/* Download Button */
.download-btn {
    background: #38a169;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
    width: auto;
}

.download-btn:hover {
    background: #2f855a;
    transform: translateY(-1px);
}

/* Responsive adjustments for payslips */
@media (max-width: 768px) {
    .payslip {
        padding: 15px;
        font-size: 11px;
    }
    
    .payslip-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item label {
        width: auto;
        margin-bottom: 2px;
    }
    
    .net-pay-row {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .settlement-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bulk-buttons {
        flex-direction: column;
    }
    
    .bulk-buttons button {
        width: 100%;
    }
}

/* Print Styles for Payslips */
@media print {
    .payslip-container {
        margin: 0;
        padding: 0;
    }
    
    .payslip {
        border: none;
        box-shadow: none;
        page-break-after: always;
        margin: 0;
        padding: 20px;
    }
    
    .payslip:last-child {
        page-break-after: avoid;
    }
    
    .download-btn {
        display: none;
    }
}

/* Bulk Upload Styles */
.bulk-upload-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-instructions {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.upload-instructions h4 {
    margin-bottom: 15px;
    color: #4a5568;
}

.upload-instructions ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.upload-instructions li {
    margin-bottom: 8px;
    color: #4a5568;
}

.template-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.template-actions button {
    padding: 10px 20px;
    width: auto;
    background: #4299e1;
    color: white;
}

.template-actions button:hover {
    background: #3182ce;
}

.file-upload-section {
    margin-bottom: 25px;
}

.file-upload-section h4 {
    margin-bottom: 15px;
    color: #4a5568;
}

.file-input-container {
    position: relative;
    display: inline-block;
}

#bulkUploadFile {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    border: 2px dashed transparent;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    border-color: #a0aec0;
}

.file-input-label i {
    margin-right: 10px;
    font-size: 18px;
}

.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #4a5568;
    font-weight: 500;
}

.bulk-preview {
    border-top: 2px solid #e2e8f0;
    padding-top: 25px;
    margin-top: 25px;
}

.bulk-preview h4 {
    margin-bottom: 20px;
    color: #4a5568;
}

.preview-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.summary-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-item label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    font-size: 14px;
}

.summary-item span {
    font-size: 24px;
    font-weight: bold;
    color: #2d3748;
}

.error-list {
    background: #fed7d7;
    border: 1px solid #fc8181;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-list h5 {
    color: #742a2a;
    margin-bottom: 10px;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    color: #742a2a;
    margin-bottom: 5px;
}

.preview-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bulk-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.import-btn {
    background: #48bb78;
    color: white;
    padding: 12px 30px;
    width: auto;
}

.import-btn:hover {
    background: #38a169;
}

.import-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.clear-btn {
    background: #e53e3e;
    color: white;
    padding: 12px 30px;
    width: auto;
}

.clear-btn:hover {
    background: #c53030;
}

/* Format Modal Styles */
.format-info {
    max-height: 600px;
    overflow-y: auto;
}

.format-table {
    margin: 15px 0;
    overflow-x: auto;
}

.format-example {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.format-example th,
.format-example td {
    border: 1px solid #e2e8f0;
    padding: 8px 4px;
    text-align: left;
    white-space: nowrap;
}

.format-example th {
    background: #f7fafc;
    font-weight: bold;
    color: #4a5568;
}

.format-example td {
    background: #fefefe;
    color: #2d3748;
}

.format-notes {
    margin-top: 20px;
    padding: 15px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
}

.format-notes h4 {
    color: #22543d;
    margin-bottom: 10px;
}

.format-notes ul {
    margin: 0;
    padding-left: 20px;
}

.format-notes li {
    color: #22543d;
    margin-bottom: 5px;
}

.format-notes strong {
    color: #1a202c;
}

/* Row status indicators */
.preview-row-valid {
    background-color: #f0fff4;
}

.preview-row-error {
    background-color: #fed7d7;
}

.preview-row-warning {
    background-color: #fefcbf;
}

/* Responsive design for bulk upload */
@media (max-width: 768px) {
    .template-actions {
        flex-direction: column;
    }
    
    .template-actions button {
        width: 100%;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .bulk-actions button {
        width: 100%;
    }
    
    .preview-summary {
        grid-template-columns: 1fr;
    }
    
    .format-table {
        font-size: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

/* Backup Management Styles */
#backupDialog {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#backupDialog h3 {
    color: #4a5568;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

#backupDialog h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 16px;
}

#backupDialog button {
    transition: all 0.2s ease;
    font-weight: 500;
}

#backupDialog button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#backupDialog .backup-item {
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 5px;
}

#backupDialog .backup-item:hover {
    background: #e9ecef;
}

#backupDialog select, #backupDialog input[type="checkbox"] {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}

#backupDialog select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.backup-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.error {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 5px;
}

.success {
    color: #48bb78;
    font-size: 14px;
    margin-top: 5px;
}

/* Control Grid Layout for Download Forms */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.control-grid .form-group {
    margin-bottom: 0;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .control-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}