/* Theme overrides for light and dark modes */

/* light mode inherits existing variables so no changes here */
/* =========================================================
   ZAHA CENTER THEME
   Base color system & adaptive styles for light/dark mode
   ========================================================= */

:root {
  /* Zaha brand palette */
  --color-white: #FFFFFF;
  --color-ivory: #F1EDE5;
  --color-soft-yellow: #E9BF52;
  --color-teal: #00899A;
  --color-coral: #F25242;
  --color-orange: #FF8A00;
  --color-gold: #FFBA00;
  --color-black: #000000;
  --color-navy: #184682;
  --color-purple: #8062C6;
  --color-emerald: #00A240;
  --color-sky: #00CCFF;

  /* Assign functional colors */
--primary-color: var(--color-sky);        /* الأزرق السماوي كـ Primary واضح وحديث */
--secondary-color: var(--color-navy);     /* الكحلي للدعم والعناوين */
--success-color: var(--color-emerald);    /* الأخضر للنجاح والحالات الإيجابية */
--warning-color: var(--color-orange);     /* البرتقالي للتحذيرات الخفيفة */
--danger-color: var(--color-coral);       /* الكورال للأخطاء والتنبيهات الحرجة */
--info-color: var(--color-purple);        /* البنفسجي للمعلومات الثانوية */

/* Accent & surface system */
--accent-blue: var(--primary-color);
--accent-blue-strong: var(--secondary-color);
--accent-blue-soft: rgba(0, 204, 255, 0.20);        /* أنعم قليلاً */
--accent-indigo-soft: rgba(24, 70, 130, 0.14);      /* تقليل الأوباسيتي لتخفيف الثقل */
--accent-cyan: var(--color-teal);                   /* ربط السيان بالتيل المعتمد */
--accent-cyan-soft: rgba(0, 137, 154, 0.18);        /* تدرّج ناعم من التيل */
--accent-emerald: var(--color-emerald);
--accent-emerald-soft: rgba(0, 162, 64, 0.18);
--accent-amber: var(--color-soft-yellow);
--accent-amber-soft: rgba(233, 191, 82, 0.22);

/* Base text & backgrounds */
--body-bg-color: #F7FAFF;
--body-bg-color-rgb: 247, 250, 255;
--text-color: #131A22;
--text-color-rgb: 15, 23, 42;
--muted-text: rgba(15, 23, 42, 0.7);
--link-hover-color: var(--secondary-color);
--white-color: var(--color-white);
--black-color: var(--color-black);
--color-gray: #71964B; /* زيتوني ناعم للتكست الثانوي أو الأيقونات */

/* Surfaces */
--surface-elevated: #FFFFFF;
--surface-elevated-soft: rgba(255, 255, 255, 0.94);
--surface-muted: #F1F6FF;
--surface-muted-strong: #E8F4FF;
--surface-color: var(--page-surface);
--surface-card-border: rgba(15, 23, 42, 0.10);
--surface-card-border-strong: rgba(15, 23, 42, 0.16);
--surface-card-shadow: 0 18px 45px rgba(0, 137, 154, 0.10);   /* شادو بلون التيل */
--surface-card-shadow-strong: 0 26px 65px rgba(0, 137, 154, 0.16);
--surface-glass-shadow: 0 24px 60px rgba(0, 137, 154, 0.14);

/* Page background & footer */
--page-background-start: #F1EDE5;                           /* ivory دافئ */
--page-background-end: #F7FAFF;                             /* انتقال خفيف لأزرق فاتح */
--page-surface: #FFFFFF;
--page-muted-surface: #F1EDE5;
--page-border-subtle: rgba(15, 23, 42, 0.08);
--footer-bg: #131A22;
--footer-border: rgba(15, 23, 42, 0.12);
--footer-text: #F1EDE5;
  /* Navbar */
  --navbar-surface-bg: rgba(255, 252, 244, 0.96);              /* خلفية دافئة فاتحة */
  --navbar-border-color: rgba(15, 23, 42, 0.10);
  --navbar-text-color: #0C1116;
  --navbar-muted-color: rgba(var(--text-color-rgb), 0.65);
  --navbar-link-color: rgba(var(--text-color-rgb), 0.85);
  --navbar-link-hover-color: var(--accent-blue-strong);
  --navbar-link-hover-bg: rgba(0, 137, 154, 0.16);             /* teal من الباليت */
  --navbar-icon-color: var(--accent-blue);
  --navbar-toggler-border: rgba(0, 137, 154, 0.30);
  --navbar-utility-bg: rgba(253, 251, 245, 0.97);
  --navbar-utility-border: rgba(0, 137, 154, 0.22);
  --navbar-utility-color: #18222E;
  --navbar-utility-hover-bg: rgba(0, 137, 154, 0.18);
  --navbar-utility-hover-color: var(--navbar-link-hover-color);
  --navbar-utility-hover-border: rgba(0, 137, 154, 0.35);
  --navbar-dropdown-bg: rgba(255, 253, 246, 0.99);
  --navbar-dropdown-border: rgba(15, 23, 42, 0.12);
  --navbar-dropdown-shadow: 0 18px 45px rgba(0, 137, 154, 0.12);
  --navbar-dropdown-link-color: var(--navbar-link-color);
  --navbar-dropdown-hover-bg: rgba(0, 137, 154, 0.16);
  --navbar-dropdown-hover-color: var(--navbar-link-hover-color);

  /* Hero */
  --hero-overlay-dark: rgba(15, 23, 42, 0.78);
  --hero-overlay-accent: rgba(0, 204, 255, 0.40);              /* sky soft */
  --hero-card-bg: var(--surface-elevated-soft);
  --hero-card-border: rgba(0, 204, 255, 0.14);
  --hero-card-shadow: var(--surface-card-shadow-strong);
  --hero-register-bg: rgba(0, 204, 255, 0.16);
  --hero-register-border: rgba(24, 70, 130, 0.28);

  /* Sections */
  --section-gradient-start: rgba(0, 137, 154, 0.10);           /* teal soft */
  --section-gradient-end: rgba(233, 191, 82, 0.10);            /* soft yellow touch */

  /* Carousel */
  --carousel-indicator-bg: rgba(0, 137, 154, 0.28);
  --carousel-indicator-active-bg: var(--accent-blue);

  /* Bootstrap sync */
  --bs-body-bg: var(--body-bg-color);
  --bs-body-bg-rgb: var(--body-bg-color-rgb);
  --bs-body-color: var(--text-color);
  --bs-body-color-rgb: var(--text-color-rgb);
  --bs-heading-color: var(--text-color);
  --bs-link-color: var(--primary-color);
  --bs-link-hover-color: var(--link-hover-color);
  --bs-border-color: var(--surface-card-border);
  --bs-secondary-color: rgba(var(--text-color-rgb), 0.68);
  --bs-secondary-color-rgb: var(--text-color-rgb);

  /* Section + footer surfaces */
  --section-bg-color: var(--page-surface);
  --site-footer-bg-color: var(--footer-bg);

  /* Global shadow */
  --shadow-color: rgba(0, 137, 154, 0.14);

  /* Liaison workspace tokens */
  --liaison-card-radius: 1.25rem;
  --liaison-card-border: rgba(15, 23, 42, 0.10);
  --liaison-card-shadow: 0 18px 45px rgba(0, 137, 154, 0.14);
  --liaison-header-gradient-start: rgba(0, 137, 154, 0.92);    /* teal */
  --liaison-header-gradient-end: rgba(24, 70, 130, 0.70);      /* navy */
  --liaison-header-muted: rgba(188, 238, 245, 0.78);
  --liaison-header-icon-bg: rgba(255, 255, 255, 0.22);
  --liaison-table-head-bg: rgba(0, 137, 154, 0.10);
  --liaison-table-hover-bg: rgba(0, 137, 154, 0.14);
  --liaison-table-row-bg: rgba(255, 253, 246, 0.92);
}


