/* ═══════════════════════════════════════════════════════════════════════════
   Vice Regal Travels & Resorts — Executive Apple-Style Design System
   Pristine White & Light Aesthetic • Rich Vibrant Accents • Zero Cutoffs
═══════════════════════════════════════════════════════════════════════════ */

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

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

:root {
  /* Radiant Ambient Palette */
  --bg: #f4f6fc;
  --bg2: #ffffff;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;

  /* Rich Vibrant Apple Accents */
  --blue: #0066eb;
  --blue-hover: #0056cc;
  --blue-l: #eff6ff;
  --blue-gradient: linear-gradient(135deg, #0066eb 0%, #0a84ff 100%);
  --blue-glow: rgba(0, 102, 235, 0.28);

  --green: #10b981;
  --green-hover: #059669;
  --green-l: #ecfdf5;
  --green-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --amber: #f59e0b;
  --amber-hover: #d97706;
  --amber-l: #fffbeb;
  --amber-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  --red: #ef4444;
  --red-hover: #dc2626;
  --red-l: #fef2f2;
  --red-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --purple: #6366f1;
  --purple-l: #eef2ff;
  --purple-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --sidebar-w: 254px;
  --r: 18px;
  --r-sm: 10px;

  /* Deep Multi-Layer Executive Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);

  --t: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.num, .val, .sv, .bal-val, .mc-d, .net-salary-cell, .deduction-cell, .td-num {
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREVENT TEXT CARET / BLINKING CURSOR & TEXT SELECTION ON CLICKABLE BUTTONS
═══════════════════════════════════════════════════════════════════════════ */
button,
.btn,
.tab,
.nav-item,
.preset-chip,
.icon-btn,
.modal-x,
.lt-btn,
.method-card,
.pill,
.badge,
.dept-tag,
.brand,
.sb-brand,
.sb-logo,
.login-toggle {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  caret-color: transparent !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button *,
.btn *,
.tab *,
.nav-item *,
.preset-chip *,
.icon-btn *,
.modal-x *,
.lt-btn * {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  caret-color: transparent !important;
}

button:focus,
.btn:focus,
.tab:focus,
.nav-item:focus {
  outline: none !important;
}

/* Ensure inputs and textareas have normal caret and text selection */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="month"],
textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  caret-color: auto !important;
  cursor: text !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.glass {
  background: #ffffff;
  border: 1px solid var(--border);
}

/* Hide Mobile Topbar on Desktop by default */
.mobile-topbar {
  display: none !important;
}
.sidebar-backdrop {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. CENTERED APPLE MINIMALIST LOGIN
═══════════════════════════════════════════════════════════════════════════ */
#loginScreen {
  min-height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 25%, rgba(224, 242, 254, 0.8) 0%, rgba(244, 247, 252, 1) 50%, #e8eef8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow: hidden;
}

.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.landing-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  pointer-events: none;
}
.lb1 {
  width: 580px;
  height: 580px;
  background: #c7e2fe;
  top: -120px;
  right: -80px;
}
.lb2 {
  width: 520px;
  height: 520px;
  background: #d1fae5;
  bottom: -100px;
  left: -80px;
}
.lb3 {
  width: 440px;
  height: 440px;
  background: #ede9fe;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.login-card-centered {
  width: 100%;
  border-radius: 28px;
  padding: 42px 38px 34px;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-crest img {
  height: 60px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}
.auth-brand-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #0f172a;
  line-height: 1.15;
}
.auth-brand-sub {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--blue);
  margin-top: 2px;
  margin-bottom: 10px;
}
.auth-portal-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid #e2e8f0;
}

/* Segmented Control Switcher */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
  margin-bottom: 22px;
  border: 1px solid #e2e8f0;
}
.auth-tab {
  padding: 10px 14px;
  border-radius: 11px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: var(--t);
}
.auth-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.auth-form .fg {
  margin-bottom: 18px;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.label-row label {
  margin-bottom: 0 !important;
}
.hint-tag {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 500;
}
.btn-lg {
  padding: 13px 20px;
  font-size: 0.94rem;
}

.auth-security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: var(--text3);
}
.auth-security-footer svg {
  width: 13px;
  height: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. APP SHELL & IN-FLOW STICKY SIDEBAR
═══════════════════════════════════════════════════════════════════════════ */
#appScreen {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  width: 236px;
  min-width: 236px;
  max-width: 236px;
  flex-shrink: 0;
  height: 100vh;
  max-height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.03);
}

