/* ═══════════════════════════════════════════════════════════════════════════
   MEDMARK DS — AUTH SURFACE
   ───────────────────────────────────────────────────────────────────────────
   Estilos dedicados às telas de autenticação: login, logout, recovery.
   Carregado DEPOIS de medmark-ds/app/styles.css e usa seus tokens.

   Direção visual: editorial médico refinado.
   Split layout 60/40 — formulário branco à esquerda, canvas atmosférico
   com mesh da cor do tenant à direita. White-label preservado via
   --brand-blue-500 que aponta pra --main-color.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── tokens locais ─────────────────────────────────────────────────────── */
:root {
  --auth-form-w: 480px;
  --auth-pad-x: clamp(24px, 5vw, 64px);
  --auth-pad-y: clamp(32px, 6vw, 56px);
  --font-display: var(--font-sans, "Inter", system-ui, sans-serif);
  --auth-glow: color-mix(in srgb, var(--brand-blue-500) 30%, transparent);
  --auth-glow-soft: color-mix(in srgb, var(--brand-blue-500) 10%, transparent);
}


/* ── reset mínimo + base ───────────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

::selection {
  background: var(--brand-blue-500);
  color: #fff;
}

:focus { outline: 0; }
:focus-visible { box-shadow: 0 0 0 4px var(--focus); }


/* ── shell: split layout ───────────────────────────────────────────────── */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
}

/* Mobile: stack, esconde canvas */
@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-shell__canvas { display: none; }
}


/* ═══════════════════════════════════════════════════════════════════════
   COLUNA ESQUERDA — formulário
   ═══════════════════════════════════════════════════════════════════════ */
.auth-shell__form {
  display: flex;
  flex-direction: column;
  padding: var(--auth-pad-y) var(--auth-pad-x);
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
}

/* Atmosfera leve atrás do form (~20% opacidade do canvas direito) */
.auth-shell__form::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 30% at 100% 0%, var(--auth-glow-soft), transparent 70%),
    radial-gradient(35% 25% at 0% 100%, var(--auth-glow-soft), transparent 70%);
}

.auth-shell__form > * { position: relative; z-index: 1; }


/* ── topo: brand + back link ─────────────────────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(40px, 8vh, 80px);
}

.auth-brand .auth-brand__logo {
  height: 44px;
  max-height: 44px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.auth-brand__wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}


/* ── corpo do form: centralizado verticalmente ────────────────────────── */
.auth-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--auth-form-w);
  width: 100%;
  margin: 0 auto;
  animation: auth-rise 700ms var(--ease-out, cubic-bezier(.16,1,.3,1)) both;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}


/* ── kicker (overline pequeno antes do título) ────────────────────────── */
.auth-kicker {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand-blue-500);
}


/* ── título display ──────────────────────────────────────────────────── */
.auth-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 12px;
}

.auth-title em {
  font-style: normal;
  color: var(--brand-blue-500);
}

.auth-title--danger { color: var(--danger); }
.auth-title--success { color: var(--success); }


.auth-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 38ch;
}


/* ── form fields ──────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.auth-field__label-aux {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 400;
}

.auth-input {
  display: block;
  width: 100%;
  max-width: none;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.auth-input:hover { border-color: var(--border-strong); }

.auth-input:focus {
  outline: 0;
  border-color: var(--brand-blue-400);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--focus);
}

.auth-input.is-error {
  border-color: var(--danger);
}

.auth-input.is-error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.auth-input::placeholder { color: var(--text-subtle); }


/* ── input group (CPF/email + toggle senha) ───────────────────────────── */
.auth-input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.auth-input-group:hover { border-color: var(--border-strong); }

.auth-input-group:focus-within {
  border-color: var(--brand-blue-400);
  box-shadow: 0 0 0 4px var(--focus);
}

.auth-input-group .auth-input {
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}

.auth-input-group .auth-input:focus {
  box-shadow: none;
}

.auth-toggle-pwd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-subtle);
  border-left: 1px solid var(--border);
  transition: color var(--dur-fast), background var(--dur-fast);
  flex-shrink: 0;
}

.auth-toggle-pwd:hover {
  color: var(--brand-blue-500);
  background: var(--bg-soft);
}

.auth-toggle-pwd iconify-icon {
  font-size: 18px;
}


/* ── meta row (privacy + esqueci senha) ───────────────────────────────── */
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
}

.auth-link {
  color: var(--text-muted);
  position: relative;
  font-weight: 500;
  transition: color var(--dur-fast);
}

.auth-link:hover { color: var(--brand-blue-600); }

