/* ==========================================================================
   CSS Variables & Theme Setup (FIAT Automotive Red & Chrome Cyber Glassmorphism)
   ========================================================================== */
:root {
  color-scheme: dark;
  accent-color: #EAA023;

  --bg-dark: #070B14;
  --bg-surface: #0B0F19;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-border: rgba(234, 160, 35, 0.45);
  --bg-card-hover: rgba(24, 32, 54, 0.88);

  --fiat-red: #EAA023;
  --fiat-red-light: #FBBF24;
  --fiat-red-dark: #D97706;
  --fiat-red-glow: rgba(234, 160, 35, 0.45);

  --neon-cyan: #EAA023;
  --neon-cyan-glow: rgba(234, 160, 35, 0.45);
  --neon-blue: #FBBF24;
  --neon-green: #10b981;
  --neon-amber: #EAA023;
  --neon-red: #ef4444;

  --gold-gradient: linear-gradient(135deg, #FCD34D 0%, #EAA023 50%, #D97706 100%);
  --gold-hover: linear-gradient(135deg, #FEF08A 0%, #FBBF24 50%, #B45309 100%);
  --gold-shadow: 0 4px 20px rgba(234, 160, 35, 0.45);

  /* Elios Official Chrome, Titanium & Metallic Slate Palette */
  --chrome-silver: #E2E8F0;
  --chrome-light: #FFFFFF;
  --chrome-mid: #94A3B8;
  --chrome-dark: #64748B;
  --chrome-gunmetal: #334155;
  --chrome-slate: #1E293B;
  --chrome-border: rgba(226, 232, 240, 0.25);
  --chrome-border-hover: rgba(255, 255, 255, 0.55);
  --chrome-gradient: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 40%, #94A3B8 75%, #475569 100%);
  --metal-surface: linear-gradient(145deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --input-bg: rgba(9, 14, 26, 0.88);
  --input-border: rgba(234, 160, 35, 0.35);
  --input-focus: #EAA023;

  --font-cairo: 'Cairo', sans-serif;
  --font-outfit: 'Outfit', sans-serif;

  --header-height: 70px;
  --sidebar-width: 78px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(200, 16, 46, 0.45);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(200, 16, 46, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   Autofill & Autocomplete Override (منع تحول خلفية الحقول للأبيض عند اختيار المقترحات)
   ========================================================================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #090e1a inset !important;
  box-shadow: 0 0 0 1000px #090e1a inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
  transition: background-color 5000000s ease-in-out 0s !important;
}

input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0c182e inset, 0 0 12px rgba(200, 16, 46, 0.28) !important;
  box-shadow: 0 0 0 1000px #0c182e inset, 0 0 12px rgba(200, 16, 46, 0.28) !important;
  -webkit-text-fill-color: #f8fafc !important;
  color: #f8fafc !important;
  caret-color: #f8fafc !important;
}


body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 18% 20%, rgba(200, 16, 46, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 82% 15%, rgba(153, 27, 27, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(200, 16, 46, 0.1) 0%, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-cairo);
  min-height: 100vh;
  overflow-x: clip;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Ultra-sleek Elios Gold Scrollbar
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: #EAA023 rgba(7, 11, 20, 0.5);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 11, 20, 0.45);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FBBF24 0%, #EAA023 60%, #D97706 100%);
  border-radius: 9999px;
  border: none;
  box-shadow: 0 0 8px rgba(234, 160, 35, 0.6);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 50%, #B45309 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.85);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Glass Panel Helper */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(200, 16, 46, 0.38);
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.header-bar {
  height: var(--header-height);
  background: rgba(8, 12, 22, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Brand Section (Left side in physical space / End in RTL) */
.brand-section {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  direction: ltr;
}

.brand-logo-card {
  background: #ffffff !important;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  box-shadow: 0 0 16px rgba(234, 160, 35, 0.45), 0 2px 10px rgba(0, 0, 0, 0.4);
  border: 1.5px solid #EAA023;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand-logo-card:hover {
  background: #ffffff !important;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.75), 0 2px 12px rgba(0, 0, 0, 0.5);
  border-color: #FBBF24;
  transform: translateY(-1px);
}

.brand-logo-img {
  height: 36px;
  width: auto;
  max-width: 115px;
  object-fit: contain;
  display: block;
}

.brand-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff, #E2E8F0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-outfit);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.8px;
}

/* User Header Section (Right side in physical space / Start in RTL) */
.user-header-section {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1.1rem;
  background: rgba(12, 18, 32, 0.75);
  border: 1px solid rgba(200, 16, 46, 0.28);
  border-radius: 22px;
  box-shadow: 0 0 14px rgba(200, 16, 46, 0.12);
  transition: all 0.3s ease;
}

.user-badge:hover {
  border-color: var(--fiat-red-light);
  box-shadow: 0 0 20px rgba(200, 16, 46, 0.3);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--fiat-red-light);
  object-fit: cover;
  box-shadow: 0 0 10px var(--fiat-red-glow);
}

.user-name-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.btn-return-crm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 16, 46, 0.15);
  border: 1.5px solid var(--fiat-red-light);
  color: #ffffff;
  padding: 0.45rem 1.1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.2);
}

.btn-return-crm:hover {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(200, 16, 46, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   Main Workspace Layout (Sidebar + Content Area)
   ========================================================================== */
.workspace-wrapper {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
  position: relative;
}

/* Sidebar Navigation Rail (Fixed / Sticky on scroll) */
.side-nav-rail {
  width: 78px;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 8px;
  z-index: 90;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height, 70px);
  height: calc(100vh - var(--header-height, 70px));
  align-self: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.side-nav-rail::-webkit-scrollbar {
  display: none;
}

.nav-rail-item {
  width: 62px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.nav-rail-item * {
  pointer-events: none;
}

.nav-rail-item span {
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.1px;
}

.nav-rail-item:hover {
  color: #ffffff;
  background: rgba(200, 16, 46, 0.15);
  border: 1px solid rgba(200, 16, 46, 0.35);
  transform: translateY(-2px);
}

.nav-rail-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.28), rgba(239, 68, 68, 0.18));
  border: 1px solid var(--fiat-red-light);
  box-shadow: 0 0 16px var(--fiat-red-glow);
}

.nav-rail-item.active::before {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--fiat-red-light);
  border-radius: 4px 0 0 4px;
  box-shadow: 0 0 10px var(--fiat-red-glow);
}

