/* ==========================================================================
   EGYHOST Admin Dashboard - Cloud Core Precision Theme
   Aligned 100% with EGYHOST Official Brand Identity & Design System
   ========================================================================== */

:root {
  /* EGYHOST Master Dark System */
  --bg-main: #0b0f19;
  --bg-sidebar: #0f172a;
  --bg-header: rgba(15, 23, 42, 0.92);
  --bg-card: #111827;
  --bg-card-hover: #1e293b;
  --bg-card-elevated: #1e293b;
  --border-subtle: #1e293b;
  --border-focus: #0ea5e9;
  --border-glow: rgba(14, 165, 233, 0.4);

  /* EGYHOST Brand Palette */
  --brand-blue: #0284c7;
  --brand-blue-dark: #001d47;
  --brand-sky: #0ea5e9;
  --brand-cyan: #00d8ff;
  --brand-cyan-light: #7dd3fc;
  --brand-glow: 0 0 25px rgba(14, 165, 233, 0.35);

  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #ef4444;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-arabic: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Inter', monospace;

  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* EGYHOST Luxury Light System */
html.light, body.light {
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-card-elevated: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: #0284c7;
  --border-glow: rgba(2, 132, 199, 0.25);

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

/* Cloud Ambient Background (Matching EGYHOST Cloud Core Precision) */
.cloud-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(circle at 80% 12%, rgba(14, 165, 233, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(0, 216, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.05) 0%, transparent 60%);
}

.cloud-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0v60H0V0h60zM2 2v56h56V2H2z' fill='%2300D8FF' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Top Header */
.top-header {
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Brand Pills */
.pill-sky-badge {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(2, 132, 199, 0.15) 100%);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #7dd3fc;
  transition: var(--transition-smooth);
}
.pill-sky-badge:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(2, 132, 199, 0.25) 100%);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px);
}

.promo-ticker {
  background: linear-gradient(90deg, rgba(11, 23, 57, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}

/* Sidebar Styling */
.admin-sidebar {
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-subtle);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease;
  z-index: 35;
}

body.ltr-mode {
  direction: ltr;
}
body.ltr-mode .admin-sidebar {
  border-left: none;
  border-right: 1px solid var(--border-subtle);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-smooth);
  position: relative;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(-2px);
}
body.ltr-mode .nav-link:hover {
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0.08) 100%);
  color: #38bdf8;
  font-weight: 700;
  border: 1px solid rgba(14, 165, 233, 0.35);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.15);
  position: relative;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 5px;
  width: 3.5px;
  background: #00d8ff;
  border-radius: 9999px;
  box-shadow: 0 0 10px #00d8ff;
}
body.ltr-mode .nav-link.active::before {
  right: auto;
  left: 5px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: var(--transition-smooth);
}
.sidebar-section-title:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

/* AI Command Prompt Bar */
.ai-prompt-container {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}
.ai-prompt-container:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 25px rgba(14, 165, 233, 0.35), 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

.ai-sparkle-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.5);
  transition: var(--transition-spring);
}
.ai-sparkle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(0, 216, 255, 0.7);
}

/* Promo Hero Card (Deep Navy/Sapphire with Cyan Glow) */
.promo-hero-card {
  background: linear-gradient(135deg, #071329 0%, #0f2766 50%, #061023 100%);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px -10px rgba(14, 165, 233, 0.2);
}

.promo-hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 60% 40%, rgba(0, 216, 255, 0.12), transparent 50%);
  pointer-events: none;
}

/* Checklist Cards */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.125rem;
  padding: 1.125rem 1.5rem;
  transition: var(--transition-smooth);
  position: relative;
}
.task-card:hover {
  background: var(--bg-card-hover);
  border-color: #334155;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Live Server Metric Cards */
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: var(--transition-smooth);
}
.metric-card:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

/* Animations */
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.96); }
}
.pulse-subtle {
  animation: pulseSubtle 2.5s infinite ease-in-out;
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
.float-gentle {
  animation: floatGentle 4s infinite ease-in-out;
}

/* Super Admin View Transitions */
.admin-view-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-view-panel.active-view {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Super Admin Tables */
.super-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  position: relative;
}
.super-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  font-size: 0.8125rem;
}
.super-table th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  white-space: nowrap;
}
.super-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
  color: var(--text-main);
  white-space: nowrap;
  vertical-align: middle;
  transition: var(--transition-smooth);
}
.super-table tr:hover td {
  background: rgba(30, 41, 59, 0.45);
}
.super-table tr:last-child td {
  border-bottom: none;
}

