/* =========================================================================
   AKI DATABASE - Modern Emerald / Forest Green Design System (V2 PRO)
   Inspired by Evergreen Medical Center (EMC) & High-End Dashboard Architecture
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Amiri:wght@400;700&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

/* =========================================================================
   1. COLOR DESIGN TOKENS (EMC Green Palette - Eye-Friendly & High-Contrast)
   ========================================================================= */
:root {
  /* Green Core */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --emerald-accent: #10b981;
  --emerald-dark: #059669;
  --emerald-deep: #047857;

  /* Slate Neutrals */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Section Shading Pastels (Distinguishable Boxes) */
  --tint-mint-bg: #f0fdf4;
  --tint-mint-border: #bbf7d0;
  --tint-mint-text: #166534;

  --tint-blue-bg: #eff6ff;
  --tint-blue-border: #bfdbfe;
  --tint-blue-text: #1e40af;

  --tint-purple-bg: #faf5ff;
  --tint-purple-border: #e9d5ff;
  --tint-purple-text: #6b21a8;

  --tint-amber-bg: #fffbeb;
  --tint-amber-border: #fef08a;
  --tint-amber-text: #92400e;

  /* Theme Surfaces (Classic Light Emerald) */
  --bg: #edf2f7;
  --surface: #ffffff;
  --surface-secondary: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --primary: #10b981;
  --primary-dark: #059669;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 3px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 36px -4px rgba(16, 185, 129, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.04);

  /* Sidebar Floating Theme Custom Properties (Easy 1-Line Swap) */
  /* Default: Medium Slate / Dark Slate Gradient (Lighter, Eye-Friendly Tone) */
  --sidebar-bg-start: #1e293b;
  --sidebar-bg-end: #273549;
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --sidebar-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.28), 0 10px 20px -5px rgba(15, 23, 42, 0.14);

  /* Alternative Preset 1: Deep Charcoal (Uncomment to use) */
  /* --sidebar-bg-start: #24242a; --sidebar-bg-end: #2d2d35; */

  /* Alternative Preset 2: Medium Teal (Uncomment to use) */
  /* --sidebar-bg-start: #134e4a; --sidebar-bg-end: #0f766e; */

  /* Elevated Card System Tokens (Linear / Notion Style Depth) */
  --card-radius: 16px;
  --card-radius-sm: 10px;
  --card-radius-lg: 20px;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.035);
  --card-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.07), 0 10px 24px -2px rgba(0, 0, 0, 0.06);
  --card-shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.8);

  /* Type 1: Data & Records (Emerald Tint) */
  --accent-data-border: rgba(16, 185, 129, 0.22);
  --accent-data-bg: #ffffff;
  --accent-data-tint: rgba(16, 185, 129, 0.025);
  --accent-data-glow: 0 0 0 1px rgba(16, 185, 129, 0.08) inset;

  /* Type 2: Form & Inputs (Blue Tint) */
  --accent-form-border: rgba(59, 130, 246, 0.22);
  --accent-form-bg: #ffffff;
  --accent-form-tint: rgba(59, 130, 246, 0.025);
  --accent-form-glow: 0 0 0 1px rgba(59, 130, 246, 0.08) inset;

  /* Type 3: Pending & Warnings (Amber Tint) */
  --accent-warning-border: rgba(245, 158, 11, 0.28);
  --accent-warning-bg: #ffffff;
  --accent-warning-tint: rgba(245, 158, 11, 0.03);
  --accent-warning-glow: 0 0 0 1px rgba(245, 158, 11, 0.1) inset;

  /* Type 4: System & Infrastructure (Slate Tint) */
  --accent-system-border: rgba(100, 116, 139, 0.22);
  --accent-system-bg: #ffffff;
  --accent-system-tint: rgba(100, 116, 139, 0.025);
  --accent-system-glow: 0 0 0 1px rgba(100, 116, 139, 0.08) inset;
}

/* =========================================================================
   2. MODERN DARK THEME OVERRIDES (Deep Slate & Glowing Mint/Emerald)
   ========================================================================= */
body.modern-theme {
  --bg: #090e13;
  --surface: #101922;
  --surface-secondary: #14202c;
  --text: #f8fafc;
  --text-muted: #8ea0b2;
  --border: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --tint-mint-bg: rgba(34, 197, 94, 0.08);
  --tint-mint-border: rgba(34, 197, 94, 0.25);
  --tint-mint-text: #4ade80;

  --tint-blue-bg: rgba(59, 130, 246, 0.08);
  --tint-blue-border: rgba(59, 130, 246, 0.25);
  --tint-blue-text: #60a5fa;

  --tint-purple-bg: rgba(168, 85, 247, 0.08);
  --tint-purple-border: rgba(168, 85, 247, 0.25);
  --tint-purple-text: #c084fc;

  --tint-amber-bg: rgba(245, 158, 11, 0.08);
  --tint-amber-border: rgba(245, 158, 11, 0.25);
  --tint-amber-text: #fbbf24;

  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.65);

  /* Elevated Dark Mode Card System Tokens */
  --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 8px 26px rgba(0, 0, 0, 0.55);
  --card-shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Type 1: Data & Records (Emerald Glow) */
  --accent-data-border: rgba(16, 185, 129, 0.35);
  --accent-data-bg: #101922;
  --accent-data-tint: rgba(16, 185, 129, 0.04);
  --accent-data-glow: 0 0 0 1px rgba(16, 185, 129, 0.12) inset;

  /* Type 2: Form & Inputs (Blue Glow) */
  --accent-form-border: rgba(59, 130, 246, 0.35);
  --accent-form-bg: #101922;
  --accent-form-tint: rgba(59, 130, 246, 0.04);
  --accent-form-glow: 0 0 0 1px rgba(59, 130, 246, 0.12) inset;

  /* Type 3: Pending & Warnings (Amber Glow) */
  --accent-warning-border: rgba(245, 158, 11, 0.4);
  --accent-warning-bg: #101922;
  --accent-warning-tint: rgba(245, 158, 11, 0.05);
  --accent-warning-glow: 0 0 0 1px rgba(245, 158, 11, 0.14) inset;

  /* Type 4: System & Infrastructure (Slate Glow) */
  --accent-system-border: rgba(100, 116, 139, 0.35);
  --accent-system-bg: #101922;
  --accent-system-tint: rgba(100, 116, 139, 0.04);
  --accent-system-glow: 0 0 0 1px rgba(100, 116, 139, 0.12) inset;
}

/* =========================================================================
   2.1. DELUXE THEME OVERRIDES (Glassmorphism / 3D "Pro" & Dimensional Radii)
   ========================================================================= */
body.deluxe-theme {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-secondary: #f8faff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.85);
  --border-subtle: rgba(241, 245, 249, 0.8);
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;

  --card-radius: 22px;
  --card-radius-sm: 14px;
  --card-radius-lg: 30px;
  --card-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 20px 40px -8px rgba(139, 92, 246, 0.2), 0 8px 18px rgba(0, 0, 0, 0.05);
  --card-shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}

body.deluxe-theme .card,
body.deluxe-theme .stat-card,
body.deluxe-theme .search-card-container {
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

body.deluxe-theme .card:hover,
body.deluxe-theme .stat-card:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: var(--card-shadow-hover);
}

body.deluxe-theme .btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%) !important;
  box-shadow: 0 8px 22px -3px rgba(139, 92, 246, 0.45);
  border-radius: 30px;
}

body.deluxe-theme .input-control {
  border-radius: 20px;
  background: #f8faff;
  border-color: #cbd5e1;
}

