/* AllConnected v2 · pantallas de acceso (registration/_auth_base.html y sus hijas).
 * Se carga sobre tokens.css + shell.css + components.css. En estas páginas NO existen
 * .sidebar / .topbar / .main-content: si shell.css algún día agrega una regla global
 * tipo body { padding-left: var(--ac-sidebar-w) } rompe el login.
 * Solo tokens --ac-* (cero hex); los colores de marketplace llegan por --ac-mkp-<codigo>. */

/* ---------- Página ---------- */
.auth-body { margin: 0; min-height: 100dvh; background: var(--ac-bg); color: var(--ac-text); font-family: var(--ac-font-sans); }

/* ---------- Barra superior ---------- */
.auth-nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--ac-topbar-h);
  background: var(--ac-topbar-bg); border-bottom: 1px solid var(--ac-topbar-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.auth-nav-inner { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-nav-brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ac-text); min-width: 0; }
.auth-nav-brand .brand-icon { width: 28px; height: 28px; flex: 0 0 28px; }
.auth-nav-brand .brand-text { font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem; white-space: nowrap; }
.auth-nav-brand:hover { color: var(--ac-primary); }
.auth-nav-areas .btn { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 36px; font-weight: 600; white-space: nowrap; }
.auth-nav-areas .btn i { font-size: 1rem; }
.auth-nav-areas .btn[aria-pressed="true"] { background: var(--ac-surface); color: var(--ac-text); box-shadow: var(--ac-shadow-sm); }
.auth-nav-areas .btn[data-area="marketing"][aria-pressed="true"] i { color: var(--ac-marketing); }
.auth-nav-areas .btn[data-area="operacion"][aria-pressed="true"] i { color: var(--ac-primary); }
.auth-nav-areas .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.auth-areas-note { display: flex; align-items: flex-start; gap: 0.35rem; margin: -0.4rem 0 1rem; font-size: 0.78rem; color: var(--ac-text-2); }
.auth-areas-note[hidden] { display: none; }
.auth-nav-right { display: inline-flex; align-items: center; gap: 0.5rem; }
.auth-nav-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ac-text-2); text-decoration: none; font-size: 0.84rem; font-weight: 600; padding: 0.4rem 0.7rem; border-radius: 10px; }
.auth-nav-link:hover { color: var(--ac-text); background: var(--ac-surface-3); }
.auth-nav-theme { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ac-text-2); font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; }
.auth-nav-theme:hover { background: var(--ac-surface-3); color: var(--ac-text); }

/* ---------- Layout ---------- */
.auth-shell {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px); gap: 2.5rem; align-items: start;
  max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem 2.5rem;
  min-height: calc(100dvh - var(--ac-topbar-h)); overflow-x: clip;
}
/* La tarjeta arranca arriba y se queda a la vista aunque el panel ilustrativo sea más alto que el viewport. */
.auth-main { min-width: 0; position: sticky; top: calc(var(--ac-topbar-h) + 1.5rem); align-self: start; }

