/* =============================================================================
   Al-Farouq Legal System - Global Stylesheet
   Dark mode, gold accents, RTL Arabic layout
   ============================================================================= */
/* ─── CSS Theme Variables (Dark Obsidian & Day Slate) ─────────────────────── */
:root,
html[data-theme="dark"],
body.theme-dark {
  --theme: dark;
  --primary-color: #d4af37;
  --primary-dark:  #b8962e;
  --primary-light: #fbe8a6;
  --gold-gradient: linear-gradient(135deg, #d4af37, #f3e5ab, #d4af37);
  --bg-color:      #05080c; /* Deep Royal Navy Blue */
  --bg-subtle:     #0b1118;
  --surface-color: #0b1118; /* Lighter Navy Surface */
  --surface-elevated: #111a26;
  --surface-card:  rgba(22, 27, 34, 0.7);
  --text-main:     #f0f6fc;
  --text-muted:    #8b949e;
  --border-color:  #1d2633;
  --border-light:  rgba(255, 255, 255, 0.08);
  --accent-color:  #1f6feb;
  --success-color: #3fb950;
  --danger-color:  #f85149;
  --warning-color: #d29922;
  --gold:          #d4af37;
  --gold-muted:    rgba(212, 175, 55, 0.2);
  --glass-bg:      rgba(22, 27, 34, 0.7);
  --glass-border:  rgba(255, 255, 255, 0.06);
  --glass-shadow:  0 10px 30px rgba(0, 0, 0, 0.5);
  --card-shadow:   0 8px 24px rgba(0, 0, 0, 0.4);
  --top-bar-bg:    #060a10;
  --header-bg:     rgba(8, 13, 20, 0.85);
  --nav-link-color:#f0f6fc;
  --input-bg:      #0b1118;
  --dropdown-bg:   #0e1626;
  --table-head-bg: rgba(255, 255, 255, 0.05);
  --table-hover:   rgba(255, 255, 255, 0.03);
  --chat-window-bg:#0b1118;
  --chat-bot-msg:  rgba(255, 255, 255, 0.06);
  --chat-user-msg: rgba(212, 175, 55, 0.2);
  --chat-bot-text: #f0f6fc;
  --chat-user-text:#f0f6fc;
  --footer-bg:     #030508;
}

html[data-theme="light"],
body.theme-light,
[data-theme="light"] {
  --theme: light;
  --primary-color: #b8860b; /* Rich Dark Goldenrod for crisp contrast */
  --primary-dark:  #966c04;
  --primary-light: #dfb135;
  --gold-gradient: linear-gradient(135deg, #b8860b, #d4af37, #b8860b);
  --bg-color:      #f8fafc; /* Crisp Luxury Slate */
  --bg-subtle:     #f1f5f9;
  --surface-color: #ffffff; /* Crisp Pure White */
  --surface-elevated: #ffffff;
  --surface-card:  #ffffff;
  --text-main:     #0f172a; /* Deep authoritative slate 900 */
  --text-muted:    #475569; /* Slate 600 */
  --border-color:  #e2e8f0; /* Crisp slate 200 */
  --border-light:  rgba(0, 0, 0, 0.07);
  --accent-color:  #0284c7;
  --success-color: #16a34a;
  --danger-color:  #dc2626;
  --warning-color: #d97706;
  --gold:          #b8860b;
  --gold-muted:    rgba(184, 134, 11, 0.15);
  --glass-bg:      rgba(255, 255, 255, 0.92);
  --glass-border:  rgba(184, 134, 11, 0.22);
  --glass-shadow:  0 10px 30px rgba(15, 23, 42, 0.06);
  --card-shadow:   0 4px 20px rgba(15, 23, 42, 0.07);
  --top-bar-bg:    #fffdf5;
  --header-bg:     rgba(255, 255, 255, 0.94);
  --nav-link-color:#1e293b;
  --input-bg:      #ffffff;
  --dropdown-bg:   #ffffff;
  --table-head-bg: #f8fafc;
  --table-hover:   #f1f5f9;
  --chat-window-bg:#ffffff;
  --chat-bot-msg:  #f1f5f9;
  --chat-user-msg: rgba(184, 134, 11, 0.15);
  --chat-bot-text: #0f172a;
  --chat-user-text:#0f172a;
  --footer-bg:     #0a0f18;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100vw;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Cairo', 'Inter', 'Noto Sans Devanagari', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100vw;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}


html[lang="hi"] body { font-family: 'Noto Sans Devanagari', 'Inter', sans-serif; }
html[lang="zh"] body { font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Inter', sans-serif; }

html[dir="rtl"] { direction: rtl; }
html[dir="ltr"] { direction: ltr; }

/* Dashboard layout additions */
.global-dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 80px;
}
.global-sidebar {
  width: 280px;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  position: fixed;
  top: 80px;
  bottom: 0;
  overflow-y: auto;
  z-index: 2500;
  pointer-events: auto;
  padding: 20px 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
html[dir="ltr"] .global-sidebar { left: 0; right: auto; border-left: none; }
html[dir="rtl"] .global-sidebar { right: 0; left: auto; border-right: none; }

/* ─── Robust Sidebar Click Delegation & Hitbox (Click on any word/letter/icon) ── */
.global-sidebar a,
.global-sidebar button,
.global-sidebar .dashboard-tab,
.global-sidebar .sidebar-group-header {
  width: 100% !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 2 !important;
}

/* Clicking any word, letter, icon, emoji, or badge directly targets the parent clickable container */
.global-sidebar .dashboard-tab *,
.global-sidebar .sidebar-group-header *,
.global-sidebar button:not(.sidebar-mobile-header button) * {
  pointer-events: none !important;
}

/* Stable touch feedback without displacement under the finger */
.global-sidebar .dashboard-tab:active,
.global-sidebar .sidebar-group-header:active,
.global-sidebar button:active {
  transform: none !important;
  opacity: 0.88;
}

@media (min-width: 993px) {
  .sidebar-backdrop {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

.global-main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 30px;
}
html[dir="ltr"] .global-main { margin-left: 280px; }
html[dir="rtl"] .global-main { margin-right: 280px; }


a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

img { max-width: 100%; display: block; }

/* ─── Glassmorphism ──────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ─── Gold Gradient Text ─────────────────────────────────────────────────────── */
.text-gold-gradient {
  background: linear-gradient(to right, #d4af37, #f3e5ab);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gold { color: var(--primary-color); }
.text-muted { color: var(--text-muted); }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background-color: var(--primary-color);
  color: #000;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background-color: transparent;
  color: var(--primary-color);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  border: 1.5px solid var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-outline:hover { background-color: var(--primary-color); color: #000; }

.btn-danger {
  background-color: var(--danger-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: opacity 0.3s;
}
.btn-danger:hover { opacity: 0.8; }

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 10px;
  background: #25d366;
  color: #fff;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-whatsapp:hover { background: #128c4a; transform: translateY(-2px); }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }

/* ─── Top Welcome / Announcement Bar ─────────────────────────────────────────── */
.top-welcome-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: #060a10;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  z-index: 1002;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ─── Header / Navigation ────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: top 0.3s ease, box-shadow 0.3s ease;
}

body.has-welcome-bar .header,
body.has-operational-bar .header {
  top: 38px;
}

body.has-welcome-bar .global-dashboard-layout,
body.has-operational-bar .global-dashboard-layout {
  padding-top: 118px;
}

body.has-welcome-bar .global-sidebar,
body.has-operational-bar .global-sidebar {
  top: 118px;
}

/* ─── Top Operational Bar (Live Local Clock & Office Hours) ─────────────────── */
.top-operational-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 38px;
  background: linear-gradient(90deg, #040810 0%, #0b1526 50%, #040810 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  z-index: 1002;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  font-family: 'Cairo', sans-serif;
  font-size: 0.82rem;
  line-height: 38px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.4;
}

.badge-status.open {
  background: rgba(63, 185, 80, 0.16);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.35);
}

.badge-status.closed {
  background: rgba(248, 81, 73, 0.16);
  color: #ff7b72;
  border: 1px solid rgba(248, 81, 73, 0.35);
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 8px #3fb950;
  animation: pulse-dot 1.8s infinite;
  display: inline-block;
}

@keyframes pulse-dot {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

/* ─── Top Operational Bar: Always-Visible App Download Button ─── */
.top-app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d4af37 0%, #fbe8a6 50%, #c5a059 100%);
  color: #040810 !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}

.top-app-download-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.65);
  background: linear-gradient(135deg, #f3e5ab 0%, #d4af37 100%);
  color: #000 !important;
}

.top-app-download-btn:active {
  transform: scale(0.96);
}

.top-app-download-btn .btn-app-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.top-app-download-btn .btn-app-text {
  letter-spacing: -0.2px;
}

/* ─── Top Operational Bar Marquee Ticker ───────────────────────────────────── */
.top-bar-ticker-container {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  max-width: 340px;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%);
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.top-bar-ticker-container:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.05);
}

.top-bar-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: topBarTickerMove 22s linear infinite;
  will-change: transform;
}

.top-bar-ticker-container:hover .top-bar-ticker-track {
  animation-play-state: paused;
}

.top-bar-ticker-half {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.top-bar-ticker-item {
  color: #f1f5f9;
  font-size: 0.79rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.top-bar-ticker-sep {
  color: #d4af37;
  font-size: 0.75rem;
  margin: 0 16px;
  opacity: 0.85;
}

.ticker-speaker {
  display: inline-block;
  font-size: 0.95rem;
  animation: speakerPulse 2.5s ease-in-out infinite;
}

@keyframes speakerPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  10% { transform: scale(1.22) rotate(-8deg); }
  20% { transform: scale(1.12) rotate(8deg); }
  30% { transform: scale(1.18) rotate(-4deg); }
  40% { transform: scale(1) rotate(0deg); }
}

@keyframes topBarTickerMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

[dir="rtl"] .top-bar-ticker-track {
  animation: topBarTickerMoveRTL 22s linear infinite;
}

@keyframes topBarTickerMoveRTL {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

@media (max-width: 900px) {
  .hide-mobile {
    display: none !important;
  }
  .top-operational-bar .container {
    padding: 0 10px !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .top-operational-bar .container {
    padding: 0 6px !important;
    gap: 5px !important;
  }
  .top-operational-bar #top-cairo-clock {
    font-size: 0.8rem !important;
  }
  .top-operational-bar .badge-status {
    padding: 2px 7px !important;
    font-size: 0.72rem !important;
  }
}

.logo { height: 50px; width: auto; }

.main-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
  display: none !important; /* Replaced by Luxury Capsule Menu Drawer for uncluttered sovereign layout */
}
.main-nav a, .main-nav button {
  font-weight: 600;
  font-size: 0.88rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s ease;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav button:hover {
  color: var(--primary-color);
  background: rgba(212, 175, 55, 0.08);
}

/* ─── Luxury Header Nav Marquee Ticker (الرسالة المتحركة بين الشعار والقائمة) ─── */
.header-nav-ticker-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  max-width: 860px;
  margin: 0 16px;
  height: 42px;
  background: linear-gradient(135deg, rgba(7, 14, 25, 0.88) 0%, rgba(13, 23, 40, 0.95) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.38);
  border-radius: 9999px;
  padding: 3px 14px 3px 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .header-nav-ticker-wrapper {
  padding: 3px 6px 3px 14px;
}

.header-nav-ticker-wrapper:hover {
  border-color: rgba(212, 175, 55, 0.75);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.28), 0 0 16px rgba(212, 175, 55, 0.18);
  background: linear-gradient(135deg, rgba(10, 18, 32, 0.96) 0%, rgba(18, 30, 52, 0.98) 100%);
}

.header-nav-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28) 0%, rgba(184, 134, 11, 0.18) 100%);
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #fbe8a6;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-nav-ticker-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
}

.header-nav-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: headerTickerMove 25s linear infinite;
  will-change: transform;
}

.header-nav-ticker-wrapper:hover .header-nav-ticker-track {
  animation-play-state: paused;
}

.header-nav-ticker-half {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.header-nav-ticker-item {
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.header-nav-ticker-sep {
  color: #d4af37;
  font-size: 0.85rem;
  margin: 0 24px;
  opacity: 0.85;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

@keyframes headerTickerMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

[dir="rtl"] .header-nav-ticker-track {
  animation: headerTickerMoveRTL 25s linear infinite;
}

@keyframes headerTickerMoveRTL {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

@media (max-width: 768px) {
  .header-nav-ticker-wrapper {
    margin: 0 8px;
    height: 38px;
  }
  .header-nav-ticker-badge {
    padding: 3px 8px;
    font-size: 0.72rem;
  }
  .header-nav-ticker-item {
    font-size: 0.82rem;
  }
}

@media (max-width: 520px) {
  .ticker-badge-text {
    display: none;
  }
  .header-nav-ticker-badge {
    padding: 2px 7px;
  }
}

/* ─── Ultra-Modern Eye-Catching Capsule Menu Button (القائمة) ─── */
.mobile-menu-btn {
  display: inline-flex !important;
  position: relative;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(13, 22, 38, 0.95) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  color: #fff;
  cursor: pointer;
  padding: 7px 16px 7px 14px;
  border-radius: 9999px; /* Luxury Capsule */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 1005;
  height: 42px;
  min-width: 95px;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: alfarouqMenuPulse 3.5s infinite ease-in-out;
}

/* Subtle Breathing Glow (جاذب للانتباه) */
@keyframes alfarouqMenuPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.28), 0 3px 12px rgba(0, 0, 0, 0.45);
    border-color: rgba(212, 175, 55, 0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.65), 0 0 32px rgba(212, 175, 55, 0.2), 0 4px 16px rgba(0, 0, 0, 0.6);
    border-color: rgba(254, 240, 138, 0.85);
  }
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28) 0%, rgba(20, 32, 54, 0.98) 100%);
  border-color: #fef08a;
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.75), 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Inner 3-Bar Hamburger Container */
.mobile-menu-btn .hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 20px;
  height: 15px;
  position: relative;
}