body.deluxe-theme .input-control:focus {
  background: #ffffff;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

/* =========================================================================
   GLOBAL TYPOGRAPHY & INTER STANDARDIZATION (Part 1)
   ========================================================================= */
*, *::before, *::after, html, body, input, button, select, textarea, optgroup, table, th, td {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  transition: background 0.25s ease, color 0.25s ease;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Weight Hierarchy */
h1, .page-title, .landing-brand-title, .modal-title, .doc-title-main {
  font-weight: 700;
}

h2, h3, h4, .section-title, .card-title, .portal-title, .op-title, .bmet-worker-title {
  font-weight: 600;
}

p, body, td, th, input, textarea, select, label {
  font-weight: 400;
}

button, .btn, .badge, .badge-status, .res-pill, .stat-card-label, .chip-label, .doc-pill-btn, .ops-sub-btn, .bmet-filter-btn, .mob-tab-btn {
  font-weight: 500;
}

/* Numeric ID Tabular Alignment */
.id-number, .tabular-nums, .stat-card-num, .stat-cell-num, .box-value, [data-num] {
  font-variant-numeric: tabular-nums;
  -moz-font-feature-settings: "tnum";
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  letter-spacing: 0.02em;
}

/* Language font overrides */
body.lang-bn, body.lang-bn *:not(.ar):not(.arabic-field):not(.res-sponsor-arab-text) {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, sans-serif !important;
}

[dir="rtl"], .arabic-field, .res-sponsor-arab-text, .ar {
  font-family: 'Amiri', serif !important;
}

/* Minimum Tap Target Utility */
.btn-touch {
  min-height: 44px;
  min-width: 44px;
}

/* =========================================================================
   3. SIDEBAR NAVIGATION - FLOATING PANEL (300px WIDE, REFINED SPACING)
   ========================================================================= */
.sidebar {
  width: 300px;
  background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
  border: 1px solid var(--sidebar-border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  height: calc(100vh - 32px);
  z-index: 100;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  box-shadow: var(--sidebar-shadow);
  overflow: hidden;
  box-sizing: border-box;
}

body.modern-theme .sidebar {
  background: linear-gradient(180deg, #101922 0%, #172430 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.deluxe-theme .sidebar {
  background: linear-gradient(180deg, #1e293b 0%, #2e266d 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.45);
}

.sidebar-header {
  padding: 24px 22px 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.logo-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-top: 3px;
  letter-spacing: -0.01em;
}

/* Sidebar Nav Links */
.sidebar-nav {
  padding: 16px 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
  border: 1px solid transparent;
  user-select: none;
  position: relative;
}

.nav-icon-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: rgba(255, 255, 255, 0.85);
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-item:hover .nav-icon-box {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.nav-item:hover .nav-icon {
  stroke: #ffffff;
}

/* Active Nav Item: Refined Purple-to-Blue Deluxe Gradient with 3D Elevation */
.nav-item.active {
  background: linear-gradient(135deg, #7B2FF7 0%, #4C6FFF 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 10px 24px -4px rgba(123, 47, 247, 0.55), 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  transform: translateX(3px);
}

.nav-item.active .nav-icon-box {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-item.active .nav-icon {
  stroke: #ffffff !important;
  stroke-width: 2.5;
}

/* Classic theme override if user is explicitly in Classic theme */
body.theme-classic:not(.deluxe-theme) .nav-item.active {
  background: #ffffff !important;
  color: #0f172a !important;
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3) !important;
}
body.theme-classic:not(.deluxe-theme) .nav-item.active .nav-icon-box {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}
body.theme-classic:not(.deluxe-theme) .nav-item.active .nav-icon {
  stroke: #047857 !important;
}

/* Sidebar Portals Box */
.sidebar-portals-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
}

.portals-box-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-portal-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-portal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.sidebar-portal-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(52, 211, 153, 0.5);
  transform: translateX(2px);
}

.sidebar-portal-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
}

.sidebar-portal-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.sidebar-portal-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* Sidebar Footer Info Card */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.2);
}

.server-status-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 8px var(--green-500);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.server-sub-info {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Fira Code', monospace;
}

/* =========================================================================
   4. MAIN CONTENT AREA & HEADER
   ========================================================================= */
.main {
  margin-left: 292px;
  width: calc(100% - 292px);
  max-width: calc(100vw - 292px);
  padding: 24px 32px 80px;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

/* Top Cluster: Theme Switcher & Actions */
.top-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
  z-index: 50;
}

.theme-toggle-cluster {
  display: inline-flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

body.modern-theme .theme-toggle-cluster {
  background: #080d12;
  border-color: var(--border);
}

.theme-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

body.modern-theme .theme-btn.active {
  background: var(--surface-secondary);
  color: #ffffff;
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
  padding-right: 220px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =========================================================================
   5. TAB VIEWS & TRANSITIONS
   ========================================================================= */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   6. HERO STATS BANNER (Distinguishable Pastels for Each Box)
   ========================================================================= */
.today-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

body.modern-theme .today-hero {
  background: var(--surface);
}

.today-hero-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.stat-cell {
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* Distinct Box Shades */
.stat-cell-pax {
  background: var(--tint-mint-bg);
  border: 1.5px solid var(--tint-mint-border);
}
.stat-cell-pax .stat-cell-num {
  color: var(--tint-mint-text);
}

.stat-cell-visas {
  background: var(--tint-blue-bg);
  border: 1.5px solid var(--tint-blue-border);
}
.stat-cell-visas .stat-cell-num {
  color: var(--tint-blue-text);
}

.stat-cell-professions {
  background: var(--tint-purple-bg);
  border: 1.5px solid var(--tint-purple-border);
}
.stat-cell-professions .stat-cell-num {
  color: var(--tint-purple-text);
}

.stat-cell-agents {
  background: var(--tint-amber-bg);
  border: 1.5px solid var(--tint-amber-border);
}
.stat-cell-agents .stat-cell-num {
  color: var(--tint-amber-text);
}

.stat-cell-quota {
  background: linear-gradient(135deg, #059669, #047857);
  border: 1.5px solid #047857;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}
.stat-cell-quota .stat-cell-label {
  color: rgba(255, 255, 255, 0.85);
}
.stat-cell-quota .stat-cell-num {
  color: #ffffff;
}

.stat-cell-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-cell-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* =========================================================================
   7. ULTRA-MODERN HERO SEARCH BAR (User Requested: Much Cooler & Clear)
   ========================================================================= */
.search-card {
  background: var(--surface);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

/* Subtle Animated Top Glow Strip */
.search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #059669, #34d399, #10b981);
  background-size: 200% 100%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.modern-theme .search-card {
  background: #111c27;
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6);
}

.search-card-header {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-badge-pill {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--green-50);
  color: var(--green-700);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--green-200);
  display: flex;
  align-items: center;
  gap: 5px;
}

body.modern-theme .search-badge-pill {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

/* Hero Input Wrapper (Flex Architecture - Text CANNOT overlap icon) */
.search-bar-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
}

.search-input-card {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--slate-300);
  border-radius: 14px;
  padding: 0 16px;
  height: 58px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body.modern-theme .search-input-card {
  background: #081017;
  border-color: rgba(255, 255, 255, 0.12);
}

.search-input-card:focus-within {
  border-color: var(--green-500);
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.2), 0 4px 16px rgba(16, 185, 129, 0.1);
}

body.modern-theme .search-input-card:focus-within {
  border-color: #22c55e;
  background: #0a141e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.25), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.search-prefix-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
  color: var(--green-600);
}

body.modern-theme .search-prefix-icon {
  color: var(--primary);
}

/* Specificity override: Force transparent, borderless, zero-padding for input inside card */
.search-input-card input[type="text"].search-input,
.search-input-card .search-input {
  flex: 1 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

body.modern-theme .search-input-card input[type="text"].search-input,
body.modern-theme .search-input-card .search-input {
  color: #ffffff !important;
}

.search-kbd-badge {
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  color: var(--slate-500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
  margin-left: 10px;
  flex-shrink: 0;
}

body.modern-theme .search-kbd-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--slate-400);
}

/* Prominent Emerald Action Button */
.btn-search-hero {
  height: 56px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-search-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #047857, #059669);
}

body.modern-theme .btn-search-hero {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #081017;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Quick Search Tag Chips */
.quick-search-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.chip-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-chip {
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.modern-theme .search-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.search-chip:hover {
  background: var(--green-600);
  color: #ffffff;
  border-color: var(--green-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

body.modern-theme .search-chip:hover {
  background: #22c55e;
  color: #090e13;
  border-color: #22c55e;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

/* =========================================================================
   8. RESULT CARD & CANDIDATE RECORD
   ========================================================================= */
.worker-result-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

body.modern-theme .worker-result-card {
  border-color: var(--border);
  background: var(--surface);
}

.worker-res-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 20px;
  gap: 16px;
}

.worker-res-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.res-sponsor-eng-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.res-sponsor-arab-text {
  font-family: 'Amiri', serif;
  font-size: 20px;
  color: var(--green-700);
  direction: rtl;
  margin-top: 2px;
}

body.modern-theme .res-sponsor-arab-text {
  color: var(--primary);
}

.res-meta-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.res-pill-green {
  background: var(--green-100);
  color: var(--green-800);
}

body.modern-theme .res-pill-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.res-pill-blue {
  background: var(--blue-100);
  color: var(--blue-700);
}

body.modern-theme .res-pill-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Quota Progress Bar */
.quota-bar-wrapper {
  margin-bottom: 20px;
}

.quota-bar-track {
  height: 8px;
  background: var(--slate-200);
  border-radius: 100px;
  overflow: hidden;
}

body.modern-theme .quota-bar-track {
  background: rgba(255, 255, 255, 0.08);
}

.quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--emerald-accent));
  border-radius: 100px;
  transition: width 0.4s ease;
}

/* Passengers Allocation Table */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--slate-100);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

body.modern-theme .data-table th {
  background: #081017;
  border-bottom-color: var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--text);
  vertical-align: middle;
}

body.modern-theme .data-table td {
  border-bottom-color: var(--border);
}

.data-table tr:hover td {
  background: var(--slate-50);
}

body.modern-theme .data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Alternating subtle row zebra */
.data-table tr:nth-child(even) td {
  background: rgba(16, 185, 129, 0.02);
}

/* =========================================================================
   9. OPERATIONS FORM SECTIONS - DIFFERENT SHADES FOR EASY DIFFERENTIATION
   ========================================================================= */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Distinct Section Shade Boxes in Operations */
.section-box-slate {
  background: #ffffff;
  background-image: linear-gradient(180deg, rgba(100, 116, 139, 0.03) 0%, rgba(100, 116, 139, 0.01) 100%);
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(100, 116, 139, 0.06) inset;
}
body.modern-theme .section-box-slate {
  background: #0d151c;
  border-color: rgba(100, 116, 139, 0.3);
  box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.1) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.section-box-blue {
  background: #ffffff;
  background-image: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, rgba(59, 130, 246, 0.01) 100%);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(59, 130, 246, 0.06) inset;
}
body.modern-theme .section-box-blue {
  background: #0d151c;
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.section-box-purple {
  background: #ffffff;
  background-image: linear-gradient(180deg, rgba(168, 85, 247, 0.04) 0%, rgba(168, 85, 247, 0.01) 100%);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(168, 85, 247, 0.06) inset;
}
body.modern-theme .section-box-purple {
  background: #0d151c;
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.1) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.section-box-mint {
  background: #ffffff;
  background-image: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, rgba(16, 185, 129, 0.01) 100%);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(16, 185, 129, 0.06) inset;
}
body.modern-theme .section-box-mint {
  background: #0d151c;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-label.primary {
  color: var(--green-700);
}

body.modern-theme .field-label.primary {
  color: var(--primary);
}

.btn-translate-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-50);
  border: 1px solid var(--green-300);
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-translate-field:hover {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

body.modern-theme .btn-translate-field {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

body.modern-theme .btn-translate-field:hover {
  background: #10b981;
  color: #ffffff;
}

.btn-translate-field:disabled {
  opacity: 0.6;
  cursor: wait;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  transition: all 0.15s ease;
}

/* Natural casing for text inputs (preserve exact typed case) */
input[type="text"],
input[type="search"],
textarea {
  text-transform: none;
}

.uppercase-field {
  text-transform: uppercase;
}

body.modern-theme input[type="text"],
body.modern-theme input[type="number"],
body.modern-theme input[type="date"],
body.modern-theme select {
  background: #081017;
  border-color: var(--border);
  color: #ffffff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--green-500);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.18);
}

body.modern-theme input:focus,
body.modern-theme select:focus {
  border-color: var(--primary);
  background: #0a141e;
  box-shadow: 0 0 0 3.5px rgba(34, 197, 94, 0.2);
}

/* =========================================================================
   ACTIVE DATA-ENTRY FEEDBACK: GREEN TICK & SOFT MINT HIGHLIGHT
   Whenever a user enters data in a field, it highlights itself with a green tick
   ========================================================================= */
.has-value:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
input:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(:placeholder-shown) {
  border-color: #10b981 !important;
  background-color: #f0fdf4 !important;
  color: #065f46 !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25), inset 0 1px 2px rgba(16, 185, 129, 0.05) !important;
  font-weight: 600 !important;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s !important;
}

/* Green Checkmark only on text/date/number/textarea inputs (leaves native select dropdown chevron clean) */
input:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(:placeholder-shown),
input.has-value:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
textarea:not(:placeholder-shown) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 18px 18px !important;
  padding-right: 38px !important;
}

body.modern-theme .has-value:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
body.modern-theme input:not(.search-input):not(.futuristic-search-input):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(:placeholder-shown) {
  background-color: rgba(34, 197, 94, 0.09) !important;
  border-color: #22c55e !important;
  color: #4ade80 !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3) !important;
}

/* Highlight Field Label when Data is Entered */
.field:has(.has-value) .field-label,
.field:has(input:not(:placeholder-shown)) .field-label {
  color: #059669 !important;
  font-weight: 800 !important;
}

body.modern-theme .field:has(.has-value) .field-label,
body.modern-theme .field:has(input:not(:placeholder-shown)) .field-label {
  color: #4ade80 !important;
}

/* =========================================================================
   10. BUTTONS & ACTIONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--green-600);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

body.modern-theme .btn-primary {
  background: var(--primary);
  color: #090e13;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

body.modern-theme .btn-primary:hover {
  background: #4ade80;
}

.btn-secondary {
  background: var(--slate-800);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--slate-900);
}

body.modern-theme .btn-secondary {
  background: #081017;
  border: 1px solid var(--border);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--slate-100);
}

body.modern-theme .btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

/* =========================================================================
   11. EMBASSY DOCUMENTS VIEWER & EXACT A4 PAPER PREVIEW (PRINT SAFE)
   ========================================================================= */
.doc-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  gap: 16px;
  box-shadow: var(--shadow);
}

.doc-switcher-pills {
  display: inline-flex;
  background: var(--slate-100);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

body.modern-theme .doc-switcher-pills {
  background: #081017;
}

.doc-pill-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.doc-pill-btn.active {
  background: #ffffff;
  color: var(--green-800);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

body.modern-theme .doc-pill-btn.active {
  background: var(--surface-secondary);
  color: #ffffff;
}

/* A4 Studio Canvas Backdrop (High-Contrast Drafting Desk) */
.document-preview-container {
  display: flex;
  justify-content: center;
  padding: 36px 16px 80px;
  background: #2b333e;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: inset 0 3px 14px rgba(0, 0, 0, 0.4);
  -webkit-overflow-scrolling: touch;
}

.a4-page {
  width: 210mm;
  min-height: 297mm;
  max-height: 297mm;
  height: 297mm;
  padding: 16mm 12mm 16mm 12mm;
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0 auto 30px auto;
  overflow: hidden;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* 1. Embassy Visa Application Document */
.embassy-visa-doc {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 10.5px !important;
  color: #000000 !important;
  line-height: 1.2 !important;
  background: #ffffff !important;
}

.embassy-visa-doc table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
  padding: 0;
}

.embassy-visa-doc td {
  padding: 3.8px 2px;
  vertical-align: middle;
  color: #000000 !important;
  font-size: 10.5px;
}

.embassy-visa-doc .line-row td,
.embassy-visa-doc td.border-bottom,
.embassy-visa-doc .border-bottom {
  border-bottom: 1px solid #000000 !important;
}

.embassy-visa-doc .ar {
  font-family: 'Amiri', 'Traditional Arabic', 'Times New Roman', serif !important;
  direction: rtl !important;
  text-align: right !important;
  font-size: 12.5px !important;
}

.embassy-visa-doc .bordered-table {
  border: 1px solid #000000 !important;
  border-collapse: collapse !important;
}

.embassy-visa-doc .bordered-table td,
.embassy-visa-doc .bordered-table th {
  border: 1px solid #000000 !important;
  padding: 3px 2px;
  text-align: center;
}

.embassy-visa-doc .official-box {
  border: 1.5px solid #000000 !important;
  padding: 5px 8px !important;
  margin-top: 4px !important;
  box-sizing: border-box !important;
}

.embassy-visa-doc .official-box td {
  border-bottom: 1px solid #000000 !important;
  padding: 3px 2px !important;
}

/* 2. Embassy Forwarding Letter */
.forwarding-doc {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  font-family: Arial, Helvetica, sans-serif !important;
  color: #000000 !important;
}

.forwarding-doc .fwd-box {
  border: 1.5px solid #000000 !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  margin: 10px 0 !important;
  box-sizing: border-box !important;
}

/* 3. Employment Agreement */
.agreement-doc {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  font-family: Arial, Helvetica, sans-serif !important;
  color: #000000 !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}

.agreement-doc .agreement-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-evenly !important;
}

/* Print Mode Optimization: Explicit A4 with 8mm top/bottom, 10mm left/right to ensure 100% 1-page fit */
@page {
  size: A4 portrait;
  margin: 8mm 10mm;
}

@media print {
  *,
  *::before,
  *::after {
    box-sizing: border-box !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  html,
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Universal Screen Elements Hidden during Print */
  .sidebar,
  .top-cluster,
  .mobile-topbar,
  /* ==========================================================================
     UNIVERSAL PRINT ENGINE (Guaranteed 100% Non-Blank Output)
     ========================================================================== */
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* When Universal Print is active, hide everything else */
  body.universal-print-active > *:not(#universal-print-mount),
  body.universal-print-active .modal-overlay,
  body.universal-print-active .sidebar,
  body.universal-print-active .top-cluster,
  body.universal-print-active .mobile-topbar,
  body.universal-print-active .mobile-bottom-nav,
  body.universal-print-active .bottom-nav,
  body.universal-print-active .no-print,
  body.universal-print-active .toast-notification,
  body.universal-print-active button,
  .no-print,
  .toast-notification,
  .btn-close-modal,
  button.no-print,
  .modal-header {
    display: none !important;
  }

  #universal-print-mount {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    visibility: visible !important;
    overflow: visible !important;
  }

  #universal-print-mount * {
    visibility: visible !important;
  }

  #universal-print-mount .modal-overlay,
  #universal-print-mount .modal-card,
  #universal-print-mount .document-preview-container,
  #universal-print-mount #batch-dossier-print-content,
  #universal-print-mount #visa-submission-print-content,
  #universal-print-mount #bmet-submission-print-content {
    display: block !important;
    position: static !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  /* Universal A4 Page Properties */
  .a4-page {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    zoom: 0.95 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  .a4-page:not(:last-child) {
    page-break-after: always !important;
    break-after: page !important;
  }
  .a4-page:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  /* Printable Submission Sheet A4 Table */
  .printable-sheet-a4 {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-table-a4 {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 14px !important;
    margin-bottom: 20px !important;
    font-size: 10pt !important;
  }

  .print-table-a4 th,
  .print-table-a4 td {
    border: 1px solid #0f172a !important;
    padding: 6px 7px !important;
    color: #000000 !important;
    text-align: left !important;
    vertical-align: middle !important;
  }

  .print-table-a4 th {
    background: #f1f5f9 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 9pt !important;
    letter-spacing: 0.03em !important;
  }

  /* Embassy Visa Form Print Sizing in pt and mm */
  .embassy-visa-doc {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    font-size: 9.5pt !important;
    line-height: 1.22 !important;
  }
  .embassy-visa-doc table {
    width: 100% !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .embassy-visa-doc tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .embassy-visa-doc td {
    padding: 1.8pt 1.5pt !important;
    font-size: 9.5pt !important;
    vertical-align: middle !important;
  }
  .embassy-visa-doc .ar {
    font-size: 11pt !important;
  }
  .embassy-visa-doc .bordered-table td,
  .embassy-visa-doc .bordered-table th {
    padding: 1.8pt 1.5pt !important;
    font-size: 9pt !important;
  }
  .embassy-visa-doc .official-box {
    padding: 3pt 6pt !important;
    margin-top: 3pt !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .embassy-visa-doc .official-box td {
    padding: 1.8pt 1.5pt !important;
  }

  /* Forwarding & Agreement Print Rules */
  .forwarding-doc,
  .agreement-doc {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .forwarding-doc tr,
  .agreement-doc tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* =========================================================================
   12. MOBILE OPTIMIZATIONS & BOTTOM NAVIGATION BAR
   ========================================================================= */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

body.modern-theme .mobile-topbar {
  background: #090e13;
}

.hamburger {
  width: 38px;
  height: 38px;
  border: none;
  background: var(--slate-100);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
}

body.modern-theme .hamburger {
  background: rgba(255, 255, 255, 0.08);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

body.modern-theme .hamburger span {
  background: #ffffff;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
}

.overlay.visible {
  display: block;
}

/* Sticky Mobile Bottom Nav Bar (Thumb Friendly) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 6px 12px env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

body.modern-theme .mobile-bottom-nav {
  background: #090e13;
  border-top-color: var(--border);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.mobile-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.mobile-nav-btn.active {
  color: #10b981;
}

.mobile-nav-btn.active svg {
  stroke: #10b981;
  stroke-width: 2.5;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-topbar {
    display: flex;
  }
  .mobile-bottom-nav {
    display: grid;
  }
  .main {
    margin-left: 0;
    padding: 76px 16px 90px; /* Generous bottom padding for bottom nav */
  }
  .top-cluster {
    top: 14px;
    right: 16px;
  }
  .page-header {
    padding-right: 0;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-card {
    padding: 18px 16px;
  }
  .search-bar-wrap {
    flex-direction: column;
    gap: 10px;
  }
  .search-input-box {
    width: 100%;
  }
  .btn-search-hero {
    width: 100%;
    justify-content: center;
  }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .worker-res-header {
    flex-direction: column;
  }
}

/* =========================================================================
   13. EQUAL-FOCUS VISA METRIC GRID & COPY-TO-CLIPBOARD SYSTEM
   ========================================================================= */
.visa-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.visa-info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .visa-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .visa-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.visa-info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
  user-select: text;
  min-width: 0;
}

.visa-info-box:hover {
  border-color: var(--green-500);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.09);
  transform: translateY(-1px);
}

.box-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  white-space: nowrap;
}

.box-value {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  font-family: 'JetBrains Mono', monospace;
}

.box-highlight-blue {
  color: #0284c7;
}

.copy-badge {
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.2s;
}

.copyable-card {
  cursor: pointer;
}

.copyable-card:hover .copy-badge {
  opacity: 1;
  color: var(--green-600);
  transform: scale(1.1);
}

.bilingual-sponsor-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .bilingual-sponsor-card {
    grid-template-columns: 1fr;
  }
}

.sponsor-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s;
  cursor: pointer;
  user-select: text;
}

.sponsor-col:hover {
  border-color: var(--green-500);
  background: #f0fdf4;
}

.sponsor-col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sponsor-col-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.sponsor-col-text-ar {
  font-family: 'Amiri', serif;
  font-size: 18px;
  direction: rtl;
  text-align: right;
  color: #065f46;
  line-height: 1.5;
}

/* =========================================================================
   14. FLOATING TOAST NOTIFICATIONS
   ========================================================================= */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #064e3b;
  color: #ffffff;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 420px;
  line-height: 1.4;
}

@keyframes toastSlideIn {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* =========================================================================
   15. EXTERNAL VERIFICATION HUB & PORTAL CARDS
   ========================================================================= */
.verification-hub-card {
  border-top: 3px solid var(--green-600);
  background: var(--surface);
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.portal-card:hover {
  border-color: var(--green-500);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.14);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.portal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.portal-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 3px 8px;
  border-radius: 6px;
}

/* =========================================================================
   16. BENGALI LANGUAGE SUPPORT (HIND SILIGURI TYPOGRAPHY)
   ========================================================================= */
body.lang-bn,
body.lang-bn *:not(.amiri):not([dir="rtl"]):not(.sponsor-col-text-ar):not(.barcode-text):not(.barcode-svg-wrap *) {
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif !important;
}

body.lang-bn .box-label {
  font-size: 11.5px;
  letter-spacing: 0;
}

/* =========================================================================
   17. DASHBOARD MULTI-BOX TINTED HARMONY (User Reference Inspired)
   ========================================================================= */
.dashboard-box {
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

/* Box 2: Visa Quota Details (Warm Ivory/Sand Tint) */
.dashboard-box-visa {
  background: #fdfbf7;
  border: 1.5px solid #eae2d6;
}

body.modern-theme .dashboard-box-visa {
  background: #131d2b;
  border-color: #1e293b;
}

.dashboard-box-visa .visa-info-box {
  background: #ffffff;
  border: 1px solid #e7ded2;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(120, 80, 40, 0.02);
}

body.modern-theme .dashboard-box-visa .visa-info-box {
  background: #0f172a;
  border-color: #1e293b;
}

.dashboard-box-visa .bilingual-sponsor-card {
  background: #ffffff;
  border: 1px solid #e7ded2;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(120, 80, 40, 0.02);
}

body.modern-theme .dashboard-box-visa .bilingual-sponsor-card {
  background: #0f172a;
  border-color: #1e293b;
}

/* Box 3: Allocated Passengers (Cool Slate-Mist/Lavender Tint) */
.dashboard-box-passengers {
  background: #f6f8fc;
  border: 1.5px solid #e1e7f0;
}

body.modern-theme .dashboard-box-passengers {
  background: #0f172a;
  border-color: #1e293b;
}

.dashboard-box-passengers .data-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.modern-theme .dashboard-box-passengers .data-table-wrap {
  background: #111c27;
  border-color: #1e293b;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  background: #eef3f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 16px;
  border-bottom: 1.5px solid #e2e8f0;
}

body.modern-theme .data-table thead th {
  background: #1e293b;
  color: #94a3b8;
  border-bottom-color: #334155;
}

.data-table tbody tr.pax-row-item {
  background: #ffffff;
  transition: all 0.15s ease;
}

.data-table tbody tr.pax-row-item:nth-child(even) {
  background: #fbfcfe;
}

.data-table tbody tr.pax-row-item:hover {
  background: #f0f5ff;
}

body.modern-theme .data-table tbody tr.pax-row-item {
  background: #111c27;
}

body.modern-theme .data-table tbody tr.pax-row-item:nth-child(even) {
  background: #131f2d;
}

body.modern-theme .data-table tbody tr.pax-row-item:hover {
  background: #1a2736;
}

.data-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f7;
}

body.modern-theme .data-table tbody td {
  border-bottom-color: #1e293b;
}

/* Online Application Number (E-Number) Badge Pill */
.app-no-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.app-no-badge .app-dot {
  font-size: 8px;
  line-height: 1;
}

.app-no-badge.has-app {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.app-no-badge.has-app:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  transform: translateY(-1px);
}

.app-no-badge.no-app {
  background: #fffbeb;
  color: #b45309;
  border: 1px dashed #fde68a;
}

.app-no-badge.no-app:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  transform: translateY(-1px);
}

body.modern-theme .app-no-badge.has-app {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

body.modern-theme .app-no-badge.no-app {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

/* =========================================================================
   18. SIDEBAR EXTERNAL PORTALS HUB (Official Logos & Uniform 30px Sizing)
   ========================================================================= */
.sidebar-portals-box {
  margin-top: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

body.modern-theme .sidebar-portals-box {
  background: #111c27;
  border-color: #1e293b;
}

.sidebar-portal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.5);
}

body.modern-theme .sidebar-portal-item {
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-portal-item:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
  transform: translateX(3px);
}

body.modern-theme .sidebar-portal-item:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.sidebar-portal-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-portal-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-portal-sub {
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
}

body.modern-theme .sidebar-portal-sub {
  color: #38bdf8;
}

/* =========================================================================
   19. OPTION A: HARMONIOUS MONOCHROMATIC EMERALD STAT METRIC CARDS
   ========================================================================= */
.stats-grid-emerald {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.stat-card {
  border-radius: 18px;
  padding: 18px 20px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 112px;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-card-icon {
  font-size: 20px;
  line-height: 1;
}

.stat-card-badge {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
}

.stat-card-num {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Card 1: Mint */
.stat-card-mint {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}
.stat-card-mint .stat-card-badge {
  background: #d1fae5;
  color: #047857;
}

/* Card 2: Emerald */
.stat-card-emerald {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
}
.stat-card-emerald .stat-card-badge {
  background: #dcfce7;
  color: #166534;
}

/* Card 3: Sage */
.stat-card-sage {
  background: #f2fbf7;
  border: 1.5px solid #6ee7b7;
  color: #047857;
}
.stat-card-sage .stat-card-badge {
  background: #ccfbf1;
  color: #0f766e;
}

/* Card 4: Spring */
.stat-card-spring {
  background: #f4fbf5;
  border: 1.5px solid #bbf7d0;
  color: #14532d;
}
.stat-card-spring .stat-card-badge {
  background: #dcfce7;
  color: #166534;
}

/* Card 5: Deep Forest Gradient */
.stat-card-forest {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1.5px solid #047857;
  color: #ffffff;
  box-shadow: 0 4px 16px -2px rgba(4, 120, 87, 0.35);
}
.stat-card-forest .stat-card-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.stat-card-forest .stat-card-num,
.stat-card-forest .stat-card-label {
  color: #ffffff;
}

/* Dark Modern Theme for Stat Cards */
body.modern-theme .stat-card-mint {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
body.modern-theme .stat-card-mint .stat-card-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

body.modern-theme .stat-card-emerald {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}
body.modern-theme .stat-card-emerald .stat-card-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

body.modern-theme .stat-card-sage {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.3);
  color: #5eead4;
}
body.modern-theme .stat-card-sage .stat-card-badge {
  background: rgba(20, 184, 166, 0.2);
  color: #99f6e4;
}

body.modern-theme .stat-card-spring {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.3);
  color: #a7f3d0;
}
body.modern-theme .stat-card-spring .stat-card-badge {
  background: rgba(74, 222, 128, 0.2);
  color: #bbf7d0;
}

body.modern-theme .stat-card-forest {
  background: linear-gradient(135deg, #065f46 0%, #044e3b 100%);
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
}

/* =========================================================================
   20. PRIMARY FOCAL HERO: REDESIGNED EMERALD GRADIENT SEARCH BAR (REFERENCE 2)
   - Size: 56px height, 16.5px font, prominent horizontal layout
   - Default: Gradient border (#10b981, #34d399, #059669) + soft outer glow + frosted glass
   - Focus: Intensified glow (36-44px blur), scale(1.008), smooth animated gradient shift
   - Dark Mode: Deep translucent emerald/slate glass + heightened glow
   ========================================================================= */

.search-focal-card {
  background: var(--surface);
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 20px;
  padding: 26px 30px 24px;
  box-shadow: 0 4px 22px -2px rgba(16, 185, 129, 0.1), var(--card-shadow) !important;
  position: relative;
  overflow: hidden;
  transition: all 250ms ease;
}

body.modern-theme .search-focal-card {
  background: #0e1720;
  border-color: rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12) inset, 0 8px 28px rgba(0, 0, 0, 0.5) !important;
}

.search-focal-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

body.modern-theme .search-focal-badge-icon {
  background: rgba(52, 211, 153, 0.18);
  color: #34d399;
}

.futuristic-search-wrap {
  margin: 6px 0 16px;
  width: 100%;
}

.futuristic-search-pill {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 56px;
  border-radius: 9999px;
  padding: 4px 6px 4px 18px;
  
  /* Continuous Gradient Border with Frosted Glass Fill */
  border: 2px solid transparent;
  background: 
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)) padding-box,
    linear-gradient(135deg, #10b981 0%, #34d399 50%, #059669 100%) border-box;
  background-size: 100% 100%, 200% 200%;
  
  /* Frosted Glass */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  /* Default Soft Outer Glow */
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.16), 0 4px 16px rgba(0, 0, 0, 0.07);
  
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 200ms ease;
}

body.modern-theme .futuristic-search-pill {
  background: 
    linear-gradient(rgba(6, 20, 16, 0.78), rgba(6, 20, 16, 0.78)) padding-box,
    linear-gradient(135deg, #10b981 0%, #34d399 50%, #059669 100%) border-box;
  background-size: 100% 100%, 200% 200%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.24), 0 6px 20px rgba(0, 0, 0, 0.55);
}

/* FOCUS STATE (On click / typing) */
.futuristic-search-pill:focus-within {
  transform: scale(1.008);
  box-shadow: 0 0 36px rgba(16, 185, 129, 0.36), 0 8px 26px rgba(0, 0, 0, 0.12);
  animation: searchBorderPulse 3.5s ease infinite alternate;
}

body.modern-theme .futuristic-search-pill:focus-within {
  transform: scale(1.008);
  box-shadow: 0 0 44px rgba(52, 211, 153, 0.45), 0 10px 32px rgba(0, 0, 0, 0.7);
  animation: searchBorderPulse 3.5s ease infinite alternate;
}

@keyframes searchBorderPulse {
  0% {
    background-position: 0% 0%, 0% 50%;
  }
  50% {
    background-position: 0% 0%, 100% 50%;
  }
  100% {
    background-position: 0% 0%, 0% 50%;
  }
}

/* Left Magnifying Glass Inside Search Bar */
.search-inner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  margin-right: 12px;
  flex-shrink: 0;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), color 200ms ease;
}

.futuristic-search-pill:focus-within .search-inner-icon {
  transform: scale(1.12);
  color: #059669;
}

body.modern-theme .search-inner-icon {
  color: #34d399;
}

body.modern-theme .futuristic-search-pill:focus-within .search-inner-icon {
  color: #6ee7b7;
}

.futuristic-search-input,
input.futuristic-search-input,
input[type="text"].futuristic-search-input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 16.5px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--text) !important;
  padding: 12px 14px 12px 0 !important;
  margin: 0 !important;
  font-family: inherit;
}

.futuristic-search-input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.8;
  font-size: 15.5px;
  font-weight: 500;
}