/* ---------- Panel de marca (ilustrativo) ---------- */
.auth-panel {
  position: relative; min-width: 0;
  background: linear-gradient(160deg, var(--ac-primary-soft) 0%, transparent 55%), var(--ac-surface-2);
  border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg);
  padding: 1.75rem 1.75rem 1.4rem; display: flex; flex-direction: column; gap: 1.25rem;
}
[data-bs-theme="dark"] .auth-panel { background: linear-gradient(180deg, var(--ac-sidebar-bg-2), var(--ac-bg)); }
.auth-panel--off { opacity: 0.6; }
.auth-panel--off *, .auth-panel--off *::before, .auth-panel--off *::after { animation: none !important; }
.auth-panel-head { display: flex; flex-direction: column; gap: 0.45rem; }
.auth-kicker { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ac-text-3); }
.auth-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac-success); flex: 0 0 8px; animation: authPulse 2.2s ease-out infinite; }
.auth-live-dot[data-tone="off"] { background: var(--ac-neutral); animation: none; }
.auth-demo { display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: var(--ac-radius-pill); background: var(--ac-neutral-bg); color: var(--ac-neutral-fg); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.auth-panel-title { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: var(--ac-text); }
.auth-panel-lead { margin: 0; font-size: var(--ac-fs-md); color: var(--ac-text-2); max-width: 56ch; }

/* flujo Marketplaces → AllConnected → ERP → Despacho */
.auth-flow { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr; align-items: center; gap: 0.35rem; }
.auth-flow-node { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; padding: 0.8rem 0.5rem; min-width: 0; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); background: var(--ac-surface); }
.auth-flow-node[data-node="ac"] { background: var(--ac-primary-soft); border-color: color-mix(in srgb, var(--ac-primary) 40%, transparent); }
.auth-flow-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--ac-surface-3); color: var(--ac-text-2); }
.auth-flow-node[data-node="ac"] .auth-flow-icon { background: var(--ac-surface); }
.auth-flow-node[data-node="ac"] .brand-icon { width: 24px; height: 24px; }
.auth-flow-node[data-node="erp"] .auth-flow-icon { background: color-mix(in srgb, var(--ac-mkp-retailmind, var(--ac-accent)) 14%, var(--ac-surface)); color: var(--ac-mkp-retailmind-fg, var(--ac-accent)); }
.auth-flow-node[data-node="despacho"] .auth-flow-icon { background: var(--ac-info-bg); color: var(--ac-info-fg); }
.auth-flow-name { font-size: 0.8rem; font-weight: 700; color: var(--ac-text); }
.auth-flow-sub { font-size: 0.7rem; color: var(--ac-text-3); font-weight: 600; line-height: 1.2; }
.auth-flow-link { width: 100%; height: 8px; overflow: visible; }
.auth-flow-link line { stroke: var(--ac-border-strong); stroke-width: 2; stroke-dasharray: 6 6; animation: authDash 1.8s linear infinite; }

/* chips de marketplace (color por --mkp) */
.auth-mkp-row { gap: 0.4rem; }
.auth-mkp-chip { cursor: default; position: relative; padding-left: 0.6rem; background: color-mix(in srgb, var(--mkp, var(--ac-neutral)) 10%, var(--ac-surface)); color: var(--ac-text); border-color: color-mix(in srgb, var(--mkp, var(--ac-neutral)) 35%, var(--ac-border)); white-space: nowrap; }
.auth-mkp-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mkp, var(--ac-neutral)); flex: 0 0 8px; }
.auth-mkp-chip:hover { color: var(--ac-text); border-color: color-mix(in srgb, var(--mkp, var(--ac-neutral)) 55%, var(--ac-border)); }

/* KPIs ilustrativos (sin cifras) */
.auth-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.auth-kpis .kpi-card { padding: 0.7rem 0.85rem; }
.auth-kpis .kpi-card .kpi-value { font-size: 1.05rem; }
.auth-kpis .kpi-card .kpi-icon { width: 22px; height: 22px; font-size: 0.8rem; border-radius: 6px; }
.auth-kpis .kpi-card .kpi-label { gap: 0.3rem; }

