/* ============================================================
   MENÚ: COMPRAS (lujo)
   Estilos exclusivos de este menú — para cambiar la pantalla de
   compras se toca SOLO este archivo (los .pf-* genéricos del
   modal de ficha viven en ui.css, componente compartido).
   ============================================================ */
@keyframes coUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* --- Hero imponente (identidad violeta del menú) --- */
.co-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(120deg, #1e1b4b 0%, #4c1d95 52%, #7c3aed 100%);
  box-shadow: 0 20px 45px -20px rgba(76, 29, 149, .75);
  animation: coUp .45s ease both;
  margin-bottom: 18px;
}
.co-hero::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  right: -90px; top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .55), transparent 65%);
}
.co-hero::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  left: 22%; bottom: -190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .4), transparent 65%);
}
.co-hero > * { position: relative; z-index: 1; }
.co-eyebrow { font-size: .68rem; letter-spacing: .2em; font-weight: 800; opacity: .72; }
.co-titulo { font-size: 1.7rem; font-weight: 800; letter-spacing: -.5px; margin-top: 4px; }
.co-titulo span {
  background: linear-gradient(90deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.co-sub { opacity: .78; font-size: .9rem; margin-top: 6px; }
.co-hero-acciones { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.co-hero-stat {
  text-align: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 9px 18px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
}
.co-hero-stat span {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.co-hero-stat small { opacity: .75; font-size: .68rem; letter-spacing: .05em; }
.co-btn-nuevo {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
  color: #fff !important;
  border: none !important;
  padding: 13px 22px !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
  font-size: .95rem !important;
  letter-spacing: .02em;
  box-shadow: 0 14px 26px -12px rgba(109, 40, 217, .7);
  transition: all .2s;
}
.co-btn-nuevo:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 32px -12px rgba(109, 40, 217, .85);
}

/* --- Dashboard del menú (KPIs) --- */
.co-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.co-kpi {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, .18);
  animation: coUp .5s ease both;
  transition: transform .25s, box-shadow .25s;
}
.co-kpi:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px -16px rgba(15, 23, 42, .3);
}
.co-kpi-barra { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.co-kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.co-kpi-icon {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 8px 14px -8px rgba(15, 23, 42, .5);
}
.co-kpi-tag {
  font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-light);
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
}
.co-kpi-valor {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.co-kpi-label { font-size: .74rem; color: var(--text-light); margin-top: 3px; font-weight: 600; }

/* --- Barra de herramientas --- */
.co-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .4);
}
.co-search { position: relative; flex: 1; min-width: 220px; }
.co-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .55; font-size: .9rem; pointer-events: none; }
#compras-search {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: .92rem;
  background: #f8fafc;
  transition: all .2s;
  box-sizing: border-box;
}
#compras-search:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}
.co-count {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-light);
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Tabla premium --- */
.co-tabla-wrap {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 20px 45px -28px rgba(15, 23, 42, .5);
}
#compras-table { border: none; }
#compras-table thead th {
  background: linear-gradient(120deg, #1e1b4b, #4c1d95);
  color: #ddd6fe;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  padding: 14px 16px;
  border: none;
  white-space: nowrap;
}
#compras-table tbody td { padding: 12px 16px; vertical-align: middle; border-color: #eef2f7; }
#compras-table tbody tr { transition: background .18s; }
#compras-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, .08), rgba(59, 130, 246, .05));
}
.chip-compra {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: .8rem;
  background: #1e1b4b;
  color: #a5b4fc;
  border: 1px dashed #4c1d95;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.col-fecha {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.co-prov { display: flex; align-items: center; gap: 10px; min-width: 0; }
.co-av {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 6px 12px -6px rgba(139, 92, 246, .7);
}
.co-prov-txt { min-width: 0; }
.co-prov-txt strong {
  display: block;
  font-size: .92rem;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.co-usuario {
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.co-total {
  font-weight: 800;
  color: #4338ca;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  padding: 6px 11px;
  border-radius: 10px;
  white-space: nowrap;
}
.co-vacio { text-align: center; padding: 34px 16px !important; color: var(--text-light); font-weight: 600; }

/* ============================================================
   MODAL "NUEVA COMPRA" — la pantalla de trabajo del menú.
   Usa la ficha de lujo (.pf-*) de ui.css y la ensancha con la
   clase propia .pf-compra: para cambiar esta pantalla se toca
   SOLO este archivo.
   ============================================================ */

/* --- Ficha casi a pantalla completa (es donde se trabaja a diario) --- */
.modal-content:has(.pf-compra) {
  width: 97%;
  max-width: 1420px;
  max-height: 97vh;
  border-radius: 22px;
}
.pf-compra .pf-form { padding: 16px 18px 14px; }

/* --- 3 columnas: proveedor angosto, catálogo y carrito amplios.
       La regla va sólo en pantallas anchas: por debajo de 721px
       ui.css apila los paneles en una sola columna. --- */
@media (min-width: 721px) {
  .pf-compra .co-compra-grid {
    grid-template-columns: 270px minmax(0, 1.05fr) minmax(0, 1.15fr);
    gap: 16px;
    /* La ficha ocupa casi toda la ventana y NUNCA la desborda.
       Cálculo medido en pantalla: cabecera 76 + relleno del form 30 +
       pie 56 + 10 de margen = 172; con 30 de holgura da 202. Con eso
       el botón «Guardar» queda siempre a la vista sin scrollear. */
    min-height: clamp(340px, calc(97vh - 202px), 900px);
  }
  /* Las listas se estiran hasta el final, pero con un techo ligado a la
     ventana: aunque el carrito tenga 50 productos la ficha nunca pasa
     de 97vh — se scrollea SÓLO la lista y el botón de guardar queda a
     la vista sin mover la página. Los dos techos difieren porque cada
     panel tiene un sobrante distinto arriba (catálogo 211px con su
     buscador, carrito 187px con su título): así los dos paneles
     terminan midiendo exactamente lo mismo. */
  .pf-compra .co-lista { max-height: clamp(150px, calc(97vh - 413px), 900px); }
  .pf-compra #compra-items { max-height: clamp(150px, calc(97vh - 389px), 900px); }
  .pf-compra .co-items-list { max-height: none; }
}
/* Pantallas angostas: el proveedor se angosta para no robarle lugar
   al catálogo y al carrito, que son los que se usan todo el rato. */
@media (min-width: 721px) and (max-width: 1120px) {
  .pf-compra .co-compra-grid {
    grid-template-columns: 215px minmax(0, 1fr) minmax(0, 1.12fr);
    gap: 12px;
  }
}
/* Muy angostas: los paneles se apilan (regla de ui.css) y las listas
   bajan a un tope propio, para que la ficha no se vuelva interminable
   y el «Guardar» se alcance con poco scroll. */
@media (max-width: 720px) {
  .pf-compra .co-compra-grid { min-height: 0; }
  .pf-compra .co-lista { max-height: 36vh; }
  .pf-compra #compra-items { max-height: 36vh; }
}
.pf-compra .pf-columnas .pf-seccion {
  padding: 14px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}
.pf-compra .pf-seccion-titulo .co-vaciar { margin-left: auto; }

/* --- Resumen siempre a la vista en la cabecera --- */
.co-hdr-chips {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pf-compra .pf-close { margin-left: auto; }
/* Sólo hay resumen en la cabecera si entra: si no, la × se va al final */
@media (min-width: 981px) {
  .co-hdr-chips { display: flex; margin-left: auto; }
  .pf-compra .pf-close { margin-left: 10px; }
}
.co-hchip {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}
.co-hchip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.co-hchip-total { background: rgba(34, 197, 94, .28); border-color: rgba(134, 239, 172, .55); }

/* --- Botón "Vaciar" en el título del carrito --- */
.co-vaciar {
  margin-left: auto;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b91c1c;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.co-vaciar:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
.co-oculto { display: none !important; }

/* --- Teclas de atajo dentro de la ficha --- */
.co-aviso-tecla kbd,
.co-buscador-kbd {
  font-family: inherit;
  font-size: .68rem;
  font-weight: 800;
  background: #eef2f7;
  border: 1px solid #dbe3ec;
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  color: #475569;
}

/* --- Buscador del catálogo (nombre o código de barras) --- */
/* La etiqueta puede partir en dos renglones: en columnas angostas
   el aviso del código no tiene por qué apretar el título. */
.pf-compra .form-group label { flex-wrap: wrap; }
.co-atajo {
  margin-left: auto;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-light);
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.co-buscador { position: relative; display: flex; align-items: center; }
.co-buscador-ico {
  position: absolute;
  left: 12px;
  font-size: .85rem;
  opacity: .55;
  pointer-events: none;
}
#compra-search {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 62px 13px 36px;
  font-size: .95rem;
  font-weight: 600;
}
.co-buscador-kbd { position: absolute; right: 10px; pointer-events: none; }

/* --- Listas: llenan el alto que sobra → poco scroll al cargar --- */
.co-lista {
  flex: 1 1 auto;
  min-height: 150px;
  max-height: 60vh;
  overflow-y: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 7px;
}
.co-lista-pie {
  margin-top: 7px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-light);
  min-height: 1.1em;
}
.co-lista-pie b { color: #4338ca; }

/* --- Ítem del catálogo --- */
.co-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 11px;
  border-radius: 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2f7;
  transition: all .15s;
}
.co-item:last-child { border-bottom: none; }
.co-item:hover { background: #eef2ff; border-color: transparent; }
.co-item-txt { min-width: 0; }
.co-item strong {
  display: block;
  font-size: .88rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.co-item small {
  display: block;
  font-size: .72rem;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 3px;
}
.co-item-cod {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #64748b;
  background: #eef2f7;
  border: 1px solid #e2e8f0;
  padding: 0 5px;
  border-radius: 5px;
}
.co-agregar {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 800;
  font-size: .9rem;
  border: 1px solid #c7d2fe;
  transition: all .15s;
}
.co-item:hover .co-agregar { background: #4338ca; color: #fff; border-color: #4338ca; }

/* --- Carrito --- */
#compra-items {
  flex: 1 1 auto;
  min-height: 150px;
  display: flex;
  flex-direction: column;
}
.co-items-list {
  max-height: 60vh;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 7px;
}
.co-items-vacio {
  text-align: center;
  padding: 26px 12px !important;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-light);
}
.co-item-row {
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 11px 12px 12px;
  margin-bottom: 8px;
  animation: coUp .25s ease both;
}
.co-item-row:last-child { margin-bottom: 0; }
.co-item-row:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .14);
}

/* fila 1 — producto + botón quitar */
.co-item-cab { display: flex; align-items: flex-start; gap: 8px; }
.co-item-cab strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .86rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.co-quitar {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: none;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
}
.co-quitar:hover { background: #ef4444; color: #fff; }

/* fila 2 — stock de referencia + cantidades rápidas */
.co-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.co-stock {
  display: block;
  margin: 0;
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-light);
}
.co-stock b { color: #4338ca; }
.co-stock i { font-style: normal; opacity: .85; }
.co-stock-sin { opacity: .7; font-weight: 600; }
.co-presets { display: flex; gap: 4px; flex: 0 0 auto; }
.co-preset {
  min-width: 30px;
  padding: 4px 7px;
  font-size: .7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #4338ca;
  cursor: pointer;
  transition: all .15s;
}
.co-preset:hover { background: #4338ca; color: #fff; border-color: #4338ca; }
.co-preset.co-activo { background: #4338ca; color: #fff; border-color: #4338ca; }

/* fila 3 — costo unitario + stepper + subtotal de la línea.
   Va en FLUJO flexible: si entra todo en un renglón, queda en uno;
   si la columna se angosta, el costo baja solo a su propio renglón
   en vez de quedar en 2 píxeles. */
.co-item-campos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px 13px;
  margin-top: 9px;
}
.co-item-precio {
  flex: 1 1 130px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.co-item-precio label {
  flex: 0 0 auto;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-light);
}
.co-precio {
  flex: 1 1 auto;
  width: auto;
  max-width: 230px;
  min-width: 0;
  padding: 9px 10px !important;
  border: 2px solid #ede9fe !important;
  border-radius: 10px !important;
  font-size: .9rem !important;
  font-weight: 700;
  text-align: right;
  background: #f8fafc !important;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.co-precio:focus { border-color: #8b5cf6 !important; background: #fff !important; }
.co-stepper { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.co-stepper button {
  width: 32px;
  height: 32px;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
}
.co-stepper button:hover:not(:disabled) { background: #4338ca; color: #fff; border-color: #4338ca; }
.co-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.co-cant {
  width: 60px;
  padding: 7px 4px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 9px !important;
  font-size: .92rem !important;
  font-weight: 800;
  text-align: center;
  background: #f8fafc !important;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
  box-sizing: border-box;
}
.co-cant::-webkit-outer-spin-button,
.co-cant::-webkit-inner-spin-button,
.co-precio::-webkit-outer-spin-button,
.co-precio::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.co-cant:focus { border-color: #8b5cf6 !important; background: #fff !important; }
.co-subtotal {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: .98rem;
  font-weight: 800;
  color: #4338ca;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

/* el catálogo resalta lo que ya está en el carrito */
.co-item-en-carrito { border-color: #c7d2fe; background: #eef2ff; }
.co-item-en-carrito .co-agregar { background: #4338ca; color: #fff; border-color: #4338ca; }
/* producto resaltado por las flechas del buscador */
.co-cat-activo {
  background: #ede9fe;
  border-color: #8b5cf6;
  box-shadow: inset 0 0 0 1px #8b5cf6;
}
.co-cat-activo .co-agregar { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.compra-producto-item:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 1px; }

/* caja de total + resumen del pie */
.co-total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 15px 17px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, #1e1b4b, #4c1d95);
  box-shadow: 0 14px 26px -14px rgba(76, 29, 149, .8);
}
.co-total-box span {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .75;
}
.co-total-txt small {
  display: block;
  margin-top: 4px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  opacity: .7;
}
.co-total-txt small b { opacity: 1; font-weight: 800; }
.co-total-box strong {
  font-size: 1.55rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
  white-space: nowrap;
}

/* ============================================================
   CUADRO DE CONFIRMACIÓN — registro, salida y vaciado.
   Vive dentro de la ficha pero se ancla a la ventana, así tapa
   todo el modal y el foco no se escapa.
   ============================================================ */
.co-aviso {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.co-aviso.co-ver { display: flex; }
.co-aviso-card {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  padding: 24px 26px 20px;
  text-align: center;
  box-shadow: 0 45px 90px -35px rgba(0, 0, 0, .7);
  animation: coUp .2s ease both;
}
.co-aviso-ico {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  border: 1px solid #c7d2fe;
}
.co-aviso-card h4 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.3px;
  margin: 0;
}
.co-aviso-cuerpo { margin-top: 14px; text-align: left; }
.co-aviso-txt {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: #334155;
  text-align: center;
}
.co-aviso-txt b { color: #4338ca; }

/* resumen de la compra */
.co-res-datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.co-res-datos > div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 12px;
}
.co-res-datos span {
  display: block;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 3px;
}
.co-res-datos b { font-size: .88rem; font-weight: 800; word-break: break-word; }
.co-res-total { background: linear-gradient(135deg, #eef2ff, #e0e7ff) !important; border-color: #c7d2fe !important; }
.co-res-total b { color: #4338ca; font-size: 1.05rem; }

.co-res-tabla {
  margin-top: 12px;
  max-height: 42vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
}
.co-res-tabla table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.co-res-tabla thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.co-res-tabla tbody td {
  padding: 8px 11px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.co-res-tabla tbody tr:last-child td { border-bottom: none; }
.co-res-tabla .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.co-res-nota {
  margin: 12px 0 0;
  font-size: .76rem;
  line-height: 1.5;
  color: var(--text-light);
  text-align: center;
}

.co-aviso-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.co-aviso-btns .btn { padding: 12px 22px !important; border-radius: 13px !important; font-weight: 800 !important; }
.co-aviso-tecla {
  display: block;
  margin-top: 12px;
  font-size: .72rem;
  color: var(--text-light);
}

/* responsive propio del menú */
@media (max-width: 720px) {
  .co-hero { padding: 20px; }
}
@media (max-width: 640px) {
  .co-kpis { grid-template-columns: repeat(2, 1fr); }
  .co-toolbar { flex-direction: column; align-items: stretch; }
  .co-aviso-card { padding: 18px 16px 16px; }
}

/* responsive propio del menú */
@media (max-width: 720px) {
  .co-hero { padding: 20px; }
}
@media (max-width: 640px) {
  .co-kpis { grid-template-columns: repeat(2, 1fr); }
  .co-toolbar { flex-direction: column; align-items: stretch; }
}