.futuristic-kbd-badge {
  flex-shrink: 0 !important;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  margin-right: 12px;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 180ms ease;
}

body.modern-theme .futuristic-kbd-badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.futuristic-search-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 11px 24px !important;
  height: 44px !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}

.futuristic-search-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

.futuristic-search-btn:active {
  transform: scale(0.98);
}

/* =========================================================================
   21. UNIVERSAL ELEVATED CARDS SYSTEM (LINEAR / NOTION STYLE DEPTH)
   Subtle 3D elevation, color-coded borders, faint background tints & glow
   ========================================================================= */

/* Base Elevated Card */
.card,
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 180ms ease;
}

body.modern-theme .card,
body.modern-theme .dashboard-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--card-shadow);
}

/* Category 1: Data & Records Panels (Emerald Tint & Border) */
.card-data,
.dashboard-box-visa,
.dashboard-box-passengers,
#ops-view-all-visas .card {
  background: var(--accent-data-bg);
  background-image: linear-gradient(180deg, var(--accent-data-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-data-border) !important;
  box-shadow: var(--accent-data-glow), var(--card-shadow);
}

body.modern-theme .card-data,
body.modern-theme .dashboard-box-visa,
body.modern-theme .dashboard-box-passengers,
body.modern-theme #ops-view-all-visas .card {
  background: var(--accent-data-bg);
  background-image: linear-gradient(180deg, var(--accent-data-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-data-border) !important;
  box-shadow: var(--accent-data-glow), var(--card-shadow);
}