.sb-logo, .sb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  height: 58px;
  box-sizing: border-box;
}
.sb-logo img, .sb-header img, .brand-logo img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 95px !important;
  object-fit: contain !important;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}
.sb-brand, .brand-text h1 {
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
  color: #0f172a !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sb-tag, .brand-text span {
  font-size: 0.65rem !important;
  color: var(--blue) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sb-nav {
  flex: 1;
  padding: 8px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.nav-section {
  font-size: 0.64rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.85px;
  padding: 8px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 9px;
  color: #475569;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t);
  margin-bottom: 2px;
  position: relative;
  user-select: none;
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: #64748b;
  transition: var(--t);
}
.nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.nav-item:hover svg {
  stroke: #0f172a;
}
.nav-item.active {
  background: var(--blue-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--blue-glow);
}
.nav-item.active svg {
  stroke: #ffffff;
}

.badge {
  margin-left: auto;
  background: var(--red);
  color: #ffffff;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  flex-shrink: 0;
  box-sizing: border-box;
}
.sb-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.sb-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.05);
  -webkit-tap-highlight-color: transparent;
}
.sb-logout-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.12);
}
.sb-logout-btn:active {
  transform: scale(0.97);
  background: #fecaca;
}
.user-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.user-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066eb, #6366f1);
  color: #fff;
  font-weight: 800;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 102, 235, 0.25);
}
.user-av.sm {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}
.user-info {
  flex: 1;
  min-width: 0;
}
.user-info > span:first-child {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.role-tag {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. MAIN CONTENT VIEWPORT (ZERO CUTOFF FLEX CONTAINER)
═══════════════════════════════════════════════════════════════════════════ */
.main {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  max-width: 100%;
  margin-left: 0;
  padding: 24px 30px;
  min-height: 100vh;
  box-sizing: border-box;
}

.page {
  display: none;
  animation: fadeUp 0.22s ease;
}
.page.active {
  display: block;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.ph {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.ph h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: #0f172a;
}
.ps {
  color: var(--text2);
  font-size: 0.82rem;
  margin-top: 3px;
}
.sec-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
  color: #0f172a;
}

/* Filter Cards */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.fc-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fc-group {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex: 1;
  flex-wrap: wrap;
}
.fc-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}
.fc-item label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fc-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. DATA TABLES & STICKY ACTION COLUMNS
═══════════════════════════════════════════════════════════════════════════ */
.tw {
  background: var(--card-bg);
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
  max-width: 100%;
  position: relative;
}

.dtable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dtable-wide {
  min-width: 860px;
}

.dtable-payroll th,
.dtable-payroll td {
  padding: 10px 8px;
  font-size: 0.82rem;
}
.dtable-payroll .btn-sm {
  padding: 5px 9px;
  font-size: 0.76rem;
}
.dtable-payroll .pill {
  padding: 3px 8px;
  font-size: 0.74rem;
}
.dtable-payroll .dept-tag {
  padding: 2px 7px;
  font-size: 0.72rem;
}
.dtable-payroll .emp-av-sm {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
}

.dtable th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dtable td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem;
  vertical-align: middle;
  white-space: nowrap;
}

.dtable tbody tr:last-child td {
  border-bottom: none;
}

.dtable tbody tr {
  transition: background 0.12s ease;
}
.dtable tbody tr:hover {
  background: #f8fbff;
}