html[data-bs-theme='dark'] {
  color-scheme: dark;
  --primary-color: var(--color-emerald);
  --accent-blue: var(--color-emerald);
  --accent-blue-strong: #56B7CA;
  --accent-blue-soft: rgba(0, 162, 64, 0.32);
  --accent-indigo-soft: rgba(21, 76, 145, 0.3);
  --accent-cyan: #56B7CA;
  --accent-cyan-soft: rgba(101, 216, 228, 0.32);
  --accent-emerald: var(--color-emerald);
  --accent-emerald-soft: rgba(0, 162, 64, 0.28);
  --accent-amber: #E9BF52;
  --accent-amber-soft: rgba(248, 199, 93, 0.26);

  --body-bg-color: #131A22;
  --body-bg-color-rgb: 10, 19, 37;
  --text-color: #F1EDE5;
  --text-color-rgb: 232, 237, 245;
  --muted-text: rgba(200, 212, 229, 0.8);
  --link-hover-color: var(--accent-blue-strong);

  --surface-elevated: rgba(12, 22, 42, 0.9);
  --surface-elevated-soft: rgba(12, 22, 42, 0.88);
  --surface-muted: rgba(13, 27, 53, 0.82);
  --surface-muted-strong: rgba(9, 20, 38, 0.9);
  --surface-card-border: rgba(200, 212, 229, 0.25);
  --surface-card-border-strong: rgba(200, 212, 229, 0.32);
  --surface-card-shadow: 0 24px 60px rgba(2, 8, 20, 0.7);
  --surface-card-shadow-strong: 0 28px 70px rgba(2, 8, 20, 0.75);
  --surface-glass-shadow: 0 30px 75px rgba(2, 8, 20, 0.75);

  --page-background-start: #131A22;
  --page-background-end: #18222E;
  --page-surface: rgba(11, 23, 45, 0.95);
  --page-muted-surface: rgba(13, 27, 53, 0.9);
  --page-border-subtle: rgba(200, 212, 229, 0.24);
  --footer-bg: #0C1116;
  --footer-border: rgba(200, 212, 229, 0.2);
  --footer-text: #FFFFFF;
  --section-bg-color: var(--page-muted-surface);
  --site-footer-bg-color: var(--footer-bg);

  --navbar-surface-bg: rgba(11, 23, 45, 0.92);
  --navbar-border-color: rgba(200, 212, 229, 0.24);
  --navbar-text-color: #FFFFFF;
  --navbar-muted-color: rgba(200, 212, 229, 0.82);
  --navbar-link-color: rgba(232, 237, 245, 0.92);
  --navbar-link-hover-color: var(--accent-blue-strong);
  --navbar-link-hover-bg: rgba(0, 162, 64, 0.28);
  --navbar-icon-color: var(--accent-blue);
  --navbar-toggler-border: rgba(0, 162, 64, 0.36);
  --navbar-utility-bg: rgba(12, 22, 42, 0.9);
  --navbar-utility-border: rgba(0, 162, 64, 0.36);
  --navbar-utility-color: #F1EDE5;
  --navbar-utility-hover-bg: rgba(0, 139, 143, 0.36);
  --navbar-utility-hover-color: var(--accent-blue-strong);
  --navbar-utility-hover-border: rgba(0, 139, 143, 0.55);
  --navbar-dropdown-bg: rgba(11, 23, 45, 0.95);
  --navbar-dropdown-border: rgba(0, 139, 143, 0.28);
  --navbar-dropdown-shadow: 0 20px 55px rgba(2, 8, 20, 0.7);
  --navbar-dropdown-link-color: rgba(232, 237, 245, 0.9);
  --navbar-dropdown-hover-bg: rgba(0, 139, 143, 0.34);
  --navbar-dropdown-hover-color: var(--accent-blue-strong);

  --hero-overlay-dark: rgba(2, 8, 20, 0.82);
  --hero-overlay-accent: rgba(0, 139, 143, 0.46);
  --hero-card-border: rgba(0, 139, 143, 0.24);
  --hero-register-bg: rgba(0, 139, 143, 0.34);
  --hero-register-border: rgba(21, 76, 145, 0.38);

  --section-gradient-start: rgba(0, 139, 143, 0.32);
  --section-gradient-end: rgba(21, 76, 145, 0.28);

  --carousel-indicator-bg: rgba(200, 212, 229, 0.35);
  --carousel-indicator-active-bg: var(--accent-blue);

  --bs-body-bg: var(--body-bg-color);
  --bs-body-bg-rgb: var(--body-bg-color-rgb);
  --bs-body-color: var(--text-color);
  --bs-body-color-rgb: var(--text-color-rgb);
  --bs-heading-color: #FFFFFF;
  --bs-link-color: var(--accent-blue);
  --bs-link-hover-color: var(--link-hover-color);
  --bs-secondary-color: rgba(200, 212, 229, 0.82);
  --bs-secondary-color-rgb: 200, 212, 229;
  --bs-border-color: rgba(200, 212, 229, 0.25);

  --shadow-color: rgba(0, 0, 0, 0.4);

  --liaison-card-border: rgba(200, 212, 229, 0.22);
  --liaison-card-shadow: 0 22px 60px rgba(2, 8, 20, 0.6);
  --liaison-header-gradient-start: rgba(0, 139, 143, 0.5);
  --liaison-header-gradient-end: rgba(21, 76, 145, 0.42);
  --liaison-header-muted: rgba(226, 232, 240, 0.82);
  --liaison-header-icon-bg: rgba(255, 255, 255, 0.2);
  --liaison-table-head-bg: rgba(0, 139, 143, 0.34);
  --liaison-table-hover-bg: rgba(0, 139, 143, 0.28);
  --liaison-table-row-bg: rgba(12, 22, 42, 0.78);
}

