/* ============ Nextgen CCS Payroll — Premium Design System ============ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0d14;
    --bg-secondary: #111827;
    --bg-card: rgba(30, 33, 48, 0.85);
    --bg-card-hover: rgba(37, 40, 64, 0.95);
    --bg-card-solid: #1e2130;
    --bg-input: #1f2340;
    --sidebar-bg: #0e1120;
    --sidebar-active: #6366f1;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(45, 49, 72, 0.6);
    --border-glow: rgba(99, 102, 241, 0.3);
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --success: #22c55e;
    --success-bg: rgba(34,197,94,0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245,158,11,0.12);
    --info: #3b82f6;
    --info-bg: rgba(59,130,246,0.12);
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-glass: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.04));
    --shadow: 0 8px 32px rgba(0,0,0,0.35);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 24px rgba(99,102,241,0.15);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

/* Smooth scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.5); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

/* ============ Sidebar — Premium ============ */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.sidebar-header {
    padding: 28px 24px 24px;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}
.sidebar-header h3 i {
    color: var(--accent);
    font-size: 22px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.sidebar-header p { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.5px; text-transform: uppercase; }

.sidebar-menu { padding: 16px 0; flex: 1; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 24px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    margin: 2px 0;
}
.sidebar-item:hover {
    color: var(--text-primary);
    background: rgba(99,102,241,0.06);
    border-left-color: rgba(99,102,241,0.3);
}
.sidebar-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(99,102,241,0.18), transparent);
    border-left-color: var(--sidebar-active);
}
.sidebar-item.active i { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.sidebar-item i { width: 22px; text-align: center; font-size: 16px; transition: all var(--transition); }

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ============ Top Bar — Premium ============ */
.top-bar {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    padding: 22px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.page-title h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
}
.page-title p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
    transition: transform var(--transition);
}
.user-avatar:hover { transform: scale(1.05); }
.user-info-text strong { font-size: 14px; font-weight: 600; }
.user-info-text p { font-size: 11px; color: var(--text-muted); }

/* ============ Page Content ============ */
.page-content { padding: 28px 36px; }

/* ============ Cards — Glassmorphism ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
    backdrop-filter: blur(12px);
    transition: all var(--transition);
}
.card:hover {
    border-color: rgba(99,102,241,0.15);
}

.glass-card {
    background: linear-gradient(135deg, rgba(30,33,48,0.9), rgba(30,33,48,0.7));
    border: 1px solid rgba(99,102,241,0.12);
    box-shadow: var(--shadow), var(--shadow-glow);
    backdrop-filter: blur(20px) saturate(180%);
}
.glass-card:hover {
    border-color: rgba(99,102,241,0.25);
    box-shadow: var(--shadow-lg), 0 0 32px rgba(99,102,241,0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-header h3 {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ============ Stat Cards — Premium ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-glass);
    opacity: 0;
    transition: opacity var(--transition);
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-glow);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), var(--shadow-glow);
}
.stat-card:hover::before { opacity: 1; }

.stat-card-animated {
    animation: fadeSlideUp 0.5s ease forwards;
    opacity: 0;
}
.stat-card-animated:nth-child(1) { animation-delay: 0s; }
.stat-card-animated:nth-child(2) { animation-delay: 0.08s; }
.stat-card-animated:nth-child(3) { animation-delay: 0.16s; }
.stat-card-animated:nth-child(4) { animation-delay: 0.24s; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.stat-icon.green { background: var(--success-bg); color: var(--success); box-shadow: 0 0 16px rgba(34,197,94,0.15); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); box-shadow: 0 0 16px rgba(239,68,68,0.15); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); box-shadow: 0 0 16px rgba(245,158,11,0.15); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); box-shadow: 0 0 16px rgba(59,130,246,0.15); }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: #a78bfa; box-shadow: 0 0 16px rgba(139,92,246,0.15); }
.stat-icon.orange { background: rgba(249,115,22,0.12); color: #fb923c; box-shadow: 0 0 16px rgba(249,115,22,0.15); }
.stat-info { position: relative; z-index: 1; }
.stat-info p { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.stat-info h3 { font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: -0.5px; }

/* ============ Tables — Premium ============ */
.table-wrapper, .table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    width: 100%;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.premium-table { border-spacing: 0; }
thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    background: rgba(15, 17, 23, 0.5);
    position: sticky;
    top: 0;
    z-index: 5;
}
tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(45,49,72,0.3);
    vertical-align: middle;
    transition: background-color var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 250px;
    white-space: normal;
}
tbody tr {
    transition: all var(--transition);
}
tbody tr:hover {
    background: rgba(99,102,241,0.05);
}
tbody tr:last-child td { border-bottom: none; }