.nav-rail-spacer {
  flex: 1;
}

.nav-rail-item.logout-item {
  color: var(--fiat-red-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.nav-rail-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: var(--fiat-red-light);
  box-shadow: 0 0 16px var(--fiat-red-glow);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .workspace-wrapper {
    flex-direction: column;
  }

  .side-nav-rail {
    width: 100%;
    height: auto;
    flex-direction: row;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1rem;
    justify-content: center;
  }

  .nav-rail-spacer {
    display: none;
  }
}

/* ==========================================================================
   Main Layout Container
   ========================================================================== */
.main-container {
  flex: 1;
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.85rem 1.4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

/* Page Header Title */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
  border: 1.5px solid var(--neon-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-amber);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.page-title-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.page-subtitle-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   KPI Metric Cards (Total, Open, Pending, Closed) - Compact Height
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.kpi-card {
  padding: 0.55rem 0.95rem;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Total Card (Chrome Silver & Slate) */
.kpi-card.kpi-total::before {
  background: linear-gradient(90deg, #FFFFFF, #CBD5E1, #94A3B8);
}

.kpi-card.kpi-total .kpi-icon-wrap {
  background: rgba(148, 163, 184, 0.16);
  border: 1.5px solid rgba(226, 232, 240, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(226, 232, 240, 0.3);
}

.kpi-card.kpi-total .kpi-value {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
}

/* Open Card (Red) */
.kpi-card.kpi-open {
  border-color: rgba(239, 68, 68, 0.35);
}

.kpi-card.kpi-open::before {
  background: var(--neon-red);
}

.kpi-card.kpi-open .kpi-icon-wrap {
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid var(--neon-red);
  color: var(--neon-red);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.kpi-card.kpi-open .kpi-value {
  color: #ef4444;
  text-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
}

/* Pending Card (Yellow) */
.kpi-card.kpi-pending {
  border-color: rgba(245, 158, 11, 0.35);
}

.kpi-card.kpi-pending::before {
  background: var(--neon-amber);
}

.kpi-card.kpi-pending .kpi-icon-wrap {
  background: rgba(245, 158, 11, 0.18);
  border: 1.5px solid var(--neon-amber);
  color: var(--neon-amber);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.kpi-card.kpi-pending .kpi-value {
  color: #f59e0b;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

/* Closed Card (Green) */
.kpi-card.kpi-closed {
  border-color: rgba(16, 185, 129, 0.35);
}

.kpi-card.kpi-closed::before {
  background: var(--neon-green);
}

.kpi-card.kpi-closed .kpi-icon-wrap {
  background: rgba(16, 185, 129, 0.18);
  border: 1.5px solid var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.kpi-card.kpi-closed .kpi-value {
  color: #10b981;
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kpi-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  color: #ffffff;
  line-height: 1.1;
}

.kpi-percent {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 600;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pulse Dot for Open status */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
  animation: pulseDot 1.6s infinite;
  margin-left: 5px;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.35);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}

/* ==========================================================================
   Service Centers Filter Bar (مراكز الخدمة في الأعلى)
   ========================================================================== */
.service-centers-bar {
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 18, 32, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.sc-bar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 1.5px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.65rem;
}

.sc-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.branch-pill-btn {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  padding: 0.28rem 0.62rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-cairo), var(--font-outfit);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  direction: ltr;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.branch-pill-btn:hover {
  color: #ffffff;
  background: rgba(200, 16, 46, 0.18);
  border-color: rgba(200, 16, 46, 0.45);
  transform: translateY(-1px);
}

.branch-pill-btn.active {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.35), rgba(239, 68, 68, 0.22));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(200, 16, 46, 0.45);
}

.branch-count-badge {
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  opacity: 0.95;
}

/* Category Filter Tabs (أقسام المعاملات) */
.category-filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(8, 12, 22, 0.75);
  padding: 2px 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.category-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.22rem 0.65rem;
  border-radius: 7px;
  font-size: 0.73rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.category-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.category-pill-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.28);
}

/* ==========================================================================
   Comprehensive Filter Bar - Single Row Sleek Layout
   ========================================================================== */
.filters-bar {
  padding: 0.45rem 0.85rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-radius: 12px;
}

/* Status Filter Tabs */
.status-filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(8, 12, 22, 0.75);
  padding: 2px 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.status-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  font-size: 0.73rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.status-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.status-tab-btn.active {
  background: rgba(148, 163, 184, 0.2);
  color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: 0 0 10px rgba(226, 232, 240, 0.25);
}

.status-tab-btn.tab-open.active {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--neon-red);
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.status-tab-btn.tab-pending.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--neon-amber);
  color: #fde047;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.status-tab-btn.tab-closed.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--neon-green);
  color: #86efac;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

/* Date and Month Filter Controls */
.date-range-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(8, 12, 22, 0.75);
  padding: 2px 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.visit-date-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.25));
  padding: 2px 8px;
  border-radius: 9px;
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.filter-input.visit-date-input {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(4, 30, 20, 0.85);
  color: #a7f3d0;
  font-weight: 700;
}

.filter-input.visit-date-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-input {
  background: rgba(8, 12, 22, 0.9);
  border: 1.5px solid rgba(200, 16, 46, 0.3);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-cairo);
  font-size: 0.74rem;
  padding: 0.24rem 0.55rem;
  outline: none;
  transition: all 0.25s ease;
  max-width: 135px;
}