html[data-bs-theme='light'] {
  color-scheme: light;
}


body {
  background: linear-gradient(
    180deg,
    var(--page-background-start) 0%,
    rgba(247, 250, 255, 0.90) 60%,
    var(--page-background-end) 100%
  );
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

html[data-bs-theme='dark'] body {
  background: linear-gradient(
    180deg,
    rgba(19, 26, 34, 0.95) 0%,
    rgba(10, 20, 17, 0.90) 50%,
    var(--page-background-end) 100%
  );
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);

  --surface-color: var(--page-surface);
  --shadow-color: rgba(0, 0, 0, 0.40);
}


html[data-bs-theme='dark'] .navbar {
  background-color: var(--navbar-surface-bg) !important;
  color: var(--navbar-text-color);
}

html[data-bs-theme='dark'] .navbar a {
  color: var(--navbar-link-color);
}

html[data-bs-theme='dark'] .navbar a:hover {
  color: var(--navbar-link-hover-color);
}

main.landing-main {
  background: transparent;
  color: var(--bs-body-color);
}

.landing-main section {
  color: inherit;
}

.landing-main .card {
  background: var(--page-surface);
  border-color: var(--page-border-subtle);
  color: var(--bs-body-color);
  box-shadow: 0 18px 45px var(--shadow-color);
}

html[data-bs-theme='dark'] .landing-main .card {
  background: var(--page-muted-surface);
  border-color: var(--page-border-subtle);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--bs-heading-color);
}

body p,
body li,
.text-body {
  color: rgba(var(--bs-body-color-rgb), 0.85);
}

.text-muted {
  color: var(--muted-text) !important;
}

.section-bg {
  background: var(--section-bg-color);
  color: var(--bs-body-color);
}

.site-header {
  background: #123150 !important;
  border-bottom: 1px solid rgba(0, 139, 143, 0.2);
  color: #FFFFFF;
}

.site-header p,
.site-header p a,
.site-header .social-icon-link {
  color: rgba(248, 250, 252, 0.92);
}

html[data-bs-theme='dark'] .site-header {
  background: linear-gradient(120deg, rgba(11, 23, 45, 0.95), rgba(0, 139, 143, 0.65), rgba(243, 111, 33, 0.45)) !important;
  border-bottom: 1px solid rgba(0, 139, 143, 0.28);
}

.site-footer,
.site-footer-bottom {
  background-color: var(--footer-bg) !important;
  color: var(--footer-text);
  border-color: var(--footer-border);
}

.site-footer-bottom {
  border-top: 1px solid var(--footer-border);
}

.site-footer .footer-menu-link,
.site-footer .site-footer-link,
.site-footer .custom-btn,
.site-footer .social-icon-link {
  color: var(--footer-text);
}

.site-footer .footer-menu-link:hover,
.site-footer .site-footer-link:hover,
.site-footer .social-icon-link:hover {
  color: var(--accent-blue);
}

.site-footer .social-icon-link {
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
}

html[data-bs-theme='dark'] .site-footer .social-icon-link {
  border-color: rgba(148, 163, 184, 0.25);
}

.site-footer .custom-btn {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--footer-text);
  background: transparent;
}

.site-footer .custom-btn:hover,
.site-footer .custom-btn:focus {
  color: #131A22;
  background: #FFFFFF;
}

html[data-bs-theme='dark'] .site-footer .custom-btn:hover,
html[data-bs-theme='dark'] .site-footer .custom-btn:focus {
  color: #0C1116;
  background: #FFFFFF;
}

