/* Friends of Adaklu — authentication pages */
body.auth-page {
  background: var(--surface-2);
  background-image: none;
  min-height: 100vh;
}

body.auth-page::before {
  display: none;
}

.auth-page {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
}

.auth-shell {
  display: flex;
  min-height: 100vh;
}

/* Brand panel */
.auth-brand {
  display: none;
  flex: 1;
  position: relative;
  padding: 3rem;
  background: linear-gradient(155deg, #241036 0%, var(--purple-800) 38%, var(--purple-900) 72%, #12081f 100%);
  overflow: hidden;
}

@media (min-width: 992px) {
  .auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(155, 126, 224, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(46, 204, 154, 0.12), transparent 50%);
  pointer-events: none;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 28 49'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05'%3E%3Cpath d='M28 0v17L0 49'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 480px 480px;
  pointer-events: none;
}

.auth-brand__inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.auth-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #f5f0ff;
  margin-bottom: 3rem;
}

.auth-brand__logo:hover {
  color: #fff;
}

.auth-brand__title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0;
}

.auth-brand__title strong {
  color: var(--green-400);
  font-weight: 700;
}

.auth-brand__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--green-glow);
}

.auth-brand__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.auth-brand__text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.auth-brand__footer {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.auth-brand__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.auth-brand__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green-400);
  line-height: 1.2;
}

.auth-brand__stat span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Form panel */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-2);
}

.auth-main__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--purple-700);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-back:hover {
  color: var(--green-800);
}

.auth-main__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem 2.5rem;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.75rem;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(124, 92, 191, 0.12);
  box-shadow:
    0 1rem 2.5rem rgba(61, 38, 102, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

@media (min-width: 576px) {
  .auth-card {
    padding: 2.5rem 2.25rem;
  }
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--purple-800);
  margin: 0 0 0.35rem;
}

.auth-card__subtitle {
  color: #5c5470;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.auth-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple-800);
  margin-bottom: 0.35rem;
}

.auth-input.form-control {
  padding: 0.65rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(124, 92, 191, 0.22);
  background: #faf8ff;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input.form-control:focus {
  border-color: var(--green-600);
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(46, 204, 154, 0.22);
}

.auth-input.form-control.is-invalid {
  border-color: #dc3545;
  background: #fff5f5;
}

.auth-error {
  font-size: 0.82rem;
  color: #b42318;
  margin-top: 0.35rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-check .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border-color: rgba(124, 92, 191, 0.35);
}

.auth-check .form-check-input:checked {
  background-color: var(--green-600);
  border-color: var(--green-600);
}

.auth-check .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(46, 204, 154, 0.25);
}

.auth-check__label {
  font-size: 0.875rem;
  color: #5c5470;
  margin: 0;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-actions--end {
  justify-content: flex-end;
}

.auth-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--purple-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--green-800);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #041510;
  border: none;
  border-radius: 0.65rem;
  background-image: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
  box-shadow:
    0 0.15rem 0 rgba(13, 61, 46, 0.35),
    0 0.5rem 1.25rem rgba(46, 204, 154, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-image 0.2s ease;
}

.auth-btn:hover {
  color: #f4fffb;
  background-image: linear-gradient(135deg, var(--green-600) 0%, var(--green-800) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 0.2rem 0 rgba(13, 61, 46, 0.4),
    0 0.65rem 1.5rem rgba(46, 204, 154, 0.35);
}

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

.auth-btn--inline {
  width: auto;
  min-width: 8rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #9b92b0;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(124, 92, 191, 0.15);
}

.auth-footer-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #5c5470;
}

.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.auth-alert--success {
  background: rgba(46, 204, 154, 0.12);
  border: 1px solid rgba(46, 204, 154, 0.3);
  color: var(--green-900);
}

.auth-alert--info {
  background: rgba(124, 92, 191, 0.1);
  border: 1px solid rgba(124, 92, 191, 0.2);
  color: var(--purple-800);
}

.auth-mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--purple-800);
}

@media (min-width: 992px) {
  .auth-mobile-logo {
    visibility: hidden;
    width: 0;
    overflow: hidden;
  }
}

.auth-mobile-logo .brand-mark {
  width: 2rem;
  height: 2rem;
}

.auth-mobile-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.auth-stack-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-btn--ghost {
  background: transparent;
  color: var(--purple-700);
  border: 1px solid rgba(124, 92, 191, 0.25);
  box-shadow: none;
}

.auth-btn--ghost:hover {
  background: rgba(124, 92, 191, 0.06);
  color: var(--purple-800);
  transform: none;
  box-shadow: none;
}
