/* El shell de una app en su subdominio (shell.js) y sus páginas de aviso: los mismos tokens que la página de sesión
   cerrada del builder (sesion-cerrada.css). La marca de la organización o de la app llega en /shell/marca.css (solo
   variables con colores ya validados en el servidor), que va después de esta hoja y la pisa. */
:root {
  color-scheme: light dark;
  --bg-from: #162456;
  --bg-to: #1c398e;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #101828;
  --text-muted: #4a5565;
  --accent: #155dfc;
  --accent-hover: #1447e6;
  --accent-text: #ffffff;
  --danger-bg: #fef2f2;
  --danger-text: #9f0712;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-from: #0b1120;
    --bg-to: #162456;
    --surface: #101828;
    --border: #1e2939;
    --text: #f3f4f6;
    --text-muted: #b4bac5;
    --accent: #51a2ff;
    --accent-hover: #8ec5ff;
    --accent-text: #0b1120;
    --danger-bg: #460809;
    --danger-text: #ffc9c9;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--surface);
}

/* La página del shell: la app ocupa todo (un aviso arriba solo si algo falla). */
body.shell { display: flex; flex-direction: column; }
.aviso-shell {
  margin: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 14px;
}
.aviso-shell[hidden] { display: none; }
.marco-app { flex: 1; width: 100%; border: 0; display: block; }

/* Las páginas de aviso (login, sin acceso, sesión cerrada): una tarjeta sobre el fondo de la marca. */
body.aviso {
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(rgb(255 255 255 / 0.09) 1.2px, transparent 1.2px) 0 0 / 24px 24px,
    linear-gradient(135deg, var(--bg-from), var(--bg-to));
}
.card {
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}
.aviso-logo { display: block; height: 40px; width: auto; max-width: 200px; margin: 0 0 20px; object-fit: contain; }
h1 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.body { margin: 0 0 24px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.button {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--accent-hover); }
.button:focus-visible { outline: 3px solid rgb(21 93 252 / 0.45); outline-offset: 2px; }
