/* ═══════════════════════════════════════════════════════════════════
   EMPLOYEE MANAGEMENT SYSTEM - EXECUTIVE SAAS THEME
   Obsidian Navy Sidebar + Indigo/Purple Active Gradients + Slate White Canvas
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Obsidian Deep Navy Sidebar */
  --sidebar-bg: #0B132B;
  --sidebar-surface: rgba(255, 255, 255, 0.04);
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #8B5CF6 100%);
  --dark-header: #1E293B; /* Modern Slate Navy */
  --dark-navy: #0F172A;

  /* Modern Clean Canvas & Crisp White Cards */
  --page-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;
  --card-hover: #F8FAFC;
  --input-bg: #FFFFFF;
  --input-border: #CBD5E1;
  
  /* Employee Management System Brand Accents */
  --primary-indigo: #6366F1;
  --primary-indigo-hover: #4F46E5;
  --primary-purple: #8B5CF6;
  --primary-purple-bg: #EDE9FE;
  
  /* Status Accents */
  --emerald-primary: #10B981;
  --emerald-hover: #059669;
  --emerald-dark: #064E3B;
  --emerald-glow: rgba(16, 185, 129, 0.18);
  --emerald-subtle: rgba(16, 185, 129, 0.08);
  --emerald-border: rgba(16, 185, 129, 0.35);
  
  --primary-blue: #3B82F6;
  --primary-blue-bg: #EFF6FF;
  --cyan-accent: #06B6D4;
  --cyan-bg: #ECFEFF;
  --amber-accent: #F59E0B;
  --amber-bg: #FEF3C7;
  --rose-accent: #EF4444;
  --rose-bg: #FEE2E2;
  --violet-accent: #8B5CF6;
  --violet-bg: #EDE9FE;
  
  /* Typography Colors */
  --text-dark: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-light: #F8FAFC;
  --text-sidebar: rgba(255, 255, 255, 0.85);
  
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

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

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--page-bg);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

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

/* ═══════════════════════════════════════════════════════════════════
   1. OBSIDIAN NAVY SIDEBAR
   ═══════════════════════════════════════════════════════════════════ */
.portal-sidebar {
  width: 250px;
  background: #0B132B;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A78BFA;
  font-weight: 800;
  font-size: 16px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.brand-role-tag {
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
  margin-top: 1px;
}

.tag-admin, .tag-hod, .tag-emp {
  color: #94A3B8;
}

/* Navigation Links */
.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-heading {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 0.02em;
  padding: 14px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #94A3B8;
  text-decoration: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  position: relative;
}

.nav-link svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  stroke-width: 2 !important;
  color: #94A3B8;
  transition: color 0.15s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.nav-link:hover svg {
  color: #FFFFFF;
}

/* ACTIVE NAV LINK — EXACT MATCH WITH SCREENSHOT (INDIGO/PURPLE GRADIENT) */
.nav-link.active {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #8B5CF6 100%);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.38);
}

.nav-link.active svg {
  color: #FFFFFF;
}

.nav-counter {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.25);
  color: #DDD6FE;
}

.nav-link.active .nav-counter {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Sidebar User Footer */
.sidebar-user {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: #DC2626;
  border-color: #DC2626;
}

.sidebar-user .user-avatar {
  display: none;
}

.user-avatar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  color: #FFFFFF;
  font-size: 12px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
/* ═══════════════════════════════════════════════════════════════════
   2. MAIN CONTENT CANVAS & TOPBAR
   ═══════════════════════════════════════════════════════════════════ */
.portal-layout {
  overflow-x: hidden;
}

.portal-main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page-bg);
  padding-bottom: 50px;
  overflow-x: hidden;
}

/* Clean Modern Topbar */
.portal-topbar {
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 4px rgba(13, 107, 78, 0.04);
}

.topbar-title {
  font-size: 18px;
  font-weight: 800;
  color: #0E3B2E;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-content {
  padding: 28px 32px;
  max-width: 1440px;
  width: 100%;
  overflow-x: hidden; /* no page-level horizontal scrollbar */
}

