/* ==========================================================================
   Ahram CRM - Cyber Luxury Theme System (Light / Dark Mode Engine)
   System-Ahram/css/theme.css
   ========================================================================== */

/* 1. Theme Toggle Button Styling (زر الإيقونة الدائري المبتكر بدون نصوص) */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(224, 86, 26, 0.45);
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  transform: translateY(-2px) scale(1.08);
  border-color: #FB923C;
  box-shadow: 0 6px 20px rgba(224, 86, 26, 0.5);
  background: rgba(30, 41, 59, 0.9);
}

.theme-toggle-btn:active {
  transform: translateY(0) scale(0.95);
}

.theme-toggle-btn .theme-icon {
  width: 19px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, color 0.3s ease;
}

.theme-icon-sun {
  color: #f59e0b !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

.theme-icon-moon {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

/* ==========================================================================
   2. Light Theme Overrides (تغطية وتعديل الوضع الفاتح للنظام بالكامل)
   ========================================================================== */
[data-theme="light"] {
  color-scheme: light;

  --bg-dark: #f0f4f9;
  --bg-surface: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-card-border: rgba(203, 213, 225, 0.85);
  --bg-card-hover: rgba(248, 250, 252, 0.98);

  --fiat-red: #E0561A;
  --fiat-red-light: #FB923C;
  --fiat-red-dark: #C2410C;
  --fiat-red-glow: rgba(224, 86, 26, 0.2);

  --neon-cyan: #0284c7;
  --neon-cyan-glow: rgba(2, 132, 199, 0.2);
  --neon-blue: #0284c7;
  --neon-green: #059669;
  --neon-amber: #E0561A;
  --neon-red: #dc2626;

  --chrome-silver: #1e293b;
  --chrome-light: #0f172a;
  --chrome-mid: #475569;
  --chrome-dark: #64748b;
  --chrome-gunmetal: #cbd5e1;
  --chrome-slate: #f8fafc;
  --chrome-border: rgba(148, 163, 184, 0.4);
  --chrome-border-hover: rgba(224, 86, 26, 0.5);
  --chrome-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 75%, #475569 100%);
  --metal-surface: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --input-bg: #ffffff;
  --input-border: rgba(224, 86, 26, 0.4);
  --input-focus: #E0561A;
}

/* Base Body in Light Mode */
[data-theme="light"] body {
  background-color: #f0f4f9 !important;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(224, 86, 26, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 82% 15%, rgba(2, 132, 199, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(224, 86, 26, 0.04) 0%, transparent 50%) !important;
  color: #0f172a !important;
}

/* Header & Nav Bar in Light Mode */
[data-theme="light"] .header-bar,
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(224, 86, 26, 0.25) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .theme-toggle-btn {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(224, 86, 26, 0.45);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #ffffff;
  border-color: #E0561A;
  box-shadow: 0 6px 18px rgba(224, 86, 26, 0.25);
}

[data-theme="light"] .user-badge {
  background: rgba(241, 245, 249, 0.95) !important;
  border-color: rgba(224, 86, 26, 0.3) !important;
}

[data-theme="light"] .user-name-text {
  color: #0f172a !important;
}

/* Brand Section & Logo Text in Light Mode */
[data-theme="light"] .brand-title {
  color: #0f172a !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .brand-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .header-center-title,
[data-theme="light"] .header-indicator {
  background: rgba(241, 245, 249, 0.95) !important;
  color: #0f172a !important;
  border: 1px solid rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

/* ==========================================================================
   3. Sidebar Navigation Rail in Light Mode
   ========================================================================== */
[data-theme="light"] .side-nav-rail,
[data-theme="light"] aside.side-nav-rail {
  background: #ffffff !important;
  border-left: 1px solid #cbd5e1 !important;
  border-right: none !important;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .nav-rail-item {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .nav-rail-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .nav-rail-item.active {
  background: linear-gradient(135deg, rgba(224, 86, 26, 0.16), rgba(224, 86, 26, 0.08)) !important;
  color: #E0561A !important;
  border-color: rgba(224, 86, 26, 0.5) !important;
  box-shadow: 0 4px 14px rgba(224, 86, 26, 0.2) !important;
}

[data-theme="light"] .nav-rail-item.active i {
  color: #E0561A !important;
}

[data-theme="light"] .nav-rail-item span {
  color: inherit !important;
  font-weight: 700 !important;
}

[data-theme="light"] .sidebar-dev-card {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .sidebar-dev-card .dev-credits-title .dev-by-eng {
  color: #64748b !important;
}

[data-theme="light"] .sidebar-dev-card .dev-credits-title .dev-name {
  color: #0284c7 !important;
  text-shadow: none !important;
}

[data-theme="light"] .dev-social-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .dev-social-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

/* ==========================================================================
   4. Glass Panels & Cards in Light Mode
   ========================================================================== */
[data-theme="light"] .glass-panel,
[data-theme="light"] .client-card,
[data-theme="light"] .hub-tab-panel,
[data-theme="light"] .complaints-card,
[data-theme="light"] .complaints-table-container,
[data-theme="light"] .report-card,
[data-theme="light"] .settings-card,
[data-theme="light"] .card-panel,
[data-theme="light"] .diag-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .kpi-card,
[data-theme="light"] .summary-card,
[data-theme="light"] .survey-kpi-card,
[data-theme="light"] .no-answer-card,
[data-theme="light"] .settings-hero-card,
[data-theme="light"] .settings-content-card,
[data-theme="light"] .table-panel,
[data-theme="light"] .filter-toolbar,
[data-theme="light"] .filter-bar-container,
[data-theme="light"] .perm-checkbox-card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(203, 213, 225, 0.85) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

/* ==========================================================================
   5. Tables & Text Visibility in Light Mode (Fix White Text)
   ========================================================================== */
[data-theme="light"] table,
[data-theme="light"] table tbody,
[data-theme="light"] table tr,
[data-theme="light"] table td,
[data-theme="light"] .hub-table td,
[data-theme="light"] .reports-table td,
[data-theme="light"] .complaints-table td,
[data-theme="light"] .settings-table td,
[data-theme="light"] .no-answer-table td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] table thead th,
[data-theme="light"] .hub-table th,
[data-theme="light"] .reports-table th,
[data-theme="light"] .complaints-table th,
[data-theme="light"] .settings-table th,
[data-theme="light"] .no-answer-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-bottom: 2px solid #cbd5e1 !important;
  font-weight: 800 !important;
}

[data-theme="light"] table tbody tr:nth-child(even) td,
[data-theme="light"] .hub-table tr:nth-child(even) td,
[data-theme="light"] .reports-table tr:nth-child(even) td,
[data-theme="light"] .complaints-table tr:nth-child(even) td {
  background: #f8fafc !important;
}

[data-theme="light"] table tbody tr:hover td,
[data-theme="light"] .hub-table tr:hover td,
[data-theme="light"] .reports-table tr:hover td,
[data-theme="light"] .complaints-table tr:hover td {
  background: rgba(224, 86, 26, 0.08) !important;
}

/* Invert all inline white and pale gray text inside table cells */
[data-theme="light"] table td [style*="color: #fff"],
[data-theme="light"] table td [style*="color: #ffffff"],
[data-theme="light"] table td [style*="color:#fff"],
[data-theme="light"] table td [style*="color:#ffffff"],
[data-theme="light"] table td [style*="color: #e2e8f0"],
[data-theme="light"] table td [style*="color: #cbd5e1"],
[data-theme="light"] table td [style*="color:#e2e8f0"],
[data-theme="light"] table td [style*="color:#cbd5e1"],
[data-theme="light"] table td [style*="color: #f8fafc"],
[data-theme="light"] table td [style*="color:#f8fafc"],
[data-theme="light"] table td [style*="color: rgb(255, 255, 255)"],
[data-theme="light"] table td [style*="color: white"],
[data-theme="light"] table td [style*="color:white"],
[data-theme="light"] .complaints-table td div[style*="color: #fff"],
[data-theme="light"] .complaints-table td div[style*="color: #ffffff"],
[data-theme="light"] .complaints-table td span[style*="color: #fff"],
[data-theme="light"] .complaints-table td span[style*="color: #ffffff"],
[data-theme="light"] .reports-table td div[style*="color: #fff"],
[data-theme="light"] .reports-table td div[style*="color: #ffffff"],
[data-theme="light"] .reports-table td span[style*="color: #fff"],
[data-theme="light"] .reports-table td span[style*="color: #ffffff"] {
  color: #0f172a !important;
}

[data-theme="light"] table td [style*="color: var(--neon-cyan)"],
[data-theme="light"] table td [style*="color:#38bdf8"],
[data-theme="light"] table td [style*="color: #38bdf8"] {
  color: #0284c7 !important;
}

[data-theme="light"] table td [style*="color: var(--text-dim)"],
[data-theme="light"] table td [style*="color: var(--text-muted)"] {
  color: #64748b !important;
}

/* Action Buttons inside Tables */
[data-theme="light"] .btn-reply-action,
[data-theme="light"] .btn-view-row,
[data-theme="light"] .btn-view-ticket {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-reply-action:hover,
[data-theme="light"] .btn-view-row:hover,
[data-theme="light"] .btn-view-ticket:hover {
  background: #f1f5f9 !important;
  color: #E0561A !important;
  border-color: #E0561A !important;
  box-shadow: 0 4px 10px rgba(224, 86, 26, 0.18) !important;
}

/* Type Badges & Status Pills in Light Mode */
[data-theme="light"] .type-badge {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .type-badge i {
  color: #0284c7 !important;
}

[data-theme="light"] .reply-count-badge {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .record-pill.inq {
  background: rgba(224, 86, 26, 0.12) !important;
  color: #C2410C !important;
  border: 1px solid rgba(224, 86, 26, 0.35) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .record-pill.cmp {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .status-badge.status-open,
[data-theme="light"] .status-dropdown-btn.status-open {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .status-badge.status-pending,
[data-theme="light"] .status-dropdown-btn.status-pending {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #d97706 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .status-badge.status-closed,
[data-theme="light"] .status-dropdown-btn.status-closed {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   6. Filters, Tabs & Date Range Bars in Light Mode
   ========================================================================== */
/* Status Filter Tabs (Complaints / Reply Hub) */
[data-theme="light"] .status-filter-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .status-tab-btn {
  background: transparent !important;
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .status-tab-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .status-tab-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Category Filter Tabs (Complaints / Reply Hub) */
[data-theme="light"] .category-filter-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .category-tab-btn {
  background: transparent !important;
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .category-tab-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .category-tab-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Date Range Outer Filter Capsule in Light Mode */
[data-theme="light"] .date-range-filter-group,
[data-theme="light"] .visit-date-filter-group {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .date-range-filter-group .filter-group,
[data-theme="light"] .visit-date-filter-group .filter-group,
[data-theme="light"] .filter-field,
[data-theme="light"] .filter-group {
  background: transparent !important;
  border: none !important;
}

[data-theme="light"] .filter-label,
[data-theme="light"] .filter-field label,
[data-theme="light"] .filter-group label {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .filter-input,
[data-theme="light"] .filter-select,
[data-theme="light"] select.filter-select,
[data-theme="light"] input[type="date"].filter-input,
[data-theme="light"] input[type="date"] {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .filter-input:focus,
[data-theme="light"] .filter-select:focus,
[data-theme="light"] select.filter-select:focus,
[data-theme="light"] input[type="date"]:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

[data-theme="light"] .filter-select option,
[data-theme="light"] select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Search Bars across pages */
[data-theme="light"] .search-filter-wrap,
[data-theme="light"] .table-search-box,
[data-theme="light"] .search-box-wrapper,
[data-theme="light"] .search-bar-container {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .search-filter-input,
[data-theme="light"] #table-search-input,
[data-theme="light"] #filter-search,
[data-theme="light"] .search-input {
  background: transparent !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .search-filter-input::placeholder,
[data-theme="light"] #table-search-input::placeholder,
[data-theme="light"] #filter-search::placeholder,
[data-theme="light"] .search-input::placeholder {
  color: #64748b !important;
}

/* Reset and Action Buttons */
[data-theme="light"] .btn-reset-filters {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-reset-filters:hover {
  background: #fecaca !important;
  border-color: #f87171 !important;
}

[data-theme="light"] .btn-action-reset {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1.5px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-action-reset:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Table Header Banners in Light Mode */
[data-theme="light"] .table-header-info-bar,
[data-theme="light"] .table-header-wrap,
[data-theme="light"] .table-header-banner,
[data-theme="light"] .table-section-title,
[data-theme="light"] .table-title-box,
[data-theme="light"] .section-header-box {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .table-header-info-bar span,
[data-theme="light"] .table-title-area h3,
[data-theme="light"] .table-title-area span {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* ==========================================================================
   7. Table Buttons, Statuses & Badges in Light Mode
   ========================================================================== */
/* Action: Reply Button in Complaints & Hub Table */
[data-theme="light"] .btn-action-reply,
[data-theme="light"] .btn-reply-action,
[data-theme="light"] .btn-view-row,
[data-theme="light"] .btn-view-ticket {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
  font-weight: 700 !important;
}

[data-theme="light"] .btn-action-reply:hover,
[data-theme="light"] .btn-reply-action:hover,
[data-theme="light"] .btn-view-row:hover,
[data-theme="light"] .btn-view-ticket:hover {
  background: #f1f5f9 !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18) !important;
}

/* Ticket Type Badges in Table (Inquiry / Complaint / Maintenance / etc) */
[data-theme="light"] .ticket-type-badge,
[data-theme="light"] .ticket-type-badge.type-inquiry,
[data-theme="light"] .ticket-type-badge.type-maintenance,
[data-theme="light"] .ticket-type-badge.type-sparepart,
[data-theme="light"] .ticket-type-badge.type-sales,
[data-theme="light"] .ticket-type-badge.type-default {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

[data-theme="light"] .ticket-type-badge.type-inquiry {
  background: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .ticket-type-badge.type-inquiry i {
  color: #0284c7 !important;
}

[data-theme="light"] .ticket-type-badge.type-complaint {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .ticket-type-badge.type-maintenance {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .ticket-type-badge.type-sparepart {
  background: #f3e8ff !important;
  border: 1px solid #e9d5ff !important;
  color: #7e22ce !important;
  font-weight: 800 !important;
}

[data-theme="light"] .ticket-type-badge.type-sales {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
  font-weight: 800 !important;
}

/* Status Dropdowns in Table */
[data-theme="light"] .status-dropdown,
[data-theme="light"] .status-dropdown.status-open {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #fca5a5 !important;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.15) !important;
}

[data-theme="light"] .status-dropdown.status-pending {
  background-color: #fef3c7 !important;
  color: #d97706 !important;
  border: 1.5px solid #fde68a !important;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15) !important;
}

[data-theme="light"] .status-dropdown.status-closed {
  background-color: #d1fae5 !important;
  color: #059669 !important;
  border: 1.5px solid #a7f3d0 !important;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.15) !important;
}

[data-theme="light"] .status-dropdown option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Replies Count Badge in Table */
[data-theme="light"] .replies-count-badge,
[data-theme="light"] .reply-count-badge {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   8. WhatsApp Ticket & Reply Modal in Light Mode
   ========================================================================== */
[data-theme="light"] .modal-card.wa-chat-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15), 0 0 25px rgba(2, 132, 199, 0.08) !important;
}

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

[data-theme="light"] .wa-avatar {
  background: #f1f5f9 !important;
  border: 1.5px solid #0284c7 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .wa-online-dot {
  background: #0284c7 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.5) !important;
}

[data-theme="light"] .wa-contact-name {
  color: #0f172a !important;
}

[data-theme="light"] .wa-contact-sub {
  color: #64748b !important;
}

[data-theme="light"] #modal-complaint-type,
[data-theme="light"] #modal-complaint-agent {
  color: #475569 !important;
}

[data-theme="light"] .wa-bullet {
  color: #94a3b8 !important;
}

[data-theme="light"] .wa-header-phone-badge {
  background: rgba(2, 132, 199, 0.1) !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  color: #0284c7 !important;
  box-shadow: none !important;
}

[data-theme="light"] .client-code-pill {
  background: rgba(224, 86, 26, 0.12) !important;
  color: #c2410c !important;
  border: 1px solid rgba(224, 86, 26, 0.35) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .record-num-pill.inq-num {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .record-num-pill.cmp-num {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .wa-header-type-badge.type-complaint {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .wa-header-type-badge.type-inquiry {
  background: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
}

[data-theme="light"] .wa-v-badge {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .wa-v-badge.vin-highlight {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

[data-theme="light"] .wa-v-badge.vin-highlight .v-value {
  color: #b91c1c !important;
}

[data-theme="light"] .wa-v-badge.plate-highlight {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}

[data-theme="light"] .wa-v-badge.plate-highlight .v-value {
  color: #0284c7 !important;
}

[data-theme="light"] .wa-v-badge.media-highlight {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .wa-v-badge.media-highlight .v-value {
  color: #0f172a !important;
}

[data-theme="light"] .wa-close-btn {
  background: #fee2e2 !important;
  border: 1px solid #fca5a5 !important;
  color: #ef4444 !important;
}

[data-theme="light"] .wa-close-btn:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4) !important;
}

/* WhatsApp Messages Canvas */
[data-theme="light"] .wa-chat-messages {
  background: #f1f5f9 !important;
}

[data-theme="light"] .wa-date-pill {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Original Client Complaint Bubble */
[data-theme="light"] .wa-bubble-client {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-right: 4px solid #ef4444 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .wa-bubble-sender {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .wa-sender-client {
  color: #0f172a !important;
}

[data-theme="light"] .wa-sender-client .wa-sender-label {
  color: #64748b !important;
}

[data-theme="light"] .wa-sender-client .wa-sender-name {
  color: #0f172a !important;
}

[data-theme="light"] .wa-complaint-type-tag {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .wa-ticket-body-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .wa-bubble-text {
  color: #0f172a !important;
}

[data-theme="light"] .wa-bubble-time {
  color: #64748b !important;
}

/* Agent Outgoing Reply Bubble */
[data-theme="light"] .wa-bubble-agent {
  background: #f0fdf4 !important;
  color: #0f172a !important;
  border: 1px solid #bbf7d0 !important;
  border-left: 4px solid #10b981 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .wa-sender-agent {
  color: #059669 !important;
}

[data-theme="light"] .agent-handle {
  color: #15803d !important;
  background: #dcfce7 !important;
  border-color: #86efac !important;
}

[data-theme="light"] .wa-reply-badge {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

[data-theme="light"] .wa-double-check {
  color: #059669 !important;
}

[data-theme="light"] .wa-empty-replies-notice {
  background: #ffffff !important;
  border: 1px dashed #cbd5e1 !important;
  color: #64748b !important;
}

/* System Status Change Event Card */
[data-theme="light"] .wa-status-change-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .status-single-line {
  color: #334155 !important;
}

[data-theme="light"] .status-card-user .changer-name {
  color: #0f172a !important;
}

[data-theme="light"] .status-sep {
  color: #94a3b8 !important;
}

[data-theme="light"] .status-action-tag {
  color: #64748b !important;
}

/* Bottom Chat Input Bar */
[data-theme="light"] .wa-chat-input-bar {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .wa-input-author-badge {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0284c7 !important;
  box-shadow: none !important;
}

[data-theme="light"] .wa-input-wrap {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
}

[data-theme="light"] .wa-input-wrap:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
  background: #ffffff !important;
}

[data-theme="light"] .wa-chat-textarea {
  color: #0f172a !important;
}

[data-theme="light"] .wa-chat-textarea::placeholder {
  color: #94a3b8 !important;
}

/* Status Dropdown inside Modal */
[data-theme="light"] .wa-dropdown-trigger.status-open {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.15) !important;
}

[data-theme="light"] .wa-dropdown-trigger.status-pending {
  background-color: #fef3c7 !important;
  color: #d97706 !important;
  border-color: #fde68a !important;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15) !important;
}

[data-theme="light"] .wa-dropdown-trigger.status-closed {
  background-color: #d1fae5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.15) !important;
}

[data-theme="light"] .wa-dropdown-menu {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .wa-dropdown-item {
  color: #334155 !important;
}

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

[data-theme="light"] .wa-dropdown-item.item-open {
  color: #dc2626 !important;
}

[data-theme="light"] .wa-dropdown-item.item-open:hover,
[data-theme="light"] .wa-dropdown-item.item-open.active {
  background: #fee2e2 !important;
}

[data-theme="light"] .wa-dropdown-item.item-pending {
  color: #d97706 !important;
}

[data-theme="light"] .wa-dropdown-item.item-pending:hover,
[data-theme="light"] .wa-dropdown-item.item-pending.active {
  background: #fef3c7 !important;
}

[data-theme="light"] .wa-dropdown-item.item-closed {
  color: #059669 !important;
}

[data-theme="light"] .wa-dropdown-item.item-closed:hover,
[data-theme="light"] .wa-dropdown-item.item-closed.active {
  background: #d1fae5 !important;
}

/* ==========================================================================
   9. KPI Cards & Charts in Light Mode
   ========================================================================== */
[data-theme="light"] .kpi-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .kpi-title {
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .kpi-value {
  color: #0f172a !important;
}

[data-theme="light"] .kpi-subtext {
  color: #64748b !important;
}

[data-theme="light"] .chart-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .chart-header h3 {
  color: #0f172a !important;
}

/* ==========================================================================
   10. Modals, Detail Cards & Chat in Light Mode
   ========================================================================== */
[data-theme="light"] .cyber-modal-card,
[data-theme="light"] .modal-content,
[data-theme="light"] .search-results-dropdown,
[data-theme="light"] .combobox-dropdown {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2) !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-title span,
[data-theme="light"] .modal-header h3,
[data-theme="light"] .modal-header h4 {
  color: #0f172a !important;
}

[data-theme="light"] .modal-meta-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-meta-label {
  color: #64748b !important;
}

[data-theme="light"] .modal-meta-value {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] .modal-details-block {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-close-modal,
[data-theme="light"] .modal-close-btn {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-close-modal:hover,
[data-theme="light"] .modal-close-btn:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
}

/* Labels, Texts, & Headings */
[data-theme="light"] .field-label,
[data-theme="light"] .client-header-title,
[data-theme="light"] .section-title,
[data-theme="light"] label,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  color: #0f172a !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .client-header-subtitle {
  color: #64748b !important;
}

/* Chart Canvas Text Support */
[data-theme="light"] canvas {
  filter: contrast(1.05);
}

/* ==========================================================================
   11. Hub Action Tabs (الاستفسارات / الشكاوى) in Light Mode
   ========================================================================== */
[data-theme="light"] .hub-tabs-header {
  border-bottom: 1.5px solid #e2e8f0 !important;
}

[data-theme="light"] .hub-tab-btn {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

[data-theme="light"] .hub-tab-btn span {
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .hub-tab-btn i,
[data-theme="light"] .hub-tab-btn svg {
  color: #64748b !important;
}

[data-theme="light"] .hub-tab-btn:hover {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .hub-tab-btn:hover span {
  color: #0f172a !important;
}

[data-theme="light"] .hub-tab-btn:hover i,
[data-theme="light"] .hub-tab-btn:hover svg {
  color: #0f172a !important;
}

[data-theme="light"] .hub-tab-btn.active {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.18) 0%, rgba(224, 86, 26, 0.28) 100%) !important;
  border: 1.5px solid #E0561A !important;
  box-shadow: 0 2px 10px rgba(224, 86, 26, 0.2) !important;
}

[data-theme="light"] .hub-tab-btn.active span {
  color: #C2410C !important;
  font-weight: 800 !important;
}

[data-theme="light"] .hub-tab-btn.active i,
[data-theme="light"] .hub-tab-btn.active svg {
  color: #E0561A !important;
}

[data-theme="light"] .tab-badge-count {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .hub-tab-btn.active .tab-badge-count {
  background: #E0561A !important;
  color: #ffffff !important;
  border-color: #E0561A !important;
  box-shadow: 0 0 8px rgba(224, 86, 26, 0.4) !important;
}

[data-theme="light"] .tab-latest-arrow {
  color: #059669 !important;
}

/* ==========================================================================
   12. Account Type Switcher & Disabled Inputs in Light Mode
   ========================================================================== */
[data-theme="light"] .account-type-toggle-group {
  background: #f1f5f9 !important;
  padding: 3px !important;
  border-radius: 12px !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .account-type-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #475569 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .account-type-btn i,
[data-theme="light"] .account-type-btn svg {
  color: #64748b !important;
}

[data-theme="light"] .account-type-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .account-type-btn.active {
  background: #ffffff !important;
  border: 1.5px solid #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2) !important;
  font-weight: 800 !important;
}

[data-theme="light"] .account-type-btn.active i,
[data-theme="light"] .account-type-btn.active svg {
  color: #0284c7 !important;
}

[data-theme="light"] input:disabled,
[data-theme="light"] textarea:disabled,
[data-theme="light"] select:disabled,
[data-theme="light"] .input-field:disabled,
[data-theme="light"] .combobox-input:disabled {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

[data-theme="light"] .input-field:disabled::placeholder,
[data-theme="light"] input:disabled::placeholder {
  color: #94a3b8 !important;
}

/* ==========================================================================
   13. Scrollbars in Light Mode
   ========================================================================== */
[data-theme="light"] * {
  scrollbar-width: thin;
  scrollbar-color: #E0561A #f1f5f9;
}

[data-theme="light"] ::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
  border-radius: 9999px !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FB923C 0%, #E0561A 100%) !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 1px 3px rgba(224, 86, 26, 0.3) !important;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%) !important;
}

[data-theme="light"] ::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

[data-theme="light"] ::-webkit-scrollbar-corner {
  background: transparent !important;
}