/* Mobile swipe cue header for tables */
.table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.6875rem;
  color: var(--text-muted);
  user-select: none;
}
@media (min-width: 768px) {
  .table-scroll-hint {
    display: none;
  }
}

/* Capacity Multi-Bar */
.capacity-multi-bar {
  display: flex;
  height: 0.875rem;
  border-radius: 9999px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.capacity-slice-allocated {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.capacity-slice-buffer {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.capacity-slice-free {
  background: #0f172a;
}

/* Form Groups & Inputs */
.super-input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}
.super-input {
  width: 100%;
  background-color: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: #ffffff;
  font-size: 0.8125rem;
  outline: none;
  transition: var(--transition-smooth);
}
.super-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
}
.super-input:read-only {
  background-color: rgba(15, 23, 42, 0.5);
  color: #94a3b8;
  cursor: not-allowed;
}

/* Custom Switch Toggle */
.switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}
.switch-label input:checked + .switch-slider {
  background-color: #0ea5e9;
}
.switch-label input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Support Tickets & Badges */
.badge-ticket-open {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.badge-ticket-progress {
  background-color: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}
.badge-ticket-resolved {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.priority-badge-urgent {
  background-color: rgba(225, 29, 72, 0.2);
  color: #fda4af;
  border: 1px solid rgba(225, 29, 72, 0.4);
}
.priority-badge-high {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.priority-badge-medium {
  background-color: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.priority-badge-low {
  background-color: rgba(100, 116, 139, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Permissions Chip */
.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

/* Support Conversation Thread */
.support-bubble-client {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem 1rem 0.25rem 1rem;
}
.support-bubble-admin {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(2, 132, 199, 0.15) 100%);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 1rem 1rem 1rem 0.25rem;
}

/* ==========================================================================
   Mobile & Responsive Enhancements (نسق للهاتف الذكي والشاشات الصغيرة)
   ========================================================================== */

@media (max-width: 1023px) {
  /* Mobile Sidebar as Off-canvas Drawer */
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 290px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    z-index: 55 !important;
    transform: translateX(100%);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.85);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding-top: 1.25rem !important;
  }
  
  body.ltr-mode .admin-sidebar {
    right: auto !important;
    left: 0 !important;
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  #sidebar-overlay {
    z-index: 50 !important;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

@media (max-width: 767px) {
  /* Mobile Header Compactness */
  .top-header {
    height: 3.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Compact padding for metric cards and panels */
  .metric-card {
    padding: 1rem;
    border-radius: 0.875rem;
  }

  /* Modals on small screens */
  .modal-container > div {
    width: calc(100vw - 1.25rem) !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0.625rem auto;
    padding: 1.25rem !important;
  }

  /* Tables container */
  .super-table-container {
    border-radius: 0.875rem;
  }

  .super-table th {
    padding: 0.75rem 0.875rem;
    font-size: 0.7rem;
  }

  .super-table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.75rem;
  }

  /* Form groups on phone */
  .super-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Touch Friendly Scroll and Tap Targets */
button, a {
  touch-action: manipulation;
}

/* ==========================================================================
   EGYHOST LIGHT THEME SUITE (الوضع الفاتح - وايت مود الفاخر)
   ========================================================================== */

html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light .cloud-ambient {
  background-image: 
    radial-gradient(circle at 80% 12%, rgba(14, 165, 233, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 20% 70%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 216, 255, 0.04) 0%, transparent 60%) !important;
}

html.light .top-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}

html.light .admin-sidebar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}

html.light .nav-link {
  color: #475569 !important;
}
html.light .nav-link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html.light .nav-link.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%) !important;
  color: #0284c7 !important;
  border-color: rgba(14, 165, 233, 0.35) !important;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.12) !important;
}

html.light .sidebar-section-title {
  color: #64748b !important;
}
html.light .sidebar-section-title:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

/* Card and Container Light Overrides */
html.light .super-table-container,
html.light .metric-card,
html.light .task-card,
html.light .bg-\[\#111827\],
html.light .bg-\[\#0b101c\],
html.light .modal-container > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03) !important;
}

/* Tables in Light Mode */
html.light .super-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.light .super-table td {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

html.light .super-table tr:hover td {
  background: #f8fafc !important;
}

html.light .table-scroll-hint {
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

/* Form Controls and Inputs */
html.light .super-input,
html.light input[type="text"],
html.light input[type="password"],
html.light input[type="number"],
html.light input[type="date"],
html.light input[type="url"],
html.light input[type="email"],
html.light input[type="search"],
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light input[type="date"] {
  color-scheme: light !important;
}

html.light .super-input:focus,
html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

html.light .super-input:read-only {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
}

html.light .super-input-group label {
  color: #475569 !important;
}

/* Light Mode Text Overrides */
html.light .text-white {
  color: #0f172a !important;
}
html.light .text-slate-200 {
  color: #1e293b !important;
}
html.light .text-slate-300 {
  color: #334155 !important;
}
html.light .text-slate-400 {
  color: #64748b !important;
}
html.light .text-slate-500 {
  color: #64748b !important;
}

/* Ensure button text remains crisp white on colored action buttons in both light & dark modes */
html.light button.bg-fuchsia-600,
html.light button.bg-fuchsia-600 *,
html.light .bg-fuchsia-600,
html.light .bg-fuchsia-600 *,
html.light button.bg-teal-600,
html.light button.bg-teal-600 *,
html.light .bg-teal-600,
html.light .bg-teal-600 *,
html.light button.bg-blue-600,
html.light button.bg-blue-600 *,
html.light .bg-blue-600,
html.light .bg-blue-600 *,
html.light button.bg-sky-600,
html.light button.bg-sky-600 *,
html.light .bg-sky-600,
html.light .bg-sky-600 *,
html.light button.bg-emerald-600,
html.light button.bg-emerald-600 *,
html.light .bg-emerald-600,
html.light .bg-emerald-600 *,
html.light button.bg-rose-600,
html.light button.bg-rose-600 *,
html.light .bg-rose-600,
html.light .bg-rose-600 *,
html.light button.bg-indigo-600,
html.light button.bg-indigo-600 *,
html.light .bg-indigo-600,
html.light .bg-indigo-600 *,
html.light button[class*="bg-gradient"],
html.light button[class*="bg-gradient"] *,
html.light .btn-primary,
html.light .btn-primary * {
  color: #ffffff !important;
}

/* ============================================================
   LIGHT MODE: EXECUTIVE HIGHLIGHT CARDS & BANNERS (High Contrast)
============================================================ */

/* 1. Promo Codes Highlight Card */
html.light .highlight-promo-card {
  background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 45%, #ffffff 100%) !important;
  border-color: #f0abfc !important;
  box-shadow: 0 4px 20px -2px rgba(217, 70, 239, 0.12), 0 2px 6px -2px rgba(217, 70, 239, 0.08) !important;
}
html.light .highlight-promo-card h4 {
  color: #701a75 !important;
}
html.light .highlight-promo-card p {
  color: #475569 !important;
}
html.light .highlight-promo-card #dash-active-coupons-count {
  color: #a21caf !important;
}
html.light .highlight-promo-card #dash-total-savings {
  color: #047857 !important;
}
html.light .highlight-promo-card .material-symbols-outlined.text-fuchsia-400 {
  color: #c026d3 !important;
}

/* 2. Resource Guardian Highlight Card */
html.light .highlight-guardian-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 45%, #ffffff 100%) !important;
  border-color: #5eead4 !important;
  box-shadow: 0 4px 20px -2px rgba(20, 184, 166, 0.12), 0 2px 6px -2px rgba(20, 184, 166, 0.08) !important;
}
html.light .highlight-guardian-card h4 {
  color: #115e59 !important;
}
html.light .highlight-guardian-card p {
  color: #475569 !important;
}
html.light .highlight-guardian-card strong.text-teal-300 {
  color: #0f766e !important;
}
html.light .highlight-guardian-card .material-symbols-outlined.text-teal-400 {
  color: #0d9488 !important;
}

