/* =====================================================================
   FADU BOOKI · DESIGN SYSTEM
   App académica para FADU-UBA · Lenguaje visual lúdico y kawaii
   ---------------------------------------------------------------------
   ÍNDICE
   00 · Tokens (color, tipografía, espaciado, radios, sombras)
   01 · Reset y base
   02 · Stage + Phone frame (simulación de dispositivo)
   03 · Status bar / App bar / Tab bar
   04 · Sistema de pantallas y transiciones SPA
   05 · Tipografía y utilidades
   06 · Botones
   07 · Tarjetas
   08 · Inputs / selectores / chips
   09 · Personajes y estados ilustrados
   10 · Componentes específicos (listas, badges, mapa, tickets…)
   11 · Microinteracciones y keyframes
   12 · Pantallas concretas (splash, login, home, etc.)
   ===================================================================== */

/* ====================== 00 · TOKENS ============================== */
:root {
  /* — Paleta cromática — Violeta principal + acentos vivos — */
  --violet-900: #2E1F6B;
  --violet-700: #4B32C3;
  --violet-600: #6C4CF1;   /* principal */
  --violet-500: #8367FF;
  --violet-300: #B7A6FF;
  --violet-100: #E9E2FF;
  --violet-050: #F4F0FF;

  --yellow:  #FFD23F;
  --yellow-d:#F2B705;
  --lime:    #8FE05B;
  --lime-d:  #5FBF3A;
  --sky:     #59C2F5;
  --sky-d:   #2BA4E0;
  --coral:   #FF7A6B;
  --coral-d: #F2543D;
  --salmon:  #FF9FB2;
  --mint:    #76E4C4;

  /* — Neutros cálidos (evitamos grises dominantes) — */
  --ink:     #382B63;   /* texto principal: violeta tinta, no negro */
  --ink-soft:#6E63A0;   /* texto secundario */
  --ink-faint:#A79FD0;
  --paper:   #FBF9FF;   /* fondo app */
  --paper-2: #F3EFFF;   /* fondo de secciones */
  --card:    #FFFFFF;
  --line:    #ECE6FF;

  /* — Tipografía — */
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, sans-serif;

  /* — Escala de espaciado (base 4) — */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  /* — Radios (extremadamente redondeados) — */
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 34px; --r-pill: 999px;

  /* — Sombras suaves (tinte violeta, nunca gris plano) — */
  --sh-sm: 0 4px 12px rgba(108,76,241,.10);
  --sh-md: 0 10px 24px rgba(108,76,241,.14);
  --sh-lg: 0 18px 40px rgba(108,76,241,.18);
  --sh-press: 0 2px 6px rgba(108,76,241,.16);

  /* — Frame — */
  --phone-w: 412px;
  --phone-h: 892px;
}

/* ====================== 01 · RESET Y BASE ======================== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #EDE7FF;
  display: grid;
  place-items: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; }
ul { list-style: none; }

/* ====================== 02 · STAGE + PHONE ====================== */
.stage {
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, #C9B9FF 0%, #B6A2FF 38%, #9C84FF 100%);
  overflow: hidden;
}
.blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .55; }
.blob--1 { width: 320px; height: 320px; left: -80px; top: 8%;  background: var(--salmon); }
.blob--2 { width: 280px; height: 280px; right: -70px; top: 22%; background: var(--sky); }
.blob--3 { width: 360px; height: 360px; left: 12%; bottom: -120px; background: var(--yellow); }

.phone {
  position: relative;
  width: min(var(--phone-w), 100vw);
  height: min(var(--phone-h), 100vh);
  background: var(--paper);
  border-radius: 46px;
  box-shadow: 0 40px 90px rgba(46,31,107,.45), 0 0 0 12px #1b1340, 0 0 0 13px #2a1f5e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 440px) {
  .phone { width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; }
  body { background: var(--paper); }
}

