/* ==========================================================================
   WhatsApp REST API Platform - Universal Design System
   Modern, Premium, Mobile-First, Light/Dark Modes
   ========================================================================== */

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

:root {
  /* 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;

  /* Typography */
  --font-sans: 'Inter', 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: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Dark Theme Tokens (Default) */
  --bg-app: #090e17;
  --bg-sidebar: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-solid: #0f172a;
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --bg-input: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(37, 211, 102, 0.5);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.55);
  --glass-blur: blur(12px);
}

[data-bs-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #10b981;
  --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-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: 9px 12px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.sidebar-nav .nav-link i {
  font-size: 0.95rem;
  width: 20px;
  text-align: center;
  transition: transform 0.15s ease;
}

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

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

.sidebar-nav .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.22), rgba(18, 140, 126, 0.25));
  border-color: rgba(37, 211, 102, 0.4);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.15);
}

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

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

.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 (Glassmorphism & Clean Borders)
   ========================================================================== */

.card-custom {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card-custom:hover {
  border-color: rgba(37, 211, 102, 0.25);
}

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

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

/* Stat Cards (Slim & High-Impact) */
.stat-card-slim {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

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

.stat-card-slim .stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-card-slim .stat-val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 4px;
}

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

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.86rem;
  border-radius: var(--radius-md);
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  min-height: 38px;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 4px 10px;
  min-height: 30px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 0.95rem;
  padding: 10px 20px;
  min-height: 44px;
}

.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;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.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;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

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

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

.btn-filter-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 12px;
  min-height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

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

.btn-filter-pill.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
  font-weight: 600;
}

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

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

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

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

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

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

.modal-header .btn-close {
  margin: 0;
}

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

/* ==========================================================================
   Forms, Inputs, & Dropdowns
   ========================================================================== */

.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(--radius-md);
  padding: 8px 12px;
  font-size: 0.88rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.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.15);
  color: var(--text-main);
}

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

.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(--radius-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
   ========================================================================== */

.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);
}

.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;
}

