/* ElimuGuide auth pages — login & register (blue + red brand) */

:root {
  --auth-blue: #0ea5e9;
  --auth-blue-dark: #0284c7;
  --auth-blue-light: #e0f2fe;
  --auth-blue-muted: #f0f9ff;
  --auth-red: #ef4444;
  --auth-red-dark: #dc2626;
  --auth-red-light: #fef2f2;
  --auth-text: #0f172a;
  --auth-text-muted: #64748b;
  --auth-border: #e2e8f0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 55% at 15% 85%, color-mix(in srgb, var(--auth-red) 22%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse 65% 50% at 85% 15%, color-mix(in srgb, var(--auth-blue) 28%, transparent) 0%, transparent 52%),
    linear-gradient(145deg, #0c1222 0%, #0a1f33 42%, #1a0f14 100%);
}

.auth-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 980px;
  min-height: 0;
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow:
    0 32px 64px -16px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (min-width: 1024px) {
  .auth-card {
    flex-direction: row;
    min-height: 620px;
  }
}

.auth-brand {
  position: relative;
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.25rem;
  color: #fff;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 12% 88%, color-mix(in srgb, var(--auth-red) 45%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse 70% 70% at 88% 12%, color-mix(in srgb, var(--auth-blue) 42%, transparent) 0%, transparent 52%),
    radial-gradient(ellipse 50% 45% at 50% 50%, rgba(15, 23, 42, 0.55) 0%, transparent 70%),
    linear-gradient(155deg, #0b1220 0%, #0c2340 38%, #2a1020 68%, #0a1525 100%);
  z-index: 0;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 72%, rgba(255, 255, 255, 0.05) 0%, transparent 35%),
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.04) 0%, transparent 30%);
  z-index: 0;
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.auth-form-logo {
  display: inline-flex;
  margin: 0 auto 1.25rem;
}

.auth-brand-title {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--auth-blue-light) 55%, #fecaca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-subtitle {
  margin-top: 0.875rem;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  padding: 2rem 1.75rem;
}

@media (min-width: 640px) {
  .auth-form-panel {
    padding: 2.75rem 3.25rem;
  }
}

.auth-form-title {
  margin-bottom: 1.75rem;
  text-align: center;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--auth-blue-dark) 0%, var(--auth-red-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-errors {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  background: var(--auth-red-light);
  color: var(--auth-red-dark);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-errors ul {
  margin: 0;
  padding-left: 1.125rem;
}

.auth-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 480px) {
  .auth-field-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-field,
.auth-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.375rem;
  background: #fff;
  color: var(--auth-text);
  font-size: 0.875rem;
  line-height: 1.25;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field::placeholder {
  color: #94a3b8;
}

.auth-field:focus,
.auth-select:focus {
  outline: none;
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-blue) 20%, transparent);
}

.auth-select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  color: #64748b;
}

.auth-select:valid,
.auth-select option:not([value=""]) {
  color: var(--auth-text);
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--auth-text-muted);
  cursor: pointer;
}

.auth-checkbox input {
  margin-top: 0.125rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: var(--auth-blue);
  cursor: pointer;
}

.auth-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.9375rem 1rem;
  border: none;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, var(--auth-blue) 0%, var(--auth-blue-dark) 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--auth-blue) 35%, transparent);
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.auth-btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--auth-blue) 42%, transparent);
}

.auth-btn-primary:active {
  transform: scale(0.995);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.375rem 0;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: lowercase;
}

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

.auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.8125rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: not-allowed;
  opacity: 0.72;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-btn-social svg {
  flex-shrink: 0;
}

.auth-btn-social--google {
  border: 1px solid var(--auth-border);
  background: #fff;
  color: #334155;
}

.auth-btn-social--apple {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--auth-red) 0%, var(--auth-blue-dark) 100%);
  color: #fff;
}

.auth-footer-link {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--auth-text-muted);
}

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

.auth-footer-link a:hover {
  color: var(--auth-red);
  text-decoration: underline;
}

.auth-field-hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--auth-red);
}

.auth-field-hint.hidden {
  display: none;
}