.tw {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Action column alignment */
.dtable th:last-child,
.dtable td:last-child {
  text-align: right;
}

.dtable .acts {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Employee Table Cell */
.emp-cell-flex {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.emp-av-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066eb, #6366f1);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 102, 235, 0.2);
}
.emp-cell-names {
  display: flex;
  flex-direction: column;
}
.emp-cell-names strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.emp-id-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.dept-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
}

/* Executive Status Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.pill.p-approved {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.pill.p-pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.pill.p-rejected {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.pill.p-user {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.pill.p-admin {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}
.pill.p-manager {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.pill.p-method {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-weight: 600;
}

/* 1-Click Action Buttons */
.btn-approve {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}
.btn-approve:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-reject-sm {
  background: #fee2e2;
  color: #dc2626 !important;
  border: 1px solid #fca5a5;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}
.btn-reject-sm:hover {
  background: #dc2626;
  color: #ffffff !important;
  border-color: #dc2626;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.btn-excel {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.25);
  cursor: pointer;
  transition: all 0.16s ease;
}
.btn-excel:hover {
  background: linear-gradient(135deg, #166534 0%, #14532d 100%);
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.4);
  transform: translateY(-1px);
}

/* Month Breakdown Banner in Payroll */
.month-meta-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 16px;
}
.month-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}
.month-meta-item strong {
  color: #0f172a;
}
.month-meta-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-cal { background: #0066eb; }
.dot-work { background: #10b981; }
.dot-off { background: #f59e0b; }
.dot-hol { background: #ef4444; }

/* Excel Export Center Modal Cards */
.export-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}
.export-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: var(--t);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.export-card:hover {
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}
.export-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.export-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.export-card-desc {
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 14px;
  line-height: 1.35;
}
@media (max-width: 768px) {
  .export-card-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. FIXED HEADER & FOOTER REUSABLE MODAL
═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
  animation: fadeUp 0.15s ease;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: #ffffff;
  animation: slideUp 0.22s ease;
}
.modal.modal-lg {
  max-width: 780px;
}

.modal-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #ffffff;
}
.modal-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
}
.modal-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}
.modal-x:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  flex: 1 1 auto;
  max-height: calc(88vh - 130px);
}