.auth-link--brand {
  color: var(--brand-blue-600);
  font-weight: 600;
}

.auth-link--brand::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.auth-link--brand:hover::after { opacity: 0.6; transform: none; }


/* ── botão primário ───────────────────────────────────────────────────── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.auth-btn--primary {
  background: var(--brand-blue-500);
  color: #fff;
  box-shadow:
    0 4px 12px var(--auth-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-btn--primary:hover {
  background: var(--brand-blue-600);
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px var(--auth-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-btn--primary:active { transform: translateY(0); }

.auth-btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-btn--ghost:hover {
  background: var(--bg-soft);
  border-color: var(--border-strong);
}

.auth-btn--danger {
  background: var(--danger);
  color: #fff;
  box-shadow:
    0 4px 12px rgba(239, 68, 68, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-btn--danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
}

.auth-btn iconify-icon { font-size: 18px; }


/* ── stack vertical de actions ────────────────────────────────────────── */
.auth-actions { display: flex; flex-direction: column; gap: 12px; }


/* ── divider com texto opcional ───────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ── alerta inline (errors do form não-field) ─────────────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.auth-alert iconify-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-alert ul { margin: 0; padding-left: 18px; }


/* ── card de WhatsApp (suporte) — gradient verde com ícone rounded ─── */
.auth-whats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 14px 18px;
  background: #25D366;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.20);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none;
}

.auth-whats:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.28);
  color: #fff;
}

.auth-whats__icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-whats__icon img {
  width: 36px; height: 36px;
  display: block;
  border-radius: 10px;
}

.auth-whats__text { line-height: 1.35; }
.auth-whats__title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.auth-whats__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2px;
}


/* ── rodapé do form (footer mini) ─────────────────────────────────────── */
.auth-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
  color: var(--text-subtle);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.auth-footer__sep { opacity: 0.4; }


/* ═══════════════════════════════════════════════════════════════════════
   COLUNA DIREITA — canvas atmosférico
   ═══════════════════════════════════════════════════════════════════════ */
.auth-shell__canvas {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 80% 20%, var(--auth-glow), transparent 60%),
    radial-gradient(45% 40% at 20% 80%, var(--auth-glow-soft), transparent 65%),
    linear-gradient(135deg, var(--bg-soft) 0%, var(--gray-100) 100%);
}

/* Background imagem do tenant (quando configurado) sobrescreve mesh */
.auth-shell__canvas--bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-shell__canvas--bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand-blue-700) 70%, transparent) 0%,
    color-mix(in srgb, var(--brand-blue-500) 30%, transparent) 100%);
}


/* noise overlay ── tactility */
.auth-shell__canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}


/* grade decorativa fina (motivo médico/precisão) */
.auth-canvas__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--brand-blue-500) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--brand-blue-500) 8%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}


/* orb decorativo flutuante */
.auth-canvas__orb {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    color-mix(in srgb, var(--brand-blue-300) 70%, transparent),
    color-mix(in srgb, var(--brand-blue-500) 40%, transparent) 50%,
    transparent 70%);
  filter: blur(20px);
  top: -80px;
  right: -100px;
  animation: auth-float 14s ease-in-out infinite;
}

@keyframes auth-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 40px); }
}


/* plate editorial (citação ou tagline) */
.auth-canvas__plate {
  position: absolute;
  left: clamp(32px, 5vw, 64px);
  bottom: clamp(48px, 8vh, 96px);
  right: clamp(32px, 5vw, 64px);
  max-width: 560px;
  color: var(--text);
  z-index: 2;
}

.auth-shell__canvas--bg .auth-canvas__plate { color: #fff; }

.auth-canvas__plate-kicker {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-canvas__plate h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.625rem, 2.5vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.auth-canvas__plate h2 em {
  font-style: normal;
  color: var(--brand-blue-500);
}

.auth-shell__canvas--bg .auth-canvas__plate h2 em { color: #fff; opacity: 0.95; }

.auth-canvas__plate p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.78;
  margin: 0;
  max-width: 44ch;
}


/* selo decorativo no topo direito */
.auth-canvas__seal {
  position: absolute;
  top: clamp(32px, 5vh, 56px);
  right: clamp(32px, 5vw, 56px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-shell__canvas--bg .auth-canvas__seal {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-canvas__seal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  animation: auth-pulse 2.4s ease-in-out infinite;
}

@keyframes auth-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.10); }
}


/* ═══════════════════════════════════════════════════════════════════════
   TOASTR — re-skin pra não destoar do DS
   ═══════════════════════════════════════════════════════════════════════ */
#toast-container > div {
  opacity: 1 !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 48px;
  color: var(--text);
  font-family: var(--font-sans);
  background-image: none !important;
}

