/* =========================================================================
   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: #f4f6f8;
  --surface: #ffffff;
  --surface-secondary: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --primary: #10b981;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --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);

  /* 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;
}

/* =========================================================================
   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;
  white-space: nowrap;
}

/* 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 - MODERN EMERALD HIGHLIGHT
   ========================================================================= */
.sidebar {
  width: 288px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

body.modern-theme .sidebar {
  background: #0d161f;
  border-right-color: var(--border);
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

body.modern-theme .sidebar-header {
  border-bottom-color: var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.sidebar-logo:hover {
  opacity: 0.92;
}

.sidebar-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.sidebar-logo:hover .sidebar-logo-img {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 10px rgba(5, 150, 105, 0.35));
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #059669, #10b981);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}

.logo-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--green-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.modern-theme .logo-eyebrow {
  color: var(--primary);
}

.logo-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-top: 2px;
  letter-spacing: -0.01em;
}

/* Sidebar Nav Links */
.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 14px 6px;
}

body.modern-theme .nav-group-label {
  color: rgba(255, 255, 255, 0.4);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-600);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 6px;
  border: 1px solid transparent;
  user-select: none;
  position: relative;
}

body.modern-theme .nav-item {
  color: var(--text-muted);
}

.main-tab-btn {
  display: flex;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  cursor: pointer;
  position: relative;
}

.main-tab-btn.active {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 4px 16px -2px rgba(6, 78, 59, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.25) inset !important;
  font-weight: 700 !important;
}

.main-tab-btn.active svg {
  color: #6ee7b7 !important;
}

.main-tab-btn.active span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.main-tab-btn:not(.active) {
  background: transparent !important;
  color: #475569 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.main-tab-btn:not(.active) span {
  color: #475569 !important;
}

.main-tab-btn:not(.active) svg {
  color: #94a3b8 !important;
}

.main-tab-btn:not(.active):hover {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.05) !important;
}

.main-tab-btn:not(.active):hover span {
  color: #0f172a !important;
}

.main-tab-btn:not(.active):hover svg {
  color: #059669 !important;
}

.main-tab-btn:not(.active) .animate-pulse {
  display: none !important;
}

#sidebar, aside.sidebar {
  background-color: #ffffff !important;
}

/* =========================================================================
   TOP HEADER COMPONENT (Pixel-Perfect Target Redesign)
   ========================================================================= */
#top-header, header.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 112px !important;
  min-height: 112px !important;
  max-height: 112px !important;
  padding: 0 28px !important;
  border-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  box-shadow: 0 4px 20px rgba(3, 61, 58, 0.12) !important;
  background: #064847 url('/images/header_bg.png') no-repeat center right / cover !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  overflow: hidden !important;
  position: relative !important;
  box-sizing: border-box !important;
}

#sidebar-header, .sidebar-header {
  height: 112px !important;
  min-height: 112px !important;
  max-height: 112px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
}

#sidebar-core-menu {
  padding-top: 30px !important;
}

#sidebar-core-menu > div:first-child {
  margin-bottom: 10px !important;
  line-height: 16px !important;
}

#top-header::before {
  display: none !important;
}

.header-brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.header-logo-badge {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
}

.header-brand-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.header-brand-tagline {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.header-profile-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.header-avatar-wrap {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px rgba(50, 213, 131, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.header-user-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#top-header .header-user-name,
.header-profile-info .header-user-name,
.header-user-name {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35) !important;
  letter-spacing: -0.01em !important;
}

.header-logout-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.header-logout-lock-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fca5a5;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.header-lock-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.header-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

#top-header .header-role-pill,
#top-header .header-session-pill,
.header-role-pill,
.header-session-pill {
  height: 24px !important;
  min-height: 24px !important;
  box-sizing: border-box !important;
  padding: 0 10px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#top-header .header-role-pill,
.header-role-pill {
  background: rgba(236, 253, 245, 0.95) !important;
  color: #064e3b !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

#top-header .header-role-pill *,
.header-role-pill * {
  color: #064e3b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

#top-header .header-session-pill,
.header-session-pill {
  background: #065f46 !important;
  color: #ffffff !important;
  border: 1px solid rgba(50, 213, 131, 0.5) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.header-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #32D583;
  box-shadow: 0 0 6px #32D583;
  flex-shrink: 0;
}

.header-divider {
  display: none !important;
}

.header-clock-area {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  position: absolute !important;
  left: 48% !important;
  transform: translateX(-50%) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.header-clock-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.header-weather-icon {
  font-size: 20px !important;
  line-height: 1 !important;
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4)) !important;
}

.header-live-time {
  font-size: 23px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) !important;
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif !important;
}

.header-live-date {
  font-size: 11.5px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500 !important;
  margin-top: 2px !important;
  letter-spacing: 0.01em !important;
}

.header-cursive-greeting {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-style: italic !important;
  margin-top: 1px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.header-controls-capsule {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 6px 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.header-controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header-controls-row-top {
  width: auto;
}

.header-controls-row-bottom {
  width: auto;
}

.header-glass-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.header-glass-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.header-focused-pill {
  font-weight: 800 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  background: rgba(16, 185, 129, 0.15) !important;
}

.header-focused-pill.active {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

.header-pill-icon {
  width: 14px;
  height: 14px;
  color: #ffffff;
  flex-shrink: 0;
}

.header-trash-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.header-dropdown-chevron {
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.header-theme-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.15);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.header-theme-cluster .theme-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-theme-cluster .theme-btn.active {
  background: #059669 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.header-theme-cluster .theme-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.header-logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.header-logout-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

/* Micro-badge for fields required on the Saudi Visa Form (VF) */
.vf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  cursor: help;
  user-select: none;
  transition: all 0.15s ease;
}

.vf-badge:hover {
  background: #6d28d9;
  color: #ffffff;
  border-color: #5b21b6;
  box-shadow: 0 2px 6px -1px rgba(109, 40, 217, 0.35);
}

body.modern-theme .main-tab-btn.active {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%) !important;
  color: #ffffff !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
}

body.modern-theme .main-tab-btn:not(.active) {
  color: #94a3b8 !important;
}

body.modern-theme .main-tab-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.nav-item:hover {
  background: rgba(16, 185, 129, 0.08);
  color: var(--green-800);
  transform: translateX(4px);
}

body.modern-theme .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  transform: translateX(4px);
}

/* VIBRANT MODERN EMERALD ACTIVE PILL (User Requested: Distinct & Modern) */
.nav-item.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 8px 20px -3px rgba(16, 185, 129, 0.4), 0 4px 8px -2px rgba(5, 150, 105, 0.3);
  transform: translateX(4px);
  border: none;
}

body.modern-theme .nav-item.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .nav-icon {
  opacity: 1;
  stroke: #ffffff;
  stroke-width: 2.4;
}

body.modern-theme .nav-item.active .nav-icon {
  stroke: #4ade80;
}

/* Sidebar Footer Info Card */
.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-secondary);
}

body.modern-theme .sidebar-footer {
  border-top-color: var(--border);
  background: #080d12;
}

.server-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.modern-theme .server-status-card {
  background: var(--surface);
}

.server-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-700);
}

body.modern-theme .server-status-line {
  color: var(--primary);
}

.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: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* =========================================================================
   4. MAIN CONTENT AREA & HEADER
   ========================================================================= */
.main {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

/* Top Cluster: Theme Switcher & Actions */
.top-cluster {
  position: absolute;
  top: 24px;
  right: 36px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
}

.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: var(--radius-sm, 8px);
  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: 4px;
  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: 4px;
  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"],
input[type="tel"],
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;
}

/* =========================================================================
   PAGES 1, 2, 3, 4 (OPERATIONS SECTIONS) FORM FIELD STANDARDIZATION
   Strict horizontal & vertical row alignment, identical 40px height, 8px border-radius,
   and consistent typography without altering background fills, borders, or colors.
   ========================================================================= */