.modal-foot {
  padding: 16px 28px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: #f8fafc;
  align-items: center;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. STATS GRIDS & RICH ACCENT CARDS
═══════════════════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: var(--t);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg {
  width: 19px;
  height: 19px;
}
.stat-icon.blue { background: #eff6ff; color: #0066eb; }
.stat-icon.orange { background: #fffbeb; color: #d97706; }
.stat-icon.green { background: #ecfdf5; color: #059669; }
.stat-icon.red { background: #fef2f2; color: #dc2626; }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sv {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: #0f172a;
}
.sl {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

/* Quick Apply Card */
.quick-card {
  background: #ffffff;
  border-radius: var(--r);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.card-head-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.days-pill-badge {
  background: #ecfdf5;
  color: #059669;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 6px 16px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bbf7d0;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12);
}
.days-pill-badge.zero {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.12);
}

/* Company Overview Grid */
.ov-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ov-card {
  border-radius: var(--r);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: var(--t);
}
.ov-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ov-card.blue {
  background: linear-gradient(135deg, #f0f7ff, #e0f2fe);
  border: 1px solid #bae6fd;
}
.ov-card.blue .ov-val { color: #0284c7; }
.ov-card.blue .ov-lbl { color: #0369a1; }

.ov-card.orange {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
}
.ov-card.orange .ov-val { color: #d97706; }
.ov-card.orange .ov-lbl { color: #b45309; }

.ov-card.green {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
}
.ov-card.green .ov-val { color: #16a34a; }
.ov-card.green .ov-lbl { color: #15803d; }

.ov-card.red {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
}
.ov-card.red .ov-val { color: #dc2626; }
.ov-card.red .ov-lbl { color: #b91c1c; }

.ov-val {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -1px;
}
.ov-lbl {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. FORM CONTROLS, PRESETS & LEAVE VISUALIZER
═══════════════════════════════════════════════════════════════════════════ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.fg {
  margin-bottom: 18px;
}
.fg label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 7px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}
.lbl-day {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: none;
  letter-spacing: normal;
}

/* Modern Apple Luxury Inputs */
.fc {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: #0f172a;
  background: #f8fafc;
  transition: var(--t);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02) inset;
}
.fc:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.fc:focus {
  background: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 102, 235, 0.12);
}
.fc::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

select.fc {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230066eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
  padding-right: 40px;
  cursor: pointer;
}

textarea.fc {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

/* Date Preset Quick-Chips */
.preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.preset-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.preset-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--t);
}
.preset-chip:hover {
  background: var(--blue-l);
  color: var(--blue);
  border-color: #bfdbfe;
  transform: translateY(-1px);
}
.preset-chip.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* Live Leave Span Visualizer */
.span-breakdown-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  animation: fadeUp 0.2s ease;
}
.breakdown-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.b-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.b-chip.off {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.b-chip.work {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.b-chip.holiday {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.breakdown-summary {
  font-size: 0.84rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Leave Utilization Banner */
.utilization-banner {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.ub-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.ub-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  display: block;
}
.ub-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
  display: block;
}
.ub-bar {
  width: 100%;
  height: 10px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.ub-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ub-fill.safe {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}
.ub-fill.warning {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}
.ub-fill.danger {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* Executive Payslip Styles */
.payslip-wrap {
  padding: 10px 0;
  color: #0f172a;
}
.payslip-voucher {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  position: relative;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.payslip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.payslip-logo-title h3 {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #0f172a;
}
.payslip-logo-title p {
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.payslip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.payslip-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
}
.payslip-box-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 8px;
}
.payslip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 6px;
}
.payslip-row:last-child {
  margin-bottom: 0;
}
.payslip-row .k {
  color: #64748b;
}
.payslip-row .v {
  font-weight: 700;
  color: #0f172a;
}
.payslip-math-banner {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.payslip-math-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.payslip-math-formula {
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  color: #1e3a8a;
  font-weight: 700;
}
.payslip-summary-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.payslip-summary-box .lbl {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
}
.payslip-summary-box .val {
  font-size: 1.9rem;
  font-weight: 900;
  color: #34d399;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #0066eb 0%, #0052cc 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 102, 235, 0.32);
}
.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(0, 102, 235, 0.44);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-success-flash {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-sec {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.btn-sec:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}
.btn-danger:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 9px;
}
.btn-lg {
  padding: 13px 26px;
  font-size: 0.94rem;
}
.btn-full {
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: var(--t);
}
.icon-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.err-msg {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
}

/* Status & Role Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.p-pending { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.p-approved { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.p-rejected { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.p-user { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.p-manager { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.p-admin { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }

/* ═══════════════════════════════════════════════════════════════════════════
   8. SALARY MANAGEMENT & PAYROLL HERO
═══════════════════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--border);
}
.tab {
  padding: 8px 20px;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b;
  transition: var(--t);
}
.tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.salary-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 28px;
  color: var(--text);
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.sal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sal-item .lbl {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 6px;
}
.sal-item .val {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #0f172a;
}
.sal-item .val.deduct-total { color: var(--red); }
.sal-item .val.net-sal { color: #059669; }

.deduction-cell {
  color: var(--red);
  font-weight: 700;
}
.deduction-cell.zero {
  color: #94a3b8;
  font-weight: 500;
}
.net-salary-cell {
  color: #059669;
  font-weight: 800;
  font-size: 0.95rem;
}

.method-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.method-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
  transition: var(--t);
  text-align: center;
  background: #ffffff;
}
.method-card:hover {
  border-color: var(--blue);
  background: #f8fbff;
}
.method-card.selected {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 2px var(--blue);
}
.mc-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.mc-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}
.mc-desc {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
}
.formula-preview {
  background: #f8fafc;
  border-radius: var(--r-sm);
  padding: 14px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--blue);
  margin-top: 12px;
  border: 1px solid #cbd5e1;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. EMPLOYEE MASTER & ANALYTICS
═══════════════════════════════════════════════════════════════════════════ */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.emp-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--t);
}
.emp-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.emp-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.emp-card-av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066eb, #6366f1);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emp-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
.emp-id-tag {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}
.emp-meta {
  margin-bottom: 18px;
}
.emp-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
}
.emp-row:last-child {
  border-bottom: none;
}
.emp-row .k { color: #64748b; font-weight: 500; }
.emp-row .v { font-weight: 700; color: #0f172a; text-align: right; word-break: break-word; }
.emp-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.ea-hero {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.monthly-bd {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.month-chip {
  background: #ffffff;
  border-radius: var(--r);
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.month-chip .mc-m {
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.month-chip .mc-d {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
}
.month-chip .mc-l {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. SETTINGS & WEEKDAYS
═══════════════════════════════════════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-card {
  background: #ffffff;
  border-radius: var(--r);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}
.settings-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.set-desc {
  font-size: 0.84rem;
  color: #64748b;
  margin-top: 4px;
  margin-bottom: 18px;
}

.weekday-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.day-btn {
  flex: 1;
  min-width: 54px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  transition: var(--t);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #0f172a;
}
.day-btn span {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}
.day-btn:hover {
  border-color: #94a3b8;
}
.day-btn.selected {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}
.day-btn.selected span {
  color: #dc2626;
}

.weekoff-hint {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 14px;
}

/* Toast Notifications */
.toast-cont {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInR 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 380px;
}
.toast.success { background: #065f46; border: 1px solid #059669; }
.toast.error { background: #991b1b; border: 1px solid #dc2626; }
.toast.info { background: #1e40af; border: 1px solid #2563eb; }

@keyframes slideInR {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(10px); }
}

.empty {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}
.empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.35;
}
.empty p {
  font-size: 0.92rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ov-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide mobile bottom navigation on desktop screens */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-topbar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    padding: env(safe-area-inset-top, 0px) 16px 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 150;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    user-select: none;
  }
  .mobile-brand img {
    height: 32px;
    width: auto;
  }
  .menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #0f172a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-toggle-btn:active {
    background: #f1f5f9;
    transform: scale(0.92);
  }
  .menu-toggle-btn svg {
    width: 22px;
    height: 22px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 86vw;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
    border-radius: 0 24px 24px 0;
    background: #ffffff;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 190;
  }
  .sidebar-backdrop.open {
    display: block;
  }

  .main {
    margin-left: 0 !important;
    padding: calc(68px + env(safe-area-inset-top, 0px)) 16px calc(92px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  /* Native Mobile Bottom Navigation Dock */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 150;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
  }
  .mb-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
  }
  .mb-nav-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.18s ease, stroke 0.18s ease;
  }
  .mb-nav-item:active {
    transform: scale(0.92);
  }
  .mb-nav-item.active {
    color: var(--primary, #1e3a8a);
    font-weight: 700;
  }
  .mb-nav-item.active svg {
    stroke: var(--primary, #1e3a8a);
    stroke-width: 2.25;
    transform: translateY(-1px);
  }
  .mb-nav-item.mb-nav-action {
    color: var(--primary, #1e3a8a);
  }
  .mb-action-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    margin-top: -14px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .mb-action-circle svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
  }
  .mb-nav-action:active .mb-action-circle {
    transform: scale(0.9);
  }

  /* Native Mobile Bottom-Sheet Modals */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    border-radius: 24px 24px 0 0 !important;
    margin: 0 !important;
    animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: none !important;
  }
  @keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-head {
    padding: 16px 20px 12px !important;
    position: relative !important;
  }
  .modal-head::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 999px;
  }
  .modal-body {
    padding: 16px 20px !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
  }
  .modal-foot {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Form Inputs - Ensure 16px to prevent iOS Safari auto-zoom */
  input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    font-size: 16px !important;
  }

  /* Dashboard Banner on Mobile */
  .dash-welcome-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 20px 18px !important;
  }
  .dw-actions {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }
  .dw-actions .btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    padding: 9px 12px !important;
  }

  /* Stats Grid on Mobile - 2x2 Balanced Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .ov-grid {
    grid-template-columns: 1fr !important;
  }
  .sal-grid {
    grid-template-columns: 1fr !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .ph {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .fc-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .fc-group, .fc-item, .fc-actions, .fc-actions button {
    width: 100% !important;
  }

  /* Tactile native tap feedback */
  .btn:active, .box-card-btn:active, .action-btn:active, .view-btn:active, .filter-pill:active, .icon-btn:active {
    transform: scale(0.97) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPLE-GRADE MINIMALIST BOX & CARD DESIGN SYSTEM (Button-Centric Architecture)
═══════════════════════════════════════════════════════════════════════════ */

/* Segmented View Switcher (Box Cards vs Table List) */
.view-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.view-switcher {
  display: inline-flex;
  align-items: center;
  background: #e9ecef;
  padding: 3px;
  border-radius: 12px;
  user-select: none;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.16s ease;
}

.view-btn:hover {
  color: var(--text);
}

.view-btn.active {
  background: #ffffff;
  color: var(--blue);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Quick Filter Pills (One-Click Segmented Filtering) */
.filter-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--blue-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 102, 235, 0.28);
}

.filter-pill .fp-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.07);
  color: inherit;
  font-weight: 700;
}

.filter-pill.active .fp-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Box Card Grid Layout */
.box-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

/* Single Box Card */
.box-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

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

.box-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bch-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bch-names {
  min-width: 0;
}

.bch-names strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bch-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Date Span Container Inside Cards */
.date-span-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.span-col {
  display: flex;
  flex-direction: column;
}

.span-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  letter-spacing: 0.4px;
}

.span-date {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1px;
}

.span-arrow {
  color: var(--text3);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.span-days-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Reason Quote Box */
.reason-quote-box {
  background: #f8fafc;
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--text2);
  margin-bottom: 14px;
  line-height: 1.45;
}

.reason-quote-box.empty {
  font-style: italic;
  color: var(--text3);
  border-left-color: #cbd5e1;
}

/* Audit / Remarks Line */
.card-audit-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 12px;
  padding: 4px 0;
}

/* Card Action Button Bar */
.box-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

/* Employee Balance Cards Specifics */
.emp-balance-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ebc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.ebc-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}

.ebc-stat-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  letter-spacing: 0.3px;
}

.ebc-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.ebc-stat-box.green .ebc-stat-val {
  color: var(--green);
}

.ebc-stat-box.amber .ebc-stat-val {
  color: var(--amber);
}

.ebc-stat-box.red .ebc-stat-val {
  color: var(--red);
}

.ebc-progress-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}

.ebc-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--blue-gradient);
  transition: width 0.3s ease;
}

/* Payroll Box Card Specifics */
.payroll-box-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pc-net-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}

.pc-net-lbl {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #065f46;
  letter-spacing: 0.4px;
}

.pc-net-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: #047857;
  font-variant-numeric: tabular-nums;
}

.pc-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.pc-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 8px 10px;
}

.pc-item-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
}

.pc-item-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Dashboard Quick Actions Bento Grid */
.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}

.dash-action-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  text-align: left;
  user-select: none;
}

.dash-action-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow);
}

