/* Pantallas sin sesión (login.html, invite.html). Misma identidad que el
   panel (app.css): nieve y tinta, Newsreader + IBM Plex. Claro por defecto;
   oscuro si se eligió en el panel. */
:root {
  color-scheme: light;
  --page: #F6F4EE;
  --surface: #FBFAF6;
  --ink: #1B2B45;
  --ink-2: #3F4A5C;
  --muted: #5B6472;
  --rule: #DAD6CC;
  --field: #FFFFFF;
  --mark: #7DB9AC;
  --mark-deep: #2F7D6F;
  --critical: #C2412D;
  --critical-bg: color-mix(in oklab, #C2412D 8%, transparent);
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #111A29;
  --surface: #16213A;
  --ink: #ECE9E1;
  --ink-2: #C3C6CC;
  --muted: #98A0AD;
  --rule: #2A3650;
  --field: #0D1522;
  --mark-deep: #7DB9AC;
  --critical-bg: color-mix(in oklab, #C2412D 18%, transparent);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
/* Sin caja: la pantalla es la hoja. Una regla arriba separa la marca. */
.card { width: 100%; max-width: 380px; }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.brand .wordmark { font: 400 22px/1 var(--sans); }
.brand .wordmark b { font-weight: 700; }
.brand .by { margin-left: auto; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

h2 { font: 400 26px/1.2 var(--serif); margin: 0 0 8px; letter-spacing: -0.01em; }
.lead { color: var(--ink-2); margin: 0 0 22px; font-size: 14.5px; }
.lead strong { color: var(--ink); font-weight: 600; }

label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 6px; color: var(--muted); }
.field { margin-bottom: 18px; }
.hint-text { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mark) 35%, transparent); }
input[readonly] { color: var(--ink-2); background: transparent; }
.pw { position: relative; }
.pw input { padding-right: 80px; }
.toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 0;
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.toggle:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
:focus-visible { outline: 2px solid var(--mark-deep); outline-offset: 2px; }

.error {
  display: none; align-items: flex-start; gap: 8px;
  background: var(--critical-bg); color: var(--ink);
  border-left: 3px solid var(--critical);
  padding: 10px 12px; margin-bottom: 18px; font-size: 14px;
}
.error.show { display: flex; }
.error svg { flex: none; margin-top: 2px; }

.primary {
  width: 100%;
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--page); background: var(--ink);
  border: 0; border-radius: 999px; padding: 12px 18px; margin-top: 6px; min-height: 46px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .15s;
}
.primary:hover { opacity: .9; }
.primary:disabled { cursor: progress; opacity: .75; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--page) 35%, transparent); border-top-color: var(--page);
  animation: spin .7s linear infinite; display: none;
}
.primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* Botón de Google: fondo claro con la "G" de colores, como pide Google. */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0 16px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
  font: inherit; font-size: 15px; font-weight: 500; color: #1f1f1f; background: #fff;
  border: 1px solid #dadce0; border-radius: 999px; padding: 10px 16px; text-decoration: none; cursor: pointer;
}
.google:hover { background: #f7f8f8; }
.google[hidden] { display: none; }

.foot { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.foot a { color: var(--mark-deep); }