.footer-grid { --bs-gutter-y: 1.75rem; }
.footer-panel{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  padding:1.2rem 1.4rem;
  background: rgba(255,255,255,0.06);
  box-shadow:0 18px 44px rgba(0,0,0,0.16);
}
html[data-bs-theme='light'] .footer-panel{
  border-color: rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.85);
  box-shadow:0 16px 38px rgba(15,23,42,0.08);
}

.footer-tagline{ color: rgba(255,255,255,0.8); font-weight:500; }
html[data-bs-theme='light'] .footer-tagline{ color: #184682; }

.footer-chip{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.45rem .85rem;
  border-radius:999px;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.15);
  color: var(--footer-text);
  font-weight:700;
}
html[data-bs-theme='light'] .footer-chip{
  background: rgba(0,139,143,0.08);
  border-color: rgba(0,139,143,0.22);
  color: #131A22;
}
.footer-chip i{ font-size:1rem; }

.footer-panel .footer-menu-link i{
  font-size:.85rem;
  margin-inline-end:.35rem;
  opacity:.7;
}

.footer-panel .footer-menu{ margin-bottom:0; }

.footer-contact-item{
  display:flex;
  align-items:center;
  gap:.55rem;
  padding:.35rem 0;
  color:var(--footer-text);
}
.footer-contact-item i{ opacity:.8; }

/* --- Public navigation refresh --- */
.main-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.75rem;
  padding: 0.55rem 1.35rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.main-navbar .navbar-brand {
  align-items: center;
  color: #131A22;
  display: inline-flex;
  font-weight: 700;
  gap: 0.75rem;
  text-transform: none;
}

.main-navbar .navbar-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.main-navbar .navbar-toggler {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.85rem;
  padding: 0.4rem 0.7rem;
}

.main-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(0, 139, 143, 0.32);
}

.main-navbar .navbar-nav {
  gap: 0.5rem;
}

.main-navbar .nav-link {
  border-radius: 999px;
  color: #184682;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  padding: 0.48rem 0.9rem;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus,
.main-navbar .nav-link.active {
  background: rgba(0, 139, 143, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: var(--primary-color);
}

.nav-user-menu .dropdown-menu {
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  padding: 0.75rem;
}

.navbar-utilities {
  width: 100%;
}

@media (min-width: 992px) {
  .navbar-utilities {
    width: auto;
  }
}

.nav-utility-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.25rem;
  color: #131A22;
  display: inline-flex;
  font-weight: 600;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-utility-btn:hover,
.nav-utility-btn:focus {
  background: rgba(0, 139, 143, 0.12);
  border-color: rgba(0, 139, 143, 0.4);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  color: var(--primary-color);
}

.nav-language-toggle {
  padding: 0.35rem;
  border-radius: 999px;
}

  .nav-language-toggle .lang-toggle-pill {
    align-items: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.18));
    border-radius: 999px;
    display: inline-flex;
    gap: 0.25rem;
  padding: 0.25rem;
}

