/* AITutsipink: estilos de la aplicación (mismo diseño que el prototipo). */
:root {
  --fondo: #FBF4F8;
  --superficie: #FFFFFF;
  --texto: #2B1230;
  --texto-2: #6B4A66;
  --texto-3: #4A3046;
  --borde: #EBD3E2;
  --borde-fuerte: #D9B8CC;
  --acento: #B8125F;
  --acento-hover: #8C0D48;
  --acento-suave: #FCE4F0;
  --oscuro: #2A0E33;
  --rosa: #FF8CC6;
  --lila: #EFE3F5;
  --lila-texto: #4E2A63;
  --coincide-fondo: #E2F3E8; --coincide-texto: #1B5E37;
  --cercano-fondo: #FFF0D4;  --cercano-texto: #7A4A00;
  --diferente-fondo: #FDE3E6; --diferente-texto: #9B1626;
  --aviso-fondo: #FFF4E0; --aviso-texto: #6A3F00;
  --radio: 16px;
  --sombra: 0 20px 48px rgba(42, 14, 51, .35);
  --fuente: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fuente-marca: "Fredoka", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--fuente); font-size: 16px; line-height: 1.45; }
a { color: var(--acento); }
a:hover { color: var(--acento-hover); }
button, input, select { font: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--fuente-marca); font-weight: 700; margin: 0; line-height: 1.2; }
.formulario-linea { margin: 0; display: flex; }
.oculto-visual { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
  padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }

/* Botones */
.boton { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--acento); color: #fff; font-weight: 800; cursor: pointer; text-decoration: none; }
.boton:hover { background: var(--acento-hover); color: #fff; }
.boton:disabled { opacity: .45; cursor: not-allowed; }
.boton--grande { min-height: 48px; padding: 0 24px; }
.boton--secundario { background: var(--superficie); color: var(--texto); border: 1px solid var(--borde); font-weight: 700; }
.boton--secundario:hover { background: var(--fondo); color: var(--texto); }
.boton--peligro { background: #9B1626; }
.boton--peligro:hover { background: #7A101E; }
.boton--texto { background: transparent; color: var(--acento-hover); text-decoration: underline; padding: 0 4px; font-weight: 700; }
.boton--texto:hover { background: transparent; color: var(--acento); }
.boton--ancho { width: 100%; }

/* Estructura */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.encabezado { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--oscuro); color: #fff; }
.encabezado__logo { width: 42px; height: 42px; border-radius: 50%; }
.marca { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; text-decoration: none; color: #fff; }
.marca:hover { color: #fff; }
.marca__nombre { font-family: var(--fuente-marca); font-weight: 700; font-size: 21px; }
.marca__nombre span { color: var(--rosa); }
.marca__sub { font-size: 13px; color: #E9CFE0; }
.encabezado__espacio { flex: 1; }
.encabezado__boton { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.encabezado__boton:hover { background: rgba(255,255,255,.08); color: #fff; }
.encabezado__boton--rosa { background: var(--rosa); color: var(--oscuro); border-color: var(--rosa); font-weight: 800; }
.encabezado__boton--rosa:hover { background: #ffa6d3; color: var(--oscuro); }
.encabezado__menu { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.encabezado__usuario { font-size: 14px; color: #E9CFE0; }

.cuerpo { flex: 1; min-height: 0; display: flex; position: relative; }
.lateral { width: 290px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--superficie); border-right: 1px solid var(--borde); }
.lateral__arriba { padding: 16px; }
.lateral__titulo { padding: 0 16px 8px; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--texto-2); }
.lateral__lista { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; margin: 0; list-style: none; }
.lateral__vacio { padding: 8px 16px; color: var(--texto-2); font-size: 14px; }
.lateral__abajo { padding: 12px 16px 16px; border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 10px; }
.lateral__nota { margin: 0; font-size: 13px; color: var(--texto-2); }
.fondo-menu { display: none; }

.item { display: flex; align-items: stretch; border: 1px solid transparent; border-radius: 12px; background: var(--superficie); }
.item--activo { background: var(--acento-suave); border-color: #F3B7D4; }
.item__enlace { flex: 1; min-width: 0; min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 8px 10px; color: var(--texto); text-decoration: none; }
.item__enlace:hover { color: var(--texto); }
.item__titulo { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--texto-2); }
.item__borrar { margin: 0; display: flex; }
.item__borrar button { width: 44px; border: 0; background: transparent; color: var(--texto-2); border-radius: 0 12px 12px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.item__borrar button:hover { color: #9B1626; background: #FDE3E6; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.chip--grande { padding: 6px 12px; font-size: 15px; font-weight: 800; }
.chip--coincide { background: var(--coincide-fondo); color: var(--coincide-texto); }
.chip--cercano { background: var(--cercano-fondo); color: var(--cercano-texto); }
.chip--diferente { background: var(--diferente-fondo); color: var(--diferente-texto); }
.chip--pendiente, .chip--error { background: var(--lila); color: var(--lila-texto); }

.principal { flex: 1; min-width: 0; overflow-y: auto; padding: 24px; }
.contenedor { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

/* Avisos y mensajes */
.aviso-manual { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #F3B7D4; border-radius: 14px; background: var(--acento-suave); }
.aviso-manual .ic { color: var(--acento); width: 22px; height: 22px; }
.aviso-manual__texto { flex: 1; font-size: 15px; }
.nota { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--lila); color: var(--lila-texto); font-size: 14px; font-weight: 700; }
.mensaje { padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.mensaje--info { background: var(--lila); color: var(--lila-texto); }
.mensaje--error { background: var(--diferente-fondo); color: var(--diferente-texto); }
.errores { margin: 0; padding: 12px 14px 12px 34px; border-radius: 12px; background: var(--diferente-fondo); color: var(--diferente-texto); font-weight: 700; }
.advertencia { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--aviso-fondo); color: var(--aviso-texto); font-size: 14px; }
.etiqueta-ejemplo { align-self: center; padding: 4px 12px; border-radius: 999px; background: var(--lila); color: var(--lila-texto); font-size: 13px; font-weight: 700; }

/* Formulario */
.titulo-pagina { font-size: 24px; }
.subtitulo { margin: 2px 0 0; font-size: 14px; color: var(--texto-2); }
.tarjeta { padding: 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); display: flex; flex-direction: column; gap: 12px; }
.tarjeta__titulo { font-weight: 800; font-size: 16px; }
.tarjeta__ayuda { font-size: 13px; color: var(--texto-2); margin: 0; }
.campo { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--borde-fuerte); border-radius: 10px; color: var(--texto); background: #fff; width: 100%; }
.campo:focus { border-color: var(--acento); }

.bcs__fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bcs__valor { min-width: 84px; text-align: center; font-family: var(--fuente-marca); font-weight: 700; font-size: 32px; color: var(--acento); }
.bcs__flechas { display: flex; flex-direction: column; gap: 4px; }
.bcs__flecha { width: 44px; height: 32px; border: 1px solid var(--borde); border-radius: 8px; background: #fff; color: var(--texto); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bcs__opciones { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.bcs__opcion { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--borde); background: #fff; color: var(--texto); font-weight: 800; font-size: 15px; cursor: pointer; }
.bcs__opcion[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: #fff; }

.fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.foto { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; border: 2px dashed var(--borde-fuerte); background: #fff; overflow: hidden; }
.foto--obligatoria { border-color: #D45A97; }
.foto__entrada { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--texto-2); text-align: center; padding: 6px; }
.foto__entrada input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.foto__entrada:focus-within { outline: 3px solid var(--rosa); outline-offset: -3px; }
.foto__subir { font-weight: 800; font-size: 14px; color: var(--texto); }
.foto__tipo { font-size: 12px; font-weight: 700; }
.foto--obligatoria .foto__tipo { color: var(--acento-hover); }
.foto__vista { position: absolute; inset: 0; display: none; background: #F4E6EE; }
.foto__vista img { width: 100%; height: 100%; object-fit: cover; }
.foto--llena { border-style: solid; border-color: var(--borde); }
.foto--llena .foto__vista { display: block; }
.foto--llena .foto__entrada { display: none; }
.foto__quitar { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(42,14,51,.75); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.foto__nombre { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(42,14,51,.7); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.acciones { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.faltantes { margin: 0; flex: 1 1 220px; font-size: 14px; font-weight: 700; color: var(--acento-hover); }

/* Resultado */
.resumen { padding: 14px 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; color: var(--texto-2); }
.resumen strong { color: var(--texto); }
.resultado { border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; overflow: hidden; }
.resultado__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; background: var(--oscuro); color: #fff; font-weight: 800; }
.resultado__marca { font-size: 12px; font-weight: 700; color: #FFC2E0; }
.resultado__cuerpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cifra { padding: 12px; border-radius: 12px; background: var(--fondo); display: flex; flex-direction: column; gap: 4px; }
.cifra--modelo { background: var(--acento-suave); color: var(--acento-hover); }
.cifra__nombre { font-size: 13px; font-weight: 700; color: var(--texto-2); }
.cifra--modelo .cifra__nombre { color: var(--acento-hover); }
.cifra__valor { font-family: var(--fuente-marca); font-weight: 700; font-size: 32px; }
.comparacion { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detalle-texto { margin: 0; font-size: 14px; color: var(--texto-2); }
.miniaturas { display: flex; gap: 8px; flex-wrap: wrap; }
.miniatura { width: 72px; height: 96px; border-radius: 10px; overflow: hidden; background: #F4E6EE; border: 1px solid var(--borde); display: flex; align-items: center; justify-content: center; color: var(--texto-2); }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }

/* Diálogos */
.modal { border: 0; padding: 0; border-radius: 20px; width: min(440px, calc(100% - 32px)); box-shadow: var(--sombra); color: var(--texto); }
.modal::backdrop { background: rgba(42, 14, 51, .6); }
.modal__cuerpo { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.modal__texto { margin: 0; color: var(--texto-3); }
.modal__acciones { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.tutorial__arte { height: 150px; background: var(--oscuro); display: flex; align-items: center; justify-content: center; position: relative; }
.tutorial__paso-num { position: absolute; top: 12px; left: 16px; font-size: 13px; font-weight: 800; color: #FFC2E0; }
.tutorial__icono { width: 88px; height: 88px; border-radius: 50%; background: var(--rosa); color: var(--oscuro); display: flex; align-items: center; justify-content: center; }
.tutorial__icono .ic { width: 44px; height: 44px; }
.tutorial__puntos { display: flex; gap: 6px; }
.tutorial__punto { height: 8px; width: 8px; border-radius: 999px; background: var(--borde); transition: width .2s; }
.tutorial__punto--actual { width: 24px; background: var(--acento); }
.tutorial__botones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tutorial__botones .espacio { flex: 1; }

.cargando { position: fixed; inset: 0; z-index: 60; background: rgba(42,14,51,.6); display: none; align-items: center; justify-content: center; }
.cargando--visible { display: flex; }
.cargando__caja { background: #fff; border-radius: 16px; padding: 18px 22px; display: flex; align-items: center; gap: 12px; font-weight: 700; }
.puntos { display: inline-flex; gap: 4px; }
.puntos span { width: 7px; height: 7px; border-radius: 50%; background: var(--acento); animation: punto 1.2s infinite; }
.puntos span:nth-child(2) { animation-delay: .2s; }
.puntos span:nth-child(3) { animation-delay: .4s; }
@keyframes punto { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Inicio de sesión y páginas sueltas */
.pagina-simple { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--oscuro); }
.caja-entrar { width: min(400px, 100%); background: #fff; border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--sombra); }
.caja-entrar__logo { width: 96px; height: 96px; border-radius: 50%; align-self: center; }
.caja-entrar h1 { text-align: center; font-size: 26px; }
.caja-entrar h1 span { color: var(--acento); }
.etiqueta { font-weight: 800; display: block; margin-bottom: 6px; }
.manual { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; }
.manual h2 { font-size: 20px; margin: 18px 0 8px; }
.manual p, .manual li { color: var(--texto-3); }

/* Celular */
@media (max-width: 760px) {
  .encabezado__menu { display: inline-flex; }
  .solo-pc { display: none !important; }
  .lateral { display: none; }
  .lateral--abierto { display: flex; position: absolute; top: 0; left: 0; bottom: 0; z-index: 30; width: 86%; max-width: 320px; box-shadow: 0 12px 32px rgba(42,14,51,.28); }
  .fondo-menu--visible { display: block; position: absolute; inset: 0; z-index: 25; border: 0; background: rgba(42,14,51,.45); }
  .principal { padding: 16px 12px; }
  .bcs__opciones { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bcs__valor, .cifra__valor { font-size: 26px; }
  .cifras { gap: 8px; }
  .encabezado { gap: 8px; padding: 0 12px; }
  .encabezado__boton { padding: 0 10px; }
  .aviso-manual { flex-wrap: wrap; }
}

/* Celulares angostos: el nombre no cabe junto a los tres botones, así que queda solo el logo.
   El nombre se oculta solo a la vista; los lectores de pantalla lo siguen leyendo. */
@media (max-width: 480px) {
  .marca { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