.section-box-slate .field,
#sec-pax-nat .field,
#sec-tracking-status .field,
#sec-visa-linking .field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.section-box-slate .field-label,
.section-box-slate .field > div:first-child,
#sec-pax-nat .field-label,
#sec-pax-nat .field > div:first-child,
#sec-tracking-status .field-label,
#sec-tracking-status .field > div:first-child,
#sec-visa-linking .field-label,
#sec-visa-linking .field > div:first-child {
  min-height: 24px;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.section-box-slate input,
.section-box-slate select,
#sec-pax-nat input,
#sec-pax-nat select,
#sec-tracking-status input,
#sec-tracking-status select,
#sec-visa-linking input,
#sec-visa-linking select {
  box-sizing: border-box !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  line-height: 22px !important;
  vertical-align: middle !important;
}

.section-box-slate select,
#sec-pax-nat select,
#sec-tracking-status select,
#sec-visa-linking select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-right: 32px !important;
}

/* Auto-capitalize all English text inputs across the website */
input[type="text"]:not([dir="rtl"]):not(.arabic-field),
input[type="search"]:not([dir="rtl"]):not(.arabic-field),
textarea:not([dir="rtl"]):not(.arabic-field) {
  text-transform: uppercase;
}

input::placeholder,
textarea::placeholder {
  text-transform: none;
}

body.modern-theme input[type="text"],
body.modern-theme input[type="number"],
body.modern-theme input[type="date"],
body.modern-theme input[type="tel"],
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);
}

/* Standardized Uppercase Section Titles (Universal All Themes) */
.section-title-standard {
  font-size: 17.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.035em !important;
  color: var(--text) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  line-height: 1.25 !important;
}

.doc-switcher-pills {
  display: inline-flex;
  align-items: center;
  background: var(--slate-100);
  padding: 6px;
  border-radius: 14px;
  gap: 8px;
  flex-wrap: wrap;
  border: 1.5px solid var(--border);
}

body.modern-theme .doc-switcher-pills {
  background: #081017;
  border-color: rgba(255, 255, 255, 0.12);
}

.doc-pill-btn {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1.5px solid transparent;
  background: var(--surface);
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.doc-pill-btn:hover {
  transform: translateY(-1px);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.doc-pill-btn.active, .doc-tab-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  border-color: transparent !important;
  font-weight: 800;
}

.doc-tab-btn {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.modern-theme .doc-pill-btn {
  background: #101a24;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}

body.modern-theme .doc-pill-btn.active {
  background: var(--surface-secondary);
  color: #ffffff;
}

/* Individual Color Accents for Operations Sub-Nav Tabs */
.ops-pill-pax {
  border-color: rgba(37, 99, 235, 0.35) !important;
  color: #1d4ed8 !important;
}
.ops-pill-pax:hover, .ops-pill-pax.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

.ops-pill-prof {
  border-color: rgba(124, 58, 237, 0.35) !important;
  color: #6d28d9 !important;
}
.ops-pill-prof:hover, .ops-pill-prof.active {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4) !important;
}

.ops-pill-visa {
  border-color: rgba(5, 150, 105, 0.35) !important;
  color: #047857 !important;
}
.ops-pill-visa:hover, .ops-pill-visa.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4) !important;
}

.ops-pill-unlinked {
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: #b45309 !important;
}
.ops-pill-unlinked:hover, .ops-pill-unlinked.active {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4) !important;
}

.ops-pill-dir {
  border-color: rgba(13, 148, 136, 0.35) !important;
  color: #0f766e !important;
}
.ops-pill-dir:hover, .ops-pill-dir.active {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4) !important;
}

/* Embassy Form Tabs Distinct Colors */
.emb-pill-single {
  border-color: rgba(37, 99, 235, 0.35) !important;
  color: #1d4ed8 !important;
}
.emb-pill-single:hover, .emb-pill-single.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

.emb-pill-batch {
  border-color: rgba(5, 150, 105, 0.35) !important;
  color: #047857 !important;
}
.emb-pill-batch:hover, .emb-pill-batch.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4) !important;
}

.emb-pill-history {
  border-color: rgba(217, 119, 6, 0.35) !important;
  color: #b45309 !important;
}
.emb-pill-history:hover, .emb-pill-history.active {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4) !important;
}

/* /* A4 Studio Document Preview Container (Light Floating Paper Canvas) */
.document-preview-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 80px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow-x: auto;
  min-height: 600px;
  box-shadow: none;
  -webkit-overflow-scrolling: touch;
}

.a4-page {
  width: 210mm;
  min-height: 297mm;
  height: auto;
  padding: 8mm 12mm 8mm 12mm;
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0 auto 30px auto;
  overflow: visible;
  position: relative;
  display: block !important;
}

/* 1. Embassy Visa Application Document */
.embassy-visa-doc {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 9.3pt !important;
  color: #000000 !important;
  line-height: 1.25 !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: 2.1pt 2.5pt;
  vertical-align: middle;
  color: #000000 !important;
  font-size: 9.3pt;
  line-height: 1.25;
}

.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: 10pt !important;
  line-height: 1.15 !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: 1.5pt 2pt;
  text-align: center;
  font-size: 8.8pt;
}

.embassy-visa-doc .official-box {
  border: 1.5px solid #000000 !important;
  padding: 2.5pt 5pt !important;
  margin-top: 3mm !important;
  box-sizing: border-box !important;
}

.embassy-visa-doc .official-box td {
  border-bottom: 1px solid #000000 !important;
  padding: 1.5pt 2pt !important;
  font-size: 8.8pt !important;
}

/* 2. Embassy Forwarding Letter */
.forwarding-doc {
  width: 100% !important;
  height: auto !important;
  display: block !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;
  display: block !important;
  margin: 10px 0 !important;
  box-sizing: border-box !important;
}

/* 3. Employment Agreement */
.agreement-doc {
  width: 100% !important;
  height: auto !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: 12.5px !important;
  line-height: 1.5 !important;
  min-height: 255mm !important;
}

