/* ══════════════════════════════════════════════════════════════
   DAR AL AMIRAT — CUSTOMER PORTAL LUXURY LIGHT DESIGN SYSTEM
   PRIMARY BRAND COLOR: #C6A8CD (SOFT LILAC / SOFT AMETHYST)
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Primary Brand Color System */
  --primary-color: #C6A8CD;
  --primary-hover: #b897bf;
  --primary-dark: #8c6293;
  --primary-deep: #5d3b64;
  --primary-light: rgba(198, 168, 205, 0.14);
  --primary-border: rgba(198, 168, 205, 0.35);
  --primary-glow: rgba(198, 168, 205, 0.28);

  /* Light Theme Surfaces & Backgrounds */
  --bg-gradient: linear-gradient(135deg, #FBF8FD 0%, #F5ECF7 40%, #EDE1F1 100%);
  --card-bg: #ffffff;
  --card-border: #E8DDEB;
  --card-shadow: 0 12px 35px -5px rgba(93, 59, 100, 0.07), 0 0 1px 1px rgba(198, 168, 205, 0.2);

  /* Text & Colors */
  --text-main: #271B2D;
  --text-muted: #6B5B73;
  --border-color: #E2D5E5;
  --input-bg: #FDFBFE;

  /* Complementary Status Colors */
  --emerald-green: #10b981;
  --emerald-light: rgba(16, 185, 129, 0.1);
  --whatsapp-green: #25d366;
  --whatsapp-bg: #f0fdf4;
  --whatsapp-border: #86efac;

  --amber-gold: #d97706;
  --rose-red: #e11d48;
  --rose-light: rgba(225, 29, 72, 0.08);

  /* Radii & Transitions */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Readex Pro', 'Tajawal', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ MAIN CONTAINER (MOBILE FIRST & DESKTOP RESPONSIVE) ═══ */
.customer-container, .app-container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .customer-container, .app-container {
    padding: 2.5rem 2rem 5rem;
  }
}

/* ═══ BRAND HEADER (100% CENTERED & RESPONSIVE) ═══ */
.brand-header {
  text-align: center;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-logo-container {
  width: 84px;
  height: 84px;
  margin: 0 auto 0.85rem;
  background: #ffffff;
  border-radius: 22px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(93, 59, 100, 0.12), 0 0 0 1px var(--primary-border);
  transition: var(--transition);
}

.brand-logo-container:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 30px rgba(93, 59, 100, 0.18), 0 0 0 1.5px var(--primary-color);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  text-align: center;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ═══ MOBILE RESPONSIVE STEPPER ═══ */
.stepper-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.95rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(93, 59, 100, 0.04);
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.45;
  transition: var(--transition);
}

.stepper-item.active {
  opacity: 1;
}

.stepper-item.completed .step-counter {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.step-counter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}

.stepper-item.active .step-counter {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: scale(1.04);
}

.step-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 5px;
  border-radius: 99px;
  transition: var(--transition);
}

.stepper-line.completed {
  background: var(--primary-color);
}

/* ═══ MAIN FORM CARD ═══ */
.main-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  flex: 1;
  position: relative;
}

/* ═══ STEP SCREEN VISIBILITY ═══ */
.step-screen {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.step-screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ═══ STEP 1 & 2 BALANCED STRUCTURED LAYOUT ═══ */
#stepPhone, #stepOtp {
  padding: 1.5rem 0.5rem 1.75rem;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#stepPhone.active, #stepOtp.active {
  display: flex !important;
}

#stepPhone .card-icon-header, #stepOtp .card-icon-header {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.15);
}

#stepPhone .screen-title, #stepOtp .screen-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

#stepPhone .screen-desc, #stepOtp .screen-desc {
  font-size: 13.5px;
  max-width: 440px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

#phoneForm, #otpForm {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

#stepPhone .form-group {
  margin-bottom: 1.25rem;
  text-align: right;
}

#btnSendOtp, #btnVerifyOtp {
  margin-top: 1rem;
}

.card-icon-header {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.header-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.card-icon-header i {
  font-size: 22px;
  color: var(--primary-dark);
}

.screen-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 4px;
}

.screen-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

