/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
  --primary: #1e3a8a;
  --primary-hover: #172554;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Use <body class="page-mode"> on the CBSE Registration landing page */
body.page-mode {
  background-color: #ffffff;
  color: #1e293b;
  padding: 0;
  display: flex;
  flex-direction: column;    /* Stacks header on top and main in the center */
  justify-content: flex-start;
  align-items: center;       /* Centers all children horizontally */
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   2. LOGIN PORTAL SECTION (.login-container)
   ========================================================================== */
.login-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  max-width: 960px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Left Brand Panel */
.brand-side {
  background: linear-gradient(145deg, #1e3a8a, #0f172a);
  color: #ffffff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.brand-side::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

/* School Logo */
.school-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  z-index: 1;
}

.school-logo-img {
  max-width: 90%;
  width: 320px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* Right Form Panel */
.form-side {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header {
  margin-bottom: 1.75rem;
}

.form-header h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.form-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Role Switcher */
.role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: var(--bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
  gap: 4px;
}

.role-tab {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-tab.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i.leading-icon {
  position: absolute;
  left: 14px;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.input-wrapper input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.toggle-password {
  position: absolute;
  right: 14px;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  display: flex;
  align-items: center;
}

/* Form Actions */
.form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.forgot-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
}

.support-note {
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.support-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   3. CBSE REGISTRATION LANDING PAGE SECTION
   ========================================================================== */
.top-nav-bar {
  width: 100%;
  height: 70px;
  border-bottom: 1px solid #eef2f6;
}

.page-container {
  flex: 1;
  width: 100%;               /* Ensures container spans the full screen width */
  display: flex;
  align-items: center;       /* Centers vertically */
  justify-content: center;  /* Centers horizontally */
  padding: 2rem 1.5rem;
  text-align: center;
}

.content-wrapper {
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.review-wrapper {
  max-width: 980px;
  padding: 2rem 0 3rem;
}

/* "ONLINE REGISTRATION" badge with side lines */
.badge-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.75rem;
}

.badge-tag .line {
  display: inline-block;
  width: 42px;
  height: 1.5px;
  background-color: #94a3b8;
}

.badge-tag .badge-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0f274a;
  text-transform: uppercase;
}

/* Main serif headline */
.main-title {
  font-family: 'Merriweather', serif;
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1.25;
  color: #0f2b5c;
  letter-spacing: -0.02em;
  margin-bottom: 2.25rem;
}

/* Apply button */
.button-wrapper {
  margin-bottom: 3.5rem;
}

.btn-apply {
  display: inline-block;
  background-color: #0e2a52;
  color: #ffffff;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 44px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(14, 42, 82, 0.25);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-apply:hover {
  background-color: #091c38;
  transform: translateY(-1px);
}

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

.student-review {
  width: 100%;
  margin-bottom: 2.5rem;
  text-align: left;
}

.review-heading {
  margin-bottom: 1rem;
  color: #0f2b5c;
  font-size: 1.35rem;
}

.student-pdf {
  width: 100%;
  /* Match the PDFs' 612 × 792 point page size to avoid a blank strip below. */
  aspect-ratio: 0.773;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.student-pdf iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.review-note {
  margin-top: 1.25rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.7;
}

.review-note a {
  color: #1d4ed8;
  font-weight: 600;
}

.confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.25rem;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.confirmation-check input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  accent-color: #0e2a52;
}

.student-review .button-wrapper {
  margin: 1.5rem 0 0;
  text-align: right;
}

.btn-apply:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Bottom description */
.sub-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #475569;
  max-width: 600px;
}

.sub-description p {
  margin: 0;
}

/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 820px) {
  /* Login Container */
  .login-container {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .brand-side {
    padding: 3rem 2rem;
  }

  .form-side {
    padding: 2.25rem 1.75rem;
  }

  /* Registration Page */
  .top-nav-bar {
    height: 55px;
  }

  .main-title {
    font-size: 2.15rem;
  }

  .button-wrapper {
    margin-bottom: 2.5rem;
  }

  .sub-description {
    font-size: 0.875rem;
  }

  .review-wrapper {
    padding-top: 1.5rem;
  }

  .student-pdf {
    aspect-ratio: 0.773;
  }

  .review-note,
  .confirmation-check {
    font-size: 0.875rem;
  }
}
