@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Noto+Nastaliq+Urdu:wght@400;600;700&family=Roboto:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ===================================================================
   GMAIL & GOOGLE MATERIAL DESIGN 3 (M3) BASE TYPOGRAPHY & RESET
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bs-body-color: var(--text-main);
  --bs-body-bg: var(--bg-main);
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-color: var(--text-muted);
  --bs-border-color: var(--border-color);
  --bs-card-bg: var(--surface);
  --bs-card-color: var(--text-main);
  --bs-card-border-color: var(--border-color);
}

body {
  font-family: 'Google Sans', 'Roboto', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, background-image 0.25s ease, color 0.25s ease;
}

/* RTL & Urdu Typography */
[dir="rtl"], body.rtl {
  font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif;
  direction: rtl;
  text-align: right;
}

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

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

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

/* ===================================================================
   CUSTOM SVG ICON SYSTEM
   =================================================================== */
.custom-icon {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), stroke 0.2s ease;
}

.custom-icon.icon-spin {
  animation: icon-spin 1.5s linear infinite;
}

@keyframes icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Icon Sizing Utilities */
.icon-xs  { width: 14px; height: 14px; }
.icon-sm  { width: 16px; height: 16px; }
.icon-md  { width: 20px; height: 20px; }
.icon-lg  { width: 24px; height: 24px; }
.icon-xl  { width: 32px; height: 32px; }
.icon-xxl { width: 44px; height: 44px; }

/* Icon Badges / Containers (Gmail soft pill boxes) */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.icon-box-primary {
  background: var(--surface-alt);
  color: var(--color-primary);
}
[data-mode="dark"] .icon-box-primary {
  background: rgba(168, 199, 250, 0.15);
  color: var(--color-primary);
}

.icon-box-secondary {
  background: #fce8e6;
  color: var(--color-secondary);
}
[data-mode="dark"] .icon-box-secondary {
  background: rgba(242, 139, 130, 0.15);
  color: var(--color-secondary);
}

/* ===================================================================
   GMAIL-STYLE CLEAN HEADER NAVBAR
   =================================================================== */
.navbar-custom {
  background: var(--surface) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.08);
  padding: 0.65rem 0;
  transition: all 0.2s ease;
  z-index: 1030;
}

/* Brand Styling (Google Workspace 4-Color Motif) */
.navbar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  user-select: none;
}

.brand-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b57d0 0%, #d93025 35%, #f9ab00 70%, #137333 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 87, 208, 0.25);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  flex-shrink: 0;
}

.navbar-brand-wrapper:hover .brand-logo-badge {
  transform: scale(1.06);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-title .brand-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Navigation Links (Gmail Pill Tabs) */
.nav-link-custom {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 0.95rem !important;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-link-custom:hover {
  color: var(--color-primary) !important;
  background: var(--surface-alt);
}

.nav-link-custom.active {
  color: #001d35 !important;
  background: var(--surface-selected, #c2e7ff) !important;
  font-weight: 600;
}

/* Utility Toolbar */
.navbar-utility-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* Theme Selector Dropdown */
.btn-theme-picker {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 20px;
  padding: 0.38rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-theme-picker:hover, .btn-theme-picker:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--surface);
}

.theme-active-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: inline-block;
  box-shadow: 0 0 0 2px var(--surface);
}

.theme-dropdown-menu {
  min-width: 240px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: 0 4px 20px -2px rgba(60, 64, 67, 0.15), 0 1px 4px 0 rgba(60, 64, 67, 0.08);
  padding: 0.5rem;
}

.theme-option-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

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

.theme-option-item:hover {
  background: var(--surface-alt);
  color: var(--color-primary);
}

.theme-option-item.active {
  background: var(--surface-selected, #c2e7ff);
  color: #001d35;
  font-weight: 600;
}

.theme-swatch-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(60, 64, 67, 0.15);
}

/* Dark Mode Button (Google Circle Action Button) */
.btn-mode-toggle {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  padding: 0;
}

.btn-mode-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--surface-selected, #c2e7ff);
}

