/* =====================================================================
   Abdul Aziz HR Management System — Design System
   Theme: White / Blue / Dark Gray | Bootstrap 5.3 base
   ===================================================================== */

:root {
  --hrms-blue: #2557d6;
  --hrms-blue-dark: #1a3f9e;
  --hrms-blue-light: #eaf0ff;
  --hrms-blue-soft: #4f7cf0;
  --hrms-dark: #1e2532;
  --hrms-gray-900: #111827;
  --hrms-gray-700: #374151;
  --hrms-gray-500: #6b7280;
  --hrms-gray-300: #d1d5db;
  --hrms-gray-100: #f3f5f9;
  --hrms-white: #ffffff;
  --hrms-success: #16a34a;
  --hrms-warning: #d97706;
  --hrms-danger: #dc2626;
  --hrms-info: #0891b2;
  --hrms-purple: #5d24a3;
  --hrms-purple-soft: #7c3aed;
  --hrms-pink: #db2777;
  --hrms-teal: #0d9488;
  --hrms-indigo: #4338ca;
  --hrms-orange: #ea580c;
  --hrms-cyan: #0ea5e9;
  --hrms-radius: 14px;
  --hrms-radius-sm: 8px;
  --hrms-shadow: 0 2px 10px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
  --hrms-shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --hrms-transition: all 0.2s ease-in-out;
  --sidebar-width: 270px;
  --topbar-height: 68px;

  /* ===== Sidebar palette ===== */
  --primary: #1E4ED8;
  --primary-dark: #163FA8;
  --primary-light: #3B82F6;
  --sidebar: #1E293B;
  --sidebar-dark: #0F172A;
  --sidebar-hover: #334155;
  --sidebar-active: #0EA5E9;
  --sidebar-hover-border: #38BDF8;
  --sidebar-active-border: #ffffff;
  --sidebar-text: #CBD5E1;
  --sidebar-text-hover: #ffffff;
  --sidebar-text-active: #ffffff;
  --sidebar-brand-text: #ffffff;
  --sidebar-group-grad: linear-gradient(135deg, #0F3D6E 0%, #0369A1 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #1a446d 0%, #d45ff8 100%);
  --sidebar-group-text: #ffffff;
  --sidebar-toggle-bg: rgba(255,255,255,0.1);
  --sidebar-toggle-bg-hover: rgba(255,255,255,0.2);
  --sidebar-toggle-text: #ffffff;
  --sidebar-toggle-border: rgba(255,255,255,0.18);

  /* ===== Design-system palette (mockup color-management table) ===== */
  --body-bg: #F5F7FB;
  --card-bg: #FFFFFF;
  --text: #1F2937;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --success: #22C55E;
  --success-light: #DCFCE7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0EA5E9;
  --info-light: #DBF4FF;
  --purple: #8B5CF6;
  --purple-light: #F3E8FF;
  --pink: #EC4899;
  --pink-light: #FCE7F3;
  --orange: #F97316;
  --orange-light: #FFEDD5;
  --cyan: #06B6D4;
  --cyan-light: #CFFAFE;

  /* ===== Table theme (Settings > Theme) — Theme 1: Indigo & Cyan (default) ===== */
  --hrms-theme-header-grad: linear-gradient(135deg, #4F46E5, #06B6D4);
  --hrms-theme-header-text: #ffffff;
  --hrms-theme-thead-bg: #EEF2FF;
  --hrms-theme-row-stripe: #F8FBFF;
  --hrms-theme-row-hover: #E0F2FE;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #6366F1, #06B6D4);
  --hrms-theme-pagination: #4F46E5;
  --hrms-theme-pagination-active: #3730A3;
}

/* Theme 2: Emerald & Teal */
body[data-theme="theme2"] {
  --hrms-theme-header-grad: linear-gradient(135deg, #059669, #0D9488);
  --hrms-theme-header-text: #ffffff;
  --hrms-theme-thead-bg: #ECFDF5;
  --hrms-theme-row-stripe: #F3FBF8;
  --hrms-theme-row-hover: #D1FAE5;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #10B981, #0D9488);
  --hrms-theme-pagination: #059669;
  --hrms-theme-pagination-active: #047857;

  --sidebar: #064E3B;
  --sidebar-dark: #022C22;
  --sidebar-hover: #065F46;
  --sidebar-active: #10B981;
  --sidebar-hover-border: #34D399;
  --sidebar-active-border: #ffffff;
  --sidebar-text: #A7F3D0;
  --sidebar-text-hover: #ffffff;
  --sidebar-text-active: #ffffff;
  --sidebar-brand-text: #ffffff;
  --sidebar-group-grad: linear-gradient(135deg, #065F46 0%, #0D9488 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #047857 0%, #14B8A6 100%);
  --sidebar-group-text: #ffffff;
  --sidebar-toggle-bg: rgba(255,255,255,0.1);
  --sidebar-toggle-bg-hover: rgba(255,255,255,0.2);
  --sidebar-toggle-text: #ffffff;
  --sidebar-toggle-border: rgba(255,255,255,0.18);
}

/* Theme 3: Sunset & Coral */
body[data-theme="theme3"] {
  --hrms-theme-header-grad: linear-gradient(135deg, #EA580C, #DB2777);
  --hrms-theme-header-text: #ffffff;
  --hrms-theme-thead-bg: #FFF7ED;
  --hrms-theme-row-stripe: #FFFBF5;
  --hrms-theme-row-hover: #FED7AA;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #F97316, #DB2777);
  --hrms-theme-pagination: #EA580C;
  --hrms-theme-pagination-active: #C2410C;

  --sidebar: #7C2D12;
  --sidebar-dark: #431407;
  --sidebar-hover: #9A3412;
  --sidebar-active: #EA580C;
  --sidebar-hover-border: #FB923C;
  --sidebar-active-border: #ffffff;
  --sidebar-text: #FED7AA;
  --sidebar-text-hover: #ffffff;
  --sidebar-text-active: #ffffff;
  --sidebar-brand-text: #ffffff;
  --sidebar-group-grad: linear-gradient(135deg, #9A3412 0%, #BE185D 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #C2410C 0%, #DB2777 100%);
  --sidebar-group-text: #ffffff;
  --sidebar-toggle-bg: rgba(255,255,255,0.1);
  --sidebar-toggle-bg-hover: rgba(255,255,255,0.2);
  --sidebar-toggle-text: #ffffff;
  --sidebar-toggle-border: rgba(255,255,255,0.18);
}

/* Theme 4: Royal Purple & Blue */
body[data-theme="theme4"] {
  --hrms-theme-header-grad: linear-gradient(135deg, #7C3AED, #2563EB);
  --hrms-theme-header-text: #ffffff;
  --hrms-theme-thead-bg: #F5F3FF;
  --hrms-theme-row-stripe: #FAF9FF;
  --hrms-theme-row-hover: #DDD6FE;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #8B5CF6, #2563EB);
  --hrms-theme-pagination: #7C3AED;
  --hrms-theme-pagination-active: #5B21B6;

  --sidebar: #312E81;
  --sidebar-dark: #1E1B4B;
  --sidebar-hover: #4C1D95;
  --sidebar-active: #7C3AED;
  --sidebar-hover-border: #A78BFA;
  --sidebar-active-border: #ffffff;
  --sidebar-text: #DDD6FE;
  --sidebar-text-hover: #ffffff;
  --sidebar-text-active: #ffffff;
  --sidebar-brand-text: #ffffff;
  --sidebar-group-grad: linear-gradient(135deg, #4C1D95 0%, #1E3A8A 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #5B21B6 0%, #1D4ED8 100%);
  --sidebar-group-text: #ffffff;
  --sidebar-toggle-bg: rgba(255,255,255,0.1);
  --sidebar-toggle-bg-hover: rgba(255,255,255,0.2);
  --sidebar-toggle-text: #ffffff;
  --sidebar-toggle-border: rgba(255,255,255,0.18);
}

/* Theme 5: White (light sidebar + light table header) */
body[data-theme="theme5"] {
  --hrms-theme-header-grad: linear-gradient(135deg, #F3F4F6, #E5E7EB);
  --hrms-theme-header-text: #1F2937;
  --hrms-theme-thead-bg: #F9FAFB;
  --hrms-theme-row-stripe: #FAFAFA;
  --hrms-theme-row-hover: #F3F4F6;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #9CA3AF, #6B7280);
  --hrms-theme-pagination: #4B5563;
  --hrms-theme-pagination-active: #1F2937;

  --sidebar: #FFFFFF;
  --sidebar-dark: #F3F4F6;
  --sidebar-hover: #F3F4F6;
  --sidebar-active: #2563EB;
  --sidebar-hover-border: #93C5FD;
  --sidebar-active-border: #2563EB;
  --sidebar-text: #4B5563;
  --sidebar-text-hover: #1F2937;
  --sidebar-text-active: #ffffff;
  --sidebar-brand-text: #1F2937;
  --sidebar-group-grad: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #D1D5DB 0%, #9CA3AF 100%);
  --sidebar-group-text: #1F2937;
  --sidebar-toggle-bg: rgba(31,41,55,0.06);
  --sidebar-toggle-bg-hover: rgba(31,41,55,0.12);
  --sidebar-toggle-text: #1F2937;
  --sidebar-toggle-border: rgba(31,41,55,0.15);
}

/* Theme 6: Black (midnight) */
body[data-theme="theme6"] {
  --hrms-theme-header-grad: linear-gradient(135deg, #111827, #374151);
  --hrms-theme-header-text: #ffffff;
  --hrms-theme-thead-bg: #F3F4F6;
  --hrms-theme-row-stripe: #FAFAFA;
  --hrms-theme-row-hover: #E5E7EB;
  --hrms-theme-avatar-grad: linear-gradient(45deg, #374151, #111827);
  --hrms-theme-pagination: #111827;
  --hrms-theme-pagination-active: #000000;

  --sidebar: #000000;
  --sidebar-dark: #000000;
  --sidebar-hover: #1F1F1F;
  --sidebar-active: #F59E0B;
  --sidebar-hover-border: #FBBF24;
  --sidebar-active-border: #ffffff;
  --sidebar-text: #9CA3AF;
  --sidebar-text-hover: #ffffff;
  --sidebar-text-active: #111827;
  --sidebar-brand-text: #ffffff;
  --sidebar-group-grad: linear-gradient(135deg, #1F1F1F 0%, #000000 100%);
  --sidebar-group-grad-hover: linear-gradient(135deg, #2E2E2E 0%, #F59E0B 100%);
  --sidebar-group-text: #ffffff;
  --sidebar-toggle-bg: rgba(255,255,255,0.1);
  --sidebar-toggle-bg-hover: rgba(255,255,255,0.2);
  --sidebar-toggle-text: #ffffff;
  --sidebar-toggle-border: rgba(255,255,255,0.18);
}

body {
  background-color: var(--hrms-gray-100);
  color: var(--hrms-gray-900);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.925rem;
}

/* ---------------------------------------------------------------------
   Animations
   --------------------------------------------------------------------- */
@keyframes hrms-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hrms-scale-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.hrms-animate-in { animation: hrms-fade-in 0.35s ease both; }
.hrms-animate-scale { animation: hrms-scale-in 0.3s ease both; }
.hrms-animate-in.delay-1 { animation-delay: 0.05s; }
.hrms-animate-in.delay-2 { animation-delay: 0.1s; }
.hrms-animate-in.delay-3 { animation-delay: 0.15s; }
.hrms-animate-in.delay-4 { animation-delay: 0.2s; }

/* Scroll-triggered reveal (dashboard below-the-fold sections) — JS toggles .is-visible via IntersectionObserver. */
.hrms-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.22,1,.36,1);
}
.hrms-reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes hrms-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hrms-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: hrms-pulse-ring 1.8s infinite;
}

@keyframes hrms-shimmer-sweep {
  0%   { transform: translateX(-40%); }
  100% { transform: translateX(140%); }
}

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.hrms-card {
  background: var(--hrms-white);
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: var(--hrms-radius);
  box-shadow: var(--hrms-shadow);
  transition: var(--hrms-transition);
}
.hrms-card:hover { box-shadow: var(--hrms-shadow-md); }
.hrms-card-body { padding: 1.5rem; }

.hrms-stat-card {
  border-radius: var(--hrms-radius);
  background: var(--hrms-white);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--hrms-shadow);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: var(--hrms-transition);
  height: 100%;
}
.hrms-stat-card:hover { transform: translateY(-3px); box-shadow: var(--hrms-shadow-md); }
.hrms-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.hrms-expiry-tile:hover .hrms-stat-icon { transform: scale(1.15) rotate(-6deg); }
.hrms-stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: var(--hrms-gray-900); }
.hrms-stat-label { font-size: 0.85rem; color: var(--hrms-gray-500); font-weight: 500; }

/* Icon color variants */
.bg-soft-blue    { background: var(--hrms-blue-light); color: var(--hrms-blue); }
.bg-soft-success { background: #e8f8ee; color: var(--hrms-success); }
.bg-soft-warning { background: #fef3e2; color: var(--hrms-warning); }
.bg-soft-danger  { background: #fde9e9; color: var(--hrms-danger); }
.bg-soft-info    { background: #e6f7fa; color: var(--hrms-info); }
.bg-soft-dark    { background: #eceef2; color: var(--hrms-dark); }
.bg-soft-purple  { background: #f1e9fe; color: var(--hrms-purple); }
.bg-soft-pink    { background: #fce8f3; color: var(--hrms-pink); }
.bg-soft-teal    { background: #e1f5f3; color: var(--hrms-teal); }
.bg-soft-indigo  { background: #eceafc; color: var(--hrms-indigo); }
.bg-soft-orange  { background: #fef0e6; color: var(--hrms-orange); }
.text-purple { color: var(--hrms-purple); }
.bg-soft-cyan    { background: #e5f6fd; color: var(--hrms-cyan); }
.text-teal   { color: var(--hrms-teal); }
.text-orange { color: var(--hrms-orange); }
.text-pink   { color: var(--hrms-pink); }
.text-indigo { color: var(--hrms-indigo); }
.text-blue   { color: var(--hrms-blue); }

.dashboard-list-scroll { max-height: 260px; overflow-y: auto; }
.dashboard-list-scroll > div:last-child { border-bottom: none !important; }

/* ---------------------------------------------------------------------
   Dashboard hero banner
   --------------------------------------------------------------------- */
.hrms-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--hrms-radius);
  background: linear-gradient(120deg, var(--hrms-blue-dark) 0%, var(--hrms-blue) 50%, var(--hrms-purple) 130%);
  color: #fff;
  padding: 1.75rem 2rem;
  box-shadow: var(--hrms-shadow-md);
}
.hrms-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.16), transparent 55%),
              radial-gradient(circle at 15% 100%, rgba(255,255,255,0.10), transparent 45%);
  pointer-events: none;
}
.hrms-hero::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 35%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.10), transparent);
  animation: hrms-shimmer-sweep 7s ease-in-out infinite;
  pointer-events: none;
}
.hrms-hero h4, .hrms-hero p { position: relative; }
.hrms-hero p { color: rgba(255,255,255,0.85); }
.hrms-hero-pill {
  position: relative;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(2px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--hrms-transition);
}
.hrms-hero-pill:hover { background: rgba(255,255,255,0.24); color: #fff; transform: translateY(-1px); }

/* Dashboard Quick Actions grid */
.hrms-quick-action {
  border-radius: var(--hrms-radius-sm);
  padding: 1.1rem 0.75rem;
  text-align: center;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--hrms-transition);
}
.hrms-quick-action:hover { transform: translateY(-3px); color: #fff; box-shadow: var(--hrms-shadow-md); }
.hrms-quick-action i { font-size: 1.3rem; }
.hrms-quick-action--blue    { background: var(--primary); }
.hrms-quick-action--success { background: var(--success); }
.hrms-quick-action--purple  { background: var(--purple); }
.hrms-quick-action--orange  { background: var(--orange); }
.hrms-quick-action--info    { background: var(--info); }
.hrms-quick-action--teal    { background: #14B8A6; }
.hrms-quick-action--pink    { background: var(--pink); }

/* Colorful stat card top accent */
.hrms-stat-card { border-top: 3px solid transparent; }
.hrms-stat-card--blue    { border-top-color: var(--hrms-blue); }
.hrms-stat-card--success { border-top-color: var(--hrms-success); }
.hrms-stat-card--warning { border-top-color: var(--hrms-warning); }
.hrms-stat-card--danger  { border-top-color: var(--hrms-danger); }
.hrms-stat-card--info    { border-top-color: var(--hrms-info); }
.hrms-stat-card--purple  { border-top-color: var(--hrms-purple); }
.hrms-stat-card--pink    { border-top-color: var(--hrms-pink); }
.hrms-stat-card--teal    { border-top-color: var(--hrms-teal); }
.hrms-stat-card--indigo  { border-top-color: var(--hrms-indigo); }
.hrms-stat-card--orange  { border-top-color: var(--hrms-orange); }
.hrms-stat-card--cyan    { border-top-color: var(--hrms-cyan); }

/* Bold gradient-fill KPI tiles */
.hrms-stat-card--grad { border-top: none; color: #fff; }
.hrms-stat-card--grad .hrms-stat-value { color: #fff; }
.hrms-stat-card--grad .hrms-stat-label { color: rgba(255,255,255,0.85); }
.hrms-stat-icon-white {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
  background: rgba(255,255,255,0.22); color: #fff;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.hrms-stat-card:hover .hrms-stat-icon-white { transform: scale(1.15) rotate(-8deg); }
.hrms-stat-card--grad.hrms-stat-card--blue    { background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); box-shadow: 0 8px 20px rgba(37,99,235,0.28); }
.hrms-stat-card--grad.hrms-stat-card--success { background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%); box-shadow: 0 8px 20px rgba(22,163,74,0.28); }
.hrms-stat-card--grad.hrms-stat-card--purple  { background: linear-gradient(135deg, var(--hrms-purple) 0%, var(--hrms-purple-soft) 100%); box-shadow: 0 8px 20px rgba(93,36,163,0.32); }
.hrms-stat-card--grad.hrms-stat-card--warning { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); box-shadow: 0 8px 20px rgba(234,88,12,0.28); }
.hrms-stat-card--grad.hrms-stat-card--danger  { background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%); box-shadow: 0 8px 20px rgba(225,29,72,0.28); }
.hrms-stat-card--grad.hrms-stat-card--info    { background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%); box-shadow: 0 8px 20px rgba(8,145,178,0.28); }
.hrms-stat-card--grad.hrms-stat-card--indigo  { background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%); box-shadow: 0 8px 20px rgba(67,56,202,0.28); }
.hrms-stat-card--grad.hrms-stat-card--teal    { background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%); box-shadow: 0 8px 20px rgba(13,148,136,0.28); }
.hrms-stat-card--grad.hrms-stat-card--pink    { background: linear-gradient(135deg, #db2777 0%, #ec4899 100%); box-shadow: 0 8px 20px rgba(219,39,119,0.28); }
.hrms-stat-card--grad.hrms-stat-card--orange  { background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%); box-shadow: 0 8px 20px rgba(234,88,12,0.28); }
.hrms-stat-card--grad.hrms-stat-card--cyan    { background: linear-gradient(135deg, #0e7490 0%, #22d3ee 100%); box-shadow: 0 8px 20px rgba(14,116,144,0.28); }
.hrms-stat-card--grad:hover { box-shadow: 0 12px 28px rgba(17,24,39,0.22); }

/* Expiry alert tiles */
.hrms-expiry-tile {
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-left: 4px solid transparent;
  border-radius: var(--hrms-radius-sm);
  transition: var(--hrms-transition);
}
.hrms-expiry-tile:hover { transform: translateY(-2px); box-shadow: var(--hrms-shadow); }
.hrms-expiry-tile--blue    { border-left-color: var(--hrms-blue); }
.hrms-expiry-tile--success { border-left-color: var(--hrms-success); }
.hrms-expiry-tile--warning { border-left-color: var(--hrms-warning); }
.hrms-expiry-tile--danger  { border-left-color: var(--hrms-danger); }
.hrms-expiry-tile--info    { border-left-color: var(--hrms-info); }
.hrms-expiry-tile--purple  { border-left-color: var(--hrms-purple); }
.hrms-expiry-tile--pink    { border-left-color: var(--hrms-pink); }
.hrms-expiry-tile--teal    { border-left-color: var(--hrms-teal); }
.hrms-expiry-tile--indigo  { border-left-color: var(--hrms-indigo); }
.hrms-expiry-tile--orange  { border-left-color: var(--hrms-orange); }
.hrms-expiry-tile--cyan    { border-left-color: var(--hrms-cyan); }

/* Sitewide top-level tab headers (.nav-tabs, e.g. Tasks/Payroll/Employee profile/etc.) — each
   tab position gets its own distinct solid color, bold white text, and a hover/active lift, so
   every page's tab row is colorful and each tab is clearly visible without needing to click it.
   Colors repeat every 8 tabs for pages with more than 8. Applies automatically wherever
   .nav-tabs is used — no per-page markup changes needed. */
.nav-tabs { border-bottom: none; gap: 0.5rem; }
.nav-tabs .nav-link {
  border: none;
  border-radius: var(--hrms-radius-sm) var(--hrms-radius-sm) 0 0;
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  transition: var(--hrms-transition);
}
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: #fff;
  transform: translateY(-3px);
  opacity: 0.92;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
}
.nav-tabs .nav-item:nth-child(8n+1) .nav-link { background: #3498db; } /* Blue */
.nav-tabs .nav-item:nth-child(8n+2) .nav-link { background: #2ecc71; } /* Green */
.nav-tabs .nav-item:nth-child(8n+3) .nav-link { background: #e67e22; } /* Orange */
.nav-tabs .nav-item:nth-child(8n+4) .nav-link { background: #9b59b6; } /* Purple */
.nav-tabs .nav-item:nth-child(8n+5) .nav-link { background: #e74c3c; } /* Red */
.nav-tabs .nav-item:nth-child(8n+6) .nav-link { background: #1abc9c; } /* Teal */
.nav-tabs .nav-item:nth-child(8n+7) .nav-link { background: #34495e; } /* Dark Blue */
.nav-tabs .nav-item:nth-child(8n+8) .nav-link { background: #f39c12; } /* Yellow Orange */

/* Pending Tasks tab — renewal table section headings (ID Renewals, Health Certificate, etc.) */
.hrms-renewal-heading {
  background: #910f7e;
  color: #fff;
  font-size: 1.15rem;
  padding: 0.6rem 1rem;
  border-radius: var(--hrms-radius-sm);
}

/* Renewals - Pending sub-tab pills — one distinct color per renewal category. Inactive pills
   use a clearly-tinted background + a solid colored border so each tab's color is visible
   right away, not just after it's clicked into its solid "active" fill. */
.hrms-subtab-pills .nav-link { font-weight: 600; border-radius: 999px; margin-right: 0.4rem; margin-bottom: 0.4rem; border: 1.5px solid transparent; transition: var(--hrms-transition); }
.hrms-subtab-teal    { background: #99f6e4; color: #0f766e; border-color: var(--hrms-teal); }
.hrms-subtab-teal.active    { background: var(--hrms-teal) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(13,148,136,0.35); }
.hrms-subtab-pink    { background: #fbcfe8; color: #9d174d; border-color: var(--hrms-pink); }
.hrms-subtab-pink.active    { background: var(--hrms-pink) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(219,39,119,0.35); }
.hrms-subtab-blue    { background: #bfdbfe; color: #1d4ed8; border-color: var(--hrms-blue); }
.hrms-subtab-blue.active    { background: var(--hrms-blue) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(37,87,214,0.35); }
.hrms-subtab-orange  { background: #fed7aa; color: #9a3412; border-color: var(--hrms-orange); }
.hrms-subtab-orange.active  { background: var(--hrms-orange) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(234,88,12,0.35); }
.hrms-subtab-purple  { background: #e9d5ff; color: #6b21a8; border-color: var(--hrms-purple); }
.hrms-subtab-purple.active  { background: var(--hrms-purple) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(93,36,163,0.35); }
.hrms-subtab-indigo  { background: #c7d2fe; color: #3730a3; border-color: var(--hrms-indigo); }
.hrms-subtab-indigo.active  { background: var(--hrms-indigo) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(67,56,202,0.35); }
.hrms-subtab-cyan    { background: #a5f3fc; color: #0e7490; border-color: var(--hrms-cyan); }
.hrms-subtab-cyan.active    { background: var(--hrms-cyan) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(14,165,233,0.35); }

/* Expiry alert grid — 9 tiles, one full row at xl and up */
.hrms-expiry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (min-width: 768px)  { .hrms-expiry-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .hrms-expiry-grid { grid-template-columns: repeat(9, 1fr); gap: 0.75rem; } }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn-hrms-primary {
  background: var(--hrms-blue);
  border-color: var(--hrms-blue);
  color: #fff;
  font-weight: 600;
  border-radius: var(--hrms-radius-sm);
  transition: var(--hrms-transition);
}
.btn-hrms-primary:hover { background: var(--hrms-blue-dark); border-color: var(--hrms-blue-dark); color: #fff; }

/* ---------------------------------------------------------------------
   Auth pages (login / forgot / reset password)
   --------------------------------------------------------------------- */
.hrms-auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0F172A;
  position: relative;
  overflow-x: hidden;
  font-family: 'Poppins', 'Inter', sans-serif;
  padding: 2rem 1rem;
}
.hrms-auth-mesh {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0F172A, #1E293B, #111827);
  background-size: 400% 400%;
  animation: hrmsAuthMeshShift 18s ease infinite;
  z-index: 0;
}
@keyframes hrmsAuthMeshShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hrms-auth-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: hrmsAuthOrbFloat 22s infinite alternate ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.hrms-auth-orb.o1 { width: 380px; height: 380px; background: rgba(52,211,153,0.22); top: -10%; left: -5%; animation-duration: 25s; }
.hrms-auth-orb.o2 { width: 360px; height: 360px; background: rgba(59,130,246,0.25); bottom: -15%; right: -5%; animation-duration: 28s; }
.hrms-auth-orb.o3 { width: 280px; height: 280px; background: rgba(148,163,184,0.18); top: 35%; left: 55%; animation-duration: 20s; }
@keyframes hrmsAuthOrbFloat {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px,-40px) scale(1.08); }
  100% { transform: translate(-30px,30px) scale(0.92); }
}
.hrms-auth-container {
  width: 100%;
  max-width: 420px;
  padding: 45px;
  border-radius: 20px;
  background: rgba(30,41,59,0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  border: 1px solid rgba(148,163,184,0.2);
  text-align: center;
  position: relative;
  z-index: 100;
  margin: 2rem 0;
}
.hrms-auth-logo-wrap {
  width: 85px;
  height: 85px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #3B82F6, #34D399);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(52,211,153,0.25);
  overflow: hidden;
}
.hrms-auth-logo-wrap img { width: 68.2%; height: 68.2%; object-fit: contain; }
.hrms-auth-container h2 { color: #F8FAFC; font-size: 26px; font-weight: 600; margin-bottom: 5px; letter-spacing: 0.5px; }
.hrms-auth-subtitle,
.hrms-auth-container p.text-secondary { color: #94A3B8; font-size: 13px; margin-bottom: 35px; font-weight: 400; }

.hrms-auth-field { margin-bottom: 18px; position: relative; text-align: left; }
.hrms-auth-field input {
  width: 100%;
  padding: 11px 18px 11px 44px;
  border: 1px solid rgba(148,163,184,0.25);
  outline: none;
  border-radius: 10px;
  font-size: 15px;
  background: rgba(15,23,42,0.5);
  color: #F8FAFC;
  transition: all 0.3s ease;
  font-family: inherit;
}
.hrms-auth-field input::placeholder { color: #64748B; }
.hrms-auth-field input:focus {
  background: rgba(15,23,42,0.75);
  border-color: #34D399;
  box-shadow: 0 0 15px rgba(52,211,153,0.2);
}
.hrms-auth-field-icon { position: absolute; left: 16px; top: 13px; font-size: 15px; color: #64748B; }
.hrms-auth-toggle {
  position: absolute;
  right: 16px;
  top: 13px;
  font-size: 15px;
  cursor: pointer;
  color: #64748B;
  user-select: none;
  transition: color 0.3s ease;
}
.hrms-auth-toggle:hover { color: #34D399; }

.hrms-auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -2px;
  margin-bottom: 28px;
  font-size: 13px;
  color: #94A3B8;
}
.hrms-auth-options label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hrms-auth-options label:hover { color: #F8FAFC; }
.hrms-auth-options input[type="checkbox"] { accent-color: #34D399; cursor: pointer; width: 15px; height: 15px; }
.hrms-auth-container a { color: #60A5FA; text-decoration: none; transition: all 0.3s ease; }
.hrms-auth-container a:hover { color: #34D399; text-shadow: 0 0 8px rgba(52,211,153,0.4); }

.hrms-auth-submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563EB, #10B981);
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
  position: relative;
  overflow: hidden;
}
.hrms-auth-submit-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: hrmsAuthShimmer 3.5s infinite;
}
@keyframes hrmsAuthShimmer { 100% { left: 200%; } }
.hrms-auth-submit-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #3B82F6, #34D399);
  box-shadow: 0 10px 25px rgba(52,211,153,0.35);
}

.hrms-auth-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 20px;
  font-size: 13px; text-align: left;
}
.hrms-auth-alert--danger { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.hrms-auth-alert--success { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); color: #6ee7b7; }

/* Forgot/reset password pages still use Bootstrap's real form-control markup. */
.hrms-auth-container label.form-label { color: #F8FAFC; }
.hrms-auth-container .form-text { color: #94A3B8; }
.hrms-auth-container .input-group-text { background: rgba(15,23,42,0.5); border: 1px solid rgba(148,163,184,0.25); color: #64748B; }
.hrms-auth-container .form-control {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(148,163,184,0.25);
  color: #F8FAFC;
}
.hrms-auth-container .form-control::placeholder { color: #64748B; }
.hrms-auth-container .form-control:focus {
  background: rgba(15,23,42,0.75);
  border-color: #34D399;
  color: #F8FAFC;
  box-shadow: 0 0 15px rgba(52,211,153,0.2);
}
.hrms-auth-container .form-check-label { color: #94A3B8; }
.hrms-auth-container .btn-hrms-primary { background: linear-gradient(135deg, #2563EB, #10B981); border: none; }
.hrms-auth-container .btn-hrms-primary:hover { background: linear-gradient(135deg, #3B82F6, #34D399); }
.hrms-auth-container .alert-danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.hrms-auth-container .alert-success { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); color: #6ee7b7; }

.hrms-auth-footer { margin-top: 30px; text-align: center; font-size: 12px; color: #64748B; line-height: 1.8; }
.hrms-auth-footer strong { color: #94A3B8; font-weight: 500; }
@media (max-width: 480px) {
  .hrms-auth-container { padding: 28px 20px; }
}

/* ---------------------------------------------------------------------
   App shell: sidebar + topbar (used from Phase 4 onward)
   --------------------------------------------------------------------- */
.hrms-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-text);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 16px rgba(17,24,39,0.15);
  transition: transform 0.25s ease;
}
.hrms-sidebar > nav {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 0;
}
.hrms-sidebar .nav-link {
  color: var(--sidebar-text);
  font-weight: 600;
  border-radius: 0;
  border-left: 5px solid transparent;
  padding: 0.7rem 1.15rem;
  margin: 0;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: .3s;
}
.hrms-sidebar .nav-link i:not(.nav-chevron) { text-align: center; transition: .3s; }
.hrms-sidebar .nav-link .nav-chevron { margin-left: auto; font-size: 0.7rem; color: currentColor; opacity: 0.35; transition: .2s; }
.hrms-sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
  border-left-color: var(--sidebar-hover-border);
  padding-left: calc(1.15rem + 5px);
}
.hrms-sidebar .nav-link:hover .nav-chevron { opacity: 0.7; }
.hrms-sidebar .nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active-border);
  font-weight: 700;
}
.hrms-sidebar .nav-link.active .nav-chevron { opacity: 1; }

/* Per-module icon color badges (icon-color-management table) — colors stay fixed
   regardless of hover/active state, matching the KPI stat-card icon convention. */
.hrms-sidebar .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: transparent;
  color: inherit;
  transition: .3s;
}
.nav-icon-dashboard  { background: #DBEAFE; color: #2563EB; }
.nav-icon-employees  { background: #DCFCE7; color: #22C55E; }
.nav-icon-attendance { background: #FFEDD5; color: #F97316; }
.nav-icon-leave      { background: #FCE7F3; color: #EC4899; }
.nav-icon-payroll    { background: #CFFAFE; color: #06B6D4; }
.nav-icon-reports    { background: #FEF3C7; color: #F59E0B; }
.nav-icon-vehicle    { background: #DBEAFE; color: #3B82F6; }
.nav-icon-users      { background: #DBF4FF; color: #0EA5E9; }
.nav-icon-settings   { background: #F3F4F6; color: #6B7280; }
.nav-icon-blue    { background: #DBEAFE; color: #2563EB; }
.nav-icon-green   { background: #DCFCE7; color: #22C55E; }
.nav-icon-pink    { background: #FCE7F3; color: #EC4899; }
.nav-icon-purple  { background: #F3E8FF; color: #8B5CF6; }
.nav-icon-orange  { background: #FFEDD5; color: #F97316; }
.nav-icon-red     { background: #FEE2E2; color: #EF4444; }
.nav-icon-teal    { background: #CCFBF1; color: #14B8A6; }
.nav-icon-indigo  { background: #E0E7FF; color: #6366F1; }

.hrms-sidebar .nav-group-toggle {
  width: calc(100% - 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: var(--sidebar-group-grad);
  border: none;
  border-radius: 7px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-group-text);
  margin: 0.85rem 12px 0.5rem;
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}
.hrms-sidebar .nav-group-toggle:hover { background: var(--sidebar-group-grad-hover); color: var(--sidebar-group-text); }
.hrms-sidebar .nav-group-chevron {
  font-size: 0.6rem;
  color: currentColor;
  opacity: 0.8;
  transition: transform 0.2s ease;
}
.hrms-sidebar .nav-group-toggle.collapsed .nav-group-chevron { transform: rotate(-90deg); }
.hrms-sidebar-brand {
  background: transparent;
  padding: 1.1rem 3.2rem 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--sidebar-brand-text);
  font-weight: 700;
  text-decoration: none;
  transition: var(--hrms-transition);
  flex-shrink: 0;
  border-bottom: 1px solid var(--sidebar-hover);
}
.hrms-sidebar-brand:hover { opacity: 0.9; color: var(--sidebar-brand-text); }

.hrms-sidebar-footer {
  flex-shrink: 0;
  padding: 0.85rem;
  border-top: 1px solid var(--sidebar-hover);
  background: transparent;
}
.hrms-sidebar-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: .2s;
}
.hrms-sidebar-logout-btn:hover { background: #7C3AED; }

/* Sidebar show/hide toggle button — lives outside <aside> (fixed) so it stays
   clickable even after the sidebar itself slides off-screen. Sits just to the
   right of the brand text by default; hops to the left edge once collapsed. */
.hrms-sidebar-toggle-btn {
  position: fixed;
  top: 18px;
  left: calc(var(--sidebar-width) - 56px);
  z-index: 1055;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--sidebar-toggle-border);
  background: var(--sidebar-toggle-bg);
  color: var(--sidebar-toggle-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: left 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.hrms-sidebar-toggle-btn:hover { background: var(--sidebar-toggle-bg-hover); }
.hrms-sidebar-toggle-btn.is-collapsed {
  left: 14px;
  background: var(--hrms-white);
  color: var(--hrms-gray-700);
  border-color: rgba(17,24,39,0.1);
  box-shadow: var(--hrms-shadow);
}
.hrms-sidebar-toggle-btn.is-collapsed:hover { background: var(--hrms-gray-100); }
.hrms-sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}
.hrms-sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.hrms-sidebar-logo--lg { width: 56px; height: 56px; border-radius: 14px; padding: 6px; }

.hrms-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}
.hrms-topbar {
  height: var(--topbar-height);
  background: var(--hrms-white);
  border-bottom: 1px solid rgba(17,24,39,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: padding-left 0.25s ease;
}

@media (min-width: 992px) {
  .hrms-sidebar.is-hidden { transform: translateX(-100%); }
  .hrms-content.is-hidden { margin-left: 0; }
  .hrms-content.is-hidden .hrms-topbar { padding-left: 4.5rem; }
}
.hrms-search {
  background: var(--hrms-gray-100);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 280px;
}
.hrms-search input { background: transparent; border: none; outline: none; font-size: 0.875rem; width: 100%; }

/* Global "intelligent search" dropdown (topbar) */
.hrms-global-search { position: relative; }
.hrms-global-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 380px;
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--hrms-radius-sm);
  box-shadow: 0 12px 32px rgba(17,24,39,0.16);
  border: 1px solid rgba(17,24,39,0.08);
  z-index: 1050;
}
.hrms-global-search-results.is-open { display: block; }
.hrms-global-search-group-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--hrms-gray-500); padding: 0.6rem 0.9rem 0.3rem;
}
.hrms-global-search-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.9rem; text-decoration: none; color: inherit;
}
.hrms-global-search-item:hover { background: var(--hrms-gray-100); }
.hrms-global-search-item .hrms-search-item-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hrms-blue-light); color: var(--hrms-blue); font-size: 0.85rem;
}
.hrms-global-search-item .hrms-search-item-label { font-size: 0.85rem; font-weight: 600; color: var(--hrms-gray-800); }
.hrms-global-search-item .hrms-search-item-subtitle { font-size: 0.75rem; color: var(--hrms-gray-500); }
.hrms-global-search-empty, .hrms-global-search-loading {
  padding: 1rem 0.9rem; font-size: 0.82rem; color: var(--hrms-gray-500); text-align: center;
}

.hrms-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hrms-gray-100); color: var(--hrms-gray-700);
  position: relative; transition: var(--hrms-transition); border: none;
  vertical-align: middle;
}
.hrms-icon-btn:hover { background: var(--hrms-blue-light); color: var(--hrms-blue); }
.hrms-icon-btn .badge-dot {
  position: absolute; top: 6px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hrms-danger); border: 2px solid #fff;
}
.hrms-icon-btn .badge-dot--blink {
  animation: hrms-badge-blink 1.1s ease-in-out infinite;
}
.hrms-icon-btn .badge-dot--blink::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--hrms-danger);
  opacity: 0.55;
  animation: hrms-badge-ping 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: -1;
}
@keyframes hrms-badge-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
@keyframes hrms-badge-ping {
  0% { transform: scale(1); opacity: 0.55; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.hrms-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--hrms-blue-light); color: var(--hrms-blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

.hrms-breadcrumb-bar {
  padding: 1.25rem 1.5rem 0;
}

.hrms-page-body { padding: 1.5rem; flex: 1; position: relative; }

/* ---------------------------------------------------------------------
   Dashboard interactive bubble background (decorative, canvas-driven,
   background color unchanged — see dashboard-bubbles.js)
   --------------------------------------------------------------------- */
#dashboard-bubble-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hrms-dropdown-panel {
  border-radius: var(--hrms-radius);
  box-shadow: var(--hrms-shadow-md);
  border: 1px solid rgba(17,24,39,0.06);
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .hrms-sidebar { transform: translateX(-100%); }
  .hrms-sidebar.show { transform: translateX(0); }
  .hrms-content { margin-left: 0; }
}

/* Scrollbar */
.hrms-sidebar > nav::-webkit-scrollbar { width: 6px; }
.hrms-sidebar > nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

/* Table polish */
.table-responsive:has(.table-hrms) {
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--hrms-radius-sm);
  overflow: hidden;
  box-shadow: var(--hrms-shadow);
}
.table-hrms {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}
.table-hrms thead th {
  background: var(--hrms-theme-thead-bg);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: normal;
  color: #333;
  border-bottom: 2px solid #ddd;
  font-weight: 700;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.table-hrms td { vertical-align: middle; }
.table-hrms tbody tr { transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.table-hrms tbody tr:nth-child(even) { background-color: var(--hrms-theme-row-stripe); }
.table-hrms tbody tr:hover,
.table-hrms tbody tr:hover > td,
.table-hrms tbody tr:hover > th {
  background-color: #E0F2FE !important;
}
.table-hrms tbody tr td { border-bottom: 1px solid rgba(17, 24, 39, 0.06); }
.table-hrms tbody tr:last-child td { border-bottom: none; }

/* Health Certificate Renewals — full row tinted light orange when the employee is on leave */
.table-hrms tbody tr.hrms-row-on-leave { background-color: #FFEDD5 !important; }
.table-hrms tbody tr.hrms-row-on-leave:hover { background-color: #FED7AA !important; }
/* Bigger body text — !important since many pages set a smaller inline
   font-size directly on the <td> (e.g. style="font-size:0.78rem"), which otherwise
   wins over a class rule. Elements with their own inline font-size (badges, name
   links, avatars, icon buttons) are left alone so icons/pills don't get distorted. */
.table-hrms tbody td { font-size: 0.95rem !important; font-weight: 400 !important; }

/* Per-column filter row embedded in the table header (see Employees list). */
.table-hrms .hrms-th-filter-row th {
  background: var(--hrms-gray-100);
  border-bottom: 1px solid rgba(37, 87, 214, 0.15);
  padding: 0.45rem 0.6rem;
}
.table-hrms .hrms-th-filter-row select,
.table-hrms .hrms-th-filter-row input {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--hrms-gray-300);
  border-radius: 6px;
  width: 100%;
  background: #fff;
  color: var(--hrms-gray-700);
}
.table-hrms .hrms-th-filter-row select:focus,
.table-hrms .hrms-th-filter-row input:focus {
  outline: none;
  border-color: var(--hrms-blue);
  box-shadow: 0 0 0 3px rgba(37, 87, 214, 0.18);
}

/* Denser rows for high-volume list pages (e.g. Employees). */
.hrms-compact-table td, .hrms-compact-table th {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.hrms-compact-table .hrms-avatar { font-weight: 600; }

/* ---------------------------------------------------------------------
   Modern data-table components — sitewide colorful table look (indigo →
   cyan gradient title bar, light thead, pastel pill status badges, solid
   colored icon action buttons, gradient avatars, gradient pagination).
   Applied automatically to every table using .table-hrms across the app.
   --------------------------------------------------------------------- */
.hrms-table-title {
  background: var(--hrms-theme-header-grad);
  color: var(--hrms-theme-header-text);
  padding: 1rem 1.5rem;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  border-radius: var(--hrms-radius) var(--hrms-radius) 0 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hrms-table-title i { font-size: 1.1rem; }

/* Pastel pill status badges inside data tables — reuses the existing soft
   bg-soft-*/text-* colors defined above (dashboard tiles, forms use the
   same palette), just adds the rounder pill shape and bolder weight. */
.table-hrms .badge {
  border-radius: 50px;
  padding: 0.35em 0.85em;
  font-weight: 600;
}

/* Gradient circular avatars inside data tables (topbar/profile avatars elsewhere are untouched). */
.table-hrms .hrms-avatar { background: var(--hrms-theme-avatar-grad); color: #fff; }

/* Solid colored icon action buttons inside data tables — blue view, green edit, red delete. */
.table-hrms .btn-sm { border-radius: 8px; }
.table-hrms .btn-sm,
.table-hrms .hrms-icon-btn {
  transition: var(--hrms-transition);
}
.table-hrms .btn-sm:hover,
.table-hrms .hrms-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,.2); }
.table-hrms .btn-outline-success { background: var(--hrms-success) !important; border-color: var(--hrms-success) !important; color: #fff !important; }
.table-hrms .btn-outline-danger,
.table-hrms .btn-link.text-danger { background: var(--hrms-danger) !important; border-color: var(--hrms-danger) !important; color: #fff !important; }
.table-hrms .btn-outline-primary,
.table-hrms .hrms-icon-btn,
.table-hrms .btn-light { background: var(--hrms-blue) !important; border-color: var(--hrms-blue) !important; color: #fff !important; }
.table-hrms .btn-outline-warning { background: var(--hrms-warning) !important; border-color: var(--hrms-warning) !important; color: #fff !important; }
.table-hrms .hrms-icon-btn.hrms-icon-btn-danger,
.table-hrms .hrms-icon-btn[title="Delete"],
.table-hrms .hrms-icon-btn[title="Remove"] { background: var(--hrms-danger) !important; border-color: var(--hrms-danger) !important; color: #fff !important; }
.table-hrms .hrms-icon-btn[title="Edit"] { background: var(--hrms-success) !important; border-color: var(--hrms-success) !important; color: #fff !important; }
.table-hrms .btn-outline-success:hover,
.table-hrms .btn-outline-danger:hover,
.table-hrms .btn-outline-primary:hover,
.table-hrms .btn-outline-warning:hover,
.table-hrms .btn-link.text-danger:hover { color: #fff !important; opacity: 0.88; }

/* Gradient pagination inside any card that contains a data table. */
.hrms-card:has(.table-hrms) .pagination .page-link {
  border: none; background: var(--hrms-theme-pagination); color: #fff; border-radius: 8px; margin: 0 2px;
}
.hrms-card:has(.table-hrms) .pagination .page-item.active .page-link,
.hrms-card:has(.table-hrms) .pagination .page-link:hover { background: var(--hrms-theme-pagination-active); color: #fff; }

/* ---------------------------------------------------------------------
   Printing Services — letterhead documents (Vehicle/Staff Details,
   Leave Application, Resignation Request, Loan Request, ...)
   --------------------------------------------------------------------- */
.print-service-icon {
  width: 52px; height: 52px; border-radius: var(--hrms-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.print-sheet {
  background: #fff;
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: var(--hrms-radius);
  box-shadow: var(--hrms-shadow);
  padding: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.print-letterhead {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 3px solid var(--hrms-blue-dark);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.print-letterhead img { height: 54px; width: auto; }
.print-letterhead .print-company-name { font-size: 1.2rem; font-weight: 700; color: var(--hrms-blue-dark); }
.print-letterhead .print-company-tagline { font-size: 0.78rem; color: var(--hrms-gray-500); }
.print-letterhead .print-doc-date { margin-left: auto; text-align: right; font-size: 0.78rem; color: var(--hrms-gray-500); }
.print-doc-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hrms-gray-900);
  margin-bottom: 1.75rem;
}
.print-field-row { display: flex; gap: 0.4rem; margin-bottom: 0.85rem; font-size: 0.88rem; }
.print-field-row .print-field-label { color: var(--hrms-gray-500); white-space: nowrap; }

/* ---------------------------------------------------------------------
   Calendar (personal plans / notes / memos)
   --------------------------------------------------------------------- */
.hrms-calendar-mini {
  overflow: hidden;
  border-top: 3px solid var(--mini-accent, var(--hrms-blue));
  transition: transform .15s ease, box-shadow .15s ease;
}
.hrms-calendar-mini:hover { transform: translateY(-2px); box-shadow: var(--hrms-shadow-md); }

/* Accent palette — one per mini-month card, cycling across the 6-month page */
.hrms-calendar-mini--blue   { --mini-accent: #2563EB; --mini-accent-light: #DBEAFE; }
.hrms-calendar-mini--green  { --mini-accent: #16A34A; --mini-accent-light: #DCFCE7; }
.hrms-calendar-mini--purple { --mini-accent: #7C3AED; --mini-accent-light: #F3E8FF; }
.hrms-calendar-mini--orange { --mini-accent: #EA580C; --mini-accent-light: #FFEDD5; }
.hrms-calendar-mini--pink   { --mini-accent: #DB2777; --mini-accent-light: #FCE7F3; }
.hrms-calendar-mini--teal   { --mini-accent: #0D9488; --mini-accent-light: #CCFBF1; }

.hrms-calendar-mini-title {
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  padding: 0.5rem 0.5rem;
  margin: -0.5rem -0.5rem 0.5rem;
  background: linear-gradient(135deg, var(--mini-accent, var(--hrms-blue)), color-mix(in srgb, var(--mini-accent, var(--hrms-blue)) 70%, #000 15%));
  letter-spacing: 0.02em;
}
.hrms-calendar-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hrms-calendar-mini-weekday {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--mini-accent, var(--hrms-gray-500));
  background: var(--mini-accent-light, transparent);
  border-radius: 4px;
  padding-bottom: 2px;
}
.hrms-calendar-mini-cell {
  aspect-ratio: 1 / 1;
  border: none;
  background: transparent;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  transition: background .12s ease;
}
.hrms-calendar-mini-cell--empty { cursor: default; }
.hrms-calendar-mini-cell:not(.hrms-calendar-mini-cell--empty):hover { background: var(--mini-accent-light, var(--hrms-gray-100)); }
.hrms-calendar-mini-cell--has-notes { background: color-mix(in srgb, var(--mini-accent-light, var(--hrms-gray-100)) 55%, transparent); }
.hrms-calendar-mini-daynum { font-size: 0.68rem; font-weight: 600; color: var(--hrms-gray-700); line-height: 1; }
.hrms-calendar-mini-cell--today { background: var(--mini-accent-light, #EFF6FF); }
.hrms-calendar-mini-cell--today .hrms-calendar-mini-daynum {
  background: var(--mini-accent, var(--hrms-blue, #2563EB));
  color: #fff;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mini-accent, var(--hrms-blue));
}
.hrms-calendar-mini-cell--today:hover { background: var(--mini-accent-light, #DBEAFE); }
.hrms-calendar-mini-dots { display: flex; gap: 2px; height: 4px; }
.hrms-calendar-mini-dot { width: 4px; height: 4px; border-radius: 50%; }

.hrms-calendar-daynote-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hrms-gray-100);
}
.hrms-calendar-daynote-row:last-child { border-bottom: none; }
.hrms-calendar-daynote-row .hrms-calendar-dot { margin-top: 6px; }

.hrms-calendar-note-pill--blue    { background: #DBEAFE; color: #2563EB; }
.hrms-calendar-note-pill--green   { background: #DCFCE7; color: #22C55E; }
.hrms-calendar-note-pill--purple  { background: #F3E8FF; color: #8B5CF6; }
.hrms-calendar-note-pill--orange  { background: #FFEDD5; color: #F97316; }
.hrms-calendar-note-pill--pink    { background: #FCE7F3; color: #EC4899; }
.hrms-calendar-note-pill--red     { background: #FEE2E2; color: #EF4444; }
.hrms-calendar-note-pill--teal    { background: #CCFBF1; color: #14B8A6; }
.hrms-calendar-note-pill--indigo  { background: #E0E7FF; color: #6366F1; }

.hrms-calendar-color-radio input[type=radio] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  outline-offset: 2px;
}
.hrms-calendar-color-radio input[type=radio]:checked { border-color: #111827; }
.hrms-calendar-color-radio--blue   input { background: #2563EB; }
.hrms-calendar-color-radio--green  input { background: #22C55E; }
.hrms-calendar-color-radio--purple input { background: #8B5CF6; }
.hrms-calendar-color-radio--orange input { background: #F97316; }
.hrms-calendar-color-radio--pink   input { background: #EC4899; }
.hrms-calendar-color-radio--red    input { background: #EF4444; }
.hrms-calendar-color-radio--teal   input { background: #14B8A6; }
.hrms-calendar-color-radio--indigo input { background: #6366F1; }

/* Same-day reminder banner (topbar bell + page-body alert) */
.hrms-calendar-reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.hrms-calendar-reminder-item .hrms-calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .hrms-calendar-mini-daynum { font-size: 0.62rem; }
  .hrms-calendar-mini-title { font-size: 0.76rem; }
}

/* Flash message toasts — fixed to the bottom-left of the content area so they never
   push page content down or change scroll position (see .hrms-page-body flash markup). */
.hrms-toast-stack {
  position: fixed;
  left: calc(var(--sidebar-width) + 24px);
  bottom: 24px;
  z-index: 1080;
  width: 360px;
  max-width: calc(100vw - 48px);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.hrms-toast-stack .alert {
  margin-bottom: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  border-radius: 10px;
  pointer-events: auto;
  animation: hrms-toast-slide-in 0.35s ease both;
}
@keyframes hrms-toast-slide-in {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 991.98px) {
  .hrms-toast-stack { left: 16px; right: 16px; width: auto; }
}

/* Profile photo upload */
.hrms-avatar-edit-btn {
  position: absolute; bottom: -2px; right: -2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; cursor: pointer; padding: 0;
  transition: var(--hrms-transition);
}
.hrms-avatar-edit-btn:hover { background: var(--primary-dark); transform: scale(1.08); }

/* Notifications page */
.hrms-notification-item:hover { background: var(--hrms-gray-100, #f4f6fb); border-radius: 10px; }
.hrms-notification-item:last-child { border-bottom: none !important; }
.nav-pills .nav-link { color: var(--hrms-gray-700, #475569); background: #f4f6fb; font-weight: 600; font-size: 0.85rem; }
.nav-pills .nav-link.active { background: var(--primary); color: #fff; }
.nav-pills .nav-link.active .badge { color: var(--primary) !important; }
.print-field-row .print-field-value { flex: 1; border-bottom: 1px dotted var(--hrms-gray-300); font-weight: 600; min-height: 1.3rem; }
.print-blank-line { display: inline-block; border-bottom: 1px dotted var(--hrms-gray-300); min-width: 100%; min-height: 1.6rem; }
.print-signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.print-signature-box { border-top: 1px solid var(--hrms-gray-700); padding-top: 0.5rem; text-align: center; font-size: 0.78rem; color: var(--hrms-gray-500); }
.print-toolbar { max-width: 860px; margin: 0 auto 1rem; }

/* Staff Details card — replicates the company's existing "Personnel - Staff Detail" printed form. */
.staff-card-header { display: flex; align-items: center; justify-content: center; gap: 0.6rem; text-align: center; border-bottom: 2px double var(--hrms-gray-900); padding-bottom: 0.35rem; margin-bottom: 0.35rem; }
.staff-card-header img { height: 46px; width: auto; }
.staff-card-company-name { font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; color: var(--hrms-gray-900); }
.staff-card-address { font-size: 0.75rem; color: var(--hrms-gray-700); }
.staff-card-website { font-size: 0.7rem; color: var(--hrms-blue); text-decoration: underline; }
.staff-card-title { text-align: center; font-weight: 700; font-size: 0.95rem; text-decoration: underline; margin-bottom: 0.4rem; }
.staff-field-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.staff-field-table td { padding: 0.12rem 0.35rem; border-bottom: 1px solid var(--hrms-gray-300); vertical-align: top; }
.staff-field-table td.staff-field-label { font-weight: 700; width: 44%; white-space: nowrap; }
.staff-field-table td.staff-field-colon { width: 12px; }
.staff-photo-box { width: 110px; height: 125px; border: 1px solid var(--hrms-gray-700); overflow: hidden; margin: 0 auto 0.4rem; display: flex; align-items: center; justify-content: center; background: var(--hrms-gray-100); }
.staff-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.staff-salary-box { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.staff-salary-box caption { caption-side: top; font-weight: 700; text-decoration: underline; padding-bottom: 0.15rem; text-align: center; }
.staff-salary-box td { border: 1px solid var(--hrms-gray-700); padding: 0.15rem 0.4rem; }
.staff-salary-box tr.staff-salary-total td { font-weight: 700; }
.staff-jobdetails-title { text-align: center; font-weight: 700; font-style: italic; text-decoration: underline; margin: 0.5rem 0 0.25rem; font-size: 0.9rem; }
.staff-jobdetails-list { margin: 0 0 0.4rem; padding-left: 1.1rem; font-size: 0.76rem; }
.staff-jobdetails-list li { margin-bottom: 0.15rem; }
.staff-leave-title { text-align: center; font-weight: 700; font-style: italic; text-decoration: underline; margin: 0.5rem 0 0.25rem; font-size: 0.9rem; }
.staff-leave-table { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.staff-leave-table td { border: 1px solid var(--hrms-gray-700); padding: 0.14rem 0.4rem; }
.staff-leave-table td.staff-leave-year { width: 70px; text-align: center; font-weight: 700; }

@media print {
  .hrms-sidebar, .hrms-topbar, .hrms-breadcrumb-bar, .hrms-sidebar-toggle-btn, .no-print { display: none !important; }
  .hrms-content { margin-left: 0 !important; }
  main.hrms-page-body { padding: 0 !important; }
  .print-sheet { border: none; box-shadow: none; border-radius: 0; max-width: 100%; padding: 0; margin: 0; }
  body { background: #fff !important; }
  @page { margin: 14mm; }
}

.hrms-confirm-delete-dialog { border-radius: 15px; border: none; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.hrms-confirm-delete-dialog .btn { min-width: 130px; border-radius: 8px; font-weight: 600; }
.hrms-confirm-delete-icon {
  width: 90px; height: 90px; margin: 0 auto; border-radius: 50%;
  background: #fff4e5; color: #ff9800; border: 5px solid #ffe0b2;
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
}

/* ============================================================
   Reusable Print Report engine (public/static/js/print-report.js)
   printReport(divId, title, orientation) clones #divId into #printReportMount,
   wraps it in a letterhead + footer, and prints only that.
   ============================================================ */
.print-report-mount { display: none; }

@media print {
  /* Best-effort page numbering — supported by Chrome/Edge's @page margin boxes; falls back to
     no page number in browsers that don't support CSS Paged Media margin boxes yet. */
  @page {
    @bottom-center { content: "Page " counter(page) " of " counter(pages); font-size: 9px; color: #666; }
  }

  body.print-report-active > *:not(#printReportMount):not(script) { display: none !important; }
  body.print-report-active #printReportMount { display: block !important; }
  body.print-report-active { background: #fff !important; }

  .print-report-header, .print-report-footer,
  .print-report-content table thead, table.print-report-content thead,
  .print-report-content table .sl-gross, .print-report-content table .sl-net,
  table.print-report-content .sl-gross, table.print-report-content .sl-net {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

.print-report-header { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 3px solid #0F4C81; }
.print-report-header-top { display: flex; align-items: center; gap: 16px; }
.print-report-logo { height: 64px; width: 64px; object-fit: contain; flex-shrink: 0; }
.print-report-company-name { font-size: 20px; font-weight: 700; color: #0F4C81; }
.print-report-company-meta { font-size: 11px; color: #555; margin-top: 2px; }
.print-report-title { text-align: center; font-size: 16px; font-weight: 700; margin-top: 10px; text-transform: uppercase; letter-spacing: .5px; }
.print-report-meta { display: flex; justify-content: space-between; font-size: 11px; color: #666; margin-top: 6px; }

.print-report-footer { margin-top: 18px; padding-top: 8px; border-top: 1px solid #ccc; font-size: 10px; color: #777; text-align: center; }

/* Professional table printing: repeat header on every page, never split a row across pages,
   clean borders, zebra striping, column widths driven by content instead of overflowing. */
.print-report-content { line-height: 1.15; }
.print-report-content table, table.print-report-content { width: 100%; border-collapse: collapse; table-layout: auto; border: 1.5px solid #333; }
.print-report-content table thead, table.print-report-content thead { display: table-header-group; }
.print-report-content table tfoot, table.print-report-content tfoot { display: table-footer-group; }
.print-report-content table tr, table.print-report-content tr { page-break-inside: avoid; break-inside: avoid; }
.print-report-content table th, .print-report-content table td,
table.print-report-content th, table.print-report-content td { border: 1px solid #333; padding: 2px 8px; font-size: 12px; line-height: 1.15; }
.print-report-content table th, table.print-report-content th { background: #E5E7EB; color: #1F2937; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.print-report-content table tbody tr:nth-child(even), table.print-report-content tbody tr:nth-child(even) { background: #f7f9fc; }
.print-report-content img { max-width: 100%; image-rendering: -webkit-optimize-contrast; }
/* Never let a section header/title/signature block start a page while its content is orphaned. */
.print-report-content h1, .print-report-content h2, .print-report-content h3,
.print-report-content h4, .print-report-content h5, .print-report-content h6 {
  page-break-after: avoid; break-after: avoid;
}

/* On-screen Print Preview modal (previewReport()) reuses the exact same letterhead/content/
   footer markup as the real print, scaled down inside a normal Bootstrap modal. */
.print-report-preview-surface { background: #fff; border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.12); padding: 24px; max-height: 75vh; overflow: auto; }

/* Shared "Show N per page" toolbar — used above every paginated table app-wide. */
.hrms-table-toolbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  background: #fff; border-radius: 12px; padding: 12px 18px; margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06); border: 1px solid var(--hrms-gray-200, #e9ecef);
}
.hrms-table-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: #555; }
.hrms-table-toolbar-left select {
  padding: 6px 30px 6px 10px; border: 1px solid #dcdfe6; border-radius: 6px; outline: none;
  cursor: pointer; font-size: 0.85rem; background: #fff; color: #333;
}
.hrms-table-toolbar-left select:hover, .hrms-table-toolbar-left select:focus { border-color: #0d6efd; }
.hrms-table-toolbar-count { font-weight: 600; color: #444; font-size: 0.85rem; white-space: nowrap; }
.hrms-table-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hrms-toolbar-btn {
  border: none; padding: 7px 14px; color: #fff; border-radius: 8px; cursor: pointer;
  font-size: 0.82rem; font-weight: 500; transition: transform .15s, opacity .15s; white-space: nowrap;
}
.hrms-toolbar-btn:hover, .hrms-toolbar-btn:focus { transform: translateY(-1px); opacity: .92; color: #fff; }
.hrms-toolbar-btn-filter { background: #0dcaf0; }
.hrms-toolbar-btn-export { background: #0d6efd; }
.hrms-toolbar-btn-print { background: #6f42c1; }
.hrms-toolbar-btn-columns { background: #6c757d; }
.hrms-table-toolbar-right .dropdown-menu { font-size: 0.85rem; }
.hrms-table-toolbar-right .dropdown-item i { width: 1.1em; text-align: center; }

/* ---------------------------------------------------------------------
   Operations & Logistics — sidebar section labels, page header, dashboard widgets
   --------------------------------------------------------------------- */
.hrms-sidebar-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--sidebar-text);
  opacity: 0.55;
  margin: 1.1rem 1.15rem 0.4rem;
}

.hrms-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.hrms-page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--hrms-gray-900);
  margin: 0;
}
.hrms-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--hrms-gray-300);
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hrms-gray-700);
  box-shadow: var(--hrms-shadow);
}
.hrms-date-badge i.fa-calendar-days { color: var(--hrms-blue); }
.hrms-date-badge i.fa-chevron-down { font-size: 0.65rem; color: var(--hrms-gray-500); }

.hrms-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 1400px) { .hrms-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .hrms-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hrms-kpi-grid { grid-template-columns: 1fr; } }

.hrms-kpi-card {
  background: var(--card-bg);
  border-radius: var(--hrms-radius);
  box-shadow: var(--hrms-shadow);
  padding: 1.1rem 1.2rem;
}
.hrms-kpi-card .hrms-kpi-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; margin-bottom: 0.7rem;
}
.hrms-kpi-card .hrms-kpi-label { font-size: 0.8rem; color: var(--text-light); font-weight: 600; }
.hrms-kpi-card .hrms-kpi-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.hrms-kpi-card .hrms-kpi-sub { font-size: 0.78rem; color: var(--text-light); }
.hrms-kpi-card .hrms-kpi-trend { font-size: 0.78rem; font-weight: 700; }
.hrms-kpi-card .hrms-kpi-trend.up { color: var(--success); }
.hrms-kpi-card .hrms-kpi-trend.down { color: var(--danger); }

.hrms-card {
  background: var(--card-bg);
  border-radius: var(--hrms-radius);
  box-shadow: var(--hrms-shadow);
  padding: 1.25rem;
  height: 100%;
}
.hrms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.hrms-card-header h6 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin: 0; }
.hrms-card-select {
  font-size: 0.78rem; padding: 0.3rem 0.6rem; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text-light);
}

.hrms-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; margin-bottom: 0.55rem; }
.hrms-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.hrms-legend-label { color: var(--text-light); flex: 1; }
.hrms-legend-value { font-weight: 700; color: var(--text); }

.hrms-route-row { margin-bottom: 0.95rem; }
.hrms-route-row:last-child { margin-bottom: 0; }
.hrms-route-row .hrms-route-top { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.35rem; }
.hrms-route-row .hrms-route-name { font-weight: 600; color: var(--text); }
.hrms-route-row .hrms-route-pct { font-weight: 700; color: var(--text); }
.hrms-route-progress { height: 7px; border-radius: 999px; background: var(--hrms-gray-100); overflow: hidden; }
.hrms-route-progress > span { display: block; height: 100%; border-radius: 999px; }

.hrms-mini-table { width: 100%; font-size: 0.83rem; }
.hrms-mini-table thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-light); font-weight: 700; border-bottom: 1px solid var(--border);
  padding: 0 0.5rem 0.6rem;
}
.hrms-mini-table tbody td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--hrms-gray-100); vertical-align: middle; }
.hrms-mini-table tbody tr:last-child td { border-bottom: none; }

.hrms-quick-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; border-radius: 12px; border: none; padding: 1rem 0.5rem;
  font-size: 0.8rem; font-weight: 600; width: 100%; transition: transform .15s;
}
.hrms-quick-action-btn:hover { transform: translateY(-2px); }
.hrms-quick-action-btn i { font-size: 1.2rem; }

.hrms-alert-item { display: flex; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--hrms-gray-100); }
.hrms-alert-item:last-child { border-bottom: none; }
.hrms-alert-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.85rem; }
.hrms-alert-text { font-size: 0.82rem; color: var(--text); }
.hrms-alert-time { font-size: 0.72rem; color: var(--text-light); white-space: nowrap; }

.hrms-doc-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--hrms-gray-100); }
.hrms-doc-item:last-child { border-bottom: none; }
.hrms-doc-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--info-light); color: var(--info); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hrms-doc-title { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.hrms-doc-sub { font-size: 0.74rem; color: var(--text-light); }
