/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.hidden {
    display: none !important;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.remember-me label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.remember-me span {
    color: #555;
    font-weight: 500;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.demo-credentials p {
    margin: 5px 0;
}

/* Dashboard Styles */
.dashboard {
    min-height: 100vh;
    background: #f5f7fa;
}

.dashboard-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left h1 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.header-left h1 i {
    color: #667eea;
    margin-right: 10px;
}

.user-info {
    color: #666;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.currency-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.currency-btn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-btn:hover {
    background: #218838;
}

.currency-btn.eur-active {
    background: #17a2b8;
}

.currency-btn.eur-active:hover {
    background: #138496;
}

.exchange-info {
    color: #666;
    font-size: 0.75rem;
    white-space: nowrap;
}

.cost-per-hour {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cost-per-hour label {
    color: #555;
    font-weight: 500;
}

.cost-per-hour input {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    width: 100px;
}

.manage-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-btn:hover {
    background: #0056b3;
}

.logout-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #c82333;
}

.manage-managers-btn {
    padding: 10px 20px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-managers-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 30px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-controls h2 {
    color: #333;
    font-size: 1.5rem;
    min-width: 200px;
    text-align: center;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-import {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #17a2b8;
    color: white;
}

.btn-import:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-template {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-template:hover {
    background: #5a32a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

.btn-template:active {
    transform: translateY(0);
}

.btn-download {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.time-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.time-table th {
    background: #667eea;
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-table th:last-child {
    border-right: none;
}

.employee-column {
    min-width: 150px;
    text-align: left !important;
    position: sticky;
    left: 0;
    background: #667eea;
    z-index: 11;
}

.cph-column {
    min-width: 100px;
}

.total-column, .total-cost-column {
    min-width: 100px;
}

/* Bold separator after total cost column (before dates) */
.total-cost-column,
.net-salary-column,
.column-separator {
    border-right: 2px solid #000 !important;
}

.net-salary-column {
    min-width: 100px;
}

.cph-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    background: #fff3cd;
}

.cph-input:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.date-header {
    min-width: 70px;
    font-size: 0.7rem;
    padding: 10px 5px !important;
}

.time-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e1e5e9;
    border-right: 1px solid #e1e5e9;
    text-align: center;
}

.time-table td:last-child {
    border-right: none;
}

.time-table tr:last-child td {
    border-bottom: none;
}

/* Week separator - bold border after Friday */
.time-table th.week-end,
.time-table td.week-end {
    border-right: 2px solid #000 !important;
}

.time-table tr:nth-child(even) {
    background: #f8f9fa;
}

.time-table tr:hover {
    background: #e3f2fd;
}

.time-table td.employee-name-cell {
    position: sticky;
    left: 0;
    background: white;
    font-weight: 600;
    z-index: 9;
}

.time-table tr:nth-child(even) td.employee-name-cell {
    background: #f8f9fa;
}

.time-table tr:hover td.employee-name-cell {
    background: #e3f2fd;
}

/* Summary Row Styles */
.summary-row {
    background: #f0f4ff !important;
    border-top: 3px solid #667eea !important;
    font-weight: 700;
}

.summary-row:hover {
    background: #e8efff !important;
}

.summary-cell {
    padding: 15px 10px !important;
    text-align: center !important;
    background: #f0f4ff !important;
    font-size: 1rem;
}

.summary-row .employee-name-cell {
    background: #f0f4ff !important;
    position: sticky;
    left: 0;
    z-index: 9;
    font-size: 1.05rem;
    color: #667eea;
}

.summary-row:hover .employee-name-cell {
    background: #e8efff !important;
}

/* Editable Cells */
.time-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Empty cell with OUT placeholder */
.time-input.empty-cell {
    background: #f8d7da;
    border-color: #f5c6cb;
    font-weight: 600;
}

.time-input.empty-cell::placeholder {
    color: #721c24;
    font-weight: 600;
    opacity: 1;
}

.time-input:focus.empty-cell {
    background: white;
    border-color: #667eea;
}

.employee-name {
    font-weight: 600;
    color: #333;
}

.total-hours, .total-cost {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c82333;
}

/* Inline Edit Styles */
.inline-edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #4CAF50;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fffef0;
    box-sizing: border-box;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #45a049;
    background: #fffff0;
}

.editable-cell {
    position: relative;
}

.contract-row[data-editing="true"] {
    background-color: #f0f8ff !important;
}

.btn-edit {
    color: #4CAF50;
}

.btn-save {
    color: #4CAF50;
}

.btn-save:hover {
    color: #45a049;
}

.btn-cancel {
    color: #f44336;
}

.btn-cancel:hover {
    color: #da190b;
}

.actions-cell {
    white-space: nowrap;
}

/* Bank Account Copy Button */
.bank-account-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bank-account-number {
    flex: 1;
}

.btn-copy {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: #f0f0f0;
    color: #2196F3;
    transform: scale(1.1);
}

.btn-copy:active {
    transform: scale(0.95);
}

.bank-account-cell {
    min-width: 180px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.close-btn:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Mass Edit Button in Table Header */
.mass-edit-btn {
    margin-top: 5px;
    padding: 3px 6px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.mass-edit-btn:hover {
    background: #218838;
}

.mass-edit-btn i {
    margin-right: 3px;
}

/* Quick Fill Button in Table Header (Superadmin) */
.quick-fill-btn {
    margin-top: 5px;
    padding: 3px 6px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.quick-fill-btn:hover {
    background: #ffb300;
}

.quick-fill-btn i {
    margin-right: 3px;
}

/* Currency Toggle Button in Table Header */
.currency-toggle-btn {
    margin-top: 5px;
    padding: 3px 8px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.currency-toggle-btn:hover {
    background: #218838;
}

.currency-toggle-btn i {
    margin-right: 3px;
}

/* Mass Edit Modal Specific Styles */
.mass-edit-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.mass-edit-container {
    margin: 20px 0;
}

.mass-edit-info {
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 6px;
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.mass-edit-info i {
    margin-right: 8px;
}

/* Fill All Section in Mass Edit */
.fill-all-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.fill-all-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fill-all-controls label {
    font-weight: 600;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fill-all-controls label i {
    color: #ffc107;
}

.fill-all-controls input {
    padding: 8px 12px;
    border: 2px solid #ffc107;
    border-radius: 6px;
    font-size: 14px;
}

.fill-all-controls input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.btn-fill-all {
    background: #ffc107;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-fill-all:hover {
    background: #ff9800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-fill-all:active {
    transform: translateY(0);
}

.btn-fill-all i {
    font-size: 14px;
}

.mass-edit-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px;
}

.mass-edit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.mass-edit-row:last-child {
    border-bottom: none;
}

.mass-edit-row label {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.mass-edit-row input {
    width: 100px;
}

/* Quick Fill Modal Specific Styles */
.quick-fill-modal {
    max-width: 450px;
}

.quick-fill-container {
    margin: 20px 0;
}

.quick-fill-info {
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 6px;
    color: #856404;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.quick-fill-info i {
    margin-right: 8px;
}

.quick-fill-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffc107;
    border-radius: 6px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
}

.quick-fill-input:focus {
    outline: none;
    border-color: #ffb300;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.help-text {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}

/* Download Report Modal Specific Styles */
.download-report-modal {
    max-width: 500px;
}

.download-report-container {
    margin: 20px 0;
}

.download-info {
    background: #d4edda;
    padding: 10px 15px;
    border-radius: 6px;
    color: #155724;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.download-info i {
    margin-right: 8px;
}

/* Manage Employees Modal Specific Styles */
.manage-employees-modal {
    max-width: 600px;
}

/* Tabs */
.manage-tabs {
    display: flex;
    border-bottom: 2px solid #e1e5e9;
    margin-bottom: 20px;
}

.manage-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.manage-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.manage-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.manage-employees-container {
    margin: 20px 0;
}

.manage-info {
    background: #e7f3ff;
    padding: 10px 15px;
    border-radius: 6px;
    color: #004085;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.manage-info i {
    margin-right: 8px;
}

.employee-selection-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.select-all-btn, .deselect-all-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.select-all-btn {
    background: #28a745;
    color: white;
}

.select-all-btn:hover {
    background: #218838;
}

.deselect-all-btn {
    background: #6c757d;
    color: white;
}

.deselect-all-btn:hover {
    background: #5a6268;
}

.employee-checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px;
}

.employee-checkbox-item {
    padding: 10px;
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.2s ease;
}

.employee-checkbox-item:last-child {
    border-bottom: none;
}

.employee-checkbox-item:hover {
    background: #f8f9fa;
}

.employee-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.employee-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
}

.employee-checkbox-label {
    font-weight: 500;
    color: #333;
}

/* Bulk Add Styles */
.bulk-add-container {
    margin: 20px 0;
}

.bulk-add-info {
    background: #d1ecf1;
    padding: 10px 15px;
    border-radius: 6px;
    color: #0c5460;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.bulk-add-info i {
    margin-right: 8px;
}

/* Single Employee Add */
.single-add-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.single-add-section h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 15px;
}

.single-add-section h4 i {
    color: #667eea;
    margin-right: 8px;
}

.single-add-form {
    display: flex;
    gap: 10px;
}

.single-employee-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
}

.single-employee-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-add-single {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-add-single:hover {
    background: #5a6fd8;
}

.upload-section, .paste-section {
    margin-bottom: 20px;
}

.upload-section h4, .paste-section h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 10px;
}

.csv-input {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed #007bff;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.btn-upload {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: #0056b3;
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-weight: 600;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e1e5e9;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.employee-list-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.employee-list-textarea:focus {
    outline: none;
    border-color: #007bff;
}

.preview-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.preview-section h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 10px;
}

.preview-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.preview-item {
    padding: 5px 10px;
    border-bottom: 1px solid #e1e5e9;
    font-size: 0.9rem;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item.duplicate {
    color: #dc3545;
    font-style: italic;
}

.preview-item.new {
    color: #28a745;
}

/* CSV Import Modal */
.csv-import-modal {
    max-width: 700px;
}

.csv-import-container {
    margin: 20px 0;
}

.import-info {
    background: #d1ecf1;
    padding: 10px 15px;
    border-radius: 6px;
    color: #0c5460;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.import-info i {
    margin-right: 8px;
}

.csv-preview-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 15px;
}

.csv-preview-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.csv-preview-item:last-child {
    border-bottom: none;
}

.csv-preview-item strong {
    color: #667eea;
    margin-right: 10px;
}

.import-options {
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    margin-top: 15px;
}

.import-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.import-options input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.employee-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Salary Calculator Button in Table Header */
.salary-calc-btn {
    margin-top: 5px;
    padding: 3px 8px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.salary-calc-btn:hover {
    background: #138496;
}

.salary-calc-btn i {
    margin-right: 3px;
}

/* Salary Calculator Modal */
.salary-calculator-modal {
    max-width: 550px;
}

.salary-calculator-container {
    margin: 20px 0;
}

.calculator-info {
    background: #d1ecf1;
    padding: 10px 15px;
    border-radius: 6px;
    color: #0c5460;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.calculator-info i {
    margin-right: 8px;
}

.calculator-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
}

.calculator-input:focus {
    outline: none;
    border-color: #17a2b8;
    box-shadow: 0 0 0 2px rgba(23, 162, 184, 0.2);
}

.btn-calculate {
    width: 100%;
    padding: 12px 20px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 20px 0;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-calculate:hover {
    background: #138496;
}

.salary-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #17a2b8;
}

.salary-results h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row span {
    color: #555;
}

.result-row strong {
    color: #333;
    font-size: 1.05rem;
}

.result-row.highlight {
    background: #e7f3ff;
    font-weight: 600;
    margin-top: 10px;
}

.result-row.sub-row {
    padding-left: 30px;
    font-size: 0.95rem;
}

.result-row.sub-row span {
    color: #666;
}

.result-row.final {
    background: #d4edda;
    font-weight: 700;
    margin-top: 10px;
    padding: 15px;
    border-radius: 6px;
}

.result-row.final span {
    color: #155724;
    font-size: 1.1rem;
}

.result-row.final strong {
    color: #155724;
    font-size: 1.3rem;
}

/* Toggle Details Button */
.toggle-details-btn {
    width: 100%;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #495057;
    margin: 15px 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.toggle-details-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.toggle-details-btn i {
    transition: transform 0.3s ease;
}

.toggle-details-btn.expanded i {
    transform: rotate(180deg);
}

.calculation-details {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Manage Managers Modal */
.manage-managers-modal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.managers-container {
    padding: 20px;
}

.add-manager-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.add-manager-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #555;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.manager-input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.manager-input:focus {
    outline: none;
    border-color: #9b59b6;
}

.permissions-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.permissions-section h5 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.permission-checkbox:hover {
    background: #f0f0f0;
}

.permission-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-checkbox span {
    color: #555;
    font-size: 0.9rem;
}

.permission-checkbox.module-permission {
    background: #e3f2fd;
    border: 2px solid #2196F3;
}

.permission-checkbox.module-permission:hover {
    background: #bbdefb;
}

.permission-checkbox.module-permission span {
    color: #1976d2;
    font-weight: 600;
}

.permission-checkbox.module-permission i {
    color: #2196F3;
}

.btn-create-manager {
    width: 100%;
    padding: 12px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-create-manager:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

.existing-managers-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.managers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.manager-item {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.manager-item:hover {
    border-color: #9b59b6;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.2);
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.manager-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.manager-info i {
    color: #9b59b6;
    font-size: 1.2rem;
}

.manager-username {
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

.manager-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-change-password {
    padding: 6px 12px;
    background: #f0ad4e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.btn-change-password:hover {
    background: #ec971f;
}

.btn-edit-manager {
    padding: 6px 12px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.btn-edit-manager:hover {
    background: #138496;
}

.btn-delete-manager {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.btn-delete-manager:hover {
    background: #c82333;
}

.manager-permissions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.permission-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #2e7d32;
}

.permission-badge i {
    color: #4caf50;
}

.permission-badge.disabled {
    background: #ffebee;
    color: #c62828;
}

.permission-badge.disabled i {
    color: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-controls button {
        width: 100%;
        justify-content: center;
    }
    
    .mass-edit-modal {
        max-width: 95%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .manager-permissions {
        grid-template-columns: 1fr;
    }
}

/* ========== MODULE SELECTION PAGE STYLES ========== */
.module-selection {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.module-header {
    background: rgba(255, 255, 255, 0.98);
    padding: 20px 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.module-header .header-left h1 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 5px;
}

.module-header .header-left h1 i {
    margin-right: 10px;
}

.modules-container {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

.module-box {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.module-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-box:hover::before {
    transform: scaleX(1);
}

.module-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.module-box:active {
    transform: translateY(-5px);
}

.module-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.module-box:hover .module-icon {
    transform: scale(1.1);
}

.module-box h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.module-box p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.module-arrow {
    font-size: 1.5rem;
    color: #667eea;
    opacity: 0;
    transition: all 0.3s ease;
}

.module-box:hover .module-arrow {
    opacity: 1;
    transform: translateX(10px);
}

.module-coming-soon {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    cursor: not-allowed;
    opacity: 0.7;
}

.module-coming-soon:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.module-coming-soon::before {
    display: none;
}

.module-coming-soon .module-icon {
    color: #adb5bd;
}

.module-coming-soon h2 {
    color: #6c757d;
}

.module-coming-soon .module-arrow {
    display: none;
}

/* Back to Modules Button */
.back-btn {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(-5px);
}

.back-btn i {
    font-size: 1rem;
}

/* Responsive Design for Module Selection */
@media (max-width: 768px) {
    .modules-container {
        padding: 30px 20px;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .module-header {
        padding: 15px 20px;
    }
    
    .module-header .header-left h1 {
        font-size: 1.4rem;
    }
    
    .back-btn {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ========== SAVE INDICATOR ========== */
.save-indicator {
    position: fixed;
    top: 80px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10000;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.save-indicator.hidden {
    opacity: 0;
    transform: translateX(100px);
    pointer-events: none;
}

.save-indicator.saving {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.save-indicator.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.save-indicator i {
    font-size: 1.2rem;
    animation: fadeIn 0.3s ease;
}

.save-indicator.saving i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Save Indicator */
@media (max-width: 768px) {
    .save-indicator {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        justify-content: center;
    }
}

/* ========== CONTRACTS PAGE ========== */
.contracts-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.contracts-main-content {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Search Bar */
.contacts-search-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.contacts-search-bar i {
    color: #667eea;
    font-size: 1.2rem;
}

.contacts-search-bar input {
    flex: 1;
    border: none;
    font-size: 1rem;
    outline: none;
    padding: 8px 0;
}

.contacts-search-bar input::placeholder {
    color: #adb5bd;
}

/* Contacts Grid */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.contact-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
}

.contact-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.contact-position {
    color: #667eea;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
}

.contact-info-item i {
    color: #667eea;
    width: 20px;
}

.contact-info-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.contact-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.contact-btn {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-btn-edit {
    background: #f1f3f5;
    color: #667eea;
}

.contact-btn-edit:hover {
    background: #667eea;
    color: white;
}

.contact-btn-delete {
    background: #f8d7da;
    color: #dc3545;
}

.contact-btn-delete:hover {
    background: #dc3545;
    color: white;
}

/* Empty State */
.contacts-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #adb5bd;
}

.contacts-empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
}

.contacts-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #6c757d;
}

.contacts-empty-state p {
    font-size: 1rem;
}

/* Responsive Design for Contracts */
@media (max-width: 768px) {
    .contracts-main-content {
        padding: 20px;
    }
    
    .contracts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contracts-search-bar {
        padding: 12px 15px;
    }
}

/* ========== EMPLOYEES DATABASE STATUS BADGES ========== */

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(56, 239, 125, 0.3);
}

.status-fired {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 87, 108, 0.3);
}

.status-left {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(25, 84, 123, 0.3);
}

/* ========== STATUS SUMMARY TABLE ========== */
.status-summary-container {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.status-summary-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-summary-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-summary-table tbody td {
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    vertical-align: middle;
}

.status-summary-table tbody td i {
    font-size: 24px;
    margin-right: 10px;
}

.summary-active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.summary-fired {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.summary-left {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.summary-label {
    display: block;
    font-size: 14px;
    margin-top: 5px;
    opacity: 0.9;
}

.summary-count {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-summary-table tfoot td {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.status-summary-table tfoot td i {
    font-size: 20px;
    margin-right: 8px;
}

.summary-total .summary-label {
    display: inline-block;
    font-size: 16px;
    margin: 0 15px;
}

.summary-total .summary-count {
    display: inline-block;
    font-size: 28px;
    margin: 0;
}

/* Status change button in Actions column */
.btn-status-change {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 3px;
}

.btn-status-change:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Ensure confirm modal is always on top */
#confirmModal {
    z-index: 3000;
}

/* Lightweight toast notifications */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 240px;
    max-width: 360px;
    background: #2c3e50;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.95;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast.success { background: linear-gradient(135deg, #00b09b, #96c93d); }
.toast.error { background: linear-gradient(135deg, #ff416c, #ff4b2b); }
.toast.info { background: linear-gradient(135deg, #667eea, #764ba2); }

.toast.hide { opacity: 0; transform: translateY(10px); }

/* ========== EMPLOYEES DATABASE TABLE ENHANCEMENTS ========== */

/* Auto-fit columns to content */
.employees-db-table {
    width: 100%;
    table-layout: auto;
}

.employees-db-table td,
.employees-db-table th {
    white-space: nowrap;
    padding: 12px 15px;
}

/* Sortable column headers */
.employees-db-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.employees-db-table th.sortable:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.employees-db-table th.sortable i {
    margin-left: 5px;
    font-size: 11px;
    opacity: 0.7;
}

.employees-db-table th.sortable:hover i {
    opacity: 1;
}

/* Status dropdown in table */
.status-dropdown {
    padding: 6px 10px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 110px;
    outline: none;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    /* Ensure custom styling takes precedence over native select UI */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

/* Color based on selected value */
.status-dropdown[data-status="Active"] {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    border-color: #11998e !important;
}

.status-dropdown[data-status="Fired"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border-color: #f5576c !important;
}

.status-dropdown[data-status="Left"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    border-color: #4facfe !important;
}

.status-dropdown:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-dropdown:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Style dropdown options */
.status-dropdown option {
    background: white;
    color: #333;
    font-weight: 600;
    padding: 8px;
}

.status-dropdown option[value="Active"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-dropdown option[value="Fired"] {
    background: #ffebee;
    color: #c62828;
}

.status-dropdown option[value="Left"] {
    background: #e3f2fd;
    color: #1565c0;
}

/* ========== INVOICES MODULE STYLES ========== */

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

.line-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    margin: 0 2px;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #5568d3;
}

.btn-icon.btn-danger {
    color: #ef4444;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-badge.status-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.status-badge.status-overdue {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

#invoicePreviewContent {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media print {
    #invoicePreviewContent {
        box-shadow: none;
    }
}

/* ========== COMPANY TEMPLATES STYLES ========== */

.company-templates-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.company-template-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.company-template-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.company-template-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.template-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.template-box-header i {
    font-size: 1.5rem;
}

.template-box-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.template-box-content {
    margin-bottom: 15px;
    font-size: 0.9rem;
    opacity: 0.95;
    line-height: 1.6;
}

.template-box-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.template-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}

.template-list-item h4 {
    color: #374151;
    font-size: 1rem;
}