/* =========================================================
   style.css — Complete design system for PaySlip Pro
   ========================================================= */

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

/* ── CSS Variables / Design Tokens ───────────────────────*/
:root {
  --bg-base:       #0a0a14;
  --bg-surface:    #0f0f1e;
  --bg-elevated:   #141428;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-focus:  rgba(139,92,246,0.5);

  --purple-50:  #f5f3ff;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --indigo-500: #6366f1;
  --blue-500:   #3b82f6;
  --cyan-500:   #06b6d4;
  --green-400:  #4ade80;
  --green-500:  #22c55e;
  --green-600:  #16a34a;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --red-400:    #f87171;
  --red-500:    #ef4444;
  --red-600:    #dc2626;
  --yellow-400: #facc15;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-accent:    #a78bfa;

  --sidebar-w: 240px;
  --header-h:  64px;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(139,92,246,0.2);

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --gradient-brand: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  --gradient-dark:  linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(99,102,241,0.05) 100%);
}

/* ── Reset ───────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbars ──────────────────────────────────────────*/
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.5); }

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════*/
#login-screen {
  min-height: 100vh;
  display: flex;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139,92,246,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* Animated orbs */
.login-bg::before, .login-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite alternate;
}
.login-bg::before {
  width: 400px; height: 400px;
  background: rgba(139,92,246,0.12);
  top: -100px; left: -100px;
}
.login-bg::after {
  width: 300px; height: 300px;
  background: rgba(99,102,241,0.1);
  bottom: -80px; right: -80px;
  animation-delay: -4s;
}
@keyframes float { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,20px) scale(1.1); } }

.login-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  margin: auto;
  padding: 2rem;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-icon {
  width: 48px; height: 48px;
  background: var(--gradient-brand);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(139,92,246,0.4);
}

.login-headline {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}
.login-headline span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-desc { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; max-width: 420px; }

.login-features { display: flex; flex-direction: column; gap: 12px; }
.login-feature {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-secondary); font-size: 0.9rem;
}
.login-feature::before {
  content: '✓';
  width: 22px; height: 22px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-400);
  font-size: 11px;
  flex-shrink: 0;
}

/* Login Card */
.login-card {
  width: 420px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(139,92,246,0.08);
}

.login-card-header { text-align: center; margin-bottom: 2rem; }
.login-card-header h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }

.login-tabs { display: flex; background: rgba(139,92,246,0.08); border-radius: 8px; padding: 4px; margin-top: 1.25rem; }
.login-tab { flex: 1; padding: 8px; border-radius: 6px; border: none; background: transparent; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-size: 0.9rem; }
.login-tab:hover { color: var(--text-primary); }
.login-tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
#login-subtitle { color: var(--text-secondary); font-size: 0.875rem; }
#login-error { color: var(--red-400); font-size: 0.85rem; margin-top: 0.5rem; text-align: center; min-height: 1.2em; }

.login-form-group { margin-bottom: 1.25rem; }
.login-form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.login-input-wrap { position: relative; }
.login-input-wrap input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.login-input-wrap input:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px; line-height: 1;
  padding: 4px;
}

.login-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--gradient-brand);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
  margin-top: 0.5rem;
}
.login-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(139,92,246,0.5); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-footer-note { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 1.5rem; }

/* ═══════════════════════════════════════════════════════════
   APP SHELL LAYOUT
═══════════════════════════════════════════════════════════*/
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────*/
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-logo {
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(139,92,246,0.4);
  flex-shrink: 0;
}
#sidebar-logo-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.nav-item.active {
  background: rgba(139,92,246,0.15);
  color: var(--purple-400);
  border: 1px solid rgba(139,92,246,0.2);
}
.nav-item.active .nav-icon svg { stroke: var(--purple-400); }
.nav-icon { width: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  font-size: 0.65rem; font-weight: 700;
  background: var(--gradient-brand);
  color: white;
  padding: 2px 6px;
  border-radius: 99px;
}

/* Sidebar bottom: user info */
.sidebar-user {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 34px; height: 34px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 0.72rem; color: var(--text-muted); }
.sidebar-logout {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--red-400); background: rgba(239,68,68,0.1); }

