/* Lobby de apps de Agencia Rueda. Mismo aspecto que el tablero de tareas y el planner (rojo de la agencia #ff0000).
   Sin fuentes ni recursos externos. Sin estilos en línea: la CSP solo deja los de /static. */

:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f0efec;
  --borde: #e3e1dc;
  --borde-fuerte: #cdcac3;
  --texto: #1d1d1b;
  --suave: #6b6a66;
  --acento: #ff0000;
  --acento-tinta: #ffffff;
  --acento-suave: #ffe5e5;
  --c-yellow-bg: #fbf0c7; --c-yellow: #7a5b00;
  --sombra: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .06);
  --sombra-fuerte: 0 8px 28px rgba(0, 0, 0, .14);
  --radio: 10px;
  --radio-sm: 6px;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--texto); font: 15px/1.5 var(--fuente); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; line-height: 1.25; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.suave { color: var(--suave); }
.chico { font-size: 13px; }
.carga-inicial { padding: 40px 16px; text-align: center; color: var(--suave); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px; border: 1px solid var(--borde-fuerte); background: var(--surface); border-radius: var(--radio-sm); white-space: nowrap; font-weight: 500; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn.grande { min-height: 52px; padding: 10px 22px; font-size: 17px; font-weight: 600; border-radius: var(--radio); }
.btn.primario { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); }
.btn.primario:hover:not(:disabled) { background: #d90000; }
.btn.fantasma { border-color: transparent; background: none; }
.btn.fantasma:hover:not(:disabled) { background: var(--surface-2); }
.ico { flex: none; vertical-align: -3px; }

/* ---------- páginas sueltas (ingreso, errores) ---------- */
.centro { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; }
.tarjeta-centro { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra); padding: 36px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.logo { width: 52px; height: 52px; border-radius: 14px; background: var(--acento); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.marca-texto { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
.aviso-login { background: var(--c-yellow-bg); color: var(--c-yellow); padding: 8px 12px; border-radius: var(--radio-sm); font-size: 14px; }
.tarjeta-centro .btn.grande { width: 100%; }

/* ---------- el lobby ---------- */
.pagina { max-width: 960px; margin: 0 auto; padding: 0 20px 48px; }
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--borde); }
.marca-cabecera { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marca-cabecera .logo { width: 34px; height: 34px; border-radius: 9px; font-size: 18px; flex: none; }
.marca-cabecera-texto { font-weight: 700; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cabecera-der { display: flex; align-items: center; gap: 8px; flex: none; }
.quien { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.saludo { padding: 36px 0 20px; display: flex; flex-direction: column; gap: 4px; }

.apps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app-tarjeta { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra); text-decoration: none; color: var(--texto); }
.app-tarjeta:hover { border-color: var(--acento); box-shadow: var(--sombra-fuerte); }
.app-tarjeta:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 14px; }
.app-icono { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 14px; background: var(--acento-suave); color: var(--acento); }
.app-icono svg { width: 28px; height: 28px; }
.app-tarjeta:hover .app-icono { background: var(--acento); color: #fff; }
.app-nombre { font-size: 19px; }
.app-desc { color: var(--suave); font-size: 14px; overflow-wrap: anywhere; }

@media (max-width: 599px) {
  .pagina { padding: 0 16px 40px; }
  .cabecera { padding: 14px 0; }
  .quien { display: none; }
  .saludo { padding: 24px 0 16px; }
  .apps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .app-tarjeta { padding: 18px; }
}

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

/* menu-apps: inicio */
/* El menú para pasar de una app a otra (public/menu-apps.js). Este bloque es idéntico en las cuatro apps. */
.menu-apps { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.menu-apps-item {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px;
  border: 1px solid #cdcac3; border-radius: 999px;
  background: #ffffff; color: #1d1d1b;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
}
.menu-apps-item svg { flex: none; }
.menu-apps-item:hover { border-color: #ff0000; color: #ff0000; }
.menu-apps-item:focus-visible { outline: 3px solid #ff0000; outline-offset: 2px; }
.menu-apps-lobby { background: #1d1d1b; border-color: #1d1d1b; color: #ffffff; }
.menu-apps-lobby:hover { background: #ff0000; border-color: #ff0000; color: #ffffff; }
@media (max-width: 599px) {
  .menu-apps { gap: 4px; }
  .menu-apps-item { padding: 0; width: 34px; justify-content: center; }
  .menu-apps-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* menu-apps: fin */