/* Category 2: Form & Input Panels (Blue Tint & Border) */
.card-form,
#ops-view-add-passenger > .card,
#ops-view-add-visa > .card,
.doc-action-bar,
.search-card-container {
  background: var(--accent-form-bg);
  background-image: linear-gradient(180deg, var(--accent-form-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-form-border) !important;
  box-shadow: var(--accent-form-glow), var(--card-shadow);
}

body.modern-theme .card-form,
body.modern-theme #ops-view-add-passenger > .card,
body.modern-theme #ops-view-add-visa > .card,
body.modern-theme .doc-action-bar,
body.modern-theme .search-card-container {
  background: var(--accent-form-bg);
  background-image: linear-gradient(180deg, var(--accent-form-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-form-border) !important;
  box-shadow: var(--accent-form-glow), var(--card-shadow);
}

/* Category 3: Pending & Warnings (Amber Tint & Border) */
.card-warning,
#ops-view-unlinked-queue > .card,
#search-prompt-state {
  background: var(--accent-warning-bg);
  background-image: linear-gradient(180deg, var(--accent-warning-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-warning-border) !important;
  box-shadow: var(--accent-warning-glow), var(--card-shadow);
}

body.modern-theme .card-warning,
body.modern-theme #ops-view-unlinked-queue > .card,
body.modern-theme #search-prompt-state {
  background: var(--accent-warning-bg);
  background-image: linear-gradient(180deg, var(--accent-warning-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-warning-border) !important;
  box-shadow: var(--accent-warning-glow), var(--card-shadow);
}

/* Category 4: System & Infrastructure (Slate Tint & Border) */
.card-system,
#view-system > .card,
.server-status-card,
.sidebar-portals-box {
  background: var(--accent-system-bg);
  background-image: linear-gradient(180deg, var(--accent-system-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-system-border) !important;
  box-shadow: var(--accent-system-glow), var(--card-shadow);
}

body.modern-theme .card-system,
body.modern-theme #view-system > .card,
body.modern-theme .server-status-card,
body.modern-theme .sidebar-portals-box {
  background: var(--accent-system-bg);
  background-image: linear-gradient(180deg, var(--accent-system-tint) 0%, transparent 100%);
  border: 1px solid var(--accent-system-border) !important;
  box-shadow: var(--accent-system-glow), var(--card-shadow);
}

/* Interactive Card Elevation & Micro-Lifts on Hover */
.card-interactive:hover,
.copyable-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

/* =========================================================================
   22. REFINED SUB-PANELS, VISA INFO BOXES & BILINGUAL CARDS
   ========================================================================= */
.visa-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.visa-info-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .visa-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .visa-info-grid {
    grid-template-columns: 1fr;
  }
}

.visa-info-box {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(16, 185, 129, 0.05) inset;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  cursor: pointer;
  position: relative;
}

body.modern-theme .visa-info-box {
  background: #0d151c;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.08) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.visa-info-box:hover {
  transform: translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.16), 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.modern-theme .visa-info-box:hover {
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25) inset, 0 8px 22px rgba(0, 0, 0, 0.55);
}

/* Primary focus boxes in Visa Group Record: Emerald-accented */
.primary-focus-box {
  background: #ffffff !important;
  border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08), 0 0 0 1px rgba(16, 185, 129, 0.1) inset !important;
}

body.modern-theme .primary-focus-box {
  background: #0f1c24 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15) inset, 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.primary-focus-box:hover {
  border-color: #10b981 !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.22) !important;
}

.visa-info-box .box-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.visa-info-box .copy-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--slate-100);
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 150ms ease;
}

.visa-info-box:hover .copy-badge {
  opacity: 1;
}

body.modern-theme .visa-info-box .copy-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.visa-info-box .box-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.primary-focus-box .box-value {
  font-size: 20px !important;
  color: #059669;
}

body.modern-theme .primary-focus-box .box-value {
  color: #34d399;
}

/* Bilingual Sponsor Card */
.bilingual-sponsor-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 6px;
}

@media (max-width: 768px) {
  .bilingual-sponsor-card {
    grid-template-columns: 1fr;
  }
}

.sponsor-col {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(16, 185, 129, 0.05) inset;
  transition: all 180ms cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

body.modern-theme .sponsor-col {
  background: #0d151c;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.08) inset, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.sponsor-col:hover {
  transform: translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.16);
}

body.modern-theme .sponsor-col:hover {
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25) inset, 0 8px 22px rgba(0, 0, 0, 0.55);
}

.sponsor-col-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sponsor-col-label .copy-badge {
  font-size: 9.5px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.sponsor-col:hover .copy-badge {
  opacity: 1;
}

.sponsor-col-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.sponsor-col-text-ar {
  font-family: 'Amiri', serif;
  font-size: 18px;
  color: var(--green-700);
  direction: rtl;
}

body.modern-theme .sponsor-col-text-ar {
  color: #34d399;
}

/* Document Toolbar Action Bar */
.doc-action-bar {
  background: var(--surface);
  border: 1px solid var(--accent-form-border);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.modern-theme .doc-action-bar {
  background: var(--surface);
  border-color: var(--accent-form-border);
  box-shadow: var(--accent-form-glow), var(--card-shadow);
}

/* Document Preview Drafting Canvas Desk */
.document-preview-container {
  background: #1e293b;
  border-radius: var(--card-radius);
  padding: 36px 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 600px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: auto;
}

body.modern-theme .document-preview-container {
  background: #080d13;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Modal Dialog Cards */
.modal-card,
#link-modal .card {
  border-radius: var(--card-radius);
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  border: 1px solid var(--border);
}

body.modern-theme .modal-card,
body.modern-theme #link-modal .card {
  background: #111a24;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* Quick Search Chip Lifts */
.search-chip {
  transition: all 180ms ease;
}

.search-chip:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Data Table Clean Spacing */
.data-table th {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
}

.data-table td {
  padding: 15px 18px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
  background: rgba(16, 185, 129, 0.04);
}

body.modern-theme .data-table tbody tr:hover td {
  background: rgba(16, 185, 129, 0.08);
}

@media (max-width: 1100px) {
  .stats-grid-emerald {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid-emerald {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .stats-grid-emerald {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   BRANDED LANDING & PROFILE SELECTOR LOGIN SYSTEM
   ========================================================================= */

.landing-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease, transform 0.35s ease;
}

.landing-login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.98);
}

/* Ambient Moving Gradient Blobs Background */
.ambient-blobs-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  animation: ambientBlobFloat 20s ease-in-out infinite alternate;
}

body.modern-theme .ambient-blob {
  opacity: 0.22;
  filter: blur(90px);
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #10b981 0%, rgba(16, 185, 129, 0) 70%);
  top: -120px;
  left: -100px;
  animation-duration: 22s;
}

.blob-2 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #059669 0%, rgba(5, 150, 105, 0) 70%);
  bottom: -140px;
  right: -100px;
  animation-duration: 26s;
  animation-delay: -6s;
}

.blob-3 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #34d399 0%, rgba(52, 211, 153, 0) 70%);
  top: 35%;
  left: 65%;
  animation-duration: 20s;
  animation-delay: -12s;
}