/* The 3 Golden Bars with Staggered Modern Lines */
.mobile-menu-btn .hamburger-bar {
  display: block;
  height: 2.5px;
  background: linear-gradient(90deg, #fef08a, #d4af37 60%, #b45309 100%);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              width 0.25s ease,
              background 0.3s ease;
  pointer-events: none;
}

.mobile-menu-btn .hamburger-bar.bar-1 {
  width: 20px;
}
.mobile-menu-btn .hamburger-bar.bar-2 {
  width: 14px;
}
.mobile-menu-btn .hamburger-bar.bar-3 {
  width: 18px;
}

/* Chic Typography Label */
.mobile-menu-btn .mobile-menu-text {
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 40%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* ─── Active / Opened State (Morphing to Close ✕) ─── */
.mobile-menu-btn.is-active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(20, 10, 15, 0.96) 100%);
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 4px 14px rgba(0, 0, 0, 0.6);
  animation: none;
}
.mobile-menu-btn.is-active .hamburger-box {
  align-items: center;
}
.mobile-menu-btn.is-active .hamburger-bar {
  background: linear-gradient(90deg, #fecaca, #ef4444);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  width: 18px !important;
}
.mobile-menu-btn.is-active .hamburger-bar.bar-1 {
  transform: translateY(6.25px) rotate(45deg);
}
.mobile-menu-btn.is-active .hamburger-bar.bar-2 {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.is-active .hamburger-bar.bar-3 {
  transform: translateY(-6.25px) rotate(-45deg);
}
.mobile-menu-btn.is-active .mobile-menu-text {
  background: linear-gradient(135deg, #ffffff 0%, #fca5a5 50%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header.nav-open {
  z-index: 999999 !important;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 40px;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: calc(100vh - 75px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(6, 12, 22, 0.985) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 2px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95);
  z-index: 999999 !important;
}
.mobile-nav.open {
  display: flex !important;
  animation: mobileNavReveal 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.mobile-nav a, .mobile-nav button {
  font-size: 1.02rem;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  text-align: right;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav a:hover, .mobile-nav a:active,
.mobile-nav button:hover, .mobile-nav button:active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  transform: translateX(-3px);
}

#services, #team, #articles, #why, #track-record-section {
  scroll-margin-top: 110px;
}

@media (max-width: 1180px) {
  .main-nav { display: none !important; }
  .mobile-menu-btn { display: inline-flex !important; }
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: 150px 0 100px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at center, rgba(31,111,235,0.06) 0%, transparent 70%);
}
.hero-title { font-size: 3.5rem; margin-bottom: 20px; font-weight: 900; }
.hero-subtitle { font-size: 1.4rem; color: var(--text-muted); max-width: 800px; margin: 0 auto 40px; }
.cta-group { display: flex; gap: 20px; justify-content: center; margin-bottom: 60px; flex-wrap: wrap; }

/* ─── Stats Bar ──────────────────────────────────────────────────────────────── */
.stats-bar { background-color: var(--surface-color); padding: 40px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; text-align: center; }
.stat-number { font-size: 2.8rem; font-weight: 900; margin-bottom: 8px; }
.stat-label { font-size: 1rem; color: var(--text-muted); }

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; font-weight: 900; }
.services-section, .team-section { padding: 80px 0; }
.services-grid, .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.service-card, .team-card {
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--border-color);
}
.service-card:hover, .team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.5);
}
.service-card h3, .team-card h3 { font-size: 1.4rem; margin-bottom: 12px; color: var(--primary-color); }
.team-card .role { font-size: 1.1rem; font-weight: bold; margin-bottom: 10px; color: var(--primary-color); }
.service-card-link { text-decoration: none; color: inherit; display: block; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer h3 { font-size: 1.3rem; margin-bottom: 20px; }
.footer p { color: var(--text-muted); margin-bottom: 10px; }
.footer-bottom { padding-top: 30px; border-top: 1px solid var(--border-color); color: var(--text-muted); text-align: center; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  direction: rtl;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
select.form-input { appearance: auto; }
textarea.form-input { resize: vertical; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }

/* ─── Alert / Flash Messages ─────────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}
.alert-success { background: rgba(63, 185, 80, 0.15); border: 1px solid var(--success-color); color: var(--success-color); }
.alert-error   { background: rgba(248, 81, 73, 0.15);  border: 1px solid var(--danger-color);  color: var(--danger-color); }
.alert-warning { background: rgba(210, 153, 34, 0.15); border: 1px solid var(--warning-color); color: var(--warning-color); }
.alert-info    { background: rgba(31, 111, 235, 0.15); border: 1px solid var(--accent-color);  color: var(--accent-color); }

/* ─── Status Badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}
.badge-blue    { background: rgba(31,111,235,0.2);  color: #58a6ff; }
.badge-gold    { background: rgba(212,175,55,0.2);  color: var(--primary-color); border: 1px solid var(--primary-color); }
.badge-green   { background: rgba(63,185,80,0.2);   color: var(--success-color); }
.badge-red     { background: rgba(248,81,73,0.2);   color: var(--danger-color); }
.badge-gray    { background: rgba(139,148,158,0.2); color: var(--text-muted); }

/* ─── Dashboard Layout ───────────────────────────────────────────────────────── */
.dashboard-wrapper { display: flex; gap: 30px; padding: 40px 20px; min-height: calc(100vh - 80px); }

.dashboard-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  background: transparent;
  color: var(--text-main);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
  text-align: right;
  text-decoration: none;
  width: 100%;
}
.dashboard-tab:hover { background: rgba(255,255,255,0.06); }
.dashboard-tab.active {
  background: var(--surface-color);
  border-color: var(--border-color);
  color: var(--primary-color);
  border-right: 4px solid var(--primary-color);
}

.dashboard-content {
  flex: 1;
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 30px;
}

/* ─── Table Styles & Universal Overflow Protection ─────────────────────────── */
.table-responsive,
.data-table-container,
div:has(> .data-table),
.glass:has(> .data-table),
div:has(> #cases-table),
div:has(> #staff-table),
div:has(> #clients-table) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) rgba(0, 0, 0, 0.25);
}
.table-responsive::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
div:has(> .data-table)::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track,
.data-table-container::-webkit-scrollbar-track,
div:has(> .data-table)::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb,
.data-table-container::-webkit-scrollbar-thumb,
div:has(> .data-table)::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.5);
  border-radius: 4px;
}

.data-table { 
  width: 100%; 
  border-collapse: collapse; 
  text-align: right; 
  font-variant-numeric: tabular-nums;
}
.data-table thead tr { background: rgba(255,255,255,0.05); border-bottom: 1px solid var(--border-color); }
.data-table th, .data-table td { padding: 12px 16px; white-space: nowrap; }
.data-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.2s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }


/* ─── Cards (Admin Case Cards) ──────────────────────────────────────────────── */
.case-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }

.case-card {
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }

/* ─── Accordion ──────────────────────────────────────────────────────────────── */
.accordion-item { border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  text-align: right;
}
.accordion-header:hover { background: rgba(255,255,255,0.03); }
.accordion-content {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.accordion-content.open { display: block; }
.accordion-chevron { transition: transform 0.3s; font-size: 1.2rem; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

/* ─── Chatbot ────────────────────────────────────────────────────────────────── */
/* ─── Unified Floating Left Dock (Intake & Emergency) ────────────────────── */
.alfarouq-floating-dock-left {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  pointer-events: none;
}
html[dir="ltr"] .alfarouq-floating-dock-left {
  left: auto;
  right: 25px;
}
.alfarouq-floating-dock-left > * {
  pointer-events: auto;
}

.floating-dock-pill {
  border-radius: 50px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
  line-height: 1;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}

/* 1. Case Intake (Gold) */
.floating-dock-pill.intake-pill {
  background: linear-gradient(135deg, #d4af37 0%, #f3e5ab 100%);
  color: #05080c !important;
  border: 1.5px solid #fff;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}
.floating-dock-pill.intake-pill:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.65);
}

/* 2. Emergency 24/7 (Red) */
.floating-dock-pill.emergency-pill {
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  color: #fff !important;
  border: 1.5px solid #fca5a5;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.45), 0 0 15px rgba(239, 68, 68, 0.3);
}
.floating-dock-pill.emergency-pill:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.7), 0 0 20px rgba(239, 68, 68, 0.4);
}

