/* Pantalla formador — independiente del marcador de llamada */

.page-formador {
  overflow: auto !important;
  -webkit-user-select: text;
  user-select: text;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(52, 199, 89, 0.12), transparent 55%),
    var(--bg);
}

.page-formador [hidden] {
  display: none !important;
}

.formador-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem calc(1.5rem + var(--safe-bottom));
}

.formador-shell {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.formador-brand {
  text-align: center;
}

.formador-brand .brand-wordmark {
  width: min(100%, 17rem);
  max-height: none;
  margin-bottom: 0.65rem;
  object-fit: contain;
}

@media (max-width: 400px) {
  .formador-brand .brand-wordmark {
    width: min(100%, 14.5rem);
  }

  .formador-brand h1 {
    font-size: 1.25rem;
  }
}


.formador-brand h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.formador-lead {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.formador-card {
  background: rgba(22, 22, 24, 0.92);
  border: 1px solid #2a2a2e;
  border-radius: 18px;
  padding: 1.25rem 1.2rem 1.35rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.formador-card-code {
  text-align: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 1.15rem;
  background: #0e0e10;
  border-radius: 12px;
  border: 1px solid #27272a;
}

.auth-tabs button {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  font-weight: 550;
  font-size: 0.95rem;
}

.auth-tabs button.active {
  background: #232326;
  color: var(--fg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.formador-form .field {
  margin-bottom: 0.9rem;
}

.formador-form .field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.formador-form .optional {
  color: #71717a;
  font-weight: 400;
}

.formador-form .field input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid #3f3f46;
  background: #0e0e10;
  color: var(--fg);
}

.formador-form .field input:focus {
  outline: none;
  border-color: rgba(52, 199, 89, 0.65);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.15);
}

.formador-form .btn-primary {
  margin-top: 0.35rem;
}

.formador-link {
  display: block;
  margin-top: 0.95rem;
  text-align: center;
  color: #7eb6ff;
  text-decoration: none;
  font-size: 0.9rem;
}

.formador-link:hover {
  text-decoration: underline;
}

.formador-hint {
  margin: 0.85rem 0 0;
  color: #71717a;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.formador-footer {
  text-align: center;
  padding-bottom: 0.5rem;
}

.msg {
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
  line-height: 1.35;
}

.msg.err {
  color: #ff6961;
}

.msg.ok {
  color: #34c759;
}

.code-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-big {
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  letter-spacing: 0.28em;
  text-align: center;
  font-weight: 700;
  margin: 0 auto;
  padding: 1.1rem 0.75rem 1.1rem 1rem;
  background: #0e0e10;
  border-radius: 16px;
  border: 1px solid rgba(52, 199, 89, 0.35);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.code-meta {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.formador-card-code .btn-primary {
  margin-top: 1.15rem;
  width: 100%;
}

.formador-card-code .btn-ghost {
  margin-top: 0.65rem;
}

/* —— Manual de ayuda —— */
.formador-page-help {
  align-items: flex-start;
}

.formador-shell-help {
  max-width: 36rem;
  padding-bottom: 2rem;
}

.help-toc-title {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.help-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg);
  line-height: 1.7;
}

.help-toc a {
  color: var(--blue);
  text-decoration: none;
}

.help-toc a:hover {
  text-decoration: underline;
}

.help-article h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.help-article h3 {
  margin: 1rem 0 0.45rem;
  font-size: 0.95rem;
  color: #d4d4d8;
}

.help-article p,
.help-article li {
  color: #d4d4d8;
  font-size: 0.92rem;
  line-height: 1.5;
}

.help-article p {
  margin: 0 0 0.65rem;
}

.help-article ul,
.help-article .help-steps {
  margin: 0.35rem 0 0.65rem;
  padding-left: 1.2rem;
}

.help-article .help-steps li + li,
.help-article ul li + li {
  margin-top: 0.35rem;
}

.help-article code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #0f0f10;
  color: #a1a1aa;
}

.help-article .formador-hint {
  text-align: left;
}

.help-quote {
  margin: 0.5rem 0 0.85rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid rgba(52, 199, 89, 0.55);
  background: rgba(10, 10, 11, 0.55);
  border-radius: 0 10px 10px 0;
  color: #e4e4e7;
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
}

.help-footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.formador-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  align-items: center;
}

.legal-accept {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.35rem 0 0.85rem;
  color: #d4d4d8;
  font-size: 0.88rem;
  line-height: 1.45;
  cursor: pointer;
}

.metronome-option {
  margin: 1rem 0 0.5rem;
  text-align: left;
}

.legal-accept input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.legal-accept span {
  flex: 1;
  min-width: 0;
}

.legal-accept .formador-link {
  display: inline;
  margin: 0;
  font-size: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