/* ═══ FORM INPUTS & LABELS ═══ */
.form-group {
  margin-bottom: 0.85rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-label i {
  color: var(--primary-dark);
  margin-left: 5px;
}

.required-star {
  color: var(--rose-red);
  font-weight: 700;
}

.badge-optional {
  font-size: 11px;
  font-weight: 400;
  color: #8C7B94;
  margin-right: 4px;
}

.badge-readonly {
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-deep);
  padding: 2px 6px;
  border-radius: 6px;
  margin-right: 4px;
}

.form-control {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-main);
  transition: var(--transition);
  min-height: 40px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

select.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235D3B64' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
  background-size: 16px 16px !important;
  padding: 8px 14px 8px 38px !important;
  height: 40px !important;
  min-height: 40px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  text-align: right !important;
  direction: rtl !important;
  cursor: pointer;
}

select.form-control option {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  background: #ffffff !important;
  padding: 10px 14px !important;
  font-family: inherit !important;
}

select.form-control option:disabled {
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

.textarea-control {
  resize: vertical;
  min-height: 72px;
}

.readonly-input-wrapper {
  position: relative;
}

.readonly-control {
  background: #F5EEF7 !important;
  color: var(--primary-deep) !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
}

.readonly-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-size: 13px;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   CUSTOM SEARCHABLE SELECT TRIGGER
   ══════════════════════════════════════════════════════════════ */
.custom-searchable-select {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  min-height: 40px;
  height: 40px;
  user-select: none;
}

.custom-searchable-select:hover {
  border-color: var(--primary-color);
  background: #ffffff;
}

.select-selected-val {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

.select-search-icon {
  color: var(--primary-dark);
  font-size: 14px;
}

.select-selected-val .placeholder-txt {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 400;
}

.select-selected-val .active-val {
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 600;
}

.select-arrow {
  color: var(--text-muted);
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════
   SEARCHABLE CITY MODAL SHEET
   ══════════════════════════════════════════════════════════════ */
.city-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(22, 14, 28, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.city-modal-overlay.show {
  display: flex;
  opacity: 1;
}

.city-modal-card {
  width: 100%;
  max-width: 580px;
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem 1.25rem 2rem;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .city-modal-overlay {
    align-items: center;
  }
  .city-modal-card {
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }
}

.city-modal-overlay.show .city-modal-card {
  transform: translateY(0);
}

.city-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #F2E7F5;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-title-wrap i {
  color: var(--primary-dark);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: #F4EBF6;
  color: var(--text-main);
}

.city-search-box-wrapper {
  position: relative;
  margin-bottom: 0.85rem;
}

.city-search-input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 42px 12px 42px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  transition: var(--transition);
  min-height: 48px;
}

.city-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.city-search-box-wrapper .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-size: 15px;
}

.btn-clear-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.popular-cities-bar {
  margin-bottom: 0.85rem;
}

.pop-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.pop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pop-tag {
  background: #F6EFF7;
  border: 1px solid var(--border-color);
  color: var(--primary-deep);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.pop-tag:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.city-list-container {
  overflow-y: auto;
  flex: 1;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 4px;
  padding-bottom: 12px;
}

.city-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.city-option-item:hover {
  background: #F8F2F9;
  color: var(--primary-deep);
}

.city-option-item.selected {
  background: var(--primary-light);
  color: var(--primary-deep);
  font-weight: 700;
}

.city-option-item .check-icon {
  color: var(--primary-dark);
  font-size: 14px;
  opacity: 0;
}

.city-option-item.selected .check-icon {
  opacity: 1;
}

.no-cities-found {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 13px;
}

.city-option-item.selected {
  background: var(--primary-light);
  color: var(--primary-deep);
  font-weight: 700;
}

.city-option-item .check-icon {
  color: var(--primary-dark);
  font-size: 14px;
  opacity: 0;
}

.city-option-item.selected .check-icon {
  opacity: 1;
}

.no-cities-found {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════
   SAUDI PHONE INPUT WRAPPER (LEFT TO RIGHT / LTR REQUIREMENT)
   ══════════════════════════════════════════════════════════════ */
.saudi-phone-wrapper[dir="ltr"] {
  display: flex !important;
  direction: ltr !important;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  min-height: 40px;
}

.saudi-phone-wrapper[dir="ltr"]:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.saudi-phone-wrapper[dir="ltr"] .country-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F6EFF7;
  border-right: 1.5px solid var(--border-color);
  border-left: none;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  user-select: none;
  order: 1;
}

.flag-icon {
  font-size: 17px;
  line-height: 1;
}

.prefix-code {
  font-family: inherit;
  direction: ltr;
}

.saudi-phone-wrapper[dir="ltr"] .phone-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: monospace;
  color: var(--text-main);
  letter-spacing: 1px;
  direction: ltr !important;
  text-align: left !important;
  order: 2;
  min-height: 38px;
}

.saudi-phone-wrapper[dir="ltr"] .phone-input:focus {
  outline: none;
}

.phone-format-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-format-hint span {
  background: #F1E6F3;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  color: var(--primary-deep);
}

/* ═══ OTP INPUT SPECIFIC ═══ */
.target-phone-num {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
}

.demo-otp-banner {
  background: #FFFDF9;
  border: 1px dashed var(--amber-gold);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #92400e;
}

.demo-otp-banner strong {
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 2px;
}

.otp-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1.25rem 0 1rem;
}

