/* ===== CRESPORT Login — matches Figma "Log in Page" ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.page-login {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(rgba(41, 52, 98, 0.78), rgba(41, 52, 98, 0.78)),
    url("../assets/school-background.jpg") center / cover no-repeat fixed;
}

/* ===== Card ===== */
.login-card {
  width: 100%;
  max-width: 442px;
  background: #fff;
  border-radius: 46px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ===== Register card: wider card + wider form area (CHANGED) ===== */
.register-card {
  max-width: 560px; /* was 442px */
}

.register-card .card-body {
  padding-left: 24px; /* was 32px */
  padding-right: 24px;
}

/* ===== Register page (matches screenshot) ===== */
.reg-title {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #2b3668;
  text-align: left;
}

.reg-sub {
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
  text-align: left;
}

.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 17px;
  margin-bottom: 18px;
}

.reg-group {
  min-width: 0; /* stops long inputs from stretching the column */
}

.reg-full {
  grid-column: 1 / -1;
}

.register-card .floating-label {
  font-size: 14px;
}

.register-card .input-field {
  height: 37px;
  font-size: 15px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #555;
}

.field-error {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #d93025;
}

.field-error:empty {
  display: none; /* no blank gap under fields until there is an error */
}

.register-card .terms {
  gap: 6px;
}

.register-card .form-btn {
  margin-top: 8px;
}

/* ===== Two-step registration ===== */
.reg-steps {
  margin-bottom: 16px;
}

.reg-steps__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.reg-steps__bars {
  display: flex;
  gap: 6px;
}

.reg-steps__bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #d9d9d9;
  transition: background 0.2s;
}

.reg-steps__bar.is-active {
  background: #2e3a68;
}

.reg-step[hidden] {
  display: none;
}

.reg-actions {
  display: flex;
  gap: 12px;
}

.reg-actions .form-btn {
  flex: 1;
}

.reg-actions .form-btn--ghost {
  flex: 0 0 120px;
  color: #2e3a68;
  background: #fff;
  border: 1.5px solid #2e3a68;
  box-shadow: none;
}

.reg-actions .form-btn--ghost:hover {
  background: #eef0f8;
}

/* Confirmation shown after a registration request is filed */
.reg-success {
  padding: 10px 0 4px;
  text-align: center;
}

.reg-success h2 {
  margin: 0 0 10px;
  color: #2e3a68;
  font-size: 24px;
}

.reg-success p {
  max-width: 44ch;
  margin: 0 auto 22px;
  color: #5a6580;
  font-size: 15px;
  line-height: 1.6;
}

.reg-success-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.reg-success .reg-success-note {
  max-width: none;
  margin: 18px 0 0;
  font-size: 14px;
}

.reg-success-note a {
  color: #2e3a68;
  font-weight: 700;
}

.input-field[readonly] {
  color: #555;
  background: #e4e4e4;
  cursor: not-allowed;
}

.input-field[aria-invalid="true"] {
  border-color: #d93025;
}

@media (max-width: 480px) {
  .reg-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Navy header ===== */
.form-container {
  background: #2b3668;
  height: 195px;
  padding-top: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.form-blob {
  display: flex;
  justify-content: center;
}

.sparky-login {
  height: 94px;
  width: auto;
  display: block;
}

.school-logo {
  position: absolute;
  top: 17px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

/* CRESPORT wordmark image */
.brand {
  width: 300px;
  max-width: 82%;
  height: auto;
  display: block;
  margin-top: 4px;
  transform: translateY(-30px);
}

.brand-sub {
  margin-top: 6px;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  color: #fff;
  transform: translateY(-50px);
}

/* ===== White body ===== */
.card-body {
  padding: 41px 32px 44px;
}

/* "Welcome" heading is not part of the Figma frame */
.form-header {
  display: none;
}

/* ===== Inputs ===== */
.input-group {
  margin-bottom: 36px;
}

.input-group:nth-of-type(2) {
  margin-bottom: 12px;
}

.floating-label {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
}

.input-field {
  width: 100%;
  height: 41px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  color: #1a1a1a;
  background: #efefef;
  border: 1px solid #c6c6c6;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.input-field::placeholder {
  color: #9b9b9b;
}

.input-field:focus {
  border-color: #2e3a68;
  box-shadow: 0 0 0 3px rgba(46, 58, 104, 0.18);
}

/* password + eye toggle */
.password-wrap {
  position: relative;
}

.password-wrap .input-field {
  padding-right: 44px;
}

.eye-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: #8a8a8a;
  cursor: pointer;
}

.eye-icon:hover {
  color: #2e3a68;
}

.eye-icon .icon-hide {
  display: none;
}
.eye-icon.is-visible .icon-show {
  display: none;
}
.eye-icon.is-visible .icon-hide {
  display: block;
}

/* ===== Remember me / Forgot password ===== */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
  font-size: 14px;
}

.terms {
  display: flex;
  align-items: center;
  gap: 2px;
}

.terms-and-privacy {
  appearance: none;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  background: #efefef;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.terms-and-privacy:checked {
  background: #2e3a68;
  border-color: #2e3a68;
}

.terms-and-privacy:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.terms label {
  color: #9a9a9a;
  font-size: 14px;
}

.terms label a {
  color: #9a9a9a;
  text-decoration: underline;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}

.terms label a:hover,
.terms label a:focus-visible {
  color: #2e3a68;
  text-shadow:
    0 0 6px rgba(46, 58, 104, 0.55),
    0 0 12px rgba(46, 58, 104, 0.35);
  outline: none;
}

.form-link {
  color: #555;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.form-link:hover {
  color: #2e3a68;
  text-decoration: underline;
}

/* ===== Sign In button ===== */
.form-btn {
  display: block;
  width: 100%;
  height: 55px;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: #2e3a68;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s;
}

.form-btn:hover {
  background: #25305a;
}

.form-btn:active {
  transform: translateY(1px);
}

.form-btn:focus-visible {
  outline: 3px solid rgba(46, 58, 104, 0.4);
  outline-offset: 2px;
}

/* ===== Register link ===== */
.form-register-text {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: #9a9a9a;
}

.form-register {
  color: #2e3a68;
  font-weight: 600;
  text-decoration: none;
}

.form-register:hover {
  text-decoration: underline;
}

/* ===== Small screens ===== */
@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .login-card {
    border-radius: 32px;
  }
  .card-body {
    padding: 30px 22px 32px;
  }
  /* CHANGED: keep mobile padding on the register card */
  .register-card .card-body {
    padding-left: 22px;
    padding-right: 22px;
  }
  .brand {
    width: 250px;
  }
  .sparky-login {
    height: 80px;
  }
}

