/* Agendame · estilos compartidos.
   Color de la app: rosa coral a violeta (belleza, cuidado personal, cercanía).
   El dorado queda como detalle de la marca Zojim. Pensado para que lo use gente mayor:
   letra grande, alto contraste y botones de 48px como mínimo. */
:root {
  --bg: #09090a;
  --bg-2: #101011;
  --bg-3: #161618;
  --text: #f5f3ee;
  --muted: #d2cec7;
  --dim: #a6a19a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --acento: #f472b6;
  --acento-2: #a855f7;
  --acento-suave: #f9a8d4;
  --grad-app: linear-gradient(120deg, #f9a8d4, #f472b6 35%, #a855f7);
  --sobre-acento: #1d0820;
  --gold: #d6b264; /* marca Zojim */
  --ok: #86d6a0;
  --warn: #e8c477;
  --bad: #f0a59a;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r: 16px;
  --r-lg: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Letra base de 18px (los rem crecen con esto). "Letra más grande" la lleva a 21px. */
html { -webkit-text-size-adjust: 100%; font-size: 112.5%; }
html.letra-grande { font-size: 131.25%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(244,114,182,.35); }

.fondo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fondo i { position: absolute; border-radius: 50%; filter: blur(110px); }
.fondo i:nth-child(1) { width: 560px; height: 560px; background: #f472b6; top: -320px; left: -240px; opacity: .13; }
.fondo i:nth-child(2) { width: 480px; height: 480px; background: #a855f7; top: -200px; right: -260px; opacity: .14; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.angosto { max-width: 560px; }

em.acento, .acento {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  background: var(--grad-app); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .06em;
}
.kicker { font-size: .84rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acento); font-weight: 600; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.chico { font-size: .9rem; }
h1, h2, h3 { letter-spacing: -.03em; line-height: 1.1; font-weight: 600; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex-shrink: 0; }
.logo small { font-weight: 500; color: var(--dim); font-size: .84rem; letter-spacing: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em; line-height: 1.15;
  border: 1px solid var(--line-2); background: var(--glass); color: var(--text);
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s, opacity .2s;
  white-space: nowrap; text-decoration: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: rgba(255,255,255,.28); background: var(--glass-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.btn-primario {
  border: none; color: var(--sobre-acento); background: var(--grad-app); font-weight: 700;
  box-shadow: 0 10px 40px -12px rgba(244,114,182,.6);
}
.btn-primario:hover { background: var(--grad-app); filter: brightness(1.06); box-shadow: 0 16px 46px -12px rgba(168,85,247,.7); }
.btn-blanco { border: none; color: #07070a; background: #fff; }
.btn-blanco:hover { background: #fff; }
.btn-oro { border: none; color: var(--sobre-acento); font-weight: 700; background: var(--grad-app); box-shadow: 0 10px 40px -14px rgba(244,114,182,.8); }
.btn-oro:hover { background: var(--grad-app); filter: brightness(1.05); }
.btn-wa { border-color: rgba(134,214,160,.35); color: #c9f0d5; background: rgba(134,214,160,.08); }
.btn-wa:hover { border-color: rgba(134,214,160,.6); background: rgba(134,214,160,.14); }
.btn-peligro { border-color: rgba(240,165,154,.3); color: var(--bad); background: transparent; }
.btn-sm { min-height: 48px; padding: 0 16px; font-size: .92rem; }
.btn-bloque { width: 100%; }
.btn-icono { min-height: 48px; min-width: 48px; padding: 0 12px; border-radius: 14px; }
.btn-texto { border: none; background: none; color: var(--muted); padding: 0 8px; min-height: 48px; text-decoration: underline; text-underline-offset: 3px; }
.btn-texto:hover { background: none; color: var(--text); }
.botones { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 7px; }
.campo + .campo { margin-top: 16px; }
.campo > span, .etiqueta { font-size: .95rem; color: var(--text); font-weight: 600; }
.campo small { color: var(--muted); font-size: .88rem; }
.input, .campo input, .campo select, .campo textarea {
  width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  font-size: 1rem; outline: none; transition: border-color .2s, background .2s;
}
.campo textarea { min-height: 84px; resize: vertical; }
.campo select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a09a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 40px; }
.campo select option { background: #161618; }
.input:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { border-color: rgba(244,114,182,.6); background: rgba(255,255,255,.05); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fila .campo + .campo { margin-top: 0; }
.prefijo { position: relative; }
.prefijo b { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--dim); font-weight: 500; pointer-events: none; }
.prefijo input { padding-left: 32px; }

.opciones { display: grid; gap: 10px; }
.opcion {
  position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: rgba(255,255,255,.02); cursor: pointer; transition: border-color .2s, background .2s;
}
.opcion:hover { border-color: rgba(255,255,255,.24); }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion .marca { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; transition: .2s; }
.opcion input:checked ~ .marca { border-color: var(--acento); background: var(--acento); box-shadow: inset 0 0 0 4px #161618; }
.opcion:has(input:checked) { border-color: rgba(244,114,182,.55); background: rgba(244,114,182,.06); }
.opcion b { display: block; font-weight: 600; }
.opcion span.muted { display: block; font-size: .88rem; margin-top: 2px; }

.interruptor { position: relative; display: inline-block; width: 46px; height: 28px; flex-shrink: 0; }
.interruptor input { opacity: 0; width: 0; height: 0; }
.interruptor i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12); transition: .2s; }
.interruptor i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.interruptor input:checked + i { background: var(--acento); }
.interruptor input:checked + i::after { transform: translateX(18px); }

/* ---------- Tarjetas y listas ---------- */
.tarjeta {
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  padding: 20px;
}
@media (min-width: 720px) { .tarjeta { padding: 26px; } }
.tarjeta + .tarjeta { margin-top: 14px; }
.tarjeta h2 { font-size: 1.2rem; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.separador { height: 1px; background: var(--line); margin: 18px 0; }

.item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(255,255,255,.025);
  text-align: left; width: 100%; transition: border-color .2s, background .2s, transform .2s var(--ease);
}
button.item:hover, a.item:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
.item + .item { margin-top: 8px; }
.item .cuerpo { flex: 1; min-width: 0; }
.item .titulo { font-weight: 600; letter-spacing: -.01em; }
.item .sub { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.item .der { text-align: right; flex-shrink: 0; }
.item.elegido { border-color: rgba(244,114,182,.6); background: rgba(244,114,182,.07); }
.flecha { color: var(--dim); width: 18px; height: 18px; flex-shrink: 0; }

.avatar {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 700; color: #1d0820; background: var(--grad-app); font-size: 1rem;
}
.avatar.gris { background: linear-gradient(135deg, #5c5a56, #2a2928); color: var(--text); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: .84rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); border-color: rgba(134,214,160,.3); background: rgba(134,214,160,.06); }
.badge.warn { color: var(--warn); border-color: rgba(232,196,119,.35); background: rgba(232,196,119,.07); }
.badge.bad { color: var(--bad); border-color: rgba(240,165,154,.3); background: rgba(240,165,154,.06); }
.badge.oro { color: #1d0820; background: var(--grad-app); border: none; }
.badge.oro::before { display: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 48px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line-2);
  background: transparent; font-size: .95rem; font-weight: 600; color: var(--muted); transition: .2s;
}
.chip:hover { color: var(--text); }
.chip.activo { background: #fff; color: #07070a; border-color: #fff; }

.aviso {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid rgba(244,114,182,.3); background: rgba(244,114,182,.07); font-size: .92rem;
}
.aviso svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--acento); margin-top: 1px; }
.aviso.bad { border-color: rgba(240,165,154,.3); background: rgba(240,165,154,.06); }
.aviso.bad svg { color: var(--bad); }
.aviso.ok { border-color: rgba(134,214,160,.3); background: rgba(134,214,160,.06); }
.aviso.ok svg { color: var(--ok); }

.vacio { text-align: center; padding: 40px 20px; color: var(--muted); }
.vacio > svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--dim); }
.vacio b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

.copiable {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 14px;
  border: 1px solid var(--line-2); background: rgba(0,0,0,.25); min-width: 0;
}
.copiable code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-size: .95rem; color: var(--acento-suave); }

/* ---------- Ventanas (abajo en celular, centradas en PC) ---------- */
.capa { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: aparecer .2s ease; }
.ventana {
  width: 100%; max-height: 92dvh; overflow-y: auto; background: #121213; border: 1px solid var(--line-2);
  border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  animation: subir .3s var(--ease);
}
.ventana h2 { font-size: 1.3rem; margin-bottom: 4px; }
.ventana .cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ventana .pie { display: flex; gap: 10px; margin-top: 22px; }
.ventana .pie .btn { flex: 1; }
@media (min-width: 720px) {
  .capa { align-items: center; padding: 24px; }
  .ventana { max-width: 520px; border-radius: 24px; padding: 28px; }
}
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(30px); opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  padding: 12px 18px; border-radius: 14px; background: #fff; color: #07070a; font-weight: 600; font-size: .92rem;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); animation: subir .3s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
.toast.bad { background: #f6d2cc; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

.cargando { display: grid; place-items: center; padding: 60px 0; }
.cargando::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--acento); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Letra más grande ---------- */
.btn-letra { white-space: nowrap; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 8px; }
.btn-letra b { font-size: 1.1em; color: var(--acento-suave); }
.btn-letra:hover { border-color: rgba(255,255,255,.3); }
.barra-letra { display: flex; justify-content: flex-end; padding-top: 12px; }

/* ---------- Aceptaciones (casillas grandes) ---------- */
.acepto { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255,255,255,.03); cursor: pointer; font-size: .95rem; }
.acepto + .acepto { margin-top: 10px; }
.acepto input { width: 26px; height: 26px; flex-shrink: 0; accent-color: var(--acento); margin-top: 1px; }
.acepto a { color: var(--acento-suave); }
.politica { padding: 16px; border-radius: var(--r); border: 1px solid rgba(244,114,182,.35); background: rgba(244,114,182,.06); font-size: .95rem; }
.politica b { display: block; margin-bottom: 6px; }

/* ---------- Pie legal ---------- */
.pie-legal { margin-top: 36px; text-align: center; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.pie-legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 8px; }
.pie-legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