.btn-mode-toggle .icon-sun-mode {
  display: none;
}
.btn-mode-toggle .icon-moon-mode {
  display: inline-flex;
}

body.dark-mode .btn-mode-toggle .icon-sun-mode {
  display: inline-flex;
}
body.dark-mode .btn-mode-toggle .icon-moon-mode {
  display: none;
}

/* Language Switcher Segmented Pill */
.lang-pill-group {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.785rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.lang-pill-btn:hover {
  color: var(--text-main);
}

.lang-pill-btn.active {
  background: var(--color-primary);
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}

/* Customer Cart Button */
.btn-cart-nav {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 20px;
  padding: 0.38rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-cart-nav:hover {
  background: var(--surface-selected, #c2e7ff);
  border-color: var(--color-primary);
  color: #001d35;
}

.btn-cart-nav .cart-badge-pill {
  background: var(--color-secondary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.12rem 0.45rem;
  min-width: 18px;
  text-align: center;
}

/* Google Material 3 Buttons */
.btn-ghost-custom {
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: 20px;
  font-weight: 500;
  padding: 0.42rem 0.95rem;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-ghost-custom:hover {
  background: var(--surface-alt);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Gmail Primary Filled Pill Button */
.btn-primary-custom {
  background: var(--color-primary);
  color: #ffffff !important;
  border: none;
  border-radius: 9999px;
  font-weight: 500;
  padding: 0.48rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-primary-custom:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Gmail Compose Style Tonal Pill Button */
.btn-secondary-custom {
  background: var(--surface-selected, #c2e7ff);
  color: #001d35 !important;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.btn-secondary-custom:hover {
  background: #b3d7f0;
  box-shadow: 0 2px 5px rgba(60, 64, 67, 0.25);
  color: #001d35 !important;
  transform: translateY(-1px);
}

/* User Profile Nav Pill */
.btn-user-nav {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-user-nav:hover {
  border-color: var(--color-primary);
  background: var(--surface-selected, #c2e7ff);
  color: #001d35;
}

.user-avatar-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===================================================================
   GMAIL MATERIAL DESIGN 3 CARDS & SURFACES
   =================================================================== */
.card-custom {
  background-color: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.1), 0 4px 8px 3px rgba(60, 64, 67, 0.05);
  transition: box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.2s ease;
  overflow: hidden;
}

.card-custom:hover {
  box-shadow: 0 4px 12px 2px rgba(60, 64, 67, 0.15), 0 1px 3px 0 rgba(60, 64, 67, 0.2);
  transform: translateY(-2px);
}

/* 3 Primary Animated Action Cards */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.action-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.08);
}

.action-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px 1px rgba(60, 64, 67, 0.15);
  color: inherit;
}

.action-card:hover::before {
  opacity: 1;
}

.action-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.action-card:hover .action-card-icon {
  background: var(--surface-selected, #c2e7ff);
  color: var(--color-primary);
  transform: scale(1.08);
}

.action-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.action-card-urdu {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.65rem;
}

.action-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.action-card-arrow {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: gap 0.2s ease;
}

.action-card:hover .action-card-arrow {
  gap: 0.75rem;
}

/* ===================================================================
   GMAIL ICONIC PILL SEARCH BAR
   =================================================================== */
.hero-search-wrapper {
  background: var(--surface-alt);
  border: 1px solid transparent;
  border-radius: 32px;
  padding: 0.45rem 0.65rem 0.45rem 1.4rem;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.06);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

[dir="rtl"] .hero-search-wrapper {
  padding: 0.45rem 1.4rem 0.45rem 0.65rem;
}

.hero-search-wrapper:focus-within {
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

body.dark-mode .hero-search-wrapper:focus-within {
  background: #282a2c;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 4px 8px 3px rgba(0, 0, 0, 0.3);
}

.hero-search-input {
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 400;
  outline: none;
  width: 100%;
}

.hero-search-input::placeholder {
  color: var(--text-muted);
}

/* ===================================================================
   CATEGORY CARDS (Google Material 3 Icons)
   =================================================================== */
.category-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.04);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.12);
  color: var(--color-primary);
}

.category-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.category-card:hover .category-icon-wrapper {
  background: var(--surface-selected, #c2e7ff);
  color: var(--color-primary);
  transform: scale(1.08);
}

.category-name-en {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
}

.category-name-ur {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================================================================
   GMAIL-STYLE TABLES & LISTS
   =================================================================== */
.table {
  color: var(--text-main);
  border-color: var(--border-color);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-width: 1px;
  border-bottom-color: var(--border-color);
  padding: 0.85rem 1rem;
}

.table thead th {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

.table tbody tr:hover {
  background-color: var(--surface-alt) !important;
}

/* ===================================================================
   GMAIL-STYLE STATUS CHIPS & LABELS
   =================================================================== */
.badge-status,
.badge-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  letter-spacing: 0.01em;
}

.badge-status.badge-success,
.badge-verified,
.badge-in-stock,
.badge-approved {
  background: #e6f4ea !important;
  color: #137333 !important;
  border: 1px solid #ceead6;
}

.badge-status.badge-warning,
.badge-pending,
.badge-low-stock {
  background: #fef7e0 !important;
  color: #b06000 !important;
  border: 1px solid #feefc3;
}

.badge-status.badge-danger,
.badge-expired,
.badge-finished,
.badge-suspended,
.badge-cancelled,
.badge-rejected {
  background: #fce8e6 !important;
  color: #d93025 !important;
  border: 1px solid #fad2cf;
}

.badge-status.badge-info,
.badge-status.badge-primary,
.badge-acknowledged,
.badge-in-progress {
  background: #e8f0fe !important;
  color: #0b57d0 !important;
  border: 1px solid #d2e3fc;
}

[data-mode="dark"] .badge-status.badge-success,
[data-mode="dark"] .badge-verified,
[data-mode="dark"] .badge-in-stock,
[data-mode="dark"] .badge-approved {
  background: rgba(129, 201, 149, 0.15) !important;
  color: #81c995 !important;
  border-color: rgba(129, 201, 149, 0.3);
}

[data-mode="dark"] .badge-status.badge-warning,
[data-mode="dark"] .badge-pending,
[data-mode="dark"] .badge-low-stock {
  background: rgba(253, 214, 99, 0.15) !important;
  color: #fdd663 !important;
  border-color: rgba(253, 214, 99, 0.3);
}

[data-mode="dark"] .badge-status.badge-danger,
[data-mode="dark"] .badge-expired,
[data-mode="dark"] .badge-finished,
[data-mode="dark"] .badge-suspended,
[data-mode="dark"] .badge-cancelled,
[data-mode="dark"] .badge-rejected {
  background: rgba(242, 139, 130, 0.15) !important;
  color: #f28b82 !important;
  border-color: rgba(242, 139, 130, 0.3);
}

[data-mode="dark"] .badge-status.badge-info,
[data-mode="dark"] .badge-status.badge-primary,
[data-mode="dark"] .badge-acknowledged,
[data-mode="dark"] .badge-in-progress {
  background: rgba(168, 199, 250, 0.15) !important;
  color: #a8c7fa !important;
  border-color: rgba(168, 199, 250, 0.3);
}

/* ===================================================================
   FORM CONTROLS (Material 3 Outlined Fields)
   =================================================================== */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--surface);
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  background-color: var(--surface);
  color: var(--text-main);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: var(--surface-alt);
  color: var(--text-main);
}

/* ===================================================================
   ANNOUNCEMENTS, ADS & FOOTER
   =================================================================== */
.announcement-banner {
  background: var(--surface-selected, #c2e7ff);
  color: #001d35;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dark-mode .announcement-banner {
  background: #004a77;
  color: #c2e7ff;
}

/* ===================================================================
   APPHARBOR ENTERPRISE LICENSING & MONETIZATION BANNERS & MODALS
   =================================================================== */
.appharbor-license-banner {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 0.86rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1040;
}

.appharbor-license-banner.banner-trial {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
}

.appharbor-license-banner.banner-danger {
  background: linear-gradient(90deg, #991b1b 0%, #7f1d1d 100%);
  color: #ffffff;
}

.appharbor-license-banner.banner-info {
  background: linear-gradient(90deg, #0369a1 0%, #075985 100%);
  color: #ffffff;
}

.appharbor-license-banner.banner-warning {
  background: linear-gradient(90deg, #fef08a 0%, #fde047 100%);
  color: #713f12;
}

.appharbor-key-input {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
}


.ad-slot-container {
  background: var(--surface-alt);
  border: 1.5px dashed var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  position: relative;
}

.ad-label-pill {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--text-muted);
  color: #ffffff;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

footer {
  margin-top: auto;
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.75rem 0;
  color: var(--text-muted);
}

/* ===================================================================
   ADMIN & DASHBOARD MODERN STYLING (Google Cloud / Workspace Console)
   =================================================================== */
.stat-gradient-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.06);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  overflow: hidden;
}

.stat-gradient-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 10px rgba(60, 64, 67, 0.12);
  border-color: var(--color-primary);
}

.stat-gradient-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-accent-1, var(--color-primary)), var(--card-accent-2, var(--color-secondary)));
  opacity: 0.85;
}

.stat-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.08);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.stat-gradient-card:hover .stat-icon-badge {
  transform: scale(1.08);
}

/* Dashboard Hub Navigation Cards */
.dashboard-hub-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.04);
}

