/* ============================================
   APPLYBOARD AFRICA - USER DASHBOARD STYLES
   Modern, Elegant Dashboard Design
   ============================================ */

/* CSS Variables - Matching Guest Theme */
:root {
  /* Base Colors */
  --white: #ffffff;
  --black: #000000;

  /* Primary Colors */
  --primary-50: #e8f4f8;
  --primary-100: #c5e4ed;
  --primary-200: #9fd3e2;
  --primary-300: #78c1d7;
  --primary-400: #5bb3ce;
  --primary-500: #3ea5c5;
  --primary-600: #3897b7;
  --primary-700: #0f4c75;
  --primary-800: #0b3a5d;
  --primary-900: #072845;

  /* Accent/Gold Colors */
  --accent-50: #fdf8e8;
  --accent-100: #faedc6;
  --accent-200: #f7e1a1;
  --accent-300: #f4d47b;
  --accent-400: #f1ca5e;
  --accent-500: #d4a853;
  --accent-600: #c9a227;
  --accent-700: #a8871f;
  --accent-800: #876c18;
  --accent-900: #665110;

  /* Neutral Colors */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* Status Colors */
  --success-500: #10b981;
  --success-100: #d1fae5;
  --warning-500: #f59e0b;
  --warning-100: #fef3c7;
  --danger-500: #ef4444;
  --danger-100: #fee2e2;
  --info-500: #3b82f6;
  --info-100: #dbeafe;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ============================================
   BASE OVERRIDES
   ============================================ */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--neutral-100);
  color: var(--neutral-800);
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.app-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 260px;
  background: linear-gradient(
    180deg,
    var(--primary-800) 0%,
    var(--primary-900) 100%
  );
  border-right: none;
  box-shadow: var(--shadow-xl);
  z-index: 1040;
  transition: left 0.3s ease;
}

.app-sidebar .logo-box {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  overflow: hidden;
}

.app-sidebar .logo-box a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-sidebar .logo-box .logo-text {
  transition: opacity 0.3s ease, width 0.3s ease;
}

/* Hide logo text when sidebar is condensed/minimized */
html[data-sidebar-size="condensed"] .app-sidebar .logo-box .logo-text,
html[data-sidebar-size="sm"] .app-sidebar .logo-box .logo-text,
html[data-sidebar-size="sm-hover"]
  .app-sidebar:not(:hover)
  .logo-box
  .logo-text {
  display: none !important;
}

html[data-sidebar-size="condensed"] .app-sidebar .logo-box,
html[data-sidebar-size="sm"] .app-sidebar .logo-box {
  padding: 15px;
  text-align: center;
}

html[data-sidebar-size="condensed"] .app-sidebar .logo-box .logo-link,
html[data-sidebar-size="sm"] .app-sidebar .logo-box .logo-link {
  justify-content: center;
}

.app-sidebar .logo-box .logo-lg {
  height: 36px !important;
  filter: brightness(0) invert(1);
}

.app-sidebar .logo-box .logo-sm {
  height: 32px !important;
}

/* Sidebar Menu Items */
.app-sidebar .menu-title {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 20px 20px 10px;
  margin: 0;
}

.app-sidebar .navbar-nav {
  padding: 10px;
}

.app-sidebar .nav-item {
  margin-bottom: 4px;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.75) !important;
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  font-size: 14px;
  font-weight: 500;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-item.active > .nav-link {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: var(--neutral-900) !important;
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.app-sidebar .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.app-sidebar .nav-text {
  flex: 1;
}

/* Sidebar Toggle - Collapsed State */
[data-sidebar-size="sm"] .app-sidebar .nav-link {
  justify-content: center;
  padding: 12px;
}

[data-sidebar-size="sm"] .app-sidebar .nav-text,
[data-sidebar-size="sm"] .app-sidebar .menu-title {
  display: none;
}

/* ============================================
   TOPBAR / HEADER STYLES - REDESIGNED
   ============================================ */
.app-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 1040;
  padding-left: 260px;
  transition: padding-left 0.3s ease;
  overflow: visible;
}

.topbar-container {
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Left Section */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--neutral-600);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.topbar-toggle:hover {
  background: var(--neutral-100);
  color: var(--primary-600);
}

.topbar-toggle iconify-icon {
  font-size: 22px;
}

.topbar-brand {
  min-width: 0;
}

.brand-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Right Section */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 1050;
}

.topbar-right .dropdown {
  position: relative;
  z-index: 1;
}

/* Icon Button */
.topbar-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.topbar-icon-btn:hover {
  background: var(--neutral-200);
  color: var(--primary-600);
}

.topbar-icon-btn iconify-icon {
  font-size: 20px;
}

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: var(--danger-500);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* User Button */
.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: none;
  background: var(--neutral-100);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.topbar-user-btn:hover {
  background: var(--neutral-200);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
  color: white;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--neutral-500);
}

