﻿/* ============================================================
   HR - Enterprise HR & Payroll Design System
   ============================================================ */

:root {
  --brand-primary: #0d9488;
  --brand-primary-hover: #0f766e;
  --brand-primary-light: #ccfbf1;
  --brand-secondary: #7c3aed;
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-sidebar: #18181b;
  --color-topnav: #18181b;
  --color-border: #e2e8f0;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-inverse: #f9fafb;
  --text-link: #0d9488;
  --color-success: #16a34a;
  --color-success-bg: #dcfce7;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-bg: #fee2e2;
  --color-info: #0891b2;
  --color-info-bg: #e0f7fa;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.09), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'Fira Code', Consolas, 'Courier New', monospace;
  --text-xs: 11px; --text-sm: 12px; --text-base: 14px; --text-md: 15px;
  --text-lg: 16px; --text-xl: 18px; --text-2xl: 22px; --text-3xl: 28px;
  --font-normal: 400; --font-medium: 500; --font-semibold: 600; --font-bold: 700;
  --topnav-height: 56px;
  --sidebar-width: 248px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background-color: var(--color-bg); color: var(--text-primary); line-height: 1.5; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: var(--font-sans); }
button { cursor: pointer; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-body { display: flex; flex: 1; padding-top: var(--topnav-height); }

.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topnav-height);
  background-color: var(--color-topnav);
  display: flex; align-items: center; padding: 0 20px;
  z-index: 1000; box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.top-nav-brand { display: flex; align-items: center; gap: 10px; min-width: var(--sidebar-width); color: white; text-decoration: none; }
.brand-logo { width: 32px; height: 32px; background: var(--brand-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-weight: var(--font-bold); font-size: 15px; color: white; }
.brand-name { font-size: 18px; font-weight: var(--font-bold); color: white; letter-spacing: -0.5px; }
.brand-sub { font-size: 10px; color: #64748b; letter-spacing: 1px; text-transform: uppercase; }
.top-nav-search { flex: 1; max-width: 480px; margin: 0 24px; position: relative; }
.top-nav-search input { width: 100%; padding: 8px 16px 8px 40px; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-full); color: white; font-size: var(--text-sm); outline: none; transition: all 0.2s; cursor: pointer; }
.top-nav-search input::placeholder { color: rgba(255,255,255,0.4); }
.top-nav-search input:focus { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.25); }
.search-icon-pos { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.4); font-size: 14px; pointer-events: none; }
.top-nav-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-icon-btn { width: 36px; height: 36px; border: none; background: rgba(255,255,255,0.07); border-radius: var(--radius-md); color: rgba(255,255,255,0.65); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 16px; position: relative; }
.nav-icon-btn:hover { background: rgba(255,255,255,0.14); color: white; }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: #ef4444; border-radius: 50%; border: 1px solid var(--color-topnav); }
.user-menu-trigger { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border: none; background: rgba(255,255,255,0.07); border-radius: var(--radius-md); color: white; cursor: pointer; transition: all 0.2s; font-size: var(--text-sm); }
.user-menu-trigger:hover { background: rgba(255,255,255,0.14); }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #0d9488, #7c3aed); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: var(--font-bold); color: white; }

