/* ============================================
   MODERN ADMIN PANEL CSS
   Inspired by the Shift Management design
   ============================================ */

/* ===== 1. BASE & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ===== 2. MAIN LAYOUT (Flexbox Sidebar + Content) ===== */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar / Navbar */
.navbar-container {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #170088 0%, #2e1b1b 50%, #0c1023 100%);
    color: white;
    box-shadow: 4px 0 25px rgba(102, 126, 234, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo {
    padding: 22px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo img {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-nav nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-link:hover i {
    color: #fff;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left-color: #fff;
}

.sidebar-link.active i {
    color: #fff;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 20px;
}

.sidebar-logout {
    color: rgba(255, 255, 255, 0.65);
}

.sidebar-logout i {
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5;
}

.sidebar-logout:hover i {
    color: #fca5a5;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    background: rgba(0, 0, 0, 0.08);
}

/* Main Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

/* Centered Container */
.center-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto;
}

/* ===== 3. TYPOGRAPHY ===== */
h2 {
    color: white;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

h3, h4, h5, h6 {
    color: #333;
}

/* ===== 4. COLOR PALETTE (CSS Variables) ===== */
:root {
    /* Primary Colors */
    --primary-purple: #667eea;
    --primary-dark-purple: #764ba2;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Status Colors */
    --success-green: #10b981;
    --success-dark: #059669;
    --danger-red: #ef4444;
    --warning-orange: #f59e0b;
    --info-blue: #3b82f6;
    
    /* Background Colors */
    --sidebar-bg: #2c3e50;
    --card-bg: white;
    --glass-bg: rgba(255, 255, 255, 0.95);
    
    /* Border Colors */
    --border-light: #e1e5e9;
    --border-medium: #cbd5e0;
    
    /* Text Colors */
    --text-dark: #333;
    --text-medium: #555;
    --text-light: #888;
    --text-muted: #94a3b8;
    
    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-purple: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ===== 5. GLASSMORPHISM CONTAINER ===== */
.dashboard-container,
.report-container,
.form-container {
    background: var(--glass-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.dashboard-container:hover,
.report-container:hover,
.form-container:hover {
    transform: translateY(-5px);
}

/* ===== 6. HEADER SECTION ===== */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
    gap: 15px;
}

.header-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.header-title i {
    color: var(--primary-purple);
    margin-right: 10px;
}

/* ===== 7. BADGES ===== */
.total-badge,
.period-badge,
.payroll-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-purple);
}

.success-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

/* ===== 8. BUTTONS ===== */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ===== 9. FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    color: var(--primary-purple);
    margin-right: 5px;
}

.form-group label.required:after {
    content: " *";
    color: var(--danger-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

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

.form-group input[type="time"] {
    cursor: pointer;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ===== 10. CARDS ===== */
/* Stats/Salary Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.salary-card,
.stat-card,
.balance-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.salary-card:hover,
.stat-card:hover,
.balance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

/* Card Icons */
.card-icon,
.stat-icon,
.balance-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
    color: var(--primary-purple);
}

/* Card Amounts */
.card-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.card-amount.gross { color: var(--primary-purple); }
.card-amount.net { color: var(--success-green); }
.card-amount.overtime { color: var(--warning-orange); }

.card-label {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ===== 11. TABLES ===== */
.table-wrapper {
    overflow: hidden auto;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.data-table,
.attendance-table,
.payroll-table,
.shifts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.attendance-table th,
.payroll-table th,
.shifts-table th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td,
.attendance-table td,
.payroll-table td,
.shifts-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-medium);
}

.data-table tbody tr:hover,
.attendance-table tbody tr:hover,
.payroll-table tbody tr:hover,
.shifts-table tbody tr:hover {
    background: #f5f8ff;
}

/* ===== 12. STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-active,
.status-success,
.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive,
.status-pending,
.status-draft {
    background: #fef3c7;
    color: #b45309;
}

.status-danger,
.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-info,
.status-provisional {
    background: #e0f2fe;
    color: #075985;
}

/* ===== 13. ALERTS & MESSAGES ===== */
.alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error,
.alert-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-info {
    background: #e0f2fe;
    border-left: 4px solid #3b82f6;
    color: #075985;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== 14. TWO COLUMN LAYOUT ===== */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* Info Table (Card Style Tables) */
.info-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.info-table .table-header {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-table table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
}

.info-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
    width: 50%;
}

.info-table td:last-child {
    color: var(--text-medium);
    text-align: right;
}

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

.info-table tr.highlight td {
    background: #f8fafc;
    font-weight: 600;
}

.info-table tr.highlight td:last-child {
    color: var(--success-green);
    font-size: 16px;
}

/* ===== 15. RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .cards-grid,
    .two-column-grid,
    .balance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .navbar-container {
        width: 100%;
    }
    
    .content-area {
        padding: 15px;
        justify-content: flex-start;
    }
    
    .dashboard-container {
        padding: 20px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .cards-grid,
    .two-column-grid,
    .balance-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .header-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== 16. SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===== 17. ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== 18. UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 25px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 25px; }

.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 25px; }

/* Flex Utilities */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 5px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }
.gap-4 { gap: 20px; }
.gap-5 { gap: 25px; }

/* ===== 19. BOOTSTRAP-COMPATIBLE GLASS STYLES ===== */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
}
.btn:hover { transform: translateY(-2px); }

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-purple);
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(102,126,234,0.4); }

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.btn-success:hover { box-shadow: 0 8px 25px rgba(16,185,129,0.4); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}
.btn-danger:hover { box-shadow: 0 8px 25px rgba(239,68,68,0.4); }

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}
.btn-warning:hover { box-shadow: 0 8px 25px rgba(245,158,11,0.4); }

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.btn-info:hover { box-shadow: 0 8px 25px rgba(59,130,246,0.4); }

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    box-shadow: none;
}
.btn-secondary:hover { background: #cbd5e0; }

.btn-outline-primary { background:transparent; color:var(--primary-purple); border:2px solid var(--primary-purple); }
.btn-outline-primary:hover { background:var(--primary-gradient); color:white; }

.btn-outline-secondary { background:transparent; color:#6b7280; border:2px solid #cbd5e0; }
.btn-outline-secondary:hover { background:#e2e8f0; color:#4a5568; }

.btn-outline-success { background:transparent; color:var(--success-green); border:2px solid var(--success-green); }
.btn-outline-success:hover { background:linear-gradient(135deg,#10b981 0%,#059669 100%); color:white; }

.btn-outline-danger { background:transparent; color:var(--danger-red); border:2px solid var(--danger-red); }
.btn-outline-danger:hover { background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%); color:white; }

.btn-outline-warning { background:transparent; color:var(--warning-orange); border:2px solid var(--warning-orange); }
.btn-outline-warning:hover { background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%); color:white; }

.btn-outline-info { background:transparent; color:var(--info-blue); border:2px solid var(--info-blue); }
.btn-outline-info:hover { background:linear-gradient(135deg,#3b82f6 0%,#2563eb 100%); color:white; }

.btn-close {
    width:24px; height:24px; border:none; background:transparent;
    font-size:20px; line-height:24px; text-align:center; cursor:pointer;
    color:#6b7280; border-radius:50%; padding:0;
    display:inline-flex; align-items:center; justify-content:center;
}
.btn-close:hover { background:#e2e8f0; color:#333; }
.btn-close-white { color:white; }
.btn-close-white:hover { background:rgba(255,255,255,0.2); }

/* --- Cards --- */
.card {
    background: var(--glass-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-dark);
}
.card-body { padding: 24px; }

/* --- Tables (Bootstrap-compatible) --- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th {
    background: var(--primary-gradient); color: white;
    font-weight: 600; padding: 12px; text-align: left;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.table td {
    padding: 10px 12px; border-bottom: 1px solid var(--border-light);
    color: var(--text-medium);
}
.table tbody tr:hover { background: #f5f8ff; }
.table-bordered th, .table-bordered td { border: 1px solid var(--border-light); }
.table-hover tbody tr:hover { background: #f5f8ff; }
.table-sm th, .table-sm td { padding: 6px 10px; font-size: 12px; }
.table-responsive { overflow: hidden auto; border-radius: 10px; border: 1px solid var(--border-light); -webkit-overflow-scrolling: touch; }
.table-secondary { background: #f8fafc; }

/* --- Form Controls --- */
.form-label {
    display: block; margin-bottom: 8px; font-weight: 600;
    color: var(--text-dark); font-size: 13px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.form-control, .form-select, .form-textarea {
    width: 100%; padding: 12px 15px;
    border: 2px solid var(--border-light); border-radius: 8px;
    font-size: 14px; transition: all 0.3s ease;
    background: white; font-family: inherit;
}
.form-control:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.form-select { appearance: auto; cursor: pointer; }
.form-select-sm { padding: 6px 10px; font-size: 12px; max-width: 200px; }
.form-textarea { min-height: 100px; resize: vertical; }

.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.form-check-input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-purple); }
.form-check-label { cursor: pointer; font-size: 14px; color: var(--text-dark); }

/* --- Modals --- */
.modal-overlay, .modal {
    display: none; position: fixed; z-index: 1050;
    inset: 0; background: rgba(0,0,0,0.5);
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal.show, .modal-overlay.show { display: flex; }
.modal.fade .modal-dialog { transform: scale(0.95); opacity: 0; transition: all 0.25s ease; }
.modal.show .modal-dialog, .modal.fade.show .modal-dialog { transform: scale(1); opacity: 1; }

.modal-dialog { width: 100%; max-width: 500px; margin: 20px; }
.modal-dialog.modal-lg { max-width: 800px; }
.modal-dialog.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100vh - 40px); }

.modal-content {
    background: white; border-radius: 15px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    overflow: hidden; position: relative;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid var(--border-light);
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.modal-body { padding: 24px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--border-light);
}

/* --- Nav Tabs --- */
.nav { display: flex; flex-wrap: wrap; gap: 0; }
.nav-tabs { border-bottom: 2px solid var(--border-light); margin-bottom: 20px; }
.nav-item { list-style: none; }
.nav-link {
    display: block; padding: 12px 24px; text-decoration: none;
    color: var(--text-medium); font-weight: 500; font-size: 14px;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s ease; cursor: pointer;
}
.nav-link:hover { color: var(--primary-purple); }
.nav-link.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
    font-weight: 600;
}
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.tab-content > .tab-pane.fade { opacity: 0; transition: opacity 0.2s ease; }
.tab-content > .tab-pane.fade.show, .tab-content > .tab-pane.show { opacity: 1; }

.nav-pills { gap: 8px; }
.nav-pills .nav-link {
    border-radius: 20px; padding: 8px 18px; font-size: 13px;
    border: 2px solid var(--border-light); border-bottom-width: 2px; margin-bottom: 0;
}
.nav-pills .nav-link.active { background: var(--primary-gradient); color: white; border-color: transparent; }

/* --- Badges --- */
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.bg-success { background: #d1fae5; color: #065f46; }
.bg-secondary { background: #e2e8f0; color: #4a5568; }
.bg-info { background: #e0f2fe; color: #075985; }
.bg-warning { background: #fef3c7; color: #92400e; }
.bg-danger { background: #fee2e2; color: #991b1b; }
.bg-primary { background: #e0e7ff; color: #4338ca; }

/* --- Pagination --- */
.pagination {
    display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
}
.page-item { margin: 0; }
.page-link {
    display: flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 8px; border: 1px solid var(--border-light);
    color: var(--text-medium); font-size: 13px; text-decoration: none;
    transition: all 0.2s ease; background: white;
}
.page-link:hover { background: #f5f8ff; border-color: var(--primary-purple); color: var(--primary-purple); }
.page-item.active .page-link { background: var(--primary-gradient); color: white; border-color: transparent; }
.pagination-sm .page-link { min-width: 30px; height: 30px; font-size: 12px; }

/* --- Input Group --- */
.input-group {
    display: flex; align-items: stretch; width: 100%;
}
.input-group .form-control, .input-group .form-select {
    border-top-right-radius: 0; border-bottom-right-radius: 0;
    flex: 1;
}
.input-group-text {
    display: flex; align-items: center; justify-content: center;
    padding: 0 15px; background: #f8fafc;
    border: 2px solid var(--border-light); border-left: none;
    border-radius: 0 8px 8px 0; color: var(--text-light);
    font-size: 14px; white-space: nowrap;
}

/* --- Alerts (dismissible) --- */
.alert-dismissible { position: relative; padding-right: 40px; }
.alert-dismissible .btn-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* --- Bootstrap Grid (Flexbox-based) --- */
.row { display: flex; flex-wrap: wrap; }
.row.g-2 { margin: -5px; }
.row.g-3 { margin: -8px; }
.row.g-4 { margin: -12px; }
.row.g-2 > [class*="col-"] { padding: 5px; }
.row.g-3 > [class*="col-"] { padding: 8px; }
.row.g-4 > [class*="col-"] { padding: 12px; }

.col-12 { width: 100%; }
.col-md-4 { width: 33.333%; }
.col-md-6 { width: 50%; }
.col-md-3 { width: 25%; }
.col-auto { width: auto; flex: 0 0 auto; }
.col-sm-3 { width: 25%; }
.col-sm-4 { width: 33.333%; }
.col-sm-5 { width: 41.667%; }

/* --- Utility Complements --- */
.mb-0 { margin-bottom: 0; }
.ms-1 { margin-left: 5px; }
.ms-2 { margin-left: 10px; }
.ms-3 { margin-left: 15px; }
.me-1 { margin-right: 5px; }
.me-2 { margin-right: 10px; }
.me-3 { margin-right: 15px; }
.py-2 { padding-top: 10px; padding-bottom: 10px; }
.py-3 { padding-top: 15px; padding-bottom: 15px; }
.py-4 { padding-top: 20px; padding-bottom: 20px; }
.px-2 { padding-left: 10px; padding-right: 10px; }
.px-3 { padding-left: 15px; padding-right: 15px; }
.px-4 { padding-left: 20px; padding-right: 20px; }

.w-100 { width: 100%; }
.w-auto { width: auto; }
.fw-semibold { font-weight: 600; }
.border-0 { border: none; }
.bg-transparent { background: transparent; }
.text-decoration-none { text-decoration: none; }
.text-muted { color: var(--text-light); }
.text-end { text-align: right; }
.text-white { color: white; }

/* --- Fade animation --- */
.fade { transition: opacity 0.15s linear; }
.fade:not(.show) { opacity: 0; }

/* --- d-inline --- */
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-block { display: block; }
.d-none { display: none; }

/* --- btn-group --- */
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group-sm .btn { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* --- DataTables compatibility --- */
.dataTables_wrapper .row { margin: 0 0 15px; display: flex; flex-wrap: wrap; align-items: center; }
.dataTables_wrapper .col-sm-3,
.dataTables_wrapper .col-sm-4,
.dataTables_wrapper .col-sm-5 { width: auto; flex: none; padding: 0 8px; }

/* --- shifts.php utility classes --- */
.add-shift-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; border-radius: 10px;
    padding: 12px 24px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.add-shift-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102,126,234,0.4); }

.form-section {
    background: #f8fafc; border-radius: 12px; padding: 25px;
    margin-bottom: 30px; border: 1px solid var(--border-light);
    display: none;
}
.form-section.show { display: block; }

.form-title {
    font-size: 18px; font-weight: 600; color: var(--text-dark);
    margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
}

.help-note {
    background: #e3f2fd; padding: 12px 15px; border-radius: 8px;
    margin-top: 10px; font-size: 12px; color: #1565c0;
    border-left: 3px solid #2196f3;
}
.help-note i { margin-right: 8px; }

.checkbox-group {
    display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.checkbox-group input { width: auto; margin: 0; }
.checkbox-group label { margin: 0; text-transform: none; font-weight: normal; }

.break-section { display: none; margin-top: 10px; padding-left: 20px; }
.break-section.show { display: block; }

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; border-radius: 8px;
    padding: 12px 30px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102,126,234,0.4); }

.btn-cancel {
    background: #e2e8f0; color: #4a5568; border: none; border-radius: 8px;
    padding: 12px 30px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; margin-left: 10px;
}
.btn-cancel:hover { background: #cbd5e0; }

.toggle-btn {
    background: none; border: none; cursor: pointer; font-size: 18px;
    padding: 5px; transition: transform 0.2s;
}
.toggle-btn:hover { transform: scale(1.1); }

.flexible-badge {
    background: #fef3c7; color: #b45309;
    padding: 4px 8px; border-radius: 12px;
    font-size: 11px; font-weight: 600; display: inline-block;
}

.no-data { text-align: center; padding: 40px; color: var(--text-light); }

.message {
    padding: 12px 20px; margin-bottom: 20px;
    border-radius: 8px; font-weight: 500;
}
.message.success { background: #d4edda; border-left: 4px solid #28a745; color: #155724; }
.message.error { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; }
.message.danger { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; }

.card-glass {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: hidden;
}
.card-glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.inline-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}
.inline-input:focus { border-color: #667eea; outline: none; }

.inline-select {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}
.inline-select:focus { border-color: #667eea; outline: none; }

.tab-pane-custom { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
