@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 55, 0.7);
    --bg-card-hover: rgba(40, 40, 70, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-input: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.6);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========== LAYOUT ========== */
.app-layout { display: flex; min-height: 100vh; }

/* ========== SIDEBAR ========== */
.sidebar {
    width: 260px; background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: var(--transition);
}
.sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border-color); }
.sidebar-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.sidebar-logo .logo-icon {
    width: 40px; height: 40px; background: var(--accent-gradient);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}
.sidebar-logo .logo-text { font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }
.sidebar-logo .logo-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; display: block; margin-top: -2px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 18px; }
.nav-section-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); padding: 0 12px; margin-bottom: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--transition); margin-bottom: 1px; position: relative; overflow: hidden; }
.nav-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent-gradient); border-radius: 0 3px 3px 0; opacity: 0; transition: var(--transition); }
.nav-item:hover { background: var(--bg-glass); color: var(--text-primary); }
.nav-item.active { background: rgba(99, 102, 241, 0.12); color: #a78bfa; }
.nav-item.active::before { opacity: 1; }
.nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-item .badge { margin-left: auto; background: var(--danger); color: white; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1; margin-left: 260px; padding: 24px; min-height: 100vh;
    background: var(--bg-primary); position: relative;
}
.main-content::before {
    content: ''; position: fixed; top: -200px; right: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.page-header { margin-bottom: 16px; position: relative; z-index: 1; }
.page-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-header p { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }

/* ========== CARDS ========== */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); backdrop-filter: blur(20px); transition: var(--transition); position: relative; z-index: 1; }
.card:hover { border-color: rgba(99, 102, 241, 0.2); box-shadow: var(--shadow-md); }
.card-header { padding: 10px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-header h2 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 14px; }
.card-footer { padding: 10px 16px; border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* ========== STAT CARDS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; position: relative; z-index: 1; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 16px 20px; backdrop-filter: blur(20px); transition: var(--transition); position: relative; overflow: hidden; cursor: pointer; }
.stat-card::after { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 50%; opacity: 0.08; transition: var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(99, 102, 241, 0.3); }
.stat-card .stat-icon { font-size: 24px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-gradient); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { box-shadow: 0 6px 25px rgba(99, 102, 241, 0.45); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-glass); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.btn-success { background: var(--success); color: white; box-shadow: 0 4px 15px rgba(34,197,94,0.3); }
.btn-success:hover { box-shadow: 0 6px 25px rgba(34,197,94,0.45); }
.btn-danger { background: var(--danger); color: white; box-shadow: 0 4px 15px rgba(239,68,68,0.3); }
.btn-danger:hover { box-shadow: 0 6px 25px rgba(239,68,68,0.45); }
.btn-warning { background: var(--warning); color: #1a1a2e; box-shadow: 0 4px 15px rgba(245,158,11,0.3); }
.btn-info { background: var(--info); color: white; box-shadow: 0 4px 15px rgba(59,130,246,0.3); }
.btn-info:hover { box-shadow: 0 6px 25px rgba(59,130,246,0.45); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 10px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 3px; }
.form-control { width: 100%; padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 13px; transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); background: rgba(255,255,255,0.08); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
select.form-control option { background: #1e1e37; color: var(--text-primary); padding: 8px 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ========== TABLES ========== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; }
thead th { background: rgba(255,255,255,0.03); padding: 8px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
tbody td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-primary); }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(99,102,241,0.04); }
tbody tr:last-child td { border-bottom: none; }

/* ========== BADGES ========== */
.badge-status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-draft { background: var(--warning-bg); color: var(--warning); }
.badge-approved { background: var(--success-bg); color: var(--success); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }
.badge-global { background: var(--info-bg); color: var(--info); }
.badge-individual { background: rgba(139,92,246,0.12); color: var(--accent-secondary); }
.badge-sm { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 600; margin: 1px; }

