/* ── Auth modal overlay ── */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.auth-modal-overlay .auth-card {
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.2);
}

/* ── Auth standalone page ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow:
    0 4px 24px -4px rgba(0,0,0,0.08),
    0 0 0 0.5px rgba(0,0,0,0.06);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 28px;
}

.auth-logo img { height: 28px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  padding: 8px;
  border-radius: 7px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  user-select: none;
}

.auth-tab.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.auth-title {
  font-family: var(--font-secondary);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.1);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: white;
  transition: border-color 0.18s;
  outline: none;
}

.form-input:focus { border-color: var(--text); }
.form-input::placeholder { color: #C7C7CC; }

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: var(--text);
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit:hover { opacity: 0.85; }
.auth-submit:disabled { opacity: 0.45; cursor: default; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(0,0,0,0.08);
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.auth-alert.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid rgba(185,28,28,0.15);
}

.auth-alert.success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid rgba(22,101,52,0.15);
}

.auth-footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 20px;
}

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

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-confirm {
  text-align: center;
  padding: 20px 0;
}

.auth-confirm-icon { margin-bottom: 16px; }

.auth-confirm-title {
  font-family: var(--font-secondary);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.auth-confirm-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
