/* Pantallas de entrada del panel (login, código, Face ID, Mi acceso) · 15-oct-2026 · Mario: «deja solo la llama».
   Columna limpia al estilo de Linear/Vercel/Stripe: marca pequeña arriba, título corto, una tarjeta discreta, campos
   altos (cómodos en el iPhone) y un único botón principal. Se carga en el hook app_admin_authentication_head, ANTES de
   magma_ui.css: por eso los selectores llevan «html body…» para ganar a sus !important sin tocar ese fichero común. */

html body.login_admin,
html body.authentication {
  --ma-bg: #f7f7f8;
  --ma-card: #ffffff;
  --ma-line: #e4e4e7;
  --ma-line-strong: #d4d4d8;
  --ma-text: #18181b;
  --ma-muted: #71717a;
  --ma-ink: #18181b;
  --ma-ink-hover: #000000;
  --ma-ink-text: #ffffff;
  --ma-ring: rgba(24, 24, 27, .16);
  --ma-error: #b42318;
  --ma-ok: #067647;
  background: var(--ma-bg) !important;
  color: var(--ma-text);
  min-height: 100dvh;
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  html body.login_admin,
  html body.authentication {
    --ma-bg: #0a0a0b;
    --ma-card: #141416;
    --ma-line: #26262a;
    --ma-line-strong: #3a3a40;
    --ma-text: #f4f4f5;
    --ma-muted: #a1a1aa;
    --ma-ink: #fafafa;
    --ma-ink-hover: #ffffff;
    --ma-ink-text: #0a0a0b;
    --ma-ring: rgba(250, 250, 250, .22);
    --ma-error: #f97066;
    --ma-ok: #47cd89;
    color-scheme: dark;
  }
}

/* Columna */
html body .authentication-form-wrapper {
  max-width: 400px !important;
  margin: 0 auto !important;
  padding: max(10vh, 48px) 16px 40px !important;
}
@media (max-width: 575px) {
  html body .authentication-form-wrapper { padding-top: max(7vh, 32px) !important; }
}

/* Marca: solo la llama (el logo de texto se esconde). Máscara = toma el color del tema. */
html body .authentication-form-wrapper .company-logo {
  display: flex !important;
  justify-content: center;
  padding: 0 0 22px !important;
  margin: 0 !important;
}
html body .authentication-form-wrapper .company-logo > * { display: none !important; }
html body .authentication-form-wrapper .company-logo::before {
  content: "";
  width: 96px;
  height: 43px; /* [DEMO IMC] logo IMC (llama.svg ahora es el logotipo) */
  background-color: var(--ma-text);
  -webkit-mask: url("llama.svg") center / contain no-repeat;
  mask: url("llama.svg") center / contain no-repeat;
}

/* Títulos */
html body.login_admin h1,
html body.authentication h1 {
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 650 !important;
  letter-spacing: -0.022em;
  color: var(--ma-text) !important;
  text-align: center;
  margin: 0 0 6px !important;
}
html body.login_admin h1 + p,
html body.authentication h1 + p,
html body.authentication h1 + h3 {
  font-size: 14.5px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  color: var(--ma-muted) !important;
  text-align: center;
  margin: 0 0 24px !important;
}
html body.login_admin .text-center.tw-mb-5,
html body.authentication .text-center.tw-mb-5 { margin-bottom: 0 !important; }

/* Tarjeta */
html body.login_admin .tw-bg-white,
html body.authentication .tw-bg-white,
html body .ma-card {
  background: var(--ma-card) !important;
  border: 1px solid var(--ma-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(0, 0, 0, .08) !important;
  padding: 24px !important;
  margin: 0 !important;
}
html body.login_admin .tw-bg-white::before { display: none !important; }   /* filo rojo de magma_ui.css */

/* Campos */
html body.login_admin .form-group,
html body.authentication .form-group { margin-bottom: 16px !important; margin-top: 0 !important; }
html body.login_admin .control-label,
html body.authentication .control-label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--ma-text) !important;
  margin: 0 0 6px !important;
}
html body.login_admin .tw-mb-3 { margin-bottom: 6px !important; }
html body.login_admin .form-group .tw-items-end a.text-muted {
  font-size: 13px !important;
  color: var(--ma-muted) !important;
}
html body.login_admin .form-control,
html body.authentication .form-control {
  height: 46px !important;
  padding: 0 14px !important;
  font-size: 16px !important;               /* el iPhone no hace zoom */
  border-radius: 10px !important;
  border: 1px solid var(--ma-line-strong) !important;
  background: var(--ma-card) !important;
  color: var(--ma-text) !important;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
html body.login_admin .form-control:focus,
html body.authentication .form-control:focus {
  border-color: var(--ma-ink) !important;
  box-shadow: 0 0 0 3px var(--ma-ring) !important;
  outline: none !important;
}
html body.authentication input#code {
  text-align: center;
  font-size: 22px !important;
  letter-spacing: .32em;
  font-variant-numeric: tabular-nums;
  font-family: "Geist Mono", ui-monospace, monospace;
}