.siren-pulse {
  display: inline-block;
  animation: sirenPulse 1.5s infinite;
}
@keyframes sirenPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ─── Chatbot ────────────────────────────────────────────────────────────────── */
#chatbot-toggle {
  position: fixed;
  bottom: 165px;
  right: 25px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #000;
  font-size: 1.6rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  z-index: 1001;
  transition: transform 0.3s ease;
}
#chatbot-toggle:hover { transform: scale(1.1); }

#chatbot-window {
  position: fixed;
  bottom: 85px;
  right: 25px;
  left: auto;
  width: 330px;
  height: 460px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#chatbot-window.open { display: flex; }

.chatbot-header {
  background: var(--primary-color);
  padding: 14px 18px;
  color: #000;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header button { background: transparent; border: none; color: #000; cursor: pointer; font-size: 1.1rem; }

.chatbot-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 88%;
  font-size: 0.92rem;
  line-height: 1.4;
}
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border-bottom-left-radius: 0;
}
.chat-msg.user {
  align-self: flex-end;
  background: rgba(212, 175, 55, 0.2);
  border-bottom-right-radius: 0;
}

.chatbot-input-row {
  display: flex;
  border-top: 1px solid var(--border-color);
  padding: 10px;
  gap: 8px;
}
.chatbot-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  direction: rtl;
}
.chatbot-input-row button { background: transparent; border: none; color: var(--primary-color); cursor: pointer; font-size: 1.2rem; }