.nav-language-toggle .lang-option {
  border-radius: 999px;
  color: rgba(15, 23, 42, 0.6);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-language-toggle .lang-option.is-active {
  background: linear-gradient(135deg, var(--primary-color), #00CCFF);
  box-shadow: 0 12px 26px rgba(0, 137, 154, 0.28);
  color: #FFFFFF;
}

.nav-theme-toggle {
  border-radius: 50%;
  height: 2.75rem;
  justify-content: center;
  padding: 0;
  width: 2.75rem;
}

.nav-theme-toggle .theme-icon {
  font-size: 1.1rem;
}

.nav-auth-btn {
  align-items: center;
  background: linear-gradient(135deg, #00899A, #00CCFF 55%, #00899A);
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 18px 40px rgba(0, 137, 154, 0.35);
  color: #FFFFFF;
  display: inline-flex;
  font-weight: 700;
  gap: 0.6rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.65rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-auth-btn i {
  font-size: 1.1rem;
}

.nav-auth-btn:hover,
.nav-auth-btn:focus {
  box-shadow: 0 26px 55px rgba(0, 137, 154, 0.45);
  color: #FFFFFF;
  transform: translateY(-1px);
}

@media (max-width: 991.98px) {
  .main-navbar {
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
  }

  .navbar-utilities {
    background: rgba(15, 23, 42, 0.02);
    border-radius: 1.25rem;
    padding: 1rem;
  }
}

html[data-bs-theme='dark'] .main-navbar {
  background: rgba(13, 17, 23, 0.92);
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.6);
}

html[data-bs-theme='dark'] .main-navbar .navbar-brand,
html[data-bs-theme='dark'] .main-navbar .nav-link,
html[data-bs-theme='dark'] .nav-utility-btn {
  color: #F1EDE5;
}

html[data-bs-theme='dark'] .main-navbar .nav-link:hover,
html[data-bs-theme='dark'] .main-navbar .nav-link:focus,
html[data-bs-theme='dark'] .main-navbar .nav-link.active {
  color: #56B7CA;
}

html[data-bs-theme='dark'] .nav-utility-btn {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(96, 165, 250, 0.25);
  color: #F1EDE5;
}

html[data-bs-theme='dark'] .nav-utility-btn:hover,
html[data-bs-theme='dark'] .nav-utility-btn:focus {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: #F1EDE5;
}

html[data-bs-theme='dark'] .nav-language-toggle .lang-toggle-pill {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(6, 182, 212, 0.22));
}

html[data-bs-theme='dark'] .nav-language-toggle .lang-option {
  color: rgba(226, 232, 240, 0.75);
}

html[data-bs-theme='dark'] .nav-auth-btn {
  background: linear-gradient(135deg, #00899A, #00CCFF 55%, #00899A);
  box-shadow: 0 18px 40px rgba(0, 137, 154, 0.35);
}
  /* Hero section rebuilt */
  .hero-section-full-height {
    position: relative;
    overflow: hidden;
    min-height: clamp(360px, 46vh, 520px);
    max-height: clamp(420px, 54vh, 600px);
    display: flex;
    align-items: center;
    border-radius: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(120deg, rgba(0, 204, 255, 0.12), rgba(86, 183, 202, 0.2), rgba(15, 90, 168, 0.16));
    box-shadow: 0 30px 72px rgba(2, 41, 79, 0.18);
    padding: clamp(1.85rem, 3vw, 3rem);
  }

  html[data-bs-theme='dark'] .hero-section-full-height {
    background: linear-gradient(140deg, rgba(14, 71, 55, 0.72), rgba(0, 137, 154, 0.6), rgba(11, 32, 23, 0.75));
    box-shadow: 0 28px 72px rgba(0, 137, 154, 0.22);
  }

  #hero-slide {
    width: 100%;
  }

#hero-slide .carousel-item {
    position: relative;
    min-height: clamp(360px, 44vh, 520px);
    max-height: clamp(420px, 52vh, 560px);
    overflow: hidden;
    background: rgb(17, 48, 79)!important; /* الكحلي الرسمي */
    border-radius: clamp(1.25rem, 2vw, 2rem);
}

  html[data-bs-theme='dark'] #hero-slide .carousel-item {
background: linear-gradient(
  135deg,
  #0a7545 0%,
  #0D2923 50%,
  #0A1411 100%
);
    color: #F1EDE5;
  }

  #hero-slide .carousel-caption {
    position: relative;
    inset: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1.1rem, 2vw, 1.9rem);
    align-items: center;
    padding: clamp(1.75rem, 3vw, 2.75rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(229, 245, 255, 0.94));
    border-radius: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 24px 52px rgba(2, 41, 79, 0.2);
    border: 1px solid rgba(2, 41, 79, 0.14);
    color: #131A22;
  }

  html[data-bs-theme='dark'] #hero-slide .carousel-caption {
    background: linear-gradient(135deg, rgba(12, 34, 26, 0.94), rgba(10, 44, 36, 0.9));
    border-color: rgba(0, 204, 255, 0.25);
    color: #FFFFFF;
    box-shadow: 0 20px 48px rgba(0, 137, 154, 0.28);
  }

  .hero-slide-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .hero-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.16), rgba(22, 183, 177, 0.2));
    color: #02294F;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html[data-bs-theme='dark'] .hero-slide-badge {
    background: linear-gradient(135deg, rgba(0, 137, 154, 0.25), rgba(0, 162, 64, 0.25));
    color: #FFFFFF;
  }

  .hero-slide-title {
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }

  .hero-slide-description {
    font-size: 1.02rem;
    color: rgba(15, 23, 42, 0.82);
    margin: 0;
  }

  html[data-bs-theme='dark'] .hero-slide-description {
    color: rgba(232, 252, 247, 0.85);
  }

  .hero-slide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-slide-actions .hero-primary-btn,
  .hero-slide-actions .hero-secondary-btn {
    padding: 0.85rem 1.15rem;
    border-radius: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
  }

  .hero-slide-actions .hero-primary-btn {
    background: linear-gradient(135deg, #56B7CA, #00CCFF 55%, #00899A);
    color: #02294F;
    border: 1px solid rgba(2, 41, 79, 0.18);
    box-shadow: 0 16px 38px rgba(2, 41, 79, 0.18);
  }

  .hero-slide-actions .hero-primary-btn:hover,
  .hero-slide-actions .hero-primary-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(2, 41, 79, 0.26);
  }

  .hero-slide-actions .hero-secondary-btn {
    background: rgba(86, 183, 202, 0.1);
    color: #02294F;
    border: 1px solid rgba(2, 41, 79, 0.16);
  }

  html[data-bs-theme='dark'] .hero-slide-actions .hero-secondary-btn {
    background: rgba(0, 137, 154, 0.16);
    color: #FFFFFF;
    border-color: rgba(0, 204, 255, 0.28);
  }

  .hero-slide-actions .hero-secondary-btn:hover,
  .hero-slide-actions .hero-secondary-btn:focus {
    background: rgba(86, 183, 202, 0.18);
    color: #02294F;
  }

  html[data-bs-theme='dark'] .hero-slide-actions .hero-secondary-btn:hover,
  html[data-bs-theme='dark'] .hero-slide-actions .hero-secondary-btn:focus {
    background: rgba(0, 137, 154, 0.24);
    color: #FFFFFF;
  }

  #hero-slide .carousel-image {
    width: 100%;
    max-height: clamp(320px, 50vh, 540px);
    object-fit: contain;
    filter: drop-shadow(0 18px 38px rgba(2, 41, 79, 0.18));
    justify-self: end;
  }

  html[data-bs-theme='dark'] #hero-slide .carousel-image {
    filter: drop-shadow(0 18px 28px rgba(0, 137, 154, 0.3));
  }

  #hero-slide .carousel-indicators {
    position: absolute;
    right: clamp(1rem, 2vw, 1.5rem);
    bottom: clamp(0.75rem, 1.5vw, 1.25rem);
    left: auto;
    gap: 0.35rem;
    justify-content: flex-end;
  }

  #hero-slide .carousel-indicators [data-bs-target] {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: rgba(2, 41, 79, 0.28);
    opacity: 1;
    border: 1px solid rgba(2, 41, 79, 0.12);
  }

  #hero-slide .carousel-indicators .active {
    background-color: #00CCFF;
    box-shadow: 0 0 0 4px rgba(0, 204, 255, 0.18);
  }

  html[data-bs-theme='dark'] #hero-slide .carousel-indicators [data-bs-target] {
    background-color: rgba(0, 137, 154, 0.36);
    border-color: rgba(0, 204, 255, 0.22);
  }

  html[data-bs-theme='dark'] #hero-slide .carousel-indicators .active {
    background-color: #16B7B1;
    box-shadow: 0 0 0 4px rgba(0, 137, 154, 0.22);
  }

  @media (max-width: 1199.98px) {
    #hero-slide .carousel-item,
    .hero-section-full-height {
      min-height: clamp(340px, 48vh, 540px);
      max-height: clamp(390px, 56vh, 600px);
    }

    #hero-slide .carousel-caption {
      grid-template-columns: 1fr;
    }

    #hero-slide .carousel-image {
      justify-self: center;
    }
  }

  @media (max-width: 767.98px) {
    #hero-slide .carousel-caption {
      padding: clamp(1.25rem, 4vw, 1.85rem);
      text-align: center;
    }

    .hero-slide-actions {
      justify-content: center;
    }

    .hero-slide-badge {
      justify-content: center;
    }
  }

  @media (max-width: 575.98px) {
    #hero-slide .carousel-item,
    .hero-section-full-height {
      min-height: clamp(330px, 52vh, 560px);
      max-height: clamp(360px, 60vh, 600px);
    }

    #hero-slide .carousel-caption {
      padding: clamp(1.05rem, 5vw, 1.5rem);
      gap: 1rem;
    }

    .hero-slide-actions .hero-primary-btn,
    .hero-slide-actions .hero-secondary-btn {
      width: 100%;
      justify-content: center;
    }

    #hero-slide .carousel-indicators {
      right: 50%;
      left: 50%;
      transform: translateX(-50%);
    }
  }
