/* ============================================
   2x3 ENTREGAS · styles.css (GLOBAL)
   Archivo único de estilos de toda la aplicación
   ✅ Unifica sesión/CC en todas las páginas
   ✅ Login/Register responsive (auth-*)
   ✅ iPhone notch + Android + PC OK
   ✅ FIX admin: botones OUTLINE visibles en header oscuro
   ============================================ */

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Base ===== */
html {
  -webkit-text-size-adjust: 100%;
}

body,
body.app-body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
  min-height: 100svh;
}

/* Safe-area friendly (especial PWA en iPhone) */
@supports (padding: max(0px)) {
  .app-main,
  .page-container,
  .auth-page {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ===== Header ===== */
.app-header {
  background: #111827;
  color: #f9fafb;
  padding: 1rem 1.2rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-header h1 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.app-subtitle {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ===== Layout principal ===== */
.app-main {
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.app-footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* ===== Layout secundario (map, resumen) ===== */
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===== Top bar (unificada) ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;

  gap: 0.75rem;
  flex-wrap: wrap;        /* ✅ clave para móviles */
}

.top-bar > * {
  min-width: 0;
}

/* ✅ Sesión / CC (PILL) — funciona con tu id="sessionInfo" */
#sessionInfo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
}

/* En header oscuro */
.app-header #sessionInfo {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
}

/* Botones dentro de top-bar para que se vean consistentes */
.top-bar .btn-link {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

/* En header oscuro, links más claros */
.app-header .btn-link {
  color: #93c5fd;
}
.app-header .btn-link:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

/* ✅ FIX: Botones OUTLINE dentro de header oscuro (Admin / Detail) */
.app-header .btn.outline,
.app-header label.btn.outline {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb; /* ✅ texto claro */
}

.app-header .btn.outline:hover,
.app-header label.btn.outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
}

.app-header .btn.outline:focus-visible,
.app-header label.btn.outline:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.95);
  outline-offset: 2px;
}