.dashboard-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(60, 64, 67, 0.12);
  color: inherit;
}

.dashboard-hub-card .hub-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.dashboard-hub-card:hover .hub-icon-wrapper {
  transform: scale(1.1);
}

.dashboard-hub-card .hub-arrow {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.dashboard-hub-card:hover .hub-arrow {
  gap: 0.75rem;
}

/* Radar Pulse Indicator */
.pulse-indicator-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e6f4ea;
  border: 1px solid #ceead6;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #137333;
}

[data-mode="dark"] .pulse-indicator-wrapper {
  background: rgba(129, 201, 149, 0.15);
  border-color: rgba(129, 201, 149, 0.3);
  color: #81c995;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #137333;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(19, 115, 51, 0.4);
  animation: pulse-radar 2s infinite ease-out;
}

@keyframes pulse-radar {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ===================================================================
   INNOVATIVE OPEN / CLOSED STATUS PILLS & BADGES
   =================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.status-pill-open {
  background: #e6f4ea;
  border: 1px solid #ceead6;
  color: #137333;
}
[data-mode="dark"] .status-pill-open,
body.dark-mode .status-pill-open {
  background: rgba(129, 201, 149, 0.16);
  border-color: rgba(129, 201, 149, 0.35);
  color: #81c995;
}

.status-pill-closed {
  background: #fce8e6;
  border: 1px solid #fad2cf;
  color: #c5221f;
}
[data-mode="dark"] .status-pill-closed,
body.dark-mode .status-pill-closed {
  background: rgba(242, 139, 130, 0.16);
  border-color: rgba(242, 139, 130, 0.35);
  color: #f28b82;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #137333;
  position: relative;
  flex-shrink: 0;
}
[data-mode="dark"] .pulse-dot-green,
body.dark-mode .pulse-dot-green {
  background: #81c995;
}
.pulse-dot-green::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(19, 115, 51, 0.45);
  animation: pulse-radar 1.8s infinite ease-out;
}