@keyframes ambientBlobFloat {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.08);
  }
  100% {
    transform: translate(-30px, 40px) scale(0.94);
  }
}

/* Top bar with theme & language toggle */
.landing-top-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
}

/* Central Card */
.landing-login-card {
  position: relative;
  z-index: 1;
  max-width: 820px;
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(16, 185, 129, 0.22);
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08), 0 0 32px rgba(16, 185, 129, 0.08);
  padding: 44px 38px;
  text-align: center;
  margin: auto;
  transition: all 0.3s ease;
}

body.modern-theme .landing-login-card {
  background: rgba(8, 26, 20, 0.88);
  border: 1.5px solid rgba(16, 185, 129, 0.32);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 44px rgba(16, 185, 129, 0.18);
}

body.modern-theme .profile-card {
  background: rgba(12, 36, 28, 0.85);
  border-color: rgba(52, 211, 153, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

body.modern-theme .profile-card:hover {
  background: rgba(16, 48, 38, 0.95);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 28px rgba(16, 185, 129, 0.3);
  border-color: #34d399;
}

body.modern-theme .profile-name {
  color: #f8fafc;
}

body.modern-theme .landing-brand-title {
  color: #f8fafc;
}

body.modern-theme .landing-welcome-sub {
  color: #94a3b8;
}

body.modern-theme .pin-entry-container {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(52, 211, 153, 0.35);
}

body.modern-theme .pin-user-name {
  color: #f8fafc;
}

body.modern-theme .pin-input-label {
  color: #e2e8f0;
}

body.modern-theme .pin-input-field {
  background: rgba(6, 20, 16, 0.85);
  border-color: rgba(52, 211, 153, 0.3);
  color: #ffffff;
}

/* Brand Header */
.landing-brand-header {
  margin-bottom: 24px;
}

.landing-brand-logo-img {
  width: 96px;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(16, 185, 129, 0.3));
  transition: transform 0.2s ease;
}

.landing-brand-logo-img:hover {
  transform: scale(1.04);
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  display: block;
}

body.modern-theme .sidebar-logo-img {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.landing-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  margin-bottom: 14px;
}

.landing-brand-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px 0;
}

.landing-brand-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

body.modern-theme .landing-brand-tag {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

.landing-welcome-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

/* 3 Profile Cards Grid */
.profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  transition: all 0.3s ease;
}

.profile-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 26px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              opacity 0.25s ease,
              filter 0.25s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08), 0 0 20px rgba(16, 185, 129, 0.12);
  border-color: var(--green-500);
}

body.modern-theme .profile-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 28px rgba(16, 185, 129, 0.25);
  border-color: #34d399;
}

.profile-card.selected-active {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 14px 32px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}

.profile-card.dimmed {
  opacity: 0.28;
  filter: grayscale(40%) blur(1px);
  transform: scale(0.96);
  pointer-events: none;
}

/* Avatar Wrap & Glowing Rings */
.profile-avatar-wrap {
  width: 78px;
  height: 78px;
  position: relative;
  margin-bottom: 14px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

body.modern-theme .profile-avatar-img {
  border-color: #0b221a;
}

.profile-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-card-emerald .profile-avatar-ring {
  border-color: rgba(16, 185, 129, 0.4);
}
.profile-card-teal .profile-avatar-ring {
  border-color: rgba(13, 148, 136, 0.4);
}
.profile-card-amber .profile-avatar-ring {
  border-color: rgba(217, 119, 6, 0.4);
}
.profile-card-indigo .profile-avatar-ring {
  border-color: rgba(99, 102, 241, 0.4);
}

.profile-card:hover .profile-avatar-ring {
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.profile-info-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.profile-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.profile-role-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
body.modern-theme .badge-emerald {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

.badge-teal {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.25);
}
body.modern-theme .badge-teal {
  color: #2dd4bf;
  background: rgba(13, 148, 136, 0.2);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
body.modern-theme .badge-amber {
  color: #fbbf24;
  background: rgba(217, 119, 6, 0.2);
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
body.modern-theme .badge-indigo {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.2);
}

/* In-place Expanding PIN Entry Container */
.pin-entry-container {
  margin-top: 26px;
  padding: 26px 22px;
  background: rgba(16, 185, 129, 0.04);
  border: 1.5px solid rgba(16, 185, 129, 0.24);
  border-radius: 22px;
  text-align: center;
  animation: pinExpandIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

body.modern-theme .pin-entry-container {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.32);
}

@keyframes pinExpandIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0px) scale(1);
  }
}

.pin-selected-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.pin-avatar-wrap {
  width: 52px;
  height: 52px;
  position: relative;
}

.pin-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.pin-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #10b981;
}

.pin-avatar-ring.success-pulse {
  animation: pinSuccessPulse 0.8s ease-out infinite;
}

@keyframes pinSuccessPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pin-user-meta {
  text-align: left;
}

.pin-user-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.pin-input-group {
  margin-bottom: 18px;
}

.pin-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pin-input-wrap {
  position: relative;
  max-width: 260px;
  margin: 0 auto;
}

.pin-input-field {
  width: 100%;
  height: 52px;
  font-size: 24px;
  text-align: center;
  letter-spacing: 8px;
  font-weight: 800;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s ease;
}

.pin-input-field:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  outline: none;
}

.pin-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.6;
}

.pin-toggle-btn:hover {
  opacity: 1;
}

/* Shake Animation on Error */
.pin-input-wrap.shake {
  animation: pinErrorShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.pin-input-wrap.shake .pin-input-field {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25) !important;
}

@keyframes pinErrorShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.pin-error-msg {
  color: #ef4444;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 8px;
}

.pin-actions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.landing-footer-note {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
}

.landing-dev-badge:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.22) 100%);
  border-color: #10b981;
  color: var(--text);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.landing-dev-sparkle {
  color: #10b981;
  font-size: 13px;
  animation: devSparklePulse 2s ease-in-out infinite;
}

@keyframes devSparklePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.25); opacity: 1; }
}

.landing-dev-text {
  color: var(--text-muted);
  font-weight: 500;
}

.landing-dev-brand {
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.03em;
}

body.modern-theme .landing-dev-brand {
  color: #34d399;
}

.landing-dev-arrow {
  font-size: 12px;
  color: var(--green-600);
  transition: transform 0.2s ease;
}

.landing-dev-badge:hover .landing-dev-arrow {
  transform: translate(2px, -2px);
}

body.modern-theme .landing-dev-badge {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.modern-theme .landing-dev-badge:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: #34d399;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

/* Header User Profile Badge */
.header-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-user-avatar-wrap {
  width: 32px;
  height: 32px;
  position: relative;
}

.header-user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.header-user-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
  border: 1.5px solid var(--card-bg, #ffffff);
}

.header-user-meta {
  text-align: left;
}

.header-user-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.header-user-role {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

.btn-header-action {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-header-action:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--green-500);
}

.btn-admin-action {
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.3);
}

body.modern-theme .btn-admin-action {
  color: #a5b4fc;
}

.btn-logout-action {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

body.modern-theme .btn-logout-action {
  color: #f87171;
}

.btn-logout-action:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: #ef4444 !important;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (Cellphones <= 900px, <= 600px, <= 360px)
   ========================================================================== */

/* Base Overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.overlay.visible, .overlay.active {
  display: block;
  opacity: 1;
}

/* Base Mobile Topbar */
.mobile-topbar {
  display: none;
}

/* Base Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   TABLET BREAKPOINT (max-width: 900px)
   ========================================================================== */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .mobile-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 56px !important;
    padding: 0 14px !important;
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 500 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
  }

  body.modern-theme .mobile-topbar {
    background: #0d161f !important;
    border-bottom-color: var(--border) !important;
  }

  .hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--border) !important;
    background: var(--bg) !important;
    cursor: pointer !important;
    gap: 4px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .hamburger span {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background: var(--text) !important;
    border-radius: 2px !important;
    transition: all 0.2s ease !important;
  }

  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 14px 14px 90px !important;
    overflow-x: hidden !important;
  }

  .top-cluster {
    position: static !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .header-user-chip {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
  }

  .header-user-actions {
    display: flex !important;
    gap: 8px !important;
    margin-left: auto !important;
  }

  .theme-toggle-cluster {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .theme-toggle-cluster .theme-btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
    min-height: 44px !important;
  }

  .page-header {
    padding-right: 0 !important;
    margin-bottom: 16px !important;
    text-align: left !important;
  }

  .page-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  .page-subtitle {
    font-size: 13px !important;
  }
}

/* ==========================================================================
   MOBILE PHONES BREAKPOINT (max-width: 600px) - Full Single-Column Optimization
   ========================================================================== */