.user-arrow {
  font-size: 14px;
  color: var(--neutral-500);
}

/* Notification Dropdown */
.notification-dropdown {
  width: 340px;
  padding: 0;
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-100);
}

.notification-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}

.notification-body {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  text-decoration: none;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--neutral-100);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--neutral-50);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  color: var(--primary-600);
  flex-shrink: 0;
}

.notification-icon iconify-icon {
  font-size: 16px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-800);
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: var(--neutral-500);
}

.notification-empty {
  padding: 32px 20px;
  text-align: center;
}

.notification-empty iconify-icon {
  font-size: 32px;
  color: var(--neutral-400);
  margin-bottom: 8px;
}

.notification-empty p {
  margin: 0;
  font-size: 13px;
  color: var(--neutral-500);
}

.notification-footer {
  padding: 12px 20px;
  text-align: center;
  background: var(--neutral-50);
  border-top: 1px solid var(--neutral-100);
}

.notification-footer a {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  text-decoration: none;
}

.notification-footer a:hover {
  color: var(--primary-700);
}

/* User Dropdown */
.user-dropdown {
  width: 240px;
  padding: 8px;
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.user-dropdown-header {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--neutral-50);
  margin-bottom: 8px;
}

.user-dropdown-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}

.user-dropdown-header small {
  font-size: 12px;
  color: var(--neutral-500);
}

.user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--neutral-700);
  transition: var(--transition-fast);
}

.user-dropdown .dropdown-item:hover {
  background: var(--neutral-100);
}

.user-dropdown .dropdown-item.text-danger {
  color: var(--danger-600);
}

.user-dropdown .dropdown-item.text-danger:hover {
  background: var(--danger-50);
}

.user-dropdown .dropdown-item iconify-icon {
  font-size: 18px;
  color: var(--neutral-500);
}

.user-dropdown .dropdown-item.text-danger iconify-icon {
  color: var(--danger-500);
}

.user-dropdown .dropdown-divider {
  margin: 8px 0;
  border-color: var(--neutral-200);
}

/* Theme Toggle Icons */
html[data-bs-theme="dark"] .topbar-icon-btn .light-mode {
  display: inline;
}

html[data-bs-theme="dark"] .topbar-icon-btn .dark-mode {
  display: none;
}

html[data-bs-theme="light"] .topbar-icon-btn .light-mode {
  display: none;
}

html[data-bs-theme="light"] .topbar-icon-btn .dark-mode {
  display: inline;
}

/* Legacy support */
.topbar-button {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--neutral-600);
  transition: var(--transition-base);
  border: none;
  background: transparent;
  cursor: pointer;
}

.topbar-button:hover {
  background: var(--neutral-100);
  color: var(--primary-700);
}

/* ============================================
   PAGE CONTENT AREA
   ============================================ */
.page-content {
  padding: 24px;
  min-height: calc(100vh - 64px);
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

/* Page Title */
.page-title-box {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-200);
}

.page-title-box h4 {
  font-size: 24px;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0;
}

.page-title-box .breadcrumb {
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
}

.page-title-box .breadcrumb-item {
  font-size: 13px;
  color: var(--neutral-500);
}

.page-title-box .breadcrumb-item a {
  color: var(--primary-700);
  text-decoration: none;
}

.page-title-box .breadcrumb-item a:hover {
  text-decoration: underline;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  overflow: hidden;
}

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

.card-header {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-100);
  padding: 20px 24px;
  font-weight: 600;
  color: var(--neutral-900);
}