/* ====================== 03 · BARRAS DEL SISTEMA ================= */
.status-bar {
  height: 44px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  z-index: 30;
  transition: color .4s ease;
}
.status-bar__icons { display: flex; align-items: center; gap: 6px; }
.phone.is-dark .status-bar { color: #fff; }

/* App bar contextual */
.app-bar {
  flex: none; min-height: 0; height: 0; overflow: hidden;
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s5); z-index: 25;
  transition: height .25s ease, padding .25s ease;
}
.app-bar.is-visible { height: 56px; }
.app-bar__back {
  width: 42px; height: 42px; border-radius: var(--r-md);
  background: var(--violet-050); color: var(--violet-600);
  display: grid; place-items: center; flex: none;
  transition: transform .15s, background .2s;
}
.app-bar__back:active { transform: scale(.9); background: var(--violet-100); }
.app-bar__title {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -.2px; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-bar__action {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: grid; place-items: center; color: var(--violet-600);
  background: var(--violet-050); flex: none;
  transition: transform .15s;
}
.app-bar__action:active { transform: scale(.9); }
.app-bar__action .dot {
  position: absolute; top: 8px; right: 8px; width: 9px; height: 9px;
  background: var(--coral); border-radius: 50%; border: 2px solid var(--card);
}

/* Tab bar */
.tab-bar {
  flex: none; height: 0; overflow: hidden;
  display: flex; align-items: stretch; justify-content: space-around;
  background: var(--card);
  border-top: 1.5px solid var(--line);
  padding: 0 var(--s2);
  z-index: 25;
  transition: height .28s cubic-bezier(.34,1.4,.5,1);
  box-shadow: 0 -6px 24px rgba(108,76,241,.07);
}
.tab-bar.is-visible { height: 76px; }
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--ink-faint); position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  transition: color .2s;
}
.tab-item svg { width: 25px; height: 25px; transition: transform .25s cubic-bezier(.34,1.6,.5,1); }
.tab-item.is-active { color: var(--violet-600); }
.tab-item.is-active svg { transform: translateY(-2px) scale(1.08); }
.tab-item.is-active::before {
  content: ""; position: absolute; top: 8px; width: 44px; height: 32px;
  background: var(--violet-050); border-radius: var(--r-pill); z-index: -1;
}
.tab-item:active svg { transform: scale(.85); }
.tab-fab {
  flex: none; width: 60px; align-self: center;
}
.tab-fab button {
  width: 58px; height: 58px; border-radius: 22px; margin-top: -22px;
  background: linear-gradient(150deg, var(--violet-500), var(--violet-700));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 22px rgba(108,76,241,.5);
  transition: transform .18s cubic-bezier(.34,1.6,.5,1);
}
.tab-fab button:active { transform: scale(.88) rotate(-8deg); }
.tab-fab svg { width: 28px; height: 28px; }

/* ============ 04 · STACK DE PANTALLAS + TRANSICIONES ============ */
.screen-stack { position: relative; flex: 1 1 auto; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--s4) var(--s5) var(--s8);
  display: flex; flex-direction: column;
  will-change: transform, opacity;
}
.screen::-webkit-scrollbar { width: 0; }