/* 3. Hostinger Quota Allocation Banner */
html.light .highlight-quota-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 25px -3px rgba(15, 23, 42, 0.08), 0 2px 8px -2px rgba(15, 23, 42, 0.04) !important;
}
html.light .highlight-quota-banner h3 {
  color: #0f172a !important;
}
html.light .highlight-quota-banner p {
  color: #475569 !important;
}
html.light .highlight-quota-banner .capacity-multi-bar {
  background-color: #e2e8f0 !important;
}
html.light .highlight-quota-banner .capacity-slice-free {
  background-color: #e2e8f0 !important;
}
html.light .highlight-quota-banner span.text-slate-300 {
  color: #334155 !important;
}
html.light .highlight-quota-banner strong.text-white {
  color: #0f172a !important;
}
html.light .highlight-quota-banner .material-symbols-outlined.text-sky-400 {
  color: #0284c7 !important;
}

/* 4. Coupon Tester / Simulator Banner in View 11 */
html.light .highlight-simulator-card {
  background: linear-gradient(135deg, #fdf4ff 0%, #ffffff 40%, #f8fafc 100%) !important;
  border-color: #f0abfc !important;
  box-shadow: 0 4px 22px -3px rgba(217, 70, 239, 0.10) !important;
}
html.light .highlight-simulator-card h3 {
  color: #0f172a !important;
}
html.light .highlight-simulator-card span.text-slate-400 {
  color: #64748b !important;
}
html.light .highlight-simulator-card input,
html.light .highlight-simulator-card select {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light .highlight-simulator-card #sim-calc-result {
  background-color: #f8fafc !important;
  border-color: #f0abfc !important;
  color: #1e293b !important;
}

/* 5. N8N 24-Hour Fulfillment & Dispatch Control Bar in Light Mode */
html.light #n8n-fulfillment-banner,
html.light .bg-gradient-to-br.from-\[\#121929\] {
  background: #ffffff !important;
  background-image: none !important;
  border-color: #e9d5ff !important;
  box-shadow: 0 10px 30px -5px rgba(147, 51, 234, 0.08), 0 4px 6px -2px rgba(147, 51, 234, 0.04) !important;
}

html.light #n8n-fulfillment-banner h3,
html.light #n8n-fulfillment-banner h3 span {
  color: #0f172a !important;
}