.card-header h5,
.card-header h6 {
  margin: 0;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

.card-footer {
  background: var(--neutral-50);
  border-top: 1px solid var(--neutral-100);
  padding: 16px 24px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 0;
  transition: var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-card .card-body {
  padding: 20px;
}

.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card .stat-icon.primary {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  color: var(--primary-700);
}

.stat-card .stat-icon.success {
  background: linear-gradient(135deg, var(--success-100), #ecfdf5);
  color: var(--success-500);
}

.stat-card .stat-icon.warning {
  background: linear-gradient(135deg, var(--warning-100), #fffbeb);
  color: var(--warning-500);
}

.stat-card .stat-icon.info {
  background: linear-gradient(135deg, var(--info-100), #eff6ff);
  color: var(--info-500);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--neutral-500);
  font-weight: 500;
}

/* ============================================
   QUICK ACTION CARDS
   ============================================ */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--white);
  border: 2px dashed var(--neutral-200);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--neutral-700);
  transition: var(--transition-base);
  cursor: pointer;
  min-height: 120px;
}

.quick-action-card:hover {
  border-color: var(--primary-500);
  border-style: solid;
  background: var(--primary-50);
  color: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-card .quick-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
  transition: var(--transition-base);
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-card h6 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

/* ============================================
   WELCOME BANNER
   ============================================ */
.welcome-banner {
  background: linear-gradient(
    135deg,
    var(--primary-700) 0%,
    var(--primary-500) 100%
  );
  border-radius: var(--radius-2xl);
  padding: 28px 32px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.welcome-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(212, 168, 83, 0.2) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.welcome-banner .welcome-content {
  position: relative;
  z-index: 1;
}

.welcome-banner h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-banner p {
  opacity: 0.9;
  margin-bottom: 0;
  font-size: 14px;
}

.welcome-banner .btn {
  background: var(--accent-500);
  color: var(--neutral-900);
  border: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

.welcome-banner .btn:hover {
  background: var(--accent-400);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.4);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  transition: var(--transition-base);
  border: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(15, 76, 117, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 76, 117, 0.4);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

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

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

.btn-outline-secondary {
  background: transparent;
  border: 2px solid var(--neutral-300);
  color: var(--neutral-700);
}

.btn-outline-secondary:hover {
  background: var(--neutral-100);
  border-color: var(--neutral-400);
}

/* ============================================
   TABLES
   ============================================ */
.table {
  margin: 0;
}

.table thead th {
  background: var(--neutral-50);
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 2px solid var(--neutral-200);
  white-space: nowrap;
}

.table tbody td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--neutral-100);
  color: var(--neutral-700);
  font-size: 14px;
}

.table tbody tr:hover {
  background: var(--neutral-50);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   BADGES / STATUS LABELS
   ============================================ */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-soft-success,
.badge.bg-success-subtle {
  background: var(--success-100) !important;
  color: #059669 !important;
}

.badge-soft-warning,
.badge.bg-warning-subtle {
  background: var(--warning-100) !important;
  color: #b45309 !important;
}

.badge-soft-danger,
.badge.bg-danger-subtle {
  background: var(--danger-100) !important;
  color: #dc2626 !important;
}

.badge-soft-info,
.badge.bg-info-subtle {
  background: var(--info-100) !important;
  color: #1d4ed8 !important;
}

.badge-soft-primary,
.badge.bg-primary-subtle {
  background: var(--primary-100) !important;
  color: var(--primary-700) !important;
}

.badge-soft-secondary,
.badge.bg-secondary-subtle {
  background: var(--neutral-200) !important;
  color: var(--neutral-700) !important;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-badge.active::before {
  background: var(--success-500);
}

.status-badge.pending::before {
  background: var(--warning-500);
}

.status-badge.completed::before {
  background: var(--info-500);
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  transition: var(--transition-base);
  color: var(--neutral-800);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(15, 76, 117, 0.1);
  outline: none;
}

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

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 8px;
}

.form-text {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 6px;
}

/* Input Groups */
.input-group .form-control {
  border-radius: var(--radius-lg);
}

.input-group-text {
  background: var(--neutral-100);
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  color: var(--neutral-600);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  font-size: 14px;
}

.alert-success {
  background: var(--success-100);
  color: #065f46;
}

.alert-warning {
  background: var(--warning-100);
  color: #92400e;
}

.alert-danger {
  background: var(--danger-100);
  color: #991b1b;
}

.alert-info {
  background: var(--info-100);
  color: #1e40af;
}

.alert-primary {
  background: var(--primary-100);
  color: var(--primary-800);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--neutral-200);
  overflow: hidden;
}

.progress-bar {
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-bar.bg-primary {
  background: linear-gradient(
    90deg,
    var(--primary-700),
    var(--primary-500)
  ) !important;
}

.progress-bar.bg-success {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}

/* ============================================
   NOTIFICATIONS LIST
   ============================================ */
.notification-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  border-bottom: 1px solid var(--neutral-100);
}

.notification-item:hover {
  background: var(--neutral-50);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-content h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 4px;
}

.notification-content p {
  font-size: 13px;
  color: var(--neutral-600);
  margin-bottom: 4px;
  line-height: 1.5;
}

.notification-time {
  font-size: 12px;
  color: var(--neutral-400);
}

.notification-item.unread {
  background: var(--primary-50);
}

.notification-item.unread::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

/* ============================================
   CASE CARDS
   ============================================ */
.case-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: var(--transition-base);
  border: 1px solid var(--neutral-200);
}

.case-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
}

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.case-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 4px;
}

.case-card-id {
  font-size: 12px;
  color: var(--neutral-500);
  font-family: monospace;
}

.case-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
}

.case-card-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-600);
}

.case-card-meta-item i {
  color: var(--neutral-400);
}

/* ============================================
   DOCUMENT LIST
   ============================================ */
.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.document-item:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-md);
}

.document-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-100);
  color: var(--primary-700);
}

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

