/* N.DS Exalvex — estilos compartidos */
:root {
  --m1: #A31515; --m2: #E85D5D; --ac: #F59E0B; --fo: #FBF8F8; --tx: #1F0A0A;
  --m-sobre: #fff; --borde: #EADDDD; --suave: #6B5555;
  --sombra-tarjeta: 0 1px 2px rgba(31,10,10,.04), 0 8px 24px -12px rgba(31,10,10,.12);
  --curva: cubic-bezier(.2,.8,.2,1);
}
html { -webkit-tap-highlight-color: transparent; }
body { font-family: 'Poppins', sans-serif; }
[x-cloak], .oculto { display: none !important; }

/* ---------- Marca ---------- */
.degradado-marca { background: linear-gradient(135deg, #7B0000 0%, #A31515 45%, #E85D5D 100%); }
.texto-degradado { background: linear-gradient(120deg, #7B0000, #D63B33 55%, #F59A94); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fondo-app {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(232,93,93,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(163,21,21,.07), transparent 60%),
    #FBF8F8;
}

/* ---------- Botones ---------- */
.boton-marca {
  background: linear-gradient(135deg, #8E0E0E, #C0262D 55%, #E85D5D); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(163,21,21,.65), inset 0 1px 0 rgba(255,255,255,.18);
  transition: filter .2s, transform .2s var(--curva), box-shadow .2s;
}
.boton-marca:hover { filter: brightness(1.07) saturate(1.05); transform: translateY(-1px); }
.boton-marca:active { transform: translateY(1px); }
.boton-marca:disabled { opacity: .55; cursor: not-allowed; filter: none; transform: none; }
.boton-suave { background: #fff; border: 1px solid var(--borde); color: #1F0A0A; transition: background .15s, border-color .15s, transform .15s; }
.boton-suave:hover { background: #FFF6F5; border-color: #F2C9C6; }
.boton-fantasma { color: var(--suave); transition: background .15s, color .15s; }
.boton-fantasma:hover { background: #FEF0EF; color: #A31515; }

/* ---------- Campos ---------- */
.input-ev, .input-sor {
  background: #fff; border: 1px solid var(--borde); color: #1F0A0A;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input-ev::placeholder, .input-sor::placeholder { color: #B6A3A3; }
.input-ev:hover, .input-sor:hover { border-color: #DCC6C6; }
.input-ev:focus, .input-sor:focus { outline: none; border-color: #C0262D; box-shadow: 0 0 0 4px rgba(192,38,45,.12); }
textarea.input-ev { resize: vertical; }
.etiqueta { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: #1F0A0A; }
.ayuda { font-size: 11px; color: var(--suave); }

/* Campo de línea (estilo editor) */
.input-linea { background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding-left: 0; padding-right: 0; transition: border-color .2s; width: 100%; }
.input-linea:hover { border-bottom-color: #EADDDD; }
.input-linea:focus { outline: none; border-bottom-color: var(--m1); }

/* Interruptor */
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #E2D3D3; transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--curva); }
.switch input:checked + span { background: var(--m1); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(192,38,45,.25); }

/* Opción con borde (radio / checkbox visual) */
.opcion-caja { border: 2px solid #EFE4E4; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; cursor: pointer; }
.opcion-caja:hover { border-color: #F2C9C6; }
.opcion-caja:has(input:checked) { border-color: var(--m1); background: color-mix(in srgb, var(--m1) 6%, #fff); box-shadow: 0 8px 20px -14px var(--m1); }
.opcion-caja input { position: absolute; opacity: 0; pointer-events: none; }

input[type="color"].swatch { -webkit-appearance: none; appearance: none; border: 1px solid var(--borde); padding: 0; width: 44px; height: 44px; border-radius: 14px; cursor: pointer; background: none; }
input[type="color"].swatch::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"].swatch::-webkit-color-swatch { border: none; border-radius: 10px; }
input[type="color"].swatch::-moz-color-swatch { border: none; border-radius: 10px; }

/* ---------- Superficies ---------- */
.tarjeta { background: #fff; border: 1px solid #F0E6E6; border-radius: 24px; box-shadow: var(--sombra-tarjeta); }
.barra-app { background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(234,221,221,.8); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* ---------- Avisos y ventanas ---------- */
.ev-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 200; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; font-size: 13px; font-weight: 500; color: #fff; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--curva); box-shadow: 0 20px 40px -16px rgba(0,0,0,.4); }
.ev-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.ev-toast-ok { background: #1F0A0A; }
.ev-toast-error { background: #DC2626; }
.ev-modal-fondo { position: fixed; inset: 0; z-index: 150; background: rgba(31,10,10,.45); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.ev-modal-fondo.visible { opacity: 1; }
.ev-modal { background: #fff; border-radius: 28px; width: 100%; max-width: 440px; padding: 24px; box-shadow: 0 30px 80px -20px rgba(31,10,10,.45); transform: translateY(12px) scale(.98); transition: transform .3s var(--curva); }
.ev-modal-fondo.visible .ev-modal { transform: none; }

/* ---------- Movimiento ---------- */
@keyframes ev-entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.entrar { animation: ev-entrar .6s var(--curva) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes ev-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.flotar { animation: ev-flotar 6s ease-in-out infinite; }
@keyframes ev-girar { to { transform: rotate(360deg); } }
.girar-lento { animation: ev-girar 40s linear infinite; }
@keyframes ev-brillo { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
.con-brillo { position: relative; overflow: hidden; }
.con-brillo::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: ev-brillo 3.2s ease-in-out infinite; }
@keyframes ev-latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.latido { animation: ev-latido 1s ease-in-out infinite; }
.cargando { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: ev-girar .7s linear infinite; display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  .entrar, .flotar, .girar-lento, .con-brillo::after, .latido { animation: none !important; }
}

/* Barra de desplazamiento discreta */
.scroll-fino { scrollbar-width: thin; scrollbar-color: #E5D3D3 transparent; }
.scroll-fino::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-fino::-webkit-scrollbar-thumb { background: #E5D3D3; border-radius: 99px; }