/* --- Dashboard Layout Enhancements --- */
.app-sidebar {
  background: linear-gradient(180deg, rgba(0, 139, 143, 0.12) 0%, rgba(0, 139, 143, 0.04) 100%);
  min-height: 100vh;
  padding: 0;
}

.app-sidebar .sidebar-shell {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 0 1.25rem 1.25rem 0;
  box-shadow: inset -1px 0 0 rgba(0, 139, 143, 0.1), 0 10px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  height: 100%;
}

html[data-bs-theme='dark'] .app-sidebar {
  background: linear-gradient(180deg, rgba(0, 139, 143, 0.28) 0%, rgba(0, 139, 143, 0.12) 100%);
}

html[data-bs-theme='dark'] .app-sidebar .sidebar-shell {
  background-color: rgba(17, 24, 39, 0.9);
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.1), 0 10px 30px rgba(15, 23, 42, 0.45);
}

.sidebar-header {
  border-bottom: 1px solid rgba(0, 139, 143, 0.15);
  padding: 1.75rem 1.5rem 1.25rem;
}

.sidebar-profile {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.sidebar-avatar {
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.85), rgba(130, 96, 199, 0.85));
  border-radius: 1rem;
  color: #FFFFFF;
  display: inline-flex;
  font-weight: 600;
  height: 3rem;
  justify-content: center;
  text-transform: uppercase;
  width: 3rem;
}

.sidebar-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.sidebar-footer {
  border-top: 1px solid rgba(0, 139, 143, 0.1);
  padding: 1rem 1.5rem;
}

.sidebar-heading {
  letter-spacing: 0.08em;
}

.app-sidebar .nav-link {
  border-radius: 0.75rem;
  color: #131A22;
  display: flex;
  font-weight: 500;
  padding: 0.65rem 0.9rem;
  transition: all 0.2s ease-in-out;
}

.app-sidebar .nav-link .bi {
  font-size: 1rem;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
  background: rgba(0, 139, 143, 0.12);
  color: var(--primary-color);
}

.app-sidebar .nav-link.active {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.18), rgba(243, 111, 33, 0.18));
  color: var(--color-navy);
  font-weight: 600;
}

.app-sidebar .btn-toggle {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0.75rem;
  color: inherit;
  font-weight: 500;
  padding: 0.65rem 0.9rem;
  transition: all 0.2s ease-in-out;
}

.app-sidebar .btn-toggle:hover,
.app-sidebar .btn-toggle:focus {
  background: rgba(0, 139, 143, 0.12);
  color: var(--primary-color);
}

.app-sidebar .btn-toggle .bi-chevron-down {
  transition: transform 0.2s ease-in-out;
}

.app-sidebar .btn-toggle.collapsed .bi-chevron-down {
  transform: rotate(-90deg);
}

.app-sidebar .nav-link-child {
  border-radius: 0.65rem;
  color: #184682;
  font-size: 0.9rem;
  margin: 0.25rem 0;
  padding: 0.5rem 0.75rem;
}

.app-sidebar .nav-link-child:hover,
.app-sidebar .nav-link-child.active {
  background: rgba(0, 139, 143, 0.12);
  color: var(--primary-color);
}

html[data-bs-theme='dark'] .app-sidebar .nav-link,
html[data-bs-theme='dark'] .app-sidebar .nav-link-child,
html[data-bs-theme='dark'] .app-sidebar .btn-toggle {
  color: #F1EDE5;
}

html[data-bs-theme='dark'] .app-sidebar .nav-link:hover,
html[data-bs-theme='dark'] .app-sidebar .nav-link-child:hover,
html[data-bs-theme='dark'] .app-sidebar .btn-toggle:hover {
  color: var(--accent-blue-strong);
}

/* --- Liaison Workspace Enhancements --- */
.page-header-card {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.12), rgba(130, 96, 199, 0.12));
}

html[data-bs-theme='dark'] .page-header-card {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.32), rgba(130, 96, 199, 0.26));
}