/* ─── Flash Messages ─── */
.flash-messages {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.alert-error, .alert-danger {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

.alert-warning {
  background: #FFFBEB;
  color: #92400E;
  border-color: #FDE68A;
}

.alert-info {
  background: #EFF6FF;
  color: #1E40AF;
  border-color: #BFDBFE;
}

/* ─── Stat Cards (Crisp Pure White on Page BG) ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: normal;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── Compact KPI Cards (Slim Height) ─── */
.stat-card-compact {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 62px;
}

.stat-card-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.stat-card-compact .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card-compact .stat-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: normal;
}

.stat-card-compact .stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  flex-shrink: 0;
}

.stat-card-compact .stat-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.stat-card-compact .stat-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Content Cards (Pure White with Dark Titles) ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  border-color: #CBD5E1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Data Tables: Dark Header + Crisp White Rows ─── */
/* ─── Data Tables: Full-Screen Fit with Sticky Header & Custom Scrollbar ─── */
.table-responsive,
.table-scroll-container {
  width: 100%;
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  position: relative;
  scrollbar-gutter: stable;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
  background: #FFFFFF;
}

/* 📌 STICKY MODERN SLATE/NAVY HEADER FOR ALL TABLES */
.data-table th,
table.data-table thead th,
.table-scroll-container table thead th,
.table-responsive table thead th,
.table thead th,
table th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #1E293B !important;
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid #0F172A;
  font-size: 12px;
  letter-spacing: normal;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

/* Round first and last th in header */
.data-table thead tr th:first-child {
  border-top-left-radius: 12px;
}
.data-table thead tr th:last-child {
  border-top-right-radius: 12px;
}

/* Round bottom corners of last row */
.data-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.data-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  color: var(--text-dark);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #F8FAFC;
}

/* 🎨 SLEEK CUSTOM SCROLLBAR — larger & always visible */
.table-scroll-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.portal-sidebar::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-scroll-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 4px;
  border: 2px solid #F1F5F9;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #6366F1;
  border-color: #EEF2FF;
}

/* Always show the corner piece when both scrollbars present */
.table-scroll-container::-webkit-scrollbar-corner,
.table-responsive::-webkit-scrollbar-corner {
  background: #F1F5F9;
}

.portal-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.portal-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.portal-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   PURE CSS MODAL / POPUP SYSTEM (ZERO JAVASCRIPT)
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 29, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.modal-overlay:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-container {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  width: 90%;
  max-width: 560px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  max-height: 90vh;
}

.modal-overlay:target .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 18px 24px;
  background: var(--dark-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  color: #94A3B8;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.modal-close:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  color: var(--text-dark);
}

/* ─── Modal Section Dividers ─── */
.modal-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Policy Assignment Cards & Grid ─── */
.policy-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  background: #F8FAFC;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.policy-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.policy-checkbox-card:hover {
  border-color: var(--primary-accent);
  background: #F0FDF4;
}

.policy-checkbox-card input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #10B981;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.policy-card-info {
  flex: 1;
  min-width: 0;
}

.policy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.policy-card-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.policy-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ─── Badges & Status Pills ─── */
.badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: capitalize;
  line-height: 1.2;
}