.dash-action-card:active {
  transform: scale(0.98);
}

.dac-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dac-icon.blue { background: #eff6ff; color: var(--blue); }
.dac-icon.green { background: #ecfdf5; color: var(--green); }
.dac-icon.amber { background: #fffbeb; color: var(--amber); }
.dac-icon.purple { background: #eef2ff; color: var(--purple); }
.dac-icon.orange { background: #fff7ed; color: #ea580c; }

.dac-content h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.dac-content p {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.25;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   EXECUTIVE DASHBOARD WORKSPACE (2-COLUMN BALANCED LAYOUT)
   ══════════════════════════════════════════════════════════════════════════════ */
.dash-welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.dw-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dw-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  width: fit-content;
}

.dw-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.dw-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.4px;
}

.dw-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

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

/* Master Metrics Ribbon micro-chips & progress bar */
.dm-chip {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 5px;
}

.dm-chip.blue { background: #eff6ff; color: #2563eb; }
.dm-chip.orange { background: #fff7ed; color: #ea580c; }
.dm-chip.green { background: #ecfdf5; color: #059669; }
.dm-chip.red { background: #fef2f2; color: #dc2626; }

.highlight-green {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%) !important;
  border-color: #bbf7d0 !important;
}

.dm-progress-wrap {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.dm-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* 2-Column Responsive Workspace */
.dashboard-workspace-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .dashboard-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.dw-main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dw-side-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Dashboard Badges */
.dbc-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-bottom: 2px;
}

.dbc-badge.blue { background: #eff6ff; color: #2563eb; }
.dbc-badge.green { background: #ecfdf5; color: #059669; }
.dbc-badge.purple { background: #f3e8ff; color: #7c3aed; }
.dbc-badge.amber { background: #fffbeb; color: #b45309; }

/* Quick Reason Tags */
.quick-reason-tags {
  display: flex;
  gap: 5px;
}

.qrt-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid #e2e8f0;
  user-select: none;
}

.qrt-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* My Recent Applications List */
.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drl-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.16s ease;
}

.drl-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.drl-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drl-dates {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.drl-days-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 7px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 5px;
}

.drl-reason {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.drl-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dash-empty-state {
  text-align: center;
  padding: 24px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.des-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.des-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 3px;
}

.des-sub {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.35;
  max-width: 320px;
  margin: 0 auto;
}

/* Admin Command Hub & Mini Pulse */
.admin-highlight-box {
  border-color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.pulse-badge-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #fde047;
}

.admin-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.apg-tile {
  padding: 9px 8px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.apg-tile.blue { background: #eff6ff; border-color: #dbeafe; }
.apg-tile.orange { background: #fff7ed; border-color: #ffedd5; }
.apg-tile.green { background: #ecfdf5; border-color: #d1fae5; }
.apg-tile.red { background: #fef2f2; border-color: #fee2e2; }

.apg-num {
  display: block;
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.apg-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
}

.dash-approvals-queue-wrap {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.daq-head {
  font-size: 0.7rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.daq-item {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.daq-item:last-child {
  margin-bottom: 0;
}

.daq-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.daq-name {
  font-size: 0.78rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.daq-dept {
  font-size: 0.65rem;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  color: #475569;
}

.daq-span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0369a1;
}

.daq-reason {
  font-size: 0.68rem;
  color: #64748b;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.daq-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.dash-empty-queue {
  font-size: 0.74rem;
  color: #059669;
  padding: 6px 4px;
  text-align: center;
  font-weight: 500;
}

.dash-actions-grid.bento-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0 0;
}

/* Upcoming Holidays List */
.dash-holidays-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 11px;
}

.dhl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}

.dhl-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dhl-date-chip {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.2px;
}

.dhl-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
}

.dhl-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
}

.month-calendar-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 500;
}

.mcs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}

/* Quick Instant Exports */
.dash-quick-exports {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dqe-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.16s ease;
}

.dqe-btn:hover {
  background: #ffffff;
  border-color: #10b981;
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

.dqe-icon {
  font-size: 1.1rem;
  line-height: 1;
}

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

.dqe-title {
  font-size: 0.77rem;
  font-weight: 700;
  color: #0f172a;
}

.dqe-desc {
  font-size: 0.67rem;
  color: #64748b;
}

.dqe-arrow {
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
}

/* Employee Personal Quota Card */
.emp-quota-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.eqb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 0.78rem;
}

.eqb-row.highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
  font-weight: 700;
}

.eqb-lbl {
  color: #475569;
}

.eqb-val {
  font-weight: 700;
  color: #0f172a;
}

.eqb-val.green {
  color: #059669;
}

.emp-policy-note {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.4;
  padding: 9px 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 9px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   PERFECT MOBILE RESPONSIVENESS & TOUCH ENHANCEMENTS
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .login-card-centered {
    width: calc(100% - 32px) !important;
    max-width: 400px !important;
    margin: 20px auto !important;
    padding: 28px 20px !important;
  }
  .auth-crest img {
    height: 52px !important;
  }
  .auth-brand-title {
    font-size: 1.5rem !important;
  }
  .auth-tabs {
    gap: 4px !important;
  }
  .auth-tab {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch !important;
    border-radius: 12px !important;
  }
  .modal-box {
    width: calc(100vw - 24px) !important;
    max-width: 540px !important;
    margin: 12px auto !important;
    padding: 20px 16px !important;
    max-height: 90vh !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .stat-card {
    padding: 10px 12px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }
  .stat-icon {
    width: 34px !important;
    height: 34px !important;
  }
  .stat-info strong {
    font-size: 1.15rem !important;
  }
  .dash-kpi-grid, .sal-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .box-card-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .box-card {
    padding: 14px 16px !important;
    border-radius: 16px !important;
  }
  .view-switcher-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .view-switcher {
    width: 100% !important;
    justify-content: center !important;
  }
  .view-btn {
    flex: 1 !important;
    justify-content: center !important;
  }
  .filter-pill-group {
    width: 100% !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
  }
  .filter-pill {
    flex-shrink: 0 !important;
  }
}
