/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Brand Colors */
  --primary-color: #4b58a0;
  --primary-dark: #3a4580;
  --primary-light: #6b78c0;
  --primary-lighter: #afb6e4;
  --primary-lightest: #e8eaf5;

  /* Secondary Colors */
  --secondary-color: #5e6e89;
  --accent-color: #ff6b6b;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #F4F0E0;
  --bg-tertiary: #f3f4f6;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-hero: linear-gradient(135deg, #4b58a0 0%, #6b78c0 100%);

  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --text-inverse: #ffffff;

  /* Border & Shadow */
  --border-color: #e5e7eb;
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-family-primary: 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;

  /* Layout */
  --header-height: 70px;
  --sidebar-width: 280px;
  --container-max-width: 1280px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--body-bg);
  padding-top: 70px; /* Header height */
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  body {
    padding-top: 60px; /* Mobile header height */
  }
}

/* Remove default link underlines */
a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
}

.header.scrolled {
  box-shadow: var(--shadow-xl);
}

.header .container-fluid {
  max-width: 100%;
  padding: 0 var(--spacing-4);
}

@media (min-width: 1024px) {
  .header .container-fluid {
    padding: 0 var(--spacing-6);
  }
}

.logo {
  text-decoration: none;
  color: var(--white);
}

.logo:hover {
  opacity: 0.95;

  opacity: 0.9;}

.logo-icon {
  position: relative;
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo:hover .logo-icon {

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);}

.logo-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.logo-text {
  line-height: 1.3;
}

.logo-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.logo-subtitle {
  font-size: 0.75rem;
  font-weight: var(--font-weight-normal);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.2px;
}

.toggle-sidebar-btn {
  font-size: 1.75rem;
  color: var(--white);
  padding: var(--spacing-2);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  background: transparent;
  border: none;
}

.toggle-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);

  background: rgba(255, 255, 255, 0.15);}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.navbar-nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.nav-link-desktop {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-4);
  color: rgba(255, 255, 255, 0.9);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-md);
  white-space: nowrap;
}

.nav-link-desktop:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);

  background: rgba(255, 255, 255, 0.15);}

.nav-link-desktop.active {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.nav-link-desktop i {
  font-size: 1rem;
}

/* Header-specific styles for buttons and text on gradient background */
.header .btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
}

.header .btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.header .btn-outline {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
}

.header .btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-color: var(--white);
}

.header .btn-primary {
  background: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
}

.header .btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);

  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);}

.header .text-primary {
  color: var(--white) !important;
}

.header .text-secondary {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ============================================
   MOBILE SIDEBAR (Hidden on Desktop)
   ============================================ */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: -var(--sidebar-width);
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--white);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-fixed);
  padding: var(--spacing-6) 0;
}

.toggle-sidebar .sidebar {
  left: 0;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-lighter);
  border-radius: var(--border-radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav .nav-item {
  margin-bottom: var(--spacing-2);
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-6);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  position: relative;
}

.sidebar-nav .nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
  opacity: 0;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: var(--primary-lightest);
  color: var(--primary-color);

  background: var(--primary-lightest);}

.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before {


  background: var(--primary-lightest);}

.sidebar-nav .nav-link i {
  font-size: 1.25rem;
  min-width: 1.25rem;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  z-index: calc(var(--z-fixed) - 1);
}

.toggle-sidebar .sidebar-overlay {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: var(--spacing-3) var(--spacing-6);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);

  box-shadow: var(--shadow-lg);

  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);}

.btn-secondary {
  background: var(--gray-200);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-300);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-color);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--primary-lightest);
}

.btn-sm {
  padding: var(--spacing-2) var(--spacing-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--spacing-4) var(--spacing-8);
  font-size: var(--font-size-lg);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--border-radius-full);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-6);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}

.form-control,
.form-select,
input.input,
select {
  width: 100%;
  padding: var(--spacing-3) var(--spacing-4);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--white);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
}

.form-control:focus,
.form-select:focus,
input.input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-lightest);
}

.form-control:disabled,
.form-select:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--gray-400);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-xl);


  box-shadow: var(--shadow-xl);}

.card-header {
  padding: var(--spacing-4) var(--spacing-6);
  border-bottom: 1px solid var(--border-color);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.card-body {
  padding: var(--spacing-6);
}

.card-footer {
  padding: var(--spacing-4) var(--spacing-6);
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  width: 100%;
}

@media (max-width: 640px) {
  .staff-grid {
    grid-template-columns: 1fr;
  }
}

.staff-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.staff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
}

