/* ==========================================================================
   WhatsApp REST API Platform - Material 3 (M3) Universal Design System
   Modern, Premium, Mobile-First, Light/Dark Modes & Material You Tones
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  /* Material 3 Shape Tokens */
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 20px;
  --md-shape-xxl: 28px;
  --md-shape-full: 9999px;

  /* Material 3 Elevation Levels */
  --md-elevation-0: none;
  --md-elevation-1: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.28);
  --md-elevation-2: 0 2px 6px 2px rgba(0, 0, 0, 0.16), 0 1px 2px 0 rgba(0, 0, 0, 0.28);
  --md-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.18), 0 1px 3px 0 rgba(0, 0, 0, 0.32);
  --md-elevation-4: 0 6px 10px 4px rgba(0, 0, 0, 0.20), 0 2px 3px 0 rgba(0, 0, 0, 0.35);
  --md-elevation-5: 0 8px 12px 6px rgba(0, 0, 0, 0.22), 0 4px 4px 0 rgba(0, 0, 0, 0.38);

  /* Brand Color Tokens */
  --wa-emerald: #25d366;
  --wa-emerald-dark: #128c7e;
  --wa-teal: #075e54;
  --wa-accent: #10b981;
  --wa-blue: #3b82f6;
  --wa-indigo: #6366f1;
  --wa-purple: #a855f7;
  --wa-amber: #f59e0b;
  --wa-rose: #f43f5e;
  --wa-cyan: #06b6d4;

  /* Material 3 Dark Theme Tonal Tokens (Default) */
  --md-sys-color-surface: #0f141c;
  --md-sys-color-surface-dim: #090e15;
  --md-sys-color-surface-container-lowest: #0c1018;
  --md-sys-color-surface-container-low: #131a24;
  --md-sys-color-surface-container: #17212e;
  --md-sys-color-surface-container-high: #1e2a3b;
  --md-sys-color-surface-container-highest: #26354a;
  --md-sys-color-primary: #25d366;
  --md-sys-color-on-primary: #003919;
  --md-sys-color-primary-container: rgba(37, 211, 102, 0.16);
  --md-sys-color-on-primary-container: #57fba3;
  --md-sys-color-outline: rgba(255, 255, 255, 0.12);
  --md-sys-color-outline-variant: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-sans: 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout Dimensions */
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --radius-sm: var(--md-shape-sm);
  --radius-md: var(--md-shape-md);
  --radius-lg: var(--md-shape-xl);
  --radius-xl: var(--md-shape-xxl);
  --radius-full: var(--md-shape-full);

  /* Legacy Fallback Tokens */
  --bg-app: #0a0f18;
  --bg-sidebar: #0f1725;
  --bg-card: rgba(19, 26, 36, 0.85);
  --bg-card-solid: #131a24;
  --bg-card-hover: rgba(30, 42, 59, 0.75);
  --bg-input: #17212e;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(37, 211, 102, 0.55);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-sm: var(--md-elevation-1);
  --shadow-md: var(--md-elevation-2);
  --shadow-lg: var(--md-elevation-3);
  --glass-blur: blur(12px);
}

[data-bs-theme="light"] {
  /* Material 3 Light Theme Tonal Tokens */
  --md-sys-color-surface: #f8fafc;
  --md-sys-color-surface-dim: #edf0f5;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f3f6f9;
  --md-sys-color-surface-container: #ebf0f5;
  --md-sys-color-surface-container-high: #e2e8f0;
  --md-sys-color-surface-container-highest: #cbd5e1;
  --md-sys-color-primary: #059669;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d1fae5;
  --md-sys-color-on-primary-container: #065f46;
  --md-sys-color-outline: #94a3b8;
  --md-sys-color-outline-variant: #e2e8f0;

  --bg-app: #f4f6f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #059669;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --glass-blur: blur(8px);
}

/* Base Elements */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-main);
}

h1, .h1 { font-size: 1.75rem; line-height: 1.25; }
h2, .h2 { font-size: 1.5rem; line-height: 1.25; }
h3, .h3 { font-size: 1.35rem; line-height: 1.25; }
h4, .h4 { font-size: 1.15rem; line-height: 1.3; }
h5, .h5 { font-size: 1rem; line-height: 1.35; }
h6, .h6 { font-size: 0.88rem; line-height: 1.4; }

