:root {
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #0d1117;
  --muted: #4b5563;
  --border: #e5e7eb;
  --accent: #1e6bd6;
  --accent-strong: #0f4bab;
  --shadow: 0 20px 50px -30px rgba(15, 75, 171, 0.35);
}

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 10% 20%, rgba(30, 107, 214, 0.08), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(30, 107, 214, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.auth-shell {
  width: min(960px, 100%);
  padding: 48px 20px 64px;
  display: flex;
  justify-content: center;
  flex: 1;
  align-items: center;
  margin: 0 auto;
}

.auth-card {
  width: 100%;
  max-width: 620px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-card .auth-form,
.auth-card .provider-grid {
  width: 100%;
}

.auth-header .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(30, 107, 214, 0.08);
  border: 1px solid rgba(30, 107, 214, 0.15);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}

.auth-header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 30px);
}

.auth-header .sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.provider-grid {
  margin: 24px 0 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.provider {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: not-allowed;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.provider:not(:disabled) {
  cursor: pointer;
}

.provider span {
  text-align: center;
}

.provider .icon {
  font-size: 20px;
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.provider .icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.provider .soon {
  font-size: 13px;
  color: var(--muted);
}

.provider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 75, 171, 0.07), rgba(15, 75, 171, 0));
  opacity: 0;
  transition: opacity 140ms ease;
}

.provider:hover {
  border-color: rgba(30, 107, 214, 0.4);
  background: #fff;
  transform: translateY(-1px);
}

.provider:hover::after {
  opacity: 1;
}

.hidden {
  display: none !important;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 12px;
}

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

.auth-form {
  display: grid;
  gap: 14px;
}

.password-strength {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.password-strength__bar {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.password-strength__bar span {
  display: block;
  height: 100%;
  width: 10%;
  background: #dc2626;
  border-radius: inherit;
  transition: width 180ms ease, background 180ms ease;
}

.password-strength__label {
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.auth-status {
  min-height: 22px;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  display: none;
}

.auth-status--error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
}

.auth-status--success {
  display: block;
  background: #ecfdf3;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.3);
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.otp-digit {
  width: 100%;
  padding: 12px 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

.otp-digit:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.otp-digit.otp-error {
  border-color: #dc2626;
  outline: 2px solid #dc2626;
  background: #fef2f2;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 15px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 107, 214, 0.15);
}

.auth-card .primary {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 12px 30px -18px rgba(30, 107, 214, 0.75);
}

.auth-card .primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -18px rgba(30, 107, 214, 0.9);
}

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

.auth-footer {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  align-items: center;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .auth-card {
    padding: 24px 18px;
  }

  .provider {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .provider .soon {
    align-self: center;
  }
}