.page-header-icon {
  background: rgba(0, 139, 143, 0.15);
  border-radius: 1rem;
  color: var(--secondary-color);
  font-size: 1.5rem;
  height: 3.25rem;
  width: 3.25rem;
}

.stat-card-icon {
  font-size: 1.1rem;
  height: 2.75rem;
  width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-card-value {
  letter-spacing: -0.02em;
}

.supervisor-header {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.08), rgba(0, 155, 87, 0.08));
}

html[data-bs-theme='dark'] .supervisor-header {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.3), rgba(0, 155, 87, 0.24));
}

.supervisor-header-icon {
  background: rgba(0, 155, 87, 0.18);
  color: #00A240;
}

html[data-bs-theme='dark'] .supervisor-header-icon {
  background: rgba(0, 155, 87, 0.28);
  color: #56B7CA;
}

.supervisor-stat-card {
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.supervisor-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
}

.supervisor-stat-card-icon {
  font-size: 1.1rem;
  height: 2.75rem;
  width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.supervisor-quick-card {
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.supervisor-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
}

.supervisor-quick-card-icon {
  height: 3rem;
  width: 3rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.supervisor-empty-state {
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.06);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

html[data-bs-theme='dark'] .supervisor-empty-state {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
}

.supervisor-empty-icon {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(71, 85, 105, 0.95);
  transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-bs-theme='dark'] .supervisor-empty-icon {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.85);
}

.page-header-content {
  text-align: start;
}

.page-header-actions .btn {
  width: 100%;
}

@media (min-width: 576px) {
  .page-header-actions .btn {
    width: auto;
  }
}

@media (max-width: 575.98px) {
  .page-header-content {
    text-align: center;
  }

  .page-header-content > .flex-grow-1 {
    width: 100%;
  }

  .page-header-actions {
    width: 100%;
  }
}

.table-supervisor-stack,
.liaison-table-stack {
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 767.98px) {
  .table-supervisor-stack thead,
  .liaison-table-stack thead {
    display: none;
  }

  .table-supervisor-stack tbody,
  .liaison-table-stack tbody {
    display: grid;
    gap: 1rem;
  }

  .table-supervisor-stack tbody tr,
  .liaison-table-stack tbody tr {
    display: block;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
  }

  html[data-bs-theme='dark'] .table-supervisor-stack tbody tr,
  html[data-bs-theme='dark'] .liaison-table-stack tbody tr {
    box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.35);
  }

  .table-supervisor-stack tbody td,
  .liaison-table-stack tbody td {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
  }

  .table-supervisor-stack tbody td:last-child,
  .liaison-table-stack tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .table-supervisor-stack tbody td::before,
  .liaison-table-stack tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--bs-secondary-color, var(--bs-body-color));
  }

  html[dir='rtl'] .table-supervisor-stack tbody td::before,
  html[dir='rtl'] .liaison-table-stack tbody td::before {
    text-align: start;
  }

  .liaison-table-stack {
    min-width: 100%;
  }
}
@media (max-width: 767.98px) {
  .liaison-table-stack tbody td {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: start;
    justify-content: start;
    text-align: start;
  }

  .liaison-table-stack tbody td::before {
    margin-bottom: 0.15rem;
  }
}
@media (max-width: 767.98px) {
  .liaison-table-stack tbody td .btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.35rem;
  }
}

.progress-supervisor {
  height: 0.6rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.7);
}

html[data-bs-theme='dark'] .progress-supervisor {
  background: rgba(71, 85, 105, 0.7);
}

.progress-supervisor .progress-bar {
  border-radius: inherit;
}

.table thead th {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: start;
}

.card.shadow-sm {
  border-radius: var(--liaison-card-radius);
  border: 1px solid var(--liaison-card-border);
  background: var(--surface-color);
  box-shadow: var(--liaison-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.shadow-sm:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

html[data-bs-theme='dark'] .card.shadow-sm {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(18px);
}

html[data-bs-theme='dark'] .card.shadow-sm:hover {
  box-shadow: 0 28px 55px rgba(2, 6, 23, 0.7);
}

.table-rounded {
  border-radius: var(--liaison-card-radius);
  border: 1px solid var(--liaison-card-border);
  overflow: hidden;
  box-shadow: var(--liaison-card-shadow);
}

.table-rounded .table {
  --bs-table-color: var(--text-color);
  --bs-table-bg: var(--liaison-table-row-bg);
  --bs-table-striped-bg: rgba(0, 139, 143, 0.08);
  --bs-table-hover-bg: var(--liaison-table-hover-bg);
  --bs-table-border-color: rgba(15, 23, 42, 0.06);
  margin-bottom: 0;
  min-width: 100%;
}

@media (min-width: 768px) {
  .table-rounded .table {
    min-width: 48rem;
  }
}

html[data-bs-theme='dark'] .table-rounded .table {
  --bs-table-striped-bg: rgba(0, 139, 143, 0.2);
  --bs-table-border-color: rgba(148, 163, 184, 0.22);
}

.table-rounded .table thead th {
  background: var(--liaison-table-head-bg);
  border-bottom: none;
  color: var(--secondary-color);
}

html[data-bs-theme='dark'] .table-rounded .table thead th {
  color: var(--liaison-header-muted);
}

.table-rounded .table td,
.table-rounded .table th {
  border: none;
  vertical-align: middle;
  padding-block: 0.95rem;
}


.liaison-table {
  --bs-table-color: var(--text-color);
  --bs-table-bg: var(--liaison-table-row-bg);
  --bs-table-striped-bg: rgba(0, 139, 143, 0.08);
  --bs-table-hover-bg: var(--liaison-table-hover-bg);
  --bs-table-border-color: rgba(15, 23, 42, 0.06);
  min-width: 48rem;
}

html[data-bs-theme='dark'] .liaison-table {
  --bs-table-striped-bg: rgba(0, 139, 143, 0.2);
  --bs-table-border-color: rgba(148, 163, 184, 0.22);
}

.liaison-table thead th {
  background: var(--liaison-table-head-bg);
  border-bottom: none;
  color: var(--secondary-color);
  text-align: start;
}

html[data-bs-theme='dark'] .liaison-table thead th {
  color: var(--liaison-header-muted);
}

.liaison-table--compact {
  min-width: 100%;
}

@media (max-width: 991.98px) {
  .table-rounded .table,
  .liaison-table {
    min-width: 40rem;
  }
}

@media (max-width: 575.98px) {
  .table-rounded .table,
  .liaison-table {
    min-width: 32rem;
    font-size: 0.875rem;
  }

  .liaison-table--compact {
    font-size: 0.9rem;
  }
}

.badge.text-bg-info.text-dark {
  color: var(--secondary-color) !important;
}

.stat-card {
  height: 100%;
}

.stat-card .card-body {
  align-items: flex-start;
  gap: 1rem;
}

.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  font-size: 1.25rem;
}

.stat-card-label {
  letter-spacing: 0.08em;
}

.stat-card-hint {
  color: var(--muted-text);
}

.liaison-definition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
}

