/* ── LOGIN BODY ── */
.login-body {
  min-height: 100vh;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Subtle background pattern */
.login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(15,110,86,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(15,110,86,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.back-link {
  position: fixed;
  top: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
  z-index: 10;
}
.back-link:hover { color: var(--teal); }

/* ── CONTAINER ── */
.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* ── LOGO ── */
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark-lg {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

/* ── CARD ── */
.login-card {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-card-header { margin-bottom: 24px; }

.login-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}

/* ── ERROR BANNER ── */
.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #B91C1C;
}
.login-error svg { stroke: #B91C1C; flex-shrink: 0; }

/* ── FORM FIELDS ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

.field input {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}
.field input::placeholder { color: var(--text3); }
.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15,110,86,0.1);
}

.field-error {
  display: none;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
}

/* Password wrap */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input { padding-right: 44px; }

.toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s;
}
.toggle-pw:hover { color: var(--text); }

/* ── LOGIN BUTTON ── */
.login-btn {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 15px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Spinner animation */
.spinner {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── CARD FOOTER ── */
.login-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.login-footer p { font-size: 13px; color: var(--text2); }
.login-footer a { color: var(--teal); font-weight: 600; text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* ── RESET CARD ── */
.reset-card { margin-top: -8px; }

.reset-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.reset-actions .btn-primary,
.reset-actions .btn-outline {
  flex: 1;
  justify-content: center;
}

.reset-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-light);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 4px;
}
.success-icon-sm {
  width: 32px;
  height: 32px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.reset-success p { font-size: 13px; color: var(--teal-dark); font-weight: 500; margin: 0; }

/* ── LEGAL ── */
.login-legal {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
}
.login-legal a { color: var(--text3); text-decoration: underline; }
.login-legal a:hover { color: var(--teal); }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .login-card { padding: 24px; }
}

/* ── AUTH TABS ── */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 4px;
  gap: 4px;
  width: 100%;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  background: transparent;
  color: var(--text2);
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--teal);
  color: #fff;
}
.auth-tab:not(.active):hover {
  background: var(--bg2);
  color: var(--text);
}

/* ── REGISTER SUCCESS FIX ── */
#register-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0 8px;
}
#register-success .success-icon {
  width: 64px;
  height: 64px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  margin-bottom: 18px;
}
#register-success h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
#register-success p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 300px;
}