.pulse-dot-red {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5221f;
  position: relative;
  flex-shrink: 0;
}
[data-mode="dark"] .pulse-dot-red,
body.dark-mode .pulse-dot-red {
  background: #f28b82;
}

/* ===================================================================
   INNOVATIVE COLLAPSIBLE DISCLOSURE WIDGET (<details>)
   Clean, interactive disclosure for extra text & info (open/close)
   =================================================================== */
.innovative-disclosure {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.65rem;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.innovative-disclosure[open] {
  background: var(--surface);
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
[data-mode="dark"] .innovative-disclosure[open],
body.dark-mode .innovative-disclosure[open] {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.disclosure-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.disclosure-summary::-webkit-details-marker {
  display: none;
}
.disclosure-summary::marker {
  display: none;
  content: "";
}
.disclosure-summary > * {
  pointer-events: none;
}
.disclosure-summary:hover {
  color: var(--color-primary);
  background-color: rgba(0, 0, 0, 0.02);
}
[data-mode="dark"] .disclosure-summary:hover,
body.dark-mode .disclosure-summary:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.disclosure-icon {
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  display: inline-flex;
}
.innovative-disclosure[open] .disclosure-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.disclosure-body {
  padding: 0.75rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  animation: disclosure-fade 0.25s ease-out;
}

@keyframes disclosure-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   INNOVATIVE MOBILE BOTTOM NAVIGATION DOCK (PHONES & TABLETS)
   Sleek glassmorphism floating bar for easy thumb reach
   =================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}
[data-mode="dark"] .mobile-bottom-nav,
body.dark-mode .mobile-bottom-nav {
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  body {
    padding-bottom: 74px !important; /* Prevents content overlap */
  }
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  min-width: 52px;
}
.mobile-nav-btn:hover,
.mobile-nav-btn:focus {
  color: var(--color-primary);
}
.mobile-nav-btn.active {
  color: var(--color-primary);
  font-weight: 700;
}
.mobile-nav-btn.active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 9999px;
}
.mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: 12px;
  background: var(--color-danger);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9999px;
  line-height: 1.2;
}