@media (max-width: 600px) {

  /* ----------------------------------------------------
     PART 2: MOBILE RESPONSIVE - LOGIN / PROFILE SELECT SCREEN
     ---------------------------------------------------- */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Remove background animation/blobs on mobile to eliminate lag */
  .ambient-blobs-container {
    display: none !important;
  }

  .landing-login-overlay {
    padding: 16px 12px 32px !important;
    min-height: 100vh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Completely hide stray floating top bar on mobile login screen (Issue 2 Fix) */
  .landing-top-bar {
    display: none !important;
  }

  .landing-login-card {
    width: 100% !important;
    max-width: 440px !important;
    padding: 24px 16px 28px !important;
    border-radius: 22px !important;
    margin: auto !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .landing-brand-header {
    margin-bottom: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .landing-brand-logo-img {
    width: 68px !important;
    height: 68px !important;
    max-height: 68px !important;
    margin: 0 auto 10px !important;
  }

  /* Dynamic font-size & word wrap to eliminate horizontal overflow (Issue 1 Fix) */
  .landing-brand-title {
    font-size: clamp(20px, 5.8vw, 24px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    margin: 0 0 6px 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    text-align: center !important;
    max-width: 100% !important;
  }

  .landing-brand-tag {
    font-size: 11px !important;
    padding: 3px 12px !important;
    margin-bottom: 8px !important;
    letter-spacing: 0.05em !important;
  }

  .landing-welcome-sub {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
    padding: 0 4px !important;
  }

  /* Profile cards stack vertically in a single full-width column (Issue 3 Fix) */
  .profile-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 18px !important;
    box-sizing: border-box !important;
  }

  /* Card structure: [Avatar] on left, [Name / Role Badge Stack] on right */
  .profile-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 14px 16px !important;
    gap: 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    min-height: 74px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
  }

  .profile-avatar-wrap {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
  }

  .profile-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
  }

  .profile-avatar-placeholder {
    width: 100% !important;
    height: 100% !important;
    font-size: 22px !important;
  }

  .profile-info-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    text-align: left !important;
    min-width: 0 !important;
    flex: 1 !important;
    gap: 3px !important;
  }

  .profile-name {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: var(--text) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .profile-role-badge {
    align-self: flex-start !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 2.5px 9px !important;
    border-radius: 999px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* Full-width PIN input on mobile */
  .pin-entry-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 14px !important;
    margin-top: 16px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
  }

  .pin-selected-user {
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .pin-avatar-wrap {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
  }

  .pin-input-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  .pin-input-field {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    height: 50px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: center !important;
    letter-spacing: 0.25em !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .pin-toggle-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .pin-actions-row {
    flex-direction: column-reverse !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 16px !important;
  }

  .pin-actions-row .btn {
    width: 100% !important;
    height: 48px !important;
    min-height: 44px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }

  /* ----------------------------------------------------
     PART 3: MOBILE RESPONSIVE - DASHBOARD / SEARCH SCREEN
     ---------------------------------------------------- */
  /* Sticky Search Focal Hero Bar on Mobile */
  .search-focal-card, .search-card {
    position: sticky !important;
    top: 56px !important;
    z-index: 400 !important;
    background: var(--surface) !important;
    padding: 12px 12px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1.5px solid var(--border) !important;
  }

  body.modern-theme .search-focal-card, body.modern-theme .search-card {
    background: #0d161f !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  }

  .search-card-header {
    display: none !important;
  }

  .futuristic-search-pill {
    padding: 4px 6px 4px 12px !important;
    min-height: 48px !important;
    height: 48px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    width: 100% !important;
  }

  .search-inner-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .futuristic-search-input {
    font-size: 15px !important;
    font-weight: 400 !important;
    padding: 6px 0 !important;
  }

  /* Drop desktop keyboard shortcut on mobile */
  .futuristic-kbd-badge {
    display: none !important;
  }

  .futuristic-search-btn {
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 16px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    min-width: 44px !important;
  }

  /* Horizontally Swipeable Quick Search Chips */
  .quick-search-chips {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px 0 2px !important;
    margin-top: 8px !important;
    scrollbar-width: none !important;
  }

  .quick-search-chips::-webkit-scrollbar {
    display: none !important;
  }

  .quick-search-chips .chip-label {
    display: none !important;
  }

  .search-chip {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    min-height: 36px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* 2-Column Metrics Cards Grid */
  .stats-grid-emerald, .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card, .stat-cell {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    min-height: 76px !important;
    box-sizing: border-box !important;
  }

  /* 5th stat card spans 2 columns */
  .stat-card:nth-child(5), .stat-cell:nth-child(5) {
    grid-column: span 2 !important;
  }

  .stat-card-num, .stat-cell-num {
    font-size: 20px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums !important;
    margin: 2px 0 !important;
  }

  .stat-card-label, .stat-cell-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
  }

  .stat-card-icon {
    font-size: 17px !important;
  }

  /* Single-Column Stacked Visa Group Record */
  .worker-result-card {
    padding: 16px 12px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
  }

  .visa-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .visa-toolbar .btn {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
  }

  .visa-info-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .visa-info-box {
    padding: 10px 14px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
  }

  .visa-info-box .box-label {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
  }

  .visa-info-box .box-value {
    font-size: 15.5px !important;
    font-weight: 600 !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
  }

  .bilingual-sponsor-card {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .sponsor-col {
    padding: 12px 14px !important;
  }

  .sponsor-col-text {
    font-size: 15px !important;
  }

  .sponsor-col-text-ar {
    font-size: 17px !important;
  }

  /* ----------------------------------------------------
     WIDE DATA TABLES -> MOBILE STACKED CARDS TRANSFORMATION
     (Passengers, Visas Directory, Unlinked, Batch Selection)
     ---------------------------------------------------- */
  .data-table-wrap, .table-wrap, .table-container, .table-responsive {
    width: 100% !important;
    overflow: visible !important;
    border: none !important;
    background: transparent !important;
  }

  .data-table, .data-table tbody, .data-table tr, .data-table td,
  .table, .table tbody, .table tr, .table td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .data-table thead, .table thead {
    display: none !important;
  }

  .data-table tbody tr, .table tbody tr {
    background: var(--surface) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 14px 14px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
  }

  body.modern-theme .data-table tbody tr, body.modern-theme .table tbody tr {
    background: #101922 !important;
    border-color: var(--border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }

  .data-table tbody tr td, .table tbody tr td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    font-size: 13.5px !important;
    text-align: right !important;
    white-space: normal !important;
    min-height: 38px !important;
  }

  .data-table tbody tr td:last-child, .table tbody tr td:last-child {
    border-bottom: none !important;
    padding-top: 12px !important;
    justify-content: stretch !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .data-table tbody tr td::before, .table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600 !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    text-align: left !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
  }

  .data-table tbody tr td:empty, .table tbody tr td:empty {
    display: none !important;
  }

  /* Action buttons inside mobile card rows */
  .pax-actions-td button, .data-table td button, .table td button {
    flex: 1 !important;
    min-height: 44px !important;
    height: 44px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    border-radius: 10px !important;
    margin: 2px 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* ----------------------------------------------------
     MOBILE BOTTOM TAB BAR NAVIGATION (Part 3)
     ---------------------------------------------------- */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: var(--surface) !important;
    border-top: 1.5px solid var(--border) !important;
    z-index: 900 !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
    justify-content: space-around !important;
    align-items: center !important;
  }

  body.modern-theme .mobile-bottom-nav {
    background: #0d161f !important;
    border-top-color: var(--border) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
  }

  .mob-tab-btn {
    flex: 1 !important;
    height: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    gap: 3px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    padding: 6px 0 !important;
  }

  .mob-tab-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    transition: transform 0.15s ease !important;
  }

  .mob-tab-btn.active {
    color: var(--green-600) !important;
    font-weight: 700 !important;
  }

  body.modern-theme .mob-tab-btn.active {
    color: #34d399 !important;
  }

  .mob-tab-btn.active svg {
    transform: translateY(-2px) !important;
  }

  /* ----------------------------------------------------
     FORM INPUTS & BUTTONS TOUCH TARGETS (44px min)
     ---------------------------------------------------- */
  .btn {
    min-height: 44px !important;
    font-size: 13.5px !important;
  }

  input, select, textarea {
    min-height: 44px !important;
    font-size: 14.5px !important;
  }

  .ops-sub-nav, .emb-sub-tabs, .bmet-filter-bar {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
  }

  .ops-sub-btn, .emb-tab-btn, .bmet-filter-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
  }

  .form-grid-3, .form-grid-4, .form-grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .modal {
    padding: 10px !important;
  }

  .modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 92vh !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
    margin: auto !important;
    overflow-y: auto !important;
  }
}

/* ==========================================================================
   EXTRA NARROW SCREENS (360px)
   ========================================================================== */
@media (max-width: 360px) {
  .landing-brand-title {
    font-size: 22px !important;
  }

  .profile-card {
    padding: 10px 12px !important;
    gap: 12px !important;
  }

  .profile-avatar-wrap {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
  }

  .stat-card-num, .stat-cell-num {
    font-size: 18px !important;
  }

  .stat-card-label, .stat-cell-label {
    font-size: 10px !important;
  }
}

/* ==========================================================================
   BMET SUBMISSION & EMPLOYEE CARDS (User Requirement 6)
   ========================================================================== */
.bmet-employee-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.bmet-employee-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--green-400);
}

.bmet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-subtle, #f1f5f9);
}

.bmet-worker-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bmet-worker-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.bmet-readiness-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.readiness-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.readiness-pill.ready {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.readiness-pill.pending {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.bmet-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 14px;
}

.bmet-field-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.15s ease;
}

.bmet-field-box:hover {
  background: #ffffff;
  border-color: var(--green-300);
}

body.modern-theme .bmet-field-box {
  background: rgba(15, 38, 30, 0.6);
  border-color: rgba(52, 211, 153, 0.15);
}

body.modern-theme .bmet-field-box:hover {
  background: rgba(20, 50, 40, 0.85);
  border-color: #34d399;
}

.bmet-field-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.bmet-field-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.bmet-field-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bmet-field-copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.bmet-field-copy-btn:hover {
  background: var(--green-500);
  color: #ffffff;
  border-color: var(--green-500);
}

.bmet-field-copy-btn.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

.bmet-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid var(--border-subtle, #f1f5f9);
}

/* ==========================================================================
   PRINTABLE SHEETS (A4 Standard for Visa & BMET Submission Lists)
   ========================================================================== */
.printable-sheet-a4 {
  background: #ffffff !important;
  color: #111827 !important;
  padding: 24px;
  font-family: 'Inter', -apple-system, sans-serif;
}

.print-table-a4 {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.print-table-a4 th,
.print-table-a4 td {
  border: 1px solid #94a3b8;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
}

.print-table-a4 th {
  background: #f1f5f9;
}

/* ==========================================================================
   BMET SUBMISSION & EMPLOYEE CARDS (User Requirement 6)
   ========================================================================== */
.bmet-employee-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.bmet-employee-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--green-400);
}

.bmet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-subtle, #f1f5f9);
}

.bmet-worker-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bmet-worker-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.bmet-readiness-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.readiness-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.readiness-pill.ready {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.readiness-pill.pending {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.bmet-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 14px;
}

.bmet-field-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.15s ease;
}

.bmet-field-box:hover {
  background: #ffffff;
  border-color: var(--green-300);
}

body.modern-theme .bmet-field-box {
  background: rgba(15, 38, 30, 0.6);
  border-color: rgba(52, 211, 153, 0.15);
}

body.modern-theme .bmet-field-box:hover {
  background: rgba(20, 50, 40, 0.85);
  border-color: #34d399;
}

.bmet-field-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.bmet-field-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.bmet-field-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bmet-field-copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.bmet-field-copy-btn:hover {
  background: var(--green-500);
  color: #ffffff;
  border-color: var(--green-500);
}

.bmet-field-copy-btn.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

.bmet-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid var(--border-subtle, #f1f5f9);
}

/* ==========================================================================
   PRINTABLE SHEETS (A4 Standard for Visa & BMET Submission Lists)
   ========================================================================== */
.printable-sheet-a4 {
  background: #ffffff !important;
  color: #111827 !important;
  padding: 24px;
  font-family: 'Inter', -apple-system, sans-serif;
}

