/**
 * Shared auth-flow card – 1:1 look for email-verify, check-email, password-changed, subscription-expired, etc.
 */
html.auth-flow-page,
body.auth-flow-page {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}
html.auth-flow-page *,
body.auth-flow-page * {
  box-sizing: border-box;
}
[data-mantine-color-scheme="dark"] body.auth-flow-page {
  background: #0a0a0b;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent);
  color: #fff;
}
[data-mantine-color-scheme="light"] body.auth-flow-page {
  background: #e9ecef;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent);
  color: #212529;
}

.auth-flow-wrap {
  height: 100vh;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}
.auth-flow-container {
  width: 100%;
  max-width: 28rem;
  flex-shrink: 0;
}
.auth-flow-card {
  position: relative;
  background: var(--auth-flow-card-bg, linear-gradient(180deg, rgba(30, 30, 32, 0.98) 0%, rgba(22, 22, 24, 0.98) 100%));
  border: 1px solid var(--auth-flow-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  padding: 0;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 1px 0 0 rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
}
[data-mantine-color-scheme="light"] .auth-flow-card {
  --auth-flow-card-bg: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  --auth-flow-border: rgba(0, 0, 0, 0.06);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04), 0 1px 0 0 rgba(255, 255, 255, 0.8) inset;
}
.auth-flow-card-inner {
  padding: 2rem 1.75rem;
  position: relative;
}
.auth-flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  opacity: 0.9;
}
[data-mantine-color-scheme="light"] .auth-flow-card::before {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  opacity: 1;
}

.auth-flow-logo {
  display: inline-block;
  margin-bottom: 1rem;
}
.auth-flow-logo-img {
  height: 32px;
  width: auto;
  display: block;
  vertical-align: middle;
}
.auth-flow-icon-badge {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-radius: 50%;
  border: none;
  box-sizing: border-box;
}
.auth-flow-icon-badge svg {
  display: block;
  flex-shrink: 0;
  margin: 0 auto;
}
[data-mantine-color-scheme="light"] .auth-flow-icon-badge {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
.auth-flow-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: inherit;
  letter-spacing: -0.03em;
}
.auth-flow-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.25rem;
  color: var(--auth-flow-text-muted, rgba(255, 255, 255, 0.65));
}
.auth-flow-pill-wrap {
  margin: 0 0 0.5rem;
}
.auth-flow-pill-inner {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 9999px;
  word-break: break-all;
}
[data-mantine-color-scheme="light"] .auth-flow-pill-inner {
  color: #3730a3;
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.25);
}
.auth-flow-hint {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  color: var(--auth-flow-text-muted, rgba(255, 255, 255, 0.6));
}
[data-mantine-color-scheme="light"] .auth-flow-desc,
[data-mantine-color-scheme="light"] .auth-flow-hint {
  --auth-flow-text-muted: #6b7280;
}
.auth-flow-divider {
  height: 1px;
  margin: 1rem 0;
  background: linear-gradient(90deg, transparent, var(--auth-flow-divider, rgba(255, 255, 255, 0.08)), transparent);
}
[data-mantine-color-scheme="light"] .auth-flow-divider {
  --auth-flow-divider: rgba(0, 0, 0, 0.08);
}
.auth-flow-msg {
  font-size: 0.8125rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}
.auth-flow-msg--success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
[data-mantine-color-scheme="light"] .auth-flow-msg--success {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.auth-flow-msg--error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
[data-mantine-color-scheme="light"] .auth-flow-msg--error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.auth-flow-extra-row {
  margin: 0.75rem 0;
}
.auth-flow-btn--text {
  background: none;
  color: #60a5fa;
  padding: 0.25rem 0;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
}
.auth-flow-btn--text:hover {
  color: #93c5fd;
  text-decoration: underline;
}
[data-mantine-color-scheme="light"] .auth-flow-btn--text {
  color: #2563eb;
}
[data-mantine-color-scheme="light"] .auth-flow-btn--text:hover {
  color: #1d4ed8;
}

.auth-flow-resend-block {
  margin: 1rem 0;
}
.auth-flow-countdown-wrap {
  margin-bottom: 0.5rem;
}
.auth-flow-countdown-text {
  font-size: 0.8125rem;
  margin: 0;
  color: var(--auth-flow-text-muted, rgba(255, 255, 255, 0.65));
}
.auth-flow-countdown-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.auth-flow-actions {
  margin: 0;
  text-align: center;
}
.auth-flow-extra-row {
  text-align: center;
}
.auth-flow-extra-row .auth-flow-form {
  text-align: center;
}
.auth-flow-extra-row .auth-flow-form .auth-flow-btn {
  display: inline-block;
}
.auth-flow-btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.auth-flow-btn--primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.auth-flow-btn--primary:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.auth-flow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-flow-btn:disabled:hover {
  background: #3b82f6;
}
.auth-flow-footer {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
}
.auth-flow-footer a {
  color: #60a5fa;
  text-decoration: none;
}
.auth-flow-footer a:hover {
  text-decoration: underline;
}
[data-mantine-color-scheme="light"] .auth-flow-footer a {
  color: #2563eb;
}
.auth-flow-footer a + a {
  margin-left: 1rem;
}

/* Form fields (for forgot-password, reset-password, etc. on same card) */
.auth-flow-form {
  text-align: left;
  margin: 1rem 0;
}
.auth-flow-field {
  margin-bottom: 1rem;
}
.auth-flow-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.375rem;
}
[data-mantine-color-scheme="light"] .auth-flow-label {
  color: #212529;
}
.auth-flow-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-sizing: border-box;
}
.auth-flow-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
[data-mantine-color-scheme="light"] .auth-flow-input {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #212529;
}
[data-mantine-color-scheme="light"] .auth-flow-input::placeholder {
  color: #adb5bd;
}
.auth-flow-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.auth-flow-submit-row {
  margin-top: 1.25rem;
  text-align: center;
}
.auth-flow-form .auth-flow-btn--primary {
  display: inline-block;
}
