/**
 * DIP LF - Estilos para el Panel Dedicado de Órdenes (ordenes.html)
 * Inspirado en la interfaz moderna gamer/dashboard de la referencia
 */

:root {
  --orders-bg-main: #09090d;
  --orders-bg-sidebar: #0f0f15;
  --orders-bg-card-grad: linear-gradient(135deg, #2b1354 0%, #1a0d36 100%);
  --orders-card-border: rgba(139, 92, 246, 0.28);
  --orders-card-hover: rgba(139, 92, 246, 0.45);
  --orders-accent-purple: #8b5cf6;
  --orders-accent-gold: #f59e0b;
  --orders-accent-green: #10b981;
  --orders-accent-blue: #3b82f6;
  --orders-text-primary: #ffffff;
  --orders-text-secondary: #94a3b8;
  --orders-text-muted: #64748b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.orders-body {
  background-color: var(--orders-bg-main);
  color: var(--orders-text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
}

/* =============================================================================
   1. LAYOUT PRINCIPAL: SIDEBAR + MAIN CONTENT
   ============================================================================= */
.orders-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.orders-sidebar {
  width: 90px;
  background-color: var(--orders-bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-brand {
  margin-bottom: 32px;
  text-decoration: none;
}

.brand-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--orders-accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease;
}

.brand-avatar:hover {
  transform: scale(1.08);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  align-items: center;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 72px;
  height: 64px;
  border-radius: 14px;
  color: var(--orders-text-secondary);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-nav-item .nav-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateY(-1px);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.35));
  color: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.3);
}

.sidebar-nav-item.active .nav-icon {
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
}

.sidebar-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

.sidebar-exit-btn {
  color: var(--orders-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  padding: 8px;
  transition: color 0.2s ease;
}

.sidebar-exit-btn:hover {
  color: #fff;
}

/* =============================================================================
   2. CONTENIDO PRINCIPAL: TOPBAR & LISTADO
   ============================================================================= */
.orders-main {
  flex: 1;
  padding: 32px 40px;
  max-width: 1400px;
  overflow-y: auto;
}

/* Topbar */
.orders-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topbar-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.orders-page-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.orders-results-count {
  font-size: 0.85rem;
  color: var(--orders-text-secondary);
  font-weight: 600;
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tasa BCV Pill */
.topbar-bcv-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 6px 14px;
}

.bcv-icon {
  font-size: 1.1rem;
}

.bcv-info {
  display: flex;
  flex-direction: column;
}

.bcv-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--orders-text-muted);
  letter-spacing: 0.5px;
}

.bcv-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fbbf24;
}

/* Perfil Pill */
.topbar-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 6px 14px;
}

.profile-avatar {
  font-size: 1.1rem;
}

.profile-meta {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
}

.profile-id {
  font-size: 0.7rem;
  color: var(--orders-text-muted);
}

.btn-back-store {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 30px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-back-store:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* =============================================================================
   3. BARRA DE FILTROS Y BÚSQUEDA
   ============================================================================= */
.orders-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-search-box {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.filter-search-box:focus-within {
  border-color: var(--orders-accent-purple);
}

.search-icon {
  font-size: 0.95rem;
  opacity: 0.6;
}

.orders-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.88rem;
}

.orders-search-input::placeholder {
  color: var(--orders-text-muted);
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--orders-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orders-text-muted);
}

.orders-filter-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.orders-filter-select:focus {
  border-color: var(--orders-accent-purple);
}

.orders-filter-select option {
  background: #18181f;
  color: #ffffff;
}

.btn-refresh-orders {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--orders-text-secondary);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh-orders:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* =============================================================================
   4. TARJETAS DE ÓRDENES (Estilo de la imagen de referencia)
   ============================================================================= */
.orders-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card Individual Horizontal (Morado por defecto para todos los demás estados: En Preparación, Listo Entrega, Entregado, etc.) */
.order-card-row {
  background: var(--orders-bg-card-grad);
  border: 1px solid var(--orders-card-border);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.order-card-row:hover {
  border-color: var(--orders-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.18);
}

/* Borde indicador izquierdo (Morado por defecto) */
.order-card-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--orders-accent-purple);
  opacity: 0.9;
}

/* =============================================================================
   ESTADOS CON COLOR DEDICADO:
   1. Pagado y Confirmado -> Verde
   2. Pendiente de Pago -> Amarillo
   3. Cancelado -> Rojo
   4. Todos los demás -> Morado (por defecto arriba)
   ============================================================================= */