.otp-box {
  width: 52px;
  height: 56px;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  background: var(--input-bg);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
  font-family: monospace;
  transition: var(--transition);
}

.otp-box:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

#resendTimerText {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  min-width: 155px;
  text-align: right;
}

.btn-text:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn-text:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ═══ BUTTONS ═══ */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  box-shadow: 0 6px 20px rgba(198, 168, 205, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(198, 168, 205, 0.55);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ═══ TICKET FORM GRID ═══ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
}

.ticket-header-strip {
  border-bottom: 1.5px solid #F1E6F3;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.ticket-header-strip .screen-title {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-header-strip .screen-desc {
  text-align: right;
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   UPGRADED "ADD PRODUCT" (المنتجات المتضررة) SECTION
   ══════════════════════════════════════════════════════════════ */
.damage-section {
  background: #FDF9FE;
  border: 1.5px dashed #DEC8E2;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

.damage-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 8px;
}

.damage-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--primary-border);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(93, 59, 100, 0.05);
}

.main-title-txt {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.sub-title-txt {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.items-count-badge {
  background: #ffffff;
  border: 1px solid var(--primary-border);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
}

.damage-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* PRODUCT CARD STYLING */
.damage-item-card {
  background: #ffffff;
  border: 1px solid #E8DDEB;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(93, 59, 100, 0.04);
  position: relative;
  animation: itemFadeIn 0.25s ease;
}

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

.damage-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #F4EBF6;
}

.item-index-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-remove-item {
  background: var(--rose-light);
  color: var(--rose-red);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}

.btn-remove-item:hover {
  background: var(--rose-red);
  color: #ffffff;
}

.item-fields-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 0.75rem;
}

/* MOBILE-FRIENDLY QUANTITY STEPPER WIDGET */
.qty-stepper {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 40px;
}

.qty-stepper:focus-within {
  border-color: var(--primary-color);
}

.qty-btn {
  width: 34px;
  height: 100%;
  background: #F4EBF6;
  border: none;
  color: var(--primary-deep);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  user-select: none;
}

.qty-btn:active {
  background: var(--primary-color);
  color: #ffffff;
}

.qty-input {
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  font-family: monospace;
  width: 100%;
  min-width: 0;
}

.qty-input:focus {
  outline: none;
}

.qty-max-limit-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-deep);
  text-align: center;
  margin-top: 4px;
}