/* bloques Pedidos / Marketing */
.auth-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.auth-block { min-width: 0; padding: 0.9rem 1rem; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); background: var(--ac-surface); display: flex; flex-direction: column; gap: 0.75rem; transition: border-color 0.2s var(--ac-ease); }
.auth-block-head { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 700; color: var(--ac-text); }
.auth-block-icon { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; background: var(--ac-primary-soft); color: var(--ac-primary); }
.auth-block-icon--mkt { background: var(--ac-marketing-soft); color: var(--ac-marketing); }
.auth-timeline .vtl-item { padding-bottom: 0.7rem; animation: authRise 0.4s var(--ac-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.auth-timeline .vtl-item::before { top: 26px; }
.auth-timeline .vtl-meta { margin-top: 0.2rem; }
.auth-cal { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-cal-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0.55rem; border-radius: var(--ac-radius-sm); background: var(--ac-surface-2); animation: authRise 0.4s var(--ac-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.auth-cal-name { flex: 0 0 76px; font-size: 0.78rem; font-weight: 700; color: var(--ac-text); padding-top: 0.15rem; }
.auth-cal-pieces { display: flex; flex-wrap: wrap; gap: 0.3rem; min-width: 0; }
.auth-redes .chip { cursor: default; }
.auth-panel-foot { margin: 0; font-size: 0.72rem; font-weight: 600; color: var(--ac-text-3); }

/* el segmento Pedidos | Marketing (data-area="operacion" | "marketing") reordena y resalta el bloque del área */
html[data-auth-area="marketing"] .auth-mkt { order: -1; border-color: var(--ac-marketing); }
html[data-auth-area="operacion"] .auth-ops { border-color: var(--ac-primary); }

/* ---------- Tarjeta ---------- */
.auth-card {
  position: relative; width: 100%;
  background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-lg);
  box-shadow: var(--ac-shadow-lg); padding: 2rem 2rem 1.4rem;
  animation: authRise 0.35s var(--ac-ease) both;
}
.auth-card-top { display: none; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ac-text); }
.auth-card-top .brand-icon { width: 26px; height: 26px; }
.auth-title { margin: 0 0 0.35rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ac-text); }
.auth-subtitle { margin: 0 0 1.1rem; font-size: var(--ac-fs-md); color: var(--ac-text-2); }
.auth-lead { margin: 0 0 1rem; font-size: var(--ac-fs-md); color: var(--ac-text-2); }
.auth-lead strong { color: var(--ac-text); word-break: break-all; }

/* stepper */
.auth-steps { list-style: none; display: flex; gap: 0.35rem; padding: 0; margin: 0 0 1.1rem; }
.auth-steps li { flex: 1 1 0; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.55rem; border-radius: var(--ac-radius-sm); font-size: 0.74rem; font-weight: 600; color: var(--ac-text-2); background: var(--ac-surface-2); border: 1px solid transparent; }
.auth-steps li[aria-current="step"] { color: var(--ac-primary); background: var(--ac-primary-soft); border-color: color-mix(in srgb, var(--ac-primary) 30%, transparent); }
.auth-steps li.is-done { color: var(--ac-success-fg); background: var(--ac-success-bg); }
.auth-step-num { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.66rem; font-weight: 700; background: var(--ac-surface); color: inherit; border: 1px solid currentColor; flex: 0 0 18px; }
.auth-steps li[aria-current="step"] .auth-step-num { background: var(--ac-primary); color: var(--ac-primary-fg); border-color: var(--ac-primary); }

/* pasos */
.step { display: none; }
.step.is-active { display: block; animation: authStepIn 0.25s var(--ac-ease); }
.step-back { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.9rem; padding: 0; background: none; border: none; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ac-text-2); cursor: pointer; text-decoration: none; }
.step-back:hover { color: var(--ac-primary); }
.step-back:disabled { opacity: 0.4; cursor: not-allowed; }

/* alertas */
.alert-custom { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.7rem 0.85rem; border-radius: var(--ac-radius-sm); margin-bottom: 0.9rem; font-size: 0.84rem; line-height: 1.4; border: 1px solid transparent; }
.alert-custom i { font-size: 1rem; line-height: 1.2; flex: 0 0 auto; }
.alert-custom.alert-error { background: var(--ac-danger-bg); color: var(--ac-danger-fg); border-color: color-mix(in srgb, var(--ac-danger) 35%, transparent); }
.alert-custom.alert-success { background: var(--ac-success-bg); color: var(--ac-success-fg); border-color: color-mix(in srgb, var(--ac-success) 35%, transparent); }
.alert-custom.alert-info { background: var(--ac-info-bg); color: var(--ac-info-fg); border-color: color-mix(in srgb, var(--ac-info) 35%, transparent); }

