/* Estilos de /login, /pendiente, /clave, /conectar y /admin. Los tokens están en tema.css (ver DESIGN.md). */
@import url("/static/tema.css");
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh; padding: 32px 16px;
  background: var(--page); color: var(--text-primary); font: 14px/1.5 var(--font);
  font-feature-settings: "cv11" 1, "ss01" 1; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; touch-action: manipulation; }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.mark svg { stroke: #fff; }
h1 { font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.025em; margin: 0; }
h2, .card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--text-primary); }
h2.sec { font-size: 13px; font-weight: 500; color: var(--text-muted); margin: 28px 0 10px; letter-spacing: 0; }
.card { padding: 26px; background: var(--surface-1); border-radius: var(--radius); box-shadow: var(--shadow); }
.card p, .lead { color: var(--text-secondary); margin: 0 0 14px; }
label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
input, select, textarea {
  width: 100%; height: 46px; padding: 0 16px; color: var(--text-primary); background: var(--raised);
  border: 1px solid transparent; border-radius: 16px; font-size: 15px;
}
input:hover, select:hover { border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder { color: var(--text-muted); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.code { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; text-transform: uppercase; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-weight: 500; text-decoration: none; cursor: pointer; transition: opacity .15s, transform .15s;
}
button:hover, .btn:hover { opacity: 0.88; }
button:active, .btn:active { transform: scale(0.98); }
button:disabled { opacity: 0.5; cursor: progress; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.wide { width: 100%; }
.ghost { background: var(--raised); color: var(--text-primary); border: 0; font-weight: 500; }
.ghost:hover { background: var(--wash); opacity: 1; }
.strava { background: var(--strava); color: #fff; }
.msg { min-height: 20px; margin: 10px 0 0; font-size: 13px; }
.msg.err { color: var(--critical); }
.msg.info { color: var(--text-secondary); }
.msg.ok { color: var(--good-text); }
.foot { color: var(--text-muted); font-size: 13px; margin-top: 16px; line-height: 1.55; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 5px; margin-bottom: 22px; background: var(--raised); border-radius: 999px; }
.tabs button { min-height: 40px; background: none; color: var(--text-muted); font-weight: 500; }
.tabs button:hover { color: var(--text-primary); opacity: 1; }
.tabs button[aria-selected="true"] { background: var(--primary); color: var(--on-primary); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.roles legend { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
.roles label { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--raised); cursor: pointer; font-weight: 400; }
.roles input { width: auto; height: auto; margin-top: 3px; accent-color: var(--accent); }
.roles b { display: block; color: var(--text-primary); font-weight: 600; font-size: 14px; }
.roles label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.roles label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.state { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--text-secondary); }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex: none; }
.state.on i { background: var(--good); }
.list { list-style: none; padding: 0; margin: 0 0 12px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list button, .list .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row input { flex: 1; min-width: 140px; }
.invite { margin-top: 12px; padding: 16px; background: var(--raised); border-radius: 18px; font-size: 13px; color: var(--text-secondary); word-break: break-all; }
.invite b { display: block; margin-bottom: 4px; font-size: 24px; letter-spacing: 0.18em; color: var(--text-primary); font-weight: 600; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { button, .btn { transition: none; } button:active, .btn:active { transform: none; } }

/* botón de tema (static/tema.js) y su revelado circular */
#theme-fab {
  position: fixed; z-index: 30; top: 16px; right: 16px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--surface-1); color: var(--text-primary); font: 500 13px var(--font); cursor: pointer; box-shadow: var(--shadow);
}
#theme-fab:hover { background: var(--wash); }
#theme-fab.in-header { position: static; background: var(--raised); box-shadow: none; }
#theme-fab.in-header:hover { background: var(--wash); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2147483646; }