.sidebar { position: fixed; top: var(--topnav-height); left: 0; bottom: 0; width: var(--sidebar-width); background-color: var(--color-sidebar); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; z-index: 1500; transform: translateX(-100%); transition: transform 0.3s ease; }
.sidebar.sidebar-open { transform: translateX(0); }
.sidebar-user-card { padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 12px; }
.sidebar-avatar { width: 42px; height: 42px; border-radius: var(--radius-md); background: linear-gradient(135deg, #0d9488 0%, #7c3aed 100%); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: var(--font-bold); color: white; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.1); }
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: var(--text-sm); font-weight: var(--font-semibold); color: #f1f5f9; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { flex: 1; padding: 8px 0 16px; overflow-y: auto; }
.nav-section-label { padding: 14px 16px 4px; font-size: 10px; font-weight: var(--font-bold); color: #475569; text-transform: uppercase; letter-spacing: 1px; display: block; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: #a1a1aa; font-size: var(--text-sm); cursor: pointer; transition: all 0.15s ease; border: none; background: none; width: 100%; text-align: left; border-right: 3px solid transparent; text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #f4f4f5; text-decoration: none; }
.nav-item.active { background: rgba(13,148,136,0.18); color: #5eead4; border-right-color: #0d9488; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.06); }
.logout-btn { width: 100%; padding: 9px 14px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); border-radius: var(--radius-md); color: #fca5a5; font-size: var(--text-sm); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.logout-btn:hover { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.3); }

.main-content { margin-left: 0; flex: 1; min-height: calc(100vh - var(--topnav-height)); overflow-x: hidden; }

.emp-profile-header { background: white; border-bottom: 3px solid var(--brand-primary); padding: 24px 32px; }
.emp-profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.emp-profile-identity { display: flex; align-items: center; gap: 18px; }
.emp-avatar-lg { width: 72px; height: 72px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #0d9488 0%, #7c3aed 100%); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: var(--font-bold); color: white; flex-shrink: 0; box-shadow: var(--shadow-md); border: 3px solid white; }
.emp-id-label { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 3px; }
.emp-id-label strong { color: var(--text-secondary); font-weight: var(--font-semibold); }
.emp-full-name { font-size: var(--text-2xl); font-weight: var(--font-bold); color: var(--text-primary); line-height: 1.2; margin-bottom: 6px; }
.emp-status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--font-medium); }
.emp-status-badge.active { background: var(--color-success-bg); color: var(--color-success); }
.emp-status-badge.active::before { content: ''; width: 6px; height: 6px; background: var(--color-success); border-radius: 50%; }
.emp-status-badge.inactive { background: #f1f5f9; color: var(--text-muted); }
.emp-profile-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.emp-info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.info-strip-item { padding: 0 16px 0 0; border-right: 1px solid var(--color-border); }
.info-strip-item:last-child { border-right: none; }
.info-strip-item:first-child { padding-left: 0; }
.info-strip-label { font-size: 10px; color: var(--text-muted); display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-strip-value { font-size: var(--text-sm); color: var(--text-primary); font-weight: var(--font-medium); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-strip-value.empty { color: var(--text-muted); font-style: italic; }

.content-area { padding: 24px 32px; max-width: 1280px; margin: 0 auto; }
.content-section { display: none; }
.content-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px;
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 768px) {
  .content-section.active { padding: 16px; }
}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--text-primary); }
.section-subtitle { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }

.info-card-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.info-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-xs); transition: box-shadow 0.2s; border-top: 3px solid var(--brand-primary); }
.info-card:hover { box-shadow: var(--shadow-md); }
.info-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--color-border); background: #fafafa; }
.info-card-title { font-size: var(--text-md); font-weight: var(--font-semibold); color: var(--text-primary); }
.info-card-body { padding: 18px; }
.info-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: var(--font-medium); }
.field-value { font-size: var(--text-base); color: var(--text-primary); font-weight: var(--font-medium); }
.field-value.empty { color: var(--text-muted); font-style: italic; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: var(--font-semibold); cursor: pointer; transition: all 0.2s; border: none; white-space: nowrap; font-family: var(--font-sans); line-height: 1.4; }
.btn-primary { background: var(--brand-primary); color: white; }
.btn-primary:hover { background: var(--brand-primary-hover); box-shadow: 0 4px 12px rgba(13,148,136,0.35); }
.btn-secondary { background: white; color: var(--text-primary); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-bg); border-color: #c9d3de; }
.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--color-warning); color: white; }
.btn-outline { background: transparent; color: var(--brand-primary); border: 1.5px solid var(--brand-primary); }
.btn-outline:hover { background: var(--brand-primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover { background: var(--color-bg); color: var(--text-primary); }
.btn-manage { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; background: transparent; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.btn-manage:hover { background: var(--brand-primary-light); border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); }
.btn-lg { padding: 12px 24px; font-size: var(--text-base); }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-md); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-secondary); margin-bottom: 4px; }
.form-label.required::after { content: ' *'; color: var(--color-danger); }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-base); color: var(--text-primary); background: white; transition: all 0.2s; }
.form-control:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: var(--text-xs); color: var(--color-danger); margin-top: 4px; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; animation: modalIn 0.2s ease; }
.modal-lg { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--color-border); }
.modal-title { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--text-primary); }
.modal-close { width: 30px; height: 30px; border: none; background: var(--color-bg); border-radius: var(--radius-md); color: var(--text-muted); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.modal-close:hover { background: var(--color-border); color: var(--text-primary); }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--color-border); background: #fafafa; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table thead { background: #f8fafc; }
.data-table th { padding: 10px 14px; text-align: left; font-weight: var(--font-semibold); color: var(--text-secondary); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.data-table td { padding: 12px 14px; color: var(--text-primary); border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.no-data-row td { text-align: center; color: var(--text-muted); padding: 32px; font-style: italic; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--font-semibold); white-space: nowrap; }
.badge-success, .badge-approved { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger, .badge-rejected { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); color: var(--color-info); }
.badge-neutral, .badge-cancelled { background: #f1f5f9; color: var(--text-secondary); }
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-xs); border-left: 4px solid var(--brand-primary); transition: box-shadow 0.2s; }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 4px; }
.stat-card-icon.blue { background: var(--brand-primary-light); color: var(--brand-primary); }
.stat-card-icon.green { background: var(--color-success-bg); color: var(--color-success); }
.stat-card-icon.orange { background: var(--color-warning-bg); color: var(--color-warning); }
.stat-card-icon.red { background: var(--color-danger-bg); color: var(--color-danger); }
.stat-card-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-card-icon.teal { background: #ccfbf1; color: #0f766e; }
.stat-card-value { font-size: var(--text-3xl); font-weight: var(--font-bold); color: var(--text-primary); line-height: 1; }
.stat-card-label { font-size: var(--text-sm); color: var(--text-muted); }
.stat-card-change { font-size: var(--text-xs); color: var(--color-success); font-weight: var(--font-semibold); }

.leave-balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.leave-balance-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.leave-balance-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--brand-primary); }
.leave-balance-card.sick::before { background: #ef4444; }
.leave-balance-card.casual::before { background: #f59e0b; }
.leave-balance-card.earned::before { background: #10b981; }
.leave-balance-card.unpaid::before { background: #6b7280; }
.leave-balance-card.maternity::before { background: #ec4899; }
.leave-balance-card.paternity::before { background: #8b5cf6; }
.leave-type-name { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-secondary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.leave-balance-bar { height: 6px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 8px; }
.leave-balance-fill { height: 100%; background: var(--brand-primary); border-radius: var(--radius-full); transition: width 0.6s ease; }
.leave-numbers { display: flex; justify-content: space-between; align-items: baseline; }
.leave-remaining { font-size: var(--text-2xl); font-weight: var(--font-bold); color: var(--text-primary); }
.leave-total-label { font-size: var(--text-xs); color: var(--text-muted); }
.leave-apply-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); max-width: 560px; }

.attendance-clock-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow-xs); text-align: center; }
.live-clock { font-size: 52px; font-weight: var(--font-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; margin: 8px 0; letter-spacing: -2px; }
.live-date { font-size: var(--text-base); color: var(--text-muted); margin-bottom: 20px; }
.attendance-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.checkin-btn { padding: 12px 36px; background: var(--color-success); color: white; border: none; border-radius: var(--radius-lg); font-size: var(--text-md); font-weight: var(--font-semibold); cursor: pointer; transition: all 0.2s; }
.checkin-btn:hover:not(:disabled) { background: #15803d; }
.checkout-btn { padding: 12px 36px; background: var(--color-warning); color: white; border: none; border-radius: var(--radius-lg); font-size: var(--text-md); font-weight: var(--font-semibold); cursor: pointer; transition: all 0.2s; }
.checkout-btn:hover:not(:disabled) { background: #b45309; }
.checkin-btn:disabled, .checkout-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.attendance-summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.att-sum-item { text-align: center; padding: 14px; background: var(--color-bg); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.att-sum-value { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--text-primary); }
.att-sum-label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.payslip-list { display: flex; flex-direction: column; gap: 12px; }
.payslip-item { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); cursor: pointer; transition: box-shadow 0.2s; }
.payslip-item:hover { box-shadow: var(--shadow-md); }
.payslip-item-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: linear-gradient(135deg, #134e4a 0%, #0d9488 100%); color: white; }
.payslip-month-year { font-size: var(--text-lg); font-weight: var(--font-semibold); }
.payslip-right { text-align: right; }
.payslip-status-text { font-size: var(--text-xs); opacity: 0.8; margin-bottom: 2px; }
.payslip-net-amount { font-size: var(--text-2xl); font-weight: var(--font-bold); }
.payslip-breakdown { padding: 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.payslip-col-title { font-size: 10px; font-weight: var(--font-bold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--color-border); }
.payslip-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f8fafc; font-size: var(--text-sm); }
.payslip-line:last-child { border-bottom: none; }
.payslip-line.total { font-weight: var(--font-bold); border-top: 2px solid var(--color-border); padding-top: 8px; margin-top: 4px; }
.amount-green { color: var(--color-success); font-weight: var(--font-semibold); }
.amount-red { color: var(--color-danger); font-weight: var(--font-semibold); }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .form-control { width: auto; min-width: 160px; }
.search-box { display: flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 8px 12px; }
.search-box input { border: none; outline: none; font-size: var(--text-sm); color: var(--text-primary); background: none; flex: 1; min-width: 180px; }

.login-page { min-height: 100vh; display: flex; }
.login-hero { flex: 1; background: linear-gradient(145deg, #0d1f1e 0%, #134e4a 45%, #0d9488 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.login-hero::before { content: ''; position: absolute; width: 500px; height: 500px; background: rgba(13,148,136,0.1); border-radius: 50%; top: -150px; right: -150px; }
.login-hero::after { content: ''; position: absolute; width: 350px; height: 350px; background: rgba(124,58,237,0.08); border-radius: 50%; bottom: -80px; left: -80px; }
.login-hero-content { position: relative; z-index: 1; max-width: 480px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.login-brand-icon { width: 52px; height: 52px; background: var(--brand-primary); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: 24px; color: white; font-weight: var(--font-bold); }
.login-brand-name { font-size: 32px; font-weight: var(--font-bold); color: white; letter-spacing: -1px; }
.login-hero-title { font-size: 30px; font-weight: var(--font-bold); color: white; margin-bottom: 14px; line-height: 1.3; }
.login-hero-subtitle { font-size: var(--text-lg); color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 40px; }
.login-features { display: flex; flex-direction: column; gap: 16px; }
.login-feature { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.75); font-size: var(--text-base); }
.login-feature-icon { width: 34px; height: 34px; background: rgba(255,255,255,0.1); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.login-form-panel { width: 460px; display: flex; flex-direction: column; justify-content: center; padding: 48px 40px; background: white; }
.login-form-header { margin-bottom: 32px; }
.login-form-title { font-size: var(--text-2xl); font-weight: var(--font-bold); color: var(--text-primary); margin-bottom: 6px; }
.login-form-subtitle { font-size: var(--text-base); color: var(--text-muted); }
.login-form .form-control { padding: 12px 14px; font-size: var(--text-base); }
.login-submit-btn { width: 100%; padding: 12px; background: var(--brand-primary); color: white; border: none; border-radius: var(--radius-lg); font-size: var(--text-base); font-weight: var(--font-semibold); cursor: pointer; transition: all 0.2s; margin-top: 6px; }
.login-submit-btn:hover { background: var(--brand-primary-hover); box-shadow: 0 4px 14px rgba(13,148,136,0.4); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error { background: var(--color-danger-bg); color: var(--color-danger); padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--text-sm); margin-top: 12px; display: none; }
.login-error.visible { display: block; }
.demo-creds { margin-top: 24px; padding: 16px; background: var(--color-bg); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.demo-creds-title { font-size: 10px; font-weight: var(--font-bold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.demo-cred-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); cursor: pointer; transition: color 0.15s; }
.demo-cred-row:last-child { border-bottom: none; }
.demo-cred-role { font-weight: var(--font-semibold); color: var(--text-secondary); }
.demo-cred-email { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }

.toast-container { position: fixed; top: calc(var(--topnav-height) + 14px); right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border-left: 4px solid; min-width: 300px; animation: toastIn 0.3s ease; pointer-events: all; }
.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.info { border-left-color: var(--color-info); }
.toast-msg { flex: 1; font-size: var(--text-sm); color: var(--text-primary); }
.toast-close { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: var(--text-sm); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(22,163,74,0.2); }
.alert-error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid rgba(220,38,38,0.2); }
.alert-info { background: var(--color-info-bg); color: var(--color-info); border: 1px solid rgba(2,132,199,0.2); }

.tabs { display: flex; border-bottom: 2px solid var(--color-border); margin-bottom: 20px; gap: 4px; overflow-x: auto; }
.tab-item { padding: 9px 16px; font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--text-muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; white-space: nowrap; }
.tab-item:hover { color: var(--text-secondary); }
.tab-item.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: var(--font-semibold); }

.document-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 8px; background: white; transition: all 0.2s; }
.document-item:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-sm); }
.doc-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--brand-primary-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-name { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-primary); }
.doc-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.profile-completion-bar { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 16px; }
.profile-completion-text { font-size: var(--text-sm); color: var(--text-secondary); white-space: nowrap; }
.completion-percent { font-weight: var(--font-bold); color: var(--brand-primary); }
.progress-bar { flex: 1; height: 8px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-primary), #7c3aed); border-radius: var(--radius-full); transition: width 0.6s ease; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state-title { font-size: var(--text-xl); font-weight: var(--font-semibold); color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-desc { font-size: var(--text-base); color: var(--text-muted); }

.spinner { width: 24px; height: 24px; border: 2px solid var(--color-border); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 40px; }

@media (max-width: 1024px) {
  .info-card-grid { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-form-panel { width: 100%; max-width: 460px; margin: 0 auto; }
  .login-page { justify-content: center; align-items: center; }
}
@media (max-width: 768px) {
  .emp-info-strip { grid-template-columns: repeat(2, 1fr); }
  .content-area { padding: 16px; }
  .emp-profile-header { padding: 16px; }
  .emp-profile-top { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .attendance-summary-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .info-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .leave-balance-grid { grid-template-columns: 1fr 1fr; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   FORM INPUT / SELECT ALIASES  (match HTML class names)
   ============================================================ */
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-base); color: var(--text-primary); background: white; transition: all 0.2s; font-family: var(--font-sans); }
.form-input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.form-input::placeholder { color: var(--text-muted); }
.form-select { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-base); color: var(--text-primary); background: white; transition: all 0.2s; font-family: var(--font-sans); cursor: pointer; }
.form-select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* ============================================================
   DEPARTMENT BADGES — unique per department
   ============================================================ */
.dept-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--font-semibold); }
.dept-Engineering   { background: #dbeafe; color: #1d4ed8; }
.dept-Marketing     { background: #fce7f3; color: #9d174d; }
.dept-Finance       { background: #dcfce7; color: #15803d; }
.dept-HR            { background: #fef3c7; color: #92400e; }
.dept-Design        { background: #f3e8ff; color: #7e22ce; }
.dept-Operations    { background: #e0f2fe; color: #0369a1; }
.dept-Sales         { background: #fff7ed; color: #c2410c; }
.dept-Legal         { background: #f1f5f9; color: #475569; }
.dept-Product       { background: #ccfbf1; color: #0f766e; }
.dept-default       { background: #f1f5f9; color: #475569; }

/* ============================================================
   GLOBAL SEARCH OVERLAY
   ============================================================ */
.gs-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: var(--text-sm); font-style: italic; }
.gs-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); cursor: pointer; transition: background 0.15s; }
.gs-result-item:hover { background: #f0fdfa; }

/* ============================================================
   BULK CSV DROP ZONE DRAG-OVER STATE
   ============================================================ */
#csvDropZone.drag-over { border-color: var(--brand-primary) !important; background: #f0fdfa !important; }

/* ============================================================
   UNIQUE DESIGN — glass cards, animated counters, gradient accents
   ============================================================ */
.glass-card { background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.stat-card { transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-value { font-size: var(--text-3xl); font-weight: var(--font-bold); color: var(--text-primary); line-height: 1; }
.stat-label { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; }
.stat-icon { font-size: 24px; margin-bottom: 4px; }
.stat-blue   .stat-icon { filter: none; }
.stat-green  { border-left-color: var(--color-success); }
.stat-amber  { border-left-color: var(--color-warning); }
.stat-purple { border-left-color: #9333ea; }
.section-title-accent { position: relative; display: inline-block; }
.section-title-accent::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 40px; height: 3px; background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary)); border-radius: var(--radius-full); }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; background: #ef4444; color: white; border-radius: var(--radius-full); font-size: 10px; font-weight: var(--font-bold); padding: 0 4px; margin-left: auto; }
.notif-badge { display: inline-block; background: #ef4444; color: white; border-radius: 99px; font-size: 9px; font-weight: 700; padding: 0 4px; line-height: 16px; height: 16px; }
.icon-btn { width: 36px; height: 36px; border: none; background: rgba(255,255,255,0.07); border-radius: var(--radius-md); color: rgba(255,255,255,0.65); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 16px; position: relative; }
.icon-btn:hover { background: rgba(255,255,255,0.14); color: white; }
.nav-user-pill { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border: none; background: rgba(255,255,255,0.07); border-radius: var(--radius-md); color: white; cursor: pointer; transition: all 0.2s; font-size: var(--text-sm); }
.nav-user-pill:hover { background: rgba(255,255,255,0.14); }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #0d9488, #7c3aed); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: var(--font-bold); color: white; }

/* ============================================================
   ADMIN CUSTOMIZE MODE
   ============================================================ */
body.customize-mode [data-editable] { outline: 2px dashed rgba(124,58,237,0.45); border-radius: 4px; cursor: text; position: relative; }
body.customize-mode [data-editable]:hover { outline-color: #7c3aed; background: rgba(124,58,237,0.04); }
body.customize-mode [data-editable]:focus { outline: 2px solid #7c3aed; background: rgba(124,58,237,0.06); }
.customize-toolbar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1e1b4b; color: white; border-radius: 12px; padding: 10px 20px; display: flex; gap: 10px; align-items: center; z-index: 9000; box-shadow: 0 8px 32px rgba(0,0,0,0.3); font-size: 13px; animation: slideUp 0.3s ease; white-space: nowrap; }
.customize-toolbar-label { color: #c4b5fd; font-weight: 600; margin-right: 4px; }
.customize-save-indicator { font-size: 11px; color: #a5b4fc; margin-left: 8px; }

/* ============================================================
   AI ASSISTANT WIDGET
   ============================================================ */
#aiAssistantBtn { position: fixed; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #0d9488, #7c3aed); color: white; border: none; cursor: pointer; z-index: 8000; box-shadow: 0 4px 20px rgba(13,148,136,0.45); display: flex; align-items: center; justify-content: center; font-size: 22px; transition: all 0.3s; }
#aiAssistantBtn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(13,148,136,0.55); }
#aiAssistantPanel { position: fixed; bottom: 88px; right: 24px; width: 380px; background: white; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); z-index: 8000; display: none; flex-direction: column; overflow: hidden; border: 1px solid rgba(0,0,0,0.08); animation: slideUp 0.25s ease; }
#aiAssistantPanel.open { display: flex; }
.ai-panel-header { background: linear-gradient(135deg, #134e4a, #0d9488); padding: 14px 16px; display: flex; align-items: center; gap: 10px; color: white; }
.ai-panel-avatar { width: 36px; height: 36px; background: rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ai-panel-name { font-weight: 700; font-size: 14px; }
.ai-panel-sub  { font-size: 11px; opacity: 0.75; }
.ai-panel-close { margin-left: auto; background: none; border: none; color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; padding: 0; line-height: 1; }
.ai-panel-close:hover { color: white; }
.ai-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; max-height: 360px; background: #f8fafc; }
.ai-msg { max-width: 85%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.ai-msg.user { align-self: flex-end; background: var(--brand-primary); color: white; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: white; color: var(--text-primary); border: 1px solid var(--color-border); border-bottom-left-radius: 4px; }
.ai-msg.system { align-self: center; background: #f1f5f9; color: var(--text-muted); font-style: italic; font-size: 11px; border-radius: 8px; padding: 6px 12px; max-width: 95%; }
.ai-msg.typing { color: var(--text-muted); }
.ai-input-row { display: flex; padding: 10px 12px; gap: 8px; border-top: 1px solid var(--color-border); background: white; align-items: flex-end; }
.ai-input-row textarea { flex: 1; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: none; outline: none; min-height: 36px; max-height: 100px; font-family: var(--font-sans); color: var(--text-primary); }
.ai-input-row textarea:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 2px rgba(13,148,136,0.12); }
.ai-send-btn { width: 36px; height: 36px; border-radius: 8px; background: var(--brand-primary); border: none; color: white; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
.ai-send-btn:hover { background: var(--brand-primary-hover); }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-token-setup { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ai-token-setup h3 { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.ai-token-setup p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.ai-css-preview-bar { padding: 8px 12px; background: #1e1b4b; display: flex; gap: 8px; align-items: center; font-size: 12px; color: #c4b5fd; }
.ai-css-preview-bar button { padding: 3px 10px; border-radius: 4px; border: none; font-size: 11px; cursor: pointer; font-weight: 600; }
.ai-accept-btn { background: #16a34a; color: white; }
.ai-reject-btn { background: #dc2626; color: white; }

/* ============================================================
   PAY PROFILE — ADP-style layout
   ============================================================ */
.pay-profile-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 0; box-shadow: var(--shadow-sm); }
.pay-profile-breadcrumb { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--font-semibold); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.pay-profile-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.pay-profile-avatar { width: 56px; height: 56px; background: var(--brand-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: var(--font-bold); flex-shrink: 0; }
.pay-profile-name-block { flex: 1; min-width: 180px; }
.pay-profile-name { font-size: var(--text-xl); font-weight: var(--font-bold); color: var(--text-primary); line-height: 1.3; }
.pay-profile-preferred { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 4px; }
.pay-status-badge { display: inline-block; background: #dcfce7; color: #15803d; font-size: var(--text-xs); font-weight: var(--font-semibold); padding: 3px 10px; border-radius: 99px; }
.pay-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.pay-action-item { display: block; width: 100%; text-align: left; padding: 10px 16px; font-size: 13px; color: #374151; background: none; border: none; cursor: pointer; transition: background 0.12s; white-space: nowrap; }
.pay-action-item:hover { background: #f1f5f9; color: #0d9488; }
.pay-profile-details-row { display: flex; gap: 0; border-top: 1px solid var(--color-border); padding-top: 14px; flex-wrap: wrap; }
.pay-detail-item { flex: 1; min-width: 130px; padding: 0 16px 0 0; }
.pay-detail-item:first-child { padding-left: 0; }
.pay-detail-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: var(--font-semibold); margin-bottom: 3px; }
.pay-detail-value { font-size: var(--text-sm); color: var(--text-primary); font-weight: var(--font-semibold); }

/* Pay Body Layout */
.pay-body-layout { display: flex; gap: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: white; min-height: 500px; }

/* Pay Left Subnav */
.pay-subnav { width: 200px; flex-shrink: 0; border-right: 1px solid var(--color-border); background: #fafbfc; padding: 12px 0; display: flex; flex-direction: column; }
.pay-subnav-item { display: block; width: 100%; text-align: left; padding: 10px 20px; font-size: var(--text-sm); color: var(--text-secondary); background: none; border: none; cursor: pointer; transition: all 0.15s; border-left: 3px solid transparent; }
.pay-subnav-item:hover { background: rgba(30,64,175,0.05); color: var(--brand-primary); }
.pay-subnav-item.active { color: var(--brand-primary); font-weight: var(--font-semibold); background: rgba(13,148,136,0.07); border-left-color: var(--brand-primary); }

/* Pay Content Area */
.pay-content-area { flex: 1; padding: 24px; overflow: auto; }

/* Tabs */
.pay-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--color-border); margin-bottom: 20px; }
.pay-tab { padding: 9px 20px; font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-muted); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.pay-tab:hover { color: var(--text-primary); }
.pay-tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }

/* Filter Row */
.pay-filter-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.pay-filter-group { display: flex; flex-direction: column; gap: 4px; }
.pay-filter-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--font-semibold); }
.pay-filter-input { padding: 7px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-primary); background: white; outline: none; }
.pay-filter-input:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 2px rgba(13,148,136,0.12); }

/* Accordion */
.pay-accordion { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.pay-acc-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: #f8fafc; border: none; cursor: pointer; font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--text-primary); transition: background 0.15s; }
.pay-acc-header:hover { background: #f1f5f9; }
.pay-acc-arrow { font-size: 13px; color: var(--text-muted); transition: transform 0.2s; }
.pay-acc-body { padding: 16px; border-top: 1px solid var(--color-border); }

/* Pay Table */
.pay-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.pay-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: var(--font-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 2px solid var(--color-border); white-space: nowrap; }
.pay-table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; color: var(--text-primary); vertical-align: middle; }
.pay-table tbody tr:hover { background: #fafbfc; }
.pay-table tbody tr:last-child td { border-bottom: none; }
.pay-no-records { text-align: center; color: var(--text-muted); font-style: italic; padding: 28px !important; }
.sort-icon { opacity: 0.5; font-size: 11px; cursor: pointer; }

/* Empty State */
.pay-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; color: var(--text-muted); gap: 12px; }
.pay-empty-icon { font-size: 40px; opacity: 0.4; }

@media (max-width: 768px) {
  .pay-body-layout { flex-direction: column; }
  .pay-subnav { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--color-border); padding: 0; }
  .pay-subnav-item { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .pay-subnav-item.active { border-left: none; border-bottom-color: var(--brand-primary); }
  .pay-profile-actions { margin-left: 0; }
  .pay-detail-item { min-width: 100px; }
}
.fade-in { animation: fadeIn 0.2s ease; }
.slide-up { animation: slideUp 0.3s ease; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.cursor-pointer { cursor: pointer; }
.divider { height: 1px; background: var(--color-border); margin: 16px 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: var(--color-success); }
.status-dot.inactive { background: var(--text-muted); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1400; }
.sidebar-overlay.visible { display: block; }
.mobile-menu-toggle { display: flex; align-items: center; justify-content: center; background: none; border: none; color: white; font-size: 22px; cursor: pointer; padding: 4px; margin-right: 8px; }
@media print { .sidebar, .top-nav, .emp-profile-header, .filter-bar, .modal-overlay { display: none !important; } .main-content { margin-left: 0; } .content-area { padding: 0; } }

/* ============================================================
   NEW MODULE STYLES — HR Platform Extended
   ============================================================ */

/* Tab bar */
.tab-btn {
  padding: 8px 18px; border: none; background: #f1f5f9; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab-btn:hover { background: #e2e8f0; color: #374151; }
.tab-btn.active { background: #0d9488; color: #fff; }

/* Module card */
.module-card {
  background: #fff; border-radius: 14px; border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: box-shadow 0.2s;
}
.module-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* Two-column info grid */
.info-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .info-grid-2 { grid-template-columns: 1fr; } }

/* Stat card color variants */
.stat-card.stat-blue  { border-left: 4px solid #2563eb; }
.stat-card.stat-green { border-left: 4px solid #16a34a; }

/* ============================================================
   HOME PAGE
   ============================================================ */

/* Welcome Banner */
.home-welcome-banner {
  background: linear-gradient(135deg, #0d1f1e 0%, #134e4a 55%, #0d9488 100%);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.home-welcome-banner::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(13,148,136,0.15);
  border-radius: 50%;
  top: -80px; right: 80px;
  pointer-events: none;
}
.home-welcome-banner::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  background: rgba(124,58,237,0.1);
  border-radius: 50%;
  bottom: -40px; right: -40px;
  pointer-events: none;
}
.home-welcome-left { flex: 1; position: relative; z-index: 1; }
.home-greeting { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.home-username { font-size: 30px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 6px; }
.home-date { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 14px; }
.home-quote { font-size: 13px; color: rgba(255,255,255,0.5); font-style: italic; max-width: 520px; line-height: 1.6; border-left: 3px solid rgba(13,148,136,0.6); padding-left: 12px; }
.home-welcome-right { position: relative; z-index: 1; }
.home-avatar-hero {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: white;
  border: 3px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* At a Glance Row */
.home-glance-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.home-glance-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.15s;
}
.home-glance-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.glance-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.glance-icon.green  { background: #dcfce7; color: #15803d; }
.glance-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.glance-icon.orange { background: #fef3c7; color: #b45309; }
.glance-icon.purple { background: #f3e8ff; color: #7c3aed; }
.glance-value { font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.glance-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Main Grid */
.home-main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
}
.home-col-left, .home-col-right { display: flex; flex-direction: column; gap: 18px; }

/* Home cards */
.home-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.home-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: #fafbfc;
}
.home-card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.home-card-badge {
  background: #fef3c7; color: #b45309;
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 99px;
}
.home-card-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.home-card-link {
  font-size: 12px; font-weight: 600; color: var(--brand-primary);
  background: none; border: none; cursor: pointer;
  padding: 0; transition: color 0.15s;
}
.home-card-link:hover { color: var(--brand-primary-hover); }

/* Announcements */
.home-announcements { padding: 6px 0; }
.announcement-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.announcement-item:last-child { border-bottom: none; }
.announcement-item:hover { background: #f8fafc; }
.ann-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.ann-dot.ann-urgent  { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
.ann-dot.ann-info    { background: #3b82f6; }
.ann-dot.ann-success { background: #22c55e; }
.ann-dot.ann-purple  { background: #7c3aed; }
.ann-body { flex: 1; }
.ann-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.ann-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 5px; }
.ann-meta { font-size: 11px; color: var(--text-muted); }

/* CEO Message */
.home-ceo-card { border-top: 3px solid var(--brand-primary); }
.ceo-message-body {
  display: flex;
  gap: 16px;
  padding: 20px;
  align-items: flex-start;
}
.ceo-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #134e4a, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: white;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
}
.ceo-content { flex: 1; }
.ceo-quote {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  font-style: italic;
  border-left: 3px solid var(--brand-primary);
  padding-left: 14px;
}
.ceo-sig { font-size: 12px; color: var(--text-muted); }
.ceo-sig strong { color: var(--text-primary); }

/* Quick Links */
.home-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}
.quick-link-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.18s;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}
.quick-link-btn:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.ql-icon { font-size: 22px; }

/* Learn & Grow */
.learn-items { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.learn-item { display: flex; align-items: center; gap: 12px; }
.learn-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--brand-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.learn-info { flex: 1; min-width: 0; }
.learn-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.learn-progress-bar { height: 5px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.learn-progress-fill { height: 100%; background: linear-gradient(90deg, #0d9488, #7c3aed); border-radius: 99px; transition: width 0.6s ease; }
.learn-meta { font-size: 11px; color: var(--text-muted); }

/* Company Performance */
.company-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.co-metric {
  background: white;
  padding: 16px 20px;
}
.co-metric-val { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.co-metric-label { font-size: 11px; color: var(--text-muted); margin: 3px 0 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.co-metric-trend { font-size: 11px; font-weight: 600; }
.co-metric-trend.co-up { color: #15803d; }
.co-metric-trend.co-down { color: #dc2626; }
.co-highlights-list { padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.co-highlight-item { font-size: 12px; color: var(--text-secondary); padding: 6px 0; border-bottom: 1px solid #f8fafc; }
.co-highlight-item:last-child { border-bottom: none; }

@media (max-width: 1100px) {
  .home-main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .home-glance-row { grid-template-columns: 1fr 1fr; }
  .home-welcome-banner { padding: 22px; }
  .home-username { font-size: 22px; }
  .home-avatar-hero { display: none; }
}
.stat-card.stat-amber { border-left: 4px solid #d97706; }
.stat-card.stat-purple{ border-left: 4px solid #7c3aed; }
.stat-card.stat-red   { border-left: 4px solid #dc2626; }

/* Org chart tree */
.org-tree { display: flex; justify-content: center; padding: 16px 0; }
.org-node-wrap {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.org-node-wrap::before {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 2px; height: 20px;
  background: #e2e8f0; display: block;
}
.org-node-wrap:first-child::before { display: none; }
.org-node {
  background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
  padding: 12px 14px; text-align: center; min-width: 120px; max-width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07); position: relative; z-index: 1;
  transition: box-shadow 0.2s;
}
.org-node:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.13); }
.org-node-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin: 0 auto 8px;
}
.org-node-name { font-size: 12px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.org-node-role { font-size: 10px; color: #6b7280; line-height: 1.3; min-height: 24px; }
.org-node-dept { font-size: 10px; font-weight: 600; margin-top: 4px; }
.org-children {
  display: flex; gap: 16px; padding-top: 20px; position: relative;
  justify-content: center;
}
.org-children::before {
  content: ''; position: absolute; top: 0; left: calc(50% - 1px);
  width: 2px; height: 20px; background: #e2e8f0;
}
.org-children::after {
  content: ''; position: absolute; top: 0;
  left: calc(50% - (var(--children-width, 50%) / 2));
  width: var(--children-width, 50%); height: 2px; background: #e2e8f0;
  display: none;
}

/* Notifications */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 20px; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid #f8fafc;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0fdfa; }
.notif-item-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.notif-item-body { flex: 1; }
.notif-item-msg { font-size: 13px; color: #374151; line-height: 1.4; }
.notif-item.unread .notif-item-msg { font-weight: 600; color: #111827; }
.notif-item-time { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #0d9488; flex-shrink: 0; margin-top: 6px;
}

/* Sidebar new section labels */
.sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: #71717a; padding: 14px 20px 4px; text-transform: uppercase;
}

/* Recruitment job grid */
#recruitJobsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
#trainingGrid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
#myGoalsList     { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
#myEnrollmentsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Field group (used inside modals/sections) */
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; font-weight: 600; color: #374151; }
.field-label.required::after { content: ' *'; color: #dc2626; }
.form-input { padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; outline: none; width: 100%; box-sizing: border-box; }
.form-input:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,0.15); }
.form-select { padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; outline: none; width: 100%; background: #fff; }

/* Button sizes */
.btn-sm { padding: 5px 12px !important; font-size: 12px !important; }
.btn-ghost { background: transparent !important; color: #6b7280 !important; border: 1px solid #e2e8f0 !important; }
.btn-ghost:hover { background: #f8fafc !important; color: #374151 !important; }

/* Margin utilities */
.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* Org chart horizontal connector (between siblings) */
.org-children > .org-node-wrap + .org-node-wrap::before { display: none; }