/* Table row animation */
.table-row-animate {
    animation: tableRowIn 0.35s ease forwards;
    opacity: 0;
}
@keyframes tableRowIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Totals row */
.totals-row {
    background: rgba(99,102,241,0.06) !important;
    border-top: 2px solid var(--accent) !important;
}
.totals-row td {
    padding: 16px !important;
    border-bottom: none !important;
}

/* Cell styling */
.code-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(99,102,241,0.1);
    border-radius: var(--radius-xs);
    color: var(--accent-hover);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.emp-name {
    font-weight: 500;
    color: var(--text-primary);
}
.designation-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(139,92,246,0.08);
    color: #c4b5fd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.num-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.net-salary {
    color: var(--accent-hover);
    font-weight: 700;
}
.bank-cell {
    font-size: 12px;
    color: var(--text-secondary);
}
.bank-cell code {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(99,102,241,0.06);
    border-radius: 4px;
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

/* ============ Buttons — Premium ============ */
.btn {
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: width 0.4s ease, height 0.4s ease, top 0.4s ease, left 0.4s ease;
    transform: translate(-50%, -50%);
}
.btn:active::after {
    width: 200%;
    height: 200%;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gradient); color: white; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(99,102,241,0.4); transform: translateY(-2px); }
.btn-success { background: var(--gradient-success); color: white; box-shadow: 0 2px 8px rgba(34,197,94,0.3); }
.btn-success:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(34,197,94,0.4); transform: translateY(-2px); }
.btn-danger { background: var(--gradient-danger); color: white; box-shadow: 0 2px 8px rgba(239,68,68,0.3); }
.btn-danger:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(239,68,68,0.4); transform: translateY(-2px); }
.btn-warning { background: var(--gradient-warning); color: white; }
.btn-secondary {
    background: rgba(37,40,64,0.8);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-icon { padding: 8px 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-animated {
    transition: all var(--transition-spring);
}
.btn-animated:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}
.btn-animated:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.toolbar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

/* ============ Forms — Premium ============ */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 12px rgba(99,102,241,0.1);
}
.form-control:hover:not(:focus) {
    border-color: rgba(99,102,241,0.3);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.toolbar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.toolbar .form-control { width: auto; min-width: 170px; }
.search-input {
    position: relative;
    flex: 1;
    max-width: 300px;
}
.search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: color var(--transition);
}
.search-input:focus-within i { color: var(--accent); }
.search-input input { padding-left: 38px; }