html.light #n8n-fulfillment-banner p {
  color: #64748b !important;
}

html.light #n8n-fulfillment-banner .text-purple-300 {
  color: #7e22ce !important;
}

html.light #n8n-fulfillment-banner .text-purple-200 {
  color: #6b21a8 !important;
}

html.light #n8n-fulfillment-banner .text-sky-300 {
  color: #0284c7 !important;
}

html.light #n8n-fulfillment-banner .text-amber-300 {
  color: #b45309 !important;
}

html.light #n8n-fulfillment-banner .text-emerald-300 {
  color: #15803d !important;
}

html.light #n8n-fulfillment-banner .bg-\[\#090d16\] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light #n8n-fulfillment-banner #kpi-n8n-total {
  color: #0f172a !important;
}

html.light #n8n-fulfillment-banner .bg-amber-950\/20 {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
}

html.light #n8n-fulfillment-banner #kpi-n8n-pending {
  color: #d97706 !important;
}

html.light #n8n-fulfillment-banner .bg-amber-900\/60 {
  background-color: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #b45309 !important;
}

html.light #n8n-fulfillment-banner .bg-emerald-950\/20 {
  background-color: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

html.light #n8n-fulfillment-banner #kpi-n8n-active {
  color: #16a34a !important;
}

/* Tool Buttons in N8N Control Bar */
html.light #btn-toggle-n8n-api-settings {
  background-color: #faf5ff !important;
  border-color: #d8b4fe !important;
  color: #6b21a8 !important;
  box-shadow: 0 1px 3px rgba(107, 33, 168, 0.1) !important;
}
html.light #btn-toggle-n8n-api-settings:hover {
  background-color: #f3e8ff !important;
  border-color: #c084fc !important;
}

html.light #btn-test-n8n-conn {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
  box-shadow: 0 1px 3px rgba(4, 120, 87, 0.1) !important;
}
html.light #btn-test-n8n-conn:hover {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
}

html.light #btn-open-test-email-bar {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1) !important;
}
html.light #btn-open-test-email-bar:hover {
  background-color: #e0f2fe !important;
  border-color: #7dd3fc !important;
}

html.light #btn-run-n8n-cron {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.1) !important;
}
html.light #btn-run-n8n-cron:hover {
  background-color: #fef3c7 !important;
  border-color: #fcd34d !important;
}