/* 1. PAGADO Y CONFIRMADO (VERDE) */
.order-card-row.status-pagado {
  background: linear-gradient(135deg, #093b2a 0%, #041c14 100%);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(16, 185, 129, 0.18);
}
.order-card-row.status-pagado:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(16, 185, 129, 0.25);
}
.order-card-row.status-pagado::before {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.order-card-row.status-pagado .order-card-icon-box {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
}

/* 2. PENDIENTE DE PAGO (AMARILLO) */
.order-card-row.status-pendiente,
.order-card-row.status-nuevo {
  background: linear-gradient(135deg, #3d2b06 0%, #1c1302 100%);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(245, 158, 11, 0.18);
}
.order-card-row.status-pendiente:hover,
.order-card-row.status-nuevo:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 158, 11, 0.25);
}
.order-card-row.status-pendiente::before,
.order-card-row.status-nuevo::before {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.order-card-row.status-pendiente .order-card-icon-box,
.order-card-row.status-nuevo .order-card-icon-box {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
}

/* 3. CANCELADO (ROJO) */
.order-card-row.status-cancelado {
  background: linear-gradient(135deg, #421014 0%, #200609 100%);
  border-color: rgba(239, 68, 68, 0.38);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(239, 68, 68, 0.18);
}
.order-card-row.status-cancelado:hover {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(239, 68, 68, 0.25);
}
.order-card-row.status-cancelado::before {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}
.order-card-row.status-cancelado .order-card-icon-box {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.3);
}

/* 4. DEMÁS ESTADOS (EN PREPARACIÓN, LISTO ENTREGA, ENTREGADO - MORADO COMO ESTÁ YA) */
.order-card-row.status-en_preparacion,
.order-card-row.status-listo_entrega,
.order-card-row.status-entregado {
  background: var(--orders-bg-card-grad);
  border-color: var(--orders-card-border);
}
.order-card-row.status-en_preparacion::before,
.order-card-row.status-listo_entrega::before,
.order-card-row.status-entregado::before {
  background: var(--orders-accent-purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* Lado Izquierdo: Icono + Título del Pedido */
.order-card-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 260px;
  max-width: 380px;
}

.order-card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.order-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

/* Badge de Estado bajo el título */
.order-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  width: fit-content;
}

.order-status-pill.pagado {
  color: #34d399;
}

.order-status-pill.en_preparacion {
  color: #60a5fa;
}

.order-status-pill.listo_entrega {
  color: #c084fc;
}

.order-status-pill.entregado {
  color: #4ade80;
}

.order-status-pill.pendiente,
.order-status-pill.nuevo {
  color: #fbbf24;
}

.order-status-pill.cancelado {
  color: #f87171;
}

.status-dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Centro: Columnas de Metadatos */
.order-card-mid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.order-meta-columns {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orders-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #e2e8f0;
}

.meta-val.order-num {
  color: #fbbf24;
  cursor: pointer;
}

.meta-val.order-num:hover {
  text-decoration: underline;
}

.order-card-subdesc {
  font-size: 0.78rem;
  color: var(--orders-text-secondary);
  line-height: 1.4;
  max-width: 580px;
}

/* Lado Derecho: Precios & Botones de Acción */
.order-card-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.order-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-bs-small {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
}

.price-usd-main {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.price-usd-main sup {
  font-size: 0.95rem;
  font-weight: 700;
  top: -0.35em;
}

.order-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Botón de WhatsApp Icono Dedicado */
.btn-order-whatsapp-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  flex-shrink: 0;
}

.btn-order-whatsapp-icon:hover {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}

.btn-order-whatsapp-icon svg {
  display: block;
}

/* Botón de Estado / Ver Guía */
.btn-order-action {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 95px;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-order-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Estados de carga y vacío */
.orders-loading-state,
.orders-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.orders-spinner {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.orders-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 14px;
}

.orders-empty-state h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.orders-empty-state p {
  color: var(--orders-text-muted);
  font-size: 0.92rem;
  max-width: 480px;
  margin: 0 auto 20px;
}

/* =============================================================================
   5. MODAL DE DETALLES Y STEPPER
   ============================================================================= */
.order-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.order-modal-dialog {
  background: #14141c;
  border: 1px solid var(--orders-card-border);
  border-radius: 22px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.15);
  animation: slideUp 0.25s ease-out;
}

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

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

.order-modal-header {
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-pretitle {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--orders-accent-purple);
  letter-spacing: 0.5px;
}

.modal-order-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fbbf24;
  margin-top: 2px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.order-modal-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Stepper en el Modal */
.modal-stepper-wrap {
  position: relative;
  padding: 18px 8px 10px;
}

.stepper-progress-bar {
  position: absolute;
  top: 34px;
  left: 10%;
  right: 10%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.stepper-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  width: 0%;
  transition: width 0.4s ease;
}

.modal-stepper-steps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.modal-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #23232d;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}

.modal-step.completed .modal-step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #000;
}

