/* Modal de autenticação — overlay sobre a página (não navega). */
.auth-overlay {
  position: fixed; inset: 0; z-index: 50; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: color-mix(in srgb, var(--paper) 50%, transparent); backdrop-filter: blur(8px);
}
.auth-overlay.show { display: flex; }

.auth-card {
  width: 100%; max-width: 420px; background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line-2); border-radius: 20px; padding: 30px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85); animation: authIn 0.4s var(--ease);
}
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .wordmark { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.25rem; }
.auth-brand .wordmark-accent { color: var(--lime); font-style: italic; }

.auth-card h2 { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; }
.auth-card .sub { color: var(--muted); font-size: 0.88rem; margin: 6px 0 20px; }

.auth-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.auth-field label { font-size: 0.8rem; font-weight: 600; }
.auth-field input {
  background: var(--ink-3); border: 1px solid var(--line-2); border-radius: 11px; color: var(--paper);
  font-family: inherit; font-size: 1rem; padding: 12px 14px; outline: none; transition: border-color 0.2s var(--ease);
}
.auth-field input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 12%, transparent); }

.pw-meter { height: 5px; border-radius: 999px; background: var(--ink-3); overflow: hidden; margin-top: 4px; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width 0.25s var(--ease), background 0.25s var(--ease); }
.pw-hints { font-size: 0.72rem; color: var(--muted-2); margin-top: 5px; line-height: 1.5; }

.auth-btn {
  width: 100%; background: var(--lime); color: var(--on-accent); border: none; border-radius: 12px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 0.98rem; padding: 13px; margin-top: 6px;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--lime) 80%, transparent); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-alt { text-align: center; margin-top: 16px; font-size: 0.86rem; color: var(--muted); }
.auth-alt a { color: var(--lime); font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-error { background: rgba(255, 106, 84, 0.1); border: 1px solid rgba(255, 106, 84, 0.35); color: var(--coral-soft);
  border-radius: 10px; padding: 10px 13px; font-size: 0.84rem; margin-bottom: 14px; }
.auth-error:empty { display: none; }

/* enrolamento 2FA */
.totp-qr { display: block; width: 200px; height: 200px; margin: 6px auto 14px; border-radius: 12px; background: #fff; padding: 8px; }
.totp-secret { text-align: center; font-family: ui-monospace, monospace; font-size: 0.9rem; letter-spacing: 2px;
  background: var(--ink-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; margin-bottom: 16px; word-break: break-all; }
.code-input input { text-align: center; font-size: 1.5rem; letter-spacing: 8px; font-family: 'Poppins', sans-serif; }
.remember { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; color: var(--muted); margin: 4px 0 12px; cursor: pointer; }
.remember input { width: 17px; height: 17px; accent-color: var(--lime); }

/* chip de usuário / logout na sidebar */
.user-chip { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px;
  background: var(--ink-3); border: 1px solid var(--line-2); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--lime) 15%, transparent); color: var(--lime); font-family: 'Poppins', sans-serif; font-weight: 600; }
.user-meta { flex: 1; min-width: 0; }
.user-email { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.68rem; color: var(--muted-2); }
.logout-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.logout-btn:hover { color: var(--coral); background: rgba(255, 106, 84, 0.1); }