/* =========================================================
   CRESPORT — Academic Performance dashboard
   Sections: 1 Base · 2 Header · 3 Tabs · 4 Cards · 5 Term table
   ========================================================= */

/* ---------- 1. BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.student-page {
  font-family: "Inter", sans-serif;
  color: #1a1a1a;
  background: #1e1e1e;
}

ul {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}
[hidden] {
  display: none !important;
}

.portal {
  width: 100%;
  background: #fff;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- 2. HEADER ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  padding: 0 24px 0 12px;
  background: #2b3668;
  color: #fff;
}

.topbar__brand,
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__logo {
  height: 52px;
  width: auto;
  border-radius: 50%;
  object-fit: cover;
}

.topbar__divider {
  width: 2px;
  height: 44px;
  background: #fff;
  opacity: 0.85;
}
.topbar__divider--tall {
  height: 66px;
  margin: 0 10px;
}

.topbar__name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topbar__school {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1;
}
.topbar__wordmark {
  height: 30px;
  width: auto;
  display: block;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 62px;
  height: 48px;
  color: #2b3668;
  background: #8fb0ff;
  border-radius: 12px;
  transition: background 0.15s;
}
.icon-btn:hover {
  background: #b2c8ff;
}

.user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 15px;
  line-height: 1.4;
}
.user__text strong {
  font-weight: 700;
}
.user__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #d9d9d9;
}

/* ---------- 3. TABS ---------- */
.tabs {
  display: flex;
  gap: clamp(12px, 2.5vw, 36px);
  padding: 14px clamp(12px, 2.8vw, 40px) 10px;
}

.tab {
  min-width: 236px;
  padding: 7px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  background: #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
  transition:
    background 0.15s,
    color 0.15s;
}
.tab:hover {
  background: #cfd6f3;
}
.tab.is-active {
  color: #fff;
  background: #4a68d9;
}

/* ---------- 4. CARDS ---------- */
.content {
  padding: 4px clamp(8px, 1.5vw, 24px) 16px;
}

.panel {
  display: block;
}

.top-cards {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  margin-bottom: 14px;
}

.card {
  padding: 18px 16px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px #e3e3e3,
    0 2px 6px rgba(0, 0, 0, 0.12);
}

.card__title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.card__title--lined {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 8px 14px;
}
.card__title--lined::before,
.card__title--lined::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #2b3668;
}

/* Grade Summary bars */
.term-list {
  display: grid;
  gap: 14px;
  padding: 0 4px;
}

.term-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 66px;
  padding: 0 30px;
  font-size: 24px;
  font-weight: 700;
  color: #1c2a66;
  background: #8da9f7;
  border: 2px solid #4a68d9;
  border-radius: 6px;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.1s,
    background 0.15s;
}
.term-bar:hover {
  background: #9db5f9;
}
.term-bar:active {
  transform: translateY(1px);
}

/* Subject Update */
.update-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: #1c2a66;
  background: #8da9f7;
  border-radius: 6px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}

.update-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid #222;
  border-radius: 6px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.update-col + .update-col {
  border-left: 1.5px solid #222;
}

.update-col li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
}
.update-col li + li {
  border-top: 1.5px solid #222;
}
.update-col li.is-empty {
  color: #aaa;
  justify-content: center;
}

/* Privacy notice on the registration page */
.privacy-note{margin:0 0 12px;padding:10px 12px;border-left:3px solid var(--orange,#f28c28);background:rgba(0,0,0,.04);border-radius:6px;font-size:13px;line-height:1.5}
.privacy-note a{font-weight:600}
.reg-step > .privacy-note{margin-bottom:16px}
.privacy-dialog{width:min(560px,92vw);max-height:86vh;padding:22px 24px;border:0;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.privacy-dialog::backdrop{background:rgba(10,20,50,.55)}
.privacy-dialog h2{margin:0 0 10px;font-size:20px}
.privacy-dialog h3{margin:14px 0 4px;font-size:14px}
.privacy-dialog p,.privacy-dialog li{font-size:13px;line-height:1.55}
.privacy-dialog ul{margin:4px 0 0;padding-left:18px}
.privacy-body{max-height:52vh;overflow:auto;padding-right:6px;margin-bottom:14px}