.agreement-doc .agreement-title-box {
  display: inline-block;
  border: 2px solid #000000;
  padding: 6px 36px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.agreement-doc .agreement-clause {
  margin-bottom: 9px;
  text-align: justify;
}

.agreement-doc .agreement-body {
  display: block !important;
}

/* Print Mode Optimization: Explicit A4 with 10mm top, 12mm left/right, 12mm bottom margin */
@page {
  size: A4 portrait;
  margin: 10mm 12mm 12mm 12mm;
}

@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;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Universal Screen Elements Hidden during Print */
  body > *:not(#universal-print-mount),
  body.universal-print-active > *:not(#universal-print-mount),
  .sidebar,
  .top-cluster,
  .mobile-topbar,
  .mobile-bottom-nav,
  .bottom-nav,
  .no-print,
  .toast-notification,
  .modal-overlay,
  .btn-close-modal,
  button.no-print,
  .modal-header,
  .doc-action-bar,
  .landing-login-overlay,
  #toast-container {
    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: normal !important;
    display: block !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-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.3pt !important;
    line-height: 1.25 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .embassy-visa-doc table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !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: 2.1pt 2.5pt !important;
    font-size: 9.3pt !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
  }
  .embassy-visa-doc .ar {
    font-family: 'Amiri', 'Traditional Arabic', 'Times New Roman', serif !important;
    font-size: 10pt !important;
    line-height: 1.15 !important;
  }
  .embassy-visa-doc .bordered-table td,
  .embassy-visa-doc .bordered-table th {
    padding: 1.5pt 2pt !important;
    font-size: 8.8pt !important;
  }
  .embassy-visa-doc .official-box {
    border: 1.5px solid #000000 !important;
    padding: 2.5pt 5pt !important;
    margin-top: 3mm !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .embassy-visa-doc .official-box td {
    border-bottom: 1px solid #000000 !important;
    padding: 1.5pt 2pt !important;
    font-size: 8.8pt !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: 6px;
  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(auto-fit, minmax(170px, 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;
  min-width: 140px;
}

.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: clamp(20px, 1.8vw, 27px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  white-space: nowrap;
}

.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: SEARCH BAR & SMART OCR BANNER
   ========================================================================= */

.search-focal-card {
  background: var(--surface);
  border: 1.5px solid var(--border) !important;
  border-radius: var(--card-radius-lg, 20px);
  padding: 24px 28px 22px;
  box-shadow: var(--card-shadow) !important;
  position: relative;
  overflow: hidden;
  transition: all 250ms ease;
}

body.modern-theme .search-focal-card {
  background: #0e1720;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !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: 52px;
  border-radius: var(--radius-md, 12px);
  padding: 4px 6px 4px 16px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.modern-theme .futuristic-search-pill {
  background: #091017;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* FOCUS STATE (On click / typing) */
.futuristic-search-pill:focus-within {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

body.modern-theme .futuristic-search-pill:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* Smart Document Auto-Fill (OCR) Banner (Matching Design Reference) */
.ocr-smart-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%);
  border: 1.5px dashed #a7f3d0;
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

body.modern-theme .ocr-smart-banner {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
}

body.theme-neumorphic .ocr-smart-banner {
  background: var(--nm-surface) !important;
  border: 1.5px dashed rgba(37, 99, 235, 0.35) !important;
  box-shadow: var(--nm-raised-sm) !important;
}

.ocr-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ocr-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm, 8px);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.ocr-banner-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.ocr-banner-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 680px;
}

.ocr-scan-btn {
  background: linear-gradient(135deg, #3B82F6 0%, #7C3AED 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-sm, 8px) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}

.ocr-scan-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
}

/* Side-by-Side OCR Cards for Section 3 */
.ocr-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .ocr-smart-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .ocr-side-by-side {
    grid-template-columns: 1fr;
  }
}

.ocr-sub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md, 12px);
  border: 1.5px dashed var(--border);
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.ocr-sub-card-medical {
  border-color: rgba(13, 148, 136, 0.35);
  background: rgba(13, 148, 136, 0.04);
}

.ocr-sub-card-visa {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
}

body.modern-theme .ocr-sub-card {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-neumorphic .ocr-sub-card {
  background: var(--nm-surface) !important;
  box-shadow: var(--nm-inset-sm) !important;
}

/* 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: var(--radius-sm, 8px) !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(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

@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;
  min-width: 140px;
  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: clamp(14px, 1.25vw, 18px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}

.primary-focus-box .box-value {
  font-size: clamp(15px, 1.35vw, 20px) !important;
  color: #059669;
  white-space: nowrap;
}

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 Floating Page Canvas */
.document-preview-container {
  background: #f8fafc;
  border-radius: var(--card-radius);
  padding: 36px 20px;
  box-shadow: none;
  border: 1px solid #e2e8f0;
  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: min(1340px, 95vw);
  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: 40px 32px;
  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;
}

/* Profile Cards Grid - Single row accommodating 6+ profiles */
.profile-cards-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-top: 28px;
  width: 100%;
  overflow-x: auto;
  padding: 4px 4px 10px 4px;
  transition: all 0.3s ease;
  scrollbar-width: thin;
}

.profile-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 22px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  flex: 1 1 0;
  min-width: 140px;
  max-width: 195px;
  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: 70px;
  height: 70px;
  position: relative;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  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: 16px;
  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: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  word-break: break-word;
  line-height: 1.25;
}

.profile-role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
}

.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: 24px;
  padding: 24px 22px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  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: 14px;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.pin-avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  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,
input#pin-input,
.pin-input-field,
input.pin-input-field {
  width: 100% !important;
  height: 54px !important;
  font-size: 24px !important;
  text-align: center !important;
  letter-spacing: 8px !important;
  font-weight: 800 !important;
  border-radius: 16px !important;
  border: 2px solid #10b981 !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.28) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#pin-input:focus,
input#pin-input:focus,
.pin-input-field:focus,
input.pin-input-field:focus {
  border-color: #059669 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.45), 0 0 0 4px rgba(16, 185, 129, 0.2) !important;
  outline: none !important;
}

body.modern-theme #pin-input,
body.modern-theme input#pin-input,
body.modern-theme .pin-input-field {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35) !important;
}

.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: 8px;
  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: 12px !important;
  }

  .profile-avatar-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !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-sub-view {
  display: none;
}
.bmet-sub-view.active {
  display: block;
}

.bmet-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px 14px;
}