/* ─── WhatsApp FAB ───────────────────────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.8rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: transform 0.3s ease;
  text-decoration: none;
}
.whatsapp-fab:hover { transform: scale(1.1); }

.phone-fab {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #111;
  font-size: 1.8rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(200, 168, 75, 0.4);
  z-index: 999;
  transition: transform 0.3s ease;
  text-decoration: none;
}
.phone-fab:hover { transform: scale(1.1); }

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal-box {
  width: 90vw;
  max-width: 520px;
  padding: 32px;
  border-radius: 14px;
  position: relative;
  animation: fadeUp 0.3s ease;
}
.modal-close { position: absolute; top: 14px; right: 14px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; }
.modal-close:hover { color: var(--text-main); }

/* ─── Page headers ───────────────────────────────────────────────────────────── */
.page-header {
  padding-top: 120px;
  padding-bottom: 60px;
  min-height: 100vh;
}
.page-hero {
  text-align: center;
  margin-bottom: 50px;
}
.page-hero h1 { font-size: 2.6rem; font-weight: 900; margin-bottom: 15px; }
.page-hero p  { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up   { animation: fadeUp  0.6s ease both; }
.fade-in   { animation: fadeIn  0.5s ease both; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* ═════════════════════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM (Mobile, Tablet, Desktop)
   ═════════════════════════════════════════════════════════════════════════════ */

/* ─── Base Fluid Utilities ─────────────────────────────────────────────────── */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ─── 1. Laptops & High-DPI Displays (min-width: 993px and max-width: 1440px) ── */
@media (min-width: 993px) and (max-width: 1440px) {
  .global-sidebar {
    width: 250px;
  }
  html[dir="rtl"] .global-main {
    margin-right: 250px;
    padding: 22px 20px;
  }
  html[dir="ltr"] .global-main {
    margin-left: 250px;
    padding: 22px 20px;
  }
  .main-nav {
    gap: 8px;
  }
  .main-nav a, .main-nav button {
    font-size: 0.82rem;
    padding: 4px 6px;
  }
  .hide-laptop {
    display: none !important;
  }
  .top-operational-bar .top-bar-ticker-container {
    max-width: 260px;
  }
  .case-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }
}

/* ─── 2. Compact Laptops & Small Desktops (max-width: 1250px) ─────────────────── */
@media (max-width: 1250px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }
  .main-nav {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .hide-laptop-nav {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .mobile-menu-btn {
    padding: 6px 12px 6px 10px;
    height: 38px;
    min-width: 82px;
    gap: 7px;
  }
  .mobile-menu-btn .mobile-menu-text {
    font-size: 0.82rem;
  }
  .mobile-menu-btn .hamburger-box {
    width: 18px;
    height: 14px;
  }
}

/* ─── 3. Tablets in Landscape & Smaller Laptops (max-width: 992px) ──────────── */
@media (max-width: 992px) {
  .hero {
    padding: 120px 0 55px !important;
    min-height: auto !important;
  }
  .page-header {
    padding-top: 110px !important;
    padding-bottom: 45px !important;
    min-height: auto !important;
  }
  .top-operational-bar .top-bar-ticker-container {
    max-width: 220px;
  }

  .hero-grid-container {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center !important;
    padding: 40px 20px 80px 20px !important;
  }
  .hero-grid-container > div:first-child {
    order: 2;
  }
  .hero-grid-container > div:last-child {
    order: 1;
    text-align: center !important;
  }
  .hero-grid-container > div:last-child > div[style*="justify-content"] {
    justify-content: center !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  .services-grid, .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 20px !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
  }

  .dashboard-wrapper {
    flex-direction: column;
    padding: 20px 15px;
  }
  .dashboard-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .dashboard-tab {
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
  }

  /* Admin & Global Layout: Enterprise Off-Canvas Drawer */
  .global-dashboard-layout {
    flex-direction: column;
    padding-top: 70px;
  }
  body.has-welcome-bar .global-dashboard-layout,
  body.has-operational-bar .global-dashboard-layout {
    padding-top: 106px;
  }

  .global-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -330px !important;
    width: 310px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 10050 !important;
    background: rgba(9, 15, 25, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.9);
    border-left: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px 16px !important;
  }
  html[dir="ltr"] .global-sidebar {
    right: auto !important;
    left: -330px !important;
    border-right: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-left: none !important;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .global-sidebar.sidebar-open {
    right: 0 !important;
  }
  html[dir="ltr"] .global-sidebar.sidebar-open {
    left: 0 !important;
  }

  /* Off-canvas Backdrop Overlay */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-mobile-header {
    display: flex !important;
  }

  /* Electronic Control Panels: Mobile Drawer Trigger Bar */
  .dashboard-mobile-nav-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(9, 19, 34, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  }
  .btn-dashboard-drawer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.22);
    border: 1px solid var(--gold);
    color: #f5d77f;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-dashboard-drawer:hover {
    background: rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
  }
  .btn-dashboard-spotlight-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .global-main {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 20px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* ─── 4. Tablets in Portrait & Large Phones (max-width: 768px) ──────────────── */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip;
    max-width: 100vw;
  }

  .container {
    padding: 0 16px;
  }

  /* Headings fluid scaling */
  .hero-title, h1, .page-hero h1 {
    font-size: 1.95rem !important;
    line-height: 1.3 !important;
  }
  .hero-subtitle, .page-hero p {
    font-size: 1.0rem !important;
    margin-bottom: 25px !important;
  }
  .section-title, h2 {
    font-size: 1.55rem !important;
    margin-bottom: 25px !important;
  }

  /* Hero & Page Header spacing on mobile */
  .hero {
    padding: 100px 0 40px !important;
    min-height: auto !important;
  }
  .page-header {
    padding-top: 100px !important;
    padding-bottom: 40px !important;
    min-height: auto !important;
  }
  .page-hero {
    margin-bottom: 28px !important;
  }
  .top-bar-ticker-container {
    display: none !important;
  }

  /* Universal Grid Auto-Collapse on Mobile & Tablet */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 2fr"],
  div[style*="grid-template-columns: 1fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns:1.5fr 1fr"],
  div[style*="grid-template-columns: 1.5fr 1fr"],
  div[style*="grid-template-columns:1.2fr 0.8fr"],
  div[style*="grid-template-columns: 1.2fr 0.8fr"],
  div[style*="grid-template-columns:1.1fr 1.4fr"],
  div[style*="grid-template-columns: 1.1fr 1.4fr"],
  div[style*="grid-template-columns:1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns:1fr 1.6fr"],
  div[style*="grid-template-columns: 1fr 1.6fr"],
  div[style*="grid-template-columns:2fr 1.5fr 1fr 1fr"],
  div[style*="grid-template-columns: 2fr 1.5fr 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
  .case-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Specific card minmax containers */
  div[style*="minmax(280px"],
  div[style*="minmax(300px"],
  div[style*="minmax(320px"],
  div[style*="minmax(340px"],
  div[style*="minmax(350px"],
  div[style*="minmax(360px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Form & Card Paddings */
  .booking-form-card,
  .glass-panel,
  .glass[style*="padding:50px"],
  .glass[style*="padding: 50px"],
  .glass[style*="padding:42px"],
  .glass[style*="padding: 42px"],
  .glass[style*="padding:40px"],
  .glass[style*="padding: 40px"],
  .glass[style*="padding:35px"],
  .glass[style*="padding: 35px"] {
    padding: 20px 14px !important;
    border-radius: 14px !important;
  }

  /* Calculator panels on Mobile */
  .calc-panel {
    flex-direction: column !important;
  }
  .calc-panel > .glass {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    padding: 18px 14px !important;
  }
  .calc-tab-btn {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
  }

  /* Floating badge inside hero image */
  .floating-badge {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin: 15px auto 0 auto !important;
    display: inline-flex !important;
    transform: none !important;
  }

  /* Floating Action Dock (Left) on Mobile */
  .alfarouq-floating-dock-left {
    bottom: 14px !important;
    left: 12px !important;
    gap: 8px !important;
    max-width: calc(100vw - 80px) !important;
  }
  html[dir="ltr"] .alfarouq-floating-dock-left {
    right: auto !important;
    left: 12px !important;
  }
  .floating-dock-pill {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }
  .floating-dock-pill .pill-text {
    font-size: 0.76rem !important;
  }

  /* Mobile floating action buttons (Right) */
  #chatbot-toggle {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
    bottom: 120px !important;
    right: 14px !important;
    left: auto !important;
  }
  #chatbot-window {
    width: calc(100vw - 28px) !important;
    max-width: 360px !important;
    right: 14px !important;
    left: auto !important;
    bottom: 74px !important;
    height: 60vh !important;
  }
  .whatsapp-fab {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.3rem !important;
    bottom: 14px !important;
    right: 14px !important;
  }
  .phone-fab {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.3rem !important;
    bottom: 66px !important;
    right: 14px !important;
  }

  /* Modals on Mobile */
  .modal-box {
    width: 95vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 22px 14px !important;
  }

  /* Form Inputs (Ensuring iOS 16px font-size to stop auto-zoom) */
  .form-input, select.form-input, textarea.form-input, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"] {
    font-size: 16px !important;
  }
}