/* campos */
.auth-field { position: relative; }
.auth-field .form-control { padding: 0.7rem 0.9rem 0.7rem 2.6rem; min-height: 46px; font-size: 0.95rem; }
.auth-field .form-control.is-invalid { border-color: var(--ac-danger); }
.auth-field:has(.password-toggle) .form-control { padding-right: 2.8rem; }
.auth-field-icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--ac-text-3); font-size: 1.05rem; pointer-events: none; z-index: 3; }
.auth-field:focus-within .auth-field-icon { color: var(--ac-primary); }
.password-toggle { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; background: transparent; border-radius: 8px; color: var(--ac-text-3); font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; z-index: 3; }
.password-toggle:hover { color: var(--ac-text); background: var(--ac-surface-3); }
.auth-field-errors { margin-top: 0.35rem; font-size: 0.78rem; color: var(--ac-danger-fg); }
.auth-field-errors[hidden] { display: none; }
.auth-field-errors ul { margin: 0; padding-left: 1.1rem; }
/* Texto instructivo en --ac-text-2 (4.5:1 en claro y oscuro); --ac-text-3 queda para lo decorativo. */
.helper { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--ac-text-2); }
.auth-rules { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; color: var(--ac-text-2); }
.auth-rules li { display: inline-flex; align-items: center; gap: 0.35rem; }
.auth-rules li i { font-size: 0.95rem; }
.auth-rules .auth-rule-off { color: var(--ac-border-strong); }
.auth-rules .auth-rule-on { display: none; color: var(--ac-success); }
.auth-rules li[data-ok="true"] { color: var(--ac-success-fg); }
.auth-rules li[data-ok="true"] .auth-rule-off { display: none; }
.auth-rules li[data-ok="true"] .auth-rule-on { display: inline; }
.auth-form-row { display: grid; grid-template-columns: 1fr; gap: 0 0.75rem; }

/* botones */
.auth-btn { position: relative; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; font-size: 0.95rem; }
.auth-btn .btn-text { display: inline-flex; align-items: center; gap: 0.45rem; transition: opacity 0.15s; }
.auth-btn .btn-loader { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.auth-btn.loading .btn-text { opacity: 0; }
.auth-btn.loading .btn-loader { opacity: 1; }
.auth-btn:disabled { opacity: 0.6; }
.auth-btn-danger { --bs-btn-color: var(--ac-danger); --bs-btn-hover-color: var(--ac-danger); }
.spinner { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin 0.7s linear infinite; }
.auth-link-btn { background: none; border: none; padding: 0; font: inherit; font-size: inherit; font-weight: 600; color: var(--ac-primary); cursor: pointer; text-decoration: none; }
.auth-link-btn:hover { color: var(--ac-primary-hover); text-decoration: underline; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1rem; margin-top: 0.9rem; font-size: 0.82rem; }
.auth-links a { color: var(--ac-primary); font-weight: 600; text-decoration: none; }
.auth-links a:hover { color: var(--ac-primary-hover); text-decoration: underline; }
.auth-links:has(> :only-child) { justify-content: center; }

/* PIN */
.pin-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.5rem; }
.pin-cell { width: 100%; aspect-ratio: 1 / 1.15; min-height: 48px; padding: 0; text-align: center; font-family: var(--ac-font-mono); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ac-text); background: var(--ac-surface-2); border: 1.5px solid var(--ac-border); border-radius: 10px; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.pin-cell:focus { outline: none; border-color: var(--ac-primary); box-shadow: var(--ac-focus); background: var(--ac-surface); }
.pin-cell.filled { border-color: var(--ac-primary); background: var(--ac-primary-soft); }
.pin-cell.error { border-color: var(--ac-danger); background: var(--ac-danger-bg); }
.pin-cell:read-only { opacity: 0.75; cursor: default; }
.pin-inputs.shake { animation: shake 0.4s ease-in-out; }
.pin-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.25rem 0 1rem; font-size: 0.8rem; color: var(--ac-text-2); }
.pin-meta .timer { font-family: var(--ac-font-mono); font-variant-numeric: tabular-nums; color: var(--ac-text); font-weight: 600; }
.pin-meta .timer.is-expired { color: var(--ac-danger-fg); font-weight: 600; }
.pin-meta .resend { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--ac-primary); cursor: pointer; }
.pin-meta .resend:hover { text-decoration: underline; }
.pin-meta .resend:disabled { color: var(--ac-text-2); opacity: 0.85; cursor: not-allowed; text-decoration: none; }

