@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #10b981;
  --danger: #ef4444;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

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

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.text-primary {
  color: var(--primary);
}

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

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--secondary);
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.2);
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--glass-shadow);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-control {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: scale(1.01);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--background);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* Action Buttons */
.btn-action-approve,
.btn-action-reject,
.btn-action-suspend {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-action-approve {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.btn-action-approve:hover {
  background: #059669;
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.btn-action-reject {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-action-reject:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-action-suspend {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}

.btn-action-suspend:hover {
  background: #d97706;
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

/* Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-left-width: 6px;
}

.stat-card h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card p {
  font-size: 2.2rem;
  color: var(--text-main);
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Sidebar Premium Hover Rules */
.sidebar a {
  position: relative;
  transition: var(--transition);
  padding: 0.75rem 1.25rem !important;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--secondary);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.sidebar a:hover::before,
.sidebar a.active::before {
  transform: scaleY(1);
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: white !important;
  padding-left: 1.6rem !important;
}

/* Modern Tables styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
}

table tr {
  transition: background-color 0.2s ease;
}

table tr:hover {
  background-color: rgba(79, 70, 229, 0.02);
}

/* Premium Badges */
.badge {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.68rem !important;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 999px;
}

/* ==========================================================================
   PREMIUM PAGINATION UI
   ========================================================================== */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pagination-links {
  display: flex;
  gap: 0.25rem;
}

.pagination-links a,
.pagination-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-main);
  transition: all 0.2s;
}

.pagination-links a:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.pagination-links .active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination-links .disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Content FadeIn Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.main-content {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   DASHBOARD LAYOUT (Unified)
   ========================================================================== */
.layout-body {
  display: flex;
  margin: 0;
  padding: 0;
  background: #f1f5f9;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

/* Ultra-Premium Animated Dashboard Background */
.layout-body::before,
.layout-body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: floatBg 20s infinite ease-in-out alternate;
}

.layout-body::before {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.35) 0%, transparent 70%);
}

.layout-body::after {
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  animation-delay: -10s;
}

@keyframes floatBg {
  0% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.1) translate(5%, 5%);
  }

  100% {
    transform: scale(0.9) translate(-5%, -5%);
  }
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 2rem 1rem;
  overflow-y: auto;
  z-index: 100;
}

.sidebar h2 {
  color: var(--primary);
  margin-bottom: 2rem;
  font-family: 'Outfit';
  text-align: center;
}

.sidebar a {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem !important;
  color: #cbd5e1;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
  font-weight: 500;
}

.sidebar a:hover,
.sidebar a.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  padding-left: 1.25rem !important;
  /* Override the old shift effect */
}

.sidebar a::before {
  display: none !important;
  /* Remove old line effect */
}

.main-content {
  flex: 1;
  padding: 1rem 1.25rem;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  min-height: 46px;
}

.topbar-profile-badge {
  padding: 0.25rem 0.65rem !important;
  gap: 0.6rem !important;
  background: #f8fafc !important;
  border-radius: 2rem !important;
  border: 1px solid var(--border) !important;
}

.topbar-profile-badge img,
.topbar-profile-badge div[style*="width: 36px"] {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.85rem !important;
}

.topbar-profile-text span {
  font-size: 0.825rem !important;
}

.topbar-profile-text small {
  font-size: 0.68rem !important;
}

.topbar-right-gap {
  gap: 1rem !important;
}

.topbar-right-gap a[href*="notifications"] {
  font-size: 1.15rem !important;
}

/* Scrollbar tweaks */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS RULES (Mobile-first Viewport overrides under 768px)
   ========================================================================== */
.cs-mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-main);
  padding: 0.25rem;
}