/* ============ Badges — Premium ============ */
.badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge-present { background: var(--success-bg); color: var(--success); }
.badge-absent { background: var(--danger-bg); color: var(--danger); }
.badge-halfday { background: var(--warning-bg); color: var(--warning); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-approved { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-leave { background: var(--info-bg); color: var(--info); }
.badge-advance { background: rgba(139,92,246,0.12); color: #a78bfa; }

/* ============ Modals — Premium ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px) saturate(150%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
}
.modal-overlay.show .modal-box { transform: scale(1) translateY(0); }
.modal-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: white; border-color: var(--danger); transform: rotate(90deg); }
.modal-body { padding: 26px; }

/* ============ Toast — Premium ============ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 16px 22px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
}
.toast-show { transform: translateX(0); }
.toast-success { background: rgba(22, 101, 52, 0.9); color: #bbf7d0; }
.toast-error { background: rgba(153, 27, 27, 0.9); color: #fecaca; }
.toast-info { background: rgba(30, 64, 175, 0.9); color: #bfdbfe; }
.toast-warning { background: rgba(146, 64, 14, 0.9); color: #fde68a; }

/* ============ Confirm Dialog ============ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.confirm-overlay.show { opacity: 1; }
.confirm-box {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.confirm-icon { font-size: 44px; color: var(--warning); margin-bottom: 18px; }
.confirm-box p { font-size: 15px; margin-bottom: 26px; color: var(--text-secondary); line-height: 1.6; }
.confirm-actions { display: flex; gap: 14px; justify-content: center; }

/* ============ Loading & Skeletons ============ */
.loading { text-align: center; padding: 60px 20px; }
.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(99,102,241,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--text-muted); font-size: 14px; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, rgba(99,102,241,0.06) 25%, rgba(99,102,241,0.12) 50%, rgba(99,102,241,0.06) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-xs);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); flex-shrink: 0; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text-lg { height: 28px; }
.skeleton-row { height: 48px; margin-bottom: 8px; border-radius: var(--radius-xs); }
.skeleton-table { padding: 20px; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 52px; color: var(--text-muted); margin-bottom: 18px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; font-weight: 600; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* ============ Login Page ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
    position: relative;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%);
    top: 20%;
    left: 30%;
    pointer-events: none;
}
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}
.login-logo {
    text-align: center;
    margin-bottom: 36px;
}
.login-logo .logo-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin: 0 auto 18px;
    box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}
.login-logo h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.login-logo p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ============ Profile ============ */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    backdrop-filter: blur(12px);
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}
.profile-name h3 { font-size: 20px; font-weight: 700; }
.profile-name p { font-size: 14px; color: var(--accent); }
.profile-name span { font-size: 12px; color: var(--text-muted); }
.profile-details { display: grid; gap: 18px; }
.profile-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}
.profile-item i { color: var(--accent); width: 20px; text-align: center; font-size: 15px; }
.profile-item label { font-size: 11px; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.profile-item span { font-size: 15px; font-weight: 500; }

/* ============ Salary Slip ============ */
.salary-slip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 600px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.slip-header {
    background: var(--gradient);
    padding: 28px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.slip-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}
.slip-header h3 { font-size: 18px; font-weight: 700; }
.slip-header p { font-size: 13px; opacity: 0.85; margin-top: 6px; }
.slip-body { padding: 28px; }
.slip-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(45,49,72,0.3);
    font-size: 14px;
}
.slip-row:last-child { border-bottom: none; }
.slip-row.total { font-size: 18px; font-weight: 700; color: var(--accent); padding-top: 18px; border-top: 2px solid var(--accent); margin-top: 10px; }
.slip-row.add span:last-child { color: var(--success); }
.slip-row.sub span:last-child { color: var(--danger); }