/* Google */
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0 0.9rem; color: var(--ac-text-3); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ac-border); }
.auth-google { color-scheme: light; background: var(--ac-surface); border: 1px solid var(--ac-border); border-radius: var(--ac-radius-pill); padding: 4px; display: flex; justify-content: center; min-height: 48px; }
[data-bs-theme="dark"] .auth-google { border-color: var(--ac-border-strong); }
.auth-google iframe { color-scheme: light; }
.auth-google-hint { margin: 0.5rem 0 0; text-align: center; font-size: 0.76rem; color: var(--ac-text-2); }

/* sesión activa */
.auth-session { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1rem; }
.auth-avatar { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.8rem; background: var(--ac-primary-soft); color: var(--ac-primary); font-size: 1.4rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.auth-session .auth-subtitle { margin-bottom: 0.4rem; }
.auth-session-mail { margin: 0; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--ac-text-2); word-break: break-all; }
.auth-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.auth-actions form { margin: 0; }

/* sesión cerrada / estados con ícono */
.auth-icon-circle { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--ac-neutral-bg); color: var(--ac-neutral-fg); }
.auth-icon-circle[data-tone="success"] { background: var(--ac-success-bg); color: var(--ac-success-fg); }
.auth-icon-circle[data-tone="info"] { background: var(--ac-info-bg); color: var(--ac-info-fg); }
.auth-icon-circle[data-tone="danger"] { background: var(--ac-danger-bg); color: var(--ac-danger-fg); }
.auth-icon-circle[data-tone="warning"] { background: var(--ac-warning-bg); color: var(--ac-warning-fg); }
.auth-countdown { position: relative; width: 84px; height: 84px; margin: 0.5rem auto 0.75rem; }
.auth-ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.auth-ring .ring-bg { fill: none; stroke: var(--ac-border); stroke-width: 6; }
.auth-ring .ring-progress { fill: none; stroke: var(--ac-primary); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.auth-countdown-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ac-text); }

/* pie */
.auth-foot { margin: 1.4rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--ac-border); display: flex; align-items: center; justify-content: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 600; color: var(--ac-text-2); }

/* check de éxito al verificar (reemplaza el confetti) */
.auth-ok-badge {
  position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; font-size: 1.4rem;
  background: var(--ac-success-bg); color: var(--ac-success-fg);
}
.auth-card.is-ok .auth-ok-badge { display: flex; animation: authRise 0.4s var(--ac-ease) both; }

/* ---------- Keyframes ---------- */
@keyframes authDash { to { stroke-dashoffset: -24; } }
@keyframes authPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac-success) 45%, transparent); } 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes authRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes authStepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (min-width: 576px) {
  .auth-form-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1199.98px) {
  .auth-flow { grid-template-columns: 1fr 28px 1fr; }
  .auth-flow .auth-flow-link:nth-of-type(2) { display: none; }
  .auth-blocks { grid-template-columns: 1fr; }
  .auth-cal-name { flex-basis: 70px; }
}
@media (max-width: 991.98px) {
  .auth-nav { height: 56px; }
  .auth-nav-inner { padding: 0 16px; gap: 0.5rem; }
  .auth-nav-areas .btn { min-height: 40px; padding: 0 0.75rem; font-size: 0.8rem; }
  .auth-shell { display: flex; flex-direction: column; gap: 1.25rem; padding: 1rem 16px 2rem; min-height: 0; align-items: stretch; }
  .auth-main { order: -1; width: 100%; position: static; }
  .auth-card { padding: 1.4rem 1.1rem; }
  .auth-card-top { display: flex; }
  .auth-panel { padding: 1.1rem 1rem; gap: 0.8rem; }
  .auth-panel-title { font-size: 1.3rem; }
  .auth-mkp-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .auth-mkp-row::-webkit-scrollbar { display: none; }
  .pin-inputs { gap: 0.4rem; }
  .pin-cell { font-size: 1.3rem; }
}
@media (max-width: 399.98px) {
  .auth-nav-brand .brand-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-flow-link line, .auth-live-dot { animation: none; }
  .auth-ring .ring-progress { transition: none; }
}