.staff-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(75, 88, 160, 0.15);
}

.staff-card-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
}

.staff-card-avatar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.staff-card-content {
  padding: clamp(1rem, 2.5vw, 1.25rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.625rem);
  flex: 1;
}

.staff-card-name {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
}

.staff-card-role {
  font-size: clamp(0.875rem, 2vw, 0.938rem);
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.4;
  margin: 0;
}

.staff-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.staff-meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: clamp(0.75rem, 1.5vw, 0.813rem);
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-lightest);
  border-radius: 6px;
  white-space: nowrap;
}

.staff-meta-specialty {
  color: #1e40af;
  background: #dbeafe;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-card-dept {
  font-size: clamp(0.813rem, 2vw, 0.875rem);
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  padding-top: clamp(0.375rem, 1vw, 0.5rem);
  border-top: 1px solid #f3f4f6;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-full);
  white-space: nowrap;
}

.badge-primary,
.tag.is-primary {
  background: var(--primary-lightest);
  color: var(--primary-dark);
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-info,
.tag.is-info {
  background: #dbeafe;
  color: #1e40af;
}


/* ============================================
   CONTAINERS & LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-6);
}

.section {
  padding: var(--spacing-12) 0;
}

.box {
  background: var(--white);
  border-radius: clamp(12px, 2vw, 16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: var(--spacing-12) 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrapper {
  margin-bottom: var(--spacing-6);
  animation: fadeInScale 0.8s ease-out;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
}

.hero-logo:hover {

}

.hero-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-4);
  line-height: var(--line-height-tight);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  opacity: 0.95;
  margin-bottom: var(--spacing-8);
  line-height: var(--line-height-relaxed);
  max-width: 800px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1rem);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  padding-bottom: clamp(0.75rem, 2vw, 1rem);
  border-bottom: 1px solid #f3f4f6;
}


  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 12vw, 56px);
  height: clamp(48px, 12vw, 56px);
  min-width: clamp(48px, 12vw, 56px);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: clamp(10px, 2vw, 12px);
  color: var(--white);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  box-shadow: 0 4px 12px rgba(75, 88, 160, 0.25);
  flex-shrink: 0;
}

.section-icon-wrapper:hover {
  box-shadow: 0 6px 16px rgba(75, 88, 160, 0.35);
}

.section-title-group {
  flex: 1;
}

.section-title {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0 0 clamp(0.125rem, 1vw, 0.25rem) 0;
  line-height: var(--line-height-tight);
}

.section-subtitle {
  font-size: clamp(0.813rem, 2vw, 0.875rem);
  color: var(--text-secondary);
  margin: 0;
  line-height: var(--line-height-normal);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--spacing-12) 0 var(--spacing-6);
  margin-top: auto;
}

.footer a {
  color: var(--footer-link);
}

.footer a:hover {
  color: var(--footer-link-hover);
}

.footer-stats {
  display: flex;
  gap: var(--spacing-8);
  justify-content: center;
  margin-bottom: var(--spacing-6);
}

.footer-stat {
  text-align: center;
}

.footer-stat-number {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  display: block;
  margin-bottom: var(--spacing-2);
  color: var(--footer-link);
}

.footer-stat-label {
  font-size: var(--font-size-sm);
  opacity: 0.8;
}

.footer-copyright {
  text-align: center;
  padding-top: var(--spacing-6);
  border-top: 1px solid var(--footer-border);
  opacity: 0.7;
  font-size: var(--font-size-sm);
}

/* ============================================
   QUICK SEARCH COMPONENT - Mobile First 2025
   ============================================ */
.quick-search-wrapper {
  background: transparent;
  padding: 0;
  margin: 0;
}

.quick-search-container {
  background: var(--white);
  border-radius: clamp(12px, 2vw, 16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.quick-search-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.quick-search-header i {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--primary-color);
  flex-shrink: 0;
  margin-bottom: 0;
}

.quick-search-title {
  font-size: clamp(1.125rem, 4vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.quick-search-form {
  position: relative;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.search-input-group:hover {
  border-color: #d1d5db;
  background: var(--white);

  border-color: #d1d5db;
  background: var(--white);}

.search-input-group:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-lightest);
  background: var(--white);
}

.search-input-icon {
  position: absolute;
  left: clamp(0.875rem, 3vw, 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: clamp(1.125rem, 4vw, 1.25rem);
  pointer-events: none;
  z-index: 1;
  flex-shrink: 0;
}

.search-input-group:focus-within .search-input-icon {
  color: var(--primary-color);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: clamp(0.875rem, 3vw, 1.125rem) clamp(0.875rem, 3vw, 1.25rem) clamp(0.875rem, 3vw, 1.125rem) clamp(2.75rem, 8vw, 3.5rem);
  font-size: clamp(0.9375rem, 2vw, 1rem);
  color: var(--text-primary);
  background: transparent;
  font-weight: 400;
  line-height: 1.5;
  min-height: 52px;
  width: 100%;
}

.search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.search-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.375rem, 1vw, 0.5rem);
  padding: clamp(0.875rem, 3vw, 1.125rem) clamp(1rem, 3vw, 1.5rem);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  cursor: pointer;
  white-space: nowrap;
  min-height: 52px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.search-submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 12px rgba(75, 88, 160, 0.3);

  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 12px rgba(75, 88, 160, 0.3);}

.search-submit-btn:active {

}

.search-submit-btn i {
  font-size: clamp(1.125rem, 3vw, 1.25rem);
}

.search-submit-btn:hover i {

}

.search-submit-btn span {
  display: none;
}

.search-suggestions {
  margin-top: clamp(0.875rem, 2vw, 1.25rem);
  padding: clamp(0.75rem, 2vw, 1rem);
  background: #fef3c7;
  border-radius: 10px;
  border: 1px solid #fbbf24;
}

.search-suggestions small {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.375rem, 1vw, 0.5rem);
  color: #92400e;
  font-size: clamp(0.8125rem, 2vw, 0.875rem);
  line-height: 1.5;
  text-align: center;
}

.search-suggestions i {
  color: #f59e0b;
  font-size: clamp(0.9375rem, 2vw, 1rem);
  flex-shrink: 0;
}

/* ============================================
   ADVANCED SEARCH COMPONENT - Bootstrap 5
   ============================================ */
.icon-badge {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.filter-staff {
  background: var(--white);
  border-radius: clamp(12px, 2vw, 16px);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.filter-staff-form {
  width: 100%;
}

.filter-staff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.25rem);
  align-items: end;
}

@media (min-width: 768px) {
  .filter-staff-grid {
    grid-template-columns: 2fr 1.5fr auto;
  }
}

.filter-staff-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: clamp(0.813rem, 2vw, 0.875rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.filter-select {
  width: 100%;
  padding: clamp(0.625rem, 2vw, 0.75rem) clamp(0.875rem, 2.5vw, 1rem);
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--text-primary);
  background: var(--white);
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234b5563' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right clamp(0.75rem, 2vw, 1rem) center;
  background-size: 14px;
  padding-right: clamp(2.25rem, 5vw, 2.5rem);
}

.filter-select:hover {
  border-color: #d1d5db;
  background-color: #fafafa;
}

.filter-select:focus {
  border-color: var(--primary-color);
  background-color: var(--white);
  box-shadow: 0 0 0 3px var(--primary-lightest);
}

.filter-staff-actions {
  display: flex;
  gap: 0.625rem;
  align-items: stretch;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(0.625rem, 2vw, 0.75rem) clamp(1rem, 2.5vw, 1.25rem);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
}

.filter-btn i {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.filter-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(75, 88, 160, 0.25);
}

.filter-btn-primary:hover {
  box-shadow: 0 4px 12px rgba(75, 88, 160, 0.35);
  opacity: 0.95;
}

.filter-btn-primary:active {
  opacity: 0.9;
}

.filter-btn-secondary {
  min-width: clamp(2.5rem, 8vw, 2.75rem);
  background: var(--white);
  color: var(--text-secondary);
  border: 2px solid #e5e7eb;
}

.filter-btn-secondary:hover {
  background: #fafafa;
  border-color: #d1d5db;
  color: var(--text-primary);
}

.filter-btn-secondary:active {
  background: #f3f4f6;
}

@media (max-width: 767px) {
  .filter-btn span {
    display: inline;
  }
}

[dir="rtl"] .filter-select {
  background-position: left clamp(0.75rem, 2vw, 1rem) center;
  padding-right: clamp(0.875rem, 2.5vw, 1rem);
  padding-left: clamp(2.25rem, 5vw, 2.5rem);
}

/* Search Results Header */
.search-results-header {
  padding: var(--spacing-4);
  background: var(--gray-50);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-6);
  border-left: 4px solid var(--primary-color);
}

