/* ============================================================
   OneRealty — Full Design System
   Dark Mode | Purple Accent | Premium UI
   ============================================================ */

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

/* ── CSS Variables (Design Tokens) ─────────────────────────── */
:root {
  /* Colors */
  --bg:              #0A0C10;
  --bg-2:            #0D1117;
  --bg-3:            #11131A;
  --bg-4:            #1C202B;
  --card:            #11131A;
  --surface:         #11131A;

  --accent:          #A3E635;
  --accent-hover:    #BEF264;
  --accent-glow:     rgba(163, 230, 53, 0.25);
  --accent-soft:     rgba(163, 230, 53, 0.12);

  --success:         #10B981;
  --success-soft:    rgba(16, 185, 129, 0.12);
  --warning:         #F59E0B;
  --warning-soft:    rgba(245, 158, 11, 0.12);
  --danger:          #EF4444;
  --danger-soft:     rgba(239, 68, 68, 0.12);
  --info:            #3B82F6;
  --info-soft:       rgba(59, 130, 246, 0.12);

  --text-primary:    #F8FAFC;
  --text-secondary:  #CBD5E1; /* Was #94A3B8, made lighter for contrast */
  --text-muted:      #94A3B8; /* Was #64748B, made lighter for contrast */
  --text-inverse:    #0F172A;

  --border:          rgba(255, 255, 255, 0.12); /* Increased opacity from 0.07 */
  --border-accent:   rgba(108, 92, 231, 0.45);

  /* Typography */
  --font-main:       'Inter', sans-serif;
  --font-display:    'Manrope', sans-serif;

  /* Spacing */
  --sidebar-w:       260px;
  --sidebar-collapsed: 72px;
  --topbar-h:        64px;
  --radius-sm:       8px;
  --radius:          12px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-full:     9999px;

  /* Shadows */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow:          0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-accent:   0 4px 20px rgba(108, 92, 231, 0.3);

  /* Transitions */
  --t:               0.2s ease;
  --t-slow:          0.35s ease;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg:              #F8FAFC;
  --bg-2:            #F1F5F9;
  --bg-3:            #E2E8F0;
  --bg-4:            #CBD5E1;
  --card:            #FFFFFF;
  --surface:         #F8FAFC;
  --border:          rgba(0, 0, 0, 0.07);
  --text-primary:    #0F172A;
  --text-secondary:  #475569;
  --text-muted:      #94A3B8;
  --shadow:          0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:       0 8px 32px rgba(0,0,0,0.12);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family:    var(--font-main);
  background:     var(--bg);
  color:          var(--text-primary);
  font-size:      14px;
  line-height:    1.6;
  min-height:     100vh;
  transition:     background var(--t-slow), color var(--t-slow);
  overflow-x:     hidden;
}

/* ── Utility Classes ────────────────────────────────────────── */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted) !important; }
.font-600 { font-weight: 600; }
.flex-column { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }
.m-0 { margin: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.align-center { display: flex; align-items: center; }
.justify-between { display: flex; justify-content: space-between; }

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

img { max-width: 100%; display: block; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width:          var(--sidebar-w);
  height:         100vh;
  background:     var(--bg-2);
  border-right:   1px solid var(--border);
  display:        flex;
  flex-direction: column;
  position:       fixed;
  top:            0; left: 0;
  z-index:        100;
  transition:     width var(--t-slow);
  overflow:       hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  padding:     20px 20px 16px;
  display:     flex;
  align-items: center;
  gap:         12px;
  border-bottom: 1px solid var(--border);
  min-height:  var(--topbar-h);
}
.sidebar-logo .logo-icon {
  width:           40px; height: 40px;
  background:      linear-gradient(135deg, var(--accent), #8B7CF7);
  border-radius:   var(--radius);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       18px;
  flex-shrink:     0;
  box-shadow:      var(--shadow-accent);
}
.sidebar-logo .logo-text {
  font-family:  var(--font-display);
  font-size:    18px;
  font-weight:  800;
  color:        var(--text-primary);
  white-space:  nowrap;
}
.sidebar-logo .logo-text span { color: var(--accent); }
.sidebar.collapsed .logo-text { display: none; }

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

.nav-section-label {
  font-size:      10px;
  font-weight:    600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--text-muted);
  padding:        8px 20px 4px;
  white-space:    nowrap;
  overflow:       hidden;
  transition:     opacity var(--t);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display:     flex;
  align-items: center;
  gap:         12px;
  padding:     8px 20px;
  color:       var(--text-secondary);
  border-radius: 0;
  cursor:      pointer;
  transition:  all var(--t);
  white-space: nowrap;
  position:    relative;
  text-decoration: none;
  margin:      2px 10px;
  border-radius: var(--radius-sm);
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color:      var(--text-primary);
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.05); /* very subtle card background */
  color:      var(--accent);
}
.nav-item.active .nav-icon {
  color:      var(--accent);
}

