/* ============================================
   SCHOOLHUB — AUTHENTICATION PAGE STYLES
   Premium Glassmorphism Auth Design
   ============================================ */

/* ---------- Auth Body ---------- */
.auth-body {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Auth Wrapper ---------- */
.auth-wrapper {
  width: 100%;
  max-width: 1120px;
  margin: 30px auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.auth-container {
  display: flex;
  min-height: 680px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, .5),
    0 0 60px rgba(79, 110, 247, .08),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ============ LEFT PANEL ============ */
.auth-left-panel {
  flex: 0 0 45%;
  max-width: 45%;
  padding: 48px 40px;
  background:
    linear-gradient(160deg,
      rgba(79, 110, 247, .12) 0%,
      rgba(99, 102, 241, .06) 40%,
      rgba(139, 92, 246, .08) 70%,
      rgba(0, 212, 255, .04) 100%);
  border-right: 1px solid var(--glass-border);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-left-inner {
  position: relative;
  z-index: 2;
}

/* Decorative orbs inside left panel */
.auth-left-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.auth-left-orb-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: -100px;
  right: -80px;
  opacity: .2;
}
.auth-left-orb-2 {
  width: 250px;
  height: 250px;
  background: var(--accent);
  bottom: -60px;
  left: -60px;
  opacity: .12;
}

/* Logo */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  text-decoration: none;
  transition: var(--transition);
}
.auth-logo i {
  font-size: 1.8rem;
  color: var(--accent);
}
.auth-logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo:hover {
  transform: translateX(-2px);
}

/* Left Headline */
.auth-left-headline {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.auth-left-sub {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 380px;
}

/* Feature Highlights */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  transition: var(--transition);
}
.auth-feature-item:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  transform: translateX(4px);
}
.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 110, 247, .18), rgba(0, 212, 255, .1));
  border: 1px solid rgba(79, 110, 247, .25);
  color: var(--accent);
  font-size: .95rem;
  flex-shrink: 0;
}
.auth-feature-title {
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 2px;
}
.auth-feature-desc {
  font-size: .78rem;
  color: var(--text-muted);
}

/* Stats Row */
.auth-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.auth-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .78rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.auth-stat-chip:hover {
  background: rgba(79, 110, 247, .1);
  border-color: rgba(79, 110, 247, .2);
}
.auth-stat-chip i {
  color: var(--accent);
  font-size: .75rem;
}
.auth-stat-chip strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ============ RIGHT PANEL ============ */
.auth-right-panel {
  flex: 1;
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ---------- Form Views ---------- */
.auth-form-view {
  display: none;
  width: 100%;
  max-width: 420px;
  animation: authFadeIn .45s ease forwards;
}
.auth-form-view.active {
  display: block;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Form Header ---------- */
.auth-form-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-form-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-form-subtitle {
  color: var(--text-secondary);
  font-size: .92rem;
}

/* Forgot password icon */
.auth-forgot-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(79, 110, 247, .2), rgba(0, 212, 255, .1));
  border: 1px solid rgba(79, 110, 247, .3);
  color: var(--accent);
  font-size: 1.5rem;
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ---------- Social Login Buttons ---------- */
.auth-social-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .03);
  color: var(--text-secondary);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.auth-social-btn:hover {
  background: rgba(255, 255, 255, .08);
  border-color: var(--glass-border-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.auth-social-btn i {
  font-size: 1.1rem;
}

/* ---------- Divider ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}
.auth-divider span {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ---------- Form Fields ---------- */
.auth-field {
  margin-bottom: 20px;
}
.auth-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: .3px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap > i:first-child {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: .9rem;
  transition: var(--transition);
  z-index: 2;
  pointer-events: none;
}
.auth-input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .04);
  color: var(--text-primary);
  font-size: .92rem;
  font-family: var(--font-main);
  transition: var(--transition);
  outline: none;
}
.auth-input-wrap input::placeholder {
  color: var(--text-muted);
}
.auth-input-wrap input:focus {
  border-color: var(--primary);
  background: rgba(79, 110, 247, .06);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .15);
}
.auth-input-wrap input:focus ~ i:first-child,
.auth-input-wrap input:focus + i {
  color: var(--accent);
}

/* When the input gets focus, color the preceding icon */
.auth-input-wrap:has(input:focus) > i:first-child {
  color: var(--accent);
}

/* Error state */
.auth-field.error .auth-input-wrap input {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, .12);
}
.auth-field.error .auth-input-wrap > i:first-child {
  color: #f43f5e;
}
.auth-field-error {
  font-size: .76rem;
  color: #f43f5e;
  margin-top: 6px;
  min-height: 0;
  overflow: hidden;
  transition: all .25s ease;
}

/* Success state */
.auth-field.success .auth-input-wrap input {
  border-color: #34d399;
}
.auth-field.success .auth-input-wrap > i:first-child {
  color: #34d399;
}