.document-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-meta {
  font-size: 12px;
  color: var(--neutral-500);
}

.document-actions {
  display: flex;
  gap: 8px;
}

.document-actions .btn {
  padding: 8px 12px;
}

/* ============================================
   PAYMENT HISTORY
   ============================================ */
.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.payment-item:last-child {
  border-bottom: none;
}

.payment-info h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 4px;
}

.payment-info p {
  font-size: 12px;
  color: var(--neutral-500);
  margin: 0;
}

.payment-amount {
  text-align: right;
}

.payment-amount .amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.payment-amount .status {
  font-size: 12px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--neutral-200);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary-200);
}

.timeline-item.completed::before {
  background: var(--success-500);
  box-shadow: 0 0 0 2px var(--success-100);
}

.timeline-content h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 13px;
  color: var(--neutral-600);
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 12px;
  color: var(--neutral-400);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--neutral-400);
}

.empty-state h5 {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--neutral-500);
  margin-bottom: 20px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
  color: white;
  font-weight: 600;
  font-size: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ============================================
   MODAL OVERRIDES
   ============================================ */
.modal-content {
  border: none;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--neutral-100);
  padding: 20px 24px;
}

.modal-title {
  font-weight: 600;
  color: var(--neutral-900);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--neutral-100);
  padding: 16px 24px;
}

/* Sidebar Overlay/Backdrop for Mobile */
.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1035;
}