/* Casillas */
html body.login_admin .checkbox label,
html body.authentication .checkbox label { font-size: 14px !important; color: var(--ma-text) !important; line-height: 1.4; }

/* Botones */
html body.login_admin .btn-primary,
html body.authentication .btn-primary {
  height: 46px;
  padding: 0 16px !important;
  border-radius: 10px !important;
  border: 0 !important;
  background: var(--ma-ink) !important;
  color: var(--ma-ink-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em;
  box-shadow: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .05s;
}
html body.login_admin .btn-primary:hover,
html body.authentication .btn-primary:hover { background: var(--ma-ink-hover) !important; }
html body.login_admin .btn-primary:active,
html body.authentication .btn-primary:active { transform: scale(.99); }
html body .tw-mt-6 { margin-top: 20px !important; }

/* «Entrar con Face ID»: segundo botón, con borde */
html body #ma-entrar-btn {
  height: 46px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px !important;
  border: 1px solid var(--ma-line-strong) !important;
  background: var(--ma-card) !important;
  color: var(--ma-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  padding: 0 16px !important;
}
html body #ma-entrar-btn:hover { border-color: var(--ma-ink) !important; }
html body #ma-entrar-btn svg { margin: 0 !important; }
html body .ma-o {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--ma-muted);
  font-size: 12.5px;
}
html body .ma-o::before,
html body .ma-o::after { content: ""; flex: 1; height: 1px; background: var(--ma-line); }

/* Enlaces secundarios (Volver, Prefiero el correo, Ahora no…) */
html body .ma-sec,
html body.authentication .form-group > a {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--ma-muted) !important;
  text-decoration: none !important;
}
html body .ma-sec:hover,
html body.authentication .form-group > a:hover { color: var(--ma-text) !important; }
html body .ma-msg { font-size: 13.5px; text-align: center; margin: 10px 0 0; min-height: 1em; }

/* reCAPTCHA centrado */
html body.login_admin .g-recaptcha { display: flex; justify-content: center; }

/* Pantallas propias (_marco.php) */
html body .ma-big { height: 50px; font-size: 16px !important; }
html body .ma-lista { list-style: none; margin: 0; padding: 0; }
html body .ma-lista li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--ma-line); }
html body .ma-lista li:first-child { border-top: 0; padding-top: 4px; }
html body .ma-ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ma-bg); color: var(--ma-text); border: 1px solid var(--ma-line);
}
html body .ma-lista .ma-txt { flex: 1; min-width: 0; }
html body .ma-lista .ma-txt b { display: block; color: var(--ma-text); font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .ma-lista .ma-txt small { color: var(--ma-muted); font-size: 12.5px; }
html body .ma-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ma-muted); font-weight: 600; margin: 24px 0 6px; }
html body .ma-h:first-child { margin-top: 0; }
html body .ma-tag { display: inline-block; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--ma-ok) 14%, transparent); color: var(--ma-ok); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; }
html body .ma-x { border: 0; background: none; color: var(--ma-error); font-weight: 600; font-size: 14px; padding: 8px 4px; cursor: pointer; }
html body .ma-vacio { color: var(--ma-muted); font-size: 14px; margin: 0 0 4px; }
html body .ma-hero {
  width: 64px; height: 64px; margin: 4px auto 18px; border-radius: 18px; display: grid; place-items: center;
  background: var(--ma-bg); border: 1px solid var(--ma-line); color: var(--ma-text);
}
html body .ma-nota { font-size: 13px; color: var(--ma-muted); text-align: center; margin: 14px 0 0; line-height: 1.45; }
html body button.ma-sec { border: 0; background: none; width: 100%; padding: 0; cursor: pointer; }

/* Ajustes finos tras ver las capturas */
html body.login_admin .form-group .tw-items-end { align-items: baseline !important; margin-bottom: 6px !important; }
html body.login_admin .form-group .tw-items-end .control-label { margin: 0 !important; }
html body.login_admin .form-group .checkbox,
html body.authentication .form-group .checkbox { margin: 4px 0 0 !important; }
html body.login_admin .form-group:has(.checkbox) { margin-bottom: 4px !important; }
html body .checkbox label::before { background: var(--ma-card) !important; border-color: var(--ma-line-strong) !important; border-radius: 5px !important; }
html body .checkbox input:checked + label::before { background: var(--ma-ink) !important; border-color: var(--ma-ink) !important; }
html body .checkbox input:checked + label::after { color: var(--ma-ink-text) !important; }
html body .ma-msg:empty { display: none; }
html body.authentication h1 + h3 { margin-bottom: 24px !important; }