/* UPLOAD ATTACHMENT CARD */
.file-upload-dropzone {
  border: 1.5px dashed #D6C2DB;
  background: #FDFBFE;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-dropzone:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.dropzone-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.dropzone-prompt i {
  font-size: 16px;
  color: var(--primary-dark);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.attachment-preview-strip {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 6px;
}

.attachment-preview-strip.show {
  display: flex;
}

.att-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.att-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.att-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.btn-remove-att {
  background: none;
  border: none;
  color: var(--rose-red);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
}

/* ENHANCED ADD PRODUCT BUTTON */
.add-item-action-wrapper {
  margin-top: 1rem;
}

.btn-add-item-enhanced {
  width: 100%;
  background: #ffffff;
  border: 2px dashed var(--primary-color);
  color: var(--primary-deep);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn-add-item-enhanced:hover {
  background: var(--primary-light);
  border-style: solid;
}

.btn-add-item-enhanced i {
  font-size: 18px;
  color: var(--primary-dark);
}

/* ══════════════════════════════════════════════════════════════
   INLINE FIELD ERROR MESSAGES (ARABIC, DIRECTLY UNDER FIELD)
   ══════════════════════════════════════════════════════════════ */
.field-error-msg {
  color: var(--rose-red);
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 5px;
}

.field-error-msg.show {
  display: flex;
  animation: fadeInDown 0.2s ease;
}

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

.field-error-msg i {
  font-size: 13px;
}

.field-error-msg.text-center {
  justify-content: center;
}

/* INVALID FIELD CONTROL HIGHLIGHT */
.form-control.input-has-error,
.custom-searchable-select.input-has-error,
.saudi-phone-wrapper.input-has-error,
.qty-stepper.input-has-error {
  border-color: var(--rose-red) !important;
  background: #FFF5F7 !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12) !important;
}

/* ═══ STEP 4: SUCCESS SCREEN ═══ */
.success-card-content {
  text-align: center;
}

.success-icon-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-green), #059669);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.3);
  animation: popSuccess 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popSuccess {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ticket-ref-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F4EBF6;
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.ref-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.ref-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-deep);
  font-family: monospace;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.chat-notice-card, .whatsapp-notice-card {
  background: var(--primary-light);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}

.chat-icon-circle, .whatsapp-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.notice-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-deep);
  line-height: 1.6;
}

.ticket-summary-box {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: right;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #EADEEC;
  font-size: 13px;
}

.summary-row:last-child {
  border-bottom: none;
}

.s-label {
  color: var(--text-muted);
  font-weight: 500;
}

.s-label i {
  color: var(--primary-dark);
  margin-left: 6px;
}

.s-val {
  font-weight: 700;
  color: var(--text-main);
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-secondary-outline {
  background: transparent !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-deep) !important;
  box-shadow: none !important;
}

.btn-secondary-outline:hover {
  background: var(--primary-light) !important;
}

/* ═══ FOOTER ═══ */
.customer-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 1.75rem;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (< 640px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .customer-container {
    padding: 1rem 0.75rem 2rem;
  }

  .main-card {
    padding: 1.35rem 1rem;
    border-radius: var(--radius-lg);
  }

  .brand-logo-container {
    width: 70px;
    height: 70px;
    border-radius: 20px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .stepper-wrapper {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1.25rem;
  }

  .step-counter {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .step-name {
    font-size: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .item-fields-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .otp-box {
    width: 48px;
    height: 52px;
    font-size: 20px;
    border-radius: 12px;
  }

  .whatsapp-notice-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .btn-primary {
    min-height: 48px;
    font-size: 15px;
  }
}

/* ══════════════════════════════════════════════════════════════
   CUSTOMER ORDERS SELECTION CARDS & ORDER PRODUCTS UI
   ══════════════════════════════════════════════════════════════ */
.customer-orders-section {
  margin-bottom: 1.5rem;
  background: #FDF9FE;
  border: 1px dashed var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.orders-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 1rem;
}

.orders-section-title i {
  color: var(--primary-dark);
  font-size: 16px;
}

.orders-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.order-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.order-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px var(--primary-light);
  transform: translateY(-2px);
}

.order-card.selected {
  border-color: var(--primary-dark);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-dark);
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.order-num-badge {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-deep);
  font-family: monospace;
}

.order-items-badge {
  font-size: 11px;
  font-weight: 600;
  background: #EFE4F3;
  color: var(--primary-deep);
  padding: 3px 8px;
  border-radius: 99px;
}

.order-thumbs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.order-thumb-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.order-products-quick-bar {
  background: #F7EFF8;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.quick-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-deep);
  display: block;
  margin-bottom: 8px;
}

.prod-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.prod-search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.prod-filter-input {
  width: 100%;
  height: 42px;
  min-height: 42px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 38px 8px 36px !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
  direction: rtl;
  text-align: right;
}

.prod-filter-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.prod-search-input-wrapper .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-size: 14px;
  pointer-events: none;
}