/* ── Main Content ────────────────────────────────────────*/
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top header bar */
#page-header {
  height: var(--header-h);
  background: rgba(10,10,20,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

#sidebar-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 1.2rem; padding: 6px;
}
#page-title { font-size: 1.1rem; font-weight: 700; flex: 1; }

.header-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
#header-user-avatar {
  width: 30px; height: 30px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}
.header-user-info { line-height: 1.2; }
#header-user-name { font-size: 0.85rem; font-weight: 600; }
#header-user-role { font-size: 0.7rem; color: var(--text-muted); }

/* Page body */
#page-body {
  flex: 1;
  padding: 1.75rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   GLASS CARDS
═══════════════════════════════════════════════════════════*/
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.glass-card:hover { border-color: rgba(255,255,255,0.12); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.card-header h3 { font-size: 1rem; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════════════*/
.dashboard-grid { display: flex; flex-direction: column; gap: 1.25rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

.stat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 2rem; flex-shrink: 0; }
.stat-content { flex: 1; min-width: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-title { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }
.stat-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.stat-glow {
  position: absolute;
  right: -20px; bottom: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.4;
}
.stat-purple .stat-value { color: var(--purple-400); }
.stat-purple .stat-glow { background: var(--purple-500); }
.stat-green .stat-value { color: var(--green-400); }
.stat-green .stat-glow { background: var(--green-500); }
.stat-blue .stat-value { color: #60a5fa; }
.stat-blue .stat-glow { background: var(--blue-500); }
.stat-orange .stat-value { color: var(--orange-400); }
.stat-orange .stat-glow { background: var(--orange-500); }

.dashboard-main { display: grid; grid-template-columns: 1fr 380px; gap: 1.25rem; }
.chart-card { display: flex; flex-direction: column; }
.chart-wrapper { flex: 1; min-height: 220px; position: relative; }

.activity-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 320px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-avatar {
  width: 32px; height: 32px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: white;
  flex-shrink: 0;
}
.activity-info { flex: 1; min-width: 0; }
.activity-name { font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.activity-empid { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }
.activity-detail { font-size: 0.78rem; color: var(--text-secondary); }
.activity-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.activity-time { font-size: 0.68rem; color: var(--text-muted); }

.empty-state-sm { color: var(--text-muted); font-size: 0.85rem; padding: 1rem 0; text-align: center; }

.quick-actions { padding: 1.5rem; }
.quick-actions h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.actions-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; }
.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 1rem 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition);
  text-align: center;
}
.action-btn:hover { background: rgba(139,92,246,0.1); border-color: rgba(139,92,246,0.3); color: var(--purple-400); transform: translateY(-2px); }
.action-icon { font-size: 1.5rem; }

.dept-card {}
.dept-list { display: flex; flex-direction: column; gap: 0.75rem; }
.dept-row { display: flex; align-items: center; gap: 12px; }
.dept-name { width: 120px; font-size: 0.82rem; color: var(--text-secondary); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-bar-wrap { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.dept-bar { height: 100%; background: var(--gradient-brand); border-radius: 4px; transition: width 0.6s ease; }
.dept-count { width: 90px; text-align: right; font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════*/
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(139,92,246,0.4); }

.btn-secondary {
  background: rgba(99,102,241,0.15);
  color: var(--indigo-500);
  border: 1px solid rgba(99,102,241,0.3);
}
.btn-secondary:hover:not(:disabled) { background: rgba(99,102,241,0.25); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--red-400);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }

.icon-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.icon-btn-danger:hover { background: rgba(239,68,68,0.15); color: var(--red-400); border-color: rgba(239,68,68,0.3); }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════*/
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.875rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.form-group select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.req { color: var(--red-400); }
.lop-hint { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-section { margin-bottom: 1.5rem; }
.form-section-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.form-subsection-title { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin: 0.75rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ═══════════════════════════════════════════════════════════
   PAGE TOOLBAR
═══════════════════════════════════════════════════════════*/
.page-toolbar {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.875rem;
  flex: 1; min-width: 220px;
}
.search-box input {
  background: none; border: none;
  color: var(--text-primary); font-family: inherit; font-size: 0.875rem;
  width: 100%; outline: none;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-icon { color: var(--text-muted); font-size: 0.85rem; flex-shrink: 0; }
.toolbar-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toolbar-filters select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 2rem 0.55rem 0.875rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition);
}
.toolbar-filters select:focus { border-color: var(--purple-500); }
.toolbar-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════*/
.table-card { padding: 0; overflow: hidden; }
.table-info { padding: 1rem 1.5rem 0; font-size: 0.8rem; color: var(--text-muted); }
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  white-space: nowrap;
}
.table-row { cursor: pointer; transition: background var(--transition); }
.table-row:hover td { background: rgba(255,255,255,0.03); }
.table-row:last-child td { border-bottom: none; }

.emp-cell { display: flex; align-items: center; gap: 10px; }
.emp-avatar {
  width: 36px; height: 36px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: white; flex-shrink: 0;
}
.emp-avatar.sm { width: 30px; height: 30px; font-size: 0.75rem; }
.emp-name { font-weight: 600; font-size: 0.875rem; }
.emp-email { font-size: 0.75rem; color: var(--text-muted); }
.emp-id-badge {
  display: inline-flex;
  padding: 2px 8px;
  background: rgba(139,92,246,0.12);
  color: var(--purple-400);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.salary-cell { font-weight: 700; color: var(--green-400); }
.deduction { color: var(--red-400) !important; }
.row-actions { display: flex; gap: 4px; }

.status-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════*/
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success  { background: rgba(34,197,94,0.15); color: var(--green-400); border: 1px solid rgba(34,197,94,0.2); }
.badge-warning  { background: rgba(250,204,21,0.12); color: var(--yellow-400); border: 1px solid rgba(250,204,21,0.2); }
.badge-info     { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.badge-muted    { background: rgba(100,116,139,0.15); color: var(--text-muted); border: 1px solid rgba(100,116,139,0.2); }
.badge-blue     { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.badge-purple   { background: rgba(139,92,246,0.12); color: var(--purple-400); border: 1px solid rgba(139,92,246,0.2); }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════*/
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 2rem; gap: 1rem;
}
.empty-icon { font-size: 3.5rem; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; max-width: 320px; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════*/
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
#modal-overlay.active { opacity: 1; pointer-events: all; }

#modal-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 820px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.25s ease;
}
#modal-overlay.active #modal-container { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-secondary);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close-btn:hover { background: rgba(239,68,68,0.15); color: var(--red-400); border-color: rgba(239,68,68,0.3); }
#modal-body { padding: 1.75rem; overflow-y: auto; flex: 1; }
#modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1.25rem 1.75rem; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Confirm dialog */
.confirm-body { display: flex; align-items: flex-start; gap: 1rem; }
.confirm-icon { font-size: 2rem; flex-shrink: 0; }
.confirm-body p { color: var(--text-secondary); line-height: 1.6; padding-top: 4px; }

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════*/
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
  border: 1px solid;
  box-shadow: var(--shadow-md);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: all;
  max-width: 340px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-success { background: rgba(22,163,74,0.15); border-color: rgba(34,197,94,0.3); color: var(--green-400); }
.toast-error { background: rgba(220,38,38,0.15); border-color: rgba(239,68,68,0.3); color: var(--red-400); }
.toast-warning { background: rgba(217,119,6,0.15); border-color: rgba(250,204,21,0.3); color: var(--yellow-400); }
.toast-info { background: rgba(37,99,235,0.15); border-color: rgba(59,130,246,0.3); color: #60a5fa; }

/* ═══════════════════════════════════════════════════════════
   EMPLOYEES PAGE
═══════════════════════════════════════════════════════════*/
.emp-form { display: flex; flex-direction: column; gap: 0; }
.salary-preview {
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.preview-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; }
.preview-row strong { color: var(--text-primary); }
.preview-row .deduction { color: var(--red-400); }
.preview-net { padding-top: 0.5rem; border-top: 1px solid rgba(139,92,246,0.2); font-size: 1rem; }
.preview-net strong { color: var(--green-400); font-size: 1.1rem; }

/* Employee Detail */
.emp-detail-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.emp-detail-avatar {
  width: 64px; height: 64px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: white; flex-shrink: 0;
}
.emp-detail-avatar + div h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.4rem; }
.emp-detail-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 0.4rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.detail-section { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-section-title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.detail-row { display: flex; gap: 8px; padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.detail-label { width: 100px; font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }
.detail-value { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.detail-notes { margin-top: 1rem; padding: 0.875rem; background: rgba(255,255,255,0.04); border-radius: var(--radius-md); font-size: 0.85rem; color: var(--text-secondary); }
.slip-mini-row { display: flex; align-items: center; gap: 12px; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.82rem; }
.slip-mini-row span:first-child { flex: 1; }
.slip-mini-row span:nth-child(2) { font-weight: 600; color: var(--green-400); }

/* ═══════════════════════════════════════════════════════════
   SALARY STRUCTURE PAGE
═══════════════════════════════════════════════════════════*/
.salary-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; }
.emp-selector { padding: 0; overflow: hidden; }
.selector-header { padding: 0.875rem; border-bottom: 1px solid var(--border); }
.selector-header input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; color: var(--text-primary); font-family: inherit; font-size: 0.82rem; outline: none; }
.selector-list { overflow-y: auto; max-height: 75vh; }
.selector-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.selector-item:hover { background: rgba(255,255,255,0.04); }
.selector-item.active { background: rgba(139,92,246,0.12); }
.selector-avatar { width: 30px; height: 30px; background: var(--gradient-brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: white; flex-shrink: 0; }
.selector-name { font-size: 0.85rem; font-weight: 600; }
.selector-sub { font-size: 0.72rem; color: var(--text-muted); }

.editor-card { padding: 0; overflow: hidden; }
.editor-emp-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.editor-avatar { width: 48px; height: 48px; background: var(--gradient-brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; color: white; flex-shrink: 0; }
.editor-emp-header h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.editor-emp-sub { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-secondary); }
.editor-actions { margin-left: auto; display: flex; gap: 0.5rem; flex-shrink: 0; }

.salary-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--border); }
.sal-col { padding: 1.25rem 1.5rem; border-right: 1px solid var(--border); }
.sal-col:last-child { border-right: none; }
.sal-col-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.875rem; }
.earnings-title { color: var(--green-400); }
.deductions-title { color: var(--red-400); }
.sal-items { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.sal-item { display: flex; align-items: center; gap: 8px; }
.sal-label { flex: 1; font-size: 0.82rem; color: var(--text-secondary); min-width: 0; }
.sal-input {
  width: 110px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: right;
  transition: border-color var(--transition);
  flex-shrink: 0;
}
.sal-input:focus { outline: none; border-color: var(--purple-500); }
.sal-currency { font-size: 0.8rem; color: var(--text-muted); width: 16px; flex-shrink: 0; }
.sal-total { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.875rem; font-weight: 600; }
.deduction-total { color: var(--red-400); }

.net-pay-banner {
  margin: 1.25rem 1.5rem;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex; align-items: center; gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.net-pay-label { font-size: 0.75rem; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; flex-shrink: 0; }
.net-pay-amount { font-size: 2rem; font-weight: 800; flex-shrink: 0; }
.net-pay-words { font-size: 0.78rem; opacity: 0.85; flex: 1; }

.sal-chart-section { padding: 1rem 1.5rem 1.5rem; }
.sal-chart-title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.sal-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.comp-bar-row { display: flex; align-items: center; gap: 10px; }
.comp-name { width: 80px; font-size: 0.75rem; color: var(--text-secondary); flex-shrink: 0; }
.comp-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.comp-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.comp-val { font-size: 0.72rem; color: var(--text-muted); width: 140px; text-align: right; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   SALARY SLIPS PAGE
═══════════════════════════════════════════════════════════*/
.slips-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.25rem; }
.slip-generator h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.gen-form { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.gen-preview {
  background: rgba(139,92,246,0.06);
  border: 1px dashed rgba(139,92,246,0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  min-height: 80px;
  display: flex; flex-direction: column; justify-content: center;
}
.gen-preview-placeholder { color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.gen-actions { display: flex; justify-content: flex-end; }
.preview-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(139,92,246,0.2); }
.preview-emp { font-weight: 700; font-size: 0.95rem; }
.preview-period { font-size: 0.82rem; color: var(--text-muted); }
.preview-rows { display: flex; flex-direction: column; gap: 0.4rem; }
.preview-row-item { display: flex; justify-content: space-between; font-size: 0.82rem; }
.preview-net-row { font-size: 0.95rem; font-weight: 700; padding-top: 0.4rem; border-top: 1px solid rgba(139,92,246,0.2); }
.text-green { color: var(--green-400); }
.text-red { color: var(--red-400); }

.recent-slips h3 { font-size: 1rem; font-weight: 700; }
.recent-slip-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.recent-slip-item:last-child { border-bottom: none; }
.rs-info { flex: 1; min-width: 0; }
.rs-name { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-period { font-size: 0.72rem; color: var(--text-muted); }
.rs-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.rs-amount { font-size: 0.85rem; font-weight: 700; color: var(--green-400); }
.rs-actions { display: flex; gap: 3px; flex-shrink: 0; }

/* History Toolbar */
.history-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}

/* Slip Preview Modal */
.slip-preview-wrap {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
}
/* (slip styles for modal preview use print styles inline) */

/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════════*/
.settings-layout { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-card { }
.settings-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; padding-bottom: 0.875rem; border-bottom: 1px solid var(--border); }
.settings-icon { font-size: 1.2rem; }
.settings-card-header h3 { font-size: 1rem; font-weight: 700; }
.settings-body { display: flex; flex-direction: column; gap: 1rem; }
.settings-desc { font-size: 0.85rem; color: var(--text-secondary); }

.logo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.logo-upload-area:hover { border-color: var(--purple-500); background: rgba(139,92,246,0.05); }
.logo-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); }
.logo-placeholder span { font-size: 2rem; }
.logo-placeholder p { font-size: 0.82rem; }
.logo-placeholder small { font-size: 0.72rem; }

.component-section { }
.component-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.component-title { font-size: 0.875rem; font-weight: 700; }
.component-item { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); margin-bottom: 4px; }
.component-name { font-size: 0.85rem; }

.danger-zone .settings-card-header h3 { color: var(--red-400); }
.danger-zone { border-color: rgba(239,68,68,0.2); }
.danger-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.danger-item:last-child { border-bottom: none; }
.danger-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 3px; }
.danger-desc { font-size: 0.78rem; color: var(--text-muted); }

/* Admin Management */
.admin-mgmt { display: flex; flex-direction: column; gap: 1.25rem; }
.admin-header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-stats { display: flex; gap: 2rem; }
.admin-stat { display: flex; flex-direction: column; align-items: center; }
.admin-stat strong { font-size: 1.5rem; font-weight: 800; color: var(--purple-400); }
.admin-stat span { font-size: 0.75rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   SALARY SLIP PREVIEW (modal)
═══════════════════════════════════════════════════════════*/
.salary-slip {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 12.5px;
  color: #111;
  background: white;
  padding: 28px 32px;
}
.slip-header { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; border-bottom: 2px solid #4f46e5; padding-bottom: 14px; }
.slip-logo { width: 64px; height: 64px; object-fit: contain; }
.slip-logo-placeholder { font-size: 48px; }
.slip-company-name { font-size: 20px; font-weight: 800; color: #1e1b4b; margin-bottom: 3px; }
.slip-company-info p { color: #555; margin: 2px 0; font-size: 11.5px; }
.slip-company-ids { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 11px; color: #666; }
.slip-title-bar { background: #4f46e5; color: white; display: flex; justify-content: space-between; padding: 9px 16px; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; margin: 12px 0; border-radius: 4px; }
.slip-emp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px 20px; margin-bottom: 12px; border: 1px solid #e2e8f0; padding: 10px 14px; border-radius: 4px; }
.slip-emp-row { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px solid #f1f5f9; font-size: 11.5px; }
.slip-emp-row span:first-child { color: #777; width: 120px; flex-shrink: 0; }
.slip-emp-row strong { color: #111; }
.slip-emp-row .lop { color: #dc2626; }
.slip-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.slip-table th { background: #f8fafc; padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700; border: 1px solid #ddd; color: #333; text-transform: uppercase; letter-spacing: 0.04em; }
.slip-table td { padding: 6px 10px; border: 1px solid #eee; font-size: 11.5px; }
.slip-table .amt { text-align: right; }
.slip-totals td { background: #f1f5f9; font-weight: 700; font-size: 12px; border-top: 2px solid #ddd; }
.slip-net { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: white; padding: 14px 20px; border-radius: 8px; display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.slip-net-label { font-size: 10px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; flex-shrink: 0; }
.slip-net-amount { font-size: 24px; font-weight: 800; flex-shrink: 0; }
.slip-net-words { font-size: 11px; opacity: 0.85; flex: 1; }
/* Leave section divider in generator form */
.leave-section-divider {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-secondary);
  padding: 0.6rem 0 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  letter-spacing: 0.03em;
}

/* Live leave-balance preview widget */
.leave-balance-preview {
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.lbp-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-secondary);
}
.lbp-row strong { font-size: 0.875rem; color: var(--text-primary); }
.lbp-balance-row {
  padding-top: 0.45rem;
  border-top: 1px solid rgba(139,92,246,0.2);
  font-weight: 600;
}
.lbp-balance-row strong { font-size: 0.95rem; }

/* Leave table on salary slip (modal preview) */
.slip-leave-section {
  margin: 10px 0;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.slip-leave-title {
  background: #f8fafc;
  padding: 6px 12px;
  font-size: 10.5px; font-weight: 700;
  color: #444; letter-spacing: 0.07em;
  border-bottom: 1px solid #e2e8f0;
}
.slip-leave-table {
  width: 100%; border-collapse: collapse;
}
.slip-leave-table th {
  background: #f1f5f9;
  padding: 7px 10px; font-size: 10.5px; font-weight: 600;
  color: #555; text-align: center;
  border: 1px solid #dde;
}
.slip-leave-table td {
  padding: 7px 10px; font-size: 11.5px;
  border: 1px solid #eee; text-align: center;
}
.lv-center { text-align: center; }
.lv-taken  { color: #b45309; font-weight: 600; }
.lv-positive { color: #16a34a; font-weight: 700; }
.lv-negative { color: #dc2626; font-weight: 700; }

.slip-remarks { font-size: 11px; color: #555; margin-bottom: 12px; padding: 8px 12px; background: #fffbeb; border-left: 3px solid #f59e0b; border-radius: 0 4px 4px 0; }
.slip-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 24px; padding-top: 14px; border-top: 1px solid #ddd; }
.slip-sign-area { text-align: center; font-size: 11px; color: #666; }
.slip-sign-line { width: 130px; border-bottom: 1px solid #aaa; margin-bottom: 8px; height: 36px; }
.slip-generated { text-align: center; font-size: 10px; color: #999; }

/* ═══════════════════════════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════════════════════════*/
.muted-text { color: var(--text-muted); }
.section-heading { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.text-green { color: var(--green-400); }
.text-red { color: var(--red-400); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════*/
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-main { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  #sidebar { transform: translateX(-240px); width: 240px; }
  #sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  #main-content { margin-left: 0; }
  #sidebar-toggle { display: flex; }
  .salary-layout { grid-template-columns: 1fr; }
  .slips-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .salary-breakdown { grid-template-columns: 1fr; }
  .sal-col { border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  #page-body { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
  .login-container { flex-direction: column; gap: 2rem; padding: 1.5rem; }
  .login-brand { display: none; }
  .login-card { width: 100%; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-filters { flex-wrap: wrap; }
  .net-pay-banner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .slip-emp-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════════════*/
@media print {
  #sidebar, #page-header, #modal-overlay, #toast-container, .toolbar-actions, .row-actions { display: none !important; }
  #main-content { margin-left: 0 !important; }
  body { background: white; color: black; }
}