.page-header-title {
  white-space: nowrap;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Sidebar Navigation (Desktop & Mobile Drawer)
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar .brand {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  background: inherit;
}

.sidebar .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--wa-emerald), var(--wa-emerald-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.sidebar .brand-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.sidebar .brand button,
.sidebar .brand .btn-link {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1) !important;
  background: transparent !important;
  padding: 0 !important;
  cursor: pointer !important;
}

.sidebar .brand button:hover,
.sidebar .brand button:focus,
.sidebar .brand button:active,
.sidebar .brand .btn-link:hover,
.sidebar .brand .btn-link:focus,
.sidebar .brand .btn-link:active {
  background: var(--bg-card-hover) !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: scale(1.1) !important;
}

.sidebar .brand button i,
.sidebar .brand .btn-link i {
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.sidebar-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--md-shape-full);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.sidebar-nav .nav-link i {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar-nav .nav-link:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.sidebar-nav .nav-link:hover i {
  transform: scale(1.12);
}

.sidebar-nav .nav-link.active {
  color: var(--md-sys-color-on-primary-container);
  background: var(--md-sys-color-primary-container);
  border-color: rgba(37, 211, 102, 0.35);
  font-weight: 600;
  box-shadow: var(--md-elevation-1);
}

.sidebar-nav .nav-link.active i {
  color: var(--wa-emerald);
}

.sidebar-nav .nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 10px;
}

.sidebar-nav .nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 12px 14px 4px 14px;
  margin-top: 2px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-nav .nav-section-title:first-child {
  padding-top: 4px;
  margin-top: 0;
}

/* ==========================================================================
   Modern Skeleton Shimmer Loading (SaaS Quality)
   ========================================================================== */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-box,
.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 37%, rgba(255, 255, 255, 0.04) 63%);
  background-size: 300% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  display: inline-block;
}

[data-bs-theme="light"] .skeleton-box,
[data-bs-theme="light"] .skeleton-shimmer {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 25%, rgba(0, 0, 0, 0.09) 37%, rgba(0, 0, 0, 0.04) 63%);
  background-size: 300% 100%;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Mobile Top Navbar
   ========================================================================== */

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card-solid);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* ==========================================================================
   Main Content Canvas
   ========================================================================== */

.main-content {
  margin-left: var(--sidebar-width);
  padding: 24px 28px;
  min-height: 100vh;
  transition: margin-left 0.28s ease, padding 0.28s ease;
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .mobile-topbar {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: 14px 12px 60px 12px;
  }
}

/* Responsive Width Helpers */
@media (min-width: 576px) {
  .w-sm-auto {
    width: auto !important;
  }
}
@media (min-width: 768px) {
  .w-md-auto {
    width: auto !important;
  }
}

/* ==========================================================================
   Cards & Panels (Material 3 Surface Containers & Tonal Depth)
   ========================================================================== */

.card-custom {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--md-shape-xl);
  box-shadow: var(--md-elevation-1);
  transition: border-color 0.2s ease, box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
}

.card-custom:hover {
  border-color: rgba(37, 211, 102, 0.35);
  box-shadow: var(--md-elevation-2);
  transform: translateY(-2px);
}

.card-header-custom {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

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

/* Stat Cards (Material 3 Slim & High-Impact) */
.stat-card-slim {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--md-shape-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--md-elevation-1);
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.stat-card-slim > div:first-child {
  flex: 1 1 0;
  min-width: 0;
}

.stat-card-slim:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: var(--md-elevation-2);
}

.stat-card-slim .stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.stat-card-slim .stat-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-slim .stat-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-slim .stat-icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--md-shape-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .stat-card-slim {
    padding: 10px 12px;
    border-radius: 14px;
  }
  .stat-card-slim .stat-label {
    font-size: 0.63rem;
    letter-spacing: 0.3px;
  }
  .stat-card-slim .stat-val {
    font-size: 1.2rem;
    margin-top: 2px;
  }
  .stat-card-slim .stat-meta {
    font-size: 0.68rem;
  }
  .stat-card-slim .stat-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.95rem;
    border-radius: 9px;
  }
}

/* ==========================================================================
   Buttons & Interactive Elements (Material 3 Pill & Tonal Buttons)
   ========================================================================== */

.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.1px;
  border-radius: var(--md-shape-full);
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  min-height: 40px;
  box-shadow: var(--md-elevation-1);
  position: relative;
  overflow: hidden;
  user-select: none;
}

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