.bmet-field-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.95);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.bmet-field-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Cluster 1: Personal & Identity (Soft Sky Blue) */
.bmet-field-box.cluster-personal {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.bmet-field-box.cluster-personal .bmet-field-label {
  color: #0284c7;
}
.bmet-field-box.cluster-personal .bmet-field-value {
  color: #0c4a6e;
}

/* Cluster 2: Passport Information (Soft Emerald Mint) */
.bmet-field-box.cluster-passport {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.bmet-field-box.cluster-passport .bmet-field-label {
  color: #16a34a;
}
.bmet-field-box.cluster-passport .bmet-field-value {
  color: #064e3b;
}

/* Cluster 3: Visa Details (Soft Warm Amber) */
.bmet-field-box.cluster-visa {
  background: #fffbeb;
  border-color: #fde68a;
}
.bmet-field-box.cluster-visa .bmet-field-label {
  color: #d97706;
}
.bmet-field-box.cluster-visa .bmet-field-value {
  color: #78350f;
}

/* Cluster 4: Sponsor & Profession (Soft Lavender / Violet) */
.bmet-field-box.cluster-sponsor {
  background: #faf5ff;
  border-color: #e9d5ff;
}
.bmet-field-box.cluster-sponsor .bmet-field-label {
  color: #9333ea;
}
.bmet-field-box.cluster-sponsor .bmet-field-value {
  color: #581c87;
}

/* Dark Theme Overrides for Clusters */
body.modern-theme .bmet-field-box.cluster-personal {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}
body.modern-theme .bmet-field-box.cluster-personal .bmet-field-label { color: #38bdf8; }
body.modern-theme .bmet-field-box.cluster-personal .bmet-field-value { color: #f0f9ff; }

body.modern-theme .bmet-field-box.cluster-passport {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
}
body.modern-theme .bmet-field-box.cluster-passport .bmet-field-label { color: #34d399; }
body.modern-theme .bmet-field-box.cluster-passport .bmet-field-value { color: #f0fdf4; }

body.modern-theme .bmet-field-box.cluster-visa {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}
body.modern-theme .bmet-field-box.cluster-visa .bmet-field-label { color: #fbbf24; }
body.modern-theme .bmet-field-box.cluster-visa .bmet-field-value { color: #fffbeb; }

body.modern-theme .bmet-field-box.cluster-sponsor {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(192, 132, 252, 0.35);
}
body.modern-theme .bmet-field-box.cluster-sponsor .bmet-field-label { color: #c084fc; }
body.modern-theme .bmet-field-box.cluster-sponsor .bmet-field-value { color: #faf5ff; }

.bmet-field-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.bmet-field-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bmet-field-value {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.bmet-field-copy-btn {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  margin-left: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.bmet-field-copy-btn:hover {
  background: var(--green-600);
  color: #ffffff;
  border-color: var(--green-600);
  transform: scale(1.03);
}

.bmet-field-copy-btn.copied,
.bmet-field-copy-btn.copied-persisted {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !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);
}

.landing-footer-note {
  margin-top: 46px;
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-sm, 8px);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px 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: #d1fae5;
  border-color: #34d399;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2);
}

.landing-dev-sparkle {
  color: #f59e0b;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

.landing-dev-text {
  color: #475569;
  font-weight: 500;
  font-size: 13px;
}

.landing-dev-brand {
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.02em;
  font-size: 13px;
}

.landing-dev-arrow {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  transition: transform 0.2s ease;
  line-height: 1;
}

.landing-dev-badge:hover .landing-dev-arrow {
  transform: translate(2px, -2px);
}

body.modern-theme .landing-dev-badge,
body.theme-dark .landing-dev-badge {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.modern-theme .landing-dev-badge:hover,
body.theme-dark .landing-dev-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

body.modern-theme .landing-dev-text,
body.theme-dark .landing-dev-text {
  color: #94a3b8;
}

body.modern-theme .landing-dev-brand,
body.theme-dark .landing-dev-brand {
  color: #34d399;
}

body.modern-theme .landing-dev-arrow,
body.theme-dark .landing-dev-arrow {
  color: #34d399;
}

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;
}

/* Master Password & PIN inputs - explicitly prevent uppercase styling */
#superadmin-password-input,
.no-auto-uppercase,
input[type="password"],
input[data-no-uppercase="true"] {
  text-transform: none !important;
  -webkit-text-transform: none !important;
}


/* =========================================================================
   PART A: UNIFIED MERGED PASSENGER CARD (BIO + 2 ROWS OF BOXES + ACTIONS)
   ========================================================================= */
.unified-passengers-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

.unified-pax-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  flex-wrap: wrap;
}

.unified-pax-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

body.modern-theme .unified-pax-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

body.modern-theme .unified-pax-card:hover {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Left Section: Bio Information */
.pax-card-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 190px;
  max-width: 215px;
  flex: 0 0 205px;
  gap: 3px;
}

.pax-bio-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.pax-index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

body.modern-theme .pax-index-badge {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.pax-passport-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', monospace;
  font-weight: 800;
  font-size: 14.5px;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pax-passport-link:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

body.modern-theme .pax-passport-link {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

body.modern-theme .pax-passport-link:hover {
  background: #0284c7;
  color: #ffffff;
}

.pax-full-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-top: 3px;
}

.pax-father-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Middle Section: Status Boxes (2 Rows) */
.pax-card-boxes {
  flex: 1 1 580px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-width: 0;
}

.pax-boxes-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.pax-boxes-row.row-top .pax-status-box {
  flex: 1 1 0;
  min-width: 0;
}

.pax-boxes-row.row-bottom .pax-status-box {
  flex: 1 1 0;
  min-width: 0;
}

/* Individual Status Box */
.pax-status-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 8px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.pax-status-box:hover {
  background: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

body.modern-theme .pax-status-box {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(255, 255, 255, 0.07);
}

body.modern-theme .pax-status-box:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #34d399;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Upgraded font sizes for legibility */
.pax-status-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15px;
  color: var(--text-muted);
  margin-bottom: 2px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pax-status-val {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Far Right Section: Actions */
.pax-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex: 0 0 115px;
  min-width: 110px;
  align-self: center;
}

.pax-card-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

/* Fixed color palette for status box values */
.val-name { color: var(--text); }
.val-issue { color: #0284c7; }
.val-exp { color: #4f46e5; }
.val-med-fit { color: #059669; }
.val-med-pending { color: #d97706; }
.val-med-unfit { color: #dc2626; }
.val-med-date { color: #0d9488; }
.val-med-exp { color: #7c3aed; }
.val-visa-issued { color: #16a34a; }
.val-visa-pending { color: #ea580c; }
.val-bmet-approved { color: #047857; }
.val-bmet-pending { color: #d97706; }
.val-bmet-none { color: #64748b; }
.val-bio-yes { color: #2563eb; }
.val-bio-no { color: #64748b; }
.val-pdo-yes { color: #e11d48; }
.val-pdo-no { color: #64748b; }

body.modern-theme .val-name { color: #f8fafc; }
body.modern-theme .val-issue { color: #38bdf8; }
body.modern-theme .val-exp { color: #818cf8; }
body.modern-theme .val-med-fit { color: #34d399; }
body.modern-theme .val-med-pending { color: #fbbf24; }
body.modern-theme .val-med-unfit { color: #f87171; }
body.modern-theme .val-med-date { color: #2dd4bf; }
body.modern-theme .val-med-exp { color: #a78bfa; }
body.modern-theme .val-visa-issued { color: #4ade80; }
body.modern-theme .val-visa-pending { color: #fb923c; }
body.modern-theme .val-bmet-approved { color: #34d399; }
body.modern-theme .val-bmet-pending { color: #fbbf24; }
body.modern-theme .val-bmet-none { color: #94a3b8; }
body.modern-theme .val-bio-yes { color: #60a5fa; }
body.modern-theme .val-bio-no { color: #94a3b8; }
body.modern-theme .val-pdo-yes { color: #fb7185; }
body.modern-theme .val-pdo-no { color: #94a3b8; }



/* Responsive adjustments for Unified Passenger Card */
@media (max-width: 1200px) {
  .unified-pax-card {
    gap: 14px;
  }
  .pax-card-bio {
    flex: 0 0 210px;
    min-width: 200px;
  }
}

@media (max-width: 1024px) {
  .unified-pax-card {
    flex-direction: column;
    align-items: stretch;
  }
  .pax-card-bio {
    flex: 1 1 100%;
    max-width: 100%;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
  }
  .pax-card-actions {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: flex-start;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
    align-self: flex-start;
  }
  .pax-card-actions .btn {
    width: auto;
  }
}

@media (max-width: 640px) {
  .pax-boxes-row.row-top .pax-status-box {
    flex: 1 1 100%;
  }
  .pax-boxes-row.row-bottom .pax-status-box {
    flex: 1 1 calc(50% - 8px);
  }
  .pax-card-actions {
    flex-direction: column;
    width: 100%;
  }
  .pax-card-actions .btn {
    width: 100%;
  }
}


/* AI OCR Scanning Overlay & Animations */
.ocr-scanning-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.ocr-scanning-card {
  background: var(--surface);
  border: 1.5px solid var(--green-400);
  border-radius: 20px;
  padding: 32px 28px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 30px rgba(5, 150, 105, 0.2);
}

body.modern-theme .ocr-scanning-card {
  background: #111a24;
  border-color: #059669;
}

.ocr-laser-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 10px auto;
  background: rgba(5, 150, 105, 0.1);
  border: 1.5px dashed var(--green-500);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ocr-laser-icon {
  font-size: 38px;
}

.ocr-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10b981, #34d399, transparent);
  box-shadow: 0 0 12px #10b981;
  animation: ocrLaserScan 1.6s ease-in-out infinite alternate;
}

@keyframes ocrLaserScan {
  0% { top: 0%; opacity: 0.8; }
  100% { top: 96%; opacity: 1; }
}

.ocr-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

body.modern-theme .ocr-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.ocr-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
  animation: ocrProgressIndeterminate 1.4s ease-in-out infinite;
}

@keyframes ocrProgressIndeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.field-ocr-flash {
  animation: ocrFieldFlash 1.8s ease;
}

@keyframes ocrFieldFlash {
  0% { background-color: rgba(16, 185, 129, 0.4) !important; border-color: #059669 !important; }
  100% { background-color: transparent; }
}


/* =========================================================================
   GLOBAL TOAST NOTIFICATION SYSTEM & OCR FEEDBACK STATES
   ========================================================================= */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 440px;
  width: calc(100% - 48px);
}

@media (max-width: 768px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

.toast-item {
  pointer-events: auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.toast-item.toast-closing {
  animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}

.toast-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-msg {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  flex-shrink: 0;
  margin-top: -2px;
}

.toast-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

/* Toast Color Variants */
.toast-success {
  border-color: #10b981;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}
.toast-success .toast-icon-wrap {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
.toast-success .toast-title {
  color: #065f46;
}

.toast-error {
  border-color: #ef4444;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}
.toast-error .toast-icon-wrap {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}
.toast-error .toast-title {
  color: #991b1b;
}

.toast-warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}
.toast-warning .toast-icon-wrap {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.toast-warning .toast-title {
  color: #92400e;
}

.toast-info {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}
.toast-info .toast-icon-wrap {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}
.toast-info .toast-title {
  color: #1e40af;
}

.toast-loading {
  border-color: #059669;
  background: #ffffff;
}
.toast-loading .toast-icon-wrap {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

/* Spinner Icon */
.toast-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 150, 105, 0.25);
  border-top-color: #059669;
  border-radius: 50%;
  animation: toastSpin 0.75s linear infinite;
}

@keyframes toastSpin {
  to { transform: rotate(360deg); }
}

/* Button Loading State */
.ocr-scan-btn.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.ocr-scan-btn .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: toastSpin 0.75s linear infinite;
  margin-right: 6px;
  vertical-align: -2px;
}

/* ==========================================================================
   IMPENDING DEADLINE & MOFA WARNING MODAL STYLES (User Requirement)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.deadline-modal-card {
  background: var(--surface, #ffffff);
  width: 92%;
  max-width: 680px;
  max-height: 85vh;
  border-radius: 24px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.modern-theme .deadline-modal-card {
  background: #0f172a;
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85);
}

.deadline-modal-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.18);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.deadline-header-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fef3c7;
  border: 1.5px solid #fcd34d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.deadline-pulsing-icon {
  display: inline-block;
  animation: pulseWarning 1.5s infinite ease-in-out;
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.deadline-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1.25;
}

.deadline-badge-pill {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #fca5a5;
  white-space: nowrap;
}

.deadline-modal-sub {
  margin: 4px 0 0 0;
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}

.deadline-btn-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s;
}

.deadline-btn-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #ef4444;
}

.deadline-alert-list {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
}

.deadline-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

body.modern-theme .deadline-card {
  background: #1e293b;
  border-color: #334155;
}

.deadline-card.critical {
  border-left: 5px solid #ef4444 !important;
  background: #fffafa;
}

body.modern-theme .deadline-card.critical {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: #ef4444 !important;
}

.deadline-card.warning {
  border-left: 5px solid #f59e0b !important;
  background: #fffdf8;
}

body.modern-theme .deadline-card.warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b !important;
}

.deadline-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.deadline-card-pax {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deadline-serial-tag {
  font-family: monospace;
  font-weight: 800;
  font-size: 13px;
  background: #059669;
  color: #ffffff;
  padding: 2.5px 8px;
  border-radius: 7px;
  letter-spacing: 0.03em;
}

.deadline-pax-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text, #0f172a);
}

.deadline-passport-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #475569);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border, #cbd5e1);
}

.deadline-type-badge {
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 10px;
  border-radius: 8px;
}

.deadline-type-badge.mofa {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.deadline-type-badge.medical {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.deadline-days-chip {
  font-weight: 800;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.08);
}

.deadline-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}

.deadline-detail-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.deadline-detail-label {
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.deadline-detail-val {
  font-weight: 800;
  color: var(--text, #0f172a);
}

.deadline-center-val {
  font-style: italic;
  font-size: 12px;
  color: #64748b;
}

.deadline-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-alert-nav {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border, #cbd5e1);
  padding: 6px 14px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text, #334155);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-alert-nav:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-alert-action {
  border: none;
  padding: 6px 15px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-alert-action.mofa {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-alert-action.mofa:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
}

.btn-alert-action.med {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.btn-alert-action.med:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.deadline-modal-footer {
  background: var(--bg-alt, #f8fafc);
  border-top: 1.5px solid var(--border, #e2e8f0);
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

body.modern-theme .deadline-modal-footer {
  background: #0b1120;
  border-color: #334155;
}

/* =========================================================================
   EMBASSY SUBMISSION LIST DRILL-DOWN & EXPANDABLE SUB-TABLE STYLES
   ========================================================================= */
.emb-expand-btn {
  background: transparent;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  transition: all 0.2s ease;
  margin-right: 6px;
  user-select: none;
}

.emb-expand-btn:hover {
  background: var(--bg-alt, #f8fafc);
  color: #047857;
  border-color: #10b981;
}

.emb-expand-btn.expanded {
  transform: rotate(90deg);
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.emb-master-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.emb-master-row:hover {
  background-color: rgba(16, 185, 129, 0.04) !important;
}

.emb-subtable-row {
  background: var(--bg-alt, #f8fafc) !important;
}

body.modern-theme .emb-subtable-row {
  background: #090e1a !important;
}

.emb-subtable-container {
  padding: 12px 16px 18px 36px;
  border-left: 3px solid #10b981;
  background: transparent;
}

.emb-subtable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}

body.modern-theme .emb-subtable {
  background: #0f172a;
  border-color: #1e293b;
}

.emb-subtable th {
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  border-bottom: 1px solid #a7f3d0;
  text-align: left;
}

body.modern-theme .emb-subtable th {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.emb-subtable td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  vertical-align: middle;
}

body.modern-theme .emb-subtable td {
  border-bottom-color: #1e293b;
}

.emb-subtable tr:last-child td {
  border-bottom: none;
}

.emb-subtable tr:hover td {
  background: rgba(16, 185, 129, 0.03);
}

.search-match-highlight {
  background-color: #fef08a !important;
  color: #854d0e !important;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

body.modern-theme .search-match-highlight {
  background-color: #854d0e !important;
  color: #fef08a !important;
}

.search-match-row {
  animation: pulse-emerald 1.5s ease 1;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

@keyframes pulse-emerald {
  0% { background-color: rgba(16, 185, 129, 0.25); }
  100% { background-color: rgba(16, 185, 129, 0.08); }
}

/* =========================================================================
   DOCUMENTS UPLOAD HUB & DROPZONE CARDS (TAB 7)
   ========================================================================= */
.upload-dropzone-card {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  user-select: none;
}

body.modern-theme .upload-dropzone-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(51, 65, 85, 0.8);
}

.upload-dropzone-card:hover {
  border-color: #059669;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

body.modern-theme .upload-dropzone-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #10b981;
}

.upload-dropzone-card.dragover {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.18);
}

body.modern-theme .upload-dropzone-card.dragover {
  background: rgba(6, 78, 59, 0.4) !important;
  border-color: #34d399 !important;
}

.upload-dropzone-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.upload-dropzone-card:hover .upload-dropzone-icon {
  transform: scale(1.1);
}

/* =========================================================================
   BMET CANDIDATE INSPECTION CARDS & COPY HIGHLIGHTS
   ========================================================================= */
.candidate-box {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.candidate-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.candidate-box.field-copied-active {
  border-color: #059669 !important;
  background-color: #ecfdf5 !important;
  box-shadow: 0 0 0 2px #6ee7b7 !important;
  animation: copiedPulse 0.4s ease-in-out;
}

body.modern-theme .candidate-box.field-copied-active {
  color: #047857;
  border-color: #10b981;
}

.emb-expand-btn.expanded {
  transform: rotate(90deg);
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.emb-master-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.emb-master-row:hover {
  background-color: rgba(16, 185, 129, 0.04) !important;
}

.emb-subtable-row {
  background: var(--bg-alt, #f8fafc) !important;
}

body.modern-theme .emb-subtable-row {
  background: #090e1a !important;
}

.emb-subtable-container {
  padding: 12px 16px 18px 36px;
  border-left: 3px solid #10b981;
  background: transparent;
}

.emb-subtable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}

body.modern-theme .emb-subtable {
  background: #0f172a;
  border-color: #1e293b;
}

.emb-subtable th {
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  border-bottom: 1px solid #a7f3d0;
  text-align: left;
}

body.modern-theme .emb-subtable th {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.emb-subtable td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  vertical-align: middle;
}

body.modern-theme .emb-subtable td {
  border-bottom-color: #1e293b;
}

.emb-subtable tr:last-child td {
  border-bottom: none;
}

.emb-subtable tr:hover td {
  background: rgba(16, 185, 129, 0.03);
}

.search-match-highlight {
  background-color: #fef08a !important;
  color: #854d0e !important;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

body.modern-theme .search-match-highlight {
  background-color: #854d0e !important;
  color: #fef08a !important;
}

.search-match-row {
  animation: pulse-emerald 1.5s ease 1;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

@keyframes pulse-emerald {
  0% { background-color: rgba(16, 185, 129, 0.25); }
  100% { background-color: rgba(16, 185, 129, 0.08); }
}

/* =========================================================================
   DOCUMENTS UPLOAD HUB & DROPZONE CARDS (TAB 7)
   ========================================================================= */
.upload-dropzone-card {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  user-select: none;
}

body.modern-theme .upload-dropzone-card {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(51, 65, 85, 0.8);
}

.upload-dropzone-card:hover {
  border-color: #059669;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

body.modern-theme .upload-dropzone-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #10b981;
}

.upload-dropzone-card.dragover {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.18);
}

body.modern-theme .upload-dropzone-card.dragover {
  background: rgba(6, 78, 59, 0.4) !important;
  border-color: #34d399 !important;
}

.upload-dropzone-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.upload-dropzone-card:hover .upload-dropzone-icon {
  transform: scale(1.1);
}

/* =========================================================================
   BMET CANDIDATE INSPECTION CARDS & COPY HIGHLIGHTS
   ========================================================================= */
.candidate-box {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.candidate-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.candidate-box.field-copied-active {
  border-color: #059669 !important;
  background-color: #ecfdf5 !important;
  box-shadow: 0 0 0 2px #6ee7b7 !important;
  animation: copiedPulse 0.4s ease-in-out;
}

body.modern-theme .candidate-box.field-copied-active {
  background-color: rgba(6, 78, 59, 0.6) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.4) !important;
}

@keyframes copiedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.bmet-employee-card-wrap {
  margin-bottom: 24px;
}

/* =========================================================================
   EMBASSY LIST (FINAL PASSPORT MANIFEST) & MULTI-PROFESSION STYLES
   ========================================================================= */

/* Reorder Icon-Only Buttons */
.btn-reorder-icon {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.15s ease;
  user-select: none;
  padding: 0;
}

.btn-reorder-icon:hover:not(:disabled) {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
}

.btn-reorder-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Embassy List A4 Document Sheet */
.embassy-list-sheet {
  background: #ffffff !important;
  color: #000000 !important;
  width: 210mm;
  min-height: 297mm;
  padding: 25.4mm 12.7mm 12.7mm 12.7mm;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  font-family: Arial, sans-serif !important;
  direction: rtl;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.embassy-manifest-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000000;
  text-align: center;
  font-size: 11pt;
  table-layout: fixed;
  font-family: Arial, sans-serif !important;
}

.embassy-manifest-table th,
.embassy-manifest-table td {
  border: 1px solid #000000;
  padding: 3px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: middle;
  font-family: Arial, sans-serif !important;
  box-sizing: border-box;
  max-width: 0;
}

.embassy-manifest-table thead th {
  background: #ffffff;
  color: #000000;
  font-weight: bold;
  font-family: Arial, sans-serif !important;
}

/* Print specific rules for Embassy List */
@media print {
  body.printing-embassy-list * {
    visibility: hidden !important;
  }
  body.printing-embassy-list #print-mount,
  body.printing-embassy-list #print-mount * {
    visibility: visible !important;
  }
  body.printing-embassy-list #print-mount {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }
}

/* =========================================================================
   ENLARGED TYPOGRAPHY & COMFORTABLE PADDING (EMBASSY & BMET WORKSPACES)
   ========================================================================= */

/* Search Inputs in Tab 3 (Embassy) & Tab 4 (BMET) */
#doc-quick-search,
#batch-search-input,
#batch-candidate-search,
#bmet-quick-search-input,
#quick-serial-lookup-input,
#quick-passport-lookup-input {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  padding: 12px 16px !important;
  height: 48px !important;
  border-radius: 10px !important;
}

#doc-quick-search {
  padding-left: 42px !important;
  border: 2px solid #059669 !important;
  background: #f0fdf4 !important;
  color: #064e3b !important;
}

#batch-search-input {
  border: 2px solid #6366f1 !important;
  background: #ffffff !important;
  color: #1e1b4b !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

#batch-search-input:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25) !important;
  outline: none !important;
}

#bmet-quick-search-input {
  border: 2px solid #0d9488 !important;
  background: #ffffff !important;
  color: #134e4a !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12) !important;
}

#bmet-quick-search-input:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.25) !important;
  outline: none !important;
}

/* Embassy Queue & Candidate Selection Tables */
#emb-queue-table,
#emb-queue-table table,
#bmet-candidates-table,
.bmet-manifest-table {
  font-size: 14.5px !important;
}

#emb-queue-table th,
#bmet-candidates-table th,
.bmet-manifest-table th {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  padding: 12px 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

#emb-queue-table td,
#bmet-candidates-table td,
.bmet-manifest-table td {
  font-size: 14.5px !important;
  padding: 10px 14px !important;
  vertical-align: middle !important;
}

/* Passports and Serials in tables stand out boldly */
#emb-queue-table td strong,
#bmet-candidates-table td strong,
.bmet-manifest-table td strong {
  font-size: 15px !important;
  font-weight: 800 !important;
}

/* Editable inputs in batch queue */
#emb-queue-table input.inline-table-input,
#bmet-candidates-table input.inline-table-input {
  font-size: 14px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
}

/* =========================================================================
   WORKER DATA ENTRY REFACTOR: STEP CARDS, INLINE BUTTONS & NEXT-UP GUIDANCE
   ========================================================================= */

/* Step 1 & Step 2 Distinct White Cards */
.entry-step-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
  margin-bottom: 24px !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
}

.entry-step-card:hover {
  box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.09) !important;
}

.entry-step-card-header {
  padding: 14px 20px !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  user-select: none !important;
}

.entry-step-card-header.step1 {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
  border-bottom-color: #d1fae5 !important;
}

.entry-step-card-header.step2 {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important;
  border-bottom-color: #e0f2fe !important;
}

.entry-step-card-body {
  padding: 22px !important;
  background: #ffffff !important;
}

/* Inline Auto-Fill Button Inside Input */
.input-inline-btn-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.input-inline-btn-wrap input {
  width: 100% !important;
  padding-right: 95px !important;
}

.input-inline-btn-wrap input[style*="direction: rtl"],
.input-inline-btn-wrap input.is-rtl-input {
  padding-right: 12px !important;
  padding-left: 95px !important;
}

.btn-inline-autofill {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  padding: 4px 8px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  transition: all 0.15s ease !important;
  z-index: 5 !important;
}

.btn-inline-autofill:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.btn-inline-autofill.is-rtl {
  right: auto !important;
  left: 6px !important;
  color: #047857 !important;
}

.btn-inline-autofill.is-rtl:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
}

/* Active Focus Highlight */
input:focus,
select:focus,
textarea:focus,
.field-focus-active {
  border-color: #059669 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.22), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
}

/* Next-Up Target Guidance State */
.field-next-up,
input.field-next-up,
select.field-next-up,
textarea.field-next-up {
  background-color: #fefce8 !important;
  border: 2px dashed #eab308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.18) !important;
  position: relative !important;
}

.next-up-badge {
  position: absolute !important;
  top: -10px !important;
  right: 12px !important;
  background: #fef08a !important;
  color: #854d0e !important;
  border: 1px solid #facc15 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08) !important;
  pointer-events: none !important;
  z-index: 15 !important;
  animation: nextUpPulse 1.8s infinite ease-in-out !important;
  letter-spacing: 0.02em !important;
}

@keyframes nextUpPulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* =========================================================================
   EXTERNAL PORTALS HUB (Unified Across All Themes)
   ========================================================================= */
#sidebar a[onclick*="launchExternalPortal"],
.sidebar a[onclick*="launchExternalPortal"] {
    background-color: #161f33 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

#sidebar a[onclick*="launchExternalPortal"]:hover,
.sidebar a[onclick*="launchExternalPortal"]:hover {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

#sidebar a[onclick*="launchExternalPortal"] .text-slate-800,
.sidebar a[onclick*="launchExternalPortal"] .text-slate-800 {
    color: #ffffff !important;
    font-weight: 800 !important;
}

#sidebar a[onclick*="launchExternalPortal"] .text-emerald-600,
.sidebar a[onclick*="launchExternalPortal"] .text-emerald-600 {
    color: #34d399 !important;
    font-weight: 700 !important;
}

#sidebar a[onclick*="launchExternalPortal"] .text-blue-600,
.sidebar a[onclick*="launchExternalPortal"] .text-blue-600 {
    color: #60a5fa !important;
    font-weight: 700 !important;
}

#sidebar a[onclick*="launchExternalPortal"] .text-purple-600,
.sidebar a[onclick*="launchExternalPortal"] .text-purple-600 {
    color: #c084fc !important;
    font-weight: 700 !important;
}

#sidebar a[onclick*="launchExternalPortal"] .text-amber-600,
.sidebar a[onclick*="launchExternalPortal"] .text-amber-600 {
    color: #fb923c !important;
    font-weight: 700 !important;
}

/* Portal Letter Avatars with Glowing Circular Badges across all themes */
#sidebar a[onclick*="launchExternalPortal"] .bg-emerald-50,
.sidebar a[onclick*="launchExternalPortal"] .bg-emerald-50 {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border: 1.5px solid #34d399 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.45) !important;
}

#sidebar a[onclick*="launchExternalPortal"] .bg-blue-50,
.sidebar a[onclick*="launchExternalPortal"] .bg-blue-50 {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border: 1.5px solid #60a5fa !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.45) !important;
}

#sidebar a[onclick*="launchExternalPortal"] .bg-purple-50,
.sidebar a[onclick*="launchExternalPortal"] .bg-purple-50 {
    background-color: #a855f7 !important;
    color: #ffffff !important;
    border: 1.5px solid #c084fc !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.45) !important;
}

#sidebar a[onclick*="launchExternalPortal"] .bg-amber-50,
.sidebar a[onclick*="launchExternalPortal"] .bg-amber-50 {
    background-color: #f97316 !important;
    color: #ffffff !important;
    border: 1.5px solid #fb923c !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.45) !important;
}

/* =========================================================================
   MODERN PILL SEARCH HUB (100% MATCH TO SAMPLE SPECIFICATION)
   ========================================================================= */
.modern-pill-search-card {
    background: linear-gradient(115deg, #42c8f5 0%, #5cbcf7 28%, #85b0fb 50%, #b29afc 75%, #df8af6 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 24px 28px 28px 28px;
    box-shadow: 0 12px 32px -6px rgba(56, 189, 248, 0.35), 0 4px 16px rgba(168, 85, 247, 0.2);
    margin-bottom: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.modern-pill-search-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.modern-pill-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #233876;
    background: linear-gradient(135deg, #2b438c 0%, #1e316a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(35, 56, 118, 0.28);
    flex-shrink: 0;
}

.modern-pill-search-title {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #0c1a4b;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    line-height: 1.2;
}

.modern-pill-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 9999px;
    background: linear-gradient(180deg, #f2f6fc 0%, #e6effa 100%);
    box-shadow: 0 14px 28px -6px rgba(100, 116, 139, 0.28), 
                inset 0 2px 4px rgba(255, 255, 255, 0.95), 
                inset 0 -2px 5px rgba(148, 163, 184, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 3px 6px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-pill-search-wrapper:focus-within {
    box-shadow: 0 18px 36px -4px rgba(59, 130, 246, 0.35), 
                0 0 0 3px rgba(96, 165, 250, 0.45), 
                inset 0 2px 4px rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f0f5fc 100%);
}

.modern-pill-search-input {
    width: 100%;
    height: 52px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 58px 0 26px !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    border-radius: 9999px !important;
}

.modern-pill-search-input:focus,
.modern-pill-search-input:active,
#universal-search-input:focus,
#universal-search-input:active {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.modern-pill-search-input::placeholder {
    color: #64748b !important;
    font-size: 15.5px !important;
    font-weight: 500 !important;
    opacity: 0.95 !important;
}

.modern-pill-search-btn {
    position: absolute;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4371dd;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.modern-pill-search-btn:hover {
    color: #1d4ed8;
    transform: scale(1.12);
}

.modern-pill-search-btn:active {
    transform: scale(0.95);
}

/* Suppress any browser extensions (Grammarly, LanguageTool, Autofill) injecting tick marks/icons into search input */
.modern-pill-search-wrapper grammarly-extension,
.modern-pill-search-wrapper [data-grammarly-part],
.modern-pill-search-wrapper .grammarly-extension-viewport,
.modern-pill-search-wrapper [data-lt-active],
.modern-pill-search-wrapper .lt-icon-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modern-pill-search-input::-webkit-credentials-auto-fill-button,
.modern-pill-search-input::-webkit-contacts-auto-fill-button,
.modern-pill-search-input::-webkit-caps-lock-indicator {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* =========================================================================
   UNIVERSAL PRINT MOUNT SCREEN DEFENSE
   (Strictly hidden on screen so it never causes side-column rendering)
   ========================================================================= */
#universal-print-mount {
    display: none !important;
}

/* =========================================================================
   BMET EMPLOYMENT AGREEMENT — STRICT 1-PAGE A4 ENFORCEMENT STYLES
   (Calibrated with Signatures positioned at 85% of page, 15% bottom room)
   ========================================================================= */
.agree-page {
    box-sizing: border-box;
    width: 210mm;
    max-width: 100%;
    min-height: 294mm;
    max-height: 294mm;
    height: 294mm;
    padding: 10mm 16mm 8mm 16mm;
    margin: 0 auto 24px auto;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    font-family: 'Times New Roman', 'Arial', serif;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    page-break-after: always;
    page-break-inside: avoid;
    break-after: page;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
}

.agree-page * {
    box-sizing: border-box;
    color: #000000;
}

.agree-page .ar-text {
    direction: rtl;
    text-align: right;
    font-family: 'Amiri', 'Traditional Arabic', 'Arial', serif;
}

/* --- Sample 1: Classic Dual Column --- */
.agree-sample1-header {
    text-align: center;
    border: 2px solid #000000;
    padding: 8px 16px;
    margin-bottom: 12px;
    background: #ffffff;
}
.agree-sample1-header-title {
    font-size: 17.5px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.agree-sample1-header-sub {
    font-size: 11px;
    color: #333333;
    margin-top: 2px;
    font-weight: 600;
}
.agree-sample1-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    border: 1.5px solid #000000;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 12.5px;
    background: #fafafa;
    line-height: 1.4;
}
.agree-sample1-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
}
.agree-sample1-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.agree-sample1-clause {
    font-size: 12px;
    line-height: 1.38;
    text-align: justify;
}
.agree-sample1-clause.ar-text {
    font-size: 13.5px;
    font-family: 'Amiri', serif;
    line-height: 1.38;
}

/* --- Sample 2: Tabular Executive --- */
.agree-sample2-header {
    border-bottom: 2.5px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.agree-sample2-header-en {
    font-size: 16.5px;
    font-weight: 900;
    letter-spacing: 0.03em;
}
.agree-sample2-header-ar {
    font-size: 17px;
    font-weight: 900;
}
.agree-sample2-section-bar {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 4px;
    background: #f1f5f9;
    padding: 4px 8px;
    border: 1.5px solid #cbd5e1;
    letter-spacing: 0.03em;
}
.agree-sample2-parties-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 1.5px solid #000000;
    font-size: 12.5px;
}
.agree-sample2-parties-table td, .agree-sample2-parties-table th {
    border: 1px solid #000000;
    padding: 6px 10px;
    line-height: 1.35;
}
.agree-sample2-clauses-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 1.5px solid #000000;
    font-size: 12px;
}
.agree-sample2-clauses-table th {
    border: 1px solid #000000;
    padding: 6px 8px;
    background: #e2e8f0;
    font-size: 12px;
    font-weight: 900;
}
.agree-sample2-clauses-table td {
    border: 1px solid #000000;
    padding: 5.5px 8px;
    line-height: 1.32;
    font-size: 11.6px;
}
.agree-sample2-clauses-table td.ar-text {
    font-size: 13px;
    font-family: 'Amiri', serif;
}

/* --- Sample 3: Standard Formal --- */
.agree-sample3-title {
    text-align: center;
    font-size: 18.5px;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    text-decoration: underline;
}
.agree-sample3-sub {
    text-align: center;
    font-size: 11px;
    color: #333333;
    font-weight: 600;
    margin-bottom: 10px;
}
.agree-sample3-parties-box {
    border: 1.5px dashed #000000;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    background: #fdfdfd;
}
.agree-sample3-clause-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 5.5px;
    font-size: 11.8px;
    line-height: 1.38;
}
.agree-sample3-clause-row .ar-text {
    font-size: 13.2px;
    font-family: 'Amiri', serif;
    line-height: 1.38;
}

/* --- Shared Signatures Container (Positioned at 85% of Page Height) --- */
.agree-signatures-box {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-top: 1.5px solid #000000;
    padding-top: 8px;
    padding-bottom: 12px;
}
.agree-sig-col {
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
}
.agree-sig-line {
    margin-top: 32px;
    border-top: 1px solid #000000;
    padding-top: 4px;
    font-size: 12.5px;
}

/* --- Footer Reference --- */
.agree-footer-ref {
    position: absolute;
    bottom: 3.5mm;
    left: 16mm;
    right: 16mm;
    display: flex;
    justify-content: space-between;
    font-size: 9.5px;
    color: #444444;
    border-top: 0.5px solid #cccccc;
    padding-top: 3px;
}

/* --- Print Specific Rules --- */
@media print {
    @page {
        size: A4 portrait;
        margin: 6mm 10mm 6mm 10mm;
    }
    
    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body * {
        visibility: hidden !important;
    }
    
    #universal-print-mount, #universal-print-mount * {
        visibility: visible !important;
    }
    
    #universal-print-mount {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        background: #ffffff !important;
    }
    
    .agree-page {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 280mm !important;
        max-height: 280mm !important;
        min-height: 280mm !important;
        margin: 0 !important;
        padding: 6mm 12mm 4mm 12mm !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        page-break-before: auto !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        break-before: auto !important;
        break-after: page !important;
        break-inside: avoid !important;
        overflow: hidden !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .agree-signatures-box {
        margin-top: auto !important;
    }
    
    .agree-page:last-child {
        page-break-after: auto !important;
        break-after: auto !important;
    }
}

/* ==========================================================================
   INVOICE GENERATOR & A4 DOCUMENT STYLES
   ========================================================================== */
.inv-bank-card:hover {
    border-color: #0284c7 !important;
    background: #f0f9ff !important;
}
.inv-bank-card:has(input:checked) {
    border-color: #0284c7 !important;
    background: #f0f9ff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}

.inv-item-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.inv-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.inv-flight-subpanel {
    background: #f0f9ff;
    border: 1px dashed #7dd3fc;
    border-radius: 8px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.inv-term-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    font-size: 12.5px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s;
}
.inv-term-row:hover {
    background: #f1f5f9;
}
.inv-term-row input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #0284c7;
}

/* --- A4 Invoice Printable Document (Matching Reference Image) --- */
.invoice-a4-sheet {
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 18mm 18mm 16mm 18mm;
    background: #ffffff;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0 20px rgba(0,0,0,0.06);
}

.inv-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 2px solid #e0f2fe;
}

.inv-doc-logo-block {
    display: flex;
    align-items: center;
    gap: 14px;
}
.inv-doc-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}
.inv-doc-company-name {
    font-size: 18px;
    font-weight: 900;
    color: #0c4a6e;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.inv-doc-company-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: #0284c7;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}
.inv-doc-rl-badge {
    display: inline-block;
    background: #0284c7;
    color: white;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.inv-doc-contact-block {
    text-align: right;
    font-size: 11px;
    color: #475569;
    line-height: 1.5;
}
.inv-doc-contact-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.inv-doc-meta-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 22px;
    margin-bottom: 22px;
}

.inv-doc-bill-to {
    max-width: 58%;
}
.inv-doc-bill-to-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.inv-doc-client-name {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    text-transform: uppercase;
    line-height: 1.25;
    margin-bottom: 6px;
}
.inv-doc-client-details {
    font-size: 11.5px;
    color: #334155;
    line-height: 1.55;
}

.inv-doc-title-box {
    text-align: right;
}
.inv-doc-main-title {
    font-size: 32px;
    font-weight: 900;
    color: #0284c7;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 10px;
}
.inv-doc-meta-table {
    margin-left: auto;
    font-size: 11.5px;
    border-collapse: collapse;
}
.inv-doc-meta-table td {
    padding: 3px 6px;
}
.inv-doc-meta-table td.label {
    font-weight: 700;
    color: #64748b;
    text-align: right;
}
.inv-doc-meta-table td.val {
    font-weight: 800;
    color: #0f172a;
    font-family: monospace;
    font-size: 12px;
}

/* Items Table */
.inv-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.inv-doc-table th {
    background: #f8fafc;
    color: #0f172a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 12px;
    border-top: 2px solid #0284c7;
    border-bottom: 2px solid #e2e8f0;
}
.inv-doc-table td {
    padding: 10px 12px;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.inv-doc-item-title {
    font-weight: 800;
    color: #0f172a;
}
.inv-doc-item-sub {
    font-size: 11px;
    color: #0284c7;
    margin-top: 2px;
    font-weight: 600;
}

/* Bottom Split: Left (Bank & Terms) | Right (Totals & Signature) */
.inv-doc-bottom-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    margin-top: 10px;
}

.inv-doc-bank-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3.5px solid #0284c7;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 11px;
    line-height: 1.5;
}
.inv-doc-bank-title {
    font-size: 11px;
    font-weight: 900;
    color: #0c4a6e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.inv-doc-terms-box {
    font-size: 10px;
    color: #475569;
    line-height: 1.45;
}
.inv-doc-terms-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.inv-doc-terms-box ul {
    margin: 0;
    padding-left: 14px;
}
.inv-doc-terms-box li {
    margin-bottom: 2.5px;
}

.inv-doc-totals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.inv-doc-totals-table td {
    padding: 4px 8px;
}
.inv-doc-totals-table td.lbl {
    color: #475569;
    font-weight: 700;
    text-align: right;
}
.inv-doc-totals-table td.val {
    font-weight: 800;
    color: #0f172a;
    text-align: right;
    font-family: monospace;
    font-size: 12.5px;
}
.inv-doc-grand-row td {
    border-top: 2px solid #0284c7;
    border-bottom: 2px solid #0284c7;
    padding: 8px 8px;
    background: #f0f9ff;
}
.inv-doc-grand-row td.lbl {
    font-size: 13px;
    font-weight: 900;
    color: #0369a1;
}
.inv-doc-grand-row td.val {
    font-size: 16px;
    font-weight: 900;
    color: #0369a1;
}

.inv-doc-words-box {
    margin-top: 10px;
    padding: 6px 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 10.5px;
    font-style: italic;
    color: #334155;
    text-align: right;
}

.inv-doc-sig-box {
    margin-top: 30px;
    text-align: right;
}
.inv-doc-sig-line {
    display: inline-block;
    width: 160px;
    border-top: 1.5px solid #0f172a;
    padding-top: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
}

.inv-doc-footer-msg {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: #64748b;
}

/* Toolbar Config Pills Active States */
.inv-config-pill input:checked + .pill-btn {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}

.inv-config-pill input[value="Paid"]:checked + .pill-btn {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3) !important;
}

.inv-config-pill input[value="Advance"]:checked + .pill-btn {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3) !important;
}

.inv-config-pill input[value="Unpaid"]:checked + .pill-btn {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}

/* Copy Header Badges */
.inv-doc-copy-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.inv-doc-copy-pax {
    background: #e0f2fe;
    color: #0369a1;
    border: 1.5px solid #7dd3fc;
}
.inv-doc-copy-office {
    background: #fef3c7;
    color: #92400e;
    border: 1.5px solid #fcd34d;
}

/* Office Copy Guardian / Relative Signature Box */
.inv-office-safety-box {
    margin-top: 14px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
}
.inv-office-sig-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.inv-sig-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.inv-sig-card-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.inv-sig-card-line {
    border-top: 1px solid #94a3b8;
    padding-top: 4px;
    font-size: 9.5px;
    color: #475569;
    font-weight: 600;
    text-align: center;
}

/* Print Overrides for Invoice A4 & Multi-Copy Page Breaks */
@media print {
    .invoice-a4-sheet {
        box-shadow: none !important;
        padding: 10mm 12mm 10mm 12mm !important;
        width: 100% !important;
        min-height: 275mm !important;
        margin: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .invoice-a4-sheet.inv-sheet-page-break {
        page-break-before: always !important;
        break-before: page !important;
    }
}