.page-settings {
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.settings-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.settings-page-header {
  margin-bottom: clamp(2rem, 5vw, 2.5rem);
}

.settings-page-title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 clamp(0.5rem, 2vw, 0.75rem) 0;
  line-height: 1.2;
}

.settings-page-subtitle {
  font-size: clamp(0.938rem, 2vw, 1.063rem);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.5rem);
}

.settings-section {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.settings-section-active {
  border-color: var(--primary-color);
}

.settings-section-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.25rem);
  padding: clamp(1.25rem, 3vw, 1.5rem);
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.settings-section-active .settings-section-header {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
}

.settings-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 10vw, 48px);
  height: clamp(40px, 10vw, 48px);
  background: var(--white);
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  flex-shrink: 0;
}

.settings-section-active .settings-section-icon {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

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

.settings-section-title {
  font-size: clamp(1.063rem, 2.5vw, 1.188rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 clamp(0.25rem, 1vw, 0.375rem) 0;
  line-height: 1.3;
}

.settings-section-desc {
  font-size: clamp(0.875rem, 2vw, 0.938rem);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.settings-badge {
  display: inline-flex;
  align-items: center;
  padding: clamp(0.25rem, 1vw, 0.375rem) clamp(0.625rem, 2vw, 0.75rem);
  font-size: clamp(0.75rem, 1.5vw, 0.813rem);
  font-weight: 600;
  color: #6366f1;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  white-space: nowrap;
}

.settings-section-content {
  padding: clamp(1.5rem, 3vw, 2rem);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.settings-form-notice {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  padding: clamp(1rem, 2.5vw, 1.25rem);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.settings-form-notice i {
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.settings-notice-title {
  font-size: clamp(0.875rem, 2vw, 0.938rem);
  font-weight: 600;
  color: #1e40af;
  margin: 0 0 clamp(0.5rem, 1.5vw, 0.625rem) 0;
  line-height: 1.4;
}

.settings-notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(0.375rem, 1vw, 0.5rem);
}

.settings-notice-list li {
  font-size: clamp(0.813rem, 2vw, 0.875rem);
  color: #1e40af;
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.settings-notice-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: 700;
}

[dir="rtl"] .settings-notice-list li {
  padding-left: 0;
  padding-right: 1rem;
}

[dir="rtl"] .settings-notice-list li::before {
  left: auto;
  right: 0;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 1.5rem);
}

@media (min-width: 640px) {
  .settings-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-form-field:first-child {
    grid-column: 1 / -1;
  }
}

.settings-form-field {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.625rem);
}

.settings-label {
  font-size: clamp(0.875rem, 2vw, 0.938rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.settings-input {
  width: 100%;
  padding: clamp(0.75rem, 2vw, 0.875rem) clamp(1rem, 2.5vw, 1.125rem);
  font-size: clamp(0.938rem, 2vw, 1rem);
  color: var(--text-primary);
  background: var(--white);
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}

.settings-input:hover {
  border-color: #d1d5db;
}

.settings-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-lightest);
}

.settings-form-actions {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1rem);
  padding-top: clamp(0.75rem, 2vw, 1rem);
  border-top: 1px solid #e5e7eb;
}

.settings-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 0.625rem);
  padding: clamp(0.75rem, 2vw, 0.875rem) clamp(1.5rem, 3vw, 2rem);
  font-size: clamp(0.938rem, 2vw, 1rem);
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  min-height: 48px;
}