/* Toggle Password */
.auth-toggle-pass {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9rem;
  padding: 4px;
  transition: var(--transition);
  z-index: 2;
}
.auth-toggle-pass:hover {
  color: var(--accent);
}

/* Two-column field layout */
.auth-field-row {
  display: flex;
  gap: 14px;
}
.auth-field-row .auth-field {
  flex: 1;
}

/* ---------- Password Strength ---------- */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
  transition: background .3s ease;
}
.strength-bar.weak { background: #f43f5e; }
.strength-bar.fair { background: #f97316; }
.strength-bar.good { background: #fbbf24; }
.strength-bar.strong { background: #34d399; }

.strength-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  min-width: 60px;
  text-align: right;
}
.strength-label.weak { color: #f43f5e; }
.strength-label.fair { color: #f97316; }
.strength-label.good { color: #fbbf24; }
.strength-label.strong { color: #34d399; }

/* ---------- Checkbox ---------- */
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.auth-checkbox input[type="checkbox"] {
  display: none;
}
.auth-checkbox .checkmark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, .04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}
.auth-checkbox .checkmark::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .65rem;
  color: #fff;
  opacity: 0;
  transform: scale(0);
  transition: all .2s ease;
}
.auth-checkbox input:checked + .checkmark {
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  border-color: var(--primary);
}
.auth-checkbox input:checked + .checkmark::after {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Row Between ---------- */
.auth-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* ---------- Auth Link ---------- */
.auth-link {
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
  transition: var(--transition);
}
.auth-link:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 212, 255, .4);
}

/* ---------- Submit Button ---------- */
.auth-submit-btn {
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 6px 30px var(--primary-glow);
  position: relative;
  overflow: hidden;
}
.auth-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  transition: left .6s ease;
}
.auth-submit-btn:hover::before {
  left: 100%;
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px var(--primary-glow);
}
.auth-submit-btn:active {
  transform: translateY(0);
}
.auth-submit-btn .btn-loader {
  display: none;
}
.auth-submit-btn.loading .btn-text {
  display: none;
}
.auth-submit-btn.loading .btn-arrow {
  display: none;
}
.auth-submit-btn.loading .btn-loader {
  display: inline-block;
}
.auth-submit-btn.loading {
  pointer-events: none;
  opacity: .8;
}

/* ---------- Switch Text ---------- */
.auth-switch-text {
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  margin-top: 28px;
}

/* ---------- Success Message (Forgot Password) ---------- */
.auth-success-msg {
  text-align: center;
  padding: 20px 0;
  animation: authFadeIn .5s ease forwards;
}
.auth-success-msg .success-icon {
  font-size: 3rem;
  color: #34d399;
  margin-bottom: 20px;
  animation: successBounce .6s ease;
}
@keyframes successBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.auth-success-msg h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.auth-success-msg p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

/* ---------- Back to Home ---------- */
.auth-back-home {
  position: fixed;
  bottom: 30px;
  left: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-size: .82rem;
  font-weight: 600;
  z-index: 10;
  transition: var(--transition);
}
.auth-back-home:hover {
  background: rgba(79, 110, 247, .12);
  border-color: var(--primary);
  color: #fff;
  transform: translateX(-3px);
}

/* ============ RESPONSIVE ============ */

/* Tablet */
@media (max-width: 991.98px) {
  .auth-container {
    flex-direction: column;
    min-height: auto;
  }
  .auth-left-panel {
    flex: none;
    max-width: 100%;
    padding: 36px 32px;
  }
  .auth-left-headline {
    font-size: 1.6rem;
  }
  .auth-left-sub {
    margin-bottom: 20px;
    font-size: .88rem;
  }
  .auth-features {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  .auth-feature-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
  }
  .auth-right-panel {
    padding: 36px 32px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .auth-wrapper {
    margin: 16px auto;
    padding: 0 12px;
  }
  .auth-left-panel {
    padding: 28px 22px;
  }
  .auth-left-headline {
    font-size: 1.35rem;
  }
  .auth-features {
    display: none;
  }
  .auth-stats-row {
    justify-content: center;
  }
  .auth-right-panel {
    padding: 28px 22px;
  }
  .auth-form-title {
    font-size: 1.4rem;
  }
  .auth-social-row {
    flex-direction: column;
    gap: 10px;
  }
  .auth-field-row {
    flex-direction: column;
    gap: 0;
  }
  .auth-row-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .auth-back-home {
    bottom: 16px;
    left: 16px;
    padding: 8px 14px;
    font-size: .75rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .auth-left-panel {
    padding: 24px 18px;
  }
  .auth-left-headline {
    font-size: 1.2rem;
  }
  .auth-left-sub {
    font-size: .82rem;
  }
  .auth-right-panel {
    padding: 24px 18px;
  }
}