.badge-online, .badge-present, .badge-approved, .badge-active, .badge-paid {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.badge-offline, .badge-absent, .badge-rejected, .badge-inactive, .badge-high {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.badge-pending, .badge-late, .badge-idle, .badge-medium, .badge-draft {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.badge-info, .badge-todo, .badge-casual, .badge-processed {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.badge-violet, .badge-annual, .badge-urgent {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}

/* Green Primary Button */
.btn-primary {
  background: var(--emerald-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.btn-primary:hover {
  background: var(--emerald-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #FFFFFF;
}
.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: #DC2626;
  color: #FFFFFF;
}
.btn-danger:hover {
  background: #B91C1C;
}

.btn-secondary {
  background: #F1F5F9;
  color: var(--text-dark);
  border-color: #CBD5E1;
}
.btn-secondary:hover {
  background: #E2E8F0;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* ─── Forms ─── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.form-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.form-control:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.20);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* ─── Expandable Details Panels (Dark Summary + Pure White Content) ─── */
details.expandable-panel {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

details.expandable-panel summary {
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  background: var(--dark-header);
  user-select: none;
}

details.expandable-panel summary::-webkit-details-marker {
  display: none;
}

details.expandable-panel summary::after {
  content: "+ Open Form";
  font-size: 12.5px;
  color: #34D399;
  font-weight: 800;
}

details.expandable-panel[open] summary::after {
  content: "− Close";
  color: #F87171;
}

details.expandable-panel .panel-content {
  padding: 22px;
  border-top: 1px solid var(--card-border);
  background: #FFFFFF;
}

/* ─── Attendance Big Clock Card ─── */
.attendance-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.clock-card {
  background: linear-gradient(135deg, var(--dark-header) 0%, var(--dark-navy) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
}

.clock-card .stat-title {
  color: #94A3B8;
}

.clock-timer {
  font-size: 34px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.clock-card .stat-sub {
  color: #CBD5E1;
}

.clock-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.clock-actions form {
  flex: 1;
}

.clock-actions .btn {
  width: 100%;
}

/* ─── Screenshots Grid ─── */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.screenshot-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.screenshot-img-box {
  width: 100%;
  height: 160px;
  background: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.screenshot-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-placeholder {
  color: #64748B;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.screenshot-meta {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #FFFFFF;
}

.screenshot-emp {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.screenshot-app {
  font-size: 12px;
  color: var(--text-muted);
}

.screenshot-time {
  font-size: 11px;
  color: #94A3B8;
}

/* ─── Announcements Feed ─── */
.announcements-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.announcement-item {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--emerald-primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-item.urgent {
  border-left-color: var(--rose-accent);
}

.announcement-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.announcement-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}

.announcement-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.announcement-body {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.6;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .portal-sidebar {
    width: 70px;
  }
  .portal-sidebar .brand-info,
  .portal-sidebar .nav-link span,
  .portal-sidebar .nav-counter,
  .portal-sidebar .nav-heading,
  .portal-sidebar .user-details {
    display: none;
  }
  .portal-sidebar .nav-link {
    justify-content: center;
    padding: 12px;
  }
  .portal-main {
    margin-left: 70px;
  }
  .portal-topbar, .portal-content {
    padding: 16px 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   EXECUTIVE DASHBOARD & CHART STYLING
   ═══════════════════════════════════════════════════════════════════ */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-dot-amber {
  background: #F59E0B;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulseAmber 1.8s infinite;
}

@keyframes pulseAmber {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ─── NexGuard Executive Hero Banner (Clean SaaS Compact White Card) ─── */
.exec-hero-banner {
  background: #FFFFFF;
  color: var(--text-dark);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 14px;
}

/* ─── NexGuard Executive Command Toolbar (Elevated White Card + Subtle Sky Accent) ─── */
.page-header-card,
.exec-hero-banner,
.exec-command-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFFFF 65%, #F0F9FF 100%);
  color: var(--text-dark);
  border: 1px solid #E0F2FE;
  border-radius: 12px;
  padding: 18px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-card:hover,
.exec-hero-banner:hover,
.exec-command-card:hover {
  border-color: #BAE6FD;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.08);
}

.exec-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 11px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: normal;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 6px;
  border: 1px solid #DBEAFE;
}

.exec-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}

.exec-hero-sub {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
  max-width: 650px;
}

.exec-hero-sub strong {
  color: #4F46E5;
  font-weight: 600;
}

.exec-stat-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  width: 100%;
}

.exec-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 0;
}

.exec-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.08);
  border-color: #C7D2FE;
}

.exec-kpi-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.exec-kpi-card:hover .exec-kpi-icon-box {
  transform: scale(1.06);
}

.exec-kpi-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: normal;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.exec-kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.exec-kpi-sub {
  font-size: 10.5px;
  color: #64748B;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none !important;
}

.exec-grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
}

.exec-grid-equal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
}

@media (max-width: 1100px) {
  .exec-grid-2col, .exec-grid-equal {
    grid-template-columns: 1fr;
  }
}

.segmented-progress {
  display: flex;
  height: 9px;
  border-radius: 6px;
  overflow: hidden;
  background: #E2E8F0;
  margin: 12px 0 8px;
}

.progress-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

/* ─── Modern Switch Toggle ─── */
.switch-toggle-btn {
  position: relative;
  width: 40px;
  height: 22px;
  background: #CBD5E1;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  padding: 2px;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.switch-toggle-btn.is-active {
  background: #0A8E5E;
}

.switch-toggle-btn .switch-slider {
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.switch-toggle-btn.is-active .switch-slider {
  transform: translateX(18px);
}

/* ─── Equal Sized Action Buttons (Strictly Horizontal & Aligned) ─── */
.emp-actions-group {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.emp-actions-group form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

.emp-btn-action {
  height: 28px !important;
  line-height: 26px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.emp-btn-edit {
  background: #FFFFFF !important;
  color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
}

.emp-btn-edit:hover {
  background: #EEF2FF !important;
  border-color: #818CF8 !important;
  color: #4F46E5 !important;
  transform: translateY(-1px);
}

.emp-btn-delete {
  background: #FEF2F2 !important;
  color: #DC2626 !important;
  border: 1px solid #FECACA !important;
}

.emp-btn-delete:hover {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
  transform: translateY(-1px);
}

.emp-btn-view {
  background: #FFFFFF !important;
  color: #0891B2 !important;
  border: 1px solid #A5F3FC !important;
}

.emp-btn-view:hover {
  background: #ECFEFF !important;
  border-color: #06B6D4 !important;
  color: #0E7490 !important;
  transform: translateY(-1px);
}
  border-color: #06B6D4;
  color: #0E7490;
  transform: translateY(-1px);
}

/* ─── Enterprise Payslip Voucher System ─── */
.payslip-voucher {
  background: #FFFFFF;
  padding: 24px;
  color: var(--text-dark);
}

.payslip-header-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px dashed #CBD5E1;
  margin-bottom: 16px;
}

.payslip-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #F8FAFC;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.payslip-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payslip-meta-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: normal;
}

.payslip-meta-val {
  font-weight: 700;
  color: var(--text-dark);
}

.payslip-table-block {
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.payslip-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 12.5px;
  border-bottom: 1px solid #F1F5F9;
}

.payslip-row:last-child {
  border-bottom: none;
}

.payslip-row.total {
  background: #F8FAFC;
  font-weight: 700;
  border-top: 1px solid #E2E8F0;
}

.payslip-net-box {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #312E81 100%);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   PROFESSIONAL VECTOR ICONS & REAL-TIME ACCENTS (LUCIDE INTEGRATION)
   ═══════════════════════════════════════════════════════════════════ */
.lucide, [data-lucide] {
  stroke-width: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

.exec-kpi-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.exec-kpi-icon-box [data-lucide],
.exec-kpi-icon-box svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2px;
}

.exec-kpi-card:hover .exec-kpi-icon-box {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@keyframes pulse-live {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-live-indigo {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  animation: pulse-live 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  flex-shrink: 0;
}

.pulse-dot.pulse-indigo {
  background: #6366F1;
  animation: pulse-live-indigo 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.badge-realtime-pill {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.badge-date-pill {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #E2E8F0;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title [data-lucide],
.card-title svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2px;
  color: #6366F1;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title [data-lucide],
.modal-title svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2px;
  color: #6366F1;
}

.modal-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-section-title [data-lucide],
.modal-section-title svg {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  color: #64748B;
}

.emp-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.emp-btn-action [data-lucide],
.emp-btn-action svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
}

.btn [data-lucide],
.btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN PORTAL ULTRA-CLEAN ENTERPRISE REDESIGN (PRESERVES BRAND THEME)
   ═══════════════════════════════════════════════════════════════════ */

/* Executive Command Center Toolbar */
.exec-command-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF8FF 60%, #F5F3FF 100%) !important;
  border: 1px solid #E0E7FF !important;
  border-radius: 14px !important;
  padding: 20px 24px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  position: relative !important;
  overflow: hidden !important;
}

.exec-command-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4F46E5, #6366F1, #8B5CF6);
}

.exec-hero-badge {
  background: #EEF2FF !important;
  color: #4F46E5 !important;
  border: 1px solid #C7D2FE !important;
  font-weight: 700 !important;
}

/* Stat KPI Ribbon Enhancement — Elevated 3D Metric Cards */
.exec-stat-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
}

.exec-stat-ribbon-6 {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

.exec-stat-ribbon-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

@media (max-width: 1200px) {
  .exec-stat-ribbon-6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .exec-stat-ribbon-6, .exec-stat-ribbon-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.exec-kpi-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-top: 3px solid #6366F1 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.07), 0 2px 5px -1px rgba(15, 23, 42, 0.03) !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: unset !important;
  min-width: 0 !important;
}

.exec-kpi-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.12), 0 3px 8px -1px rgba(15, 23, 42, 0.05) !important;
}

/* Individual top accent colors for variety & visual prominence */
.exec-kpi-card:nth-child(1) {
  border-top-color: #6366F1 !important; /* Indigo */
}
.exec-kpi-card:nth-child(2) {
  border-top-color: #10B981 !important; /* Emerald */
}
.exec-kpi-card:nth-child(3) {
  border-top-color: #F59E0B !important; /* Amber */
}
.exec-kpi-card:nth-child(4) {
  border-top-color: #EF4444 !important; /* Rose */
}
.exec-kpi-card:nth-child(5) {
  border-top-color: #8B5CF6 !important; /* Violet */
}
.exec-kpi-card:nth-child(6) {
  border-top-color: #06B6D4 !important; /* Cyan */
}

.topbar-agent-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%) !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  border: 1px solid #4338CA !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25) !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
}

.topbar-agent-btn:hover {
  background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-1px) !important;
  color: #FFFFFF !important;
}
}
.exec-kpi-card:nth-child(3) {
  border-top-color: #3B82F6 !important; /* Blue / Stations */
}
.exec-kpi-card:nth-child(4) {
  border-top-color: #10B981 !important; /* Emerald / Security & Health */
}
.exec-kpi-card:nth-child(5) {
  border-top-color: #8B5CF6 !important; /* Violet / Approvals & Actions */
}
.exec-kpi-card:nth-child(6) {
  border-top-color: #EC4899 !important; /* Pink / Special */
}

.exec-kpi-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.18), 0 4px 10px -2px rgba(15, 23, 42, 0.06) !important;
  border-color: #C7D2FE !important;
}

.exec-kpi-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
}