.settings-action i {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.settings-action-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(75, 88, 160, 0.25);
}

.settings-action-primary:hover {
  box-shadow: 0 4px 12px rgba(75, 88, 160, 0.35);
  opacity: 0.95;
}

.settings-action-primary:active {
  opacity: 0.9;
}

@media (min-width: 640px) {
  .settings-action-primary {
    flex: 0 1 auto;
  }

  .settings-form-actions {
    justify-content: flex-end;
  }

  [dir="rtl"] .settings-form-actions {
    justify-content: flex-start;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white { color: var(--white) !important; }
.text-muted { color: var(--text-tertiary) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-white { background-color: var(--white) !important; }
.bg-gray { background-color: var(--bg-tertiary) !important; }

.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-none { display: none !important; }

.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.gap-2 { gap: var(--spacing-2) !important; }
.gap-3 { gap: var(--spacing-3) !important; }
.gap-4 { gap: var(--spacing-4) !important; }
.gap-6 { gap: var(--spacing-6) !important; }

.m-0 { margin: 0 !important; }
.mt-2 { margin-top: var(--spacing-2) !important; }
.mt-3 { margin-top: var(--spacing-3) !important; }
.mt-4 { margin-top: var(--spacing-4) !important; }
.mt-6 { margin-top: var(--spacing-6) !important; }
.mb-2 { margin-bottom: var(--spacing-2) !important; }
.mb-3 { margin-bottom: var(--spacing-3) !important; }
.mb-4 { margin-bottom: var(--spacing-4) !important; }
.mb-6 { margin-bottom: var(--spacing-6) !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-4 { margin-top: var(--spacing-4) !important; margin-bottom: var(--spacing-4) !important; }
.my-6 { margin-top: var(--spacing-6) !important; margin-bottom: var(--spacing-6) !important; }

.p-0 { padding: 0 !important; }
.p-3 { padding: var(--spacing-3) !important; }
.p-4 { padding: var(--spacing-4) !important; }
.p-6 { padding: var(--spacing-6) !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.rounded { border-radius: var(--border-radius-md) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-full { border-radius: var(--border-radius-full) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.hide, .hidden { display: none !important; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and below */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }

  body {
    padding-top: var(--header-height);
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-icon img {
    width: 30px;
    height: 30px;
  }

  .hero {
    padding: var(--spacing-8) 0;
  }

  .hero-logo {
    width: 100px;
    height: 100px;
    padding: var(--spacing-3);
  }

  .hero-logo-wrapper {
    margin-bottom: var(--spacing-4);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
    padding: 0 var(--spacing-4);
  }

  .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-3);
  }

  .section-icon-wrapper {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .section-title-group {
    text-align: center;
  }

  .footer-stats {
    flex-direction: column;
    gap: var(--spacing-4);
  }

  .btn-lg {
    padding: var(--spacing-3) var(--spacing-6);
    font-size: var(--font-size-base);
  }

  .staff-card {
    max-width: 100%;
  }

  /* Search Components Mobile */
  .search-submit-btn span {
    display: inline;
  }

  .advanced-search-container {
    padding: var(--spacing-6) var(--spacing-4);
  }

  .icon-badge {
    width: 48px;
    height: 48px;
  }

  .icon-badge i {
    font-size: 1.5rem;
  }

  .advanced-search-title {
    font-size: var(--font-size-xl);
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
  }

  .btn-export {
    width: 100%;
    height: 48px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-4);
  }

  .box {
    padding: var(--spacing-4);
  }

  .section {
    padding: var(--spacing-8) 0;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .btn {
    width: 100%;
  }
}

/* Desktop and above - Hide sidebar, show navbar */
@media (min-width: 1024px) {
  /* Hide sidebar completely on desktop */
  .sidebar {
    display: none;
  }

  .sidebar-overlay {
    display: none;
  }

  /* No need for toggle-sidebar class on desktop */
  .toggle-sidebar .sidebar {
    display: none;
  }

  /* Remove body padding since no sidebar */
  body {
    padding-left: 0;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


  to {
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

.animate-slide-in {
  animation: slideInRight var(--transition-base) ease-out;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .sidebar,
  .footer,
  .btn,
  .toggle-sidebar-btn {
    display: none !important;
  }

  body {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--border-color);
  }
}

/* ============================================
   RTL (RIGHT-TO-LEFT) SUPPORT
   ============================================ */

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Header RTL */
[dir="rtl"] .header .container-fluid {
  direction: rtl;
}

[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

[dir="rtl"] .logo-text {
  text-align: right;
}

[dir="rtl"] .toggle-sidebar-btn {
  margin-right: 0;
  margin-left: auto;
}

/* Desktop Navigation RTL */
[dir="rtl"] .navbar-nav-desktop {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-link-desktop {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-link-desktop i {
  margin-right: 0;
  margin-left: 0.25rem;
}

/* Sidebar RTL */
[dir="rtl"] .sidebar {
  left: auto;
  right: -var(--sidebar-width);
}

[dir="rtl"] .toggle-sidebar .sidebar {
  left: auto;
  right: 0;
}

[dir="rtl"] .sidebar-nav .nav-link {
  text-align: right;
  flex-direction: row-reverse;
}

[dir="rtl"] .sidebar-nav .nav-link::before {
  right: auto;
  left: 0;
}

[dir="rtl"] .sidebar-nav .nav-link i {
  margin-right: 0;
  margin-left: var(--spacing-3);
}

/* Search Components RTL */
[dir="rtl"] .quick-search-container {
  text-align: right;
}

[dir="rtl"] .quick-search-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-input-group {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-input-icon {
  left: auto;
  right: clamp(0.875rem, 3vw, 1.25rem);
}

[dir="rtl"] .search-input {
  padding: clamp(0.875rem, 3vw, 1.125rem) clamp(2.75rem, 8vw, 3.5rem) clamp(0.875rem, 3vw, 1.125rem) clamp(0.875rem, 3vw, 1.25rem);
  text-align: right;
}

[dir="rtl"] .search-submit-btn:active i {

}

@media (hover: hover) {
  [dir="rtl"] .search-submit-btn:hover i {

  }
}

[dir="rtl"] .search-suggestions small {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-submit-btn {
  border-radius: clamp(10px, 2vw, 14px) 0 0 clamp(10px, 2vw, 14px);
}

[dir="rtl"] .search-suggestions {
  text-align: right;
}

/* Advanced Search RTL */
[dir="rtl"] .advanced-search-header {
  text-align: right;
}

[dir="rtl"] .advanced-search-header .d-flex {
  flex-direction: row-reverse;
}

[dir="rtl"] .filter-label {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .select-arrow {
  left: clamp(0.75rem, 2vw, 1rem);
  right: auto;
}

[dir="rtl"] .custom-select {
  padding: clamp(0.75rem, 2vw, 0.875rem) clamp(0.875rem, 2vw, 1rem) clamp(0.75rem, 2vw, 0.875rem) clamp(2.5rem, 8vw, 3rem);
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .action-buttons {
  flex-direction: row-reverse;
}

/* Cards RTL */
[dir="rtl"] .staff-card-content {
  text-align: right;
}

[dir="rtl"] .staff-card-name,
[dir="rtl"] .staff-card-role,
[dir="rtl"] .staff-card-dept {
  text-align: right;
}

[dir="rtl"] .card-badge {
  right: auto;
  left: var(--spacing-4);
}

/* Forms RTL */
[dir="rtl"] .form-label {
  text-align: right;
}

[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
  text-align: right;
}

[dir="rtl"] .input-group {
  flex-direction: row-reverse;
}

[dir="rtl"] .input-group-text {
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

[dir="rtl"] .input-group .form-control {
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

/* Buttons RTL */
[dir="rtl"] .btn i {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .btn i:last-child {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Footer RTL */
[dir="rtl"] .footer {
  text-align: center;
}

[dir="rtl"] .footer-stats {
  direction: rtl;
}

[dir="rtl"] .footer-social a {
  margin: 0 0 0 var(--spacing-3);
}

[dir="rtl"] .footer-social a:last-child {
  margin-left: 0;
}

/* Hero Section RTL */
[dir="rtl"] .hero {
  text-align: center;
}

[dir="rtl"] .hero-content {
  text-align: center;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle {
  text-align: center;
}

[dir="rtl"] .hero-logo-wrapper {
  direction: ltr;
}

/* Box Component RTL */
[dir="rtl"] .box {
  text-align: right;
}

/* Section Headers RTL */
[dir="rtl"] .section-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .section-title-group {
  text-align: right;
}

[dir="rtl"] .section-icon-wrapper {
  margin-left: 0;
  margin-right: 0;
}

[dir="rtl"] .d-flex {
  direction: rtl;
}

[dir="rtl"] .align-items-center.gap-3 i {
  margin-right: 0;
}

/* Search Results Header RTL */
[dir="rtl"] .search-results-header .d-flex {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-results-header i {
  margin-right: 0;
  margin-left: 1rem;
}

/* Modal RTL */
[dir="rtl"] .modal-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .modal-title {
  text-align: right;
  margin-right: 0;
  margin-left: auto;
}

[dir="rtl"] .btn-close {
  margin-right: auto;
  margin-left: 0;
}

/* Table RTL */
[dir="rtl"] .table {
  text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}

/* Alerts RTL */
[dir="rtl"] .alert {
  text-align: right;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-right: 0;
  padding-left: 0.5rem;
  content: "\\";
}

/* Pagination RTL */
[dir="rtl"] .pagination {
  flex-direction: row-reverse;
}

/* Dropdown RTL */
[dir="rtl"] .dropdown-menu {
  text-align: right;
  right: 0;
  left: auto;
}

[dir="rtl"] .dropdown-item {
  text-align: right;
}

/* Badge RTL */
[dir="rtl"] .badge {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* List Group RTL */
[dir="rtl"] .list-group {
  padding-right: 0;
  text-align: right;
}

[dir="rtl"] .list-group-item {
  text-align: right;
}

/* Nav Tabs/Pills RTL */
[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-tabs .nav-link,
[dir="rtl"] .nav-pills .nav-link {
  text-align: right;
}

/* Card RTL */
[dir="rtl"] .card {
  text-align: right;
}

[dir="rtl"] .card-header,
[dir="rtl"] .card-body,
[dir="rtl"] .card-footer {
  text-align: right;
}

/* Icon Spacing RTL */
[dir="rtl"] .bi,
[dir="rtl"] i {
  margin-right: 0;
}

[dir="rtl"] .me-1 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

[dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

[dir="rtl"] .ms-1 {
  margin-left: 0 !important;
  margin-right: 0.25rem !important;
}

[dir="rtl"] .ms-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

[dir="rtl"] .gap-2,
[dir="rtl"] .gap-3 {
  direction: rtl;
}

/* Text Alignment RTL */
[dir="rtl"] .text-start {
  text-align: right !important;
}

[dir="rtl"] .text-end {
  text-align: left !important;
}

/* Float RTL */
[dir="rtl"] .float-start {
  float: right !important;
}

[dir="rtl"] .float-end {
  float: left !important;
}

/* Sidebar Overlay RTL */
[dir="rtl"] .sidebar-overlay {
  right: 0;
  left: 0;
}

/* Admin Cards RTL */
[dir="rtl"] .admins {
  direction: rtl;
}

/* Error Pages RTL */
[dir="rtl"] .error-page {
  text-align: center;
}

/* Profile Bio Page RTL */
[dir="rtl"] .bio-header,
[dir="rtl"] .bio-section {
  text-align: right;
}

[dir="rtl"] .bio-header .d-flex {
  flex-direction: row-reverse;
}

/* Publications RTL */
[dir="rtl"] .publication-item {
  text-align: right;
}

[dir="rtl"] .publication-item .d-flex {
  flex-direction: row-reverse;
}

/* Stats Cards RTL */
[dir="rtl"] .stats-card {
  text-align: center;
}

/* Flex Row Reverse for RTL */
[dir="rtl"] .flex-row-reverse {
  flex-direction: row !important;
}

[dir="rtl"] .row {
  direction: rtl;
}

/* Grid RTL Fix */
[dir="rtl"] .col,
[dir="rtl"] [class*="col-"] {
  text-align: right;
}

/* Button Group RTL */
[dir="rtl"] .btn-group {
  flex-direction: row-reverse;
}

/* Input Group RTL Additional */
[dir="rtl"] .input-group-text:first-child {
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

[dir="rtl"] .input-group-text:last-child {
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

/* Offcanvas RTL */
[dir="rtl"] .offcanvas-start {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

[dir="rtl"] .offcanvas-end {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

/* Toast RTL */
[dir="rtl"] .toast {
  text-align: right;
}

/* Progress Bar RTL */
[dir="rtl"] .progress {
  direction: ltr;
}

/* Carousel RTL */
[dir="rtl"] .carousel-control-prev {
  right: 0;
  left: auto;
}

[dir="rtl"] .carousel-control-next {
  left: 0;
  right: auto;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
  [dir="rtl"] .sidebar {
    right: -var(--sidebar-width);
    left: auto;
  }

  [dir="rtl"] .toggle-sidebar .sidebar {
    right: 0;
    left: auto;
  }

  [dir="rtl"] .search-input {
    padding: var(--spacing-3) var(--spacing-10) var(--spacing-3) var(--spacing-4);
  }

  [dir="rtl"] .header .row {
    flex-direction: row;
  }

  [dir="rtl"] .toggle-sidebar-btn {
    order: 3;
  }
}
