/* Acceso de administradores (admin-auth.js): pantalla completa y ventana.
   Archivo duplicado en worker-users/public/admin/auth.css (una prueba exige que sean idénticos). */
.al-screen, dialog.admin-login {
  --al-bg: #f4f6f3; --al-card: #ffffff; --al-text: #16201a; --al-muted: #5d6b62; --al-line: #d9e0da;
  --al-field: #ffffff; --al-brand: #2f6b1d; --al-brand-hover: #275a18; --al-brand-ink: #ffffff;
  --al-danger: #b3261e; --al-ring: rgba(47, 107, 29, .28);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--al-text);
}
@media (prefers-color-scheme: dark) {
  .al-screen, dialog.admin-login {
    --al-bg: #0d130f; --al-card: #151d17; --al-text: #eef3ef; --al-muted: #9db0a2; --al-line: #263329;
    --al-field: #0f1612; --al-brand: #5aa83a; --al-brand-hover: #6dbb4b; --al-brand-ink: #08130a;
    --al-danger: #ff8a80; --al-ring: rgba(109, 187, 75, .35);
  }
}

/* ── Pantalla completa ─────────────────────────────── */
.al-screen { position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--al-bg); overflow: auto; }
.al-brand { display: none; }
.al-main { display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; padding: 24px 16px; min-height: 100%; }
.al-compact-logo { height: 40px; width: auto; background: #fff; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--al-line); }
.al-compact-wordmark { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--al-brand); }
.al-card { width: min(440px, 100%); background: var(--al-card); border: 1px solid var(--al-line); border-radius: 20px; padding: 32px 28px; box-shadow: 0 24px 60px rgba(14, 30, 18, .12); }
@media (min-width: 960px) {
  .al-compact-logo, .al-compact-wordmark { display: none; }
  .al-screen { grid-template-columns: minmax(380px, 5fr) 7fr; }
  .al-brand {
    display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 64px;
    color: #f2f8ef; background:
      radial-gradient(900px 500px at 15% 10%, rgba(120, 190, 80, .35), transparent 60%),
      radial-gradient(700px 480px at 90% 95%, rgba(217, 45, 32, .28), transparent 60%),
      linear-gradient(160deg, #123a14 0%, #1f5a1b 55%, #2c7020 100%);
  }
  .al-logo { width: 220px; max-width: 100%; height: auto; background: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
  .al-wordmark { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
  .al-headline { margin: 0; font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; max-width: 14ch; }
  .al-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; color: rgba(242, 248, 239, .85); }
  .al-points li { display: flex; gap: 10px; align-items: center; }
  .al-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9be06f; flex: none; }
}

/* ── Contenido (pantalla y ventana) ─────────────────── */
dialog.admin-login { border: 1px solid var(--al-line); border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--al-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog.admin-login::backdrop { background: rgba(8, 14, 10, .55); backdrop-filter: blur(3px); }
.admin-login .al-body { padding: 32px; }
.al-body { display: flex; flex-direction: column; gap: 14px; }
.al-screen .al-body { padding: 0; }
.al-body h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.al-step { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--al-brand); }
.al-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--al-muted); }
.al-form { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.al-body label { position: relative; display: flex; flex-direction: column; gap: 6px; }
.al-body label > span { font-size: 13px; font-weight: 600; color: var(--al-text); }
.al-body input { font: inherit; font-size: 15px; height: 46px; padding: 0 14px; border: 1px solid var(--al-line); border-radius: 12px; background: var(--al-field); color: var(--al-text); outline: none; transition: border-color .15s, box-shadow .15s; }
.al-body input::placeholder { color: var(--al-muted); opacity: .7; }
.al-body input:focus { border-color: var(--al-brand); box-shadow: 0 0 0 4px var(--al-ring); }
.al-body input[name=code] { font-size: 26px; height: 56px; letter-spacing: .35em; text-align: center; font-weight: 700; }
.al-eye { position: absolute; right: 6px; bottom: 5px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--al-muted); cursor: pointer; }
.al-eye:hover { background: var(--al-line); }
.al-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.al-actions > button { flex: 1; }
.al-body button { font: inherit; font-size: 15px; font-weight: 700; height: 46px; border-radius: 12px; padding: 0 20px; cursor: pointer; border: 1px solid transparent; transition: background .15s, transform .05s; }
.al-body button:active:not(:disabled) { transform: translateY(1px); }
.al-primary { background: var(--al-brand); color: var(--al-brand-ink); }
.al-primary:hover:not(:disabled) { background: var(--al-brand-hover); }
.al-secondary { background: transparent; border-color: var(--al-line) !important; color: var(--al-text); }
.al-secondary:hover:not(:disabled) { background: var(--al-line); }
.al-link { height: auto !important; padding: 4px 0 !important; align-self: center; background: transparent; color: var(--al-muted); font-weight: 600 !important; font-size: 14px !important; }
.al-link:hover { color: var(--al-text); text-decoration: underline; }
.al-body button:disabled { opacity: .6; cursor: default; }
.al-body button:focus-visible { outline: 3px solid var(--al-ring); outline-offset: 2px; }
.al-qr { align-self: center; width: 176px; height: 176px; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--al-line); }
.al-secret { display: block; word-break: break-all; padding: 10px 12px; background: var(--al-field); border: 1px dashed var(--al-line); border-radius: 10px; font-size: 13px; letter-spacing: .04em; user-select: all; }
.al-notice { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; background: color-mix(in srgb, var(--al-brand) 12%, transparent); color: var(--al-text); border: 1px solid color-mix(in srgb, var(--al-brand) 35%, transparent); }
.al-message { margin: 0; min-height: 1.2em; font-size: 13.5px; font-weight: 600; color: var(--al-danger); }
body.is-locked { overflow: hidden; }

/* Enlaces de texto (¿Olvidaste tu contraseña?, volver…) */
.al-anchor { display: inline-block; align-self: center; padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--al-muted); text-decoration: none; }
.al-anchor:hover { color: var(--al-text); text-decoration: underline; }
.al-form > .al-link, .al-form > .al-anchor { align-self: flex-end; margin-top: -6px; }
.al-link, .al-anchor { cursor: pointer; }