.cs-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cs-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  body.layout-body {
    flex-direction: column;
  }

  .cs-mobile-nav-toggle {
    display: block;
  }

  /* Slide-in Sidebar */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -300px !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 100 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5) !important;
    padding: 2rem 1.5rem !important;
  }

  .sidebar.active {
    left: 0 !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  /* Topbar with Hamburger - App Like */
  .topbar {
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 0 0 1rem 1rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  }

  .topbar>div {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .topbar-right-gap {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important; /* Proper spacing for bell and profile */
  }

  /* Fix notification bell jumping */
  .topbar-right-gap a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    width: 40px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    text-decoration: none !important;
  }
  
  .topbar-right-gap a span {
    font-size: 1.25rem !important;
  }

  .topbar-profile-badge {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
  }

  .topbar-profile-badge img {
    width: 40px !important;
    height: 40px !important;
  }

  .topbar-profile-text {
    display: none !important;
  }

  .mobile-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .back-btn {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .back-btn span {
    display: none !important;
    /* Hide arrow to save space if needed, or keep it */
  }

  /* Mobile Dashboard Grids: Force 2 items per row */
  .dashboard-stats-grid,
  .dashboard-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .dashboard-cards-grid .dash-card {
    padding: 1rem 0.5rem !important;
  }

  .dashboard-cards-grid .dash-icon {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }

  .dashboard-cards-grid .dash-title {
    font-size: 0.9rem !important;
  }

  .dashboard-stats-grid .card {
    padding: 1rem !important;
  }

  .dashboard-stats-grid .card h3 {
    font-size: 1.5rem !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Forms alignment */
  .form-group {
    margin-bottom: 0.75rem !important;
  }
}

/* Global Responsive Grid Helpers */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-2-1col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.form-row-mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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


  /* Premium Table Wrapper */
  .cs-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
  }

  .cs-table-wrapper table {
    margin-top: 0;
    border: none;
    box-shadow: none;
    white-space: nowrap;
  }

  /* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
  .toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 99999;
    pointer-events: none;
  }

  .toast {
    pointer-events: auto;
    background: #ffffff !important;
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--primary);
    min-width: 280px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
  }

  .toast.show {
    transform: translateX(0);
    opacity: 1;
  }

  .toast.success {
    border-left-color: var(--secondary);
  }

  .toast.error {
    border-left-color: var(--danger);
  }

  .toast.info {
    border-left-color: var(--primary);
  }

  .toast-message {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
  }

  /* ==========================================================================
   PREMIUM AUTHENTICATION STYLES (Login / Register)
   ========================================================================== */
  .auth-wrapper {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
  }

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

    50% {
      background-position: 100% 50%;
    }

    100% {
      background-position: 0% 50%;
    }
  }

  .auth-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .auth-card.register-card {
    max-width: 900px;
  }

  .auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .auth-header h2 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
  }

  .auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  /* Floating Label Inputs */
  .floating-group {
    position: relative;
    margin-bottom: 1.5rem;
  }

  .floating-group .form-control {
    width: 100%;
    padding: 1.25rem 1rem 0.5rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
  }

  .floating-group .form-control:focus,
  .floating-group .form-control:not(:placeholder-shown) {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
  }

  .floating-label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s ease-out;
    transform-origin: left top;
  }

  .floating-group .form-control:focus~.floating-label,
  .floating-group .form-control:not(:placeholder-shown)~.floating-label {
    top: 12px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
  }

  /* Auth specific buttons */
  .btn-auth {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5);
    border: none;
    color: white;
    width: 100%;
    margin-top: 1rem;
  }

  .btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px rgba(79, 70, 229, 0.6);
  }

  .auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
  }

  .auth-footer a {
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s;
  }

  .auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
  }

  /* Validation Error Styles */
  .invalid-feedback {
    display: none;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    font-weight: 500;
    animation: fadeInUp 0.2s ease forwards;
  }

  .form-control.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  }

  .form-control.is-invalid~.invalid-feedback {
    display: block;
  }

  /* Registration Section Headers */
  .reg-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
  }

  .reg-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
  }

  /* Dark Filter Section */
  .filter-section-dark {
    background: #0f172a !important;
    border: 1px solid #020617 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
  }

  .filter-section-dark label {
    color: #cbd5e1 !important;
  }

  .filter-section-dark .form-control {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
  }

  .filter-section-dark .form-control::placeholder {
    color: #94a3b8 !important;
  }

  .filter-section-dark .form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
  }

  .filter-section-dark .btn-outline {
    border-color: #475569 !important;
    color: #cbd5e1 !important;
  }

  .filter-section-dark .btn-outline:hover {
    background: #334155 !important;
    color: #ffffff !important;
  }

  .filter-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1rem !important;
    align-items: flex-end !important;
    width: 100% !important;
  }

  .filter-grid>.form-group {
    flex: 1 1 0 !important;
    min-width: 100px !important;
    margin-bottom: 0 !important;
  }

  .filter-grid>div:last-child {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  @media (max-width: 768px) {
    .filter-grid {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: wrap !important;
      gap: 0.4rem !important;
    }

    .filter-grid>.form-group {
      flex: 1 1 calc(50% - 0.4rem) !important;
      min-width: 120px !important;
    }

    .filter-grid>div:last-child {
      flex: 1 1 100% !important;
      margin-top: 0.5rem !important;
      justify-content: stretch !important;
    }

    .filter-grid>div:last-child .btn {
      flex: 1 !important;
    }

    .filter-section-dark label {
      font-size: 0.6rem !important;
      margin-bottom: 0 !important;
    }

    .filter-section-dark .form-control {
      font-size: 0.7rem !important;
      padding: 0.2rem 0.3rem !important;
      height: 28px !important;
    }

    .filter-section-dark {
      padding: 0.4rem !important;
      margin-bottom: 0.75rem !important;
      border-radius: 0.5rem !important;
    }

    .filter-grid .btn, .filter-section-dark .btn {
      padding: 0.2rem 0.4rem !important;
      font-size: 0.7rem !important;
      height: 28px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    /* Make the button container span 2 columns so they are full width at the bottom */
    .filter-grid>div:last-child {
      grid-column: 1 / -1;
      margin-top: 0.2rem;
    }

    /* GLOBAL FIX: Make all flex-based forms inside filters fully responsive */
    .filter-section-dark form {
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 0.4rem !important;
    }

    .filter-section-dark form>* {
      flex: 1 1 calc(50% - 0.4rem) !important;
      min-width: 120px !important;
      margin-bottom: 0 !important;
    }

    .filter-section-dark form>div[style*="justify-content: flex-end"],
    .filter-section-dark form>button,
    .filter-section-dark form>a.btn {
      flex: 1 1 100% !important;
      margin-top: 0.2rem !important;
    }
  }

  /* Tracking Header responsive */
  .tracking-header {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
  }

  @media (max-width: 768px) {
    .tracking-header {
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 0.75rem !important;
      padding: 0.75rem 1rem !important;
    }

    .tracking-header select {
      width: 100% !important;
    }
  }

  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.7),
  0 0 0 6px rgba(251, 191, 36, 0.2);
}

@media (max-width: 768px) {
  .dark-mode-toggle {
    bottom: 5rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}