#toast-container > .toast-success { border-left: 3px solid var(--success); }
#toast-container > .toast-error { border-left: 3px solid var(--danger); }
#toast-container > .toast-warning { border-left: 3px solid var(--warning); }
#toast-container > .toast-info { border-left: 3px solid var(--brand-blue-500); }

#toast-container > div .toast-title { font-weight: 600; font-size: 13px; }
#toast-container > div .toast-message { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
#toast-container > div .toast-close-button {
  color: var(--text-subtle);
  text-shadow: none;
  font-weight: 400;
  opacity: 0.8;
}

#toast-container .toast-progress {
  background: var(--brand-blue-500);
  opacity: 0.6;
  height: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════
   PRELOADER (mantém compat com login_base original)
   ═══════════════════════════════════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-slow) var(--ease-out),
              visibility var(--dur-slow) var(--ease-out);
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader img { max-height: 80px; max-width: 200px; }


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .auth-shell__form { padding: 32px 20px 48px; }
  .auth-brand { margin-bottom: 32px; }
  .auth-title { font-size: 2rem; }
}

@media (max-height: 720px) and (min-width: 961px) {
  .auth-brand { margin-bottom: 32px; }
  .auth-body { animation-duration: 500ms; }
}


/* ═══════════════════════════════════════════════════════════════════════
   CENTERED SHELL — usado por atendimento/cabine (single column, no canvas)
   ═══════════════════════════════════════════════════════════════════════ */
.auth-centered {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  position: relative;
  background: var(--bg);
}

.auth-centered::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 18% 14%, var(--auth-glow-soft), transparent 60%),
    radial-gradient(50% 35% at 88% 88%, var(--auth-glow-soft), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.auth-centered__card {
  width: 100%;
  max-width: 640px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(15, 23, 42, 0.04);
  padding: clamp(32px, 5vw, 56px);
  animation: auth-rise 700ms var(--ease-out, cubic-bezier(.16,1,.3,1)) both;
}

.auth-centered__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-centered__brand img {
  max-height: 64px;
  max-width: 220px;
  object-fit: contain;
}

.auth-centered__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-blue-50);
  color: var(--brand-blue-500);
  font-size: 40px;
}

.auth-centered__icon iconify-icon { font-size: 40px; }

.auth-centered__kicker {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  text-align: center;
  display: block;
  margin-bottom: 12px;
}

.auth-centered__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  text-align: center;
  margin: 0 0 12px;
}

.auth-centered__title em { font-style: normal; color: var(--brand-blue-500); }

.auth-centered__sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 32px;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.auth-centered__greeting {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0 0 8px;
}


/* feature list (checkmarks) */
.auth-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.auth-feature-list li iconify-icon {
  font-size: 18px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 1px;
}


/* measurement grid (cabine: 2x2) */
.auth-measurement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 540px) {
  .auth-measurement-grid { grid-template-columns: 1fr; }
}

.auth-measurement {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: border-color var(--dur-fast), background var(--dur-fast);
  position: relative;
}

.auth-measurement.is-active {
  border-color: var(--brand-blue-400);
  background: var(--brand-blue-50);
}

.auth-measurement.is-done {
  border-color: var(--success);
}

.auth-measurement__icon {
  font-size: 32px;
  color: var(--brand-blue-500);
  margin-bottom: 10px;
}

.auth-measurement.is-done .auth-measurement__icon { color: var(--success); }

.auth-measurement__icon iconify-icon { font-size: 32px; }

.auth-measurement__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.auth-measurement__value {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
}


/* status box (loading / error inline) */
.auth-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.auth-status iconify-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.auth-status--info {
  background: var(--brand-blue-50);
  border: 1px solid color-mix(in srgb, var(--brand-blue-500) 18%, transparent);
  color: var(--brand-blue-700);
}

.auth-status--error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: var(--danger);
}


/* spinner inline */
.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

.auth-spinner--lg { width: 28px; height: 28px; border-width: 3px; }

@keyframes auth-spin { to { transform: rotate(360deg); } }


/* action row (2-3 botões side-by-side) */
.auth-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-action-row > * { flex: 1; min-width: 140px; }

.auth-btn--success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.22);
}

.auth-btn--success:hover {
  background: #15803D;
  transform: translateY(-1px);
}

.auth-btn--outline-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
}

.auth-btn--outline-danger:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: var(--danger);
}