/* Entradas / salidas (push, pop, fade) */
@keyframes pushIn   { from { transform: translateX(100%);  } to { transform: translateX(0); } }
@keyframes pushOut  { from { transform: translateX(0); opacity:1 } to { transform: translateX(-26%); opacity:.4 } }
@keyframes popIn    { from { transform: translateX(-26%); opacity:.4 } to { transform: translateX(0); opacity:1 } }
@keyframes popOut   { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes fadeIn   { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeOut  { from { opacity: 1; } to { opacity: 0; } }

.screen.anim-pushIn  { animation: pushIn .34s cubic-bezier(.4,.9,.3,1) both; z-index: 2; }
.screen.anim-pushOut { animation: pushOut .34s cubic-bezier(.4,.9,.3,1) both; z-index: 1; }
.screen.anim-popIn   { animation: popIn .32s cubic-bezier(.4,.9,.3,1) both; z-index: 1; }
.screen.anim-popOut  { animation: popOut .32s cubic-bezier(.4,.9,.3,1) both; z-index: 2; }
.screen.anim-fadeIn  { animation: fadeIn .4s ease both; z-index: 2; }
.screen.anim-fadeOut { animation: fadeOut .25s ease both; z-index: 1; }

/* ====================== 05 · TIPOGRAFÍA / UTILS ================= */
.h1 { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -.6px; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: 23px; line-height: 1.15; letter-spacing: -.4px; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.2px; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--violet-500); }
.lead { font-size: 16px; line-height: 1.5; color: var(--ink-soft); font-weight: 600; }
.muted { color: var(--ink-soft); }
.tiny { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--s4); }
.row { display: flex; align-items: center; gap: var(--s3); }
.spacer { flex: 1; }
.mt-auto { margin-top: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

/* ====================== 06 · BOTONES ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  padding: 16px 22px; border-radius: var(--r-lg);
  transition: transform .14s cubic-bezier(.34,1.6,.5,1), box-shadow .2s, filter .2s;
  position: relative; white-space: nowrap;
}
.btn:active { transform: scale(.95); }
.btn--block { width: 100%; }
.btn--lg { padding: 19px 24px; font-size: 18px; }
.btn--primary {
  background: linear-gradient(150deg, var(--violet-500), var(--violet-700));
  color: #fff; box-shadow: 0 10px 22px rgba(108,76,241,.4);
}
.btn--primary:active { box-shadow: var(--sh-press); }
.btn--accent { background: var(--yellow); color: var(--violet-900); box-shadow: 0 8px 18px rgba(242,183,5,.4); }
.btn--coral  { background: var(--coral); color: #fff; box-shadow: 0 8px 18px rgba(242,84,61,.35); }
.btn--lime   { background: var(--lime); color: var(--violet-900); box-shadow: 0 8px 18px rgba(95,191,58,.35); }
.btn--ghost  { background: var(--violet-050); color: var(--violet-600); }
.btn--soft   { background: var(--card); color: var(--violet-600); box-shadow: var(--sh-sm); }
.btn--outline{ background: transparent; color: var(--violet-600); box-shadow: inset 0 0 0 2px var(--violet-100); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ico { width: 22px; height: 22px; }

/* ====================== 07 · TARJETAS =========================== */
.card {
  background: var(--card); border-radius: var(--r-lg);
  padding: var(--s5); box-shadow: var(--sh-sm);
  border: 1.5px solid var(--line);
  position: relative; overflow: hidden;
}
.card--flat { box-shadow: none; }
.card--tap { transition: transform .16s cubic-bezier(.34,1.5,.5,1), box-shadow .2s; }
.card--tap:active { transform: scale(.975); box-shadow: var(--sh-md); }
.card--hero { border: none; color: #fff; background: linear-gradient(150deg, var(--violet-500), var(--violet-700)); box-shadow: var(--sh-lg); }
.card--accent { background: linear-gradient(150deg, #FFE27A, var(--yellow)); border-color: transparent; }
.card__deco { position: absolute; right: -20px; bottom: -20px; opacity: .9; pointer-events: none; }

/* ====================== 08 · INPUTS / CHIPS ===================== */
.field { display: block; }
.field__label { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink-soft); margin: 0 0 var(--s2) var(--s2); display:block; }
.input {
  width: 100%; font-family: var(--font-body); font-weight: 700; font-size: 16px;
  color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--ink-faint); font-weight: 600; }
.input:focus { outline: none; border-color: var(--violet-400, var(--violet-500)); box-shadow: 0 0 0 4px var(--violet-100); }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 50px; }
.input-wrap .lead-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--violet-500); width: 22px; height: 22px; }