/* ===================================================================
   RESPONSIVE GRID & UI/UX POLISH FOR PC, TABLET, MOBILE
   =================================================================== */
/* PC / Desktop (>= 1200px) */
@media (min-width: 1200px) {
  .container {
    max-width: 1240px;
  }
  .card-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  }
  [data-mode="dark"] .card-custom:hover,
  body.dark-mode .card-custom:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }
}

/* Tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .action-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .hero-search-wrapper {
    flex-direction: column;
    padding: 0.6rem;
    gap: 0.5rem;
    border-radius: 16px;
  }
  .hero-search-wrapper button {
    width: 100%;
  }
  .action-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .action-card {
    padding: 1.25rem 1rem;
  }
  .table-responsive {
    border-radius: 12px;
  }
  .card-custom {
    padding: 1rem !important;
  }
}

/* ===================================================================
   HOME PAGE MINIMIZE / SHOW-HIDE SECTIONS
   =================================================================== */
.section-collapsible-body {
  transition: opacity 0.25s ease, max-height 0.35s ease;
}

.section-collapsible-body.is-hidden {
  display: none !important;
}

.section-collapsed-placeholder {
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px dashed var(--border-color);
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-collapsed-placeholder:hover {
  background: var(--surface);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.quick-toggle-chip {
  cursor: pointer;
  border: 1.5px solid var(--color-primary) !important;
  background: var(--color-primary) !important;
  color: #ffffff !important;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.42rem 0.95rem !important;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 2px 6px rgba(11, 87, 208, 0.25);
  user-select: none;
  text-decoration: none;
  outline: none;
  white-space: nowrap;
}

.quick-toggle-chip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.quick-toggle-chip i {
  color: #ffffff !important;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.quick-toggle-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 87, 208, 0.35);
  filter: brightness(1.08);
}

.quick-toggle-chip.is-hidden {
  background: var(--surface-alt) !important;
  color: var(--text-muted) !important;
  border: 1.5px dashed var(--border-color) !important;
  box-shadow: none !important;
  opacity: 0.75;
}

.quick-toggle-chip.is-hidden i {
  color: var(--text-muted) !important;
}

.quick-toggle-chip.is-hidden:hover {
  opacity: 1;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  background: var(--surface) !important;
}

[data-mode="dark"] .quick-toggle-chip,
body.dark-mode .quick-toggle-chip {
  border-color: var(--color-primary) !important;
  background: var(--color-primary) !important;
  color: #0b192c !important;
}

[data-mode="dark"] .quick-toggle-chip i,
body.dark-mode .quick-toggle-chip i {
  color: #0b192c !important;
}

[data-mode="dark"] .quick-toggle-chip.is-hidden,
body.dark-mode .quick-toggle-chip.is-hidden {
  background: #1c2128 !important;
  color: #9ca3af !important;
  border-color: #373e47 !important;
}

[data-mode="dark"] .quick-toggle-chip.is-hidden i,
body.dark-mode .quick-toggle-chip.is-hidden i {
  color: #9ca3af !important;
}

/* ===================================================================
   PROJECT-WIDE HIGH-CONTRAST TYPOGRAPHY & SURFACE COLOR REINFORCEMENT
   (Guarantees crisp readability and WCAG AA/AAA contrast across all 20 themes)
   =================================================================== */

/* 1. Global Headings & Typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text-main) !important;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p, span, label, div {
  color: inherit;
}

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

/* 2. High Contrast for Secondary & Muted Text */
.text-muted,
.text-secondary,
.form-text,
small.text-muted,
.small.text-muted {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

/* Light Mode: High-contrast dark gray/black against white/light surfaces */
:root {
  --text-main: #111827;       /* 15.3:1 contrast on white */
  --text-muted: #374151;      /* 9.1:1 contrast on white - clearly readable, never faded */
}

/* Dark Mode: Crisp white & light silver text on obsidian/dark surfaces */
[data-mode="dark"],
body.dark-mode {
  --text-main: #f9fafb !important;
  --text-muted: #d1d5db !important;
  --bs-body-color: #f9fafb !important;
  --bs-body-bg: var(--bg-main) !important;
  --bs-secondary-color: #d1d5db !important;
  --bs-tertiary-color: #d1d5db !important;
  --bs-border-color: rgba(255, 255, 255, 0.18) !important;
  --bs-card-bg: var(--surface) !important;
  --bs-card-color: #f9fafb !important;
}

[data-mode="dark"] h1, [data-mode="dark"] h2, [data-mode="dark"] h3,
[data-mode="dark"] h4, [data-mode="dark"] h5, [data-mode="dark"] h6,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
  color: #ffffff !important;
}

[data-mode="dark"] .text-muted,
body.dark-mode .text-muted,
[data-mode="dark"] .text-secondary,
body.dark-mode .text-secondary,
[data-mode="dark"] small.text-muted,
body.dark-mode small.text-muted,
[data-mode="dark"] .small.text-muted,
body.dark-mode .small.text-muted {
  color: #d1d5db !important;
}

[data-mode="dark"] .text-dark,
body.dark-mode .text-dark {
  color: #f9fafb !important;
}

[data-mode="dark"] .bg-light,
body.dark-mode .bg-light {
  background-color: var(--surface-alt) !important;
  color: #f9fafb !important;
}

[data-mode="dark"] .bg-surface,
body.dark-mode .bg-surface {
  background-color: var(--surface) !important;
  color: #f9fafb !important;
}

[data-mode="dark"] .bg-surface-alt,
body.dark-mode .bg-surface-alt {
  background-color: var(--surface-alt) !important;
  color: #f9fafb !important;
}

/* 3. High Contrast Badges */
.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.bg-light {
  background-color: var(--surface-alt) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

.badge.bg-dark {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
}

[data-mode="dark"] .badge.bg-dark,
body.dark-mode .badge.bg-dark {
  background-color: #111827 !important;
  color: #f9fafb !important;
  border: 1px solid #374151 !important;
}

.badge.bg-primary-subtle {
  background-color: rgba(11, 87, 208, 0.12) !important;
  color: #0b57d0 !important;
  border: 1px solid rgba(11, 87, 208, 0.25) !important;
}
[data-mode="dark"] .badge.bg-primary-subtle,
body.dark-mode .badge.bg-primary-subtle {
  background-color: rgba(168, 199, 250, 0.2) !important;
  color: #c2e7ff !important;
  border: 1px solid rgba(168, 199, 250, 0.35) !important;
}

.badge.bg-success-subtle {
  background-color: rgba(19, 115, 51, 0.12) !important;
  color: #0f5132 !important;
  border: 1px solid rgba(19, 115, 51, 0.25) !important;
}
[data-mode="dark"] .badge.bg-success-subtle,
body.dark-mode .badge.bg-success-subtle {
  background-color: rgba(129, 201, 149, 0.2) !important;
  color: #a3e9b8 !important;
  border: 1px solid rgba(129, 201, 149, 0.35) !important;
}

.badge.bg-warning-subtle {
  background-color: rgba(176, 96, 0, 0.12) !important;
  color: #7c4300 !important;
  border: 1px solid rgba(176, 96, 0, 0.25) !important;
}
[data-mode="dark"] .badge.bg-warning-subtle,
body.dark-mode .badge.bg-warning-subtle {
  background-color: rgba(253, 214, 99, 0.2) !important;
  color: #fef08a !important;
  border: 1px solid rgba(253, 214, 99, 0.35) !important;
}

.badge.bg-danger-subtle {
  background-color: rgba(217, 48, 37, 0.12) !important;
  color: #991b1b !important;
  border: 1px solid rgba(217, 48, 37, 0.25) !important;
}
[data-mode="dark"] .badge.bg-danger-subtle,
body.dark-mode .badge.bg-danger-subtle {
  background-color: rgba(242, 139, 130, 0.2) !important;
  color: #fecdd3 !important;
  border: 1px solid rgba(242, 139, 130, 0.35) !important;
}

.badge.bg-info-subtle {
  background-color: rgba(2, 132, 199, 0.12) !important;
  color: #075985 !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}
[data-mode="dark"] .badge.bg-info-subtle,
body.dark-mode .badge.bg-info-subtle {
  background-color: rgba(56, 189, 248, 0.2) !important;
  color: #bae6fd !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.badge.bg-secondary-subtle {
  background-color: var(--surface-alt) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

/* 4. High Contrast Tables */
.table {
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

.table > :not(caption) > * > * {
  background-color: transparent;
  color: var(--text-main) !important;
  border-bottom-color: var(--border-color) !important;
}

.table thead th,
.table-light th,
.table-light {
  background-color: var(--surface-alt) !important;
  color: var(--text-main) !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--border-color) !important;
}

[data-mode="dark"] .table thead th,
body.dark-mode .table thead th,
[data-mode="dark"] .table-light th,
body.dark-mode .table-light th,
[data-mode="dark"] .table-light,
body.dark-mode .table-light {
  background-color: #21262d !important;
  color: #f9fafb !important;
  border-bottom: 2px solid #30363d !important;
}

.table-hover tbody tr:hover > * {
  background-color: var(--surface-alt) !important;
  color: var(--text-main) !important;
}

[data-mode="dark"] .table-hover tbody tr:hover > *,
body.dark-mode .table-hover tbody tr:hover > * {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* 5. High Contrast Forms & Inputs */
.form-control,
.form-select {
  background-color: #ffffff;
  color: #111827 !important;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary) !important;
  color: #111827 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
}

.form-control::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

.input-group-text {
  background-color: var(--surface-alt);
  color: var(--text-main) !important;
  border: 1.5px solid #d1d5db;
}

[data-mode="dark"] .form-control,
body.dark-mode .form-control,
[data-mode="dark"] .form-select,
body.dark-mode .form-select {
  background-color: #161b22 !important;
  color: #f9fafb !important;
  border: 1.5px solid #30363d !important;
}

[data-mode="dark"] .form-control:focus,
body.dark-mode .form-control:focus,
[data-mode="dark"] .form-select:focus,
body.dark-mode .form-select:focus {
  background-color: #161b22 !important;
  color: #ffffff !important;
  border-color: var(--color-primary) !important;
}

[data-mode="dark"] .form-control::placeholder,
body.dark-mode .form-control::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

[data-mode="dark"] .input-group-text,
body.dark-mode .input-group-text {
  background-color: #21262d !important;
  color: #f9fafb !important;
  border: 1.5px solid #30363d !important;
}

/* 6. High Contrast Dropdowns, Modals & Cards */
.card-custom {
  background-color: var(--surface);
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
}

[data-mode="dark"] .card-custom,
body.dark-mode .card-custom {
  background-color: var(--surface-solid, #1c2128) !important;
  color: #f9fafb !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.dropdown-menu {
  background-color: var(--surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

.dropdown-item {
  color: var(--text-main) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--surface-alt) !important;
  color: var(--color-primary) !important;
}

[data-mode="dark"] .dropdown-menu,
body.dark-mode .dropdown-menu {
  background-color: #1c2128 !important;
  color: #f9fafb !important;
  border-color: #373e47 !important;
}

[data-mode="dark"] .dropdown-item,
body.dark-mode .dropdown-item {
  color: #e6edf3 !important;
}

[data-mode="dark"] .dropdown-item:hover,
body.dark-mode .dropdown-item:hover {
  background-color: #2d333b !important;
  color: #58a6ff !important;
}

.modal-content {
  background-color: var(--surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

[data-mode="dark"] .modal-content,
body.dark-mode .modal-content {
  background-color: #161b22 !important;
  color: #f9fafb !important;
  border-color: #30363d !important;
}

/* 7. Disclosures & Status Pills */
.innovative-disclosure {
  border: 1px solid var(--border-color) !important;
  background: var(--surface-alt);
}

.disclosure-summary {
  background: var(--surface-alt);
  color: var(--text-main) !important;
}

.disclosure-body {
  background: var(--surface);
  color: var(--text-main) !important;
  border-top: 1px solid var(--border-color);
}

[data-mode="dark"] .innovative-disclosure,
body.dark-mode .innovative-disclosure {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: #1c2128 !important;
}

[data-mode="dark"] .disclosure-summary,
body.dark-mode .disclosure-summary {
  background: #21262d !important;
  color: #f9fafb !important;
}

[data-mode="dark"] .disclosure-body,
body.dark-mode .disclosure-body {
  background: #161b22 !important;
  color: #e6edf3 !important;
  border-top-color: #30363d !important;
}

/* 8. Buttons & Action Links */
.btn-outline-secondary {
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
  background-color: var(--surface-alt) !important;
}

.btn-outline-secondary:hover {
  background-color: var(--surface) !important;
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

[data-mode="dark"] .btn-outline-secondary,
body.dark-mode .btn-outline-secondary {
  color: #f9fafb !important;
  border-color: #484f58 !important;
  background-color: #21262d !important;
}

[data-mode="dark"] .btn-outline-secondary:hover,
body.dark-mode .btn-outline-secondary:hover {
  background-color: #30363d !important;
  color: #58a6ff !important;
  border-color: #58a6ff !important;
}

/* 9. High Contrast Alert Components */
.alert-info {
  background-color: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
}
[data-mode="dark"] .alert-info,
body.dark-mode .alert-info {
  background-color: #082f49 !important;
  border-color: #0369a1 !important;
  color: #e0f2fe !important;
}

.alert-success {
  background-color: #dcfce7 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}
[data-mode="dark"] .alert-success,
body.dark-mode .alert-success {
  background-color: #052e16 !important;
  border-color: #15803d !important;
  color: #dcfce7 !important;
}

.alert-warning {
  background-color: #fef9c3 !important;
  border-color: #fde047 !important;
  color: #854d0e !important;
}
[data-mode="dark"] .alert-warning,
body.dark-mode .alert-warning {
  background-color: #422006 !important;
  border-color: #854d0e !important;
  color: #fef9c3 !important;
}

.alert-danger {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}
[data-mode="dark"] .alert-danger,
body.dark-mode .alert-danger {
  background-color: #450a0a !important;
  border-color: #b91c1c !important;
  color: #fee2e2 !important;
}