/* N8N API Settings Card in Light Mode */
html.light #card-n8n-api-settings {
  background-color: #ffffff !important;
  border-color: #e9d5ff !important;
  box-shadow: 0 4px 20px -2px rgba(147, 51, 234, 0.08) !important;
}
html.light #card-n8n-api-settings h3 {
  color: #0f172a !important;
}
html.light #card-n8n-api-settings p {
  color: #64748b !important;
}
html.light #card-n8n-api-settings label {
  color: #334155 !important;
}
html.light #card-n8n-api-settings input,
html.light #card-n8n-api-settings textarea {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* N8N Orders Main Card & Manual Generator in Light Mode */
html.light #n8n-orders-main-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}
html.light #n8n-orders-main-card h3 {
  color: #0f172a !important;
}
html.light #n8n-orders-main-card p {
  color: #64748b !important;
}
html.light #card-n8n-manual-generator {
  background-color: #ffffff !important;
  border-color: #fde68a !important;
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.08) !important;
}
html.light #card-n8n-manual-generator h3 {
  color: #0f172a !important;
}
html.light #card-n8n-manual-generator label {
  color: #334155 !important;
}
html.light #card-n8n-manual-generator input,
html.light #card-n8n-manual-generator select {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Modal Fulfill n8n in Light Mode */
html.light #modal-fulfill-n8n-request > div {
  background-color: #ffffff !important;
  border-color: #e9d5ff !important;
  box-shadow: 0 20px 40px -10px rgba(147, 51, 234, 0.12) !important;
}
html.light #modal-fulfill-n8n-request h3 {
  color: #0f172a !important;
}
html.light #modal-fulfill-n8n-request p {
  color: #64748b !important;
}
html.light #modal-fulfill-n8n-request label {
  color: #334155 !important;
}
html.light #modal-fulfill-n8n-request .fulfill-summary-box,
html.light #modal-fulfill-n8n-request .fulfill-date-box,
html.light #modal-fulfill-n8n-request .fulfill-check-box {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}
html.light #modal-fulfill-n8n-request #fulfill-customer-name {
  color: #0f172a !important;
}
html.light #modal-fulfill-n8n-request #fulfill-requested-email {
  color: #b45309 !important;
}
html.light #modal-fulfill-n8n-request #fulfill-sub-code {
  color: #7e22ce !important;
}
html.light #modal-fulfill-n8n-request input[type="date"],
html.light #modal-fulfill-n8n-request input[type="url"],
html.light #modal-fulfill-n8n-request input[type="text"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light #modal-fulfill-n8n-request input[type="url"] {
  border-color: #c084fc !important;
  color: #047857 !important;
}
html.light #modal-fulfill-n8n-request input[type="date"] {
  color-scheme: light !important;
}
html.light #modal-fulfill-n8n-request .fulfill-preset-btn {
  background-color: #f3e8ff !important;
  color: #7e22ce !important;
  border-color: #e9d5ff !important;
}
html.light #modal-fulfill-n8n-request .fulfill-preset-btn:hover {
  background-color: #e9d5ff !important;
}
html.light #modal-fulfill-n8n-request button[title="إغلاق"],
html.light #modal-fulfill-n8n-request button.modal-close-btn {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
html.light #modal-fulfill-n8n-request button[title="إغلاق"]:hover,
html.light #modal-fulfill-n8n-request button.modal-close-btn:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Mode Background & Border Helpers */
html.light .border-\[\#1e293b\],
html.light .border-slate-800,
html.light .border-slate-800\/60,
html.light .border-slate-800\/70,
html.light .border-slate-800\/80,
html.light .border-slate-700,
html.light .border-slate-700\/60,
html.light .border-slate-700\/80 {
  border-color: #e2e8f0 !important;
}

html.light .bg-\[\#0f172a\],
html.light .bg-\[\#090d16\],
html.light .bg-\[\#0b0f19\],
html.light .bg-\[\#0b162f\],
html.light .bg-\[\#111827\],
html.light .bg-\[\#0b101c\] {
  background-color: #ffffff !important;
}

html.light .bg-slate-800,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/90 {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

html.light .bg-slate-900,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/70,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/50,
html.light .bg-slate-900\/40 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Theme Badges & Pill Overrides */
html.light .bg-sky-950,
html.light .bg-sky-950\/80,
html.light .bg-sky-950\/70,
html.light .bg-sky-950\/60,
html.light .bg-sky-950\/50,
html.light .bg-sky-950\/40 {
  background-color: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}

html.light .bg-emerald-950,
html.light .bg-emerald-950\/80,
html.light .bg-emerald-950\/70,
html.light .bg-emerald-950\/60,
html.light .bg-emerald-950\/50,
html.light .bg-emerald-950\/40 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

html.light .bg-amber-950,
html.light .bg-amber-950\/80,
html.light .bg-amber-950\/70,
html.light .bg-amber-950\/60,
html.light .bg-amber-950\/50,
html.light .bg-amber-950\/40 {
  background-color: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}

html.light .bg-purple-950,
html.light .bg-purple-900\/60,
html.light .bg-purple-950\/50,
html.light .bg-purple-950\/40 {
  background-color: #f3e8ff !important;
  border-color: #d8b4fe !important;
  color: #6b21a8 !important;
}

html.light .bg-rose-950,
html.light .bg-rose-950\/70,
html.light .bg-rose-950\/50,
html.light .bg-rose-950\/40 {
  background-color: #ffe4e6 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

/* Light Theme Accent Text Colors (Crisp, High Contrast) */
html.light .text-cyan-300,
html.light .text-sky-300,
html.light .text-sky-400 {
  color: #0284c7 !important;
}

html.light .text-emerald-400,
html.light .text-emerald-300 {
  color: #059669 !important;
}

html.light .text-amber-400,
html.light .text-amber-300 {
  color: #d97706 !important;
}

html.light .text-purple-400,
html.light .text-purple-300 {
  color: #7e22ce !important;
}

/* Gradients in Light Mode */
html.light .from-slate-900 {
  --tw-gradient-from: #f0f9ff !important;
  --tw-gradient-to: #ffffff !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

html.light .to-blue-950\/40 {
  --tw-gradient-to: #e0f2fe !important;
}

html.light .from-blue-900\/40 {
  --tw-gradient-from: #e0f2fe !important;
}

html.light .via-sky-900\/30 {
  --tw-gradient-stops: #e0f2fe, #f0f9ff, #ffffff !important;
}

html.light .to-\[\#111827\] {
  --tw-gradient-to: #ffffff !important;
}

/* Client Sidebar & Shell */
html.light #client-sidebar {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html.light header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
}

html.light .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e2e8f0 !important;
}

/* Dropdown Menus */
html.light #notif-menu,
html.light #profile-menu {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

/* Ensure Profile and Notification Dropdowns never clip off-screen in RTL / LTR */
[dir="rtl"] #profile-menu,
[dir="rtl"] #notif-menu,
html[dir="rtl"] #profile-menu,
html[dir="rtl"] #notif-menu,
body:not(.ltr-mode) #profile-menu,
body:not(.ltr-mode) #notif-menu {
  left: 0 !important;
  right: auto !important;
}

[dir="ltr"] #profile-menu,
[dir="ltr"] #notif-menu,
body.ltr-mode #profile-menu,
body.ltr-mode #notif-menu {
  left: auto !important;
  right: 0 !important;
}

/* AI Command Prompt */
html.light .ai-prompt-container {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08) !important;
}

/* Chat & Support Thread */
html.light .support-bubble-client {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html.light .support-bubble-client p {
  color: #0f172a !important;
}

html.light .support-bubble-admin {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(2, 132, 199, 0.06) 100%) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  color: #0f172a !important;
}
html.light .support-bubble-admin p {
  color: #0f172a !important;
}

/* Capacity Bars */
html.light .capacity-slice-free {
  background: #e2e8f0 !important;
}

/* Light Mode Promo Ticker */
html.light .promo-ticker {
  background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border-color: #bae6fd !important;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.08) !important;
}
html.light .promo-ticker span {
  color: #0369a1 !important;
}
html.light #promo-timer {
  color: #0284c7 !important;
}
html.light #promo-timer span {
  color: #0284c7 !important;
}

/* Light Mode Hostinger Badge & Header Actions */
html.light #hostinger-api-status-badge {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}
html.light button[onclick*="switchSuperAdminView('hostinger')"] {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light button[onclick*="switchSuperAdminView('hostinger')"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Mode Support Badges */
html.light .badge-ticket-open {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fecaca !important;
}
html.light .badge-ticket-progress {
  background-color: #f0f9ff !important;
  color: #0284c7 !important;
  border-color: #bae6fd !important;
}
html.light .badge-ticket-resolved {
  background-color: #ecfdf5 !important;
  color: #059669 !important;
  border-color: #a7f3d0 !important;
}

html.light .priority-badge-urgent {
  background-color: #fff1f2 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
}
html.light .priority-badge-high {
  background-color: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}
html.light .priority-badge-medium {
  background-color: #f0f9ff !important;
  color: #0284c7 !important;
  border-color: #bae6fd !important;
}
html.light .priority-badge-low {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

html.light .perm-chip {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html.light .pill-sky-badge {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

/* Light Mode Permissions Matrix Card */
html.light .permissions-matrix-card {
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 50%, #f0fdf4 100%) !important;
  border-color: #a7f3d0 !important;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.08) !important;
}
html.light .permissions-matrix-card .matrix-header-border {
  border-color: #d1fae5 !important;
}
html.light .permissions-matrix-card .perm-matrix-title {
  color: #065f46 !important;
}
html.light .permissions-matrix-card .perm-matrix-box {
  background-color: #ffffff !important;
  border-color: #d1fae5 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html.light .permissions-matrix-card .perm-matrix-box .box-title {
  color: #0f172a !important;
}
html.light .permissions-matrix-card .perm-matrix-box .box-desc {
  color: #64748b !important;
}

/* ==========================================================================
   Desktop Collapsible Sidebar (إغلاق وتوسيع النافذة الجانبية)
   ========================================================================== */
.admin-sidebar {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease !important;
}

@media (min-width: 1024px) {
  body:not(.ltr-mode) .admin-sidebar.sidebar-closed {
    transform: translateX(100%) !important;
    margin-right: -18rem !important; /* -288px */
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.ltr-mode .admin-sidebar.sidebar-closed {
    transform: translateX(-100%) !important;
    margin-left: -18rem !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* ==========================================================================
   WhatsApp Web Support Chat System (نظام شات تذاكر الدعم كواتساب ويب)
   ========================================================================== */

.whatsapp-modal-wrapper {
  background-color: #111b21;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

html.light .whatsapp-modal-wrapper {
  background-color: #ffffff;
  border-color: #d1d7db;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* WhatsApp Header */
.whatsapp-chat-header {
  background-color: #202c33;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1.25rem;
}

html.light .whatsapp-chat-header {
  background-color: #f0f2f5;
  border-bottom-color: #e9edef;
}

.whatsapp-chat-header h3 {
  color: #ffffff;
}

html.light .whatsapp-chat-header h3 {
  color: #111b21 !important;
}

/* Pinned Context Strip */
.whatsapp-pinned-strip {
  background-color: rgba(17, 27, 33, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1.25rem;
  color: #94a3b8;
}

html.light .whatsapp-pinned-strip {
  background-color: #f8fafc;
  border-bottom-color: #e2e8f0;
  color: #475569;
}

.whatsapp-pinned-strip .pinned-label {
  color: #94a3b8;
}

html.light .whatsapp-pinned-strip .pinned-label {
  color: #475569 !important;
}

.whatsapp-pinned-strip .pinned-subject,
#chat-modal-ticket-subject,
#modal-ticket-subject {
  color: #ffffff;
}

html.light .whatsapp-pinned-strip .pinned-subject,
html.light #chat-modal-ticket-subject,
html.light #modal-ticket-subject {
  color: #0f172a !important;
}

.whatsapp-pinned-strip .pinned-time,
#chat-modal-ticket-time,
#modal-ticket-time {
  color: #94a3b8;
}

html.light .whatsapp-pinned-strip .pinned-time,
html.light #chat-modal-ticket-time,
html.light #modal-ticket-time {
  color: #64748b !important;
}

/* Chat Canvas / Messages Wallpaper */
.whatsapp-chat-canvas {
  background-color: #0b141a;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

html.light .whatsapp-chat-canvas {
  background-color: #efeae2;
  background-image: 
    radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Date Pill in Center */
.whatsapp-date-pill {
  background-color: #182229;
  color: #8696a0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: inline-block;
}

html.light .whatsapp-date-pill {
  background-color: #ffffff;
  color: #54656f;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.12);
}

/* Chat Bubbles (Message Rows) */
.whatsapp-msg-row {
  display: flex;
  margin-bottom: 0.75rem;
  width: 100%;
}

.whatsapp-msg-row.incoming {
  justify-content: flex-start;
}

.whatsapp-msg-row.outgoing {
  justify-content: flex-end;
}

/* Customer Incoming Bubble */
.whatsapp-bubble-customer {
  background-color: #202c33;
  color: #e9edef;
  border-radius: 1rem 1rem 1rem 0.25rem;
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

html.light .whatsapp-bubble-customer {
  background-color: #ffffff;
  color: #111b21;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* Admin Outgoing Bubble (Signature WhatsApp Green) */
.whatsapp-bubble-admin {
  background-color: #005c4b;
  color: #e9edef;
  border-radius: 1rem 1rem 0.25rem 1rem;
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html.light .whatsapp-bubble-admin {
  background-color: #d9fdd3;
  color: #111b21;
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* Message Body Text inside WhatsApp bubbles - High Contrast Enforcement */
.whatsapp-bubble-admin p,
.whatsapp-bubble-customer p,
.whatsapp-bubble-text {
  color: #e9edef !important;
  font-size: 0.8125rem;
  line-height: 1.5;
}

html.light .whatsapp-bubble-admin p,
html.light .whatsapp-bubble-customer p,
html.light .whatsapp-bubble-text {
  color: #111b21 !important;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Sender Header inside Chat Bubbles */
.whatsapp-sender-header {
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.25rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-bubble-admin .whatsapp-sender-header {
  color: #a7f3d0 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

html.light .whatsapp-bubble-admin .whatsapp-sender-header {
  color: #075e54 !important;
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
}

.whatsapp-bubble-customer .whatsapp-sender-header {
  color: #fbbf24 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.light .whatsapp-bubble-customer .whatsapp-sender-header {
  color: #b45309 !important;
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Meta time & ticks inside bubble */
.whatsapp-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  color: rgba(233, 237, 239, 0.7);
}

.whatsapp-bubble-admin .whatsapp-msg-meta {
  color: rgba(233, 237, 239, 0.75) !important;
}

html.light .whatsapp-bubble-admin .whatsapp-msg-meta {
  color: #54656f !important;
  font-weight: 500;
}

.whatsapp-bubble-customer .whatsapp-msg-meta {
  color: #94a3b8 !important;
}

html.light .whatsapp-bubble-customer .whatsapp-msg-meta {
  color: #667781 !important;
  font-weight: 500;
}

.whatsapp-double-check {
  color: #53bdeb !important; /* WhatsApp signature blue double check */
  font-size: 15px !important;
  line-height: 1;
}

/* WhatsApp Quick Replies Bar */
.whatsapp-quick-replies-bar {
  background-color: #182229;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  white-space: nowrap;
}

html.light .whatsapp-quick-replies-bar {
  background-color: #f7f9fa;
  border-top-color: #e9edef;
}

.whatsapp-quick-chip {
  background-color: #202c33;
  color: #8696a0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.whatsapp-quick-chip:hover {
  background-color: #005c4b;
  color: #ffffff;
  border-color: #00a884;
  transform: translateY(-1px);
}

html.light .whatsapp-quick-chip {
  background-color: #ffffff;
  color: #54656f;
  border-color: #d1d7db;
}

html.light .whatsapp-quick-chip:hover {
  background-color: #d9fdd3;
  color: #0b141a;
  border-color: #25d366;
}

/* WhatsApp Input Footer */
.whatsapp-input-bar {
  background-color: #202c33;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

html.light .whatsapp-input-bar {
  background-color: #f0f2f5;
  border-top-color: #e9edef;
}

.whatsapp-input-field {
  background-color: #2a3942;
  color: #d1d7db;
  border: none;
  border-radius: 1.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.825rem;
  outline: none;
  width: 100%;
  transition: background-color 0.15s ease;
}

.whatsapp-input-field:focus {
  background-color: #33444d;
}

html.light .whatsapp-input-field {
  background-color: #ffffff;
  color: #111b21;
}

html.light .whatsapp-input-field:focus {
  background-color: #ffffff;
  box-shadow: 0 0 0 1px #00a884;
}

/* Send Button */
.whatsapp-send-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  background-color: #00a884;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.whatsapp-send-btn:hover {
  background-color: #02906f;
  transform: scale(1.05);
}

.whatsapp-send-btn:active {
  transform: scale(0.95);
}

/* Action Icons */
.whatsapp-icon-btn {
  color: #8696a0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.whatsapp-icon-btn:hover {
  color: #e9edef;
  background-color: rgba(255, 255, 255, 0.08);
}

html.light .whatsapp-icon-btn {
  color: #54656f;
}

html.light .whatsapp-icon-btn:hover {
  color: #111b21;
  background-color: rgba(0, 0, 0, 0.06);
}

/* Emoji Palette Popup */
.whatsapp-emoji-palette {
  position: absolute;
  bottom: 4.2rem;
  right: 1.25rem;
  background-color: #202c33;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.6rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 60;
}

html.light .whatsapp-emoji-palette {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.whatsapp-emoji-item {
  font-size: 1.25rem;
  padding: 0.3rem;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}

.whatsapp-emoji-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

html.light .whatsapp-emoji-item:hover {
  background-color: #f1f5f9;
}

/* ============================================================
   SHARED HOSTING PLANS - HIGH CONTRAST & MODAL POLISH
============================================================ */
html.light button#btn-submit-shared-plan,
html.light button#btn-submit-shared-plan * {
  color: #0f172a !important;
  font-weight: 900 !important;
}

html.light #modal-add-shared-plan label,
html.light #modal-preview-shared-plan label {
  color: #334155 !important;
}

html.light #modal-add-shared-plan .super-input,
html.light #modal-add-shared-plan textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light #modal-add-shared-plan .super-input:focus,
html.light #modal-add-shared-plan textarea:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

html.light .bg-amber-100\/90 {
  background-color: #fef3c7 !important;
  border-color: #fcd34d !important;
  color: #78350f !important;
}

html.light .bg-amber-100\/90 * {
  color: #78350f !important;
}