/* ========== MODAL ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-xl); width: 100%; max-width: 600px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; transform: translateY(20px) scale(0.97); transition: var(--transition); box-shadow: var(--shadow-lg); }
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 800px; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px; transition: var(--transition); border-radius: 6px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-glass); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 10px; }

/* ========== TOAST ========== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 16px; min-width: 280px; max-width: 380px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: toastIn 0.4s ease; }
.toast.toast-out { animation: toastOut 0.3s forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px); } }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; max-width: 360px; margin: 0 auto 16px; }

/* ========== PAYROLL FORM ========== */
.payroll-items-table input { padding: 4px 6px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-primary); font-family: inherit; font-size: 13px; transition: var(--transition); }
.payroll-items-table input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); outline: none; }
.payroll-items-table .amount-cell { font-weight: 600; color: var(--accent-primary); text-align: right; }

.payroll-summary { background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px; margin-top: 10px; }
.payroll-summary.payroll-summary-top { margin-top: 0; margin-bottom: 10px; padding: 8px 12px; }
.payroll-summary .summary-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; }
.payroll-summary .summary-row.total { border-top: 2px solid var(--border-color); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 700; }
.payroll-summary .summary-row.total .amount { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== QTY BUTTON GROUP (-/+ per row) ========== */
.qty-btn-group { display: inline-flex; align-items: center; gap: 2px; background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 2px; }
.qty-btn { width: 26px; height: 26px; border: none; border-radius: 50%; background: var(--bg-card); color: var(--text-primary); font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0; line-height: 1; }
.qty-btn:hover { background: var(--accent-primary); color: white; }
.qty-btn-minus:hover { background: var(--danger); }
.qty-input { width: 52px !important; text-align: center !important; padding: 4px 2px !important; font-weight: 600; border: none !important; background: transparent !important; box-shadow: none !important; }

.deduction-add { background: var(--bg-glass); border: 1px dashed var(--border-color); border-radius: var(--radius-md); padding: 10px; margin-top: 8px; }
.deduction-add .deduction-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.deduction-add .deduction-row input { flex: 1; }
.deduction-add .deduction-row input[type=number] { width: 110px; flex: unset; }

/* ========== PAYSLIP PRINT ========== */
.payslip { background: white; color: #1a1a1a; padding: 32px; max-width: 800px; margin: 0 auto; border-radius: var(--radius-lg); }
.payslip-header { border-bottom: 2px solid #1a1a1a; padding-bottom: 16px; margin-bottom: 16px; }
.payslip-header h1 { font-size: 20px; color: #1a1a1a; background: none; -webkit-text-fill-color: initial; }
.payslip table { border: 1px solid #ddd; }
.payslip th, .payslip td { border: 1px solid #ddd; padding: 6px 10px; color: #1a1a1a; }
.payslip th { background: #f0f0f0; color: #333; font-size: 12px; }
.payslip .signature-line { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 8px; }
.payslip .signature-line div { text-align: center; width: 200px; border-top: 1px solid #999; padding-top: 6px; font-size: 11px; color: #666; }

/* ========== CHECKBOX ========== */
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); transition: var(--transition); }
.checkbox-label:hover { background: var(--bg-glass); }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent-primary); cursor: pointer; }

/* ========== EMPLOYEE CHECK GRID ========== */
.employee-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px; max-height: 250px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 6px; background: var(--bg-glass); }
.employee-check-grid .emp-grid-select-all { grid-column: 1 / -1; font-weight: 600; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; margin-bottom: 4px; }

/* ========== BATCH POSITION ========== */
.batch-position-section { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--border-color); }
.batch-position-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.batch-divider { border-top: 1px solid var(--border-color); margin: 10px 0 8px; }

.batch-delete-bar { display: flex; align-items: center; padding: 6px 0; margin-bottom: 4px; }

/* ========== EMPLOYEE HISTORY (INLINE) ========== */
.emp-history-row td { background: rgba(99,102,241,0.04); border-left: 3px solid var(--accent-primary); }
.emp-history-inner { padding: 8px 12px; }
.emp-history-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border-color); }
.emp-expand-icon { display: inline-block; font-size: 10px; margin-left: 4px; color: var(--accent-primary); }

/* ========== SPINNER ========== */
.spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .employee-check-grid { grid-template-columns: 1fr; }
}

