/* ===========================
   RESET Y BASE
=========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background-color: #f0f2f5;
  color: #1a1a2e;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: #FFD700;
  margin-bottom: 4px;
}

.sidebar-logo span {
  color: #ffffff;
}

.sidebar-sub {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 32px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #ccc;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #FFD700;
}

.nav-btn.active {
  background: linear-gradient(90deg, #FFD700, #ffc107);
  color: #1a1a2e;
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-volver {
  display: block;
  background: rgba(255,255,255,0.06);
  color: #ccc;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s;
  text-align: center;
}

.btn-volver:hover {
  background: rgba(255,255,255,0.12);
  color: #FFD700;
}

/* ===========================
   CONTENIDO PRINCIPAL
=========================== */
.main-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ===========================
   TOPBAR
=========================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.topbar h1 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #1a1a2e;
}

.topbar-sub {
  font-size: 0.82rem;
  color: #999;
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===========================
   NOTIFICACIONES
=========================== */
.notif-wrap {
  position: relative;
}

.btn-notif {
  background: #f0f2f5;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-notif:hover {
  background: #e4e6ea;
}

.notif-badge {
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  width: 300px;
  z-index: 999;
  overflow: hidden;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.notif-header strong {
  font-size: 0.95rem;
  color: #1a1a2e;
}

.notif-header button {
  background: none;
  border: none;
  color: #e53935;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}

.notif-dropdown ul {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
}

.notif-dropdown ul li {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f9f9f9;
  color: #333;
  line-height: 1.4;
}

.notif-dropdown ul li:last-child {
  border-bottom: none;
}

.notif-empty {
  color: #aaa !important;
  text-align: center;
  padding: 20px !important;
}

.notif-new {
  background: #fffde7;
  border-left: 3px solid #FFD700 !important;
}

/* ===========================
   BOTÓN SIMULAR PEDIDO
=========================== */
.btn-simular {
  background: linear-gradient(90deg, #e53935, #ff6f00);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-simular:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ===========================
   SECCIONES PANEL
=========================== */
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-section.hidden {
  display: none;
}

/* ===========================
   CARDS ESTADÍSTICAS
=========================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.stat-info p {
  font-size: 0.82rem;
  color: #888;
  font-weight: 600;
}

.stat-info h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-top: 2px;
}

/* ===========================
   PANEL BOX
=========================== */
.panel-box {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.panel-box h3 {
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.panel-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-box-header h3 {
  margin-bottom: 0;
}

.total-tag {
  background: #f0f2f5;
  color: #555;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ===========================
   TABLAS
=========================== */
table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: #f8f9fb;
}

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #333;
  border-bottom: 1px solid #f4f4f6;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #fafafa;
}

/* ===========================
   BADGES
=========================== */
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-green {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-yellow {
  background: #fff8e1;
  color: #f57c00;
}

.badge-red {
  background: #fce4ec;
  color: #c62828;
}

.badge-blue {
  background: #e3f2fd;
  color: #1565c0;
}

/* ===========================
   INPUTS PRECIO Y DESCUENTO
=========================== */
.precio-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-precio,
.input-dcto {
  padding: 7px 10px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  width: 110px;
  outline: none;
  transition: border 0.2s;
}

.input-precio:focus,
.input-dcto:focus {
  border-color: #1a1a2e;
}

.input-dcto {
  width: 80px;
}

.btn-save-precio {
  background: #1a1a2e;
  color: #FFD700;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-save-precio:hover {
  background: #2d2d5e;
}

/* ===========================
   BOTÓN AGREGAR PRODUCTO
=========================== */
.btn-agregar {
  background: linear-gradient(90deg, #1a1a2e, #2d2d5e);
  color: #FFD700;
  border: none;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-agregar:hover {
  opacity: 0.9;
}

/* ===========================
   DESCUENTO GLOBAL
=========================== */
.dcto-global-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.dcto-global-wrap h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 12px;
}

.dcto-global-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dcto-global-row input {
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  width: 140px;
  outline: none;
  transition: border 0.2s;
}

.dcto-global-row input:focus {
  border-color: #1a1a2e;
}

/* ===========================
   TOAST DASHBOARD
=========================== */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a2e;
  color: #FFD700;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: opacity 0.3s;
}

.dash-toast.hidden {
  display: none;
}

/* ===========================
   HIDDEN
=========================== */
.hidden {
  display: none !important;
}

/* ===========================
   SCROLLBAR PERSONALIZADO
=========================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
  }

  .sidebar-sub {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 12px;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 14px;
  }

  th, td {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .precio-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-precio {
    width: 100%;
  }

  .notif-dropdown {
    width: 260px;
  }

  .dcto-global-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dcto-global-row input {
    width: 100%;
  }

  .panel-box { overflow-x: auto; }
  .panel-box > table { min-width: 650px; }
  .modal-content { width: 100% !important; margin: 0; }
  .modal-body { max-height: 74vh !important; }
  #modalPedidoDetalle [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  #modalPedidoDetalle [style*="display: flex"] { flex-wrap: wrap; }
}

/* ===========================
   MODAL INLINE AGREGAR PRODUCTO
=========================== */
.modal-inline {
  background: #fff;
  border-radius: 14px;
  border: 2px solid #e0e0e0;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  animation: slideDown 0.2s ease;
}

.modal-inline.hidden {
  display: none !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-inline-content h4 {
  font-size: 1rem;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 16px;
}

/* ===========================
   GRID FORMULARIO
=========================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  color: #1a1a2e;
  outline: none;
  transition: border 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.form-grid input:focus {
  border-color: #1a1a2e;
}

.form-grid input::placeholder {
  color: #bbb;
  font-size: 0.82rem;
}

/* ===========================
   BOTONES FORMULARIO
=========================== */
.modal-inline-btns {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-cancelar {
  background: #f0f2f5;
  color: #555;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancelar:hover {
  background: #e0e0e0;
  color: #1a1a2e;
}

/* ===========================
   SELECT ESTADO PEDIDO
=========================== */
.select-estado {
  padding: 6px 10px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1a2e;
  outline: none;
  cursor: pointer;
  transition: border 0.2s;
  margin-right: 6px;
  background: #fff;
}

.select-estado:focus {
  border-color: #1a1a2e;
}

/* ===========================
   BOTÓN ELIMINAR PRODUCTO
=========================== */
.btn-eliminar-prod {
  background: #fce4ec !important;
  color: #c62828 !important;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-eliminar-prod:hover {
  background: #e53935 !important;
  color: #fff !important;
}

/* ===========================
   RESPONSIVE NUEVOS ELEMENTOS
=========================== */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-inline-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-inline-btns button {
    width: 100%;
    text-align: center;
  }

  .select-estado {
    width: 100%;
    margin-right: 0;
    margin-bottom: 6px;
  }
}

/* ===========================
   MODAL DE DETALLES DEL PEDIDO
=========================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 46, 0.6); /* Color de marca #1a1a2e con opacidad */
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: modalFadeIn 0.25s ease forwards;
}

.modal-content {
  background: white;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===========================
   BOTÓN VER DETALLE
=========================== */
.btn-ver-detalle {
  background: #667eea;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ver-detalle:hover {
  background: #5a6fd6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.btn-ver-detalle:active {
  transform: translateY(0);
}

/* Sub-estilos de modal de detalles */
#modalPedidoDetalle .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

#modalPedidoDetalle .btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

#modalPedidoDetalle .modal-body {
  padding: 20px;
}

#modalPedidoDetalle .modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.file-input-label { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 9px 12px; color: #334155; font-weight: 700; font-size: .85rem; }
.file-input-label span { color: #c62828; font-size: .75rem; }
.file-input-label input { border: 0; padding: 6px 0 0; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.product-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f1f5f9; flex: 0 0 auto; }
.product-thumb-empty { display: grid; place-items: center; font-size: .66rem; color: #64748b; text-align: center; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 18px 0 26px; }
.btn-editar-prod { border: 0; background: #e3f2fd; color: #1565c0; border-radius: 8px; padding: 6px 12px; font: inherit; font-weight: 800; cursor: pointer; margin-right: 6px; }
.chart-card { min-height: 290px; padding: 16px; border: 1px solid #eef0f5; border-radius: 12px; }
.chart-card canvas { max-height: 240px; }
.stock-list { list-style: none; display: grid; gap: 8px; padding: 0; }
.stock-list li { display: flex; justify-content: space-between; padding: 10px 12px; background: #fff5f5; border-radius: 8px; }
.stock-list span { color: #c62828; font-weight: 800; }
@media (max-width: 600px) { .charts-grid { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .sidebar-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .dash-menu-btn { display: block; border: 0; background: #ffd700; color: #1a1a2e; border-radius: 8px; padding: 8px 11px; font-size: 1rem; font-weight: 900; }
  .sidebar-nav { display: none; width: 100%; flex-direction: column; gap: 6px; }
  .sidebar.menu-open .sidebar-nav { display: flex; }
  .sidebar:not(.menu-open) .sidebar-footer { display: none; }
}

@media (min-width: 901px) { .dash-menu-btn { display: none; } }

.sidebar-volver { margin-top: 10px; }
@media (max-width: 900px) {
  .sidebar.menu-open .sidebar-volver { display: block; width: 100%; }
  .sidebar:not(.menu-open) .sidebar-volver { display: none; }
}

/* ── Actualización visual del panel de administración ───────── */
.sidebar { background: #1e2d4a; }.sidebar-sub { color: rgba(255,255,255,.5); }.nav-btn { color: rgba(255,255,255,.75); font-size: 15px; padding: 12px 20px; }.nav-btn.active { background: #f5c518; color: #1a1a1a; font-weight: 800; border-left: 4px solid #e6b800; }.btn-volver { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.3); }.btn-volver:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-simular { background: #1e2d4a; color: #fff; }.btn-simular:hover { background: #2a4068; }.topbar-actions { flex-direction: row; }.notif-badge { position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; min-width: 12px; font-size: 8px; }
.sidebar-footer { display: grid; gap: 10px; }.btn-logout { width: 100%; padding: 10px 14px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 8px; background: transparent; color: #fff; font: inherit; cursor: pointer; }.btn-logout:hover { background: rgba(255,255,255,.1); }
.stat-card { border-left: 4px solid transparent; border-radius: 14px; transition: transform .15s ease, box-shadow .15s ease; }.stat-card:hover { transform: translateY(-2px); }.stat-pedidos { border-left-color: #3b82f6; }.stat-ingresos { border-left-color: #10b981; }.stat-stock { border-left-color: #f59e0b; }.stat-ofertas { border-left-color: #ef4444; }.stat-ticket { border-left-color: #8b5cf6; max-width: 280px; }.stat-icon { width: 44px; height: 44px; border-radius: 50%; background: #f0f4ff !important; font-size: 20px; }.stat-info p { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; }.stat-info h2 { font-size: 28px; font-weight: 800; color: #1a1a1a; }
.panel-box { overflow-x: auto; }.panel-box table { min-width: 750px; } thead tr { background: #f3f4f6; } th { padding: 12px 16px; font-size: 11px; color: #6b7280; } td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; } tbody tr:nth-child(even) { background: #f9fafb; } tbody tr:nth-child(odd) { background: #fff; } tbody tr:hover { background: #eff6ff; }
.badge { border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }.badge-blue { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }.badge-yellow { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }.badge-green { background: #dcfce7; color: #166534; border: 1px solid #86efac; }.badge-red { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.filtros-pedidos { display: flex; gap: 12px; margin-bottom: 16px; }.filtros-pedidos select, .filtros-pedidos input { border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; }.btn-agregar { background: #1e2d4a; color: #fff; }.btn-editar-prod { background: #f0f4ff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 6px; }.btn-eliminar-prod { background: #fff0f0 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; border-radius: 6px; }.product-thumb { width: 48px; height: 48px; border-radius: 8px; }.product-thumb-empty { font-size: 1.2rem; }.product-thumb-upload { cursor: pointer; }.product-photo-input { display: none; }.input-precio { font-variant-numeric: tabular-nums; }.input-dcto { padding-right: 28px; }.btn-apply-dcto { background: #16a34a; color: #fff; }.stock-list li { border-left: 4px solid #ef4444; }.stock-list span { color: #dc2626; }.report-kpis { margin-bottom: 12px; }.charts-grid { clear: both; }
@media (max-width: 767px) {
  .layout { display: block; }.sidebar { position: fixed; z-index: 1000; inset: 0 auto 0 0; width: 240px; height: 100vh; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; padding: 24px 16px; }.sidebar.menu-open { transform: translateX(0); }.sidebar.menu-open::after { content: ''; position: fixed; inset: 0 0 0 240px; width: 100vw; background: rgba(0,0,0,.45); z-index: -1; }.sidebar-nav { display: flex; flex-direction: column; }.sidebar-footer { display: block !important; }.dash-menu-btn { display: block; }.main-content { padding: 12px; }.topbar { flex-direction: row; padding: 14px; }.topbar-actions { width: auto; }.cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.stat-card { padding: 12px; gap: 10px; }.stat-info h2 { font-size: 20px; }.stat-info p { font-size: 10px; }.filtros-pedidos { flex-direction: column; }.filtros-pedidos input, .filtros-pedidos select { width: 100%; }
}

/* Menú lateral móvil */
.dashboard-mobile-menu-btn, .dashboard-menu-backdrop { display: none; }
@media (max-width: 767px) {
  .dashboard-mobile-menu-btn { display: grid; gap: 4px; position: fixed; top: 16px; left: 16px; z-index: 1102; width: 44px; height: 44px; place-content: center; border: 0; border-radius: 14px; background: #1e2d4a; box-shadow: 0 8px 24px rgba(16,24,40,.22); cursor: pointer; transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
  .dashboard-mobile-menu-btn span { display: block; width: 20px; height: 2px; border-radius: 999px; background: #fff; transition: transform .28s ease, opacity .2s ease; }
  .dashboard-mobile-menu-btn:active { transform: scale(.92); }
  .dashboard-menu-backdrop { position: fixed; inset: 0; z-index: 1099; border: 0; background: rgba(15,23,42,0); opacity: 0; pointer-events: none; transition: background .3s ease, opacity .3s ease; }
  .dashboard-menu-open { overflow: hidden; }
  .dashboard-menu-open .dashboard-menu-backdrop { display: block; opacity: 1; pointer-events: auto; background: rgba(15,23,42,.52); backdrop-filter: blur(2px); }
  .sidebar { z-index: 1100; width: min(82vw, 300px); padding: 24px 18px; transform: translateX(-110%); transition: transform .38s cubic-bezier(.22,1,.36,1), box-shadow .38s ease; box-shadow: none; }
  .sidebar.menu-open { transform: translateX(0); box-shadow: 18px 0 42px rgba(15,23,42,.25); }
  .sidebar.menu-open::after { display: none; }
  .sidebar .dash-menu-btn { display: none; }
  .sidebar-nav { display: flex !important; opacity: 0; transform: translateX(-12px); transition: opacity .24s ease .12s, transform .32s cubic-bezier(.22,1,.36,1) .12s; }
  .sidebar.menu-open .sidebar-nav { opacity: 1; transform: translateX(0); }
  .sidebar-nav .nav-btn { opacity: 0; transform: translateX(-10px); transition: opacity .22s ease, transform .28s ease; }
  .sidebar.menu-open .sidebar-nav .nav-btn { opacity: 1; transform: translateX(0); }
  .sidebar.menu-open .sidebar-nav .nav-btn:nth-child(1) { transition-delay: .16s; }.sidebar.menu-open .sidebar-nav .nav-btn:nth-child(2) { transition-delay: .20s; }.sidebar.menu-open .sidebar-nav .nav-btn:nth-child(3) { transition-delay: .24s; }.sidebar.menu-open .sidebar-nav .nav-btn:nth-child(4) { transition-delay: .28s; }.sidebar.menu-open .sidebar-nav .nav-btn:nth-child(5) { transition-delay: .32s; }.sidebar.menu-open .sidebar-nav .nav-btn:nth-child(6) { transition-delay: .36s; }
  .sidebar-footer, .sidebar-volver { opacity: 0; transform: translateY(10px); transition: opacity .22s ease .3s, transform .28s ease .3s; }
  .sidebar.menu-open .sidebar-footer, .sidebar.menu-open .sidebar-volver { opacity: 1; transform: translateY(0); }
  .dashboard-menu-open .dashboard-mobile-menu-btn { background: #f5c518; box-shadow: none; }
  .dashboard-menu-open .dashboard-mobile-menu-btn span { background: #1e2d4a; }
  .dashboard-menu-open .dashboard-mobile-menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .dashboard-menu-open .dashboard-mobile-menu-btn span:nth-child(2) { opacity: 0; transform: scaleX(.3); }
  .dashboard-menu-open .dashboard-mobile-menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .topbar { padding-left: 68px; }
}

.email-config-help { color: #64748b; line-height: 1.5; margin: -4px 0 18px; max-width: 780px; }
.email-config-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.4fr) repeat(3, auto) auto; align-items: center; gap: 10px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f8fafc; margin-bottom: 18px; }
.email-config-form input[type="text"], .email-config-form input[type="email"] { min-width: 0; padding: 10px 12px; border: 1.5px solid #dbe2ea; border-radius: 8px; font: inherit; }
.email-config-form label { white-space: nowrap; color: #334155; font-size: .88rem; font-weight: 700; }
.email-config-form input[type="checkbox"] { accent-color: #1e2d4a; }
.email-config-table-wrap { overflow-x: auto; }
.email-delivery-types { display: flex; flex-wrap: wrap; gap: 5px; }
.email-delivery-types span { background: #eaf0ff; color: #1e40af; padding: 3px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.btn-email-delete { border: 1px solid #fecaca; background: #fff1f2; color: #be123c; padding: 6px 10px; border-radius: 7px; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.user-confirm-dialog { text-align:center; max-width:440px; }.user-confirm-dialog .modal-header { text-align:left; }.user-confirm-symbol { display:grid; place-items:center; width:54px; height:54px; margin:4px auto 14px; border-radius:50%; background:#fff1f2; color:#be123c; border:1px solid #fecdd3; font-size:1.55rem; font-weight:900; }.user-confirm-dialog > p { max-width:350px; margin:0 auto 20px; color:#475569; line-height:1.55; }.btn-danger { border:1px solid #be123c; border-radius:9px; background:#be123c; color:#fff; padding:10px 15px; font:inherit; font-weight:900; cursor:pointer; }.btn-danger:hover { background:#9f1239; }.user-confirm-dialog .modal-btns-row { justify-content:center; }
@media (max-width: 1050px) { .email-config-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .email-config-form { grid-template-columns: 1fr; } .email-config-form .btn-agregar { width: 100%; } }

.report-intro { color: #64748b; margin: -4px 0 18px; }
.report-definition { margin: 4px 0 20px; padding: 11px 14px; border-left: 4px solid #3b82f6; border-radius: 0 8px 8px 0; background: #eff6ff; color: #334155; font-size: .88rem; }
.chart-card-wide { grid-column: 1 / -1; }
.chart-card-wide canvas { max-height: 260px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }.settings-card { padding: 18px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f8fafc; }.settings-card h4, .settings-subtitle { color: #1e2d4a; margin-bottom: 8px; }.settings-card p { color: #64748b; font-size: .87rem; line-height: 1.45; margin-bottom: 14px; }.settings-form { display: grid; gap: 9px; }.settings-form input, .settings-form textarea, .settings-form select { width: 100%; padding: 10px 12px; border: 1.5px solid #dbe2ea; border-radius: 8px; font: inherit; }.settings-form textarea { min-height: 72px; resize: vertical; }.settings-subtitle { border-top: 1px solid #e5e7eb; padding-top: 22px; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr; } }
.report-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }.report-filters input, .report-filters select { min-width: 145px; padding: 9px 10px; border: 1.5px solid #dbe2ea; border-radius: 8px; font: inherit; }.audit-list { display: grid; gap: 8px; list-style: none; padding: 0; }.audit-list li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; font-size: .88rem; }.audit-list span { color: #64748b; }

/* Vista organizada de Ajustes */
#ajustes .panel-box { max-width: 1240px; overflow: visible; }
#ajustes .panel-box-header { align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid #e8edf3; margin-bottom: 0; }
.settings-lead { color: #64748b; max-width: 690px; line-height: 1.55; margin: 14px 0 22px; }
.settings-kicker { display: inline-block; color: #2563eb; font-size: .69rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.settings-status { display: inline-flex; align-items: center; gap: 6px; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; border-radius: 999px; padding: 6px 10px; font-size: .76rem; font-weight: 800; }
.settings-grid { align-items: start; gap: 20px; margin-bottom: 20px; }
.settings-card { position: relative; padding: 22px; border: 1px solid #e3e9f1; border-radius: 16px; background: linear-gradient(145deg,#fff,#f8fafc); box-shadow: 0 5px 18px rgba(15,23,42,.04); }
.settings-card h4 { font-size: 1rem; margin: 0 0 6px; }.settings-card p { margin-bottom: 18px; }
.settings-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }.settings-form textarea, .settings-form button { grid-column: 1 / -1; }.settings-form input, .settings-form textarea, .settings-form select { background: #fff; border-color: #d9e2ee; min-height: 42px; }.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.settings-form .btn-agregar { justify-self: start; margin-top: 4px; }.settings-subtitle { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; font-size: 1rem; }.settings-subtitle::before { content: ''; width: 4px; height: 22px; border-radius: 99px; background: #f5c518; }
#ajustes .email-config-table-wrap, #ajustes .audit-list { border: 1px solid #e3e9f1; border-radius: 14px; background: #fff; padding: 6px; }.email-config-help { margin: 0 0 14px; }
@media (max-width: 700px) { .settings-form { grid-template-columns: 1fr; }.settings-form textarea, .settings-form button { grid-column: auto; }.settings-form .btn-agregar { width: 100%; }.settings-status { display: none; }.settings-card { padding: 16px; } }

/* Combos */
.combos-panel { max-width: 1240px; }.combos-lead { max-width: 690px; margin: 6px 0 0; color: #64748b; line-height: 1.5; font-size: .9rem; }.combo-form-card { margin: 20px 0 28px; padding: 20px; border: 1px solid #dce5f0; border-radius: 16px; background: linear-gradient(145deg,#fbfdff,#f4f8ff); }.combo-components-head, .combos-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }.combo-components-head h4, .combos-list-head h4 { margin: 0; color: #1e2d4a; }.combo-components-head p { margin: 4px 0 0; color: #64748b; font-size: .82rem; }.combo-components { display: grid; gap: 8px; margin-bottom: 16px; }.combo-component-row { display: grid; grid-template-columns: minmax(0,1fr) 100px 38px; gap: 8px; align-items: center; }.combo-component-row select, .combo-component-row input { min-width: 0; padding: 10px 12px; border: 1.5px solid #d9e2ee; border-radius: 8px; background: #fff; font: inherit; }.combo-remove { height: 40px; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #be123c; font-size: 1.25rem; font-weight: 800; cursor: pointer; }.combos-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 14px; }.combo-card { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 13px; padding: 14px; border: 1px solid #e3e9f1; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(15,23,42,.05); }.combo-card-image { display: grid; place-items: center; overflow: hidden; width: 82px; height: 82px; border-radius: 12px; background: #e8eef8; color: #1e2d4a; font-size: .75rem; font-weight: 900; text-align: center; }.combo-card-image img { width: 100%; height: 100%; object-fit: cover; }.combo-card-body { min-width: 0; }.combo-card-body > div, .combo-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.combo-card h4 { margin: 5px 0; color: #17243c; font-size: .95rem; }.combo-card-body > strong { float: right; margin-top: -25px; color: #047857; }.combo-card p, .combo-card small { display: block; margin: 7px 0; color: #64748b; font-size: .8rem; line-height: 1.4; }.combo-card small { color: #334155; }.combo-card footer { margin-top: 10px; color: #475569; font-size: .75rem; }.combo-card-label { display: inline-flex; width: fit-content; border-radius: 999px; padding: 3px 7px; background: #dcfce7; color: #166534; font-size: .65rem; font-weight: 900; text-transform: uppercase; }.combo-inactive { opacity: .62; }.combo-inactive .combo-card-label { background: #e5e7eb; color: #4b5563; }.combo-card .btn-email-delete { white-space: nowrap; }
@media (max-width: 600px) { .combo-components-head, .combos-list-head { align-items: stretch; flex-direction: column; }.combo-components-head .btn-secondary { width: 100%; }.combo-component-row { grid-template-columns: minmax(0,1fr) 74px 38px; }.combos-list { grid-template-columns: 1fr; } }

/* Operación de pedidos y atención PQRSD */
.order-operations h3 { margin: 0 0 12px; color: #1e3a5f; }.order-operation-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 13px; }.order-operation-status > div { padding: 10px; border: 1px solid #cfe2f7; border-radius: 9px; background: #fff; }.order-operation-status small { color: #64748b; font-weight: 800; font-size: .68rem; }.order-operation-status p { margin: 4px 0 0; color: #17243c; font-weight: 800; }.operation-note-label { display: block; margin-bottom: 5px; color: #475569; font-size: .82rem; font-weight: 700; }.order-operations textarea { display: block; box-sizing: border-box; width: 100%; min-height: 64px; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; resize: vertical; font: inherit; }.operation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }.operation-actions button:disabled { cursor: not-allowed; opacity: .48; }.operation-help { margin: 10px 0 0; color: #64748b; font-size: .78rem; }.pqrs-admin-body { display: grid; gap: 12px; }.pqrs-admin-body h3 { margin: 0; color: #17243c; }.pqrs-detail-meta { margin: 0; color: #64748b; font-size: .78rem; line-height: 1.45; }.pqrs-detail-message { margin: 0; padding: 12px; border-radius: 9px; background: #f8fafc; color: #334155; white-space: pre-wrap; line-height: 1.5; }.pqrs-admin-body label { display: grid; gap: 5px; color: #475569; font-size: .82rem; font-weight: 700; }.pqrs-admin-body select, .pqrs-admin-body textarea { box-sizing: border-box; width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px; background: #fff; font: inherit; }.pqrs-admin-body textarea { min-height: 110px; resize: vertical; }
@media (max-width: 560px) { .order-operation-status { grid-template-columns: 1fr; }.operation-actions { display: grid; grid-template-columns: 1fr; }.operation-actions button { width: 100%; } }
.inventory-header-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }.import-products-label { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; } @media (max-width:600px) { .inventory-header-actions { width:100%; justify-content:stretch; }.inventory-header-actions > * { flex:1; text-align:center; } }
.sidebar-version { display:inline-block; width:fit-content; margin:0 0 16px; padding:3px 8px; border:1px solid rgba(255,255,255,.18); border-radius:999px; color:#cbd5e1; font-size:.67rem; font-weight:800; }
.stat-icon { display:grid; place-items:center; background:#f7d928 !important; color:#172033; border:1px solid #e5c50a; }.stat-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }.topbar, .panel-box { border-color:#e4e7eb; box-shadow:0 5px 18px rgba(23,32,51,.06); }.btn-simular, .btn-agregar { background:#172033; color:#fff; }.btn-simular:hover, .btn-agregar:hover { background:#2a4065; }.settings-kicker { color:#9a7700; }.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus { border-color:#e4bd00; box-shadow:0 0 0 3px rgba(245,197,24,.18); }.nav-btn.active { background:#f5d90a; border-left-color:#e4bd00; }.sidebar { background:#172033; }.main-content { background:#f5f6f8; }
.settings-field-help { display:grid; gap:6px; color:#475569; font-size:.82rem; font-weight:800; }.settings-logo-form { margin-top:14px; padding-top:14px; border-top:1px solid #e5e7eb; }.settings-logo-form small { color:#64748b; font-size:.78rem; }
.settings-logo-preview { display:flex; align-items:center; gap:12px; margin:0 0 14px; padding:12px; border:1px solid #dbe4ee; border-radius:12px; background:#fff; }.settings-logo-preview img { width:auto; max-width:170px; height:52px; object-fit:contain; }.settings-logo-preview span { color:#64748b; font-size:.78rem; font-weight:800; }
.settings-logo-preview.is-missing { border-color:#fdba74; background:#fff7ed; }.settings-logo-preview.is-missing span { color:#9a3412; }
.settings-logo-preview.is-missing::before { content:'!'; display:grid; width:34px; height:34px; place-items:center; border-radius:50%; background:#ffedd5; color:#c2410c; font-weight:900; }
.settings-nav { display:flex; gap:8px; overflow-x:auto; margin:0 0 22px; padding:5px; border:1px solid #e2e8f0; border-radius:14px; background:#f8fafc; scrollbar-width:thin; }.settings-nav-btn { min-height:40px; padding:9px 14px; border:0; border-radius:10px; background:transparent; color:#475569; font:inherit; font-size:.82rem; font-weight:850; white-space:nowrap; cursor:pointer; }.settings-nav-btn:hover { background:#fff; color:#172033; }.settings-nav-btn.active { background:#172033; color:#fff; box-shadow:0 5px 14px rgba(23,32,51,.18); }
#ajustes .settings-grid > .settings-card:not(.hidden) { grid-column:1 / -1; }
#ajustes .settings-card { width:100%; box-sizing:border-box; }
#ajustes .settings-card > p { max-width:760px; }
.users-toolbar { display:grid; grid-template-columns:minmax(210px,1fr) 170px 170px auto; gap:9px; margin:0 0 12px; }.users-toolbar input,.users-toolbar select { min-width:0; min-height:42px; padding:9px 11px; border:1.5px solid #d9e2ee; border-radius:9px; background:#fff; font:inherit; }.users-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:12px 8px 5px; color:#64748b; font-size:.8rem; font-weight:800; }.users-pagination button:disabled { cursor:not-allowed; opacity:.45; }
.delivery-refresh-status { display:block; margin-top:9px; color:#bac8df; font-size:.72rem; font-weight:750; }
@media (max-width:760px) { .settings-nav { margin-inline:-4px; }.users-toolbar { grid-template-columns:1fr 1fr; }.users-toolbar input { grid-column:1/-1; }.users-toolbar button { grid-column:1/-1; }.users-pagination { justify-content:space-between; }.users-pagination span { text-align:center; }.delivery-refresh-status { margin-top:8px; } }
@media (max-width:767px) { .sidebar.menu-open .sidebar-footer { display:grid !important; opacity:1; visibility:visible; pointer-events:auto; margin-top:auto; }.sidebar.menu-open .sidebar-volver { display:block !important; opacity:1; visibility:visible; pointer-events:auto; }.sidebar-footer .btn-logout, .sidebar-volver { min-height:44px; } }
/* Operación de repartidores */
.delivery-operations-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin:0 0 20px; padding:22px; border-radius:18px; background:linear-gradient(115deg,#172033,#273b61); color:#fff; }.delivery-operations-head h2 { margin:4px 0; font-size:1.55rem; }.delivery-operations-head p:not(.section-kicker) { margin:0; color:#d6dfef; }.section-kicker { margin:0; color:#f5d90a; font-size:.7rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }.delivery-operations-metrics { display:flex; gap:8px; flex-wrap:wrap; }.delivery-operations-metrics span { padding:8px 11px; border:1px solid rgba(255,255,255,.24); border-radius:999px; background:rgba(255,255,255,.09); font-size:.78rem; font-weight:900; white-space:nowrap; }.delivery-team-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(225px,1fr)); gap:14px; margin-bottom:20px; }.delivery-team-card { padding:16px; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 4px 14px rgba(15,23,42,.06); }.delivery-team-card.is-online { border-top:4px solid #22c55e; }.delivery-team-card.is-busy { border-top:4px solid #f5c518; }.delivery-team-card.is-offline { border-top:4px solid #cbd5e1; opacity:.82; }.delivery-team-card-head { display:flex; align-items:center; gap:10px; }.delivery-avatar { display:grid; width:38px; height:38px; place-items:center; border-radius:50%; background:#eaf0fa; color:#172033; font-weight:900; }.delivery-team-card h3 { margin:0 0 3px; font-size:1rem; }.delivery-state { font-size:.73rem; font-weight:900; }.delivery-state.is-online { color:#15803d; }.delivery-state.is-busy { color:#a16207; }.delivery-state.is-offline { color:#64748b; }.delivery-team-card dl { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:16px 0 12px; }.delivery-team-card dl div { padding:9px; border-radius:10px; background:#f8fafc; }.delivery-team-card dt { color:#64748b; font-size:.66rem; font-weight:800; text-transform:uppercase; }.delivery-team-card dd { margin:4px 0 0; color:#172033; font-size:.9rem; font-weight:900; }.delivery-current-order { margin:0; padding-top:10px; border-top:1px solid #e2e8f0; color:#334155; font-size:.82rem; font-weight:800; }.delivery-current-order.is-free { color:#15803d; }.delivery-view-order { padding:6px 10px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#172033; font:inherit; font-size:.75rem; font-weight:900; cursor:pointer; }
@media (max-width:600px) { .delivery-operations-head { flex-direction:column; padding:18px; }.delivery-operations-metrics { width:100%; }.delivery-operations-metrics span { flex:1; text-align:center; } }
.delivery-zones-layout { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(360px,1.2fr); gap:16px; margin-bottom:20px; }.delivery-zone-form { display:grid; gap:11px; }.delivery-zone-form label { display:grid; gap:5px; color:#475569; font-size:.76rem; font-weight:800; }.delivery-zone-form input:not([type="checkbox"]) { width:100%; padding:10px 11px; border:1px solid #d8e0ea; border-radius:9px; font:inherit; }.delivery-coordinate-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.delivery-zone-check { display:flex !important; grid-template-columns:auto 1fr; align-items:center; }.delivery-zones-list { display:grid; gap:9px; }.delivery-zone-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border:1px solid #e2e8f0; border-radius:12px; }.delivery-zone-item.is-disabled { opacity:.55; }.delivery-zone-item p { margin:3px 0; color:#64748b; font-size:.78rem; }.delivery-zone-item small { color:#475569; }.delivery-zone-actions { display:flex; gap:7px; }.delivery-zone-actions a,.delivery-zone-actions button,.delivery-map-link { padding:6px 9px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#172033; font:inherit; font-size:.72rem; font-weight:800; text-decoration:none; cursor:pointer; }.delivery-zone-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; color:#475569; font-size:.76rem; font-weight:800; }.delivery-location-missing { color:#a16207; font-size:.7rem; }
@media (max-width:850px) { .delivery-zones-layout { grid-template-columns:1fr; } }
.delivery-table-actions { display:flex; align-items:center; gap:6px; }

/* Vinculación de repartidores y experiencia del cliente */
.driver-review-panel { margin:0 0 20px; }.driver-review-help { margin:4px 0 0; color:#64748b; font-size:.8rem; }.driver-review-panel select { min-width:155px; padding:9px 11px; border:1px solid #d7e0eb; border-radius:9px; background:#fff; font:inherit; }.table-subline { display:block; margin-top:3px; color:#64748b; font-size:.7rem; }.table-empty { padding:24px !important; text-align:center !important; color:#94a3b8; }.table-empty.is-error { color:#b91c1c; }.driver-vigency,.driver-review-status { display:inline-flex; border-radius:999px; padding:4px 8px; font-size:.68rem; font-weight:900; }.driver-vigency.is-valid,.driver-review-status.is-aprobado { background:#dcfce7; color:#166534; }.driver-vigency.is-expired,.driver-review-status.is-rechazado,.driver-review-status.is-suspendido { background:#fee2e2; color:#991b1b; }.driver-review-status.is-en_revision,.driver-review-status.is-pendiente { background:#fef3c7; color:#92400e; }
.driver-review-detail { display:grid; gap:14px; }.driver-review-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.driver-review-summary article { display:grid; gap:4px; padding:13px; border:1px solid #e2e8f0; border-radius:12px; background:#f8fafc; }.driver-review-summary span { color:#64748b; font-size:.67rem; font-weight:900; text-transform:uppercase; }.driver-review-summary strong { color:#172033; font-size:.9rem; }.driver-review-summary small { color:#64748b; }.driver-review-owner,.driver-review-privacy,.driver-review-previous { margin:0; padding:12px; border-radius:10px; background:#f8fafc; color:#475569; font-size:.8rem; line-height:1.55; }.driver-review-privacy { border-left:4px solid #f5c518; background:#fffbea; }.driver-review-documents { display:flex; flex-wrap:wrap; gap:8px; }.driver-review-documents a { padding:8px 10px; border:1px solid #cbd5e1; border-radius:9px; color:#172033; background:#fff; font-size:.75rem; font-weight:900; text-decoration:none; }.driver-review-decision { display:grid; gap:10px; padding-top:14px; border-top:1px solid #e2e8f0; }.driver-review-decision label { display:grid; gap:5px; color:#475569; font-size:.78rem; font-weight:800; }.driver-review-decision textarea { width:100%; min-height:74px; padding:10px; border:1px solid #cbd5e1; border-radius:9px; resize:vertical; font:inherit; }
.ratings-admin-head { margin-bottom:18px; padding:22px; border-radius:18px; background:linear-gradient(115deg,#172033,#273b61); color:#fff; }.ratings-admin-head h2 { margin:4px 0; }.ratings-admin-head p:not(.section-kicker) { margin:0; color:#d6dfef; }.ratings-admin-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }.ratings-admin-metrics article { display:grid; gap:5px; padding:17px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; }.ratings-admin-metrics span { color:#64748b; font-size:.72rem; font-weight:800; }.ratings-admin-metrics strong { color:#172033; font-size:1.35rem; }.ratings-admin-metrics .is-alert strong { color:#b91c1c; }.rating-stars-static { color:#d9a700; white-space:nowrap; letter-spacing:1px; }.rating-opinion { max-width:340px; white-space:normal; line-height:1.45; }
@media (max-width:760px) { .driver-review-panel .panel-box-header { align-items:stretch; flex-direction:column; }.driver-review-panel select { width:100%; }.driver-review-summary { grid-template-columns:1fr; }.ratings-admin-metrics { grid-template-columns:1fr 1fr; } }

/* Modales del panel: heredan el sistema visual compartido de la tienda. */
.modal { padding:20px; }
.modal-content,.modal-content.modal-sm,.modal-content.modal-wide { width:min(100%,620px); max-height:calc(100dvh - 40px); padding:24px; gap:16px; overflow:hidden; border:1px solid rgba(226,232,240,.9); border-radius:20px; box-shadow:0 26px 70px rgba(15,23,42,.28); }
.modal-content.modal-sm { max-width:440px; }
.modal-content.modal-wide { max-width:840px; }
.modal-content > .modal-body { min-height:0; overflow-y:auto; }
#modalPedidoDetalle .modal-header { padding:0 0 14px; border-bottom:1px solid #e8edf3; }
#modalPedidoDetalle .btn-close-modal { display:grid; width:36px; height:36px; place-items:center; border:1px solid #e2e8f0; border-radius:50%; background:#f8fafc; color:#475569; font-size:1rem; }
#modalPedidoDetalle .modal-body { padding:0 4px 0 0; }
#modalPedidoDetalle .modal-footer { padding:14px 0 0; border-top:1px solid #e8edf3; }
.inventory-import-help { margin:-2px 0 18px; padding:10px 12px; border-left:4px solid #f5c518; border-radius:0 9px 9px 0; background:#fffbea; color:#475569; font-size:.82rem; line-height:1.45; }
.inventory-import-help code { color:#172033; font-weight:900; }
@media (max-width:600px) {
  .modal { align-items:flex-end; padding:10px; }
  .modal-content,.modal-content.modal-sm,.modal-content.modal-wide { width:100% !important; max-width:none; max-height:calc(100dvh - 20px); margin:0; padding:20px 16px; border-radius:20px 20px 14px 14px; }
}
