.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(18, 27, 44, 0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
}

.auth-modal-backdrop.open {
  display: flex;
}

.auth-modal {
  width: min(100%, 430px);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cfc9ef);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow-lift, 0 16px 34px rgba(35, 32, 91, 0.18));
}

.auth-modal h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink, #122031);
}

.auth-modal-sub {
  margin: 8px 0 18px;
  color: var(--muted, #4f4f78);
  line-height: 1.45;
  font-size: 0.95rem;
}

.auth-modal-divider-section {
  display: flex;
  flex-direction: column;
}

.auth-modal-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  gap: 12px;
}

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

.auth-modal-divider-text {
  color: var(--muted, #4f4f78);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-modal-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--ink, #122031);
}

.auth-modal-input {
  width: 100%;
  border: 1px solid var(--line-strong, #b9b0e2);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink, #122031);
  background: var(--surface);
  margin-bottom: 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-modal-input:focus {
  border-color: var(--brand, #2f5bff);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, 0.16);
}

.auth-modal-submit {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong, #1f3dc4) 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(47, 91, 255, 0.25);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.auth-modal-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(47, 91, 255, 0.3);
}

.auth-modal-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.auth-modal-google {
  width: 100%;
  border: 1px solid var(--line-strong, #b9b0e2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink, #122031);
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.auth-modal-google:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: var(--brand, #2f5bff);
  box-shadow: 0 4px 12px rgba(47, 91, 255, 0.12);
}

.auth-modal-google:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.auth-modal-google-icon {
  display: flex;
  flex-shrink: 0;
}

.auth-modal-microsoft {
  width: 100%;
  border: 1px solid var(--line-strong, #b9b0e2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink, #122031);
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  margin-top: 8px;
}

.auth-modal-microsoft:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #0078d4;
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.12);
}

.auth-modal-microsoft:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.auth-modal-microsoft-icon {
  display: flex;
  flex-shrink: 0;
}

.auth-modal-github {
  width: 100%;
  border: 1px solid var(--line-strong, #b9b0e2);
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  padding: 11px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  margin-top: 8px;
}

.auth-modal-github:hover:not(:disabled) {
  background-color: #0f172a;
  border-color: #111827;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
  transform: translateY(-1px);
}

.auth-modal-github:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.auth-modal-github-icon {
  display: flex;
  flex-shrink: 0;
}

.auth-modal-footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.auth-modal-close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 700;
  cursor: pointer;
  padding: 6px;
}

.auth-modal-status {
  min-height: 1.25em;
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.auth-modal-status.error {
  color: var(--danger, #c83255);
}

.auth-modal-status.success {
  color: var(--success, #0f8f63);
}
