/* ================================================
   GREAT SCHOLAR — AUTH PAGES (Login & Register)
   Split-screen: left = school image panel,
   right = form panel
================================================ */

/* ── Page shell ─────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 110px); /* subtract topbar+navbar height */
}

/* ── Left panel — school image ───────────────── */
.auth-left {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  background:
    url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=1000&q=80')
    center / cover no-repeat;
}

.auth-left-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13, 27, 62, 0.88) 0%,
    rgba(30, 144, 255, 0.70) 100%
  );
}

.auth-left-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.auth-left-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.auth-left-logo .logo-icon {
  width: 54px;
  height: 54px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--white);
  backdrop-filter: blur(8px);
}

.auth-left-logo .logo-text .logo-main {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}

.auth-left-logo .logo-text .logo-sub {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-left-tagline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
  color: var(--white);
}

.auth-left-tagline span {
  color: var(--orange);
}

.auth-left-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 340px;
  margin-bottom: 32px;
}

.auth-left-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--white);
}

.auth-badge i {
  font-size: 0.85rem;
  color: var(--orange);
}

/* Floating shapes on left panel */
.auth-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.12;
}
.auth-shape-1 {
  width: 280px; height: 280px;
  background: var(--sky);
  top: -80px; right: -80px;
}
.auth-shape-2 {
  width: 180px; height: 180px;
  background: var(--orange);
  bottom: 120px; right: 30px;
}
.auth-shape-3 {
  width: 100px; height: 100px;
  background: var(--green);
  top: 200px; left: 30px;
}

/* ── Right panel — form ──────────────────────── */
.auth-right {
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}

.auth-form-box {
  width: 100%;
  max-width: 440px;
}

.auth-form-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.auth-form-sub {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}

/* ── Role tabs (Student / Teacher / Admin) ──── */
.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 28px;
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab.active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(13,27,62,0.2);
}

.auth-tab:hover:not(.active) {
  background: var(--sky-light);
  color: var(--navy);
}

/* ── Form inputs ─────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}

.form-group label .req {
  color: #e53e3e;
  margin-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-wrap i.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(30,144,255,0.12);
}

.input-wrap .eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 0;
  z-index: 2;
  transition: color 0.2s;
}

.input-wrap .eye-toggle:hover { color: var(--navy); }

/* Key field highlight */
.key-group .input-wrap input {
  border-color: var(--orange);
  background: var(--orange-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.key-group .input-wrap input:focus {
  border-color: var(--orange-dark);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.18);
}

.key-group .input-wrap i.input-icon {
  color: var(--orange-dark);
}

.key-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  background: var(--orange-light);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.77rem;
  color: var(--orange-dark);
  font-weight: 500;
  line-height: 1.5;
}

.key-note i { margin-top: 2px; flex-shrink: 0; }

/* Two-column row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Photo upload */
.photo-upload-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.photo-preview {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px dashed var(--border);
  overflow: hidden;
  background: var(--white);
  display: grid;
  place-items: center;
  color: var(--text-light);
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-btn {
  flex: 1;
  padding: 10px 16px;
  background: var(--sky-light);
  border: 1.5px dashed var(--sky);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky-dark);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.photo-upload-btn:hover {
  background: var(--sky);
  color: var(--white);
  border-style: solid;
}

.photo-upload-btn i { margin-right: 6px; }

/* Remember me / Forgot */
.form-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.remember-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-mid);
  cursor: pointer;
}

.remember-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--sky);
  cursor: pointer;
}

.forgot-link {
  font-size: 0.82rem;
  color: var(--sky);
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-link:hover { color: var(--navy); }

/* ── Primary submit button ───────────────────── */
.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--navy), var(--sky-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(13,27,62,0.25);
  letter-spacing: 0.2px;
  margin-bottom: 24px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13,27,62,0.35);
  background: linear-gradient(135deg, var(--sky-dark), var(--navy));
}

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

/* ── Divider ─────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

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

/* ── Switch link (Login ↔ Register) ─────────── */
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.auth-switch a {
  color: var(--sky);
  font-weight: 700;
  transition: color 0.2s;
}

.auth-switch a:hover { color: var(--navy); }

/* ── Form panel tabs (hidden/shown) ─────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Step indicator (register multi-step) ────── */
.reg-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  flex-shrink: 0;
  transition: all 0.25s;
}

.reg-step.done .step-dot,
.reg-step.active .step-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.reg-step.active .step-dot {
  background: var(--sky);
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(30,144,255,0.18);
}

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}

.reg-step.active .step-label { color: var(--sky); }
.reg-step.done  .step-label  { color: var(--navy); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  border-radius: 2px;
  transition: background 0.3s;
}

.step-line.done { background: var(--navy); }

/* ── Step panels ─────────────────────────────── */
.reg-panel { display: none; }
.reg-panel.active { display: block; }

.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-back {
  flex: 1;
  padding: 12px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-next {
  flex: 2;
  padding: 12px;
  background: linear-gradient(135deg, var(--navy), var(--sky-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(13,27,62,0.2);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13,27,62,0.3);
}

/* ── Success card (after register) ──────────── */
.auth-success {
  text-align: center;
  padding: 32px 0 8px;
  display: none;
}

.auth-success.show { display: block; }

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--green);
}

.auth-success h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.auth-success p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-left {
    min-height: 280px;
    padding: 36px 28px;
  }

  .auth-left-tagline { font-size: 1.5rem; }
  .auth-left-desc { display: none; }

  .auth-right {
    padding: 36px 24px;
  }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-tabs { gap: 0; }
  .auth-tab  { font-size: 0.75rem; padding: 9px 4px; }
  .auth-left { min-height: 220px; padding: 28px 20px; }
  .auth-left-logo .logo-main { font-size: 1.1rem; }
}