.exec-kpi-title {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #64748B !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.exec-kpi-icon-box {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.exec-kpi-icon-box [data-lucide],
.exec-kpi-icon-box svg {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2px !important;
}

.exec-kpi-val {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  letter-spacing: -0.01em !important;
  line-height: 1.2 !important;
  margin: 1px 0 !important;
}

.exec-kpi-sub {
  font-size: 10px !important;
  color: #64748B !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.3 !important;
  text-transform: none !important;
}

/* Card Styling */
.card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 14px !important;
  padding: 20px 22px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05) !important;
  border-color: #CBD5E1 !important;
}

.card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

/* Table Polish */
.table-scroll-container {
  width: 100% !important;
  border-radius: 10px !important;
  border: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
  position: relative !important;
  overflow-x: auto !important;
}

.data-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  text-align: left !important;
  font-size: 13px !important;
  background: #FFFFFF !important;
}

.data-table th, table.data-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #0F172A !important;
  color: #F8FAFC !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  font-size: 11.5px !important;
  letter-spacing: 0.02em !important;
  border-bottom: 1px solid #1E293B !important;
  white-space: nowrap !important;
}

.data-table td {
  padding: 13px 16px !important;
  border-bottom: 1px solid #F1F5F9 !important;
  color: #334155 !important;
  vertical-align: middle !important;
  font-size: 12.5px !important;
}