.btn:active {
  transform: scale(0.98);
  box-shadow: var(--md-elevation-1);
}

.btn-sm {
  font-size: 0.78rem;
  padding: 4px 14px;
  min-height: 32px;
  border-radius: var(--md-shape-full);
}

.btn-lg {
  font-size: 0.96rem;
  padding: 12px 24px;
  min-height: 48px;
  border-radius: var(--md-shape-full);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  border-color: #1e40af;
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, var(--wa-emerald), var(--wa-emerald-dark));
  border-color: var(--wa-emerald-dark);
  color: #ffffff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #20ba5a, #0e7065);
  border-color: #0e7065;
  color: #ffffff;
}

.btn-tonal {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.btn-tonal:hover {
  background: rgba(37, 211, 102, 0.26);
  color: var(--md-sys-color-on-primary-container);
}

.btn-outline-custom {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: none;
}

.btn-outline-custom:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: var(--text-main);
  box-shadow: var(--md-elevation-1);
}

.btn-link {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  min-height: auto !important;
  color: var(--text-muted);
}

.btn-link:hover,
.btn-link:focus,
.btn-link:active {
  box-shadow: none !important;
  text-decoration: none !important;
  color: var(--text-main);
  transform: none !important;
}

.btn-filter-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  min-height: 32px;
  border-radius: var(--md-shape-full);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--md-elevation-1);
}

.btn-filter-pill.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--md-elevation-1);
}

.btn-filter-pill.active.pill-pending {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #f59e0b;
}

.btn-filter-pill.active.pill-processing {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
  color: #3b82f6;
}

.btn-filter-pill.active.pill-failed {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #f43f5e;
}

.btn-filter-pill.active.pill-completed {
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.45);
  color: #25d366;
}

/* Material 3 Dialogs / Modals */
.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--md-shape-xxl);
  box-shadow: var(--md-elevation-4);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 22px;
}

.modal-header .btn-close {
  margin: 0;
  border-radius: var(--md-shape-full);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 14px 22px;
}

/* ==========================================================================
   Forms, Inputs, & Dropdowns (Material 3 Outlined Style)
   ========================================================================== */

.form-control, .form-select {
  font-family: var(--font-sans);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--md-shape-md);
  padding: 9px 14px;
  font-size: 0.88rem;
  min-height: 42px;
  transition: border-color 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-input);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.22);
  color: var(--text-main);
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.input-group-text {
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem;
  border-radius: var(--md-shape-md);
}