.liaison-definition-grid dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-text);
}

.liaison-definition-grid dd {
  margin: 0;
  font-weight: 600;
}

.liaison-quick-links .list-group-item {
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.liaison-quick-links .list-group-item:last-child {
  border-bottom: none;
}

.liaison-quick-links .list-group-item:hover {
  background: rgba(0, 139, 143, 0.08);
  color: var(--primary-color);
}

.liaison-upcoming-card,
.liaison-feedback-card {
  border-radius: var(--liaison-card-radius) !important;
  border: 1px solid rgba(0, 139, 143, 0.22) !important;
  background: rgba(0, 139, 143, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.liaison-feedback-card {
  background: rgba(79, 70, 229, 0.05);
  border-color: rgba(79, 70, 229, 0.18) !important;
}

.liaison-upcoming-card:hover,
.liaison-feedback-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html[data-bs-theme='dark'] .text-muted {
  color: var(--muted-text) !important;
}

html[data-bs-theme='dark'] .liaison-quick-links .list-group-item {
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-bs-theme='dark'] .liaison-quick-links .list-group-item:hover {
  background: rgba(0, 139, 143, 0.22);
}

html[data-bs-theme='dark'] .liaison-upcoming-card,
html[data-bs-theme='dark'] .liaison-feedback-card {
  border-color: rgba(0, 139, 143, 0.35) !important;
  background: rgba(0, 139, 143, 0.18);
}

html[data-bs-theme='dark'] .progress {
  background-color: rgba(148, 163, 184, 0.2);
}

.nav-pills-outline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav-pills-outline .nav-link {
  border: 1px solid rgba(0, 139, 143, 0.25);
  border-radius: 0.9rem;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-pills-outline .nav-link.active {
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.2), rgba(13, 202, 240, 0.2));
  border-color: transparent;
  color: var(--secondary-color);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.nav-pills-outline .btn {
  align-items: center;
  border-radius: 0.9rem;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
}

.nav-pills-outline .btn-outline-light {
  border-color: rgba(0, 139, 143, 0.22);
  color: var(--primary-color);
}

html[data-bs-theme='dark'] .nav-pills-outline .nav-link {
  color: var(--accent-blue);
  border-color: rgba(0, 139, 143, 0.35);
}

html[data-bs-theme='dark'] .nav-pills-outline .nav-link.active {
  color: #F1EDE5;
  background: linear-gradient(135deg, rgba(0, 139, 143, 0.35), rgba(21, 76, 145, 0.28));
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.5);
}

html[data-bs-theme='dark'] .nav-pills-outline .btn-outline-light {
  border-color: rgba(0, 139, 143, 0.35);
  color: var(--accent-blue);
}

.landing-main section {
  position: relative;
  animation: fadeRise 0.9s ease both;
  animation-delay: var(--anim-delay, 0s);
}

.landing-main .card,
.landing-main .surface-card {
  animation: fadeRise 0.9s ease both, gradientShift 18s ease infinite;
  animation-delay: var(--anim-delay, 0s);
  background-size: 200% 200%;
}

.landing-main .section-header-title,
.landing-main .section-header-subtitle {
  animation: fadeRise 1s ease both;
}

@keyframes fadeRise {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.staff-messages-page .card-header {
  background: linear-gradient(120deg, rgba(13, 110, 253, 0.08), rgba(25, 135, 84, 0.08));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.staff-messages-page .compose-card .card-header i,
.staff-messages-page .recent-card .card-header i {
  font-size: 1.1rem;
}

.staff-messages-page .message-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.staff-messages-page .message-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.staff-messages-page .message-body {
  background: rgba(15, 23, 42, 0.03);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.staff-messages-page .message-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 575.98px) {
  .nav-pills-outline .nav-link,
  .nav-pills-outline .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}
/* ========================================================= */
/* FINAL FIX: prevent stacked tables from overflowing mobile */
/* ========================================================= */

@media (max-width: 767.98px) {

  /* Kill forced widths on mobile */
  .liaison-table-stack,
  .liaison-table-stack.table,
  .liaison-table-stack.liaison-table,
  .table-rounded .liaison-table-stack {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Safety: prevent any table from forcing overflow */
  .liaison-table-stack tbody,
  .liaison-table-stack tr,
  .liaison-table-stack td {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Ensure wrapper doesn't scroll horizontally */
  .table-responsive,
  .table-rounded {
    overflow-x: hidden !important;
  }
}