.modal-step.current .modal-step-circle {
  background: #f59e0b;
  border-color: #fde047;
  color: #000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  transform: scale(1.15);
}

.modal-step-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #cbd5e1;
}

.modal-step.current .modal-step-title {
  color: #fbbf24;
}

.modal-step-sub {
  font-size: 0.68rem;
  color: var(--orders-text-muted);
}

/* Grids y Tablas del Modal */
.modal-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-info-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
}

.modal-info-box h4 {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--orders-accent-purple);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.modal-info-box p {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.modal-info-box p strong {
  color: var(--orders-text-muted);
}

.modal-items-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
}

.modal-items-section h4 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-totals-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-totals-right {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.modal-total-usd {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fbbf24;
}

.modal-total-bs {
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
}

.order-modal-footer {
  padding: 18px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
}

.btn-modal-whatsapp {
  flex: 2;
  background: #25d366;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-modal-whatsapp:hover {
  background: #22c55e;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

.btn-modal-close-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  border-radius: 12px;
  padding: 13px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-modal-close-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Toast */
.orders-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #f59e0b;
  color: #000;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  transition: all 0.3s ease;
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
}

.orders-toast.active {
  transform: translateY(0);
  opacity: 1;
}

/* =============================================================================
   6. RESPONSIVE MÓVIL (Smartphones y Pantallas Pequeñas)
   ============================================================================= */
@media (max-width: 960px) {
  .orders-layout {
    flex-direction: column;
  }

  .orders-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 20px;
  }

  .sidebar-brand {
    margin-bottom: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    width: auto;
    gap: 10px;
  }

  .sidebar-nav-item {
    width: 54px;
    height: 50px;
    font-size: 0.65rem;
  }

  .sidebar-footer {
    display: none;
  }

  .orders-main {
    padding: 20px 16px;
  }

  .order-card-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  .order-card-left {
    min-width: unset;
    max-width: unset;
  }

  .order-card-right {
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .modal-details-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   CHAT EN VIVO DE ATENCIÓN AL CLIENTE (Estilos Gourmet DIP LF)
   ============================================================================= */
.btn-order-chat-direct {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-order-chat-direct:hover {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #a78bfa;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
}

/* Distintivo Rojo de Notificación de Mensajes no Leídos */
.chat-unread-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.85), 0 2px 5px rgba(0, 0, 0, 0.5);
  border: 2px solid #09090d;
  animation: chatBadgePulse 1.8s infinite ease-in-out;
  z-index: 3;
  pointer-events: none;
}

@keyframes chatBadgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 15px rgba(239, 68, 68, 1);
  }
}

.btn-modal-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
}

.chat-modal-dialog {
  background: #11121a;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  width: 95%;
  max-width: 480px;
  height: 80vh;
  max-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.2);
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #181926;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  border: 1.5px solid var(--orders-accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.chat-header-status {
  font-size: 0.65rem;
  font-weight: 900;
  color: #10b981;
  letter-spacing: 0.5px;
}

.chat-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.chat-modal-subtitle {
  font-size: 0.75rem;
  color: var(--orders-accent-gold);
  font-weight: 600;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #09090d;
}

.chat-empty-hint {
  margin: auto;
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.chat-bubble-row {
  display: flex;
  width: 100%;
}

.chat-bubble-row.bubble-right {
  justify-content: flex-end;
}

.chat-bubble-row.bubble-left {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bubble-customer {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.bubble-admin {
  background: #1e202e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}

.chat-sender-name {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--orders-accent-gold);
  text-transform: uppercase;
}

.chat-bubble-text {
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble-time {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.6);
  align-self: flex-end;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #181926;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-field {
  flex: 1;
  background: #0e0f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input-field:focus {
  border-color: #8b5cf6;
}

.btn-send-chat {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #8b5cf6;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-send-chat:hover:not(:disabled) {
  background: #7c3aed;
  transform: scale(1.08);
}

.btn-send-chat:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