.offcanvas-backdrop.show {
  opacity: 1;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Large screens and below - Sidebar hidden by default */
@media (max-width: 1199.98px) {
  .app-sidebar {
    left: -280px;
    transition: left 0.3s ease;
  }

  .sidebar-enable .app-sidebar {
    left: 0;
  }

  .page-content {
    margin-left: 0 !important;
  }

  .app-topbar {
    padding-left: 0 !important;
  }

  /* Mobile header - hide brand label on tablets */
  .brand-label {
    font-size: 10px;
  }

  .brand-title {
    font-size: 15px;
  }
}

@media (max-width: 992px) {
  .page-content {
    padding: 16px;
  }

  .topbar-container {
    padding: 0 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .welcome-banner {
    padding: 20px;
  }

  .welcome-banner h4 {
    font-size: 18px;
  }

  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  /* Hide user info text on medium screens */
  .user-info {
    display: none;
  }

  .user-arrow {
    display: none;
  }

  .topbar-user-btn {
    padding: 6px;
    border-radius: 50%;
  }
}

@media (max-width: 767.98px) {
  .page-content {
    padding: 16px;
  }

  .topbar-container {
    padding: 0 12px;
  }

  /* Simplify header on mobile */
  .brand-label {
    display: none;
  }

  .brand-title {
    font-size: 14px;
  }

  .topbar-toggle,
  .topbar-icon-btn {
    width: 36px;
    height: 36px;
  }

  .topbar-toggle iconify-icon,
  .topbar-icon-btn iconify-icon {
    font-size: 18px;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .topbar-right {
    gap: 6px;
    z-index: 1060 !important;
    position: relative !important;
  }

  .topbar-left {
    gap: 10px;
  }

  /* CRITICAL: Ensure topbar is above backdrop on mobile */
  .app-topbar {
    z-index: 1050 !important;
    position: sticky !important;
    isolation: isolate;
  }

  /* Notification dropdown - centered and constrained to viewport */
  .dropdown-menu.notification-dropdown {
    position: fixed !important;
    top: 64px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 24px) !important;
    max-width: 360px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    z-index: 1070 !important;
  }

  /* User dropdown - right aligned */
  .dropdown-menu.user-dropdown {
    position: fixed !important;
    top: 64px !important;
    right: 12px !important;
    left: auto !important;
    transform: none !important;
    width: 200px !important;
    max-width: calc(100vw - 24px) !important;
    z-index: 1070 !important;
  }

  /* CRITICAL: Ensure dropdown buttons are always clickable on mobile */
  .topbar-icon-btn,
  .topbar-user-btn {
    position: relative !important;
    z-index: 1061 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    cursor: pointer !important;
  }

  /* CRITICAL FIX: Override Bootstrap's position:static on dropdowns for mobile */
  /* The template's style.min.css sets .dropdown{position:static} which breaks dropdown positioning */
  .topbar-right .dropdown,
  .app-topbar .dropdown {
    position: relative !important;
    z-index: 1061 !important;
    pointer-events: auto !important;
    display: inline-block !important;
  }

  /* Ensure dropdown menus are positioned (but let specific dropdowns override with fixed) */
  .topbar-right .dropdown-menu:not(.notification-dropdown):not(.user-dropdown),
  .app-topbar .dropdown-menu:not(.notification-dropdown):not(.user-dropdown) {
    position: absolute !important;
  }

  /* Make dropdown buttons visible and interactable */
  .topbar-right .dropdown > button,
  .topbar-right .dropdown > .dropdown-toggle {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    user-select: none !important;
  }

  .welcome-banner {
    border-radius: var(--radius-lg);
    padding: 20px;
  }

  .welcome-banner h4 {
    font-size: 18px;
  }

  .metric-card {
    padding: 20px 18px;
  }

  .page-title-box {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .page-title-box h4 {
    font-size: 20px;
  }

  .card-body {
    padding: 16px;
  }
}

@media (max-width: 576px) {
  .app-topbar {
    height: 56px;
    z-index: 1050 !important;
  }

  .topbar-container {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-toggle,
  .topbar-icon-btn {
    width: 34px;
    height: 34px;
  }

  .topbar-user-btn {
    padding: 4px;
    border-radius: 50%;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .notification-badge {
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    top: 2px;
    right: 2px;
  }

  /* Adjust dropdown positions for smaller topbar (56px) */
  .dropdown-menu.notification-dropdown,
  .dropdown-menu.user-dropdown {
    top: 56px !important;
  }

  /* Ensure buttons remain clickable on small screens */
  .topbar-icon-btn,
  .topbar-user-btn {
    position: relative !important;
    z-index: 1061 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  /* CRITICAL: Override template's static positioning on dropdowns */
  .topbar-right .dropdown,
  .app-topbar .dropdown {
    position: relative !important;
    display: inline-block !important;
  }

  .topbar-right .dropdown-menu:not(.notification-dropdown):not(.user-dropdown) {
    position: absolute !important;
  }

  .page-title-box h4 {
    font-size: 20px;
  }

  .card-body {
    padding: 16px;
  }

  .stat-card .card-body {
    padding: 16px;
  }

  .stat-card .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .quick-action-card {
    min-height: 100px;
    padding: 16px 12px;
  }

  .quick-action-card .quick-action-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    margin-bottom: 10px;
  }

  .quick-action-card h6 {
    font-size: 12px;
  }

  .table-responsive {
    font-size: 13px;
  }
}

/* ============================================
   AUTHENTICATION PAGES
   ============================================ */
.authentication-bg {
  background: linear-gradient(
    135deg,
    var(--primary-800) 0%,
    var(--primary-900) 100%
  );
  min-height: 100vh;
  position: relative;
}

.authentication-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.account-pages {
  position: relative;
  z-index: 1;
}

.account-pages .card {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.account-pages .card-body {
  padding: 40px;
}

.auth-logo img {
  height: 50px;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

/* Sidebar Scrollbar */
.app-sidebar ::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.app-sidebar ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary {
  color: var(--primary-700) !important;
}
.text-success {
  color: var(--success-500) !important;
}
.text-warning {
  color: var(--warning-500) !important;
}
.text-danger {
  color: var(--danger-500) !important;
}
.text-info {
  color: var(--info-500) !important;
}
.text-muted {
  color: var(--neutral-500) !important;
}

.bg-primary-subtle {
  background: var(--primary-100) !important;
}
.bg-success-subtle {
  background: var(--success-100) !important;
}
.bg-warning-subtle {
  background: var(--warning-100) !important;
}
.bg-danger-subtle {
  background: var(--danger-100) !important;
}
.bg-info-subtle {
  background: var(--info-100) !important;
}

.border-primary {
  border-color: var(--primary-500) !important;
}
.border-success {
  border-color: var(--success-500) !important;
}
.border-warning {
  border-color: var(--warning-500) !important;
}
.border-danger {
  border-color: var(--danger-500) !important;
}

.rounded-lg {
  border-radius: var(--radius-lg) !important;
}
.rounded-xl {
  border-radius: var(--radius-xl) !important;
}
.rounded-2xl {
  border-radius: var(--radius-2xl) !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;
}
.shadow-xl {
  box-shadow: var(--shadow-xl) !important;
}

/* ============================================
   DARK MODE SUPPORT
   Using Bootstrap 5 data-bs-theme attribute
   ============================================ */

/* Dark Mode Variables */
html[data-bs-theme="dark"] {
  --neutral-50: #1e293b;
  --neutral-100: #1e293b;
  --neutral-200: #334155;
  --neutral-300: #475569;
  --neutral-400: #64748b;
  --neutral-500: #94a3b8;
  --neutral-600: #cbd5e1;
  --neutral-700: #e2e8f0;
  --neutral-800: #f1f5f9;
  --neutral-900: #f8fafc;

  /* Adjusted Primary for Dark Mode */
  --primary-50: #0f172a;
  --primary-100: #1e293b;

  /* Subtle backgrounds for dark mode */
  --success-100: rgba(16, 185, 129, 0.15);
  --warning-100: rgba(245, 158, 11, 0.15);
  --danger-100: rgba(239, 68, 68, 0.15);
  --info-100: rgba(59, 130, 246, 0.15);
  --primary-100-dm: rgba(15, 76, 117, 0.2);

  /* Dark mode shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
    0 4px 6px -4px rgb(0 0 0 / 0.2);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3),
    0 8px 10px -6px rgb(0 0 0 / 0.2);
}

/* Dark Mode Body */
html[data-bs-theme="dark"] body {
  background: #0f172a;
  color: #e2e8f0;
}

/* Dark Mode Page Content */
html[data-bs-theme="dark"] .page-content {
  background: #0f172a;
}

/* Dark Mode Sidebar */
html[data-bs-theme="dark"] .app-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .app-sidebar .logo-box {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .app-sidebar .menu-title {
  color: rgba(255, 255, 255, 0.4);
}

/* Dark Mode Topbar */
html[data-bs-theme="dark"] .app-topbar {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

html[data-bs-theme="dark"] .topbar-toggle {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .topbar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .brand-label {
  color: #5dc6ff;
}

html[data-bs-theme="dark"] .brand-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .topbar-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

html[data-bs-theme="dark"] .topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .topbar-user-btn {
  background: rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .topbar-user-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .user-name {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .user-role {
  color: #64748b;
}

html[data-bs-theme="dark"] .user-arrow {
  color: #64748b;
}

html[data-bs-theme="dark"] .notification-dropdown {
  background: #1e293b;
  border: 1px solid #334155;
}

html[data-bs-theme="dark"] .notification-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .notification-header h6 {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .notification-item {
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .notification-icon {
  background: rgba(59, 130, 246, 0.2);
}

html[data-bs-theme="dark"] .notification-title {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .notification-time {
  color: #64748b;
}

html[data-bs-theme="dark"] .notification-empty iconify-icon {
  color: #475569;
}

html[data-bs-theme="dark"] .notification-empty p {
  color: #64748b;
}

html[data-bs-theme="dark"] .notification-footer {
  background: rgba(255, 255, 255, 0.03);
  border-top-color: #334155;
}

html[data-bs-theme="dark"] .user-dropdown {
  background: #1e293b;
  border: 1px solid #334155;
}

html[data-bs-theme="dark"] .user-dropdown-header {
  background: rgba(255, 255, 255, 0.03);
}

html[data-bs-theme="dark"] .user-dropdown-header h6 {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .user-dropdown-header small {
  color: #64748b;
}

html[data-bs-theme="dark"] .user-dropdown .dropdown-item {
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .user-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .user-dropdown .dropdown-item iconify-icon {
  color: #64748b;
}

html[data-bs-theme="dark"] .user-dropdown .dropdown-divider {
  border-color: #334155;
}

html[data-bs-theme="dark"] .topbar-button {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .topbar-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

/* Dark Mode Theme Toggle Icons */
html[data-bs-theme="dark"] .topbar-button .light-mode {
  display: inline;
}

html[data-bs-theme="dark"] .topbar-button .dark-mode {
  display: none;
}

html[data-bs-theme="light"] .topbar-button .light-mode {
  display: none;
}

html[data-bs-theme="light"] .topbar-button .dark-mode {
  display: inline;
}

html[data-bs-theme="dark"] .topbar-search-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .topbar-search-input::placeholder {
  color: #64748b;
}

html[data-bs-theme="dark"] .topbar-search-input:focus {
  background: #1e293b;
  border-color: var(--primary-500);
}

/* Dark Mode Cards */
html[data-bs-theme="dark"] .card {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .card-header {
  background: transparent;
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .card-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .card-footer {
  background: transparent;
  border-top-color: #334155;
}

/* Dark Mode Dropdown */
html[data-bs-theme="dark"] .dropdown-menu {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .dropdown-item {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

html[data-bs-theme="dark"] .dropdown-divider {
  border-color: #334155;
}

html[data-bs-theme="dark"] .dropdown-header {
  color: #94a3b8;
}

/* Dark Mode Welcome Banner */
html[data-bs-theme="dark"] .welcome-banner {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

html[data-bs-theme="dark"] .welcome-banner::before {
  opacity: 0.05;
}

html[data-bs-theme="dark"] .welcome-banner h2 {
  color: #f8fafc;
}

html[data-bs-theme="dark"] .welcome-banner p {
  color: rgba(248, 250, 252, 0.7);
}

/* Dark Mode Stat Cards */
html[data-bs-theme="dark"] .stat-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .stat-card:hover {
  background: #263044;
  border-color: #475569;
}

html[data-bs-theme="dark"] .stat-card .stat-label {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .stat-card .stat-value {
  color: #f8fafc;
}

html[data-bs-theme="dark"] .stat-card .stat-change {
  color: #94a3b8;
}

/* Dark Mode Stat Card Icon Backgrounds */
html[data-bs-theme="dark"] .stat-card .stat-icon.bg-primary-subtle {
  background: rgba(62, 165, 197, 0.15) !important;
}

html[data-bs-theme="dark"] .stat-card .stat-icon.bg-success-subtle {
  background: rgba(16, 185, 129, 0.15) !important;
}

html[data-bs-theme="dark"] .stat-card .stat-icon.bg-warning-subtle {
  background: rgba(245, 158, 11, 0.15) !important;
}

html[data-bs-theme="dark"] .stat-card .stat-icon.bg-info-subtle {
  background: rgba(59, 130, 246, 0.15) !important;
}

/* Dark Mode Tables */
html[data-bs-theme="dark"] .table {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .table thead th {
  background: #0f172a;
  border-bottom-color: #334155;
  color: #94a3b8;
}

html[data-bs-theme="dark"] .table tbody td {
  border-bottom-color: #334155;
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .table-hover tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

html[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.02);
}

/* Dark Mode Forms */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  background: #1e293b;
  border-color: var(--primary-500);
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .form-label {
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .form-text {
  color: #64748b;
}

html[data-bs-theme="dark"] .input-group-text {
  background: #334155;
  border-color: #334155;
  color: #94a3b8;
}

/* Dark Mode Buttons */
html[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #475569;
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}

html[data-bs-theme="dark"] .btn-light {
  background: #334155;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .btn-light:hover {
  background: #475569;
  border-color: #475569;
  color: #f8fafc;
}

/* Dark Mode Badges */
html[data-bs-theme="dark"] .badge.bg-light {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* Dark Mode Dropdowns */
html[data-bs-theme="dark"] .dropdown-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

html[data-bs-theme="dark"] .dropdown-item {
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background: #334155;
  color: #f8fafc;
}

html[data-bs-theme="dark"] .dropdown-divider {
  border-color: #334155;
}

html[data-bs-theme="dark"] .dropdown-header {
  color: #64748b;
}

/* Dark Mode Notification Dropdown */
html[data-bs-theme="dark"] .notification-dropdown .notification-item {
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .notification-dropdown .notification-item:hover {
  background: #263044;
}

html[data-bs-theme="dark"] .notification-dropdown .notification-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .notification-dropdown .notification-text {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .notification-dropdown .notification-time {
  color: #64748b;
}

/* Dark Mode Profile Dropdown */
html[data-bs-theme="dark"] .profile-dropdown .user-info h6 {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .profile-dropdown .user-info span {
  color: #94a3b8;
}

/* Dark Mode Pagination */
html[data-bs-theme="dark"] .page-link {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .page-link:hover {
  background: #334155;
  border-color: #475569;
  color: #f8fafc;
}

html[data-bs-theme="dark"] .page-item.active .page-link {
  background: var(--primary-700);
  border-color: var(--primary-700);
}

html[data-bs-theme="dark"] .page-item.disabled .page-link {
  background: #0f172a;
  border-color: #334155;
  color: #475569;
}

/* Dark Mode Alerts */
html[data-bs-theme="dark"] .alert {
  border-width: 1px;
}

html[data-bs-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

html[data-bs-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

html[data-bs-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

html[data-bs-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* Dark Mode Modals */
html[data-bs-theme="dark"] .modal-content {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .modal-header {
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .modal-header .modal-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-bs-theme="dark"] .modal-footer {
  border-top-color: #334155;
}

/* Dark Mode Progress Bars */
html[data-bs-theme="dark"] .progress {
  background: #334155;
}

/* Dark Mode List Groups */
html[data-bs-theme="dark"] .list-group-item {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .list-group-item-action:hover {
  background: #263044;
  color: #f8fafc;
}

/* Dark Mode Nav Pills/Tabs */
html[data-bs-theme="dark"] .nav-pills .nav-link {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .nav-pills .nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .nav-pills .nav-link.active {
  background: var(--primary-700);
  color: #fff;
}

html[data-bs-theme="dark"] .nav-tabs {
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  border-color: transparent;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background: #1e293b;
  border-color: #334155 #334155 #1e293b;
  color: var(--accent-500);
}

/* Dark Mode Breadcrumb */
html[data-bs-theme="dark"] .breadcrumb {
  background: transparent;
}

html[data-bs-theme="dark"] .breadcrumb-item a {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .breadcrumb-item a:hover {
  color: var(--accent-500);
}

html[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #64748b;
}

html[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
  color: #64748b;
}

/* Dark Mode Page Title */
html[data-bs-theme="dark"] .page-title-box h4 {
  color: #f1f5f9;
}

/* Dark Mode Status Badges */
html[data-bs-theme="dark"] .badge-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

html[data-bs-theme="dark"] .badge-status.processing {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

html[data-bs-theme="dark"] .badge-status.approved {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

html[data-bs-theme="dark"] .badge-status.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Dark Mode Empty State */
html[data-bs-theme="dark"] .empty-state h5 {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .empty-state p {
  color: #94a3b8;
}

/* Dark Mode File Upload */
html[data-bs-theme="dark"] .file-upload-area {
  background: #0f172a;
  border-color: #334155;
}

html[data-bs-theme="dark"] .file-upload-area:hover {
  border-color: var(--primary-500);
  background: rgba(62, 165, 197, 0.05);
}

html[data-bs-theme="dark"] .file-upload-area h6 {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .file-upload-area p {
  color: #64748b;
}

/* Dark Mode Document Card */
html[data-bs-theme="dark"] .document-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .document-card:hover {
  border-color: #475569;
  background: #263044;
}

html[data-bs-theme="dark"] .document-card .doc-name {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .document-card .doc-meta {
  color: #64748b;
}

/* Dark Mode Timeline */
html[data-bs-theme="dark"] .timeline-item::before {
  background: #334155;
}

html[data-bs-theme="dark"] .timeline-item .timeline-content {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .timeline-item .timeline-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .timeline-item .timeline-text {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .timeline-item .timeline-date {
  color: #64748b;
}

/* Dark Mode Footer */
html[data-bs-theme="dark"] .footer {
  background: #0f172a;
  border-top-color: #334155;
  color: #64748b;
}

html[data-bs-theme="dark"] .footer a {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .footer a:hover {
  color: var(--accent-500);
}

/* Dark Mode Scrollbar */
html[data-bs-theme="dark"] ::-webkit-scrollbar-track {
  background: #0f172a;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Dark Mode Auth Pages */
html[data-bs-theme="dark"] .auth-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

html[data-bs-theme="dark"] .auth-card {
  background: rgba(30, 41, 59, 0.95);
  border-color: #334155;
}

html[data-bs-theme="dark"] .auth-card .auth-header h3 {
  color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-card .auth-header p {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .auth-card .form-label {
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .auth-card .auth-footer {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .auth-card .auth-footer a {
  color: var(--accent-500);
}

/* Dark Mode Code/Pre */
html[data-bs-theme="dark"] pre,
html[data-bs-theme="dark"] code {
  background: #0f172a;
  color: #e2e8f0;
}

/* Dark Mode HR */
html[data-bs-theme="dark"] hr {
  border-color: #334155;
  opacity: 1;
}

/* Dark Mode Text Utilities */
html[data-bs-theme="dark"] .text-muted {
  color: #64748b !important;
}

html[data-bs-theme="dark"] .text-dark {
  color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .text-body {
  color: #cbd5e1 !important;
}

/* Dark Mode Background Utilities */
html[data-bs-theme="dark"] .bg-white {
  background: #1e293b !important;
}

html[data-bs-theme="dark"] .bg-light {
  background: #263044 !important;
}

html[data-bs-theme="dark"] .bg-body {
  background: #0f172a !important;
}

/* Dark Mode Border Utilities */
html[data-bs-theme="dark"] .border {
  border-color: #334155 !important;
}

html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-end {
  border-color: #334155 !important;
}

/* Dark Mode Quick Action Cards */
html[data-bs-theme="dark"] .quick-action-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .quick-action-card:hover {
  background: #263044;
  border-color: var(--accent-500);
}

html[data-bs-theme="dark"] .quick-action-card h6 {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .quick-action-card p {
  color: #94a3b8;
}

/* Dark Mode Activity Items */
html[data-bs-theme="dark"] .activity-item {
  border-bottom-color: #334155;
}

html[data-bs-theme="dark"] .activity-item .activity-title {
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .activity-item .activity-text {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .activity-item .activity-time {
  color: #64748b;
}

/* Dark Mode Tooltips */
html[data-bs-theme="dark"] .tooltip-inner {
  background: #334155;
  color: #f8fafc;
}

html[data-bs-theme="dark"] .bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #334155;
}

html[data-bs-theme="dark"] .bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #334155;
}

/* Dark Mode Popovers */
html[data-bs-theme="dark"] .popover {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .popover-header {
  background: #263044;
  border-bottom-color: #334155;
  color: #f1f5f9;
}

html[data-bs-theme="dark"] .popover-body {
  color: #cbd5e1;
}

/* Dark Mode Accordion */
html[data-bs-theme="dark"] .accordion-item {
  background: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] .accordion-button {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background: #263044;
  color: var(--accent-500);
}

html[data-bs-theme="dark"] .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}

html[data-bs-theme="dark"] .accordion-body {
  background: #1e293b;
  color: #cbd5e1;
}