.print-table-a4 {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.print-table-a4 th,
.print-table-a4 td {
  border: 1px solid #94a3b8;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
}

.print-table-a4 th {
  background: #f1f5f9;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
}

.print-table-a4 td.remarks-col {
  min-width: 130px;
  height: 38px;
}

/* ==========================================================================
   BMET HEADER BADGES (Matching Primary Lookup Hub Pill Aesthetic)
   ========================================================================== */
.bmet-worker-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.bmet-serial-box {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

body.modern-theme .bmet-serial-box {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.bmet-name-box {
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface-secondary, #f8fafc);
  border: 1.5px solid var(--border, #cbd5e1);
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.modern-theme .bmet-name-box {
  background: rgba(15, 38, 30, 0.7);
  border-color: rgba(52, 211, 153, 0.2);
  color: #f8fafc;
}

.bmet-passport-box {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', monospace;
  font-size: 14.5px;
  font-weight: 800;
  color: #1e40af;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.08);
}

body.modern-theme .bmet-passport-box {
  background: rgba(30, 58, 138, 0.3);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

/* =========================================================================
   MALAYSIA SPECIFIC ENHANCEMENTS (4-Point Verification, Sticky Bulk Bar, Quota)
   ========================================================================= */
.verification-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.checklist-item-card {
  background: var(--surface-secondary, #f8fafc);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.checklist-item-card:hover {
  border-color: #059669;
  background: var(--surface, #ffffff);
}

.checklist-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #059669;
  cursor: pointer;
}

.checklist-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.bulk-action-bar {
  position: sticky;
  bottom: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  color: #ffffff;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  z-index: 500;
  flex-wrap: wrap;
  gap: 12px;
  animation: slideUpBulk 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.bulk-count-badge {
  background: #059669;
  color: #ffffff;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4);
}

.bulk-actions-cluster {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.quota-progress-fill {
  height: 100%;
  background: #059669;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: var(--surface-secondary, #f8fafc) !important;
}

/* =========================================================================
   MODAL OVERLAY SYSTEM (Fixed Hidden Overlays & Centered Glass Cards)
   ========================================================================= */
.modal-overlay {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  margin: auto;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

body.modern-theme .modal-card {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.modal-card-lg {
  max-width: 860px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.modal-body {
  padding-bottom: 10px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.close-btn:hover {
  background: var(--surface-secondary);
  color: var(--text);
}

/* Modal Form Grids */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

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

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

.form-label.required::after {
  content: " *";
  color: #ef4444;
}

.input-control {
  width: 100%;
  padding: 9px 13px;
  font-size: 13.5px;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.input-control:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

body.modern-theme .input-control {
  background: #090e13;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

body.modern-theme .input-control:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

/* =========================================================================
   BOTTOM TOAST PROMPT BAR & LIVE SEARCH RESULTS TABLE
   ========================================================================= */
.theme-toast-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  animation: slideUpToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.modern-theme .theme-toast-bar {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

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

.search-live-results-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 14px;
  margin-top: 14px;
  max-height: 380px;
  overflow-y: auto;
}

body.modern-theme .search-live-results-card {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.1);
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  transition: all 0.15s ease;
}

.search-result-item:hover {
  background: var(--surface-secondary, #f8fafc);
}

body.modern-theme .search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.template-download-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

body.modern-theme .template-download-banner {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
}

/* =========================================================================
   BRANDED LANDING & PROFILE SELECTOR LOGIN SYSTEM (FIXED FULLSCREEN OVERLAY)
   ========================================================================= */
.landing-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background: var(--bg, #edf2f7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 32px 16px;
  box-sizing: border-box;
}

body.modern-theme .landing-login-overlay {
  background: #090e13;
}

.landing-top-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

/* =========================================================================
   4. MAIN CONTENT AREA & UNIFIED HEADER
   ========================================================================= */
.main {
  margin-left: 332px;
  width: calc(100% - 332px);
  max-width: calc(100vw - 332px);
  padding: 20px 36px 80px;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

/* Unified Top Header Row */
.top-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-top: 0;
}

.top-header-left {
  flex: 1;
  min-width: 0;
}

.top-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}

/* =========================================================================
   5. TAB VIEWS & TRANSITIONS
   ========================================================================= */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   6. HERO STATS BANNER (BALANCED 3x2 PRIMARY & 4x1 SECONDARY GRIDS)
   ========================================================================= */
.today-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 18px);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

body.modern-theme .today-hero {
  background: var(--surface);
}

.today-hero-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* KPI Metrics Grids: Clean 3x2 Primary and 4x1 Secondary (No Orphaned Cards) */
.stats-grid-primary-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

@media (max-width: 1200px) {
  .stats-grid-secondary-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-grid-primary-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid-secondary-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stats-grid-primary-3, .stats-grid-secondary-4 {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  border-radius: var(--radius, 16px);
  padding: 18px 20px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-card-icon {
  font-size: 20px;
}

.stat-card-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 12px;
}

.stat-card-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-card-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Stat Card Color Themes */
.stat-card-mint {
  background: var(--tint-mint-bg, #f0fdf4);
  border: 1.5px solid var(--tint-mint-border, #bbf7d0);
}
.stat-card-mint .stat-card-num { color: #15803d; }
.stat-card-mint .stat-card-badge { background: #dcfce7; color: #166534; }

.stat-card-emerald {
  background: #f0fdf9;
  border: 1.5px solid #a7f3d0;
}
.stat-card-emerald .stat-card-num { color: #047857; }
.stat-card-emerald .stat-card-badge { background: #ccfbf1; color: #0f766e; }

.stat-card-sage {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}
.stat-card-sage .stat-card-num { color: #0f172a; }
.stat-card-sage .stat-card-badge { background: #e2e8f0; color: #334155; }

.stat-card-cyan {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
}
.stat-card-cyan .stat-card-num { color: #0369a1; }
.stat-card-cyan .stat-card-badge { background: #e0f2fe; color: #0284c7; }

.stat-card-teal {
  background: #f0fdfa;
  border: 1.5px solid #99f6e4;
}
.stat-card-teal .stat-card-num { color: #0f766e; }
.stat-card-teal .stat-card-badge { background: #ccfbf1; color: #115e59; }

.stat-card-amber {
  background: var(--tint-amber-bg, #fffbeb);
  border: 1.5px solid var(--tint-amber-border, #fef08a);
}
.stat-card-amber .stat-card-num { color: #b45309; }
.stat-card-amber .stat-card-badge { background: #fef3c7; color: #92400e; }

.stat-card-purple {
  background: var(--tint-purple-bg, #faf5ff);
  border: 1.5px solid var(--tint-purple-border, #e9d5ff);
}
.stat-card-purple .stat-card-num { color: #7e22ce; }
.stat-card-purple .stat-card-badge { background: #f3e8ff; color: #6b21a8; }

.landing-theme-pills {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.8);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

body.modern-theme .landing-theme-pills {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.12);
}

.landing-theme-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.landing-theme-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.modern-theme .landing-theme-btn.active {
  background: #1e293b;
  color: #ffffff;
}

.landing-login-card {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 0 30px rgba(16, 185, 129, 0.08);
  padding: 40px 36px;
  text-align: center;
  margin: auto;
  box-sizing: border-box;
}

body.modern-theme .landing-login-card {
  background: #101922;
  border-color: rgba(52, 211, 153, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.landing-brand-header {
  margin-bottom: 24px;
}

.landing-brand-logo-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(16, 185, 129, 0.3));
}

.landing-brand-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.landing-brand-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

body.modern-theme .landing-brand-tag {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
}

.landing-welcome-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

@media (max-width: 700px) {
  .profile-cards-grid {
    grid-template-columns: 1fr;
  }
}

.profile-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 24px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 0 20px rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

body.modern-theme .profile-card {
  background: #141f2a;
  border-color: rgba(255, 255, 255, 0.1);
}

body.modern-theme .profile-card:hover {
  border-color: #34d399;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(52, 211, 153, 0.2);
}

.profile-card.active {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 12px 28px rgba(0, 0, 0, 0.08);
}

.profile-avatar-wrap {
  width: 72px;
  height: 72px;
  position: relative;
  margin-bottom: 12px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.profile-card:hover .profile-avatar-ring {
  border-color: #10b981;
}

.profile-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
}

.badge-emerald { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-teal { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.badge-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-purple { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-rose { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

/* Pin Entry Container */
.pin-entry-container {
  margin-top: 24px;
  padding: 22px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 18px;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

body.modern-theme .pin-entry-container {
  background: #141f2a;
  border-color: rgba(52, 211, 153, 0.3);
}

.pin-selected-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pin-avatar-wrap {
  width: 48px;
  height: 48px;
  position: relative;
}

.pin-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #047857;
}

.pin-user-meta {
  text-align: left;
}

.pin-user-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.pin-input-group {
  margin-bottom: 16px;
}

.pin-input-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.pin-input-field {
  width: 100%;
  height: 46px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 42px 0 16px;
  font-size: 20px;
  letter-spacing: 0.25em;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.pin-input-field:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

body.modern-theme .pin-input-field {
  background: #090e13;
  border-color: #334155;
  color: #ffffff;
}

.pin-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}

.pin-error-msg {
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  margin-top: 6px;
}

.pin-actions-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--surface-secondary);
}

.landing-footer-note {
  margin-top: 24px;
  text-align: center;
}

.landing-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  text-decoration: none;
  transition: all 0.2s ease;
}

.landing-dev-badge:hover {
  background: #d1fae5;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

body.modern-theme .landing-dev-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

/* =========================================================================
   WORKER REGISTRATION FORM & CARD (PASSENGER DETAILS)
   ========================================================================= */
.worker-reg-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

body.modern-theme .worker-reg-card {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.1);
}

.worker-reg-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

body.modern-theme .worker-reg-top-bar {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.reg-section-box {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

body.modern-theme .reg-section-box {
  background: #090e13;
  border-color: rgba(255, 255, 255, 0.08);
}

.reg-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.modern-theme .reg-section-title {
  color: #34d399;
}

.reg-form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.reg-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.reg-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.reg-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .reg-grid-4, .reg-grid-3, .reg-grid-2 {
    grid-template-columns: 1fr;
  }
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reg-input, .reg-select {
  height: 42px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

.reg-input:focus, .reg-select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

body.modern-theme .reg-input, body.modern-theme .reg-select {
  background: #141f2a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.reg-actions-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px solid var(--border);
}

/* =========================================================================
   TOP CLUSTER & USER PROFILE CARD (AKI MATCH - UNDER THEME SWITCHERS)
   ========================================================================= */
.top-cluster-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}

.top-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-user-card-large {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 40px;
  padding: 6px 14px 6px 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

.header-user-card-large:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

body.modern-theme .header-user-card-large {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.12);
}

.header-user-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #047857;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #a7f3d0;
  letter-spacing: -0.02em;
}

.header-user-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #047857;
}

.header-user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.header-user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}

.header-user-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header-user-role {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff5f5;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.btn-lock-badge:hover {
  background: #fee2e2;
  border-color: #f87171;
  transform: translateY(-1px);
}

body.modern-theme .btn-lock-badge {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* =========================================================================
   SEARCH WORKER BAR (PROMINENT FOCAL POINT WITH ELECTRIC BLUE GLOW)
   ========================================================================= */
.search-hub-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid #bae6fd;
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 12px 32px -8px rgba(14, 165, 233, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

body.modern-theme .search-hub-card {
  background: #101922;
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.5), 0 0 30px rgba(14, 165, 233, 0.12);
}

.search-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.search-hub-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-hub-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

body.modern-theme .search-hub-icon-pill {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.search-hub-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.badge-pill {
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.search-hub-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.aki-search-pill-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border: 2px solid #0ea5e9;
  border-radius: 40px;
  padding: 5px 8px 5px 20px;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16), 0 8px 24px rgba(14, 165, 233, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.aki-search-pill-container:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.28), 0 14px 36px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px);
}

body.modern-theme .aki-search-pill-container {
  background: #090e13;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.22), 0 10px 28px rgba(0, 0, 0, 0.6);
}

body.modern-theme .aki-search-pill-container:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.35), 0 16px 40px rgba(14, 165, 233, 0.25);
}

.aki-search-lens {
  font-size: 19px;
  color: #0284c7;
  margin-right: 12px;
  opacity: 0.9;
}

body.modern-theme .aki-search-lens {
  color: #38bdf8;
}

.aki-search-pill-input {
  flex: 1;
  height: 46px;
  border: none;
  background: transparent;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  padding: 0 8px;
}

.aki-search-pill-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.search-kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-weight: 800;
  color: #0284c7;
  margin-right: 8px;
}

body.modern-theme .search-kbd-hint {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.btn-search-pill {
  height: 44px;
  padding: 0 24px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.38);
  transition: all 0.15s ease;
}

.btn-search-pill:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.48);
}

.quick-lookup-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.quick-lookup-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.quick-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-pill-tag:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  transform: translateY(-1px);
}

body.modern-theme .quick-pill-tag {
  background: #141f2a;
  border-color: #334155;
  color: #cbd5e1;
}

body.modern-theme .quick-pill-tag:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
  color: #34d399;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* =========================================================================
   SUBTLE COLORED BORDERS ON ALL BOXES & 3D DEPTH VIBES
   ========================================================================= */
.card {
  background: var(--surface, #ffffff);
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  margin-bottom: 22px;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: #94a3b8;
}

body.modern-theme .card {
  background: #101922;
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.08);
}

.stat-card-mint {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.stat-card-emerald {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.stat-card-sage {
  border-color: #d1fae5;
  background: linear-gradient(135deg, #ffffff 0%, #f7fee7 100%);
}

.stat-card-cyan {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.stat-card-teal {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
}

.stat-card-amber {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.stat-card-purple {
  border-color: #e9d5ff;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

body.modern-theme .stat-card-mint { border-color: rgba(34, 197, 94, 0.3); background: #101922; }
body.modern-theme .stat-card-emerald { border-color: rgba(16, 185, 129, 0.3); background: #101922; }
body.modern-theme .stat-card-sage { border-color: rgba(52, 211, 153, 0.3); background: #101922; }
body.modern-theme .stat-card-cyan { border-color: rgba(59, 130, 246, 0.3); background: #101922; }
body.modern-theme .stat-card-teal { border-color: rgba(20, 184, 166, 0.3); background: #101922; }
body.modern-theme .stat-card-amber { border-color: rgba(245, 158, 11, 0.3); background: #101922; }
body.modern-theme .stat-card-purple { border-color: rgba(168, 85, 247, 0.3); background: #101922; }

/* =========================================================================
   RESPONSIVE MOBILE RULES (FLOATING DRAWER SLIDE-IN & MOBILE TOPBAR)
   ========================================================================= */
.mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 100%;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 95;
}

.overlay.open {
  display: block;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  z-index: 80;
  justify-content: space-around;
  align-items: center;
  padding: 0 6px;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.bottom-nav-item.active {
  color: #047857;
}

.bottom-nav-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 16px 90px !important;
  }
  /* Floating card slide-in drawer on mobile (User Requirement 4) */
  .sidebar {
    top: 12px;
    left: 12px;
    bottom: 12px;
    height: calc(100vh - 24px);
    width: 280px;
    transform: translateX(-320px);
    border-radius: 22px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* =========================================================================
   SECRET SUPER ADMIN MODAL & TRIGGER STYLES
   ========================================================================= */
.secret-hub-trigger {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  position: relative;
}

.secret-hub-trigger:active {
  color: var(--primary, #059669);
}

.secret-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.78) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.secret-modal-overlay.open,
#superadmin-modal.open {
  display: flex !important;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.superadmin-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface, #ffffff);
  border: 1.5px solid #818cf8;
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: 0 25px 60px -15px rgba(99, 102, 241, 0.35), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  position: relative;
  box-sizing: border-box;
}

body.modern-theme .superadmin-modal-card {
  background: #0f172a;
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.2);
}

.superadmin-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.superadmin-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

body.modern-theme .superadmin-badge-icon {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
}

.superadmin-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text, #0f172a);
  margin: 0;
  letter-spacing: -0.02em;
}

.superadmin-modal-sub {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin: 2px 0 0;
  font-weight: 600;
}

.superadmin-pin-input {
  height: 46px;
  font-size: 20px;
  font-family: 'Fira Code', monospace;
  letter-spacing: 0.25em;
  font-weight: 700;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  padding: 0 42px 0 16px;
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  transition: all 0.2s ease;
}

.superadmin-pin-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  outline: none;
}

body.modern-theme .superadmin-pin-input {
  background: #1e293b;
  border-color: #334155;
  color: #ffffff;
}

body.modern-theme .superadmin-pin-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.28);
}

/* =========================================================================
   GLOBAL SERIAL NUMBER (SL) SYSTEM & REUSABLE STYLES
   ========================================================================= */
.table-sl {
  width: 44px !important;
  min-width: 44px !important;
  text-align: center !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--text-muted, #64748b) !important;
  padding: 8px 6px !important;
}

.table-sl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-muted, #475569);
  font-size: 11.5px;
  font-weight: 800;
  font-family: 'Fira Code', monospace;
  border: 1px solid var(--border-subtle, #e2e8f0);
}

body.modern-theme .table-sl-badge {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
}

/* =========================================================================
   DASHBOARD LIST CARDS & REDESIGNED ROWS
   ========================================================================= */
.dashboard-list-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px !important;
  overflow: hidden;
  border: 1.5px solid var(--border-subtle, #e2e8f0);
}

.dashboard-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px !important;
  border-bottom: 1.5px solid var(--border-subtle, #e2e8f0);
}

.dashboard-list-header.employer-header {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-bottom-color: rgba(5, 150, 105, 0.15);
}

.dashboard-list-header.partner-header {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(99, 102, 241, 0.03) 100%);
  border-bottom-color: rgba(79, 70, 229, 0.15);
}

.dashboard-list-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-list-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid var(--border-subtle, #e2e8f0);
}

body.modern-theme .dashboard-list-header-icon {
  background: #1e293b;
  border-color: rgba(255,255,255,0.1);
}

.dashboard-list-sublabel {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  display: block;
  margin-top: 1px;
}

.dashboard-list-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Distinct Structured Row Cards (No dead gaps) */
.dashboard-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface, #ffffff);
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
}

.dashboard-list-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--primary, #10b981);
}

body.modern-theme .dashboard-list-row {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

body.modern-theme .dashboard-list-row:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dashboard-row-accent-emerald {
  border-left: 4.5px solid #10b981 !important;
}

.dashboard-row-accent-amber {
  border-left: 4.5px solid #f59e0b !important;
}

.dashboard-row-accent-blue {
  border-left: 4.5px solid #3b82f6 !important;
}

.dashboard-row-accent-purple {
  border-left: 4.5px solid #8b5cf6 !important;
}

.dashboard-row-sl-pill {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-muted, #475569);
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle, #e2e8f0);
}

body.modern-theme .dashboard-row-sl-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-row-main {
  flex: 1;
  min-width: 0;
}

.dashboard-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.btn-link-company {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #047857;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-link-company:hover {
  color: #059669;
  text-decoration: underline;
}

body.modern-theme .btn-link-company {
  color: #34d399;
}

body.modern-theme .btn-link-company:hover {
  color: #6ee7b7;
}

.dashboard-row-subline {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dashboard-row-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

/* =========================================================================
   COMPANY SUMMARY POPUP MODAL STYLES
   ========================================================================= */
.csum-stat-card {
  background: var(--surface, #ffffff);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

body.modern-theme .csum-stat-card {
  background: #1e293b;
  border-color: rgba(255,255,255,0.08);
}

.csum-stat-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
}

.csum-stat-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  margin: 4px 0 2px 0;
  font-family: 'Fira Code', monospace, sans-serif;
}

.csum-stat-sub {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.csum-flight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
  font-size: 12.5px;
}

body.modern-theme .csum-flight-chip {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

/* =========================================================================
   DASHBOARD ROW REFINED LAYOUT (Auto-Flex with Fixed/Min-Width Stats Block)
   ========================================================================= */
.dashboard-list-row-refined {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface, #ffffff);
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.dashboard-list-row-refined:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: var(--primary, #10b981);
}

body.modern-theme .dashboard-list-row-refined {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

body.modern-theme .dashboard-list-row-refined:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.dashboard-row-sl-pill {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: rgba(123, 47, 247, 0.08);
  color: #7b2ff7;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(123, 47, 247, 0.18);
}

.dashboard-row-left-65 {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-row-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row-title-line .btn-link-company,
.dashboard-row-title-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dashboard-row-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dashboard-row-right-35 {
  flex: 0 0 auto;
  min-width: 175px;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  text-align: right;
  padding-left: 12px;
  border-left: 1px dashed var(--border-subtle, #e2e8f0);
  flex-shrink: 0;
  box-sizing: border-box;
}

body.modern-theme .dashboard-row-right-35 {
  border-left-color: rgba(255, 255, 255, 0.1);
}

.dashboard-row-highlight-val {
  font-size: 13.5px;
  font-weight: 800;
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text, #0f172a);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  text-align: right;
  line-height: 1.3;
}

body.modern-theme .dashboard-row-highlight-val {
  color: #ffffff;
}

.dashboard-row-highlight-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dashboard-list-row-refined {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .dashboard-row-right-35 {
    border-left: none;
    border-top: 1px dashed var(--border-subtle, #e2e8f0);
    padding-left: 0;
    padding-top: 8px;
    align-items: flex-start;
    text-align: left;
    min-width: 100%;
    max-width: 100%;
  }
  .dashboard-row-highlight-val {
    justify-content: flex-start;
  }
  .dashboard-row-highlight-sub {
    justify-content: flex-start;
  }
}

/* =========================================================================
   1-CLICK ADMIN TOGGLE PILL BUTTONS (USER MANAGEMENT)
   ========================================================================= */
.btn-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-admin-toggle.is-admin {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.12);
}

.btn-admin-toggle.is-admin:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.15);
}

.btn-admin-toggle.is-staff {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.btn-admin-toggle.is-staff:hover {
  background: #ecfdf5;
  color: #047857;
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

body.modern-theme .btn-admin-toggle.is-admin {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

body.modern-theme .btn-admin-toggle.is-staff {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-deselect-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-deselect-pill:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.03);
}

/* =========================================================================
   GLOBAL COPY SYSTEM & INLINE QUICK-COPY BUTTONS
   ========================================================================= */
.btn-copy-inline {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  opacity: 0.65;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.btn-copy-inline:hover {
  opacity: 1;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  transform: scale(1.15);
}

.copy-floating-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.copy-floating-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Double-click copy flash animation */
.copy-flash {
  animation: copyPulse 0.4s ease;
}

@keyframes copyPulse {
  0% { background-color: rgba(16, 185, 129, 0.28); }
  100% { background-color: transparent; }
}

/* =========================================================================
   LIVE WORKER SELECTION COUNTER BADGE (TAB 4 & TAB 5)
   ========================================================================= */
.floating-selection-pill {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 50px;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.4);
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 12px;
  animation: slideInDown 0.25s ease;
}

.floating-selection-pill.ready-batch {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   DELUXE THEME (EXTRACTED FROM REFERENCE DESIGN)
   Purple-to-Blue Diagonal Gradient, 3D Floating Off-White Cards, Pill Buttons
   ========================================================================= */
body.deluxe-theme,
body.theme-deluxe {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-secondary: #f8f9fd;
  --surface-card: #f8f9fd;
  --text: #1e1b4b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  --primary: #7b2ff7;
  --primary-dark: #6324cc;
  --deluxe-gradient: linear-gradient(135deg, #7b2ff7 0%, #4c6fff 100%);
  --deluxe-gradient-soft: linear-gradient(135deg, #8b5cf6 0%, #60a5fa 100%);
  --deluxe-gradient-subtle: linear-gradient(135deg, rgba(123, 47, 247, 0.08) 0%, rgba(76, 111, 255, 0.08) 100%);
  --deluxe-gradient-card: linear-gradient(180deg, #ffffff 0%, #f8f9fd 100%);
  --shadow-deluxe-card: 0 16px 36px -6px rgba(123, 47, 247, 0.16), 0 4px 14px rgba(0, 0, 0, 0.04);
  --shadow-deluxe-hover: 0 22px 48px -6px rgba(123, 47, 247, 0.22), 0 8px 20px rgba(0, 0, 0, 0.06);
  --radius-deluxe-card: 20px;
  --radius-deluxe-pill: 50px;
  --sidebar-bg-start: #1c1335;
  --sidebar-bg-end: #15162e;
  --sidebar-border: rgba(123, 47, 247, 0.25);
  background: var(--bg);
  color: var(--text);
}

/* Deluxe Landing Page Screen with Curved Hero Backdrop */
body.deluxe-theme .landing-login-overlay {
  background: radial-gradient(circle at top right, rgba(123, 47, 247, 0.25), transparent 45%),
              radial-gradient(circle at bottom left, rgba(76, 111, 255, 0.2), transparent 45%),
              #f4f5f9;
}

body.deluxe-theme .landing-login-card {
  background: var(--deluxe-gradient-card);
  border: 1.5px solid rgba(123, 47, 247, 0.15);
  border-radius: 24px;
  box-shadow: 0 24px 60px -12px rgba(123, 47, 247, 0.2), 0 10px 24px rgba(0, 0, 0, 0.04);
}

body.deluxe-theme .landing-brand-tag {
  background: rgba(123, 47, 247, 0.1);
  color: #7b2ff7;
  border-color: rgba(123, 47, 247, 0.25);
}

body.deluxe-theme .landing-theme-btn.active {
  background: var(--deluxe-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(123, 47, 247, 0.35);
}

/* Deluxe Floating Cards & Dashboard System */
body.deluxe-theme .card,
body.deluxe-theme .dashboard-list-card,
body.deluxe-theme .stat-card,
body.deluxe-theme .search-hub-card,
body.deluxe-theme .modal-card,
body.deluxe-theme .worker-reg-card,
body.deluxe-theme .today-hero {
  border-radius: var(--radius-deluxe-card) !important;
  background: var(--deluxe-gradient-card) !important;
  border: 1.5px solid rgba(123, 47, 247, 0.12) !important;
  box-shadow: var(--shadow-deluxe-card) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.deluxe-theme .card:hover,
body.deluxe-theme .dashboard-list-card:hover {
  box-shadow: var(--shadow-deluxe-hover) !important;
  border-color: rgba(123, 47, 247, 0.3) !important;
}

/* Deluxe Row Items */
body.deluxe-theme .dashboard-list-row,
body.deluxe-theme .dashboard-list-row-refined {
  background: #ffffff;
  border-color: rgba(123, 47, 247, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(123, 47, 247, 0.06);
}

body.deluxe-theme .dashboard-list-row-refined:hover {
  border-color: #7b2ff7;
  box-shadow: 0 8px 20px rgba(123, 47, 247, 0.14);
}

body.deluxe-theme .btn-link-company {
  color: #7b2ff7;
}

body.deluxe-theme .btn-link-company:hover {
  color: #4c6fff;
}

/* Deluxe Pill Buttons */
body.deluxe-theme .btn-primary,
body.deluxe-theme .btn-submit-action,
body.deluxe-theme #btn-unlock-dashboard,
body.deluxe-theme .btn-pill-deluxe {
  background: var(--deluxe-gradient) !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px -4px rgba(123, 47, 247, 0.45) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.deluxe-theme .btn-primary:hover,
body.deluxe-theme #btn-unlock-dashboard:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -4px rgba(123, 47, 247, 0.6) !important;
}

/* Deluxe Progress Bar & Charts */
body.deluxe-theme .quota-progress-fill {
  background: var(--deluxe-gradient) !important;
  border-radius: 50px;
}

/* Deluxe Active Nav Item */
body.deluxe-theme .main-tab-btn.active {
  background: var(--deluxe-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -4px rgba(123, 47, 247, 0.45) !important;
  border-radius: 12px;
}

body.deluxe-theme .table-sl-badge {
  background: rgba(123, 47, 247, 0.08);
  color: #7b2ff7;
  border-color: rgba(123, 47, 247, 0.2);
}

body.deluxe-theme .csum-stat-card {
  border-radius: 16px;
  background: #ffffff;
  border-color: rgba(123, 47, 247, 0.12);
  box-shadow: 0 4px 14px rgba(123, 47, 247, 0.08);
}

body.deluxe-theme .csum-flight-chip {
  background: var(--deluxe-gradient-subtle);
  border-color: rgba(123, 47, 247, 0.25);
  color: #7b2ff7;
  border-radius: 50px;
}

body.deluxe-theme .floating-selection-pill {
  background: var(--deluxe-gradient);
  box-shadow: 0 8px 24px -4px rgba(123, 47, 247, 0.5);
}

body.deluxe-theme .modal-header,
body.deluxe-theme .modal-card-header {
  background: var(--deluxe-gradient) !important;
  color: #ffffff !important;
}

body.deluxe-theme .theme-toast-bar {
  background: #ffffff;
  border-color: rgba(123, 47, 247, 0.25);
  box-shadow: var(--shadow-deluxe-card);
}

/* =========================================================================
   CHANGE REQUESTS & ROLE-GATING UI STYLES
   ========================================================================= */
.badge-pending-delete {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  animation: pendingPulse 2s infinite ease-in-out;
}

.badge-pending-edit {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

@keyframes pendingPulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.02); opacity: 0.92; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.cr-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}
.cr-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cr-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}
.cr-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.cr-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.cr-card-note {
  background: var(--bg-subtle, #f8fafc);
  border-left: 3px solid #3b82f6;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--text);
  margin: 10px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.cr-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}