/* ===== Card ===== */
.card {
  background: #ffffff;
  border-radius: 0.8rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.card h2,
.card h3 {
  margin-bottom: 0.5rem;
}

.card h2 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.stat-box {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
}

.stat-value {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.stat-value.success { color: #16a34a; }
.stat-value.danger  { color: #dc2626; }
.stat-value.warning { color: #d97706; }

/* ===== Botones ===== */
.btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.96); }

.btn.primary   { background: #2563eb; color: #ffffff; }
.btn.secondary { background: #0f766e; color: #ffffff; }

.btn.outline {
  background: transparent;
  border: 1px solid #9ca3af;
  color: #374151;
}

.btn.danger  { background: #dc2626; color: #ffffff; }
.btn.success { background: #16a34a; color: #ffffff; }
.btn.ghost   { background: transparent; color: #374151; }

.btn.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Botón ancho completo */
.btn.full-width {
  width: 100%;
  justify-content: center;
}

/* Botón tipo enlace (volver) */
.btn-link {
  background: transparent;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-link:hover { text-decoration: underline; }

/* Botón icono pequeño (borrar) */
.btn-icon {
  border: none;
  background: #e5e7eb;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-icon.danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* ===== Grid de acciones ===== */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

/* Fila de acciones en map/resumen */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

/* ===== Listas ===== */
.list {
  list-style: none;
  margin-top: 0.7rem;
}

.list li {
  padding: 0.6rem 0.3rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

/* Fila de lista con botón borrar */
.list-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.list-item-main { flex: 1; }

/* ===== Textos ===== */
.helper-text {
  color: #6b7280;
  font-size: 0.8rem;
}

.detail-line {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

/* ============================================
   MAPA (estilos principales)
   ============================================ */

#map {
  width: 100%;
  height: 60vh;   /* fallback */
  height: 60svh;  /* iOS moderno */
  min-height: 360px;
  border-radius: 0.8rem;
  margin-top: 0.6rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.leaflet-container {
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* ============================================
   OVERLAY ESCÁNER QR
   ============================================ */

.qr-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.qr-overlay.hidden { display: none; }

.qr-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.qr-overlay-content {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem;
  width: 90%;
  max-width: 420px;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.qr-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-reader-area {
  margin-top: 0.8rem;
  width: 100%;
  min-height: 260px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.estado-qr {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  color: #444;
}

/* ============================================
   FORMULARIO MANUAL DE PAQUETES
   ============================================ */

.manual-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-row label {
  font-size: 0.8rem;
  color: #4b5563;
}

.form-row input,
.form-row select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  background: #fff;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* ============================================
   COORDENADAS (detail.html + resumen)
   ============================================ */

.coords-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.form-group-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group-inline label {
  font-size: 0.8rem;
  color: #4b5563;
}

.form-group-inline input {
  padding: 0.45rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

.form-group-inline input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Mini formulario de coordenadas en resumen */
.coords-edit-row {
  margin-top: 2px;
  gap: 4px;
  flex-wrap: wrap;
}

.input-coord {
  padding: 0.3rem 0.4rem;
  border-radius: 0.35rem;
  border: 1px solid #d1d5db;
  font-size: 0.8rem;
  min-width: 90px;
}

.input-coord:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.aviso-coords-link { text-decoration: underline; }

/* ============================================
   ✅ MEJORA: COORDS RÁPIDAS (lat,lng) + botones
   (no rompe nada; solo layout)
   ============================================ */

.coordsQuickRow,
.coords-quick-row{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}

.coordsQuickRow .input,
.coords-quick-row .input{
  flex: 1;
  min-width: 180px;
}

/* Si usas botones dentro de la fila */
.coordsQuickRow .btn,
.coords-quick-row .btn{
  white-space: nowrap;
}

/* ============================================
   DETALLE DE PAQUETES (resumen.html)
   ============================================ */

#resumenListaPaquetes {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0;
}

#resumenListaPaquetes li + li { margin-top: 0.75rem; }

.resumen-item {
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
}

.resumen-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 4px;
}

.resumen-item-titulo {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.resumen-item-titulo strong { font-size: 0.9rem; }

.resumen-item-body {
  font-size: 0.85rem;
  color: #4b5563;
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.resumen-item-linea {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.resumen-label {
  font-weight: 600;
  color: #374151;
}

/* badges de estado */
.badge-estado {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pendiente { background: #fef3c7; color: #92400e; }
.badge-entregado { background: #dcfce7; color: #166534; }
.badge-devuelto  { background: #fee2e2; color: #b91c1c; }

/* Aviso paquetes sin coordenadas */
.aviso-coords {
  margin-top: 2px;
  color: #b91c1c;
  font-size: 0.78rem;
}

/* ============================================
   en2x3 - Geocoding card (WIDGET PREMIUM · iPhone friendly)
   ============================================ */

.geocode-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 250, 251, 0.92));
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.geocode-card::before {
  content: "";
  display: block;
  height: 4px;
  width: 44px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0f766e);
  margin-bottom: 10px;
  opacity: 0.95;
}

.geocode-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.geocode-title {
  margin: 0 0 6px 0;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.geocode-help {
  margin: 0;
  max-width: 680px;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #4b5563;
}

.geocode-card .btn,
.geocode-card button {
  -webkit-tap-highlight-color: transparent;
}

.geocode-card #btnGeocodificarLote {
  min-height: 44px;
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.geo-status,
#geoStatus {
  margin-top: 10px;
  min-height: 18px;
  font-size: 0.92rem;
  line-height: 1.25;
  opacity: 0.98;
  word-break: break-word;

  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(249, 250, 251, 0.85);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

#geoStatus[data-state="ok"] {
  color: #166534;
  background: rgba(22, 101, 52, 0.08);
  border-color: rgba(22, 101, 52, 0.18);
}
#geoStatus[data-state="warn"] {
  color: #b45309;
  background: rgba(180, 83, 9, 0.10);
  border-color: rgba(180, 83, 9, 0.22);
}
#geoStatus[data-state="progress"] {
  color: #1f2937;
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.16);
}

@media (max-width: 520px) {
  .geocode-card-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  #btnGeocodificarLote { width: 100%; }
}

/* ============================================
   RESPONSIVE (global)
   ============================================ */

@media (max-width: 640px) {
  .app-main,
  .page-container {
    padding: 0.75rem;
  }

  .card { padding: 0.9rem; }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-row .btn {
    width: 100%;
    justify-content: center;
  }

  /* En móviles, sesión ocupa línea completa si no cabe */
  #sessionInfo {
    white-space: normal;
    width: fit-content;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .app-header h1 { font-size: 1.6rem; }
  .card { padding: 1.2rem; }
}

/* ============================================
   TOAST (mejorado)
   ============================================ */

.toast{
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(15,23,42,.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 9999;
  max-width: calc(100% - 24px);
  text-align: center;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ============================================
   Modal ZXing (corregido)
   ============================================ */

body.modal-open { overflow: hidden; }

.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9998;

  align-items: center;
  justify-content: center;

  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.modal.open{ display: flex; }

.modal::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
}

.modalCard{
  position: relative;
  width: min(520px, 92vw);
  background: #0b1220;
  border-radius: 16px;
  padding: 12px;

  max-height: calc(100svh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

#scanVideo{
  width: 100%;
  height: auto;
  max-height: 65svh;
  border-radius: 14px;
  background: #000;
  object-fit: cover;
}

/* ============================================
   AUTH (index.html / login.html)
   - Tus clases auth-* ya quedan bonitas y consistentes
   ============================================ */

.auth-page{
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background: radial-gradient(900px 600px at 20% 10%, rgba(37,99,235,0.18), transparent 55%),
              radial-gradient(900px 600px at 80% 20%, rgba(15,118,110,0.18), transparent 55%),
              #0b0f14;
  color: #e5e7eb;
}

.auth-shell{
  width: min(560px, 92vw);
}

.auth-brand{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-logo{
  width: 86px;
  height: 86px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 10px;
  box-shadow: 0 16px 42px rgba(0,0,0,0.35);
}

.auth-title{
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.auth-sub{
  font-size: 0.92rem;
  color: rgba(229,231,235,0.82);
}

.auth-tabs{
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.auth-tab{
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(229,231,235,0.92);
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.is-active{
  background: #ffffff;
  color: #111827;
  border-color: rgba(255,255,255,0.65);
}

.auth-card{
  background: rgba(255,255,255,0.95);
  color: #111827;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.auth-label{
  display: block;
  margin: 10px 0 6px;
  font-size: 0.82rem;
  color: #374151;
  font-weight: 700;
}

.auth-input{
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #fff;
}

.auth-input:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}

.auth-mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.auth-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.auth-check{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
}

.auth-btn{
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 800;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
  transition: transform .12s ease, opacity .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-btn:active{ transform: scale(0.98); }

.auth-btn-primary{
  width: 100%;
  margin-top: 14px;
  background: #2563eb;
  color: #fff;
}

.auth-linkbtn{
  border: none;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0;
}
.auth-linkbtn:hover{ text-decoration: underline; }

.auth-help{
  margin-top: 10px;
  text-align: center;
}

.auth-details{
  margin-top: 12px;
}

.auth-mini{
  margin-top: 10px;
}

.auth-hint{
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6b7280;
}

.auth-grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px){
  .auth-grid2{ grid-template-columns: 1fr; }
}

.auth-reset-title{
  font-size: 1rem;
  margin-bottom: 6px;
}

.auth-footer{
  margin-top: 14px;
  text-align: center;
  color: rgba(229,231,235,0.7);
  font-size: 0.85rem;
}

/* Toast para auth (si tu index usa #toast.auth-toast) */
.auth-toast{
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(15,23,42,.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  display: none;
  z-index: 9999;
  max-width: calc(100% - 24px);
  text-align: center;
}
.auth-toast.show{
  display: block;
}
/* ============================================
   ✅ HOTFIX: Logo gigante / columna blanca en auth
   ============================================ */

/* Si el body.auth-page tiene más de 1 hijo, por defecto flex es "row" → rompe el layout */
.auth-page { 
  flex-direction: column; 
}

/* Evita que cualquier imagen se salga de su contenedor */
img {
  max-width: 100%;
  height: auto;
}

/* Si usas <div class="auth-logo"><img ...></div> */
.auth-logo {
  overflow: hidden;
}

/* Control total del <img> dentro del cuadrito del logo */
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Evita scroll horizontal raro cuando algo se desborda */
body { 
  overflow-x: hidden; 
}

/* ============================================
   ✅ NUEVO: Toast por tipo (success/error/info)
   (tu auth.js ya setea el.dataset.type)
   ============================================ */
.toast[data-type="success"]{
  background: rgba(22, 101, 52, .95);
}
.toast[data-type="error"]{
  background: rgba(185, 28, 28, .95);
}
.toast[data-type="info"]{
  background: rgba(15, 23, 42, .95);
}