.filter-input:focus {
  border-color: var(--fiat-red-light);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.35);
}

/* Search Input */
.search-filter-wrap {
  flex: 1;
  min-width: 170px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-filter-input {
  width: 100%;
  background: rgba(8, 12, 22, 0.9);
  border: 1.5px solid rgba(200, 16, 46, 0.3);
  border-radius: 8px;
  padding: 0.26rem 2rem 0.26rem 0.65rem;
  color: #ffffff;
  font-size: 0.76rem;
  font-family: var(--font-cairo);
  outline: none;
  transition: all 0.25s ease;
}

.search-filter-input:focus {
  border-color: var(--fiat-red-light);
  box-shadow: 0 0 15px rgba(200, 16, 46, 0.4);
}

.search-filter-icon {
  position: absolute;
  right: 7px;
  color: var(--fiat-red-light);
  pointer-events: none;
}

.btn-reset-filters {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.24rem 0.65rem;
  border-radius: 8px;
  font-size: 0.73rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-reset-filters:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.btn-print-report {
  background: rgba(200, 16, 46, 0.2);
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #ffffff;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-print-report:hover {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(200, 16, 46, 0.55);
}

/* Active Filter Badges */
.active-filters-bar-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.active-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.filter-chip {
  background: rgba(234, 160, 35, 0.18);
  border: 1px solid var(--neon-amber, #EAA023);
  color: #fde047;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.filter-chip-close {
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Complaints Table
   ========================================================================== */
.complaints-table-container {
  overflow: hidden;
  border-radius: 14px;
}

.table-header-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 14, 26, 0.9);
}

.table-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 16, 46, 0.18);
  border: 1px solid var(--fiat-red-light);
  border-radius: 20px;
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fca5a5;
  font-family: var(--font-outfit);
}

.table-scroll-wrapper {
  max-height: 600px;
  overflow-y: auto;
}

.complaints-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: right;
}

.complaints-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.complaints-table th {
  background: #0b101d;
  color: #cbd5e1;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1.5px solid rgba(200, 16, 46, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.complaints-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  vertical-align: middle;
}

.complaints-table tr:hover td {
  background: rgba(200, 16, 46, 0.05);
}

/* Client badge in table */
.client-cell-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-cell-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.85rem;
}

.client-cell-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-code-pill {
  font-family: var(--font-outfit);
  background: rgba(200, 16, 46, 0.18);
  color: #fca5a5;
  border: 1px solid var(--fiat-red-light);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
}

.record-num-pill {
  font-family: var(--font-outfit), sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap !important;
  word-break: keep-all;
  direction: ltr;
  flex-shrink: 0;
  min-width: 44px;
  transition: all 0.2s ease;
}

.record-num-pill.inq-num {
  color: #E2E8F0;
  background: rgba(226, 232, 240, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.3);
}

.record-num-pill.cmp-num {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
}

/* ==========================================================================
   Ticket Type Badges (شكوى / استفسار / صيانة / قطع غيار / مبيعات)
   ========================================================================== */
.ticket-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  font-family: var(--font-cairo);
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.ticket-type-badge:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.2);
}

/* 1. Complaint (Red) */
.ticket-type-badge.type-complaint {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.55);
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* 2. Inquiry (Cyan / Sky Blue) */
.ticket-type-badge.type-inquiry {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* 3. Maintenance (Amber / Gold) */
.ticket-type-badge.type-maintenance {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* 4. Spare Parts (Purple) */
.ticket-type-badge.type-sparepart {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* 5. Sales (Emerald Green) */
.ticket-type-badge.type-sales {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Default Fallback */
.ticket-type-badge.type-default {
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

/* 3 Status Colors */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  letter-spacing: 0.4px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Status Dropdown Menu (Open [Red], Pending [Yellow], Closed [Green]) */
.status-dropdown {
  color-scheme: dark;
  accent-color: var(--fiat-red);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-block;
  min-width: 78px;
  padding: 0.2rem 0.5rem 0.2rem 1.15rem;
  border-radius: 16px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  letter-spacing: 0.3px;
  cursor: pointer;
  outline: none;
  text-align: center;
  transition: all 0.25s ease;
  background-position: left 5px center;
  background-repeat: no-repeat;
  background-size: 8px 8px;
}

/* 1. Open (Red) */
.status-badge.status-open,
.status-dropdown.status-open {
  background-color: #270f14 !important;
  color: #ef4444 !important;
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-badge.status-open:hover,
.status-dropdown.status-open:hover,
.status-dropdown.status-open:focus,
.status-dropdown.status-open:active {
  background-color: #3b1219 !important;
  color: #ff6b6b !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
  outline: none !important;
}

/* 2. Pending (Yellow) */
.status-badge.status-pending,
.status-dropdown.status-pending {
  background-color: #2a1f0a !important;
  color: #f59e0b !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-badge.status-pending:hover,
.status-dropdown.status-pending:hover,
.status-dropdown.status-pending:focus,
.status-dropdown.status-pending:active {
  background-color: #3d2b0e !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6) !important;
  outline: none !important;
}

/* 3. Closed (Green) */
.status-badge.status-closed,
.status-dropdown.status-closed {
  background-color: #08241b !important;
  color: #10b981 !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-badge.status-closed:hover,
.status-dropdown.status-closed:hover,
.status-dropdown.status-closed:focus,
.status-dropdown.status-closed:active {
  background-color: #0f3d2e !important;
  color: #34d399 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
  outline: none !important;
}

/* Dropdown Option Items */
.status-dropdown option {
  background-color: #0b101d;
  color: #f1f5f9;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 12px;
}

.status-dropdown option:hover,
.status-dropdown option:focus,
.status-dropdown option:active,
.status-dropdown option:checked {
  background: #182235 linear-gradient(0deg, #182235 0%, #182235 100%) !important;
  background-color: #182235 !important;
  color: #ffffff !important;
}

.status-dropdown option[value="Open"] {
  color: #ef4444;
  background-color: #0b101d;
}

.status-dropdown option[value="Open"]:checked,
.status-dropdown option[value="Open"]:hover,
.status-dropdown option[value="Open"]:focus {
  background: #3b1219 linear-gradient(0deg, #3b1219 0%, #3b1219 100%) !important;
  background-color: #3b1219 !important;
  color: #ff6b6b !important;
}

.status-dropdown option[value="Pending"] {
  color: #f59e0b;
  background-color: #0b101d;
}

.status-dropdown option[value="Pending"]:checked,
.status-dropdown option[value="Pending"]:hover,
.status-dropdown option[value="Pending"]:focus {
  background: #3d2b0e linear-gradient(0deg, #3d2b0e 0%, #3d2b0e 100%) !important;
  background-color: #3d2b0e !important;
  color: #fbbf24 !important;
}

.status-dropdown option[value="Closed"] {
  color: #10b981;
  background-color: #0b101d;
}

.status-dropdown option[value="Closed"]:checked,
.status-dropdown option[value="Closed"]:hover,
.status-dropdown option[value="Closed"]:focus {
  background: #0f3d2e linear-gradient(0deg, #0f3d2e 0%, #0f3d2e 100%) !important;
  background-color: #0f3d2e !important;
  color: #34d399 !important;
}

/* Replies Counter Badge */
.replies-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(200, 16, 46, 0.12);
  border: 1px solid rgba(200, 16, 46, 0.3);
  color: #fca5a5;
  font-size: 0.74rem;
  font-weight: 700;
}

/* Action Buttons in Table */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-reply {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.45));
  border: 1.5px solid var(--fiat-red-light);
  color: #ffffff;
  padding: 0.35rem 0.95rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.25);
  white-space: nowrap;
}

.btn-action-reply:hover {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(200, 16, 46, 0.6);
  transform: translateY(-1px);
}

.btn-quick-status {
  background: rgba(14, 20, 34, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-status:hover {
  color: var(--fiat-red-light);
  border-color: var(--fiat-red-light);
}

/* Match the neutral activity palette used in the main client table. */
.ticket-type-badge.type-inquiry,
.ticket-type-badge.type-maintenance,
.ticket-type-badge.type-sparepart,
.ticket-type-badge.type-sales {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(203, 213, 225, 0.35) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.15) !important;
}

.btn-action-reply,
.btn-action-reply:hover {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(203, 213, 225, 0.35) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.15) !important;
}

/* Empty state text */
.empty-state-box {
  text-align: center;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-dim);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(200, 16, 46, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fiat-red-light);
  margin-bottom: 6px;
}

/* ==========================================================================
   Reply & Follow-up Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.18s ease-out;
  transform: translateZ(0);
}

.modal-overlay.active {
  display: flex;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================================================================
   WhatsApp Style Chat Modal for Complaints
   ========================================================================== */
/* ==========================================================================
   WhatsApp / Reply Style Chat Modal for Complaints (Dark Cyber Glass System)
/* ==========================================================================
   Follow-up & Ticket Activity Modal (Strict 5-Color Theme: Red, Gray, Black, White, Blue)
   ========================================================================== */
.modal-card.wa-chat-card {
  width: 100%;
  max-width: 860px;
  height: 710px;
  max-height: 94vh;
  background: #080c14 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(239, 68, 68, 0.12) !important;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  contain: layout style;
  transform: translateZ(0);
  will-change: transform, opacity;
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Modal Top Header */
.wa-chat-header {
  padding: 0.9rem 1.4rem;
  background: linear-gradient(180deg, #0f172a, #080c14) !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 10;
}

.wa-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wa-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.wa-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
}

.wa-online-dot {
  position: absolute;
  bottom: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #080c14;
  box-shadow: 0 0 8px #38bdf8;
}

.wa-contact-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wa-contact-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-contact-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-contact-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.wa-bullet {
  color: #64748b;
  opacity: 0.8;
}

.wa-header-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 2px 10px;
  border-radius: 7px;
  font-family: var(--font-outfit), sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
  letter-spacing: 0.5px;
  direction: ltr;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Header Ticket Type Badge (Top Row) */
.wa-header-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
  white-space: nowrap;
}

.wa-header-type-badge .type-title {
  display: none;
}

.wa-header-type-badge .type-name {
  font-weight: 700;
  font-size: 0.72rem;
}

.wa-header-type-badge.type-complaint {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.18);
}

.wa-header-type-badge.type-inquiry {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
}

.wa-header-type-badge.type-maintenance,
.wa-header-type-badge.type-sparepart,
.wa-header-type-badge.type-part {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.1);
}

/* Custom Status Dropdown Menu */
.wa-custom-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
}

.wa-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0.38rem 1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  letter-spacing: 0.35px;
  cursor: pointer;
  outline: none;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wa-dropdown-trigger:hover {
  transform: translateY(-1px);
}

.wa-dropdown-trigger.status-open {
  background-color: rgba(239, 68, 68, 0.18) !important;
  color: #ef4444 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
}

.wa-dropdown-trigger.status-pending {
  background-color: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

.wa-dropdown-trigger.status-closed {
  background-color: rgba(51, 65, 85, 0.5) !important;
  color: #cbd5e1 !important;
  border-color: #64748b !important;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.4) !important;
}

.trigger-dot {
  font-size: 0.85rem;
  line-height: 1;
}

.trigger-text {
  font-weight: 800;
  letter-spacing: 0.3px;
}

.trigger-chevron {
  transition: transform 0.25s ease;
  opacity: 0.85;
}

.wa-custom-dropdown.open .trigger-chevron {
  transform: rotate(180deg);
}

/* Floating Status Menu */
.wa-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 145px;
  background: #0b111d;
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: dropMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateZ(0);
}

.wa-custom-dropdown.open .wa-dropdown-menu {
  display: flex;
}

@keyframes dropMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.52rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-outfit), sans-serif;
}

.wa-dropdown-item .item-dot {
  font-size: 0.8rem;
}

.wa-dropdown-item .item-name {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}

.wa-dropdown-item .item-check {
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-right: auto;
}

.wa-dropdown-item.active .item-check {
  opacity: 1;
}

.wa-dropdown-item.item-open {
  color: #ef4444;
}
.wa-dropdown-item.item-open:hover,
.wa-dropdown-item.item-open.active {
  background: rgba(239, 68, 68, 0.16);
}

.wa-dropdown-item.item-pending {
  color: #38bdf8;
}
.wa-dropdown-item.item-pending:hover,
.wa-dropdown-item.item-pending.active {
  background: rgba(56, 189, 248, 0.16);
}

.wa-dropdown-item.item-closed {
  color: #cbd5e1;
}
.wa-dropdown-item.item-closed:hover,
.wa-dropdown-item.item-closed.active {
  background: rgba(51, 65, 85, 0.5);
  color: #ffffff;
}

/* Close Button */
.wa-close-btn {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wa-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

/* Scrollable Messages Canvas */
.wa-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.2rem 1.6rem;
  background: #080c14 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  contain: content;
  will-change: scroll-position;
}

.wa-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.wa-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.5);
  border-radius: 4px;
}

.wa-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.5);
}

/* Centered Date Separator Pill */
.wa-date-pill {
  align-self: center;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.7);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-outfit), var(--font-cairo);
  padding: 5px 18px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 2px 0 8px 0;
  letter-spacing: 0.3px;
}

/* Chat Rows */
.wa-msg-row {
  display: flex;
  width: 100%;
  margin-bottom: 12px !important;
  animation: waBubbleFadeIn 0.25s ease-out;
}

@keyframes waBubbleFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-msg-incoming {
  justify-content: center;
}

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

/* --------------------------------------------------------------------------
   Main Original Ticket Box (بطاقة التيكت الأصلية المنسقة - Strict 5-Color)
   -------------------------------------------------------------------------- */
.wa-bubble-client {
  width: 100% !important;
  max-width: 100% !important;
  background: linear-gradient(180deg, #0d1424, #080c14) !important;
  color: #f1f5f9 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(51, 65, 85, 0.6) !important;
  border-right: 4px solid #ef4444 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.08) !important;
  padding: 12px 16px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-bubble-sender {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.wa-sender-client {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-sender-client .wa-sender-label {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.72rem;
}

.wa-sender-client .wa-sender-name {
  color: #ffffff;
  font-weight: 800;
}

.wa-complaint-type-tag {
  font-size: 0.68rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Vehicle & Ticket Metadata Badges Row */
.wa-vehicle-badges-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 1px 0;
  padding: 0;
  background: transparent;
  border: none;
  width: 100%;
}

.wa-v-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.wa-v-badge .v-label {
  font-size: 0.66rem;
  opacity: 0.9;
}

.wa-v-badge .v-value {
  font-weight: 800;
  letter-spacing: 0.25px;
}

.wa-v-badge.vin-highlight {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}
.wa-v-badge.vin-highlight .v-value {
  color: #f87171;
  font-family: var(--font-outfit);
}

.wa-v-badge.plate-highlight {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}
.wa-v-badge.plate-highlight .v-value {
  color: #38bdf8;
  font-family: var(--font-cairo), var(--font-outfit);
}

.wa-v-badge.media-highlight {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.wa-v-badge.media-highlight .v-value {
  color: #ffffff;
}

.wa-v-badge.booking-highlight,
.wa-v-badge.part-highlight {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

/* Dedicated Content Panel for the Ticket Text */
.wa-ticket-body-box {
  background: rgba(8, 12, 20, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  margin: 1px 0;
}

.wa-bubble-text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #ffffff;
  font-weight: 500;
  word-break: break-word;
  white-space: pre-wrap;
}

.wa-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 0;
}

.wa-bubble-time {
  font-size: 0.65rem;
  color: #94a3b8;
  font-family: var(--font-outfit);
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
}

/* --------------------------------------------------------------------------
   Agent Outgoing Replies Bubble
   -------------------------------------------------------------------------- */
.wa-bubble-agent {
  max-width: 82%;
  width: fit-content;
  min-width: 220px;
  background: linear-gradient(180deg, #0d1b2a, #0b1522) !important;
  color: #f1f5f9 !important;
  border-radius: 14px 14px 4px 14px !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-left: 4px solid #38bdf8 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.1) !important;
  padding: 10px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-sender-agent {
  font-size: 0.85rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-handle {
  color: #38bdf8;
  font-family: var(--font-outfit);
  font-size: 0.72rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 5px;
}

.wa-reply-badge {
  font-size: 0.68rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.wa-double-check {
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.wa-replies-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-empty-replies-notice {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 1.4rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  border: 1px dashed rgba(56, 189, 248, 0.25);
  margin: 8px 0;
}

/* Centered Status Change System Event Card */
.wa-system-event-center-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 10px auto !important;
  text-align: center !important;
  animation: waBubbleFadeIn 0.3s ease-out;
}

.wa-status-change-card {
  width: auto !important;
  max-width: 95% !important;
  background: rgba(15, 23, 42, 0.95) !important;
  border-radius: 30px !important;
  padding: 5px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  border: 1.5px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(10px) !important;
  direction: rtl !important;
}

.wa-status-change-card.is-open {
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.22) !important;
}
.wa-status-change-card.is-pending {
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22) !important;
}
.wa-status-change-card.is-closed {
  border-color: rgba(100, 116, 139, 0.45) !important;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.35) !important;
}

.status-single-line {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  font-size: 0.76rem !important;
  color: #cbd5e1 !important;
}

.status-pill-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  padding: 2px 9px !important;
  border-radius: 6px !important;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}
.status-pill-badge.is-open {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
}
.status-pill-badge.is-pending {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
}
.status-pill-badge.is-closed {
  background: rgba(51, 65, 85, 0.5) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(100, 116, 139, 0.45) !important;
}

.status-action-tag {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.status-card-user {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
}
.status-card-user .changer-name {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.status-sep {
  color: rgba(255, 255, 255, 0.3) !important;
  font-size: 0.75rem !important;
  user-select: none !important;
}

.status-card-timestamp {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: #64748b !important;
  font-family: var(--font-outfit) !important;
  font-size: 0.7rem !important;
  direction: ltr !important;
  white-space: nowrap !important;
}

/* --------------------------------------------------------------------------
   Bottom Chat Input Bar
   -------------------------------------------------------------------------- */
.wa-chat-input-bar {
  padding: 0.85rem 1.3rem !important;
  background: #080c14 !important;
  border-top: 1px solid rgba(51, 65, 85, 0.6) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
}

.wa-input-author-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  padding: 0.45rem 0.85rem !important;
  border-radius: 10px !important;
  font-size: 0.78rem !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.12) !important;
}

.wa-input-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  background: #0f172a !important;
  border-radius: 12px !important;
  padding: 0.45rem 1rem !important;
  border: 1.5px solid rgba(51, 65, 85, 0.7) !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.wa-input-wrap:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3) !important;
  background: #0b111d !important;
}

.wa-chat-textarea {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 0.86rem !important;
  font-family: var(--font-cairo), sans-serif !important;
  line-height: 1.5 !important;
  resize: none !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 90px !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.wa-chat-textarea::placeholder {
  color: #64748b !important;
  font-size: 0.82rem !important;
}

.wa-send-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
  padding: 0 !important;
}

.wa-send-btn i,
.wa-send-btn svg {
  transform: scaleX(-1);
}

.wa-send-btn:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.55) !important;
}

.wa-send-btn:active {
  transform: scale(0.96) !important;
}

.wa-send-btn:active {
  transform: scale(0.96);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-msg {
  background: rgba(11, 23, 44, 0.96);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px var(--neon-cyan-glow);
  color: #ffffff;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toastSlide 0.3s ease-out;
}

@keyframes toastSlide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .header-bar,
  .side-nav-rail,
  .filters-bar,
  .action-btn-group,
  .btn-return-crm,
  .btn-print-report,
  .btn-reset-filters {
    display: none !important;
  }

  .main-container {
    padding: 0 !important;
  }

  .glass-panel {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .complaints-table th {
    background: #eee !important;
    color: #000 !important;
  }

  .complaints-table td {
    color: #000 !important;
    border-bottom: 1px solid #ddd !important;
  }
}

/* User Badge & Roles */
.user-header-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.35rem 0.85rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.user-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.user-role-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.role-admin {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.role-manager {
  background: rgba(192, 132, 252, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #d8b4fe;
}

.role-second-line {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.role-customer-service {
  background: rgba(200, 16, 46, 0.18);
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #fca5a5;
}

.btn-danger-action {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffffff;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-cairo);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.btn-danger-action:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-1px);
}

.btn-secondary-action {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-cairo);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.12);
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.95)) !important;
  border-color: var(--fiat-red-light) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(200, 16, 46, 0.35) !important;
  transform: translateY(-1px);
}

/* Modal Backdrop for Settings & Admin Auth */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(4, 8, 18, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-content {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.9);
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.7rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 12, 22, 0.85);
}

.btn-modal-close {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 0.45rem 1rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.12);
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.95), rgba(30, 41, 59, 0.95)) !important;
  border-color: var(--fiat-red-light) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.35) !important;
  transform: translateY(-1px);
}

.btn-gold-sm {
  background: linear-gradient(135deg, #FBBF24 0%, #EAA023 100%);
  border: 1px solid #FBBF24;
  color: #000000;
  font-family: var(--font-cairo);
  font-weight: 800;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(234, 160, 35, 0.45);
  transition: all 0.2s;
}

.btn-gold-sm:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  box-shadow: 0 6px 18px rgba(234, 160, 35, 0.6);
  color: #000000;
}

/* Settings & Users Management Modal */
.settings-modal-card {
  max-width: 780px !important;
  width: 95% !important;
}

.settings-tabs-header {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  margin-bottom: 1.2rem;
}

.settings-tab-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-family: var(--font-cairo);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.settings-tab-btn.active {
  background: rgba(200, 16, 46, 0.2);
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.35);
}

.users-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(6, 10, 20, 0.6);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: right;
}

.users-table th {
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  padding: 0.6rem 0.8rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(200, 16, 46, 0.3);
  position: sticky;
  top: 0;
  z-index: 2;
}

.users-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.users-table tr:hover td {
  background: rgba(200, 16, 46, 0.06);
}

.btn-del-user {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
}

.btn-del-user:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

.login-form-group {
  margin-bottom: 1.1rem;
  text-align: right;
}

.login-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(200, 16, 46, 0.3);
  color: #ffffff;
  font-family: var(--font-cairo);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  outline: none;
  transition: all 0.25s ease;
}

.login-input:focus {
  border-color: var(--fiat-red-light);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.35);
}

.login-input-icon {
  position: absolute;
  left: 10px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.login-input-icon:hover {
  color: var(--fiat-red-light);
}

/* ==========================================================================
   Developer Signature Credits Card Component (By Eng Ahmed Mohamed)
   ========================================================================== */
.dev-credits-card {
  direction: ltr !important;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem 0.75rem 1.4rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(7, 11, 20, 0.98));
  border: 1.5px solid rgba(200, 16, 46, 0.35);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(200, 16, 46, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-align: center;
}

.dev-credits-card:hover {
  border-color: var(--fiat-red-light);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(200, 16, 46, 0.3);
  transform: translateY(-2px);
}

.dev-credits-title {
  direction: ltr !important;
  font-family: var(--font-outfit, 'Outfit', 'Segoe UI', sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 0.55rem;
  line-height: 1;
  white-space: nowrap;
}

.dev-by-eng {
  color: var(--fiat-red-light);
  text-shadow: 0 0 10px var(--fiat-red-glow);
}

.dev-name {
  color: #38bdf8 !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.65) !important;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.dev-social-links {
  direction: ltr !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.dev-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(22, 34, 56, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.dev-social-btn:hover {
  transform: translateY(-2px) scale(1.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.dev-social-btn.fb-btn:hover {
  background: rgba(24, 119, 242, 0.25);
  box-shadow: 0 0 14px rgba(24, 119, 242, 0.6);
}

.dev-social-btn.wa-btn:hover {
  background: rgba(37, 211, 102, 0.25);
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.6);
}

.dev-social-btn.in-btn:hover {
  background: rgba(10, 102, 194, 0.25);
  box-shadow: 0 0 14px rgba(10, 102, 194, 0.6);
}

.dev-social-btn.ig-btn:hover {
  background: rgba(225, 48, 108, 0.25);
  box-shadow: 0 0 14px rgba(225, 48, 108, 0.6);
}

/* Sidebar Version */
.sidebar-dev-wrapper {
  width: 100%;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: 6px;
}

.sidebar-dev-card {
  padding: 0.45rem 0.35rem 0.5rem 0.35rem;
  width: 58px;
  border-radius: 12px;
  border: 1px solid rgba(200, 16, 46, 0.3);
}

.sidebar-dev-card .dev-credits-title {
  direction: ltr !important;
  flex-direction: column;
  gap: 1px;
  font-size: 0.52rem;
  letter-spacing: 0.3px;
  margin-bottom: 0.35rem;
}

.sidebar-dev-card .dev-social-links {
  direction: ltr !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.sidebar-dev-card .dev-social-btn {
  width: 21px;
  height: 21px;
  border-radius: 5px;
}

/* Footer Bar */
.app-system-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0 1.3rem 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Load More Button for Table Pagination */
.btn-load-more {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.25), rgba(239, 68, 68, 0.15));
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #ffffff;
  padding: 0.45rem 1.4rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: var(--font-cairo), var(--font-outfit);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-load-more:hover {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.45), rgba(239, 68, 68, 0.3));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.5);
  transform: translateY(-2px);
}