/* ─── 5. Standard Mobile Phones (max-width: 576px) ──────────────────────────── */
@media (max-width: 576px) {
  .top-welcome-bar {
    height: 32px;
  }
  body.has-welcome-bar .header {
    top: 32px;
  }
  .top-welcome-bar .container {
    padding: 0 10px !important;
  }
  .ticker-badge {
    display: none !important;
  }

  .hero {
    padding: 85px 0 25px !important;
  }
  .page-header {
    padding-top: 85px !important;
    padding-bottom: 25px !important;
  }

  .cta-group {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .cta-group a, .cta-group button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .stat-number {
    font-size: 2.2rem !important;
  }
  .stat-label {
    font-size: 0.9rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
    text-align: center;
  }

  .footer-bottom {
    font-size: 0.85rem;
    padding-top: 20px;
  }
}

/* ─── 6. Compact Mobile Phones (max-width: 380px) ───────────────────────────── */
@media (max-width: 380px) {
  .container {
    padding: 0 10px !important;
  }
  .hero-title, h1, .page-hero h1 {
    font-size: 1.65rem !important;
  }
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .btn, .btn-primary, .btn-secondary, button {
    font-size: 0.88rem !important;
  }
}

/* ─── WORLD-CLASS VISUAL UPGRADES ────────────────────────────────────────────── */
/* Floating badge animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
.floating-badge {
  position: absolute;
  top: -20px;
  right: -20px;
  background: rgba(11, 17, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 10;
  animation: float 4s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Spotlight Hover Effect */
.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: all 0.4s ease;
  background: var(--surface-color);
  border: 1px solid rgba(212,175,55,0.15);
}
.spotlight-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212,175,55,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover { transform: translateY(-5px); border-color: rgba(212,175,55,0.4); box-shadow: 0 15px 35px rgba(0,0,0,0.5); }