/* ============ Menu Toggle (Mobile) ============ */
.menu-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient);
    color: white;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
    transition: transform var(--transition-spring);
}
.menu-toggle:hover { transform: scale(1.1); }
.menu-toggle:active { transform: scale(0.95); }

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; }
    .top-bar { padding: 16px 20px; }
    .page-content { padding: 18px 20px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .form-control { width: 100%; }
    .toolbar-buttons { margin-left: 0; }
    .search-input { max-width: none; }
    
    /* Profile Mobile Fixes */
    .profile-header { flex-direction: column; text-align: center; gap: 16px; }
    .twofa-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .twofa-row input.form-control { width: 100% !important; text-align: left !important; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn-group .btn { width: 100%; justify-content: center; }
    
    /* Top Bar Scaling */
    .user-info-text { display: none; }
    .page-title h2 { font-size: 18px; }
    
    /* Table Adjustments */
    .card { padding: 16px; }
    .card-header h3 { font-size: 15px; }

    /* Stack Tables on Mobile */
    table.premium-table thead { display: none; }
    table.premium-table tr { display: block; border: 1px solid var(--border); border-bottom: 3px solid var(--accent); margin-bottom: 18px; border-radius: var(--radius-sm); overflow: hidden; background: rgba(0,0,0,0.15); }
    table.premium-table td { display: flex; width: 100%; max-width: 100%; justify-content: space-between; align-items: center; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.03); padding: 12px 14px; }
    table.premium-table td::before { content: attr(data-label); color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; text-align: left; margin-right: 15px; }
    .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
    .stat-card { padding: 16px; }
    .stat-info h3 { font-size: 22px; }
    .salary-slip { border-radius: 8px; }
    .slip-header, .slip-body { padding: 16px; }
}

/* ============ Print ============ */
@media print {
    .sidebar, .top-bar, .menu-toggle, .btn, .toolbar, .toast-container, .toolbar-buttons { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: white; color: black; }
    .card, .glass-card, .salary-slip { border: 1px solid #ccc; background: white; backdrop-filter: none; }
    .stat-card { background: white; border: 1px solid #ddd; }
    table { font-size: 11px; }
    thead th { background: #f0f0f0; color: #333; }
    tbody td { padding: 8px 10px; }
    .code-badge { background: #f0f0f0; color: #333; }
    .designation-tag { background: #f0f0f0; color: #333; }
    .bank-cell code { background: #f0f0f0; color: #333; }
}

/* ============ OTP Verification ============ */
.otp-header {
    text-align: center;
    margin-bottom: 28px;
}
.otp-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0088cc, #00bbff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin: 0 auto 18px;
    box-shadow: 0 8px 24px rgba(0, 136, 204, 0.3);
}
.otp-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.otp-header p { font-size: 13px; color: var(--text-muted); }

.otp-input-container {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}
.otp-input {
    width: 220px;
    padding: 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    transition: all var(--transition);
}
.otp-input:focus {
    outline: none;
    border-color: #0088cc;
    box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.15), 0 0 16px rgba(0, 136, 204, 0.1);
}
.otp-input::placeholder {
    color: var(--text-muted);
    opacity: 0.3;
    letter-spacing: 12px;
}

.otp-timer {
    text-align: center;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}
.otp-timer i { color: var(--accent); }
.otp-timer.timer-warning { color: var(--warning); }
.otp-timer.timer-warning i { color: var(--warning); }
.otp-timer.timer-expired { color: var(--danger); }
.otp-timer.timer-expired i { color: var(--danger); }

.otp-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 18px;
}
.otp-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
    padding: 4px 0;
}
.otp-link:hover { color: var(--accent); }
.otp-link:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ Toggle Switch ============ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 26px;
    transition: all 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); border-color: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); background: white; }

/* ============ 2FA Settings Card ============ */
.twofa-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    width: 100%;
    margin-top: 22px;
    backdrop-filter: blur(12px);
}
.twofa-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.twofa-header i {
    font-size: 26px;
    color: #0088cc;
    filter: drop-shadow(0 0 8px rgba(0,136,204,0.3));
}
.twofa-header h3 { font-size: 17px; font-weight: 600; }
.twofa-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.twofa-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.twofa-status.enabled { background: var(--success-bg); color: var(--success); }
.twofa-status.disabled { background: var(--danger-bg); color: var(--danger); }

.twofa-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.twofa-row:last-child { border-bottom: none; }
.twofa-row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.twofa-row small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.twofa-help {
    margin-top: 18px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}
.twofa-help strong { color: var(--text-secondary); }
.twofa-help code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* ============ Page-Level Animations ============ */
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-content {
    animation: pageLoad 0.4s ease forwards;
}

/* Pulse glow for active nav */
@keyframes navPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