.chip-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--violet-050); color: var(--violet-600);
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .14s cubic-bezier(.34,1.6,.5,1), background .2s, color .2s;
  border: 2px solid transparent;
}
.chip:active { transform: scale(.92); }
.chip.is-on { background: var(--violet-600); color: #fff; }
.chip.is-on.c-lime { background: var(--lime-d); }
.chip.is-on.c-sky  { background: var(--sky-d); }
.chip svg { width: 17px; height: 17px; }

.stepper { display: flex; align-items: center; gap: var(--s4); justify-content: center; }
.stepper button {
  width: 64px; height: 64px; border-radius: 22px; font-size: 30px;
  background: var(--violet-050); color: var(--violet-600);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600;
  transition: transform .14s cubic-bezier(.34,1.6,.5,1);
  box-shadow: var(--sh-sm);
}
.stepper button:active { transform: scale(.86); }
.stepper__value { font-family: var(--font-display); font-weight: 700; font-size: 52px; min-width: 120px; text-align: center; letter-spacing: -1px; }

/* segmented control */
.seg { display: flex; background: var(--violet-050); border-radius: var(--r-pill); padding: 5px; gap: 4px; }
.seg button {
  flex: 1; padding: 11px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink-soft);
  transition: color .2s;
}
.seg button.is-on { background: var(--card); color: var(--violet-600); box-shadow: var(--sh-sm); }

/* ============== 09 · PERSONAJES Y ESTADOS ILUSTRADOS ============ */
.char { display: inline-block; }
.char--float { animation: float 3.6s ease-in-out infinite; }
.char--bob   { animation: bob 2.2s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-9px) } }
@keyframes bob   { 0%,100%{ transform: translateY(0) rotate(-2deg) } 50%{ transform: translateY(-5px) rotate(2deg) } }