.btn-icon-prod-modal {
  width: 44px;
  height: 42px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-icon-prod-modal:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.prod-search-dropdown-list {
  margin-top: 8px;
  background: #ffffff;
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-damage-placeholder {
  border: 1.5px dashed var(--primary-border);
  background: #FDF9FE;
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.empty-damage-placeholder .placeholder-icon {
  font-size: 32px;
  color: var(--primary-dark);
  opacity: 0.7;
}

/* ═══ OBVIOUS CIRCULAR + ICON ADD BUTTON & SINGLE ROW MODAL ITEM ═══ */
.product-modal-list-container {
  overflow-y: auto;
  flex: 1;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
}

.prod-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FDF9FE;
  border: 1.5px solid #E8DDEB;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  gap: 12px;
  transition: var(--transition);
  width: 100%;
}

.clickable-prod-row {
  cursor: pointer !important;
  user-select: none;
}

.prod-modal-item:hover, .clickable-prod-row:hover {
  background: #F4E8F8;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(93, 59, 100, 0.08);
}

.add-row-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition);
  flex-shrink: 0;
}

.clickable-prod-row:hover .add-row-action {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.prod-modal-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.prod-modal-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid #E8DDEB;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.prod-modal-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.prod-modal-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.prod-modal-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-add-item-plus-only {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.btn-add-item-plus-only:hover {
  background: var(--primary-dark);
  transform: scale(1.12);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-add-item-plus-only:active {
  transform: scale(0.92);
}

/* ═══ ALWAYS AVAILABLE GENERAL TICKET ATTACHMENT DROPZONE ═══ */
.general-upload-dropzone {
  border: 1.5px dashed var(--primary-border);
  background: #FDFBFE;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.general-upload-dropzone:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.general-upload-dropzone .upload-icon {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.general-upload-dropzone span {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.general-upload-dropzone .file-types-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
   NEW CUSTOMER PORTAL FLOW: TOP BAR, ORDERS & CHAT STYLES
   ══════════════════════════════════════════════════════════════ */

/* Screen Top Navigation Bar */
.screen-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid #F1E6F3;
}

.btn-back-to-orders {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--primary-deep);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-back-to-orders:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.user-verified-chip {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.user-verified-chip.status-new { background: #fee2e2; border-color: rgba(239, 68, 68, .3); color: #dc2626; }
.user-verified-chip.status-open { background: #fef9c3; border-color: rgba(234, 179, 8, .35); color: #a16207; }
.user-verified-chip.status-processing, .user-verified-chip.status-waiting { background: #dbeafe; border-color: rgba(59, 130, 246, .3); color: #1d4ed8; }
.user-verified-chip.status-resolved { background: #d1fae5; border-color: rgba(16, 185, 129, .3); color: #059669; }
.user-verified-chip.status-closed { background: #ecfdf5; border-color: rgba(5, 150, 105, .3); color: #047857; }

/* Standalone Customer Orders Grid */
.customer-orders-wrapper {
  margin: 1rem 0;
}

.orders-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.orders-filter-bar .search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.orders-search-input {
  width: 100%;
  padding: 10px 38px 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  transition: var(--transition);
}

.orders-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.orders-filter-bar .search-icon {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-refresh-orders {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--primary-deep);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-refresh-orders:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: rotate(45deg);
}

.standalone-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.standalone-orders-grid .order-card {
  margin-bottom: 0;
}

.orders-loading-state,
.orders-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  background: #FDF9FE;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.orders-empty-state .empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.orders-empty-state h3 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.orders-screen-footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  justify-content: center;
}

/* Top Order Summary Card (Inside Ticket Detail) */
.order-summary-card-top {
  background: linear-gradient(135deg, #ffffff, #FDF7FE);
  border: 1.5px solid #E4D3E7;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(93, 59, 100, 0.04);
  position: relative;
}

.order-summary-card-top:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(198, 168, 205, 0.25);
}

.card-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.order-ref-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-order-num {
  background: var(--primary-deep);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.badge-ticket-ref {
  background: #F3E8F5;
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
}

.click-for-modal-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-top-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.summary-thumbs-row {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.summary-thumbs-row img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #E2D5E5;
  background: #ffffff;
}

.summary-info-grid {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.summary-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-info-item .info-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.summary-info-item .info-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.card-click-banner {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #EADEEC;
  font-size: 11.5px;
  color: var(--primary-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Customer Support Chat Card UI */
.customer-chat-card {
  background: #ffffff;
  border: 1px solid #E8DDEB;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(93, 59, 100, 0.05);
}

.chat-card-header {
  background: #FDF9FE;
  border-bottom: 1.5px solid #F1E6F3;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title i {
  font-size: 18px;
  color: var(--primary-dark);
}

.chat-header-title h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.chat-header-title p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  line-height: 1.2;
}

/* Customer Chat Notification Button & Prompt Banner */
.btn-customer-notif {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--primary-border);
  background: var(--primary-light);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-customer-notif:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-customer-notif.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #059669;
}

.customer-notif-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FBF8FD 0%, #F5ECF7 100%);
  border-bottom: 1.5px solid #F1E6F3;
  animation: fadeInDown 0.3s ease-out;
}

.notif-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-main);
}

.notif-banner-text i {
  font-size: 20px;
  color: var(--primary-dark);
  animation: ringBell 2.5s infinite ease-in-out;
}

.notif-banner-text strong {
  display: block;
  font-size: 12.5px;
  color: var(--primary-deep);
}

.notif-banner-text p {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.notif-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-banner-allow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 18px;
  background: var(--primary-deep);
  color: #ffffff;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-banner-allow:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-banner-dismiss {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-banner-dismiss:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--rose-red);
}

@keyframes ringBell {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-14deg); }
  50% { transform: rotate(0); }
}

.btn-refresh-chat {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--primary-deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}

.btn-refresh-chat:hover {
  background: var(--primary-light);
  transform: rotate(90deg);
}

.customer-chat-thread {
  height: 380px;
  overflow-y: auto;
  padding: 1.25rem;
  background: #FAF7FC;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-top-loader {
  text-align: center;
  padding: 8px 0;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--primary-dark);
}

.btn-load-older-msgs {
  background: var(--primary-light);
  color: var(--primary-deep);
  border: 1px solid var(--primary-border);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-load-older-msgs:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Chat Message Bubbles */
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-bubble-wrap.customer {
  align-self: flex-start;
}

.chat-bubble-wrap.support {
  align-self: flex-end;
}

.chat-bubble-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-bubble-wrap.customer .chat-bubble-sender {
  color: var(--primary-deep);
}

.chat-bubble-wrap.support .chat-bubble-sender {
  color: #047857;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

/* Compact padding for chat bubbles containing images */
.chat-bubble.has-image {
  padding: 4px;
  border-radius: 16px;
}

.chat-bubble.has-image:not(.image-only) {
  padding: 4px 4px 6px 4px;
}

.chat-bubble.has-image .chat-msg-text {
  padding: 6px 10px 4px 10px;
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-bubble-wrap.customer .chat-bubble {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #E8DDEB;
  border-top-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.chat-bubble-wrap.customer .chat-bubble.has-image {
  border-top-right-radius: 4px;
}

.chat-bubble-wrap.support .chat-bubble {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #ffffff;
  border-top-left-radius: 4px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.chat-bubble-wrap.support .chat-bubble.has-image {
  border-top-left-radius: 4px;
}

.chat-msg-time {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.8;
  display: block;
  text-align: left;
}

.chat-bubble-wrap.customer .chat-msg-time {
  color: var(--text-muted);
}

.chat-bubble-wrap.support .chat-msg-time {
  color: #F3E8F5;
}

.chat-bubble.has-image:not(.image-only) .chat-msg-time {
  padding: 0 8px 2px 8px;
}

/* Floating WhatsApp time pill for image-only bubbles */
.chat-bubble.has-image.image-only .chat-msg-time {
  position: absolute;
  bottom: 8px;
  left: 8px;
  margin-top: 0;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.52);
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4;
  pointer-events: none;
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Rectangular WhatsApp-Style Image Card & Centered Loading Indicator */
.chat-img-wrap {
  position: relative;
  width: 290px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 170px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #EAE2ED;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-img-wrap.loading-placeholder {
  cursor: default;
}

.chat-img-placeholder-bg {
  width: 100%;
  height: 100%;
  background: #E8DEEC;
}

.chat-img-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  z-index: 3;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.chat-img-loader .loader-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 22, 28, 0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.chat-img-wrap.loaded .chat-img-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chat-img-wrap.error .chat-img-loader {
  opacity: 1;
  visibility: visible;
}

.chat-img-wrap.error .loader-circle {
  background: rgba(220, 38, 38, 0.85);
}

.chat-img-attachment {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.25s ease;
}

.chat-img-wrap.loaded .chat-img-attachment {
  opacity: 1;
}

.chat-img-wrap:hover .chat-img-attachment {
  transform: scale(1.02);
}

/* Rectangular WhatsApp-Style Video Card */
.chat-img-wrap.chat-video-wrap {
  background: #0f0c13;
}

.chat-video-attachment {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: #000000;
}

.chat-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  z-index: 2;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-video-overlay:hover {
  background: rgba(0, 0, 0, 0.38);
}

.video-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 22, 28, 0.75);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 3px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.chat-video-wrap:hover .video-play-btn {
  transform: scale(1.08);
  background: rgba(18, 22, 28, 0.88);
}

.chat-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* Chat File Attachment (Documents/PDF) */
.chat-file-attachment {
  margin-top: 4px;
  font-size: 12.5px;
}

.chat-file-attachment a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.chat-bubble-wrap.customer .chat-file-attachment a {
  background: #F5EEF7;
  color: var(--primary-deep);
}

.chat-bubble-wrap.support .chat-file-attachment a {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Chat Composer Bar */
.chat-att-preview-strip {
  background: #FFF8FD;
  border-top: 1px solid #F1E6F3;
  padding: 8px 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.customer-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1.5px solid #F1E6F3;
  width: 100%;
}

.btn-chat-upload {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #F4EBF6;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-chat-upload:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.chat-input-control {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border-color);
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 14px;
  font-family: inherit;
  background: #FDFBFE;
  transition: var(--transition);
}

.chat-input-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-chat-send {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #ffffff;
  border: none;
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.chat-closed-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.15rem 1.5rem;
  background: #F8FAFC;
  border-top: 1.5px solid #E2E8F0;
  color: #64748B;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

.chat-closed-banner i {
  color: #94A3B8;
  font-size: 16px;
}

/* Responsive Mobile Chat Composer Enhancements */
@media (max-width: 640px) {
  .customer-chat-composer {
    padding: 0.65rem 0.75rem;
    gap: 6px;
  }

  .btn-chat-upload {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .chat-input-control {
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .btn-chat-send {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .btn-chat-send span {
    display: none !important;
  }

  .btn-chat-send i {
    font-size: 15px;
    margin: 0;
  }

  .customer-chat-thread {
    height: 340px;
    padding: 0.85rem;
  }

  .chat-bubble-wrap {
    max-width: 90%;
  }

  .chat-img-wrap {
    width: 240px;
    max-width: 100%;
    min-height: 150px;
  }
}

/* ═══ CHAT FILE UPLOAD LOADING BUBBLE ═══ */
.chat-upload-pending .chat-bubble-uploading {
  background: #ffffff;
  border: 1.5px dashed var(--primary-border);
  border-top-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  animation: uploadPulse 1.5s ease-in-out infinite;
}

@keyframes uploadPulse {
  0%   { border-color: var(--primary-border); box-shadow: 0 0 0 0 rgba(93,59,100,0.08); }
  50%  { border-color: var(--primary-color);  box-shadow: 0 0 0 4px rgba(93,59,100,0.06); }
  100% { border-color: var(--primary-border); box-shadow: 0 0 0 0 rgba(93,59,100,0.08); }
}

.upload-progress-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-spinner {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-dark);
  font-size: 13px;
}

.upload-status-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-deep);
  white-space: nowrap;
}

.upload-file-name {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  width: 100%;
}

/* Order Details Modal Sheet */
.order-details-modal-card {
  max-width: 620px;
  width: 92%;
}

.order-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.25rem;
}

.order-detail-section-block {
  margin-bottom: 1.25rem;
  background: #FDF9FE;
  border: 1px solid #F1E6F3;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.order-detail-section-block h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.modal-items-table th,
.modal-items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #EADEEC;
  text-align: right;
}

.modal-items-table th {
  background: #F4EBF6;
  color: var(--primary-deep);
  font-weight: 700;
}