/* ==========================================================================
   Tables (Slim, Mobile-Responsive & Clean)
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-bs-theme="light"] .table-responsive {
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.table-responsive::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

[data-bs-theme="light"] .table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

.table-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  --bs-table-hover-bg: var(--bg-card-hover);
  --bs-table-hover-color: var(--text-main);
  --bs-table-border-color: var(--border-color);
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 540px;
}

.table-custom thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bg-card-solid);
}

[data-bs-theme="light"] .table-custom thead th {
  background-color: #f8fafc;
}

.table-custom th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 14px;
  white-space: nowrap;
}

.table-custom td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom td.text-end,
.table-custom th.text-end {
  white-space: nowrap;
}

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

.table-custom tbody tr:hover {
  background-color: var(--bg-card-hover);
}

/* Mobile Screens (< 768px) */
@media (max-width: 767.98px) {
  .table-custom {
    min-width: 520px;
  }

  .table-custom th {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .table-custom td {
    padding: 8px 10px;
    font-size: 0.80rem;
  }

  .table-custom .btn-group,
  .table-custom .btn-group-sm {
    display: inline-flex;
    flex-wrap: nowrap;
  }

  .table-custom .btn-sm {
    padding: 2px 6px;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   Badges & Status Indicators
   ========================================================================== */

.bg-opacity-10 { --bs-bg-opacity: 0.1 !important; }
.bg-opacity-15 { --bs-bg-opacity: 0.15 !important; }
.bg-opacity-20 { --bs-bg-opacity: 0.2 !important; }
.bg-opacity-25 { --bs-bg-opacity: 0.25 !important; }

/* User & Admin Avatars */
.user-avatar-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-heading), sans-serif;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.user-avatar-admin {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(251, 191, 36, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.user-avatar-user {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(96, 165, 250, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.badge-custom {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}

.badge-success-soft {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.badge-primary-soft {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-warning-soft {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger-soft {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.badge-info-soft {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-secondary-soft {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Light Theme High-Contrast Badge Overrides */
[data-bs-theme="light"] .badge-success-soft {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.3);
}

[data-bs-theme="light"] .badge-primary-soft {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

[data-bs-theme="light"] .badge-warning-soft {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.3);
}

[data-bs-theme="light"] .badge-danger-soft {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.3);
}

[data-bs-theme="light"] .badge-info-soft {
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
  border-color: rgba(8, 145, 178, 0.3);
}

[data-bs-theme="light"] .badge-secondary-soft {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   Toast Notification Engine Styles
   ========================================================================== */

#toastContainer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 36px);
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.toast-item.toast-leave {
  animation: toastSlideOut 0.2s ease forwards;
}

.toast-item .toast-icon {
  font-size: 1.15rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.toast-item.toast-success {
  border-left: 4px solid var(--wa-emerald);
}
.toast-item.toast-success .toast-icon {
  color: var(--wa-emerald);
}

.toast-item.toast-error {
  border-left: 4px solid var(--wa-rose);
}
.toast-item.toast-error .toast-icon {
  color: var(--wa-rose);
}

.toast-item.toast-warning {
  border-left: 4px solid var(--wa-amber);
}
.toast-item.toast-warning .toast-icon {
  color: var(--wa-amber);
}

.toast-item.toast-info {
  border-left: 4px solid var(--wa-blue);
}
.toast-item.toast-info .toast-icon {
  color: var(--wa-blue);
}

.toast-item .toast-body-text {
  flex: 1;
}

.toast-item .toast-title {
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 2px;
  color: var(--text-main);
}

.toast-item .toast-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.toast-item .toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}

.toast-item .toast-close:hover {
  color: var(--text-main);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(30px) scale(0.95); }
}

/* ==========================================================================
   Modern Modal Alert / Confirm Dialogs
   ========================================================================== */

.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 12px 18px;
}

.modal-alert-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 14px auto;
}

.modal-alert-icon.icon-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--wa-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.modal-alert-icon.icon-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--wa-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.modal-alert-icon.icon-success {
  background: rgba(37, 211, 102, 0.15);
  color: var(--wa-emerald);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.modal-alert-icon.icon-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--wa-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   Light Mode UX Enhancements (High-Contrast, Crisp & Readable)
   ========================================================================== */

[data-bs-theme="light"] body {
  background-color: #f1f5f9;
  color: #0f172a;
}

[data-bs-theme="light"] .sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03);
}

[data-bs-theme="light"] .sidebar .brand {
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .sidebar-nav .nav-link {
  color: #475569;
  font-weight: 500;
}

[data-bs-theme="light"] .sidebar-nav .nav-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}

[data-bs-theme="light"] .sidebar-nav .nav-link.active {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.12);
}

[data-bs-theme="light"] .sidebar-nav .nav-link.active i {
  color: #059669;
}

[data-bs-theme="light"] .sidebar-nav .nav-divider {
  background: #e2e8f0;
}

[data-bs-theme="light"] .card-custom {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-bs-theme="light"] .card-custom:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

[data-bs-theme="light"] .card-header-custom {
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .form-label {
  color: #334155;
  font-weight: 600;
  font-size: 0.84rem;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
  background-color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  color: #0f172a;
}

[data-bs-theme="light"] .input-group-text {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

[data-bs-theme="light"] .btn-outline-custom {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

[data-bs-theme="light"] .btn-outline-custom:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-bs-theme="light"] .btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

[data-bs-theme="light"] .btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #047857;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

[data-bs-theme="light"] .btn-filter-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

[data-bs-theme="light"] .btn-filter-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-bs-theme="light"] .btn-filter-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

[data-bs-theme="light"] .btn-filter-pill.active.pill-pending {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

[data-bs-theme="light"] .btn-filter-pill.active.pill-processing {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

[data-bs-theme="light"] .btn-filter-pill.active.pill-failed {
  background: #ffe4e6;
  border-color: #fecdd3;
  color: #9f1239;
}

[data-bs-theme="light"] .btn-filter-pill.active.pill-completed {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}

[data-bs-theme="light"] .badge-success-soft {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

[data-bs-theme="light"] .badge-primary-soft {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

[data-bs-theme="light"] .badge-warning-soft {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

[data-bs-theme="light"] .badge-danger-soft {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

[data-bs-theme="light"] .badge-info-soft {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

[data-bs-theme="light"] .badge-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

[data-bs-theme="light"] .table-custom {
  --bs-table-bg: transparent;
  --bs-table-color: #1e293b;
  --bs-table-hover-bg: #f8fafc;
  --bs-table-hover-color: #0f172a;
  --bs-table-border-color: #e2e8f0;
}

[data-bs-theme="light"] .table-custom th {
  background-color: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .table-custom td {
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

[data-bs-theme="light"] .table-custom tbody tr:hover {
  background-color: #f8fafc;
}

[data-bs-theme="light"] .table-custom tbody tr:hover td {
  color: #0f172a;
}

[data-bs-theme="light"] .stat-card-slim {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

[data-bs-theme="light"] .modal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.15);
}

[data-bs-theme="light"] .modal-header,
[data-bs-theme="light"] .modal-footer {
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .mobile-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .mobile-topbar .btn-link,
[data-bs-theme="light"] .mobile-topbar .text-white {
  color: #1e293b !important;
}

[data-bs-theme="light"] .sidebar .brand .text-white {
  color: #1e293b !important;
}

[data-bs-theme="light"] .table-responsive {
  border-color: #e2e8f0 !important;
}

[data-bs-theme="light"] .pagination .page-link {
  background-color: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .pagination .page-item.active .page-link {
  background-color: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

[data-bs-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .mobile-bottom-nav .mob-link {
  color: #64748b;
}

[data-bs-theme="light"] .mobile-bottom-nav .mob-link.active {
  color: #059669;
}

[data-bs-theme="light"] .card-custom {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

[data-bs-theme="light"] .btn-outline-custom {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

[data-bs-theme="light"] .btn-outline-custom:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
  background-color: #ffffff;
  border-color: #10b981;
  color: #0f172a;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

[data-bs-theme="light"] .input-group-text {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}

[data-bs-theme="light"] .btn-filter-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .btn-filter-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-bs-theme="light"] .btn-filter-pill.active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

[data-bs-theme="light"] .bubble-user-msg {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-bs-theme="light"] .bubble-ai-msg {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #065f46 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

[data-bs-theme="light"] .chat-timeline-custom {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-bs-theme="light"] .thread-item-custom:hover {
  background: #f1f5f9 !important;
}

[data-bs-theme="light"] .avatar-circle-sm {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #0284c7 !important;
}

/* ==========================================================================
   Google Material 3 (M3) Utility Classes & Ripple Animation Engine
   ========================================================================== */

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Material 3 Ripple Effect Waves */
.m3-ripple-host {
  overflow: hidden !important;
}
.m3-ripple-host:not(.position-fixed):not(.position-absolute):not(.theme-toggle-btn) {
  position: relative;
}

.m3-ripple-wave {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background-color: currentColor;
  opacity: 0.22;
  transform: translate(-50%, -50%) scale(0);
  animation: m3-ripple-anim 0.6s cubic-bezier(0.2, 0, 0, 1) forwards;
  z-index: 10;
}

@keyframes m3-ripple-anim {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.28;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

/* M3 Floating Action Button (FAB) */
.m3-fab {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--md-elevation-3);
  border: none;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
}

.m3-fab:hover {
  box-shadow: var(--md-elevation-4);
  transform: translateY(-2px);
}

.m3-fab:active {
  box-shadow: var(--md-elevation-2);
  transform: scale(0.96);
}

/* M3 Segmented Button / Pill Container */
.m3-segmented-pills {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--md-shape-full);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  gap: 4px;
}

/* M3 Badges & Chips */
.badge-m3 {
  border-radius: var(--md-shape-full);
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Hide scrollbars while maintaining scroll functionality */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* 100% Equilateral Circular Action Buttons */
.action-circle-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.8rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.action-circle-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  line-height: 1;
}

/* Evenly Spaced Action Button Group */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

/* 100% Equilateral Circular Theme Toggle Floating Button */
.theme-toggle-btn {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  z-index: 1050 !important;
  cursor: pointer;
}
.theme-toggle-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  line-height: 1;
}
@media (max-width: 575.98px) {
  .theme-toggle-btn {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    font-size: 0.85rem !important;
  }
}
