/* =====================================================
   Staff Management System - Main Stylesheet
   Designed and Developed by Sahil Zaini | YCS Trust
   ===================================================== */

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

:root {
  --accent: #FF6B2B;
  --accent-dark: #E85A1E;
  --accent-light: #FFF0E9;
  --sidebar-bg: #0F1117;
  --sidebar-text: #94A3B8;
  --sidebar-active: #FF6B2B;
  --sidebar-hover: #1A1D27;
  --sidebar-width: 240px;
  --topbar-h: 60px;
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-alt: #F8F9FC;
  --border: #E2E8F0;
  --text-primary: #0F1117;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --purple: #8B5CF6;
  --teal: #14B8A6;
  --orange: #F97316;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  line-height: 1.5;
  overflow-x: hidden;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .25s ease;
  scrollbar-width: thin;
  scrollbar-color: #1E2130 transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #1E2130; border-radius: 4px; }

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-text .name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.2;
}
.brand-text .sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

.nav-section-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #3D4460;
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #CBD5E1;
}
.nav-item.active {
  color: #fff;
  background: rgba(255,107,43,.12);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  line-height: 16px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px;
  color: #3D4460;
  text-align: center;
  flex-shrink: 0;
}

/* =====================================================
   MAIN LAYOUT
   ===================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  gap: 8px;
  width: 260px;
}
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
  font-family: var(--font);
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search .search-icon { color: var(--text-muted); font-size: 14px; }

.admin-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 24px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color .15s;
}
.admin-pill:hover { border-color: var(--accent); }
.admin-avatar {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  font-family: var(--font);
}
.topbar-btn:hover { background: var(--bg); border-color: var(--text-muted); }
.topbar-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.topbar-btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.topbar-btn.success { background: var(--success); color: #fff; border-color: var(--success); }
.topbar-btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.page-content { padding: 24px; flex: 1; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header-left h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header-left p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.page-header-actions { display: flex; gap: 10px; align-items: center; }

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.orange { background: #FFF0E9; }
.stat-icon.green { background: #ECFDF5; }
.stat-icon.red { background: #FEF2F2; }
.stat-icon.blue { background: #EFF6FF; }
.stat-icon.yellow { background: #FFFBEB; }
.stat-icon.purple { background: #F5F3FF; }
.stat-icon.teal { background: #F0FDFA; }
.stat-icon.gray { background: #F8FAFC; }
.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .02em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}
.stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =====================================================
   TABLES
   ===================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: var(--surface-alt);
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }
.table-actions { display: flex; gap: 6px; align-items: center; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
  font-family: var(--font);
  line-height: 1;
  white-space: nowrap;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #D97706; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563EB; }
.btn-ghost { background: transparent; border: none; color: var(--text-secondary); padding: 6px 10px; }
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; }
.btn-icon.sm { width: 28px; height: 28px; padding: 5px; }

/* =====================================================
   FORMS
   ===================================================== */
.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: var(--font);
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,107,43,.12);
}
.form-control:disabled, .form-control[readonly] {
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: not-allowed;
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: 11.5px; color: var(--text-muted); }
.form-error { font-size: 11.5px; color: var(--danger); }