.icon-blue { color: var(--info); }
.icon-orange { color: var(--warning); }
.icon-green { color: var(--success); }
.icon-muted { color: var(--text-muted); }
.nav-item .nav-icon {
  font-size:  16px;
  width:      24px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item .nav-label { font-size: 13px; font-weight: 500; }
.sidebar.collapsed .nav-label { display: none; }

.sidebar-footer {
  padding:       16px;
  border-top:    1px solid var(--border);
}
.user-info {
  display:     flex;
  align-items: center;
  gap:         10px;
  padding:     10px;
  border-radius: var(--radius);
  background:  var(--accent-soft);
  cursor:      pointer;
}
.user-avatar {
  width:           36px; height: 36px;
  background:      linear-gradient(135deg, var(--accent), #8B7CF7);
  border-radius:   var(--radius-full);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       14px;
  font-weight:     700;
  color:           #fff;
  flex-shrink:     0;
}
.user-name  { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.user-role  { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.sidebar.collapsed .user-info span { display: none; }

/* ── Main Content Area ──────────────────────────────────────── */
.main-content {
  margin-left:  var(--sidebar-w);
  width:        calc(100% - var(--sidebar-w));
  display:      flex;
  flex-direction: column;
  min-height:   100vh;
  transition:   all var(--t-slow);
}
.main-content.sidebar-collapsed { 
  margin-left: var(--sidebar-collapsed); 
  width: calc(100% - var(--sidebar-collapsed)); 
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height:          var(--topbar-h);
  background:      var(--bg-2);
  border-bottom:   1px solid var(--border);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0 24px;
  position:        sticky;
  top:             0; z-index: 90;
  backdrop-filter: blur(10px);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.toggle-btn {
  width:           36px; height: 36px;
  background:      var(--bg-3);
  border:          1px solid var(--border);
  border-radius:   var(--radius);
  color:           var(--text-secondary);
  font-size:       16px;
  cursor:          pointer;
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      all var(--t);
}
.toggle-btn:hover { background: var(--accent-soft); color: var(--accent); }

.page-title {
  font-family: var(--font-display);
  font-size:   18px;
  font-weight: 700;
  color:       var(--text-primary);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  width:           36px; height: 36px;
  background:      var(--bg-3);
  border:          1px solid var(--border);
  border-radius:   var(--radius);
  color:           var(--text-secondary);
  cursor:          pointer;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       16px;
  transition:      all var(--t);
  position:        relative;
}
.topbar-btn:hover { background: var(--accent-soft); color: var(--accent); }
.badge {
  position:   absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color:      #fff;
  font-size:  9px;
  font-weight: 700;
  width:      16px; height: 16px;
  border-radius: var(--radius-full);
  display:    flex;
  align-items: center;
  justify-content: center;
}

/* ── Page Content ───────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }

/* ── Stats Cards Grid ───────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       20px;
  display:       flex;
  align-items:   flex-start;
  gap:           16px;
  position:      relative;
  overflow:      hidden;
  transition:    transform var(--t), box-shadow var(--t), border-color var(--t);
  cursor:        default;
}
.stat-card::before {
  content:  '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height:   3px;
}
.stat-card.purple::before  { background: linear-gradient(90deg, var(--accent), #8B7CF7); }
.stat-card.green::before   { background: linear-gradient(90deg, var(--success), #34D399); }
.stat-card.orange::before  { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.stat-card.red::before     { background: linear-gradient(90deg, var(--danger),  #F87171); }
.stat-card.blue::before    { background: linear-gradient(90deg, var(--info),    #60A5FA); }

.stat-card:hover {
  transform:   translateY(-3px);
  box-shadow:  var(--shadow-lg);
  border-color: var(--border-accent);
}
.stat-icon {
  width:           48px; height: 48px;
  border-radius:   var(--radius);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       22px;
  flex-shrink:     0;
}
.stat-icon.purple  { background: var(--accent-soft); }
.stat-icon.green   { background: var(--success-soft); }
.stat-icon.orange  { background: var(--warning-soft); }
.stat-icon.red     { background: var(--danger-soft); }
.stat-icon.blue    { background: var(--info-soft); }

.stat-info { flex: 1; }
.stat-label  { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value  { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-change { font-size: 11px; color: var(--success); margin-top: 4px; }
.stat-change.down { color: var(--danger); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow:      hidden;
}
.card-header {
  padding:       16px 20px;
  border-bottom: 1px solid var(--border);
  display:       flex;
  align-items:   center;
  justify-content: space-between;
  gap:           12px;
}
.card-title {
  font-family: var(--font-display);
  font-size:   15px;
  font-weight: 700;
  color:       var(--text-primary);
}
.card-body { padding: 20px; }
.card-footer {
  padding:     12px 20px;
  border-top:  1px solid var(--border);
  background:  var(--bg-2);
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width:           100%;
  border-collapse: separate;
  border-spacing:  0;
}
thead th {
  background:     var(--bg-2);
  padding:        10px 16px;
  font-size:      11px;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          var(--text-muted);
  white-space:    nowrap;
  border-bottom:  1px solid var(--border);
}
tbody td {
  padding:        12px 16px;
  border-bottom:  1px solid var(--border);
  color:          var(--text-secondary);
  vertical-align: middle;
  font-size:      13.5px;
  transition:     background var(--t);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-3); }

.td-name { color: var(--text-primary); font-weight: 600; }
.td-mono { font-family: monospace; font-size: 13px; }

/* ── Badges / Status Chips ─────────────────────────────────── */
.chip {
  display:       inline-flex;
  align-items:   center;
  gap:           5px;
  padding:       3px 10px;
  border-radius: var(--radius-full);
  font-size:     11px;
  font-weight:   600;
  white-space:   nowrap;
}
.chip-purple   { background: var(--accent-soft);   color: var(--accent); }
.chip-green    { background: var(--success-soft);  color: var(--success); }
.chip-orange   { background: var(--warning-soft);  color: var(--warning); }
.chip-red      { background: var(--danger-soft);   color: var(--danger); }
.chip-blue     { background: var(--info-soft);     color: var(--info); }
.chip-gray     { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           7px;
  padding:       10px 20px;
  border-radius: var(--radius);
  font-size:     13.5px;
  font-weight:   600;
  font-family:   var(--font-main);
  cursor:        pointer;
  border:        none;
  transition:    all var(--t);
  white-space:   nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8B7CF7);
  color:      #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #9B8CF7);
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.4);
  color: #fff;
}

.btn-success { background: var(--success-soft); color: var(--success); }
.btn-success:hover { background: var(--success); color: #fff; }

.btn-danger  { background: var(--danger-soft);  color: var(--danger); }
.btn-danger:hover  { background: var(--danger);  color: #fff; }

.btn-warning { background: var(--warning-soft); color: var(--warning); }
.btn-warning:hover { background: var(--warning); color: #fff; }

.btn-ghost {
  background: var(--bg-3);
  color:      var(--text-secondary);
  border:     1px solid var(--border);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--border-accent); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms / Inputs ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display:     block;
  font-size:   12px;
  font-weight: 600;
  color:       var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width:         100%;
  padding:       12px 16px;
  background:    var(--bg-3);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  color:         var(--text-primary);
  font-size:     13.5px;
  font-family:   var(--font-main);
  transition:    all var(--t);
  outline:       none;
}
.form-control:focus {
  border-color: var(--accent);
  background:   var(--bg-4);
  box-shadow:   0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 40px; }
.input-group .input-icon {
  position:    absolute;
  left:        14px; top: 50%;
  transform:   translateY(-50%);
  color:       var(--text-muted);
  font-size:   15px;
}

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

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  position:   fixed;
  inset:      0;
  background: rgba(0, 0, 0, 0.65);
  z-index:    200;
  display:    flex;
  align-items: center;
  justify-content: center;
  padding:    16px;
  opacity:    0;
  visibility: hidden;
  transition: all var(--t);
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  width:         100%;
  max-width:     540px;
  max-height:    90vh;
  overflow-y:    auto;
  transform:     translateY(20px) scale(0.97);
  transition:    transform var(--t);
  box-shadow:    var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding:       20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display:       flex;
  align-items:   center;
  justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.modal-close {
  width:      32px; height: 32px;
  background: var(--bg-3);
  border:     none;
  border-radius: var(--radius);
  cursor:     pointer;
  color:      var(--text-muted);
  font-size:  16px;
  display:    flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-body   { padding: 20px 24px; }
.modal-footer {
  padding:    16px 24px;
  border-top: 1px solid var(--border);
  display:    flex;
  gap:        10px;
  justify-content: flex-end;
}

/* ── Search & Filters Bar ───────────────────────────────────── */
.filter-bar {
  display:       flex;
  align-items:   center;
  gap:           10px;
  flex-wrap:     wrap;
  margin-bottom: 20px;
  padding:       14px 16px;
  background:    var(--card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
}
.filter-bar .form-control { max-width: 200px; padding: 8px 12px; }

/* ── Call View (Employee Lead Screen) ───────────────────────── */
.call-card {
  background:    var(--card);
  border:        1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding:       32px;
  text-align:    center;
  max-width:     480px;
  margin:        0 auto 24px;
  box-shadow:    var(--shadow-accent);
}
.caller-name {
  font-family: var(--font-display);
  font-size:   28px;
  font-weight: 800;
  color:       var(--text-primary);
  margin-bottom: 6px;
}
.caller-phone {
  font-size:   20px;
  color:       var(--accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.call-actions {
  display:  flex;
  gap:      10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.call-actions .btn { min-width: 120px; justify-content: center; }
.call-icon { font-size: 48px; margin-bottom: 16px; }
.call-badge { display: inline-block; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; margin-bottom: 16px; }

/* ── Attendance Clock ───────────────────────────────────────── */
.att-clock {
  text-align: center;
  padding: 32px;
}
.clock-time {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.clock-date {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.att-status-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 4px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
  position: relative;
}
.att-status-ring.present { border-color: var(--success); box-shadow: 0 0 20px rgba(16,185,129,0.3); }
.att-status-ring.absent  { border-color: var(--danger);  box-shadow: 0 0 20px rgba(239,68,68,0.3); }

/* ── Progress Bars ──────────────────────────────────────────── */
.progress-bar { background: var(--bg-3); border-radius: var(--radius-full); height: 6px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), #8B7CF7);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-fill.green  { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-fill.orange { background: linear-gradient(90deg, var(--warning), #FCD34D); }

/* ── Toast Notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display:    flex;
  align-items: center;
  gap:        12px;
  background: var(--card);
  border:     1px solid var(--border);
  border-radius: var(--radius);
  padding:    14px 18px;
  min-width:  280px;
  max-width:  380px;
  box-shadow: var(--shadow-lg);
  transform:  translateX(120%);
  pointer-events: all;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid var(--accent);
}
.toast.show   { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast-icon   { font-size: 18px; }
.toast-msg    { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }

/* ── Salary Slip ────────────────────────────────────────────── */
.salary-slip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 600px;
}
.salary-slip-header {
  background: linear-gradient(135deg, var(--accent), #8B7CF7);
  padding: 24px;
  color: #fff;
  text-align: center;
}
.salary-slip-header h2 { font-family: var(--font-display); font-size: 22px; }
.slip-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.slip-row:last-child { border-bottom: none; }
.slip-row .label { color: var(--text-muted); }
.slip-row .value { font-weight: 600; color: var(--text-primary); }
.slip-row.total { background: var(--accent-soft); font-weight: 700; }
.slip-row.deduction .value { color: var(--danger); }
.slip-row.net .value { color: var(--success); font-size: 18px; font-family: var(--font-display); }

/* ── TCF Commission ─────────────────────────────────────────── */
.tcf-calc {
  background: linear-gradient(135deg, var(--accent-soft), rgba(139,124,247,0.08));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.commission-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; }
.page-btn {
  width: 34px; height: 34px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-text  { font-size: 13.5px; }

/* ── Utility Classes ────────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mb-3   { margin-bottom: 12px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.p-0    { padding: 0 !important; }
.text-sm   { font-size: 12px; }
.text-primary   { color: var(--text-primary); }
.text-muted     { color: var(--text-muted); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-accent    { color: var(--accent); }
.text-warning   { color: var(--warning); }
.font-bold      { font-weight: 700; }
.font-display   { font-family: var(--font-display); }
.w-full         { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-text, .sidebar .nav-label, .sidebar .nav-section-label, .sidebar .user-info span { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); width: calc(100% - var(--sidebar-collapsed)); }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar .logo-text, .sidebar .nav-label, .sidebar .nav-section-label, .sidebar .user-info span { display: block; }
  .main-content { margin-left: 0; width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row, .form-row-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .filter-bar .form-control { max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .call-actions .btn { min-width: 100px; padding: 8px 12px; }
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fade { animation: fadeInUp 0.4s ease; }
.loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.login-bg-orb-1 {
  width: 500px; height: 500px;
  background: rgba(108, 92, 231, 0.15);
  top: -100px; right: -100px;
}
.login-bg-orb-2 {
  width: 400px; height: 400px;
  background: rgba(16, 185, 129, 0.08);
  bottom: -100px; left: -100px;
}
.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--accent), #8B7CF7);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-accent);
}
.login-logo h1 { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.login-logo h1 span { color: var(--accent); }
.login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.login-error {
  background: var(--danger-soft);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }
