/* ==========================================================================
   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: #F8FAFC;
  --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: 68px;
  --footer-height: 0px;
  --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;
}

/* ==========================================================================
   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;
}

/* ==========================================================================
   Glassmorphism Helper
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  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.2s ease, box-shadow 0.2s ease;
  contain: layout style;
}

.glass-panel:hover {
  border-color: rgba(234, 160, 35, 0.75);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 18px rgba(234, 160, 35, 0.35);
}

/* ==========================================================================
   App Layout
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.header-bar {
  height: var(--header-height);
  background: rgba(8, 14, 25, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1.5px solid rgba(234, 160, 35, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  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(135deg, #FFFFFF 0%, #E2E8F0 35%, #FBBF24 65%, #EAA023 100%);
  -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(--chrome-silver);
  font-weight: 500;
  letter-spacing: 0.8px;
}

/* Top Search Bar */
.search-section {
  flex: 1;
  max-width: 520px;
  margin: 0 2rem;
  position: relative;
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: rgba(6, 11, 20, 0.92);
  border: 1.5px solid rgba(234, 160, 35, 0.65);
  border-radius: 25px;
  padding: 0.55rem 2.8rem 0.55rem 2.8rem;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 600;
  font-family: var(--font-cairo);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(234, 160, 35, 0.25) inset;
}

.search-input:focus {
  border-color: #FBBF24;
  box-shadow: 0 0 20px rgba(234, 160, 35, 0.6), 0 0 15px rgba(234, 160, 35, 0.3) inset;
}

.search-icon-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--fiat-red-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.search-icon-btn:hover {
  transform: scale(1.1);
}

/* Red X Clear Button (تظهر عند الكتابة في نهاية الإدخال لمسح المكتوب) */
.search-clear-btn {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.18);
  border: 1.5px solid #ef4444;
  color: #ef4444;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
  z-index: 5;
}

.search-clear-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
}

/* Live Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: rgba(8, 16, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--neon-cyan);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 20px var(--neon-cyan-glow);
  border-radius: 14px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(200, 16, 46, 0.14);
  border-color: rgba(200, 16, 46, 0.35);
  transform: translateX(-2px);
}

.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

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

.search-result-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-result-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.65rem;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(226, 232, 240, 0.45);
  border-radius: 12px;
  color: #F1F5F9;
  font-size: 0.76rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}

.search-client-code-pill {
  color: #38bdf8;
  font-family: var(--font-outfit);
  font-weight: 800;
  font-size: 0.75rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

/* User Header Section */
.user-header-section {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.header-action-btn {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(226, 232, 240, 0.25);
  border-radius: 9px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.header-action-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.35);
}

.notif-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--neon-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-red);
  animation: pulseAlert 1.8s infinite;
}

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

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

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1.1rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 22px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.45);
  transition: all 0.3s ease;
}

.user-badge:hover {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(226, 232, 240, 0.35);
}

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

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

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

/* Sidebar Navigation Rail (Fixed / Sticky on scroll) */
.side-nav-rail {
  width: 78px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(226, 232, 240, 0.18);
  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, 68px);
  height: calc(100vh - var(--header-height, 68px));
  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: #94A3B8;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.12);
  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(148, 163, 184, 0.16);
  border-color: rgba(226, 232, 240, 0.35);
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.2);
  transform: translateY(-2px);
}

.nav-rail-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.45) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px var(--fiat-red-glow), 0 0 8px rgba(255, 255, 255, 0.2);
}

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

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

.nav-rail-item.logout-item {
  color: var(--neon-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
}

.nav-rail-item.logout-item:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: var(--neon-rose);
  box-shadow: 0 0 16px var(--neon-rose-glow);
  color: #fff;
  transform: translateY(-2px);
}

/* Content Area */
.main-content-area {
  flex: 1;
  padding: 0.3rem 0.35rem 0.75rem 0.35rem;
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 0.55rem;
  max-width: 100%;
  margin: 0;
  width: 100%;
  align-items: stretch;
  min-width: 0;
}

@media (max-width: 1200px) {
  .main-content-area {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RIGHT COLUMN: Basic Client Info (البيانات الأساسية)
   ========================================================================== */
.client-info-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.client-card {
  padding: 1rem 1.2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

#client-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
  gap: 0.35rem;
}

#client-form > .form-group-row:first-of-type {
  margin-top: -0.2rem;
  margin-bottom: 0.35rem;
}

/* Header for Basic Client Info (بدون صورة العميل) */
.client-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.client-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-header-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-header-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(200, 16, 46, 0.35);
}

.avatar-client-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.22rem 0.75rem;
  background: rgba(234, 160, 35, 0.15);
  border: 1.5px solid rgba(234, 160, 35, 0.65);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #FBBF24;
  box-shadow: 0 0 12px rgba(234, 160, 35, 0.3);
}

/* Form Fields Styling */
.form-group-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.form-group-row.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.form-group-row.four-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

/* ========================================================================
   تنسيق حاوية سيارات العميل (تظهر تلقائياً من التيكتس للقراءة فقط)
   ======================================================================== */
.client-vehicles-wrapper {
  margin-top: 0.1rem;
  margin-bottom: 0.45rem;
  width: 100%;
}

.client-vehicles-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 250px;
  overflow-y: auto;
  padding: 2px 2px;
}

.client-vehicles-list::-webkit-scrollbar {
  width: 4px;
}

.client-vehicles-list::-webkit-scrollbar-thumb {
  background: rgba(200, 16, 46, 0.45);
  border-radius: 4px;
}

.client-vehicle-item {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  transition: all 0.2s ease;
}

.client-vehicle-item:hover {
  border-color: rgba(226, 232, 240, 0.25);
  background: rgba(30, 41, 59, 0.55);
}

.client-vehicle-item.single-vehicle {
  background: transparent;
  border: none;
  padding: 0;
}

.client-vehicle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  padding: 0 0.15rem;
}

.vehicle-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #f1f5f9;
  background: rgba(200, 16, 46, 0.18);
  border: 1px solid rgba(200, 16, 46, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
}

.vehicle-model-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 7px;
  border-radius: 5px;
}

/* تنسيق صفي رقم الشاسية ورقم اللوحة بالبيانات الأساسية بتطابق تام في الارتفاع وتوازن العرض */
.form-group-row.client-vehicle-row {
  grid-template-columns: 1.6fr 1fr;
  gap: 0.5rem;
  align-items: start;
}

.client-vehicle-row .field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 22px;
  margin-bottom: 0.24rem;
}

.client-vin-input,
.client-plate-input {
  height: 38px !important;
  min-height: 38px !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  display: block !important;
  width: 100% !important;
}

.client-vin-input {
  font-family: var(--font-outfit), 'Consolas', 'Courier New', monospace, var(--font-cairo) !important;
  font-size: 0.77rem !important;
  letter-spacing: 1.8px !important;
  padding: 0.35rem 0.25rem !important;
  text-transform: uppercase;
  text-align: center;
  direction: ltr;
  border-color: rgba(234, 160, 35, 0.65) !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}

.client-vin-input:focus {
  border-color: #FBBF24 !important;
  box-shadow: 0 0 12px rgba(234, 160, 35, 0.4) !important;
}

.client-plate-input {
  font-family: var(--font-outfit), var(--font-cairo), sans-serif !important;
  font-size: 0.82rem !important;
  letter-spacing: 1.5px !important;
  padding: 0.35rem 0.35rem !important;
  text-align: center;
  border-color: rgba(234, 160, 35, 0.65) !important;
  color: #FBBF24 !important;
  white-space: nowrap !important;
}

.client-plate-input:focus {
  border-color: #FBBF24 !important;
  box-shadow: 0 0 12px rgba(234, 160, 35, 0.4) !important;
}

.readonly-vehicle-input {
  cursor: default !important;
  user-select: text !important;
  background: rgba(10, 15, 29, 0.75) !important;
  pointer-events: auto !important;
}

.readonly-vehicle-input:focus {
  outline: none !important;
}

.form-group-row>div,
.form-group-single {
  min-width: 0;
}

@media (max-width: 992px) {
  .form-group-row.three-cols {
    grid-template-columns: 1fr;
  }
  .form-group-row.four-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .form-group-row.four-cols {
    grid-template-columns: 1fr;
  }
}

.form-group-single {
  margin-bottom: 0.55rem;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.24rem;
}

.field-label i {
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.field-label .required-star {
  color: var(--neon-red);
}

.input-field {
  width: 100%;
  background: var(--input-bg);
  border: 1.2px solid rgba(234, 160, 35, 0.45);
  border-radius: 8px;
  padding: 0.44rem 0.8rem;
  color: #f8fafc;
  font-size: 0.94rem;
  font-weight: 600;
  font-family: var(--font-cairo);
  outline: none;
  transition: all 0.25s ease;
}

.input-field:focus {
  border-color: #FBBF24;
  box-shadow: 0 0 12px rgba(234, 160, 35, 0.45);
  background: rgba(12, 24, 46, 0.95);
}

.input-field::placeholder {
  color: #475569;
  font-size: 0.86rem;
  font-weight: 500;
}

.input-field:disabled {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(51, 65, 85, 0.4);
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.65;
}

/* Highlight Code Field */
.code-input-wrapper {
  position: relative;
}

.code-input-highlight {
  background: rgba(200, 16, 46, 0.08) !important;
  border-color: rgba(200, 16, 46, 0.45) !important;
  color: #38bdf8 !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: not-allowed;
}

.code-lock-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-cyan);
  opacity: 0.7;
}

/* Select Dropdowns */
select.input-field {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg2+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
}

select.input-field option {
  background-color: #0b162a;
  color: #ffffff;
  padding: 8px;
}

/* Searchable Combobox (Governorate / المحافظة / القطاعات / الخدمات) */
.custom-combobox-wrapper {
  position: relative;
  width: 100%;
}

.custom-combobox-wrapper.open {
  z-index: 1005;
}

.combobox-input {
  width: 100%;
  padding-left: 2.2rem !important;
  /* مساحة لأيقونة السهم على اليسار في RTL */
  cursor: text;
}

.combobox-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(8, 14, 26, 0.6) !important;
  border-color: rgba(56, 189, 248, 0.15) !important;
}

.combobox-input:disabled~.combobox-chevron {
  pointer-events: none;
  opacity: 0.35;
}

.combobox-chevron {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, color 0.2s ease, background 0.2s ease;
  user-select: none;
  padding: 4px;
  border-radius: 6px;
  width: 24px;
  height: 24px;
}

.custom-combobox-wrapper.open:not(.has-value) .combobox-chevron {
  transform: translateY(-50%) rotate(180deg);
  color: #38bdf8;
}

.combobox-chevron .combobox-icon-chevron {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.combobox-chevron .combobox-icon-clear {
  display: none;
  width: 14px;
  height: 14px;
}

/* When an option is selected / input has a value: switch to Clear (X) icon */
.custom-combobox-wrapper.has-value .combobox-chevron {
  color: #f87171;
  transform: translateY(-50%) rotate(0deg) !important;
}

.custom-combobox-wrapper.has-value .combobox-chevron .combobox-icon-chevron {
  display: none !important;
}

.custom-combobox-wrapper.has-value .combobox-chevron .combobox-icon-clear {
  display: block !important;
}

.custom-combobox-wrapper.has-value .combobox-chevron:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-50%) scale(1.18) !important;
}

.combobox-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  background: #091325;
  border: 1.2px solid rgba(200, 16, 46, 0.5);
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(200, 16, 46, 0.25);
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1010;
  padding: 5px;
  contain: content;
  transform: translateZ(0);
  will-change: transform, opacity;
  animation: comboboxDropdownPop 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes comboboxDropdownPop {
  from {
    opacity: 0;
    transform: translateY(-4px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.combobox-dropdown::-webkit-scrollbar {
  width: 5px;
}

.combobox-dropdown::-webkit-scrollbar-track {
  background: rgba(7, 13, 24, 0.6);
}

.combobox-dropdown::-webkit-scrollbar-thumb {
  background: rgba(200, 16, 46, 0.35);
  border-radius: 4px;
}

.combobox-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

.combobox-option {
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box;
  contain: layout style;
  transition: background 0.08s ease, color 0.08s ease;
}

.combobox-option:hover {
  background: rgba(200, 16, 46, 0.16);
  color: #ffffff;
}

.combobox-option.selected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.35));
  color: var(--neon-cyan);
  font-weight: 700;
}

.combobox-empty {
  padding: 0.85rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.combobox-options-scroll {
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  padding-bottom: 6px;
}

.combobox-options-scroll::-webkit-scrollbar {
  width: 5px;
}

.combobox-options-scroll::-webkit-scrollbar-track {
  background: rgba(7, 13, 24, 0.6);
}

.combobox-options-scroll::-webkit-scrollbar-thumb {
  background: rgba(200, 16, 46, 0.35);
  border-radius: 4px;
}

.combobox-add-footer {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid rgba(200, 16, 46, 0.25);
  position: static;
  background: #091325;
  flex-shrink: 0;
  z-index: 10;
}

.combobox-add-btn {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.12), rgba(239, 68, 68, 0.2));
  border: 1px dashed rgba(200, 16, 46, 0.55);
  color: #f87171;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.combobox-add-btn:hover {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.28), rgba(239, 68, 68, 0.38));
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(200, 16, 46, 0.45);
  transform: translateY(-1px);
}

.combobox-inline-add-box {
  padding: 0.6rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1.2px solid rgba(200, 16, 46, 0.5);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(200, 16, 46, 0.2);
}

.combobox-inline-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  background: rgba(8, 14, 26, 0.9);
  border: 1px solid rgba(200, 16, 46, 0.35);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.combobox-inline-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(200, 16, 46, 0.35);
  background: rgba(11, 20, 38, 0.95);
}

.combobox-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.btn-inline-save {
  background: var(--gold-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(200, 16, 46, 0.3);
}

.btn-inline-save:hover {
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.6);
  transform: scale(1.03);
}

.btn-inline-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inline-cancel:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.45);
}

.combobox-item-delete-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  opacity: 0.55;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.combobox-item-delete-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.15);
}

/* Account Type Radio Pills */
.account-type-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.acc-type-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.42rem 0.65rem;
  background: rgba(10, 20, 36, 0.85);
  border: 1.2px solid rgba(200, 16, 46, 0.25);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.25s ease;
  user-select: none;
}

.acc-type-pill input {
  display: none;
}

.acc-type-pill.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.35));
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.25);
}

/* Action Buttons */
.btn-gold {
  width: 100%;
  background: var(--gold-gradient);
  border: none;
  border-radius: 9px;
  color: #1a1200;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: var(--font-cairo);
  box-shadow: var(--gold-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px rgba(212, 165, 60, 0.5);
}

.btn-gold:active {
  transform: translateY(0);
}

.client-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.btn-secondary-action {
  background: rgba(14, 27, 49, 0.85);
  border: 1.2px solid rgba(56, 189, 248, 0.28);
  border-radius: 9px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.48rem 0.8rem;
  cursor: pointer;
  font-family: var(--font-cairo);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  border-color: var(--neon-cyan);
  background: rgba(200, 16, 46, 0.12);
  color: var(--neon-cyan);
}

.btn-danger-action {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.95));
  border: 1.2px solid rgba(239, 68, 68, 0.6);
  border-radius: 9px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.52rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-cairo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-danger-action:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #fca5a5;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px rgba(239, 68, 68, 0.55);
}

.btn-danger-action:active {
  transform: translateY(0);
}

/* ==========================================================================
   LEFT COLUMN: Inquiries & Complaints (استفسارات وحلول & إدارة الشكاوى)
   ========================================================================== */
.action-hub-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.hub-box {
  padding: 0.95rem 1.1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

/* Box Header with Chart & Badges */
.hub-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.85rem;
}

.hub-box-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hub-box-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-box-title i {
  color: var(--neon-cyan);
}

.hub-box-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-outfit);
  letter-spacing: 0.5px;
}

/* Mini Wave Sparkline Chart */
.mini-chart-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(8, 16, 30, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
}

.mini-chart-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mini-chart-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.mini-chart-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--neon-cyan);
  font-family: var(--font-outfit);
}

.sparkline-svg {
  width: 90px;
  height: 32px;
  overflow: visible;
}

.sparkline-path {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(200, 16, 46, 0.65));
}

.sparkline-path.amber {
  stroke: var(--neon-amber);
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.65));
}

.status-badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.75rem;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 20px;
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-badge-indicator .dot {
  width: 7px;
  height: 7px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
}

/* Hub Tabs Header */
.hub-tabs-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0.75rem;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.18);
  padding-bottom: 0.65rem;
  flex-wrap: nowrap !important;
  width: 100%;
}

.hub-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0.38rem 0.45rem;
  background: rgba(10, 20, 36, 0.7);
  border: 1.5px solid rgba(234, 160, 35, 0.45);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-cairo), sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.25s ease;
  user-select: none;
  flex: 1 1 0;
  min-width: 0;
}

.hub-tab-btn span {
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.hub-tab-btn i,
.hub-tab-btn svg {
  flex-shrink: 0;
  width: 15px !important;
  height: 15px !important;
  color: #ffffff !important;
}

.hub-tab-btn:hover {
  color: #ffffff;
  border-color: rgba(234, 160, 35, 0.8);
  background: rgba(234, 160, 35, 0.15);
}

.hub-tab-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(234, 160, 35, 0.45));
  border-color: #FBBF24;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(234, 160, 35, 0.5);
}

.hub-tab-btn.active i,
.hub-tab-btn.active svg {
  color: #ffffff !important;
}

.tab-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.2);
  border: 1px solid rgba(200, 16, 46, 0.4);
  color: var(--neon-cyan);
  font-size: 0.76rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  flex-shrink: 0;
}

.hub-tab-btn.active .tab-badge-count {
  background: var(--neon-cyan);
  color: #000000;
  box-shadow: 0 0 8px var(--neon-cyan);
}

/* Latest Activity Indicator (السهم الأخضر لأحدث إجراء بجانب الرقم) */
.tab-latest-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.85));
  animation: pulseGreenArrow 1.8s ease-in-out infinite;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 1px;
}

.tab-latest-arrow svg {
  width: 12px !important;
  height: 12px !important;
  stroke: #10b981;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.9));
}

@keyframes pulseGreenArrow {

  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.7));
  }

  50% {
    transform: translateY(-2px) scale(1.2);
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 1));
  }
}

/* Tab Content Panel (Flex to fill exact height of card) */
.tab-content-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Sub-Form Area (مدمج مباشرة بدون إطار فرعي) */
.hub-sub-form {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 0;
  padding: 0 0 0.55rem 0;
  margin-bottom: 0.55rem;
  width: 100%;
  min-width: 0;
}

.hub-sub-form .field-label {
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-sub-form .input-field {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
}

.hub-sub-form .combobox-input {
  padding-left: 1.85rem !important;
}

.hub-sub-form .combobox-chevron {
  left: 7px;
}

.sub-form-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.textarea-field {
  resize: vertical;
  min-height: 80px;
  height: 82px;
  line-height: 1.45;
  padding: 0.5rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.sub-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

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

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

.sub-form-actions .btn-gold-sm,
.sub-form-actions .btn-gold-sm:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #EAA023 100%) !important;
  border: 1px solid #FBBF24 !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3), 0 4px 14px rgba(234, 160, 35, 0.45) !important;
}

.sub-form-actions .btn-gold-sm i,
.sub-form-actions .btn-gold-sm svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

/* Interactive Data Table Section (مدمج مباشرة في المربع الرئيسي بدون إطار داخلي) */
.hub-table-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 0.25rem;
}

.hub-table-header-row {
  font-size: 0.84rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hub-table-wrapper {
  width: 100%;
  max-height: 292px;
  overflow-x: auto;
  overflow-y: auto;
  border: none;
  background: transparent;
  border-radius: 0;
  transition: max-height 0.35s ease-in-out;
}

.hub-table-wrapper.is-expanded {
  max-height: 4000px;
  overflow-y: visible;
}

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

.hub-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.hub-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 4px;
}

.hub-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

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

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

.hub-table thead tr {
  height: 38px;
}

.hub-table tbody tr {
  height: 42px;
}

.hub-table th {
  position: sticky;
  top: 0;
  background: #0b1526;
  color: #94a3b8;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  z-index: 10;
}

.hub-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
  color: #e2e8f0;
  vertical-align: middle;
}

.hub-table tr:last-child td {
  border-bottom: none;
}

.hub-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.hub-table .badge-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-status.status-open,
.badge-status.open {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.badge-status.status-pending,
.badge-status.pending,
.badge-status.in-progress {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.badge-status.status-closed,
.badge-status.closed,
.badge-status.resolved {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Activity Type Badges in Unified Table */
.activity-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 86px;
  min-width: 86px;
  box-sizing: border-box;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.activity-type-badge.inq-badge {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(203, 213, 225, 0.35);
  color: #E2E8F0;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.15);
}

.activity-type-badge.cmp-badge {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

.transfer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.16rem 0.55rem;
  border-radius: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  font-family: var(--font-outfit);
  white-space: nowrap;
}

.transfer-status-badge.done {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.transfer-status-badge.not-done {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.transfer-status-badge.follow-up {
  background: rgba(245, 158, 11, 0.15);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* 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;
}

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

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

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

.status-dropdown option {
  background-color: #0b1526;
  color: #f1f5f9;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 8px 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: #0b1526;
}

.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: #0b1526;
}

.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: #0b1526;
}

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

.btn-row-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  transition: color 0.2s;
}

.btn-row-action:hover {
  color: var(--neon-cyan);
}

.empty-state-text {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Professional Notes Tooltip & 3-Word Preview */
.notes-preview-cell {
  cursor: pointer;
  position: relative;
}

.notes-preview-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(14, 27, 49, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.15);
  transition: all 0.2s ease;
  max-width: 100%;
}

.notes-preview-cell:hover .notes-preview-wrap {
  background: rgba(200, 16, 46, 0.12);
  border-color: rgba(200, 16, 46, 0.45);
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.2);
}

.notes-preview-text {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-preview-cell:hover .notes-preview-text {
  color: #ffffff;
}

.notes-more-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(200, 16, 46, 0.18);
  border: 1px solid rgba(200, 16, 46, 0.35);
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Global Cyber Floating Tooltip */
.notes-custom-tooltip {
  position: fixed;
  z-index: 999999;
  max-width: 380px;
  min-width: 220px;
  background: rgba(8, 16, 32, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.2px solid rgba(200, 16, 46, 0.5);
  border-radius: 11px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(200, 16, 46, 0.25);
  padding: 0.75rem 0.95rem;
  color: #f1f5f9;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  text-align: right;
  font-family: var(--font-cairo);
}

.notes-custom-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.notes-custom-tooltip .tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.45rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.notes-custom-tooltip .tooltip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.notes-custom-tooltip .tooltip-badge {
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

.notes-custom-tooltip .tooltip-body {
  font-size: 0.83rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

/* Toast Notification */
.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;
  }
}

/* View Details Button in Table */
.btn-view-details {
  background: rgba(200, 16, 46, 0.12);
  border: 1px solid rgba(200, 16, 46, 0.35);
  color: var(--neon-cyan);
  padding: 0.22rem 0.65rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-view-details:hover {
  background: rgba(200, 16, 46, 0.25);
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.35);
  transform: translateY(-1px);
}

/* Record Number Badge */
.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(148, 163, 184, 0.14);
  border: 1px solid rgba(203, 213, 225, 0.35);
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.15);
}

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

/* Keep the activity table palette limited to Fiat red and neutral gray. */
.hub-table tbody tr.activity-row-maintenance .record-num-pill,
.hub-table tbody tr.activity-row-maintenance .activity-type-badge,
.hub-table tbody tr.activity-row-part .record-num-pill,
.hub-table tbody tr.activity-row-part .activity-type-badge,
.hub-table tbody tr.activity-row-sparepart .record-num-pill,
.hub-table tbody tr.activity-row-sparepart .activity-type-badge {
  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;
}

.hub-table tbody tr.activity-row-maintenance td:nth-child(5) > div > span:first-child,
.hub-table tbody tr.activity-row-part td:nth-child(5) > div > span:first-child,
.hub-table tbody tr.activity-row-sparepart td:nth-child(5) > div > span:first-child {
  color: #cbd5e1 !important;
}

.hub-table tbody tr.activity-row td:nth-child(3) div:first-child {
  color: #ffffff !important;
}

.hub-table tbody tr.activity-row td:nth-child(3) div + div {
  color: #38bdf8 !important;
}

.hub-table tbody tr.activity-row-maintenance td:nth-child(5) > div > span:first-child,
.hub-table tbody tr.activity-row-part td:nth-child(5) > div > span:first-child,
.hub-table tbody tr.activity-row-sparepart td:nth-child(5) > div > span:first-child {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(203, 213, 225, 0.35) !important;
}

.hub-table tbody tr.activity-row td:nth-child(5) > div > span:first-child {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(203, 213, 225, 0.35) !important;
  color: #cbd5e1 !important;
}

/* Highlight Searched Transaction Row (عند البحث برقم T-1, T-2) */
.hub-table tr.highlight-searched-row td {
  background: rgba(200, 16, 46, 0.15) !important;
  border-top: 1.5px solid var(--neon-cyan) !important;
  border-bottom: 1.5px solid var(--neon-cyan) !important;
  transition: background 0.4s ease;
}

.hub-table tr.highlight-searched-row {
  animation: pulseSearchedRow 2.5s ease-in-out infinite alternate;
}

@keyframes pulseSearchedRow {
  0% {
    box-shadow: inset 0 0 16px rgba(200, 16, 46, 0.55), 0 0 12px rgba(200, 16, 46, 0.45);
  }

  100% {
    box-shadow: inset 0 0 4px rgba(200, 16, 46, 0.18), 0 0 4px rgba(200, 16, 46, 0.12);
  }
}

/* Activity Detail Modal (Centered Glassmorphic Popup) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 9, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.2rem;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: rgba(11, 22, 40, 0.96);
  border: 1.5px solid rgba(200, 16, 46, 0.35);
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(200, 16, 46, 0.2);
  animation: scaleUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  direction: rtl;
}

@keyframes scaleUpModal {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(8, 16, 30, 0.75);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.modal-body {
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal-body::-webkit-scrollbar {
  width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  background: rgba(8, 16, 30, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 12px;
  padding: 0.85rem;
}

.meta-tile {
  background: rgba(13, 25, 45, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 9px;
  padding: 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.meta-tile:hover {
  border-color: rgba(200, 16, 46, 0.35);
  background: rgba(16, 30, 54, 0.9);
  transform: translateY(-1px);
}

.meta-tile.full-width {
  grid-column: span 2;
}

.meta-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-tile-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.meta-tile-value.text-cyan {
  color: #38bdf8;
}

.meta-tile-value.text-purple {
  color: #c084fc;
}

.meta-tile-value.text-amber {
  color: #fbbf24;
}

.meta-tile-value.text-emerald {
  color: #34d399;
}

.detail-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.35rem;
}

.detail-text-box {
  background: rgba(9, 17, 32, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9px;
  padding: 0.75rem 0.95rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #f1f5f9;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-text-box.complaint-box {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.complaint-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-outfit);
  width: fit-content;
}

.reply-thread-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reply-bubble {
  background: rgba(14, 28, 52, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-right: 3px solid var(--neon-cyan);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reply-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.reply-bubble-sender {
  font-weight: 700;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
}

.reply-bubble-text {
  font-size: 0.82rem;
  color: #f8fafc;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.no-replies-box {
  padding: 0.85rem;
  background: rgba(8, 16, 30, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.7rem 1.25rem;
  border-top: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(8, 16, 30, 0.75);
}

.btn-modal-close {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(200, 16, 46, 0.35);
  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(--neon-cyan) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.35) !important;
  transform: translateY(-1px);
}

/* ========================================================================
   Auth, Roles, User Badges & Settings Modal Styles
   ======================================================================== */
/* Header User Meta */
.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(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.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, #334155 0%, #1E293B 100%);
  border: 1px solid rgba(203, 213, 225, 0.35);
  color: #F1F5F9;
  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(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
  border-color: #FFFFFF !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(226, 232, 240, 0.35) !important;
  transform: translateY(-1px);
}

/* Central Login Screen Overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, rgba(13, 27, 49, 0.98) 0%, rgba(5, 11, 20, 0.99) 100%);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(11, 23, 44, 0.9);
  border: 1px solid rgba(200, 16, 46, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(200, 16, 46, 0.2);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
  animation: loginCardPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }

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

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), #ef4444, transparent);
}

.login-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.login-logo-wrap {
  width: 70px;
  height: 70px;
  margin: 0 auto 0.9rem auto;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(200, 16, 46, 0.4);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(200, 16, 46, 0.25);
}

.login-logo-img {
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
}

.login-title {
  font-family: var(--font-outfit, 'Outfit', 'Montserrat', 'Inter', sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}

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

.login-form-group {
  margin-bottom: 1.2rem;
  text-align: left;
  direction: ltr;
}

.login-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-outfit, 'Outfit', 'Montserrat', 'Inter', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
  direction: ltr;
}

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

.login-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(200, 16, 46, 0.25);
  color: #ffffff;
  font-family: var(--font-outfit, 'Outfit', 'Inter', sans-serif);
  font-size: 0.92rem;
  padding: 0.65rem 2.6rem 0.65rem 0.9rem;
  border-radius: 10px;
  outline: none;
  transition: all 0.25s ease;
  direction: ltr;
  text-align: left;
}

.login-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(200, 16, 46, 0.35);
  background: rgba(15, 23, 42, 0.98);
}

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

.login-input-icon:hover {
  color: var(--neon-cyan);
}

.btn-login-submit {
  width: 100%;
  background: var(--gold-gradient);
  border: 1px solid rgba(200, 16, 46, 0.5);
  color: #1a1200;
  font-family: var(--font-outfit, 'Outfit', 'Montserrat', 'Inter', sans-serif);
  font-size: 0.98rem;
  font-weight: 800;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--gold-shadow);
  transition: all 0.25s ease;
  margin-top: 1rem;
  letter-spacing: 0.5px;
}

.btn-login-submit:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 16, 46, 0.6);
  color: #1a1200;
}

.login-hint-box {
  margin-top: 1.2rem;
  padding: 0.65rem 0.85rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  font-size: 0.76rem;
  color: #94a3b8;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.login-hint-box b {
  color: var(--neon-cyan);
  font-family: var(--font-outfit);
}

/* 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(56, 189, 248, 0.2);
  padding-bottom: 0.75rem;
  margin-bottom: 1.2rem;
}

.settings-tab-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  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.15);
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.25);
}

.users-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 8px;
  background: rgba(6, 12, 24, 0.6);
}

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

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

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

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

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

.btn-del-user:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   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(13, 23, 42, 0.94), rgba(6, 11, 24, 0.98));
  border: 1.5px solid rgba(200, 16, 46, 0.32);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(200, 16, 46, 0.12);
  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(--neon-cyan);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(200, 16, 46, 0.28);
  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(56, 189, 248, 0.25);
}

.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(56, 189, 248, 0.12);
}

/* Login Screen Dev Card */
.login-dev-card-wrapper {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ========================================================================
   VIN 17-Box & Plate 7-Box Distinct Styling (Soft Crimson VIN vs Muted Azure Plate)
   ======================================================================== */
.form-row-chassis-plate {
  display: grid;
  grid-template-columns: minmax(290px, 1.75fr) minmax(130px, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.45rem;
  align-items: start;
}

.form-row-chassis-plate > div,
.vin-field-group,
.plate-field-group {
  min-width: 0;
}

.vin-header-row,
.plate-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.28rem;
}

/* -------------------------------------------------------------
   1. رقم الشاسية (Chassis Number - Soft Crimson Theme)
   ------------------------------------------------------------- */
.vin-badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: rgba(200, 16, 46, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 4px;
  color: #f87171;
  font-family: var(--font-outfit);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.vin-counter-pill {
  font-family: var(--font-outfit);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 7px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.vin-counter-pill.complete {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
}

.vin-year-pill {
  font-family: var(--font-cairo), var(--font-outfit);
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 1px 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  animation: fadeInYearPill 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInYearPill {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.vin-input-grid {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  gap: 2px;
  direction: ltr !important;
  background: rgba(14, 10, 16, 0.75);
  padding: 3px 4px;
  border: 1px solid rgba(200, 16, 46, 0.3);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  min-width: 0;
}

.vin-input-grid:focus-within {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.2);
}

.vin-char-cell {
  width: 100%;
  min-width: 0;
  height: 32px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-outfit), monospace;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 0;
  outline: none;
  transition: all 0.18s ease;
}

.vin-char-cell:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(26, 18, 28, 0.95);
}

.vin-char-cell:focus {
  background: rgba(200, 16, 46, 0.15);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(200, 16, 46, 0.4);
  transform: translateY(-1px);
}

.vin-char-cell.filled {
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

/* -------------------------------------------------------------
   2. رقم اللوحة (License Plate - Soft Slate & Muted Azure Theme)
   ------------------------------------------------------------- */
.plate-badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  color: #7dd3fc;
  font-family: var(--font-outfit);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.plate-counter-pill {
  font-family: var(--font-outfit);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 7px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.plate-counter-pill.complete {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
}

.plate-input-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto repeat(3, minmax(0, 1fr));
  gap: 2.5px;
  direction: ltr !important;
  background: rgba(8, 16, 28, 0.75);
  padding: 3px 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  min-width: 0;
  align-items: center;
}

.plate-input-grid:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.18);
}

.plate-char-cell {
  width: 100%;
  min-width: 0;
  height: 32px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-cairo), var(--font-outfit), monospace;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 0;
  outline: none;
  transition: all 0.18s ease;
}

.plate-char-cell:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(18, 30, 50, 0.95);
}

.plate-char-cell:focus {
  background: rgba(14, 165, 233, 0.12);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.plate-char-cell.filled {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.plate-grid-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  user-select: none;
  pointer-events: none;
  height: 100%;
}

.plate-grid-divider::before {
  content: '';
  display: block;
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, rgba(56, 189, 248, 0.55) 50%, rgba(56, 189, 248, 0.1) 100%);
  border-radius: 2px;
  box-shadow: none;
}

@media (max-width: 600px) {
  .form-row-chassis-plate {
    grid-template-columns: 1fr;
  }
  .vin-char-cell,
  .plate-char-cell {
    height: 28px;
    font-size: 0.75rem;
  }
}

/* ========================================================================
   More Button & Client Full History Modal Styling
   ======================================================================== */
.hub-table-footer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0 0.2rem 0;
  border-top: 1px solid rgba(56, 189, 248, 0.1);
  margin-top: 0.35rem;
}

.btn-more-history {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #f8fafc;
  padding: 0.38rem 1.45rem;
  border-radius: 20px;
  font-family: var(--font-cairo), sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 10px rgba(200, 16, 46, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-more-history:hover {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.35) 0%, rgba(30, 41, 59, 0.98) 100%);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.45);
  transform: translateY(-2px);
}

.btn-more-history.is-expanded-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 0 10px rgba(56, 189, 248, 0.25);
}

.btn-more-history.is-expanded-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(30, 41, 59, 0.98) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.45);
}

.btn-more-history:active {
  transform: translateY(0);
}

.full-history-modal-card {
  max-width: 840px !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
}

.history-client-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  background: rgba(8, 14, 26, 0.7);
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  font-size: 0.78rem;
  color: #cbd5e1;
}

.history-client-summary-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.history-client-summary-item span.label {
  color: #64748b;
  font-weight: 600;
}

.history-client-summary-item span.value {
  color: #f8fafc;
  font-weight: 700;
}

.history-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0.65rem 1.25rem 0.35rem 1.25rem;
  background: rgba(6, 11, 22, 0.6);
}

.history-stat-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-stat-num {
  font-family: var(--font-outfit);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.history-stat-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

.history-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  background: rgba(10, 18, 32, 0.5);
  flex-wrap: wrap;
}

.history-filter-tabs {
  display: flex;
  gap: 5px;
}

.history-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 0.22rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-cairo);
}

.history-tab.active {
  background: rgba(200, 16, 46, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}

.history-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  flex: 1;
  max-width: 320px;
}

.history-search-wrap input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-family: var(--font-cairo);
  outline: none;
  width: 100%;
}

.history-modal-body {
  padding: 0.85rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item-card {
  background: rgba(13, 22, 38, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.2s ease;
}

.history-item-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(18, 28, 48, 0.95);
  transform: translateY(-1px);
}

.history-item-card.is-inquiry {
  border-right: 3px solid #38bdf8;
}

.history-item-card.is-complaint {
  border-right: 3px solid #ef4444;
}

.history-item-card.is-maintenance {
  border-right: 3px solid #10b981;
}

.history-item-card.is-part {
  border-right: 3px solid #06b6d4;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.4rem;
}

.history-item-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 5px 10px;
  background: rgba(8, 14, 26, 0.6);
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.76rem;
}

.history-item-notes-box {
  background: rgba(6, 11, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   Maintenance Booking, Branch Rules Banner & Guide Modal Styles
   ========================================================================== */
.hub-tab-btn#tab-btn-maintenances.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.35));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.32);
}

.hub-tab-btn#tab-btn-maintenances.active .tab-badge-count {
  background: var(--fiat-red-light);
  color: #000000;
  box-shadow: 0 0 8px var(--fiat-red-light);
}

.btn-branch-guide-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-branch-guide-trigger:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

/* Branch Rules Banner (Live Assistant) */
.branch-rules-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(8, 20, 36, 0.96) 0%, rgba(15, 28, 48, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  animation: fadeInRules 0.25s ease-out;
}

.banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.banner-header-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
}

.banner-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.banner-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

@keyframes fadeInRules {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.banner-rules-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.banner-rule-item.highlight-warn {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.banner-rule-item.highlight-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.banner-rule-badge-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-inline-start: 4px;
  vertical-align: middle;
}

.banner-model-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.banner-service-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.branch-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}

.branch-rules-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 800;
  color: #38bdf8;
}

.branch-rules-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.branch-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
}

.branch-rule-chip.chip-time {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.branch-rule-chip.chip-cap {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.branch-rule-chip.chip-phone {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.branch-rule-warning-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.branch-rule-info-box {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: #bae6fd;
  font-size: 0.74rem;
  line-height: 1.45;
}

/* Branches Guide Modal & Grid */
.branches-guide-modal-card {
  max-width: 960px;
  width: 95%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0b1424 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(16, 185, 129, 0.15) !important;
  contain: layout style;
  transform: translateZ(0);
  will-change: transform, opacity;
}

.branches-guide-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  contain: content;
  will-change: scroll-position;
}

.branches-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.branch-guide-card {
  background: #0f1c32;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
  contain: content;
}

.branch-guide-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: #14243e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.bg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.45rem;
}

.bg-badge-branch {
  font-size: 0.86rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

.bg-tag-brand {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.bg-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bg-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.77rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.bg-row i {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  flex-shrink: 0;
  margin-top: 2px;
}

.bg-row.bg-danger-note {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 5px;
  padding: 4px 6px;
  color: #fca5a5;
}
.bg-row.bg-danger-note i {
  color: #ef4444;
}

.bg-row.bg-warning-note {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 5px;
  padding: 4px 6px;
  color: #fde68a;
}
.bg-row.bg-warning-note i {
  color: #f59e0b;
}

.bg-row.bg-success-note {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 5px;
  padding: 4px 6px;
  color: #6ee7b7;
}
.bg-row.bg-success-note i {
  color: #10b981;
}

.bg-row.bg-info-note {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 5px;
  padding: 4px 6px;
  color: #bae6fd;
}
.bg-row.bg-info-note i {
  color: #38bdf8;
}

/* Activity Badge & Number Pill for Maintenance */
.record-num-pill.mnt-num {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.activity-type-badge.mnt-badge {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* Tab Button & Activity Badge for Spare Parts (قطع الغيار) */
.hub-tab-btn#tab-btn-parts.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.35));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.32);
}

.hub-tab-btn#tab-btn-parts.active .tab-badge-count {
  background: var(--fiat-red-light);
  color: #000000;
  box-shadow: 0 0 8px var(--fiat-red-light);
}

.record-num-pill.prt-num {
  background: rgba(2, 132, 199, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.activity-type-badge.prt-badge {
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.record-num-pill.sprt-num {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.activity-type-badge.sprt-badge {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.hub-tab-btn#tab-btn-spareparts.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(200, 16, 46, 0.35));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.32);
}

.hub-tab-btn#tab-btn-spareparts.active .tab-badge-count {
  background: var(--fiat-red-light);
  color: #000000;
  box-shadow: 0 0 8px var(--fiat-red-light);
}

.type-badge.sparepart {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

/* Time Slot Capacity Badges */
.slot-capacity-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.slot-capacity-pill.cap-avail {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.slot-capacity-pill.cap-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.slot-capacity-pill.cap-full {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.slot-capacity-pill.cap-multi {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.slot-capacity-pill.cap-single {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.combobox-option.slot-disabled {
  opacity: 0.55;
  background: rgba(239, 68, 68, 0.05);
  cursor: not-allowed;
}

.combobox-option.slot-disabled:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   Follow-up Chat & Ticket Dialogue Modal Styles (نظام المحادثة والمتابعة المتطور)
   ========================================================================== */

/* Follow-up Button in Unified Activity Table */
.btn-follow-up {
  background: rgba(148, 163, 184, 0.14);
  border: 1.2px solid rgba(203, 213, 225, 0.35);
  color: #cbd5e1;
  padding: 0.28rem 0.75rem;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 800;
  font-family: var(--font-outfit), var(--font-cairo), sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.btn-follow-up:hover {
  background: rgba(148, 163, 184, 0.26);
  border-color: #cbd5e1;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.35);
  transform: translateY(-1px) scale(1.02);
}

.btn-follow-up:active {
  transform: translateY(0) scale(0.98);
}

/* Modal Overlay for Follow-up Chat */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.18s ease-out;
  transform: translateZ(0);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   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);
}

/* Chat Messages Canvas */
.wa-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
  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 Pill */
.wa-date-pill {
  align-self: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-outfit), var(--font-cairo);
  padding: 4px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin: 2px 0 6px 0;
  letter-spacing: 0.3px;
}

/* Chat Rows & Message Bubbles */
.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: flex-start;
}

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

.wa-bubble {
  max-width: 75%;
  width: fit-content;
  min-width: 220px;
  padding: 0.7rem 1rem 0.55rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Incoming Bubble (Client Transaction) */
.wa-bubble-client {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #f1f5f9 !important;
  border-radius: 14px 14px 14px 4px !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-right: 4px solid #ef4444 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(239, 68, 68, 0.1) !important;
}

/* Outgoing Bubble (Support / Agent Reply) */
.wa-bubble-agent {
  background: rgba(15, 28, 45, 0.95) !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;
}

.wa-bubble-sender {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.wa-sender-client {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  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-complaint-type-tag {
  font-size: 0.72rem;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

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

/* Vehicle Badges Grid inside incoming client bubble */
.wa-vehicle-badges-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px 0;
  padding: 5px 8px;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 8px;
  width: fit-content;
}

.wa-v-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
}

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

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

.wa-v-badge.vin-highlight {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.15);
}
.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: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #bae6fd;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}
.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.9);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.wa-v-badge.booking-highlight {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
/* 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 (بطاقة التيكت الأصلية المنسقة - Ultra Compact)
   -------------------------------------------------------------------------- */
.wa-bubble-client {
  width: 100% !important;
  max-width: 100% !important;
  background: linear-gradient(180deg, #0d1424, #080c14) !important;
  color: #f1f5f9 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(51, 65, 85, 0.5) !important;
  border-right: 3px solid #ef4444 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
  padding: 5px 12px !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.status-card-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-family: var(--font-outfit);
  font-size: 0.7rem;
  direction: ltr;
}

/* --------------------------------------------------------------------------
   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;
}