.state-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  padding: 6px 12px; border-radius: var(--r-pill);
}
.state-pill .dot { width: 9px; height: 9px; border-radius: 50%; }
.s-free  { background: #E7F8DC; color: var(--lime-d); }
.s-free .dot { background: var(--lime-d); }
.s-busy  { background: #E2F2FD; color: var(--sky-d); }
.s-busy .dot { background: var(--sky-d); }
.s-fix   { background: #FFEEE9; color: var(--coral-d); }
.s-fix .dot { background: var(--coral-d); }
.s-ready { background: #FFF6D9; color: var(--yellow-d); }
.s-ready .dot { background: var(--yellow-d); }

/* ============== 10 · COMPONENTES ESPECÍFICOS ==================== */
/* lista de filas con icono */
.listrow {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4); background: var(--card);
  border-radius: var(--r-md); border: 1.5px solid var(--line);
  transition: transform .15s cubic-bezier(.34,1.5,.5,1), box-shadow .2s;
}
.listrow.card--tap:active { transform: scale(.98); box-shadow: var(--sh-md); }
.listrow__ico {
  width: 48px; height: 48px; border-radius: 16px; flex: none;
  display: grid; place-items: center;
}
.listrow__body { flex: 1; min-width: 0; }
.listrow__body strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; display: block; }
.listrow__chev { color: var(--ink-faint); flex: none; }

/* badge numérico / sticker */
.sticker {
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  padding: 4px 11px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px;
}
.sticker--new   { background: var(--coral); color: #fff; }
.sticker--soon  { background: var(--sky); color: #fff; }
.sticker--top   { background: var(--yellow); color: var(--violet-900); }
.sticker--mint  { background: var(--mint); color: #0c5c47; }

/* meta de aula */
.feat-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.feat {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 13px; color: var(--ink-soft);
  background: var(--paper-2); padding: 8px 12px; border-radius: var(--r-pill);
}
.feat svg { width: 16px; height: 16px; color: var(--violet-500); }

/* progreso / loader circular */
.spinner { width: 64px; height: 64px; }
.spinner circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.spinner .track { stroke: var(--violet-100); }
.spinner .head  { stroke: var(--violet-600); stroke-dasharray: 150; stroke-dashoffset: 110; transform-origin: center; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* check animado */
.check-pop { width: 96px; height: 96px; }
.check-pop .ring { fill: var(--lime); }
.check-pop .tick { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .25s forwards cubic-bezier(.6,.2,.1,1); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* confetti */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(120vh) rotate(540deg); opacity: .9; } }

/* mapa esquemático */
.mapbox {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, #EEF6FF, #F3EFFF); border: 1.5px solid var(--line);
}
.map-pin { transition: transform .2s; }
.map-pin.is-target { animation: pinDrop .6s cubic-bezier(.34,1.6,.4,1) both; }
@keyframes pinDrop { 0% { transform: translateY(-40px) scale(.4); opacity: 0; } 60% { transform: translateY(4px) scale(1.1); } 100% { transform: translateY(0) scale(1); opacity: 1; } }

/* ticket */
.ticket {
  background: var(--card); border-radius: var(--r-lg); padding: var(--s5);
  box-shadow: var(--sh-md); position: relative; border: 1.5px solid var(--line);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); top: 50%; transform: translateY(-50%);
}
.ticket::before { left: -14px; box-shadow: inset -3px 0 0 var(--line); }
.ticket::after  { right: -14px; box-shadow: inset 3px 0 0 var(--line); }
.ticket__dash { border: none; border-top: 2.5px dashed var(--line); margin: var(--s4) 0; }

/* timeline materias */
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 3px; background: var(--violet-100); border-radius: 3px; }
.tl__node { position: relative; }
.tl__node::before { content: ""; position: absolute; left: -23px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--violet-300); border: 3px solid var(--paper); }
.tl__node.is-now::before { background: var(--coral); box-shadow: 0 0 0 4px #FFD9D2; }

/* avatar */
.avatar {
  width: 76px; height: 76px; border-radius: 26px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(150deg, var(--violet-300), var(--violet-500));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--round { border-radius: 50%; }

/* empty / hint personaje + texto */
.hint { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s6) var(--s4); }

/* toast */
.toast-layer { position: fixed; left: 0; right: 0; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: var(--violet-900); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  padding: 14px 20px; border-radius: var(--r-pill); box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: 10px; max-width: 88%;
  animation: toastIn .35s cubic-bezier(.34,1.6,.5,1) both;
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast svg { width: 20px; height: 20px; flex: none; }
@keyframes toastIn  { from { transform: translateY(30px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ====================== 11 · MICROINTERACCIONES ================ */
.pop-in { animation: popUp .45s cubic-bezier(.34,1.56,.5,1) both; }
@keyframes popUp { from { transform: scale(.6) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.rise > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.rise > *:nth-child(1){ animation-delay:.02s } .rise > *:nth-child(2){ animation-delay:.08s }
.rise > *:nth-child(3){ animation-delay:.14s } .rise > *:nth-child(4){ animation-delay:.2s }
.rise > *:nth-child(5){ animation-delay:.26s } .rise > *:nth-child(6){ animation-delay:.32s }
.rise > *:nth-child(7){ animation-delay:.38s } .rise > *:nth-child(8){ animation-delay:.44s }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.wiggle { animation: wiggle .5s ease; }
@keyframes wiggle { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-7deg)} 75%{transform:rotate(7deg)} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============== 12 · PANTALLAS CONCRETAS ======================= */

/* — SPLASH — */
.screen--splash {
  background: radial-gradient(120% 80% at 50% 18%, var(--violet-500), var(--violet-700) 70%, var(--violet-900));
  align-items: center; justify-content: center; gap: var(--s6); padding: var(--s8);
}
.splash-logo { animation: splashPop .8s cubic-bezier(.34,1.56,.5,1) both; }
@keyframes splashPop { 0%{ transform: scale(.4) rotate(-12deg); opacity: 0 } 60%{ transform: scale(1.08) rotate(4deg) } 100%{ transform: scale(1) rotate(0); opacity: 1 } }
.splash-word { font-family: var(--font-display); font-weight: 700; font-size: 40px; color: #fff; letter-spacing: -1px; }
.splash-word b { color: var(--yellow); }
.splash-sub { color: rgba(255,255,255,.85); font-weight: 700; }
.splash-dots { display: flex; gap: 8px; }
.splash-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); animation: bounceDot 1.1s infinite; }
.splash-dots i:nth-child(2){ animation-delay:.16s } .splash-dots i:nth-child(3){ animation-delay:.32s }
@keyframes bounceDot { 0%,100%{ transform: translateY(0); opacity:.5 } 50%{ transform: translateY(-10px); opacity:1 } }

/* — LOGIN — */
.screen--login { justify-content: center; gap: var(--s6); }
.uba-badge { display: inline-flex; align-items: center; gap: 8px; align-self: center; background: var(--violet-050); color: var(--violet-600); font-weight: 700; padding: 8px 16px; border-radius: var(--r-pill); font-size: 13px; }

/* — VALIDANDO — */
.screen--validating { align-items: center; justify-content: center; gap: var(--s5); }

/* — ROLE SELECT — */
.role-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); }
.role-card .char { flex: none; }

/* — HOME — */
.greet-name { font-family: var(--font-display); font-weight: 700; font-size: 27px; letter-spacing: -.5px; }
.hero-urgent { display: flex; align-items: center; gap: var(--s4); }
.hero-urgent .char { flex: none; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: var(--s2) 0; }
.section-title a { color: var(--violet-600); font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.hscroll { display: flex; gap: var(--s3); overflow-x: auto; margin: 0 calc(-1 * var(--s5)); padding: var(--s2) var(--s5); scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* — STAT mini cards — */
.statcard { padding: var(--s4); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 4px; }
.statcard b { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; }
.statcard span { font-weight: 700; font-size: 13px; }

/* — CAMPUS — */
.campus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.campus-tile { padding: var(--s4); border-radius: var(--r-md); display: flex; flex-direction: column; gap: var(--s2); background: var(--card); border: 1.5px solid var(--line); }
.campus-tile .char { align-self: center; }

/* room detail header */
.room-photo {
  height: 190px; border-radius: var(--r-lg); display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--violet-100), var(--violet-050));
}
.room-photo .pattern { position: absolute; inset: 0; opacity: .5; }
.room-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* compare table */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.compare-col { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.compare-col.is-best { border-color: var(--lime); box-shadow: 0 0 0 3px #E7F8DC; }
.compare-head { padding: var(--s4); background: var(--violet-050); }
.compare-row { padding: 11px var(--s4); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; border-top: 1px solid var(--line); }

/* fila admin con accept/reject */
.admin-actions { display: flex; gap: var(--s2); }
.icon-btn { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; transition: transform .14s; }
.icon-btn:active { transform: scale(.85); }
.icon-btn--ok { background: #E7F8DC; color: var(--lime-d); }
.icon-btn--no { background: #FFEEE9; color: var(--coral-d); }

/* perfil header */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: var(--s3); text-align: center; }
.toggle { width: 52px; height: 32px; border-radius: var(--r-pill); background: var(--violet-100); position: relative; transition: background .25s; flex: none; }
.toggle.is-on { background: var(--violet-600); }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .25s cubic-bezier(.34,1.6,.5,1); }
.toggle.is-on::after { transform: translateX(20px); }

/* accordion ayuda */
.acc { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.acc__q { width: 100%; text-align: left; padding: var(--s4); font-family: var(--font-display); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.acc__q .chev { transition: transform .25s; color: var(--violet-500); }
.acc.is-open .acc__q .chev { transform: rotate(180deg); }
.acc__a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; padding: 0 var(--s4); color: var(--ink-soft); font-weight: 600; line-height: 1.5; }
.acc.is-open .acc__a { max-height: 240px; padding: 0 var(--s4) var(--s4); }

/* progress bar (estado campus, ocupación) */
.bar { height: 12px; border-radius: var(--r-pill); background: var(--violet-100); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--lime), var(--lime-d)); transition: width .6s cubic-bezier(.3,1,.3,1); }
.bar.warn > i { background: linear-gradient(90deg, var(--yellow), var(--coral)); }

/* notification dot list */
.notif { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-md); background: var(--card); border: 1.5px solid var(--line); align-items: flex-start; }
.notif.is-unread { background: var(--violet-050); border-color: var(--violet-100); }
.notif__ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }

/* divider sutil */
.divider { height: 1.5px; background: var(--line); border: none; margin: var(--s3) 0; }

.back-page-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 1000;
}

.back-page-btn a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: white;
  color: #333;
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.back-page-btn a:hover {
  transform: translateY(-2px);
}