/* Animated Gold Border Draw */
.draw-border {
  position: relative;
}
.draw-border::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--primary-color);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.draw-border:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* 3D Parallax Image */
.parallax-img-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}
.parallax-img {
  transition: transform 0.1s;
  transform: rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg));
}

/* ═════════════════════════════════════════════════════════════════════════════
   DAY MODE & DYNAMIC THEME SYSTEM (الوضع النهاري ونظام التبديل المتكامل)
   ═════════════════════════════════════════════════════════════════════════════ */

/* ─── Theme Switcher Button ─────────────────────────────────────────────────── */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--primary-color);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  outline: none;
}
.theme-switch-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}
.theme-switch-btn .theme-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-switch-btn:hover .theme-icon {
  transform: rotate(25deg) scale(1.2);
}

/* Theme switch in Mobile Nav */
.mobile-theme-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.mobile-theme-item:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--primary-color);
}
.mobile-theme-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--gold-gradient);
  color: #05080c;
}

/* ─── Day Mode (Light) Overrides for All Components ─────────────────────────── */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Gold Gradient Text tuned for maximum readability against light backgrounds */
html[data-theme="light"] .text-gold-gradient {
  background: linear-gradient(135deg, #8c6707 0%, #b8860b 50%, #6f4e00 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Header & Announcement Bar */
html[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid rgba(184, 134, 11, 0.2) !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
}
html[data-theme="light"] .main-nav a,
html[data-theme="light"] .main-nav button {
  color: #1e293b !important;
}
html[data-theme="light"] .main-nav a:hover,
html[data-theme="light"] .main-nav button:hover {
  color: #b8860b !important;
  background: rgba(184, 134, 11, 0.08) !important;
}
html[data-theme="light"] .top-welcome-bar {
  background: #fffdf5 !important;
  border-bottom: 1px solid rgba(184, 134, 11, 0.25) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}
html[data-theme="light"] .top-welcome-bar marquee {
  color: #1e293b !important;
}

/* Language Dropdown */
html[data-theme="light"] .lang-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid rgba(184, 134, 11, 0.25) !important;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.12) !important;
}
html[data-theme="light"] .lang-dropdown-menu a {
  color: #334155 !important;
}
html[data-theme="light"] .lang-dropdown-menu a:hover {
  background: rgba(184, 134, 11, 0.08) !important;
  color: #b8860b !important;
}

/* Mobile Drawer Nav */
html[data-theme="light"] .mobile-nav {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 2px solid var(--primary-color) !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15) !important;
}
html[data-theme="light"] .mobile-nav a,
html[data-theme="light"] .mobile-nav button {
  color: #0f172a !important;
}
html[data-theme="light"] .mobile-nav a:hover,
html[data-theme="light"] .mobile-nav a:active {
  background: rgba(184, 134, 11, 0.1) !important;
  color: #b8860b !important;
}

/* Glass Panels & Containers */
html[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(184, 134, 11, 0.2) !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06) !important;
}

/* Cards & Spotlight */
html[data-theme="light"] .service-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .case-card,
html[data-theme="light"] .spotlight-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] .service-card:hover,
html[data-theme="light"] .team-card:hover,
html[data-theme="light"] .case-card:hover,
html[data-theme="light"] .spotlight-card:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(184, 134, 11, 0.5) !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12) !important;
}
html[data-theme="light"] .floating-badge {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(184, 134, 11, 0.35) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .stats-bar {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html[data-theme="light"] .hero {
  background: radial-gradient(circle at center, rgba(184, 134, 11, 0.08) 0%, transparent 70%) !important;
}

/* Forms & Inputs */
html[data-theme="light"] .form-input,
html[data-theme="light"] select.form-input,
html[data-theme="light"] textarea.form-input,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="search"] {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
html[data-theme="light"] .form-input:focus,
html[data-theme="light"] select.form-input:focus,
html[data-theme="light"] textarea.form-input:focus,
html[data-theme="light"] input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.18) !important;
}
html[data-theme="light"] .form-group label {
  color: #1e293b !important;
}
html[data-theme="light"] ::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* Data Tables */
html[data-theme="light"] .data-table thead tr {
  background: #f1f5f9 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
html[data-theme="light"] .data-table th {
  color: #0f172a !important;
  font-weight: 700 !important;
}
html[data-theme="light"] .data-table tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}
html[data-theme="light"] .data-table tbody tr:hover {
  background: #f8fafc !important;
}