/* ========== PRINT ========== */
@media print {
    body { background: white !important; color: black !important; }
    .sidebar, .page-header, .card-header .btn, .modal-overlay, .toast-container, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .card { background: white !important; border: none !important; box-shadow: none !important; }
    .payslip { border-radius: 0 !important; padding: 16px !important; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }

/* ========== MISC ========== */
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 18px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 14px; } .mb-3 { margin-bottom: 18px; }
.ml-auto { margin-left: auto; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 12px; } .gap-1 { gap: 6px; }
.w-full { width: 100%; } .hidden { display: none !important; }

/* ========== CONFIRM MODAL ========== */
.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 10000; animation: fadeIn 0.2s ease; }
.confirm-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 28px; max-width: 400px; width: 90%; box-shadow: 0 25px 60px rgba(0,0,0,0.5); animation: confirmSlideIn 0.25s ease; }
@keyframes confirmSlideIn { from { opacity: 0; transform: scale(0.92) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.confirm-icon { font-size: 36px; text-align: center; margin-bottom: 12px; }
.confirm-title { font-size: 16px; font-weight: 700; text-align: center; color: var(--text-primary); margin-bottom: 6px; }
.confirm-message { text-align: center; color: var(--text-muted); font-size: 13px; line-height: 1.5; margin-bottom: 20px; }
.confirm-buttons { display: flex; gap: 10px; justify-content: center; }
.confirm-buttons .btn { min-width: 100px; justify-content: center; }

/* ========== TOOLTIPS ========== */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0.8); background: #1a1a2e; color: var(--text-primary); font-size: 11px; padding: 4px 10px; border-radius: var(--radius-sm); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 100; border: 1px solid var(--border-color); }
[data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== SEARCH ========== */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; opacity: 0.5; }
.search-wrap input, .search-wrap select { padding-left: 36px !important; }

/* ========== BREADCRUMBS ========== */
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumbs a { color: var(--accent-primary); text-decoration: none; transition: var(--transition); }
.breadcrumbs a:hover { color: var(--accent-secondary); }
.breadcrumbs .sep { opacity: 0.4; }

/* ========== CHARTS ========== */
.chart-container { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 0 6px; margin: 12px 0; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 50px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary)); transition: height 0.6s ease; min-height: 4px; }
.chart-bar:hover { filter: brightness(1.2); }
.chart-bar-label { font-size: 10px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.chart-bar-value { font-size: 9px; color: var(--text-primary); margin-bottom: 3px; text-align: center; font-weight: 600; }

/* ========== QUICK ACTIONS ========== */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 12px 0; }
.quick-action-btn { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); cursor: pointer; transition: var(--transition); font-size: 13px; font-weight: 500; }
.quick-action-btn:hover { border-color: var(--accent-primary); background: rgba(99,102,241,0.08); transform: translateY(-1px); }
.quick-action-btn .qa-icon { font-size: 20px; }

/* ========== TOP EARNERS ========== */
.top-earner-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.top-earner-row:last-child { border-bottom: none; }
.top-earner-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-glass); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--accent-primary); margin-right: 10px; flex-shrink: 0; }
.top-earner-name { flex: 1; font-weight: 500; }
.top-earner-amount { font-weight: 700; color: var(--success); }

/* ========== EMPLOYEE PROFILE ========== */
.profile-header { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); margin-bottom: 12px; }
.profile-avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: white; flex-shrink: 0; }
.profile-info h3 { font-size: 16px; margin-bottom: 2px; }
.profile-info .profile-position { color: var(--text-muted); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.profile-stat { text-align: center; padding: 10px; background: var(--bg-glass); border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.profile-stat-value { font-size: 16px; font-weight: 700; color: var(--accent-primary); }
.profile-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }

/* ========== KBD ========== */
.kbd { display: inline-block; padding: 2px 5px; font-size: 10px; font-family: monospace; color: var(--text-muted); background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: 3px; margin-left: 6px; }

/* ========== RATE PLAN ACCORDION ========== */
.rate-plan-accordion { margin-bottom: 6px; border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); transition: var(--transition); }
.rate-plan-accordion:hover { border-color: rgba(255,255,255,0.12); }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; cursor: pointer; user-select: none; transition: background 0.2s; gap: 10px; }
.accordion-header:hover { background: rgba(255,255,255,0.03); }
.accordion-arrow { font-size: 11px; color: var(--accent-primary); flex-shrink: 0; width: 14px; transition: transform 0.2s; }
.accordion-title { flex: 1; min-width: 0; }
.accordion-body { padding: 0 14px 10px; border-top: 1px solid var(--border-color); }

