/* Yulay's App · componentes visuales compartidos */

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: var(--radio-chico);
  border: 1.5px solid var(--verde-600); background: var(--verde-600); color: #fff;
  font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--verde-700); border-color: var(--verde-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secundario { background: var(--superficie); color: var(--verde-700); }
.btn.secundario:hover { background: var(--verde-50); }
.btn.peligro { background: var(--peligro); border-color: var(--peligro); }
.btn.peligro.secundario { background: var(--superficie); color: var(--peligro); }
.btn.chico { min-height: 36px; padding: 0 .8rem; font-size: .9rem; }
.btn.icono { min-width: 44px; padding: 0; }
.btn.chico.icono { min-width: 36px; }
:focus-visible { outline: 3px solid var(--verde-500); outline-offset: 2px; }

/* ---------- Campos ---------- */
.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.campo > label, .campo > .etiqueta { font-weight: 600; font-size: .9rem; }
.campo .ayuda { font-size: .82rem; color: var(--tinta-suave); }
.campo .error { font-size: .85rem; color: var(--peligro); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1.5px solid var(--linea);
  border-radius: var(--radio-chico); background: var(--superficie);
}
input:focus, select:focus, textarea:focus { border-color: var(--verde-500); outline: none; box-shadow: 0 0 0 3px var(--verde-100); }
.fila { display: flex; gap: .75rem; flex-wrap: wrap; }
.fila > * { flex: 1 1 140px; min-width: 0; }
.casilla { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.casilla input { width: 22px; height: 22px; accent-color: var(--verde-600); }

/* ---------- Tarjetas, listas y etiquetas ---------- */
.tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); box-shadow: var(--sombra); }
.lista { display: flex; flex-direction: column; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.item {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem;
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio);
}
.item.clic { cursor: pointer; }
.item.clic:hover { border-color: var(--verde-500); background: var(--verde-50); }
.item .cuerpo { flex: 1; min-width: 0; }
.item .titulo { font-weight: 600; overflow-wrap: anywhere; }
.item .detalle { font-size: .85rem; color: var(--tinta-suave); }
.item .derecha { text-align: right; font-weight: 600; white-space: nowrap; }
.etiqueta-chip {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--verde-100); color: var(--verde-700);
}
.etiqueta-chip.combo { background: var(--aviso-fondo); color: var(--aviso); }
.etiqueta-chip.apagado { background: #eceeea; color: var(--tinta-suave); }
.vacio { padding: 2rem 1rem; text-align: center; color: var(--tinta-suave); }

/* ---------- Pestañas ---------- */
.pestanas-internas { display: flex; gap: .25rem; border-bottom: 2px solid var(--linea); margin-bottom: 1rem; overflow-x: auto; }
.pestanas-internas button {
  min-height: 44px; padding: 0 1rem; border: 0; background: none; font-weight: 600; color: var(--tinta-suave);
  border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap;
}
.pestanas-internas button[aria-selected=true] { color: var(--verde-700); border-bottom-color: var(--verde-600); }

/* ---------- Ventana (modal) ---------- */
.velo {
  position: fixed; inset: 0; background: rgba(20, 35, 17, .45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.ventana {
  width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--superficie); border-radius: 18px 18px 0 0; box-shadow: var(--sombra);
}
.ventana > header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem .5rem; }
.ventana > .cuerpo { padding: .5rem 1.1rem 1rem; overflow-y: auto; }
.ventana > footer {
  display: flex; gap: .6rem; justify-content: flex-end; padding: .8rem 1.1rem calc(.8rem + var(--seguro-abajo));
  border-top: 1px solid var(--linea);
}
@media (min-width: 700px) {
  .velo { align-items: center; padding: 1rem; }
  .ventana { border-radius: 16px; }
}

/* ---------- Avisos flotantes ---------- */
#avisos { position: fixed; left: 50%; transform: translateX(-50%); top: calc(.75rem + var(--seguro-arriba)); z-index: 80;
  display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 420px); pointer-events: none; }
.aviso { pointer-events: auto; padding: .65rem 1rem; border-radius: var(--radio-chico); background: var(--verde-900); color: #fff;
  box-shadow: var(--sombra); font-weight: 600; }
.aviso.error { background: var(--peligro); }
.aviso.info { background: var(--tinta-suave); }