/* Modals & Accordions */
html[data-theme="light"] .modal-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
}
html[data-theme="light"] .modal-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .modal-close {
  color: #64748b !important;
}
html[data-theme="light"] .modal-close:hover {
  color: #0f172a !important;
}
html[data-theme="light"] .accordion-header {
  color: #0f172a !important;
}
html[data-theme="light"] .accordion-header:hover {
  background: #f1f5f9 !important;
}
html[data-theme="light"] .accordion-content {
  border-top-color: #e2e8f0 !important;
  color: #334155 !important;
}

/* Chatbot Window */
html[data-theme="light"] #chatbot-window {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.15) !important;
}
html[data-theme="light"] .chat-msg.bot {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-theme="light"] .chat-msg.user {
  background: rgba(184, 134, 11, 0.15) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .chatbot-input-row {
  border-top-color: #e2e8f0 !important;
  background: #ffffff !important;
}
html[data-theme="light"] .chatbot-input-row input {
  color: #0f172a !important;
}

/* Dashboard Layout (Admin & Portal) */
html[data-theme="light"] .global-sidebar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 2px 0 15px rgba(15, 23, 42, 0.03) !important;
}
html[data-theme="light"] .dashboard-tab {
  color: #334155 !important;
}
html[data-theme="light"] .dashboard-tab:hover {
  background: #f1f5f9 !important;
  color: var(--primary-color) !important;
}
html[data-theme="light"] .dashboard-tab.active {
  background: #fffdf5 !important;
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}
html[data-theme="light"] .dashboard-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
}

/* Status Badges */
html[data-theme="light"] .badge-blue  { background: rgba(2, 132, 199, 0.12) !important; color: #0369a1 !important; }
html[data-theme="light"] .badge-gold  { background: rgba(184, 134, 11, 0.12) !important; color: #8c6707 !important; border-color: rgba(184, 134, 11, 0.4) !important; }
html[data-theme="light"] .badge-green { background: rgba(22, 163, 74, 0.12) !important; color: #15803d !important; }
html[data-theme="light"] .badge-red   { background: rgba(220, 38, 38, 0.12) !important; color: #b91c1c !important; }
html[data-theme="light"] .badge-gray  { background: rgba(100, 116, 139, 0.12) !important; color: #475569 !important; }

/* Scrollbars in Day Mode */
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Footer CTA Banner in Day Mode */
html[data-theme="light"] .footer-cta-banner {
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%) !important;
  border-bottom-color: rgba(184, 134, 11, 0.2) !important;
}
html[data-theme="light"] .footer-cta-banner h2 {
  color: #0f172a !important;
  text-shadow: none !important;
}
html[data-theme="light"] .footer-cta-banner p {
  color: #475569 !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   2026 LEGAL-TECH ICON & EMOJI RESILIENCE STACK & ULTRA-LUXURY RESPONSIVENESS
   ══════════════════════════════════════════════════════════════════════════ */

/* Universal resilient icon & emoji font stack across all modern OS & mobile devices */
.dock-icon,
.hub-item-icon,
.dashboard-tab span:first-child,
.role-badge,
.portal-card-icon,
.welcome-hero-card span:first-child,
.quick-action-btn span,
.status-pill i,
.status-pill span,
.alfarouq-mq-item .dot,
.live-clock-badge span,
.lawyer-badge-pill span {
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', -apple-system, BlinkMacSystemFont, sans-serif;
  font-display: swap;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

i.fa-solid, i.fas, i.fa-brands, i.fab, i.fa-regular, i.far {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

/* Universal Welcome Hero Card (Lawyer, Secretary, Accountant, Admin) */
.welcome-hero-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.welcome-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.8) 50%, transparent 100%);
  pointer-events: none;
}

.welcome-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6) !important;
}

/* Responsive Scaling for Welcome Headers and Messages across Mobile & Tablets */
@media (max-width: 991px) {
  .welcome-hero-card {
    padding: 22px 20px !important;
  }
  .welcome-hero-card h1 {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .welcome-hero-card {
    padding: 18px 16px !important;
    border-radius: 14px !important;
  }
  .welcome-hero-card h1 {
    font-size: 1.3rem !important;
    line-height: 1.35 !important;
  }
  .welcome-hero-card p {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
  }
  .welcome-hero-card .quick-action-buttons,
  .welcome-hero-card > div > div:last-child {
    width: 100%;
    margin-top: 12px;
  }
  .welcome-hero-card button,
  .welcome-hero-card a.btn-primary,
  .welcome-hero-card a.btn-outline {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    text-align: center;
    font-size: 0.82rem !important;
    padding: 9px 12px !important;
  }
}

@media (max-width: 480px) {
  .welcome-hero-card button,
  .welcome-hero-card a.btn-primary,
  .welcome-hero-card a.btn-outline {
    flex: 1 1 100% !important;
  }
}