/* ========== MONTH NAVIGATION ========== */
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav .nav-arrow { background: var(--bg-glass); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: var(--radius-sm); padding: 4px 10px; cursor: pointer; font-size: 13px; transition: var(--transition); }
.month-nav .nav-arrow:hover { background: var(--accent-primary); border-color: var(--accent-primary); }
.month-nav .nav-month-label { font-size: 14px; font-weight: 600; color: var(--text-primary); min-width: 130px; text-align: center; }
.month-nav .nav-btn-today { background: var(--bg-glass); border: 1px solid var(--border-color); color: var(--text-secondary); border-radius: var(--radius-sm); padding: 4px 8px; cursor: pointer; font-size: 11px; transition: var(--transition); }
.month-nav .nav-btn-today:hover { color: var(--text-primary); border-color: var(--accent-primary); }

/* ===================== MOBILE STYLES ===================== */
@media (max-width: 768px) {
   .app-layout { flex-direction: column; }
   .sidebar { transform: translateX(-100%); position: fixed; z-index: 1001; }
   .sidebar.sidebar-open { transform: translateX(0); }
   .sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.5); }
   .sidebar-backdrop.backdrop-visible { display: block; }
   .main-content { margin-left: 0 !important; width: 100%; padding: 0.5rem; }
   .page-header h1 { font-size: 1.15rem; }
   .form-row, .form-row-3 { grid-template-columns: 1fr; }
   .stats-grid { grid-template-columns: 1fr 1fr; }
   .employee-check-grid { grid-template-columns: 1fr; }
   .card { border-radius: var(--radius-sm); }
   .card-body { padding: 0.75rem; }
   .card-header { padding: 0.75rem; }
   .filter-bar { flex-direction: column; gap: 0.5rem; }
   table { font-size: 0.75rem; }
   .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
   .btn-group { flex-wrap: wrap; gap: 0.35rem; }
   .modal { width: 95vw !important; max-height: 90vh; }
   .modal-lg { width: 95vw !important; }
   .mobile-hamburger {
       display: flex; align-items: center; justify-content: center;
       position: fixed; top: 10px; left: 10px; z-index: 1002;
       width: 38px; height: 38px; border-radius: 50%;
       background: var(--bg-card); border: 1px solid var(--border-color);
       font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-md);
   }
   .mobile-bottom-nav {
       display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
       background: var(--bg-secondary); border-top: 1px solid var(--border-color);
       padding: 2px 6px; justify-content: space-around;
       box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
   }
   .mobile-bottom-nav a {
       display: flex; flex-direction: column; align-items: center;
       padding: 4px 4px; font-size: 0.6rem; text-decoration: none;
       color: var(--text-muted); border-radius: var(--radius-sm);
       min-width: 50px;
   }
   .mobile-bottom-nav a .nav-icon { font-size: 1.1rem; }
   .mobile-bottom-nav a.active { color: var(--accent-primary); }
    .main-content { padding-bottom: 68px !important; }
    .qty-btn-group .qty-btn { width: 30px; height: 30px; font-size: 1rem; }
    .qty-btn-group .qty-input { width: 44px; font-size: 0.85rem; }
    /* Responsive table columns – hide secondary cols on mobile */
    .col-role, .col-status, .col-created { display: none; }
    .col-actions .btn-group { flex-direction: column; gap: 0.25rem; }
    .col-actions .btn { width: 100%; font-size: 0.75rem; padding: 0.25rem 0.5rem; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 0.75rem; }
    .page-header h1 { font-size: 1.2rem; }
    .page-header p { font-size: 0.8rem; }
    .form-group { flex-direction: column !important; align-items: stretch !important; }
    .card-header { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .card-header .btn { width: 100%; }
}
@media (min-width: 769px) {
   .mobile-hamburger { display: none; }
   .mobile-bottom-nav { display: none; }
   .sidebar-backdrop { display: none !important; }
}