.data-table tr:hover td {
  background: #F8FAFC !important;
}

/* Rank Badges in Leaderboard */
.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-badge-1 {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.rank-badge-2 {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.rank-badge-3 {
  background: #FFEDD5;
  color: #C2410C;
  border: 1px solid #FED7AA;
}

.rank-badge-n {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Form & Filter Bar Polish */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-control {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  color: #0F172A !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
}

.form-control:focus {
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
  outline: none !important;
}


/* ═══════════════════════════════════════════════════════════════════
   PAYSLIP PRINT / PDF STYLES
   ═══════════════════════════════════════════════════════════════════ */
@media print {
  /* Hide everything on the page */
  body * { visibility: hidden !important; }

  /* Show only the active payslip modal content */
  .payslip-print-zone,
  .payslip-print-zone * {
    visibility: visible !important;
  }

  /* Reset page chrome */
  .modal-overlay {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    z-index: auto !important;
  }

  .payslip-print-zone {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
  }

  /* A4 page setup */
  @page {
    size: A4 portrait;
    margin: 0;
  }

  /* Force color rendering for backgrounds */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Hide close button and action buttons when printing */
  .payslip-no-print {
    display: none !important;
  }
}



/* Fix oversized Lucide icons on live server */
svg.lucide {
    width: 18px;
    height: 18px;
    max-width: 100%;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Action button icons */
.emp-btn-action svg.lucide {
    width: 13px;
    height: 13px;
}

/* Regular buttons */
.btn svg.lucide {
    width: 15px;
    height: 15px;
}

/* Sidebar icons */
.sidebar svg.lucide,
nav svg.lucide {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