.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .input-prefix,
.input-group .input-suffix {
  padding: 9px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.input-group .input-prefix { border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .input-suffix { border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control { border-radius: 0; flex: 1; }
.input-group .form-control:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .form-control:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #ECFDF5; color: #065F46; }
.badge-danger { background: #FEF2F2; color: #991B1B; }
.badge-warning { background: #FFFBEB; color: #92400E; }
.badge-info { background: #EFF6FF; color: #1E40AF; }
.badge-secondary { background: #F1F5F9; color: #475569; }
.badge-purple { background: #F5F3FF; color: #5B21B6; }
.badge-teal { background: #F0FDFA; color: #134E4A; }
.badge-orange { background: #FFF7ED; color: #9A3412; }
.badge-blue { background: #EFF6FF; color: #1E40AF; }

/* =====================================================
   ALERTS / FLASH
   ===================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13.5px;
}
.alert-success { background: #ECFDF5; border-left: 4px solid var(--success); color: #065F46; }
.alert-danger { background: #FEF2F2; border-left: 4px solid var(--danger); color: #991B1B; }
.alert-warning { background: #FFFBEB; border-left: 4px solid var(--warning); color: #92400E; }
.alert-info { background: #EFF6FF; border-left: 4px solid var(--info); color: #1E40AF; }
.alert-close { margin-left: auto; cursor: pointer; opacity: .7; background: none; border: none; font-size: 18px; line-height: 1; color: inherit; }

/* =====================================================
   TABS
   ===================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  font-family: var(--font);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,17,23,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transform: translateY(-12px);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { max-width: 740px; }
.modal-xl { max-width: 960px; }
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* =====================================================
   FILTER BAR
   ===================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar .form-control { height: 36px; padding: 6px 10px; font-size: 13px; }
.filter-bar .btn { height: 36px; }
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  min-width: 220px;
}
.filter-search input { border: none; outline: none; font-size: 13px; background: transparent; color: var(--text-primary); font-family: var(--font); width: 100%; }
.filter-search input::placeholder { color: var(--text-muted); }

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* =====================================================
   EMPLOYEE PHOTO
   ===================================================== */
.emp-avatar {
  width: 36px; height: 36px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-cell .emp-name { font-weight: 600; color: var(--text-primary); font-size: 13.5px; }
.emp-cell .emp-id { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

/* =====================================================
   AMOUNT / MONEY
   ===================================================== */
.amount-positive { color: var(--success); font-weight: 700; font-family: var(--mono); }
.amount-negative { color: var(--danger); font-weight: 700; font-family: var(--mono); }
.amount-neutral { color: var(--text-primary); font-weight: 700; font-family: var(--mono); }

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0F1117;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #181C27;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.07);
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}
.login-brand h1 { font-size: 22px; font-weight: 800; color: #fff; }
.login-brand p { font-size: 12.5px; color: #4A5568; margin-top: 4px; }

.login-card label { color: #94A3B8; }
.login-card .form-control {
  background: #0F1117;
  border-color: rgba(255,255,255,.1);
  color: #fff;
}
.login-card .form-control:focus { border-color: var(--accent); }
.login-card .form-control::placeholder { color: #3D4460; }
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: #2D3748;
}

/* =====================================================
   PROFILE / VIEW PAGE
   ===================================================== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h2 { font-size: 18px; font-weight: 800; }
.profile-info .role { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.profile-info .meta { display: flex; gap: 16px; margin-top: 8px; }
.profile-info .meta-item { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.info-row:nth-child(odd) { border-right: 1px solid var(--border); }
.info-row .info-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.info-row .info-value { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }

/* =====================================================
   SALARY BREAKDOWN
   ===================================================== */
.salary-breakdown {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.salary-section { background: var(--surface); }
.salary-section-header {
  padding: 10px 16px;
  background: var(--surface-alt);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.salary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.salary-row:last-child { border-bottom: none; }
.salary-row.total {
  background: var(--text-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.salary-row.total .amount { color: #fff; }
.salary-addition .amount { color: var(--success); font-weight: 700; }
.salary-deduction .amount { color: var(--danger); font-weight: 700; }

/* =====================================================
   CHARTS
   ===================================================== */
.chart-container { position: relative; }

/* =====================================================
   ATTENDANCE GRID
   ===================================================== */
.att-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.att-day {
  aspect-ratio: 1;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
}
.att-day.present { background: #ECFDF5; color: #065F46; }
.att-day.absent { background: #FEF2F2; color: #991B1B; }
.att-day.half_day { background: #FFFBEB; color: #92400E; }
.att-day.leave { background: #EFF6FF; color: #1E40AF; }
.att-day.none { background: var(--surface-alt); color: var(--text-muted); }
.att-day.today { outline: 2px solid var(--accent); }

/* =====================================================
   MISC
   ===================================================== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: var(--mono); }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.p-0 { padding: 0; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 600; }

.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.page-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-text {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.tooltip-wrap:hover .tooltip-text { opacity: 1; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  gap: 4px;
}

/* Print styles */
@media print {
  .sidebar, .topbar, .page-header-actions, .filter-bar, .btn { display: none !important; }
  .main-wrapper { margin-left: 0; }
  body { background: #fff; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
