* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f4efe6;
  color: #2c2c2c;
}

/* Shared variables */
:root {
  --green: #2f6b3f;
  --green-dark: #1f5f34;
  --brown: #8a6a4a;
  --dark-brown: #3d2a1d;
  --cream: #f8f4ec;
  --card: #fffdf9;
  --line: #cbbba4;
}

.topbar-spacer {
  display: none;
}

.landing-page,
.login-page {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(rgba(40, 25, 10, 0.6), rgba(40, 25, 10, 0.6)),
              url("../assets/images/bg.jpg");
  background-size: cover;
  background-position: center;
}

.landing-card,
.login-card {
  background: #fff8ed;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  width: 420px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.landing-card h1,
.login-card h2 {
  color: #5b3a1e;
  margin-bottom: 15px;
}

.landing-card p,
.login-card p {
  margin-bottom: 25px;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  background: #7b4f28;
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  margin: 5px;
  font-size: 15px;
}

.btn:hover {
  background: #5b3a1e;
}

.btn-secondary {
  background: #a36a32;
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #4a2f18;
  color: white;
  padding: 25px;
}

.sidebar h2 {
  margin-bottom: 30px;
}

.sidebar a {
  display: block;
  color: white;
  text-decoration: none;
  margin: 15px 0;
  padding: 10px;
  border-radius: 8px;
}

.sidebar a:hover {
  background: #6d4523;
}

.content {
  flex: 1;
  padding: 40px;
}

.content h1 {
  color: #4a2f18;
  margin-bottom: 10px;
}

.card-container,
.module-grid {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.info-card,
.module-card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  width: 250px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

.info-card h3,
.module-card h3 {
  color: #5b3a1e;
  margin-bottom: 10px;
}

.module-card button {
  margin-top: 15px;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
}

.unlocked {
  border-left: 6px solid #2d8a4d;
}

.locked {
  opacity: 0.6;
  border-left: 6px solid #888;
}

/* Tables and Forms */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
  padding: 14px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.data-table th {
  background: #5b3a1e;
  color: white;
}

.form-card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
  margin: 25px 0;
}

.form-card input,
.form-card select {
  width: 100%;
  padding: 12px;
  margin: 8px 0 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.form-card label {
  font-weight: bold;
  color: #4a2f18;
}

.quiz-box {
  background: white;
  padding: 25px;
  border-radius: 14px;
  max-width: 700px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
  margin-top: 25px;
}

.quiz-box h3 {
  color: #4a2f18;
  margin-top: 15px;
}

/* 3D Hub Placeholder */

.game-placeholder {
  background: #fff8ed;
  border: 2px dashed #7b4f28;
  border-radius: 16px;
  padding: 30px;
  margin: 30px 0;
  text-align: center;
}

.game-placeholder h2 {
  color: #4a2f18;
  margin-bottom: 10px;
}

.game-placeholder p {
  max-width: 800px;
  margin: 0 auto 25px;
  line-height: 1.6;
}

.portal-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 25px;
}

.portal-card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  width: 260px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

.portal-card h3 {
  color: #5b3a1e;
  margin-bottom: 10px;
}

.portal-card button {
  margin-top: 15px;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
}

/* Status Badges */

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  margin-top: 10px;
}

.status-unlocked {
  background: #d8f3dc;
  color: #1b5e20;
}

.status-locked {
  background: #e0e0e0;
  color: #555;
}

.status-completed {
  background: #fff3cd;
  color: #8a5a00;
}

.section-title {
  margin-top: 35px;
  margin-bottom: 15px;
  color: #4a2f18;
}

.hero-panel {
  background: linear-gradient(135deg, #7b4f28, #4a2f18);
  color: white;
  padding: 35px;
  border-radius: 18px;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.hero-panel h1 {
  color: white;
  margin-bottom: 10px;
}

.hero-panel p {
  max-width: 750px;
  line-height: 1.6;
}

.small-note {
  font-size: 14px;
  color: #6d6d6d;
  margin-top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   MODERN LOGIN PAGE
========================= */

.login-body {
  min-height: 100vh;
  background: #faf7f0;
  color: #3d2a1d;
}

.login-header {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding: 35px 70px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e7dfd2;
}

.logo-placeholder img {
  width: 72px;
  height: 72px;
  object-fit: fill;
  border-radius: 50%;
}

.brand h1 {
  font-size: 42px;
  color: #8a6a4a;
  font-weight: 800;
}

.brand h1 span {
  color: #2f6b3f;
}

.top-nav {
  display: flex;
  gap: 45px;
  margin-top: 18px;
  margin-left: 5px;
}

.top-nav a {
  text-decoration: none;
  color: #3d2a1d;
  font-size: 18px;
  font-weight: 500;
}

.top-nav a:hover {
  color: #2f6b3f;
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 590px;
}

.modern-login-card {
  display: flex;
  width: 900px;
  min-height: 430px;
  background: white;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.18);
  border: 1px solid #e2d7c7;
}

.login-form-side {
  width: 50%;
  padding: 35px 45px;
  background: #ffffff;
}

.role-tabs {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #d6c8b7;
  margin-bottom: 25px;
}

.tab {
  width: 50%;
  background: none;
  border: none;
  padding: 10px;
  font-size: 18px;
  color: #5b3a1e;
  cursor: pointer;
  font-weight: 500;
}

.tab.active {
  color: #2f6b3f;
  font-weight: 700;
  border-bottom: 4px solid #2f6b3f;
}

.login-form-side h2 {
  font-size: 28px;
  color: #2f6b3f;
  margin-bottom: 20px;
}

.auth-form-intro {
  margin: -8px 0 22px;
  color: #6b543a;
  font-size: 14px;
  line-height: 1.5;
}

.login-form-side label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #2c2c2c;
}

.login-form-side input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #8a6a4a;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 15px;
  outline: none;
}

.login-form-side input:focus {
  border-color: #2f6b3f;
}

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  padding-right: 72px;
}

.auth-password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 52px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: #edf4ed;
  color: #2f6b3f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: #dcebdc;
  outline: 2px solid #2f6b3f;
  outline-offset: 1px;
}

.auth-form-message {
  margin: -6px 0 16px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form-message.error {
  border: 1px solid #d8aaa3;
  background: #fff1ef;
  color: #7d3027;
}

.instructor-account-note {
  margin: 16px 0 0;
  padding: 11px 13px;
  border: 1px solid #d7c9b8;
  border-radius: 10px;
  background: #faf6ef;
  color: #6b543a;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

/* Prevent the login or registration form from flashing before Firebase
   finishes restoring a persisted session. */
.auth-check-pending .login-header,
.auth-check-pending .login-wrapper,
.auth-check-pending .login-footer {
  visibility: hidden;
}

.auth-check-pending .login-loading-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-check-pending body {
  overflow: hidden;
}

.forgot-link {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 22px;
}

.forgot-link a,
.create-account a,
.login-footer a {
  color: #5b3a1e;
  text-decoration: none;
  font-weight: 600;
}

.forgot-link a:hover,
.create-account a:hover,
.login-footer a:hover {
  color: #2f6b3f;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2);
}

.login-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.create-account {
  text-align: center;
  margin-top: 18px;
  font-size: 15px;
}

.login-image-side {
  width: 50%;
  background: #f0e5d6;
  padding: 55px 45px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.image-placeholder {
  width: 100%;
  height: 250px;
  border-radius: 14px;
  background: #e5d5bf;
  border: 2px dashed #9b7a58;
  margin-bottom: 18px;
}

.login-image-side p {
  font-size: 16px;
  line-height: 1.4;
  color: #3d2a1d;
}

.login-footer {
  max-width: 900px;
  margin: 25px auto 0;
  padding: 25px 0;
  border-top: 1px solid #d8cab8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-footer div {
  display: flex;
  gap: 35px;
}

.login-footer p {
  color: #5b3a1e;
}

/* =========================
   STUDENT DASHBOARD UPGRADE
========================= */

.student-dashboard-body {
  margin: 0;
  background: #f8f4ec;
  color: #3b2a1d;
}

.student-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.student-sidebar {
  width: 250px;
  background: linear-gradient(to bottom, #efe4d3, #e7dbc7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* This line starts after the green top border,
   so it will not appear on the green strip */
.student-sidebar::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 0;
  width: 1px;
  height: calc(100% - 6px);
  background: #cbbba4;
}

.student-sidebar-brand {
  height: 72px;
  padding: 0 18px;
  border-top: 6px solid #2f6b3f;
  border-bottom: 1px solid #cbbba4;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to right, #efe4d3, #e9dcc8);
}

.student-logo-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ddd1bc;
  border: 2px dashed #2f6b3f;
  flex-shrink: 0;
}

.student-sidebar-brand h2 {
  font-size: 22px;
  margin: 0;
  font-weight: 800;
  color: #8a6a4a;
}

.student-sidebar-brand h2 span {
  color: #2f6b3f;
}

/* Nav alignment fixed */

.student-sidebar-nav {
  padding: 14px 12px;
}

.student-sidebar-nav a,
.student-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #3d2a1d;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 16px;
  margin-bottom: 6px;
  transition: 0.2s ease;
}

.student-sidebar-nav a:hover,
.student-sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.65);
}

.student-sidebar-nav a.active {
  background: #fffdf9;
  border: 1px solid #cbbba4;
  font-weight: 700;
  color: #2f6b3f;
}

.menu-icon-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.student-sidebar-footer {
  padding: 12px;
  border-top: 1px solid #cbbba4;
}

/* Main Area */

.student-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Topbar */

.student-topbar {
  height: 72px;
  padding: 0 18px;
  border-top: 6px solid #2f6b3f;
  border-bottom: 1px solid #cbbba4;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to right, #efe4d3, #e9dcc8);
}

.student-topbar-right {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 14px;
}

.student-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  color: #3d2a1d;
}

.student-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d9c9b2;
  border: 2px dashed #9f8763;
}

.student-icon-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.topbar-icon-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
}

/* Content */

.student-dashboard-content {
  padding: 24px 28px;
}

/* Hub Preview */

.hub-preview-section {
  margin-bottom: 26px;
}

.hub-preview-card {
  display: flex;
  justify-content: center;
}

.hub-image-placeholder {
  width: 100%;
  max-width: 940px;
  height: 405px;
  border-radius: 26px;
  background: linear-gradient(135deg, #d9ccb6, #efe5d5);
  border: 2px solid #a58b67;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.hub-overlay-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 270px;
  padding: 24px 20px 18px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.38);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  border-radius: 22px;
  text-align: center;
}

.hub-play-placeholder {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(90, 75, 55, 0.38);
  border: 2px dashed rgba(255,255,255,0.55);
}

.hub-enter-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 18px;
  border-radius: 30px;
  text-decoration: none;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.hub-enter-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.hub-game-launch-card {
  width: min(360px, calc(100% - 40px));
  padding: 24px;
  color: #ffffff;
  background: rgba(22, 48, 28, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 38px rgba(12, 27, 15, 0.28);
  backdrop-filter: blur(8px);
}

.hub-game-launch-card h2 {
  margin: 7px 0 8px;
  font-size: 25px;
  line-height: 1.15;
}

.hub-game-launch-card p {
  min-height: 38px;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

.hub-game-kicker {
  color: #d8ef9b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hub-game-launch-card .hub-enter-btn {
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 24, 11, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.hub-game-launch-card .hub-enter-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 22px rgba(5, 24, 11, 0.34);
}

.hub-game-launch-card .hub-enter-btn:focus-visible {
  outline: 3px solid #f4d06f;
  outline-offset: 3px;
}

.hub-game-launch-card .hub-enter-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  filter: saturate(0.65);
}

.hub-game-launch-card .hub-enter-btn.is-loading {
  cursor: wait;
}

.hub-play-icon {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding-left: 2px;
  color: #205c31;
  background: #ffffff;
  font-size: 12px;
}

.hub-preview-label {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 17px;
  background: rgba(0,0,0,0.22);
  padding: 6px 14px;
  border-radius: 12px;
}

/* Bottom Grid */

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 940px;
  margin: 0 auto;
}

.dashboard-info-card {
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 26px;
  padding: 24px 24px 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.dashboard-info-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #2f6b3f;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.activity-icon-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #efe5d5;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.activity-item h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #3b2a1d;
}

.activity-item p {
  margin: 0;
  font-size: 14px;
  color: #6e604e;
}

/* Image support for later */

.logo-placeholder img,
.student-logo-placeholder img,
.student-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-placeholder img,
.student-logo-placeholder img,
.student-user-avatar img {
  border-radius: 50%;
}

.hub-preview-img,
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder img {
  border-radius: 14px;
}

.menu-icon-placeholder img,
.topbar-icon-placeholder img,
.activity-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive Login Page */

@media (max-width: 900px) {
  .login-header {
    padding: 25px;
  }

  .modern-login-card {
    width: 95%;
    flex-direction: column;
  }

  .login-form-side,
  .login-image-side {
    width: 100%;
  }

  .login-footer {
    width: 90%;
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .login-footer div {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Responsive Student Dashboard */

@media (max-width: 1100px) {
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .hub-image-placeholder {
    height: 360px;
  }
}

@media (max-width: 900px) {
  .student-layout {
    flex-direction: column;
  }

  .student-sidebar {
    width: 100%;
  }

  .student-sidebar::after {
    display: none;
  }

  .student-topbar {
    padding: 12px 18px;
    height: auto;
  }

  .hub-image-placeholder {
    height: 300px;
  }

  .hub-overlay-card {
    width: 240px;
  }

  .hub-game-launch-card {
    width: min(330px, calc(100% - 28px));
    padding: 19px;
  }

  .hub-game-launch-card h2 {
    font-size: 21px;
  }
}

/* =========================
   WEEKLY PORTALS PAGE
========================= */

.portal-page-header {
  max-width: 980px;
  margin: 0 auto 18px;
}

.portal-page-header h1 {
  font-size: 34px;
  color: #2f6b3f;
  margin-bottom: 6px;
  font-weight: 800;
}

.portal-page-header p {
  font-size: 16px;
  color: #5b4632;
}

.portal-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.portal-module-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.portal-card-top {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 700;
  color: #fffaf3;
}

.unlocked-top {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.locked-top {
  background: linear-gradient(90deg, #9d8669, #b39b7e);
}

.portal-card-body {
  display: flex;
  gap: 16px;
  padding: 16px;
  align-items: flex-start;
}

.portal-thumb-placeholder {
  width: 96px;
  height: 124px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e9dfcf, #ddd1bc);
  border: 2px dashed #b09373;
  flex-shrink: 0;
}

.portal-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 124px;
}

.portal-card-info h3 {
  font-size: 18px;
  line-height: 1.2;
  color: #2f241c;
  margin-bottom: 12px;
  font-weight: 700;
}

.portal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

.portal-status-icon-placeholder {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.unlocked-status {
  color: #648b54;
}

.locked-status {
  color: #5f4d3b;
}

.portal-action-btn {
  margin-top: auto;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.unlocked-btn {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
}

.unlocked-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.locked-btn {
  background: linear-gradient(90deg, #d2cec7, #c9c4bc);
  color: #f7f5f1;
  cursor: not-allowed;
}

.unlocked-card {
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

/* Responsive */
@media (max-width: 1200px) {
  .portal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .portal-card-body {
    flex-direction: column;
  }

  .portal-thumb-placeholder {
    width: 100%;
    height: 180px;
  }
}

/* =========================
   TASKS PAGE
========================= */

.tasks-page-header {
  max-width: 980px;
  margin: 0 auto 22px;
}

.tasks-page-header h1 {
  font-size: 34px;
  color: #2f6b3f;
  margin-bottom: 6px;
  font-weight: 800;
}

.tasks-page-header p {
  font-size: 16px;
  color: #5b4632;
  max-width: 700px;
  line-height: 1.5;
}

.tasks-summary-grid {
  max-width: 980px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.task-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

.task-summary-card h3 {
  color: #2f6b3f;
  margin-bottom: 8px;
  font-size: 18px;
}

.task-summary-card p {
  color: #3b2a1d;
  font-size: 16px;
  font-weight: 600;
}

.task-board {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.task-column {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.task-column-header {
  padding: 18px;
  color: white;
}

.task-column-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.task-column-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.discover-header {
  background: linear-gradient(90deg, #2f6b3f, #3f8a54);
}

.engage-header {
  background: linear-gradient(90deg, #8a6a4a, #a9825d);
}

.challenge-header {
  background: linear-gradient(90deg, #5b3a1e, #7b4f28);
}

.task-item-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #eadfce;
}

.task-item-card:last-child {
  border-bottom: none;
}

.task-icon-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #efe5d5;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.task-item-content h3 {
  margin: 0 0 6px;
  color: #2f241c;
  font-size: 17px;
}

.task-item-content p {
  margin: 0 0 10px;
  color: #6e604e;
  font-size: 14px;
  line-height: 1.4;
}

.task-status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
}

.completed {
  background: #d8f3dc;
  color: #1b5e20;
}

.in-progress {
  background: #fff3cd;
  color: #8a5a00;
}

.pending {
  background: #e0e0e0;
  color: #555;
}

.locked-label {
  background: #d6d0c8;
  color: #6b5a48;
}

.completed-task {
  background: #fbfff9;
}

.locked-task {
  opacity: 0.65;
}

.task-action-btn {
  display: inline-block;
  margin-top: 10px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.task-action-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

/* Responsive Tasks Page */
@media (max-width: 1200px) {
  .task-board {
    grid-template-columns: 1fr;
  }

  .tasks-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   TERM CARDS PAGE
========================= */

.term-page-content {
  padding: 0;
}

.term-library-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: calc(100vh - 72px);
}

.term-main-panel {
  padding: 28px 28px 40px;
  border-right: 1px solid #d6c8b6;
  overflow-y: auto;
}

.term-page-header {
  max-width: 900px;
  margin: 0 auto 20px;
}

.term-page-header h1 {
  font-size: 34px;
  color: #2f6b3f;
  margin-bottom: 22px;
  font-weight: 800;
}

.term-filter-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.term-search-box {
  width: 240px;
  height: 46px;
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
}

.term-search-icon-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.term-search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  color: #3b2a1d;
}

.term-filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.term-filter {
  border: none;
  background: #8a7357;
  color: #fffdf9;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.term-filter.active,
.term-filter:hover {
  background: #2f6b3f;
}

.term-card-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.term-card {
  min-height: 210px;
  background: linear-gradient(135deg, #f3dfc3, #ead3b5);
  border: 1px solid #d0b895;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.term-card.selected {
  border: 2px solid #2f6b3f;
  box-shadow: 0 10px 20px rgba(47, 107, 63, 0.18);
}

.term-title-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.term-icon-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eadbc7;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.term-card h3 {
  color: #2f241c;
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.term-card p {
  color: #3b2a1d;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 18px;
}

.term-week-label {
  margin-top: auto;
  color: #2f241c;
  font-weight: 600;
  font-size: 14px;
}

.term-detail-panel {
  background: #f8f4ec;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.term-detail-panel h2 {
  font-size: 28px;
  color: #2f6b3f;
  margin-bottom: 18px;
}

.term-detail-panel p {
  color: #2f241c;
  line-height: 1.45;
  font-size: 16px;
  margin-bottom: 30px;
}

.term-detail-panel h3 {
  color: #3b2a1d;
  margin-bottom: 14px;
  font-size: 20px;
}

.term-detail-panel a {
  color: #6d543c;
  text-decoration: underline;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.4;
}

.term-close-btn {
  margin-top: auto;
  height: 50px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(90deg, #7b654c, #8a7357);
  color: #fffdf9;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.term-close-btn:hover {
  background: linear-gradient(90deg, #5f4b35, #735d43);
}

/* Responsive Term Cards Page */
@media (max-width: 1200px) {
  .term-library-area {
    grid-template-columns: 1fr;
  }

  .term-detail-panel {
    border-top: 1px solid #d6c8b6;
  }
}

@media (max-width: 950px) {
  .term-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .term-card-grid {
    grid-template-columns: 1fr;
  }

  .term-filter-row {
    align-items: stretch;
  }

  .term-search-box {
    width: 100%;
  }
}

/* =========================
   STUDENT SUBMISSIONS PAGE
========================= */

.student-role-label {
  font-size: 16px;
  color: #3d2a1d;
  font-weight: 600;
}

.submissions-page-content {
  padding: 0;
}

.submissions-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: calc(100vh - 72px);
}

.submissions-main-panel {
  padding: 42px 42px 40px;
  overflow-y: auto;
  border-right: 1px solid #d6c8b6;
}

.submissions-page-header h1 {
  font-size: 42px;
  color: #2f241c;
  margin-bottom: 28px;
  font-weight: 800;
}

.submission-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 110px;
  gap: 16px;
  margin-bottom: 28px;
}

.submission-filter-row select,
.submission-filter-row button {
  height: 52px;
  border-radius: 28px;
  border: 1px solid #c7b69d;
  background: #fffdf9;
  color: #3b2a1d;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
}

.submission-filter-row button {
  background: #f3eee4;
  color: #2f6b3f;
  font-weight: 700;
  cursor: pointer;
}

.submission-filter-row button:hover {
  background: #e8ddcc;
}

.submission-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.submission-table {
  width: 100%;
  border-collapse: collapse;
}

.submission-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.submission-table th {
  color: #3d2a1d;
  font-size: 16px;
  text-align: left;
  padding: 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.submission-table td {
  padding: 18px;
  color: #2f241c;
  font-size: 15px;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

.submission-table tbody tr:last-child td {
  border-bottom: none;
}

.submission-action-btn {
  min-width: 96px;
  padding: 9px 16px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.submission-action-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.submission-action-btn.feedback {
  min-width: 126px;
}

.disabled-btn {
  background: linear-gradient(90deg, #8d8a84, #aaa69f);
  cursor: not-allowed;
}

.disabled-btn:hover {
  background: linear-gradient(90deg, #8d8a84, #aaa69f);
}

/* Feedback Panel */

.feedback-preview-panel {
  background: #fffdf9;
  display: flex;
  flex-direction: column;
}

.feedback-panel-header {
  height: 74px;
  background: linear-gradient(to right, #efe4d3, #e8dcc9);
  border-bottom: 1px solid #cab89e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.feedback-panel-header h2 {
  font-size: 24px;
  color: #3d2a1d;
  margin: 0;
  font-weight: 800;
}

.feedback-close-btn {
  border: none;
  background: transparent;
  font-size: 36px;
  color: #6a4223;
  cursor: pointer;
  line-height: 1;
}

.feedback-panel-body {
  padding: 28px 22px;
}

.feedback-panel-body h3 {
  font-size: 22px;
  color: #2f241c;
  margin-bottom: 20px;
}

.feedback-panel-body p {
  color: #2f241c;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 22px;
}

.rubric-score {
  font-size: 18px;
}

/* Responsive Submissions Page */

@media (max-width: 1200px) {
  .submissions-layout {
    grid-template-columns: 1fr;
  }

  .feedback-preview-panel {
    border-top: 1px solid #d6c8b6;
  }
}

@media (max-width: 900px) {
  .submission-filter-row {
    grid-template-columns: 1fr;
  }

  .submissions-main-panel {
    padding: 28px 20px;
  }

  .submission-table-card {
    overflow-x: auto;
  }

  .submission-table {
    min-width: 820px;
  }
}

/* =========================
   STUDENT PROFILE PAGE
========================= */

.profile-page-content {
  padding: 0;
}

.profile-page-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 42px 60px;
}

.profile-title {
  font-size: 42px;
  color: #2f241c;
  margin-bottom: 26px;
  font-weight: 800;
}

.profile-header-card {
  background: linear-gradient(135deg, #efe4d3, #f4eadb);
  border: 1px solid #cdbda8;
  border-radius: 24px;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 34px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  margin-bottom: 28px;
}

.profile-avatar-large {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #d9c9b2;
  border: 2px dashed #8a6a4a;
  flex-shrink: 0;
}

.profile-details p {
  font-size: 19px;
  color: #2f241c;
  margin-bottom: 8px;
  line-height: 1.25;
}

.profile-details strong {
  font-weight: 800;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 30px;
}

.profile-stat-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 110px;
}

.profile-stat-card h3 {
  font-size: 17px;
  color: #2f241c;
  margin-bottom: 8px;
  font-weight: 700;
}

.profile-stat-card p {
  font-size: 36px;
  color: #3b2a1d;
  font-weight: 800;
  margin: 0;
}

.profile-stat-icon-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #2f6b3f;
  border: 2px dashed #d9c9b2;
  flex-shrink: 0;
}

.profile-section {
  margin-top: 28px;
}

.profile-section h2 {
  font-size: 28px;
  color: #2f241c;
  margin-bottom: 18px;
  font-weight: 800;
}

.achievement-row {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  align-items: center;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achievement-icon-placeholder {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #d8c9af;
  border: 3px dashed #8a6a4a;
  flex-shrink: 0;
}

.achievement-item p {
  color: #2f241c;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 600;
}

.settings-btn-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-setting-btn {
  min-width: 190px;
  height: 46px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: #fffdf9;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.profile-setting-btn:hover {
  background: linear-gradient(90deg, #6d543c, #80684e);
}

.logout-btn {
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
}

.logout-btn:hover {
  background: linear-gradient(90deg, #743b3b, #8c4c4c);
}

/* Profile image support later */

.profile-avatar-large img,
.profile-stat-icon-placeholder img,
.achievement-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-large img,
.profile-stat-icon-placeholder img,
.achievement-icon-placeholder img {
  border-radius: 50%;
}

/* Responsive Profile Page */

@media (max-width: 1200px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .profile-page-wrap {
    padding: 28px 20px;
  }

  .profile-header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-title {
    font-size: 34px;
  }

  .settings-btn-row {
    flex-direction: column;
  }

  .profile-setting-btn {
    width: 100%;
  }
}

/* =========================
   TEACHER DASHBOARD UPGRADE
========================= */

.teacher-dashboard-body {
  margin: 0;
  background: #f8f4ec;
  color: #3b2a1d;
}

.teacher-layout {
  display: flex;
  min-height: 100vh;
}

/* Teacher Sidebar */

.teacher-sidebar {
  width: 250px;
  background: linear-gradient(to bottom, #efe4d3, #e7dbc7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.teacher-sidebar::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 0;
  width: 1px;
  height: calc(100% - 6px);
  background: #cbbba4;
}

.teacher-sidebar-brand {
  height: 72px;
  padding: 0 18px;
  border-top: 6px solid #2f6b3f;
  border-bottom: 1px solid #cbbba4;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to right, #efe4d3, #e9dcc8);
}

.teacher-logo-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ddd1bc;
  border: 2px dashed #2f6b3f;
  flex-shrink: 0;
}

.teacher-sidebar-brand h2 {
  font-size: 22px;
  margin: 0;
  font-weight: 800;
  color: #8a6a4a;
}

.teacher-sidebar-brand h2 span {
  color: #2f6b3f;
}

.teacher-sidebar-nav {
  padding: 14px 12px;
}

.teacher-sidebar-nav a,
.teacher-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #3d2a1d;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 16px;
  margin-bottom: 6px;
  transition: 0.2s ease;
}

.teacher-sidebar-nav a:hover,
.teacher-sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.65);
}

.teacher-sidebar-nav a.active {
  background: #fffdf9;
  border: 1px solid #cbbba4;
  font-weight: 700;
  color: #2f6b3f;
}

.teacher-menu-icon-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
  flex-shrink: 0;
}

.teacher-sidebar-footer {
  padding: 12px;
  border-top: 1px solid #cbbba4;
}

/* Main Area */

.teacher-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Teacher Topbar */

.teacher-topbar {
  height: 72px;
  background: linear-gradient(to right, #f5eee2, #f0e4d2);
  border-top: 6px solid #2f6b3f;
  border-bottom: 1px solid #d5c6b1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px;
}

.teacher-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.teacher-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3d2a1d;
}

.teacher-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.teacher-role-label {
  font-size: 13px;
  color: #6b543a;
}

.teacher-user-info strong {
  font-size: 16px;
  color: #3d2a1d;
  font-weight: 700;
}

.teacher-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #d9c9b2;
  border: 2px dashed #9f8763;
  flex-shrink: 0;
}

.teacher-logout-btn {
  min-width: 86px;
  height: 34px;
  padding: 0 18px;
  border-radius: 18px;
  background: #9a5a12;
  color: #fffdf9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease;
}

.teacher-logout-btn:hover {
  background: #7d470d;
}

/* Content */

.teacher-dashboard-content {
  padding: 24px 28px 50px;
}

.teacher-page-title {
  font-size: 34px;
  color: #2f6b3f;
  margin-bottom: 20px;
  font-weight: 800;
}

/* Summary Cards */

.teacher-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.teacher-summary-card {
  min-height: 130px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.teacher-summary-card h3 {
  color: #2f241c;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 700;
}

.teacher-big-stat {
  font-size: 42px;
  font-weight: 800;
  color: #3b2a1d;
  margin: 0;
}

.green-stat {
  color: #2f6b3f;
}

.teacher-chart-placeholder {
  background: #e5d8c6;
  border: 2px dashed #9b7a58;
  flex-shrink: 0;
}

.wide-chart {
  width: 170px;
  height: 70px;
  border-radius: 12px;
}

.bar-chart {
  width: 160px;
  height: 75px;
  border-radius: 12px;
}

.line-chart {
  width: 170px;
  height: 70px;
  border-radius: 12px;
}

/* Sections */

.teacher-section {
  margin-top: 24px;
}

.teacher-section h2 {
  font-size: 28px;
  color: #2f241c;
  margin-bottom: 14px;
  font-weight: 800;
}

/* Class Overview */

.class-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.class-overview-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.class-overview-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.class-overview-top h3 {
  font-size: 20px;
  color: #2f241c;
  margin: 0;
}

.class-overview-top span {
  color: #2f241c;
  font-weight: 700;
}

.class-overview-card p {
  font-size: 17px;
  color: #3b2a1d;
  margin-bottom: 14px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 20px;
  background: #d4c8b7;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  border-radius: 20px;
}

.fill-60 {
  width: 60%;
}

.fill-40 {
  width: 40%;
}

.class-overview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-overview-bottom span {
  font-size: 17px;
  font-weight: 700;
  color: #3b2a1d;
}

.view-class-btn {
  padding: 12px 22px;
  border-radius: 26px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.view-class-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

/* Recent Activity Table */

.teacher-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.teacher-activity-table {
  width: 100%;
  border-collapse: collapse;
}

.teacher-activity-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.teacher-activity-table th {
  color: #2f241c;
  font-size: 17px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.teacher-activity-table td {
  padding: 14px 18px;
  color: #2f241c;
  font-size: 16px;
  border-bottom: 1px solid #eadfce;
}

.teacher-activity-table tbody tr:last-child td {
  border-bottom: none;
}

/* Teacher image/icon support later */

.teacher-logo-placeholder img,
.teacher-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.teacher-menu-icon-placeholder img,
.teacher-topbar-icon-placeholder img,
.teacher-chart-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive Teacher Dashboard */

@media (max-width: 1200px) {
  .teacher-summary-grid,
  .class-overview-grid {
    grid-template-columns: 1fr;
  }

  .teacher-summary-card {
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .teacher-layout {
    flex-direction: column;
  }

  .teacher-sidebar {
    width: 100%;
  }

  .teacher-sidebar::after {
    display: none;
  }

  .teacher-topbar {
    height: auto;
    padding: 12px 18px;
  }

  .teacher-dashboard-content {
    padding: 24px 18px;
  }

  .teacher-table-card {
    overflow-x: auto;
  }

  .teacher-activity-table {
    min-width: 780px;
  }
}

/* =========================
   TEACHER CLASSES PAGE
========================= */

.teacher-classes-content {
  padding: 0;
}

.teacher-classes-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: calc(100vh - 72px);
}

.teacher-classes-main {
  padding: 34px 34px 40px;
  border-right: 1px solid #d6c8b6;
  overflow-x: auto;
}

.teacher-classes-header {
  margin-bottom: 22px;
}

.teacher-classes-header h1 {
  font-size: 36px;
  color: #2f6b3f;
  margin-bottom: 18px;
  font-weight: 800;
}

.create-class-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.create-class-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.create-icon-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  border: 1px dashed rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.teacher-classes-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.teacher-classes-table {
  width: 100%;
  border-collapse: collapse;
}

.teacher-classes-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.teacher-classes-table th {
  color: #2f241c;
  font-size: 16px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.teacher-classes-table td {
  padding: 18px;
  color: #2f241c;
  font-size: 16px;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

.teacher-classes-table tbody tr:last-child td {
  border-bottom: none;
}

.class-view-btn {
  min-width: 120px;
  height: 42px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 10px;
}

.class-view-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.manage-roster-link {
  color: #6d543c;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
}

.class-draft-btn {
  min-width: 180px;
  height: 42px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: #fffdf9;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Right Class Preview Panel */

.class-preview-panel {
  background: linear-gradient(135deg, #f1ddc3, #e7cda9);
  display: flex;
  flex-direction: column;
}

.class-preview-header {
  min-height: 120px;
  padding: 24px 22px;
  border-bottom: 1px solid #b99d79;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.class-preview-header h2 {
  color: #2f241c;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0;
}

.class-preview-close {
  border: none;
  background: transparent;
  font-size: 34px;
  color: #6a4223;
  cursor: pointer;
  line-height: 1;
}

.class-preview-body {
  padding: 24px 18px;
}

.join-code-card {
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.join-code-card p {
  color: #2f241c;
  font-size: 25px;
  margin-bottom: 8px;
}

.join-code-card h3 {
  color: #2f6b3f;
  font-size: 38px;
  letter-spacing: 2px;
  margin: 0;
  font-weight: 900;
}

.roster-title {
  color: #2f241c;
  font-size: 22px;
  margin-bottom: 12px;
}

.roster-preview-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.roster-preview-list li {
  color: #2f241c;
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.roster-preview-list span {
  color: #4d3928;
}

/* Responsive Teacher Classes */

@media (max-width: 1200px) {
  .teacher-classes-layout {
    grid-template-columns: 1fr;
  }

  .class-preview-panel {
    border-top: 1px solid #d6c8b6;
  }
}

@media (max-width: 900px) {
  .teacher-classes-main {
    padding: 28px 18px;
  }

  .teacher-classes-table-card {
    overflow-x: auto;
  }

  .teacher-classes-table {
    min-width: 900px;
  }
}

/* =========================
   WEEKLY RELEASE CONTROL
========================= */

.weekly-release-content {
  padding: 0;
}

.weekly-release-wrap {
  padding: 34px 34px 50px;
}

.weekly-release-header {
  margin-bottom: 24px;
}

.weekly-release-header h1 {
  font-size: 36px;
  color: #2f6b3f;
  margin-bottom: 8px;
  font-weight: 800;
}

.weekly-release-header p {
  font-size: 19px;
  color: #3b2a1d;
}

.weekly-release-class-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.weekly-release-class-card label {
  display: block;
  color: #2f241c;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.weekly-release-class-card select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #c7b69d;
  border-radius: 12px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
  outline: none;
}

.weekly-release-class-card select:focus {
  border-color: #2f6b3f;
}

.weekly-release-class-card select:disabled {
  background: #eee7dc;
  color: #7b6b59;
}

.weekly-release-class-card p {
  color: #6e604e;
  font-size: 14px;
  margin: 10px 0 0;
}

.weekly-release-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.weekly-release-table {
  width: 100%;
  border-collapse: collapse;
}

.weekly-release-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.weekly-release-table th {
  color: #2f241c;
  font-size: 18px;
  text-align: left;
  padding: 16px 20px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.weekly-release-table td {
  padding: 14px 20px;
  color: #2f241c;
  font-size: 17px;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

.weekly-release-table tbody tr:last-child td {
  border-bottom: none;
}

.release-status {
  font-weight: 700;
  color: #2f241c;
}

.unlocked-text {
  color: #2f6b3f;
}

.release-toggle {
  width: 66px;
  height: 32px;
  border: none;
  border-radius: 18px;
  background: #8a7357;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  margin-right: 10px;
  transition: 0.2s ease;
}

.release-toggle span {
  width: 24px;
  height: 24px;
  background: #f6f1e8;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 5px;
  transition: 0.2s ease;
}

.release-toggle.unlocked-toggle {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.release-toggle.unlocked-toggle span {
  left: 37px;
}

.release-lock-placeholder {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
  vertical-align: middle;
}

.release-lock-placeholder.unlocked-lock {
  border-color: #2f6b3f;
  background: #d8f3dc;
}

.unlock-next-week-btn {
  width: 100%;
  height: 80px;
  margin-top: 34px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.unlock-next-week-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

/* Responsive Weekly Release */

@media (max-width: 900px) {
  .weekly-release-wrap {
    padding: 28px 18px;
  }

  .weekly-release-table-card {
    overflow-x: auto;
  }

  .weekly-release-table {
    min-width: 780px;
  }

  .unlock-next-week-btn {
    font-size: 24px;
    height: 64px;
  }
}

/* =========================
   TEACHER TASK BUILDER PAGE
========================= */

.task-builder-content {
  padding: 0;
}

.task-builder-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 24px;
  min-height: calc(100vh - 72px);
  padding: 34px;
}

.task-builder-main h1 {
  font-size: 34px;
  color: #2f6b3f;
  margin-bottom: 24px;
  font-weight: 800;
}

.builder-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.builder-tab {
  height: 58px;
  border-radius: 14px;
  border: 1px solid #c7b69d;
  background: #fffdf9;
  color: #3b2a1d;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.builder-tab.active {
  color: #2f6b3f;
  border-bottom: 5px solid #2f6b3f;
  font-weight: 700;
}

.builder-form-area label {
  display: block;
  font-size: 20px;
  color: #2f241c;
  font-weight: 800;
  margin-bottom: 12px;
}

.builder-form-area textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid #c7b69d;
  border-radius: 16px;
  background: #fffdf9;
  padding: 18px;
  font-size: 18px;
  color: #3b2a1d;
  outline: none;
  margin-bottom: 18px;
}

.builder-form-area textarea:focus {
  border-color: #2f6b3f;
}

.add-task-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 20px;
}

.add-task-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.add-task-icon-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  border: 1px dashed rgba(255,255,255,0.7);
}

.task-list-box {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 42px;
}

.builder-task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #eadfce;
}

.builder-task-row:last-child {
  border-bottom: none;
}

.builder-task-row p {
  color: #2f241c;
  font-size: 18px;
  margin: 0;
  line-height: 1.35;
}

.builder-task-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.builder-task-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #2f241c;
  font-size: 17px;
  cursor: pointer;
}

.builder-task-actions button:hover {
  color: #2f6b3f;
}

.small-action-icon-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
}

.builder-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.save-draft-btn,
.publish-task-btn {
  height: 82px;
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
}

.save-draft-btn {
  background: linear-gradient(90deg, #7b654c, #8a7357);
}

.save-draft-btn:hover {
  background: linear-gradient(90deg, #5f4b35, #735d43);
}

.publish-task-btn {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.publish-task-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

/* Preview Panel */

.task-preview-panel {
  background: linear-gradient(135deg, #f1ddc3, #e7cda9);
  border-radius: 20px;
  padding: 24px;
  min-height: 620px;
}

.task-preview-panel h2 {
  color: #2f241c;
  font-size: 28px;
  margin-bottom: 18px;
  font-weight: 800;
}

.preview-device-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 10px;
  overflow: hidden;
  min-height: 520px;
}

.preview-mini-topbar {
  height: 52px;
  background: linear-gradient(to right, #efe4d3, #e8dcc9);
  border-top: 5px solid #2f6b3f;
  border-bottom: 1px solid #cab89e;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
}

.preview-logo-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ddd1bc;
  border: 1px dashed #2f6b3f;
  flex-shrink: 0;
}

.preview-user-mini {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #3d2a1d;
}

.preview-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d9c9b2;
  border: 1px dashed #9f8763;
}

.preview-icon-placeholder {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #e0d3bf;
  border: 1px dashed #8a6a4a;
}

.preview-content {
  padding: 22px 18px;
}

.preview-content h3 {
  color: #2f6b3f;
  font-size: 24px;
  margin-bottom: 4px;
}

.preview-content p {
  color: #2f241c;
  font-size: 15px;
  margin-bottom: 22px;
}

.preview-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.preview-tabs button {
  border: 1px solid #c7b69d;
  border-radius: 10px;
  background: #fffdf9;
  color: #3b2a1d;
  padding: 10px 12px;
  font-size: 14px;
}

.preview-tabs button.active {
  color: #2f6b3f;
  border-bottom: 4px solid #2f6b3f;
}

.preview-content h4 {
  color: #2f241c;
  font-size: 17px;
  margin-bottom: 10px;
}

.preview-task-list {
  border: 1px solid #cdbda8;
  border-radius: 12px;
  overflow: hidden;
}

.preview-task-list div {
  padding: 14px;
  color: #2f241c;
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid #eadfce;
}

.preview-task-list div:last-child {
  border-bottom: none;
}

/* Responsive Task Builder */

@media (max-width: 1200px) {
  .task-builder-layout {
    grid-template-columns: 1fr;
  }

  .task-preview-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .task-builder-layout {
    padding: 24px 18px;
  }

  .builder-tabs,
  .builder-bottom-actions {
    grid-template-columns: 1fr;
  }

  .builder-task-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .save-draft-btn,
  .publish-task-btn {
    height: 64px;
    font-size: 24px;
  }
}

/* =========================
   TEACHER SUBMISSION REVIEW PAGE
========================= */

.submission-review-content {
  padding: 0;
}

.submission-review-wrap {
  padding: 34px;
}

.submission-review-header {
  margin-bottom: 24px;
}

.submission-review-header h1 {
  color: #2f6b3f;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
}

.review-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2f241c;
  font-size: 28px;
}

.review-status-line span {
  color: #2f6b3f;
  font-weight: 800;
}

.review-check-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d8f3dc;
  border: 2px dashed #2f6b3f;
}

.submission-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.review-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.review-card h2 {
  color: #2f241c;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 14px;
}

.submission-meta {
  color: #2f241c;
  font-size: 17px;
  margin-bottom: 18px;
}

.student-submission-box {
  max-height: 390px;
  overflow-y: auto;
  padding: 18px;
  border-radius: 14px;
  background: #fbf7ef;
  border: 1px solid #d7c9b8;
}

.student-submission-box p,
.student-submission-box li {
  font-size: 17px;
  color: #2f241c;
  line-height: 1.45;
  margin-bottom: 12px;
}

.student-submission-box ul {
  margin-left: 22px;
  margin-bottom: 16px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.score-row span {
  color: #2f241c;
  font-size: 18px;
}

.score-row input {
  height: 42px;
  border: 1px solid #bba98f;
  border-radius: 10px;
  background: #fffdf9;
  text-align: center;
  color: #2f241c;
  font-size: 17px;
  outline: none;
}

.review-total-line {
  border-top: 1px solid #d7c9b8;
  padding-top: 14px;
  margin-top: 14px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  color: #2f241c;
  font-size: 20px;
}

.review-total-line strong {
  font-weight: 900;
}

.feedback-label {
  display: block;
  color: #2f241c;
  font-size: 18px;
  margin-bottom: 10px;
}

.feedback-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #bba98f;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  color: #2f241c;
  background: #fffdf9;
  outline: none;
  margin-bottom: 20px;
}

.feedback-textarea:focus {
  border-color: #2f6b3f;
}

.mark-reviewed-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(90deg, #7ab28a, #8fbea0);
  color: #f7fff8;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.mark-reviewed-btn:hover {
  background: linear-gradient(90deg, #2f6b3f, #3f8a54);
}

.review-note-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #e9f6eb;
  border: 1px solid #8bbf97;
  border-radius: 12px;
  padding: 18px;
}

.review-note-icon-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #d8f3dc;
  border: 1px dashed #2f6b3f;
  flex-shrink: 0;
}

.review-note-box p {
  color: #2f241c;
  font-size: 18px;
  margin: 0;
}

/* Responsive Submission Review */

@media (max-width: 1100px) {
  .submission-review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .submission-review-wrap {
    padding: 24px 18px;
  }

  .submission-review-header h1 {
    font-size: 28px;
  }

  .review-status-line {
    font-size: 22px;
  }
}

/* =========================
   TEACHER REPORTS PAGE
========================= */

.reports-page-content {
  padding: 0;
}

.reports-wrap {
  padding: 34px;
}

.reports-title {
  font-size: 38px;
  color: #2f6b3f;
  margin-bottom: 20px;
  font-weight: 800;
}

.reports-filter-row {
  display: grid;
  grid-template-columns: 1.25fr 0.72fr 1.15fr 0.85fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.reports-filter-row select {
  height: 54px;
  border-radius: 12px;
  border: 1px solid #bba98f;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
  padding: 0 16px;
  outline: none;
}

.reports-filter-row select:focus {
  border-color: #2f6b3f;
}

.reports-export-buttons {
  display: flex;
  gap: 14px;
}

.reports-export-buttons button {
  height: 54px;
  padding: 0 24px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(90deg, #7b654c, #8a7357);
  color: #fffdf9;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.reports-export-buttons button:hover {
  background: linear-gradient(90deg, #5f4b35, #735d43);
}

/* Summary Cards */

.reports-summary-grid {
  display: grid;
grid-template-columns: repeat(5, 1fr);  gap: 22px;
  margin-bottom: 34px;
}

.report-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 22px;
  min-height: 130px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.report-summary-card h3 {
  color: #2f241c;
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 700;
}

.report-summary-card p {
  color: #3b2a1d;
  font-size: 38px;
  margin: 0;
  font-weight: 900;
}

.report-icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e5d8c6;
  border: 2px dashed #9b7a58;
  flex-shrink: 0;
}

/* Main Report Grid */

.reports-main-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
}

.weekly-progress-panel h2,
.report-details-panel h2 {
  color: #2f6b3f;
  font-size: 30px;
  margin-bottom: 16px;
  font-weight: 800;
}

/* Trend Chart Placeholder */

.trend-chart-placeholder {
  height: 320px;
  background: #fffdf9;
  border-radius: 18px;
  position: relative;
  padding: 30px;
}

.chart-y-axis {
  position: absolute;
  left: 45px;
  top: 35px;
  width: 4px;
  height: 230px;
  background: #8a7357;
  border-radius: 10px;
}

.chart-x-axis {
  position: absolute;
  left: 45px;
  bottom: 55px;
  width: 430px;
  height: 4px;
  background: #8a7357;
  border-radius: 10px;
}

.chart-line-placeholder {
  position: absolute;
  left: 88px;
  top: 135px;
  width: 330px;
  height: 80px;
  border-top: 5px solid #2f6b3f;
  transform: rotate(-10deg);
  opacity: 0.8;
}

.chart-point {
  position: absolute;
  color: #2f241c;
  font-size: 18px;
  font-weight: 700;
}

.point-1 {
  left: 85px;
  top: 145px;
}

.point-2 {
  left: 190px;
  top: 105px;
}

.point-3 {
  left: 305px;
  top: 90px;
}

.point-4 {
  left: 425px;
  top: 55px;
}

.chart-labels {
  position: absolute;
  left: 70px;
  bottom: 18px;
  display: flex;
  gap: 70px;
  color: #2f241c;
  font-size: 16px;
}

/* Report Details Table */

.report-details-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.report-details-table {
  width: 100%;
  border-collapse: collapse;
}

.report-details-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.report-details-table th {
  color: #2f241c;
  font-size: 16px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.report-details-table td {
  padding: 18px;
  color: #2f241c;
  font-size: 16px;
  border-bottom: 1px solid #eadfce;
}

.report-details-table tbody tr:last-child td {
  border-bottom: none;
}

.reviewed-text {
  color: #2f6b3f !important;
  font-weight: 700;
}

.pending-text {
  color: #8a5a00 !important;
  font-weight: 700;
}

/* Responsive Reports Page */

@media (max-width: 1300px) {
  .reports-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reports-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 950px) {
  .reports-filter-row {
    grid-template-columns: 1fr;
  }

  .reports-export-buttons {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .reports-wrap {
    padding: 24px 18px;
  }

  .reports-summary-grid {
    grid-template-columns: 1fr;
  }

  .report-details-table-card {
    overflow-x: auto;
  }

  .report-details-table {
    min-width: 760px;
  }

  .trend-chart-placeholder {
    overflow-x: auto;
  }
}

.teacher-logout-btn {
  min-width: 86px;
  height: 34px;
  padding: 0 20px;
  border-radius: 18px;
  background: #8a4f14;
  color: #fffdf9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-left: 8px;
  transition: 0.2s ease;
}

.teacher-logout-btn:hover {
  background: #6d3d0f;
}

/* =========================
   CREATE CLASS FORM
========================= */

.create-class-form {
  display: none;
  width: 100%;
  max-width: 520px;
  margin-top: 20px;
  margin-bottom: 26px;
  padding: 22px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.create-class-form.show {
  display: block;
}

.create-class-form h2 {
  font-size: 22px;
  color: #2f6b3f;
  margin-bottom: 18px;
}

.create-class-form label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #2f241c;
  margin-bottom: 8px;
}

.create-class-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  margin-bottom: 16px;
  border: 1px solid #c7b69d;
  border-radius: 12px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 15px;
  outline: none;
}

.create-class-form input:focus {
  border-color: #2f6b3f;
}

.create-class-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.save-class-btn,
.cancel-class-btn {
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.save-class-btn {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
}

.save-class-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.cancel-class-btn {
  background: #d8c9b6;
  color: #3b2a1d;
}

/* =========================
   CLASS PREVIEW DETAILS
========================= */

.class-preview-meta {
  background: #fff7ed;
  border: 1px solid #d6c8b6;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.class-preview-meta p {
  font-size: 17px;
  color: #2f241c;
  margin-bottom: 10px;
}

.class-preview-meta p:last-child {
  margin-bottom: 0;
}

/* =========================
   DELETE CLASS BUTTON
========================= */

.class-delete-btn {
  min-width: 92px;
  height: 42px;
  margin-left: 10px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
  color: #fffdf9;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.class-delete-btn:hover {
  background: linear-gradient(90deg, #743b3b, #8c4c4c);
}

/* =========================
   STUDENT JOIN CLASS
========================= */

.join-class-section {
  max-width: 940px;
  margin: 0 auto 26px;
}

.join-class-card {
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 22px;
  padding: 24px 26px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.join-class-card h2 {
  color: #2f6b3f;
  font-size: 24px;
  margin-bottom: 6px;
  font-weight: 800;
}

.join-class-card p {
  color: #5b4632;
  font-size: 16px;
  line-height: 1.4;
}

.join-class-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.join-class-form input {
  width: 220px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #c7b69d;
  border-radius: 24px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
  outline: none;
}

.join-class-form input:focus {
  border-color: #2f6b3f;
}

.join-class-form button {
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.join-class-form button:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

@media (max-width: 850px) {
  .join-class-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .join-class-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .join-class-form input,
  .join-class-form button {
    width: 100%;
  }
}

/* =========================
   STUDENT ENROLLED CLASS CARD
========================= */

.enrolled-class-card {
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 22px;
  padding: 24px 26px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.enrolled-class-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.enrolled-class-heading h2 {
  color: #2f6b3f;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}

.enrolled-status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 18px;
  background: #d8f3dc;
  color: #1b5e20;
  font-size: 13px;
  font-weight: 700;
}

.enrolled-class-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}

.enrolled-class-details p {
  color: #2f241c;
  font-size: 16px;
  margin: 0;
}

.enrolled-class-details strong {
  color: #3b2a1d;
}

@media (max-width: 760px) {
  .enrolled-class-details {
    grid-template-columns: 1fr;
  }

  .enrolled-class-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   TEACHER STUDENT LIST MANAGEMENT
========================= */

.student-list-item {
  list-style: none;
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.student-list-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.student-list-info strong {
  color: #2f241c;
  font-size: 16px;
}

.student-list-info span {
  color: #6e604e;
  font-size: 14px;
}

.remove-student-btn {
  min-width: 84px;
  height: 36px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
  color: #fffdf9;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.remove-student-btn:hover {
  background: linear-gradient(90deg, #743b3b, #8c4c4c);
}

/* =========================
   EDIT CLASS BUTTON
========================= */

.class-edit-btn {
  min-width: 82px;
  height: 42px;
  margin-left: 10px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: #fffdf9;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.class-edit-btn:hover {
  background: linear-gradient(90deg, #6d543c, #80684e);
}

/* =========================
   TASK BUILDER DATABASE STATES
========================= */

.task-builder-empty-state {
  padding: 22px;
  color: #6e604e;
  font-size: 17px;
  text-align: center;
}

.builder-task-main {
  flex: 1;
}

.task-record-status {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
}

.draft-task-status {
  background: #fff3cd;
  color: #8a5a00;
}

.published-task-status {
  background: #d8f3dc;
  color: #1b5e20;
}

/* =========================
   STUDENT PUBLISHED TASKS
========================= */

.task-empty-placeholder {
  padding: 18px;
  color: #6e604e;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.published-student-task {
  background: #d8f3dc;
  color: #1b5e20;
}

/* =========================
   STUDENT TASK COMPLETION
========================= */

.mark-task-complete-btn {
  margin-top: 12px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mark-task-complete-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

/* =========================
   TEACHER TASK COMPLETION MONITORING
========================= */

.task-monitoring-content {
  padding: 0;
}

.task-monitoring-wrap {
  padding: 34px;
}

.task-monitoring-header {
  margin-bottom: 24px;
}

.task-monitoring-header h1 {
  font-size: 36px;
  color: #2f6b3f;
  margin-bottom: 8px;
  font-weight: 800;
}

.task-monitoring-header p {
  font-size: 18px;
  color: #3b2a1d;
}

.task-monitoring-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.monitoring-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.monitoring-summary-card h3 {
  font-size: 16px;
  color: #2f241c;
  margin-bottom: 10px;
}

.monitoring-summary-card p {
  font-size: 34px;
  font-weight: 800;
  color: #2f6b3f;
  margin: 0;
}

.task-monitoring-filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.task-monitoring-filter-row select {
  min-width: 230px;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #c7b69d;
  border-radius: 14px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
  outline: none;
}

.task-monitoring-filter-row select:focus {
  border-color: #2f6b3f;
}

.task-monitoring-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.task-monitoring-table {
  width: 100%;
  border-collapse: collapse;
}

.task-monitoring-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.task-monitoring-table th {
  color: #2f241c;
  font-size: 16px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.task-monitoring-table td {
  padding: 18px;
  color: #2f241c;
  font-size: 15px;
  border-bottom: 1px solid #eadfce;
  vertical-align: top;
  line-height: 1.4;
}

.task-monitoring-table tbody tr:last-child td {
  border-bottom: none;
}

.completion-phase-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 700;
}

.completion-phase-badge.discover {
  background: #d8f3dc;
  color: #1b5e20;
}

.completion-phase-badge.engage {
  background: #f5e6c8;
  color: #805000;
}

.completion-phase-badge.challenge {
  background: #ead8c5;
  color: #6b3f1d;
}

@media (max-width: 1200px) {
  .task-monitoring-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .task-monitoring-summary-grid {
    grid-template-columns: 1fr;
  }

  .task-monitoring-table-card {
    overflow-x: auto;
  }

  .task-monitoring-table {
    min-width: 900px;
  }

  .task-monitoring-wrap {
    padding: 24px 18px;
  }
}

/* =========================
   FUNCTIONAL REPORTS PAGE
========================= */

.phase-report-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.phase-report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d6c8b6;
  padding: 16px 0;
}

.phase-report-row:first-child {
  padding-top: 0;
}

.phase-report-row:last-of-type {
  border-bottom: none;
}

.phase-report-row span {
  color: #2f241c;
  font-size: 18px;
  font-weight: 700;
}

.phase-report-row strong {
  color: #2f6b3f;
  font-size: 34px;
  font-weight: 900;
}

.phase-report-note {
  margin-top: 18px;
  color: #5b4632;
  font-size: 15px;
  line-height: 1.4;
}

/* =========================
   TEACHER QUIZ BUILDER
========================= */

.quiz-builder-content {
  padding: 0;
}

.quiz-builder-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 24px;
  min-height: calc(100vh - 72px);
  padding: 34px;
}

.quiz-builder-header h1 {
  font-size: 36px;
  color: #2f6b3f;
  margin-bottom: 8px;
  font-weight: 800;
}

.quiz-builder-header p {
  color: #3b2a1d;
  font-size: 18px;
  margin-bottom: 24px;
}

.quiz-creation-card,
.quiz-select-card,
.quiz-question-builder-card,
.quiz-question-list-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  margin-bottom: 22px;
}

.quiz-creation-card h2,
.quiz-question-builder-card h2,
.quiz-question-list-card h2 {
  color: #2f241c;
  font-size: 24px;
  margin-bottom: 18px;
  font-weight: 800;
}

.quiz-create-grid,
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.quiz-creation-card label,
.quiz-select-card label,
.quiz-question-builder-card label {
  display: block;
  color: #2f241c;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-creation-card input,
.quiz-select-card select,
.quiz-question-builder-card input,
.quiz-question-builder-card select,
.quiz-question-builder-card textarea {
  width: 100%;
  border: 1px solid #c7b69d;
  border-radius: 12px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 15px;
  outline: none;
}

.quiz-creation-card input,
.quiz-select-card select,
.quiz-question-builder-card input,
.quiz-question-builder-card select {
  height: 48px;
  padding: 0 14px;
}

.quiz-question-builder-card textarea {
  min-height: 110px;
  padding: 14px;
  resize: vertical;
  margin-bottom: 18px;
}

.quiz-creation-card input:focus,
.quiz-select-card select:focus,
.quiz-question-builder-card input:focus,
.quiz-question-builder-card select:focus,
.quiz-question-builder-card textarea:focus {
  border-color: #2f6b3f;
}

.create-quiz-btn,
.add-question-btn {
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.create-quiz-btn:hover,
.add-question-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.quiz-select-card select {
  margin-bottom: 16px;
}

.selected-quiz-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.selected-quiz-meta p {
  color: #2f241c;
  font-size: 16px;
  margin: 0;
}

.quiz-empty-state {
  padding: 18px;
  text-align: center;
  color: #6e604e;
}

.quiz-question-item {
  border: 1px solid #d6c8b6;
  border-radius: 14px;
  background: #fbf7ef;
  padding: 18px;
  margin-bottom: 16px;
}

.quiz-question-item-main h3 {
  color: #2f6b3f;
  font-size: 18px;
  margin-bottom: 8px;
}

.quiz-question-item-main p {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 12px;
}

.quiz-question-item-main ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.quiz-question-item-main li {
  color: #2f241c;
  font-size: 15px;
  margin-bottom: 6px;
}

.quiz-correct-answer-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #d8f3dc;
  color: #1b5e20;
  font-size: 13px;
  font-weight: 700;
}

.quiz-question-item-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.quiz-question-item-actions button {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.quiz-question-item-actions .delete-question-btn {
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
}

.quiz-builder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.quiz-draft-btn,
.quiz-publish-btn {
  height: 64px;
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.quiz-draft-btn {
  background: linear-gradient(90deg, #7b654c, #8a7357);
}

.quiz-publish-btn {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.quiz-preview-panel {
  background: linear-gradient(135deg, #f1ddc3, #e7cda9);
  border-radius: 20px;
  padding: 24px;
}

.quiz-preview-panel h2 {
  color: #2f241c;
  font-size: 28px;
  margin-bottom: 18px;
  font-weight: 800;
}

.quiz-preview-card {
  background: #fffdf9;
  border: 1px solid #d6c8b6;
  border-radius: 16px;
  padding: 20px;
}

.quiz-preview-card h3 {
  color: #2f6b3f;
  font-size: 24px;
  margin-bottom: 8px;
}

.quiz-preview-card > p {
  color: #2f241c;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.preview-quiz-status {
  margin-bottom: 18px;
  color: #2f241c;
  font-size: 15px;
}

.preview-question-list > div {
  border-top: 1px solid #eadfce;
  padding: 14px 0;
}

.quiz-preview-question-item h4 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.quiz-preview-question-item p {
  color: #5b4632;
  font-size: 14px;
  margin-bottom: 5px;
}

@media (max-width: 1200px) {
  .quiz-builder-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .quiz-builder-layout {
    padding: 24px 18px;
  }

  .quiz-create-grid,
  .choice-grid,
  .quiz-builder-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================
   STUDENT QUIZ LIST
========================= */

.student-quizzes-content {
  padding: 0;
}

.student-quizzes-wrap {
  padding: 34px;
}

.student-quizzes-header {
  margin-bottom: 24px;
}

.student-quizzes-header h1 {
  color: #2f6b3f;
  font-size: 36px;
  margin-bottom: 8px;
  font-weight: 800;
}

.student-quizzes-header p {
  color: #3b2a1d;
  font-size: 18px;
}

.student-quiz-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.student-quiz-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-quiz-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.student-quiz-summary-card p {
  color: #2f6b3f;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}

.student-quiz-list {
  display: grid;
  gap: 20px;
}

.student-quiz-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-quiz-card-main h2 {
  color: #2f6b3f;
  font-size: 24px;
  margin-bottom: 8px;
}

.student-quiz-card-main p {
  color: #2f241c;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.student-quiz-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: #2f241c;
  font-size: 15px;
}

.quiz-available-pill,
.quiz-completed-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 700;
}

.quiz-available-pill {
  background: #f5e6c8;
  color: #805000;
}

.quiz-completed-pill {
  background: #d8f3dc;
  color: #1b5e20;
}

.take-quiz-btn,
.return-to-quiz-list-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 140px;
  height: 48px;
  padding: 0 22px;
  border-radius: 24px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.take-quiz-btn:hover,
.return-to-quiz-list-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.submitted-quiz-score {
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #d8f3dc;
  color: #1b5e20;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

/* =========================
   TAKE QUIZ PAGE
========================= */

.take-quiz-content {
  padding: 0;
}

.take-quiz-wrap {
  padding: 34px;
  max-width: 1100px;
}

.take-quiz-header {
  margin-bottom: 24px;
}

.back-to-quizzes-link {
  display: inline-block;
  color: #6d543c;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 14px;
}

.take-quiz-header h1 {
  color: #2f6b3f;
  font-size: 36px;
  margin-bottom: 8px;
  font-weight: 800;
}

.take-quiz-header p {
  color: #3b2a1d;
  font-size: 18px;
}

.quiz-taking-info-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: #2f241c;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-quiz-question-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-quiz-question-card h2 {
  color: #2f6b3f;
  font-size: 20px;
  margin-bottom: 10px;
}

.student-quiz-question-card > p {
  color: #2f241c;
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.student-quiz-choices {
  display: grid;
  gap: 12px;
}

.student-quiz-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fbf7ef;
  border: 1px solid #eadfce;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: #2f241c;
}

.student-quiz-choice input {
  margin-top: 3px;
}

.submit-student-quiz-btn {
  width: 100%;
  height: 64px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
}

.submit-student-quiz-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.quiz-result-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.quiz-result-card h2 {
  color: #2f6b3f;
  font-size: 32px;
  margin-bottom: 10px;
}

.quiz-result-card p {
  color: #2f241c;
  font-size: 18px;
  margin-bottom: 22px;
}

.quiz-result-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.quiz-result-score span {
  color: #2f6b3f;
  font-size: 42px;
  font-weight: 900;
}

.quiz-result-score strong {
  color: #805000;
  font-size: 30px;
}

@media (max-width: 1000px) {
  .student-quiz-summary-grid {
    grid-template-columns: 1fr;
  }

  .student-quiz-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .student-quizzes-wrap,
  .take-quiz-wrap {
    padding: 24px 18px;
  }
}

/* =========================
   SUBMISSIONS TABS
========================= */

.submissions-page-content {
  padding: 0;
}

.submissions-wrap {
  padding: 34px;
}

.submissions-main-header {
  margin-bottom: 24px;
}

.submissions-main-header h1 {
  color: #2f6b3f;
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 8px;
}

.submissions-main-header p {
  color: #3b2a1d;
  font-size: 18px;
}

.submission-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.submission-tab {
  min-width: 210px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid #c7b69d;
  background: #fffdf9;
  color: #3b2a1d;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.submission-tab.active {
  color: #2f6b3f;
  border-bottom: 5px solid #2f6b3f;
  background: #f8f1e6;
}

/* =========================
   QUIZ SUBMISSIONS TAB
========================= */

.quiz-submission-header {
  margin-bottom: 24px;
}

.quiz-submission-header h2 {
  color: #2f6b3f;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quiz-submission-header p {
  color: #3b2a1d;
  font-size: 18px;
}

.quiz-submission-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.quiz-submission-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.quiz-submission-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.quiz-submission-summary-card p {
  color: #2f6b3f;
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

.quiz-submission-filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.quiz-submission-filter-row select {
  min-width: 260px;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #c7b69d;
  border-radius: 14px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
  outline: none;
}

.quiz-submission-filter-row select:focus {
  border-color: #2f6b3f;
}

.quiz-submission-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.quiz-submission-table {
  width: 100%;
  border-collapse: collapse;
}

.quiz-submission-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.quiz-submission-table th {
  color: #2f241c;
  font-size: 16px;
  text-align: left;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.quiz-submission-table td {
  padding: 18px;
  color: #2f241c;
  font-size: 15px;
  border-bottom: 1px solid #eadfce;
  vertical-align: top;
  line-height: 1.4;
}

.quiz-submission-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 1200px) {
  .quiz-submission-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .quiz-submission-summary-grid {
    grid-template-columns: 1fr;
  }

  .quiz-submission-table-card {
    overflow-x: auto;
  }

  .quiz-submission-table {
    min-width: 900px;
  }

  .submissions-wrap {
    padding: 24px 18px;
  }
}

/* =========================
   QUIZ PERFORMANCE REPORT
========================= */

.quiz-report-summary-section {
  margin-bottom: 34px;
}

.quiz-report-summary-section h2 {
  color: #2f6b3f;
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 18px;
}

.quiz-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.quiz-report-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.quiz-report-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.quiz-report-summary-card p {
  color: #2f6b3f;
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 1200px) {
  .quiz-report-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .quiz-report-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   STUDENT SUBMISSIONS DATA
========================= */

.submissions-page-header p {
  color: #3b2a1d;
  font-size: 17px;
  margin-top: 8px;
}

.student-submission-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.student-submission-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-submission-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.student-submission-summary-card p {
  color: #2f6b3f;
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 1000px) {
  .student-submission-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   STUDENT HOME REAL DATA
========================= */

.activity-empty-state {
  padding: 18px 8px;
  color: #6e604e;
  font-size: 16px;
  line-height: 1.4;
}

/* =========================
   TEACHER DASHBOARD REAL DATA
========================= */

.teacher-dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 34px;
}

.teacher-dashboard-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.teacher-dashboard-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 12px;
}

.teacher-dashboard-summary-card p {
  color: #2f6b3f;
  font-size: 38px;
  font-weight: 900;
  margin: 0;
}

.dynamic-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.dashboard-empty-state {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 22px;
  color: #6e604e;
  font-size: 17px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

@media (max-width: 1200px) {
  .teacher-dashboard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .teacher-dashboard-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   LEADERBOARD
========================= */

.leaderboard-page-content {
  padding: 0;
}

.leaderboard-wrap {
  padding: 34px;
}

.leaderboard-header {
  margin-bottom: 24px;
}

.leaderboard-header h1 {
  color: #2f6b3f;
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 8px;
}

.leaderboard-header p {
  color: #3b2a1d;
  font-size: 18px;
}

.leaderboard-filter-row {
  margin-bottom: 24px;
}

.leaderboard-filter-row select {
  min-width: 320px;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #c7b69d;
  border-radius: 14px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 16px;
}

.leaderboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.leaderboard-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.leaderboard-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.leaderboard-summary-card p {
  color: #2f6b3f;
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}

.leaderboard-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 18px;
  font-size: 15px;
  color: #2f241c;
  text-align: left;
  border-bottom: 1px solid #eadfce;
}

.leaderboard-table th {
  font-weight: 800;
}

.leaderboard-rank-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 800;
}

.rank-1 {
  background: #f3d37a;
  color: #6b4b00;
}

.rank-2 {
  background: #d8d8d8;
  color: #555;
}

.rank-3 {
  background: #d8ad78;
  color: #6b3f1d;
}

.rank-other {
  background: #e8dcc9;
  color: #3b2a1d;
}

.current-student-row {
  background: #eef7ed;
}

.student-rank-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.student-rank-card > div {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.student-rank-card h2 {
  color: #2f241c;
  font-size: 18px;
  margin-bottom: 10px;
}

.student-rank-card p {
  color: #2f6b3f;
  font-size: 42px;
  font-weight: 900;
  margin: 0;
}

.leaderboard-note {
  margin-top: 18px;
  color: #5b4632;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 1200px) {
  .leaderboard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .leaderboard-summary-grid,
  .student-rank-card {
    grid-template-columns: 1fr;
  }

  .leaderboard-table-card {
    overflow-x: auto;
  }

  .leaderboard-table {
    min-width: 900px;
  }

  .leaderboard-wrap {
    padding: 24px 18px;
  }
}

/* =========================
   EMPTY / READY TERM CARDS PAGE
========================= */

.term-library-ready-wrap {
  padding: 34px;
}

.term-ready-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.term-ready-header h1 {
  color: #2f6b3f;
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 8px;
}

.term-ready-header p {
  color: #3b2a1d;
  font-size: 18px;
  line-height: 1.4;
}

.term-card-count-box {
  min-width: 190px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.term-card-count-box span {
  display: block;
  color: #2f241c;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.term-card-count-box strong {
  color: #2f6b3f;
  font-size: 42px;
  font-weight: 900;
}

.term-ready-search-row {
  margin-bottom: 26px;
}

.term-ready-search-row .term-search-box {
  max-width: 520px;
}

.term-ready-search-row input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.term-empty-state-card {
  grid-column: 1 / -1;
  min-height: 320px;
  background: #fffdf9;
  border: 1px dashed #cdbda8;
  border-radius: 22px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #3b2a1d;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.term-empty-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px dashed #b89c78;
  margin-bottom: 18px;
}

.term-empty-state-card h2 {
  color: #2f6b3f;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
}

.term-empty-state-card p {
  max-width: 560px;
  color: #5b4632;
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 900px) {
  .term-ready-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .term-card-count-box {
    width: 100%;
  }

  .term-library-ready-wrap {
    padding: 24px 18px;
  }
}

@media (max-width: 1300px) {
  .reports-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .reports-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   FINAL FIX: REPORTS TIME-ON-TASK SUMMARY GRID
   Paste-safe override for the 5 report cards.
========================= */

.reports-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

@media (max-width: 1300px) {
  .reports-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 800px) {
  .reports-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================
   FINAL FIX: REPORTS TABLE WITH 7 COLUMNS
========================= */

.report-details-table-card {
  overflow-x: auto;
}

.report-details-table {
  min-width: 1000px;
}

/* =========================
   FUNCTIONAL ACHIEVEMENTS / BADGES
========================= */

.achievement-item {
  position: relative;
  transition: 0.25s ease;
}

.achievement-status-label {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
}

.locked-achievement {
  opacity: 0.55;
  filter: grayscale(0.65);
}

.locked-achievement .achievement-status-label {
  background: #e0e0e0;
  color: #666;
}

.unlocked-achievement {
  opacity: 1;
  border: 1px solid #b8d8b7;
  background: #fbfff9;
  box-shadow: 0 8px 18px rgba(47, 107, 63, 0.12);
}

.unlocked-achievement .achievement-status-label {
  background: #d8f3dc;
  color: #1b5e20;
}

/* =========================
   STUDENT PROFILE SETTINGS MODALS
========================= */

.disabled-setting-btn {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(90deg, #9c958b, #b1aaa0);
}

.disabled-setting-btn:hover {
  background: linear-gradient(90deg, #9c958b, #b1aaa0);
}

.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 12, 0.52);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 9999;
}

.profile-modal-overlay.show {
  display: flex;
}

.profile-modal-card {
  width: min(520px, 100%);
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}

.profile-modal-header {
  min-height: 72px;
  padding: 18px 22px;
  background: linear-gradient(to right, #efe4d3, #e8dcc9);
  border-bottom: 1px solid #cab89e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-modal-header h2 {
  margin: 0;
  color: #2f241c;
  font-size: 26px;
  font-weight: 800;
}

.profile-modal-close {
  border: none;
  background: transparent;
  color: #6a4223;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.profile-modal-body {
  padding: 24px 22px 10px;
}

.profile-modal-body label {
  display: block;
  color: #2f241c;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-modal-body input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  margin-bottom: 18px;
  border: 1px solid #c7b69d;
  border-radius: 12px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 15px;
  outline: none;
}

.profile-modal-body input:focus {
  border-color: #2f6b3f;
}

.profile-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 22px 22px;
}

.modal-primary-btn,
.modal-secondary-btn {
  min-width: 132px;
  height: 46px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.modal-primary-btn {
  color: #fffdf9;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.modal-primary-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.modal-secondary-btn {
  color: #3b2a1d;
  background: #eee2d1;
}

.modal-secondary-btn:hover {
  background: #e4d5bf;
}

@media (max-width: 600px) {
  .profile-modal-actions {
    flex-direction: column-reverse;
  }

  .modal-primary-btn,
  .modal-secondary-btn {
    width: 100%;
  }
}

/* =========================
   FIREBASE WEEKLY RELEASE + MY TRAILS
========================= */

.weekly-release-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.weekly-release-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.weekly-release-summary-card h3 {
  color: #2f241c;
  font-size: 16px;
  margin-bottom: 10px;
}

.weekly-release-summary-card p {
  color: #2f6b3f;
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

.portal-loading-card {
  grid-column: 1 / -1;
  min-height: 180px;
  background: #fffdf9;
  border: 1px dashed #cdbda8;
  border-radius: 20px;
  color: #6e604e;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
  font-size: 18px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

@media (max-width: 900px) {
  .weekly-release-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   WEEKLY PORTAL LINKING FOR TASKS & QUIZZES
========================= */

.builder-portal-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.builder-portal-card label,
.quiz-creation-card select,
.quiz-module-update-row select {
  font-size: 15px;
}

.builder-portal-card label {
  display: block;
  color: #2f241c;
  font-weight: 800;
  margin-bottom: 10px;
}

.builder-portal-card select,
.quiz-creation-card select,
.quiz-module-update-row select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #c7b69d;
  border-radius: 12px;
  background: #fffdf9;
  color: #2f241c;
  outline: none;
}

.builder-portal-card select:focus,
.quiz-creation-card select:focus,
.quiz-module-update-row select:focus {
  border-color: #2f6b3f;
}

.builder-portal-card p {
  margin-top: 10px;
  color: #6e604e;
  font-size: 14px;
  line-height: 1.45;
}

.preview-module-label {
  margin-top: 8px;
  margin-bottom: 14px;
  color: #5b4632;
  font-size: 14px;
}

.task-builder-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #eadfce;
}

.task-builder-item:last-child {
  border-bottom: none;
}

.task-builder-item-main {
  flex: 1;
}

.task-builder-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.task-builder-item-header h3 {
  margin: 0;
  color: #2f241c;
  font-size: 18px;
}

.task-builder-item-main p {
  color: #3b2a1d;
  line-height: 1.45;
  margin-bottom: 10px;
}

.task-builder-status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 800;
}

.task-builder-status.draft {
  background: #e0e0e0;
  color: #555;
}

.task-builder-status.published {
  background: #d8f3dc;
  color: #1b5e20;
}

.task-builder-module-badge,
.student-linked-module-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.task-builder-item-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.task-builder-item-actions button {
  min-width: 86px;
  height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: #fffdf9;
  font-weight: 700;
  cursor: pointer;
}

.task-builder-item-actions .delete-task-btn {
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
}

.preview-task-item {
  padding: 12px 0;
  border-bottom: 1px solid #eadfce;
}

.preview-task-item:last-child {
  border-bottom: none;
}

.preview-task-item strong {
  display: block;
  color: #2f6b3f;
  margin-bottom: 6px;
}

.preview-task-item p {
  margin-bottom: 6px;
  line-height: 1.4;
}

.preview-task-item span {
  color: #6e604e;
  font-size: 13px;
  font-weight: 700;
}

.quiz-create-grid {
  align-items: end;
}

.quiz-module-update-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 12px;
}

.quiz-module-update-row > button {
  min-width: 150px;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.quiz-module-update-row > button:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

@media (max-width: 900px) {
  .task-builder-item {
    flex-direction: column;
  }

  .quiz-module-update-row {
    grid-template-columns: 1fr;
  }

  .quiz-module-update-row > button {
    width: 100%;
  }
}

/* =========================
   TEACHER PORTAL FILTERS: SUBMISSIONS + REPORTS
========================= */

.teacher-portal-table-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.teacher-portal-table-badge.muted {
  background: #e7e1d8;
  color: #756654;
}

@media (max-width: 1200px) {
  .reports-filter-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .reports-export-buttons {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .reports-filter-row {
    grid-template-columns: 1fr;
  }

  .reports-export-buttons {
    grid-column: auto;
    flex-direction: column;
  }
}

/* =========================
   PORTAL-SPECIFIC TIME TRACKING ON STUDENT TASKS
========================= */

.student-task-portal-filter-card {
  max-width: 980px;
  margin: 0 auto 24px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 20px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

.student-task-portal-filter-card h2 {
  color: #2f6b3f;
  font-size: 20px;
  margin-bottom: 7px;
}

.student-task-portal-filter-card p {
  color: #5b4632;
  font-size: 15px;
  line-height: 1.45;
}

.student-task-portal-filter-card select {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #c7b69d;
  border-radius: 28px;
  background: #fffdf9;
  color: #3b2a1d;
  font-size: 16px;
  outline: none;
}

.student-task-portal-filter-card select:focus {
  border-color: #2f6b3f;
}

.student-task-portal-filter-card select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .student-task-portal-filter-card {
    grid-template-columns: 1fr;
  }
}

/* =========================
   REAL-TIME STUDENT HOME + TEACHER DASHBOARD
========================= */

.student-home-live-summary {
  max-width: 940px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.student-home-live-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.07);
  min-height: 122px;
}

.student-home-live-card h3 {
  color: #2f6b3f;
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 800;
}

.student-home-live-card p {
  color: #2f241c;
  font-size: 31px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0;
}

.student-home-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.student-home-stat-card h3 {
  margin-bottom: 8px;
}

.student-home-stat-caption {
  display: block;
  margin-top: 8px;
  color: #827362;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

/* Learner dashboard: a single compact portal card combines count + open portal names. */
.student-home-open-portals-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.home-open-portals-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.home-open-portals-heading h3 {
  margin-bottom: 3px;
}

.home-open-portals-subtitle {
  color: #827362;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.home-open-portals-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 12px;
  background: #eef6ee;
  color: #2f6b3f;
  line-height: 1;
  white-space: nowrap;
}

.home-open-portals-count #homeUnlockedPortals {
  font-size: 22px;
  font-weight: 900;
}

.home-open-portals-count span:last-child {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.home-open-portal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.home-open-portal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #bfd7c2;
  border-radius: 999px;
  background: #edf6ee;
  color: #245632;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 800;
  white-space: nowrap;
}

.home-open-portals-empty {
  color: #756858;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}

.live-home-activity {
  padding-bottom: 14px;
  border-bottom: 1px solid #eadfce;
}

.live-home-activity:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-empty-state,
.dashboard-empty-state {
  background: #f7f1e7;
  border: 1px dashed #cdbda8;
  border-radius: 16px;
  color: #6e604e;
  padding: 20px;
  line-height: 1.45;
  text-align: center;
}

.teacher-dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.teacher-dashboard-summary-card {
  min-height: 128px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.teacher-dashboard-summary-card h3 {
  color: #2f241c;
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 12px;
  font-weight: 800;
}

.teacher-dashboard-summary-card p {
  color: #2f6b3f;
  font-size: 40px;
  font-weight: 800;
  margin: 0;
}

.class-overview-extra {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #6e604e;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-portal-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.dashboard-portal-overview-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.portal-overview-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.portal-overview-heading strong {
  color: #2f6b3f;
  font-size: 15px;
}

.portal-overview-heading span {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 18px;
  background: #d8f3dc;
  color: #1b5e20;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-portal-overview-card h3 {
  color: #2f241c;
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.portal-overview-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-overview-meta span {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 18px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-activity-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 13px;
  font-weight: 800;
}

.live-progress-fill {
  min-width: 0;
}

@media (max-width: 1250px) {
  .student-home-live-summary,
  .teacher-dashboard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-portal-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .student-home-live-summary,
  .teacher-dashboard-summary-grid,
  .dashboard-portal-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1250px) {
  .student-home-live-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-home-open-portals-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .student-home-live-summary {
    grid-template-columns: 1fr;
  }

  .student-home-open-portals-card {
    grid-column: auto;
  }

  .home-open-portals-heading {
    gap: 12px;
  }
}

/* =========================
   STUDENT SUBMISSIONS: WEEKLY PORTAL RECORDS
========================= */

.student-submission-filter-row {
  grid-template-columns: 1fr 1.25fr 150px;
}

.student-submission-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.student-submission-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

.student-submission-summary-card h3 {
  color: #2f6b3f;
  margin-bottom: 10px;
  font-size: 17px;
}

.student-submission-summary-card p {
  color: #2f241c;
  font-size: 34px;
  font-weight: 800;
  margin: 0;
}

.submissions-page-header p {
  color: #5b4632;
  font-size: 16px;
  line-height: 1.45;
  margin-top: -16px;
  margin-bottom: 28px;
}

.student-submission-portal-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 18px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.student-submission-portal-badge.muted {
  background: #e7e1d8;
  color: #756654;
}

@media (max-width: 1200px) {
  .student-submission-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .student-submission-filter-row {
    grid-template-columns: 1fr;
  }

  .submission-table {
    min-width: 1040px;
  }
}

/* =========================
   TEACHER CLASSES: PER-STUDENT PROGRESS OVERVIEW
========================= */

.class-progress-overview-section {
  margin-top: 28px;
}

.class-progress-overview-header {
  margin-bottom: 18px;
}

.class-progress-overview-header h2 {
  font-size: 27px;
  color: #2f241c;
  margin-bottom: 7px;
  font-weight: 800;
}

.class-progress-overview-header p {
  color: #5b4632;
  font-size: 15px;
  line-height: 1.45;
}

.class-progress-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.class-progress-summary-card {
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

.class-progress-summary-card h3 {
  color: #2f6b3f;
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 800;
}

.class-progress-summary-card p {
  color: #2f241c;
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}

.class-student-progress-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.class-student-progress-table {
  width: 100%;
  border-collapse: collapse;
}

.class-student-progress-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.class-student-progress-table th {
  color: #3d2a1d;
  font-size: 15px;
  text-align: left;
  padding: 16px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.class-student-progress-table td {
  padding: 16px;
  color: #2f241c;
  font-size: 15px;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

.class-student-progress-table tbody tr:last-child td {
  border-bottom: none;
}

.class-progress-student-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.class-progress-student-cell strong {
  color: #2f241c;
  font-size: 15px;
}

.class-progress-student-cell span {
  color: #6e604e;
  font-size: 13px;
}

.class-progress-status {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.class-progress-status.no-activity {
  background: #e7e1d8;
  color: #756654;
}

.class-progress-status.viewed-progress {
  background: #fff3cd;
  color: #8a5a00;
}

.class-progress-status.active-progress {
  background: #d8f3dc;
  color: #1b5e20;
}

.class-progress-status.needs-follow-up {
  background: #f7d9d9;
  color: #8a3535;
}

@media (max-width: 1200px) {
  .class-progress-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .class-student-progress-table-card {
    overflow-x: auto;
  }

  .class-student-progress-table {
    min-width: 920px;
  }
}

@media (max-width: 760px) {
  .class-progress-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   QUIZ REATTEMPT REQUESTS
========================= */

.student-quiz-reattempt-actions {
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.request-reattempt-btn,
.reattempt-take-btn {
  min-width: 180px;
}

.request-reattempt-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: none;
  border-radius: 24px;
  padding: 0 18px;
  background: linear-gradient(90deg, #8a7357, #9b8466);
  color: #fffdf9;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.request-reattempt-btn:hover {
  background: linear-gradient(90deg, #6d543c, #80684e);
}

.quiz-reattempt-approved-pill,
.quiz-request-status-pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.quiz-reattempt-approved-pill {
  background: #d8f3dc;
  color: #1b5e20;
}

.quiz-request-status-pill.pending-status {
  background: #fff3cd;
  color: #8a5a00;
}

.quiz-request-status-pill.declined-status {
  background: #f7d9d9;
  color: #8a3535;
}

.quiz-request-status-pill.used-status {
  background: #e7e1d8;
  color: #756654;
}

.reattempt-request-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.reattempt-request-filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.reattempt-request-filter-row select {
  min-height: 52px;
  border-radius: 28px;
  border: 1px solid #c7b69d;
  background: #fffdf9;
  color: #3b2a1d;
  padding: 0 18px;
  font-size: 15px;
  outline: none;
}

.reattempt-request-table-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.reattempt-request-table {
  width: 100%;
  border-collapse: collapse;
}

.reattempt-request-table thead {
  background: linear-gradient(90deg, #eee2d1, #e8dcc9);
}

.reattempt-request-table th {
  color: #3d2a1d;
  font-size: 15px;
  text-align: left;
  padding: 17px;
  font-weight: 800;
  border-bottom: 1px solid #cab89e;
}

.reattempt-request-table td {
  padding: 17px;
  color: #2f241c;
  font-size: 15px;
  border-bottom: 1px solid #eadfce;
  vertical-align: middle;
}

.reattempt-request-table tbody tr:last-child td {
  border-bottom: none;
}

.reattempt-status-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.reattempt-status-badge.pending {
  background: #fff3cd;
  color: #8a5a00;
}

.reattempt-status-badge.approved {
  background: #d8f3dc;
  color: #1b5e20;
}

.reattempt-status-badge.declined {
  background: #f7d9d9;
  color: #8a3535;
}

.reattempt-status-badge.used {
  background: #e7e1d8;
  color: #756654;
}

.reattempt-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.approve-reattempt-btn,
.decline-reattempt-btn {
  min-height: 38px;
  border: none;
  border-radius: 20px;
  padding: 0 14px;
  color: #fffdf9;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.approve-reattempt-btn {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.approve-reattempt-btn:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.decline-reattempt-btn {
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
}

.decline-reattempt-btn:hover {
  background: linear-gradient(90deg, #743b3b, #8c4c4c);
}

.reattempt-action-muted {
  color: #756654;
  font-size: 14px;
  font-weight: 700;
}

.quiz-attempt-label {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 14px;
  background: #efe4d3;
  color: #5b4632;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .reattempt-request-summary-grid,
  .reattempt-request-filter-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .reattempt-request-table-card {
    overflow-x: auto;
  }

  .reattempt-request-table {
    min-width: 1080px;
  }
}

@media (max-width: 760px) {
  .reattempt-request-summary-grid,
  .reattempt-request-filter-row {
    grid-template-columns: 1fr;
  }
}

/* =========================
   FORGOT PASSWORD PAGE
========================= */

.forgot-password-wrapper {
  min-height: 580px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 20px 40px;
}

.forgot-password-card {
  width: 100%;
  max-width: 540px;
  background: #fffdf9;
  border: 1px solid #e2d7c7;
  border-radius: 24px;
  padding: 38px 42px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.16);
}

.forgot-password-header h2 {
  font-size: 31px;
  color: #2f6b3f;
  margin-bottom: 12px;
  font-weight: 800;
}

.forgot-password-header p {
  color: #5b4632;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 26px;
}

.forgot-password-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #2c2c2c;
  font-weight: 700;
}

.forgot-password-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #8a6a4a;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 15px;
  outline: none;
  background: #fffdf9;
  color: #3d2a1d;
}

.forgot-password-form input:focus {
  border-color: #2f6b3f;
}

.forgot-password-form .login-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.password-reset-message {
  min-height: 24px;
  margin-top: 18px;
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.password-reset-message.success {
  color: #1b5e20;
}

.password-reset-message.error {
  color: #8a3535;
}

.back-to-login-link {
  display: inline-block;
  color: #5b3a1e;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
}

.back-to-login-link:hover {
  color: #2f6b3f;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .forgot-password-card {
    padding: 30px 22px;
  }

  .forgot-password-header h2 {
    font-size: 27px;
  }
}

/* =========================
   LOGO + SIDEBAR ICON ASSET POLISH
   Added after replacing placeholder divs/spans with image assets
========================= */

/* Main brand logos */
.logo-placeholder,
.student-logo-placeholder,
.teacher-logo-placeholder {
  background: transparent;
  border: none;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.logo-placeholder img,
.student-logo-placeholder img,
.teacher-logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

/* Sidebar navigation icons */
.menu-icon-placeholder,
.teacher-menu-icon-placeholder {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.menu-icon-placeholder img,
.teacher-menu-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Slight visual emphasis for active menu item icons */
.student-sidebar-nav a.active .menu-icon-placeholder img,
.teacher-sidebar-nav a.active .teacher-menu-icon-placeholder img {
  transform: scale(1.06);
}

/* Keeps brand logo crisp and properly aligned */
.student-sidebar-brand .student-logo-placeholder,
.teacher-sidebar-brand .teacher-logo-placeholder {
  width: 48px;
  height: 48px;
}

/* Login/register/forgot password header logo stays more visible */
.login-header .logo-placeholder {
  width: 78px;
  height: 78px;
}

/* =========================
   WEEKLY RELEASE LOCK / UNLOCK ICON ASSETS
========================= */

.release-lock-placeholder {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  background: transparent;
  vertical-align: middle;
  overflow: hidden;
}

.release-lock-placeholder.unlocked-lock,
.release-lock-placeholder.locked-lock {
  border: none;
  background: transparent;
}

.release-lock-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   TEACHER TASK BUILDER ACTION ICON ASSETS
========================= */

.add-task-icon-placeholder {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.add-task-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.task-builder-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
}

.task-builder-action-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.task-builder-action-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.edit-task-action-btn {
  background: linear-gradient(90deg, #8a7357, #9b8466);
}

.edit-task-action-btn:hover {
  background: linear-gradient(90deg, #6d543c, #80684e);
}

/* =========================
   TEACHER REPORT SUMMARY ICON ASSETS
========================= */

.report-icon-placeholder {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.report-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Keeps the blank Active Students icon slot visually consistent for now */
.report-summary-card .report-icon-placeholder:empty {
  border: 1px dashed #a98b67;
  border-radius: 12px;
  background: #efe5d5;
}

/* =========================
   UI CLEANUP: PLACEHOLDER ELEMENT REMOVAL
========================= */

.login-footer.clean-login-footer {
  justify-content: center;
  text-align: center;
}

.student-sidebar,
.teacher-sidebar {
  justify-content: flex-start;
}

.student-sidebar > div:first-child,
.teacher-sidebar > div:first-child {
  min-height: 100%;
}

.student-topbar-right {
  gap: 12px;
}

/* =========================
   TEACHER HELP & SUPPORT ICON RESTORE
========================= */

/* Teacher sidebar should keep the Help & Support footer at the bottom. */
.teacher-sidebar {
  justify-content: space-between;
}

.teacher-sidebar > div:first-child {
  min-height: auto;
}

/* Clean fit for the Help & Support icon in the sidebar footer. */
.teacher-sidebar-footer .teacher-menu-icon-placeholder {
  background: transparent;
  border: none;
  border-radius: 0;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.teacher-sidebar-footer .teacher-menu-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   MY TRAILS PORTAL THUMBNAIL IMAGES
   Images are mapped in the exact order provided by the user.
========================= */

.portal-grid .portal-module-card .portal-thumb-placeholder {
  background-color: #e9dfcf;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border: none;
  overflow: hidden;
}

/* Portal image sequence */
.portal-grid .portal-module-card:nth-child(1) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-1.png");
}

.portal-grid .portal-module-card:nth-child(2) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-2.png");
}

.portal-grid .portal-module-card:nth-child(3) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-3.png");
}

.portal-grid .portal-module-card:nth-child(4) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-4.png");
}

.portal-grid .portal-module-card:nth-child(5) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-5.png");
}

.portal-grid .portal-module-card:nth-child(6) .portal-thumb-placeholder {
  background-image: url("../assets/images/my-trails/trail-6.png");
}

/* =========================
   MY TRAILS LOCKED / UNLOCKED STATUS ICONS
   Applies the provided lock icons to student My Trails portal cards.
========================= */

.portal-status .portal-status-icon-placeholder {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.portal-status.unlocked-status .portal-status-icon-placeholder {
  background-image: url("../assets/icons/unlocked.png");
}

.portal-status.locked-status .portal-status-icon-placeholder {
  background-image: url("../assets/icons/locked.png");
}

/* =========================
   LOGIN AUTH LOADING TRANSITION
========================= */

.login-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(35, 24, 15, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.login-loading-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.login-loading-card {
  width: min(420px, 100%);
  padding: 34px 32px 30px;
  border-radius: 26px;
  border: 1px solid rgba(203, 187, 164, 0.92);
  background: rgba(255, 253, 249, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s ease;
}

.login-loading-overlay.active .login-loading-card {
  transform: translateY(0) scale(1);
}

.login-loading-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4eadb;
  box-shadow: 0 10px 24px rgba(47, 107, 63, 0.16);
}

.login-loading-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.login-loading-card h2 {
  margin: 0 0 10px;
  color: #2f6b3f;
  font-size: 28px;
  font-weight: 800;
}

.login-loading-card p {
  margin: 0 auto 22px;
  max-width: 330px;
  color: #5b4632;
  font-size: 15px;
  line-height: 1.55;
}

.login-loading-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 18px;
}

.login-loading-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2f6b3f;
  animation: indigiLoginDotPulse 1.05s infinite ease-in-out;
}

.login-loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.login-loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes indigiLoginDotPulse {
  0%, 80%, 100% {
    transform: translateY(0) scale(0.88);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
}

.login-btn.is-loading {
  cursor: wait;
  opacity: 0.92;
}

.login-btn:disabled {
  cursor: wait;
}

@media (max-width: 560px) {
  .login-loading-card {
    padding: 30px 22px 28px;
  }

  .login-loading-card h2 {
    font-size: 24px;
  }
}

/* =========================
   LOGIN LOADING OVERLAY ERROR STATE
========================= */

.login-loading-overlay.error-state .login-loading-card {
  border-color: rgba(150, 67, 57, 0.42);
  box-shadow: 0 24px 60px rgba(93, 34, 27, 0.30);
}

.login-loading-overlay.error-state .login-loading-card h2 {
  color: #934339;
}

.login-loading-overlay.error-state .login-loading-card p {
  color: #6b362f;
  font-weight: 600;
}

.login-loading-overlay.error-state .login-loading-dots span {
  background: #a85549;
}

.login-loading-overlay.error-state .login-loading-logo {
  box-shadow: 0 10px 24px rgba(147, 67, 57, 0.16);
}

/* =========================
   LOGOUT LOADING TRANSITION
   Matches the login loading overlay style.
========================= */

.logout-loading-overlay.success-state .login-loading-card h2 {
  color: #2f6b3f;
}

.logout-loading-overlay.success-state .login-loading-card p {
  color: #5b4632;
  font-weight: 600;
}

.logout-loading-overlay.error-state .login-loading-card {
  border-color: rgba(150, 67, 57, 0.42);
  box-shadow: 0 24px 60px rgba(93, 34, 27, 0.30);
}

.logout-loading-overlay.error-state .login-loading-card h2 {
  color: #934339;
}

.logout-loading-overlay.error-state .login-loading-card p {
  color: #6b362f;
  font-weight: 600;
}

.logout-loading-overlay.error-state .login-loading-dots span {
  background: #a85549;
}

/* =========================
   SHARED INDIGITRAIL SYSTEM MESSAGE OVERLAYS
========================= */

.indigi-message-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(35, 24, 15, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.indigi-message-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.indigi-message-card {
  width: min(460px, 100%);
  padding: 34px 32px 30px;
  border-radius: 26px;
  border: 1px solid rgba(203, 187, 164, 0.92);
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.indigi-message-overlay.active .indigi-message-card {
  transform: translateY(0) scale(1);
}

.indigi-message-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4eadb;
  box-shadow: 0 10px 24px rgba(47, 107, 63, 0.16);
}

.indigi-message-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.indigi-message-card h2 {
  margin: 0 0 10px;
  color: #2f6b3f;
  font-size: 28px;
  font-weight: 800;
}

.indigi-message-card p {
  max-width: 375px;
  margin: 0 auto 22px;
  color: #5b4632;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}

.indigi-message-prompt-wrap {
  margin: 0 0 22px;
}

.indigi-message-prompt-wrap textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 14px;
  border: 1.5px solid #b89e7d;
  border-radius: 16px;
  background: #fffdf9;
  color: #3b2a1d;
  font: inherit;
  line-height: 1.45;
  outline: none;
}

.indigi-message-prompt-wrap textarea:focus {
  border-color: #2f6b3f;
  box-shadow: 0 0 0 3px rgba(47, 107, 63, 0.12);
}

.indigi-message-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.indigi-message-btn {
  min-width: 126px;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.indigi-message-btn:hover {
  transform: translateY(-1px);
}

.indigi-message-btn:focus-visible {
  outline: 3px solid rgba(47, 107, 63, 0.24);
  outline-offset: 3px;
}

.indigi-message-btn.primary {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
  color: #fffdf9;
  box-shadow: 0 8px 18px rgba(47, 107, 63, 0.16);
}

.indigi-message-btn.primary:hover {
  background: linear-gradient(90deg, #184d2a, #256536);
}

.indigi-message-btn.secondary {
  background: #efe4d3;
  color: #5b4632;
  border: 1px solid #d1bfa7;
}

.indigi-message-btn.secondary:hover {
  background: #e7d9c4;
}


.indigi-message-overlay.success-state .indigi-message-btn.primary {
  background: linear-gradient(90deg, #1f5f34, #2f7a42);
}

.indigi-message-overlay.error-state .indigi-message-btn.primary {
  background: linear-gradient(90deg, #9b4f52, #ad5b5e);
  box-shadow: 0 8px 18px rgba(147, 67, 57, 0.18);
}

.indigi-message-overlay.warning-state .indigi-message-btn.primary {
  background: linear-gradient(90deg, #8a5a00, #a8731c);
  box-shadow: 0 8px 18px rgba(154, 90, 18, 0.17);
}

.indigi-message-overlay.error-state .indigi-message-btn:focus-visible {
  outline-color: rgba(147, 67, 57, 0.26);
}

.indigi-message-overlay.warning-state .indigi-message-btn:focus-visible {
  outline-color: rgba(154, 90, 18, 0.26);
}

.indigi-message-overlay.success-state .indigi-message-card {
  border-color: rgba(47, 107, 63, 0.34);
}

.indigi-message-overlay.success-state .indigi-message-card h2 {
  color: #2f6b3f;
}

.indigi-message-overlay.error-state .indigi-message-card {
  border-color: rgba(150, 67, 57, 0.42);
  box-shadow: 0 24px 60px rgba(93, 34, 27, 0.30);
}

.indigi-message-overlay.error-state .indigi-message-card h2 {
  color: #934339;
}

.indigi-message-overlay.error-state .indigi-message-card p {
  color: #6b362f;
  font-weight: 600;
}

.indigi-message-overlay.error-state .indigi-message-logo {
  box-shadow: 0 10px 24px rgba(147, 67, 57, 0.16);
}

.indigi-message-overlay.warning-state .indigi-message-card {
  border-color: rgba(154, 90, 18, 0.38);
}

.indigi-message-overlay.warning-state .indigi-message-card h2 {
  color: #8a5a00;
}

.indigi-message-overlay.warning-state .indigi-message-logo {
  box-shadow: 0 10px 24px rgba(154, 90, 18, 0.15);
}

@media (max-width: 560px) {
  .indigi-message-card {
    padding: 30px 22px 28px;
  }

  .indigi-message-card h2 {
    font-size: 24px;
  }

  .indigi-message-actions {
    flex-direction: column-reverse;
  }

  .indigi-message-btn {
    width: 100%;
  }
}

/* =========================
   STUDENT PROFILE ACHIEVEMENT LOCKED / UNLOCKED ICON STATES
   Locked badges use one generic locked icon.
   Unlocked badges switch to their specific achievement image.
========================= */

#badgeFirstTask .achievement-icon-placeholder,
#badgeHighScorer .achievement-icon-placeholder,
#badgeQuizAchiever .achievement-icon-placeholder,
#badgeActiveLearner .achievement-icon-placeholder {
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  overflow: hidden;
}

#badgeFirstTask.locked-achievement .achievement-icon-placeholder,
#badgeHighScorer.locked-achievement .achievement-icon-placeholder,
#badgeQuizAchiever.locked-achievement .achievement-icon-placeholder,
#badgeActiveLearner.locked-achievement .achievement-icon-placeholder {
  background-image: url("../assets/icons/badges/locked-achievement.png");
}

#badgeFirstTask.unlocked-achievement .achievement-icon-placeholder {
  background-image: url("../assets/icons/badges/first-task-completed.png");
}

#badgeHighScorer.unlocked-achievement .achievement-icon-placeholder {
  background-image: url("../assets/icons/badges/high-scorer.png");
}

#badgeQuizAchiever.unlocked-achievement .achievement-icon-placeholder {
  background-image: url("../assets/icons/badges/quiz-achiever.png");
}

#badgeActiveLearner.unlocked-achievement .achievement-icon-placeholder {
  background-image: url("../assets/icons/badges/active-learner.png");
}

/* =========================
   TASK BUILDER PREVIEW CLEANUP
   Matches the cleaner Quiz Builder preview style.
========================= */

.task-preview-panel > h2 {
  color: #2f241c;
  font-size: 28px;
  margin-bottom: 18px;
  font-weight: 800;
}

.task-preview-card {
  background: #fffdf9;
  border: 1px solid #cdbda8;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  min-height: 520px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

/* The old mini device/header is intentionally removed from the Task Preview. */
.task-preview-panel .preview-mini-topbar,
.task-preview-panel .preview-logo-placeholder,
.task-preview-panel .preview-user-mini,
.task-preview-panel .preview-avatar-placeholder,
.task-preview-panel .preview-icon-placeholder {
  display: none;
}

.task-preview-card .preview-content {
  padding: 24px;
}

.task-preview-card .preview-content h3 {
  color: #2f6b3f;
  font-size: 24px;
  margin-bottom: 6px;
}

.task-preview-card .preview-content p {
  color: #2f241c;
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.45;
}

.task-preview-card .preview-module-label {
  margin-top: -4px;
}

.task-preview-card .preview-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.task-preview-card .preview-tabs button {
  border: 1px solid #c7b69d;
  border-radius: 10px;
  background: #fffdf9;
  color: #3b2a1d;
  padding: 10px 12px;
  font-size: 14px;
}

.task-preview-card .preview-tabs button.active {
  color: #2f6b3f;
  border-bottom: 4px solid #2f6b3f;
}

.task-preview-card .preview-content h4 {
  color: #2f241c;
  font-size: 17px;
  margin-bottom: 10px;
}

.task-preview-card .preview-task-list {
  border: 1px solid #cdbda8;
  border-radius: 12px;
  overflow: hidden;
}

.task-preview-card .preview-task-list div {
  padding: 14px;
  color: #2f241c;
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid #eadfce;
}

.task-preview-card .preview-task-list div:last-child {
  border-bottom: none;
}

/* =========================
   QUIZ BUILDER SELECTED QUIZ MANAGEMENT
========================= */

.quiz-management-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quiz-management-actions button {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 24px;
  color: #fffdf9;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quiz-management-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.quiz-edit-selected-btn {
  background: linear-gradient(90deg, #7b654c, #8a7357);
}

.quiz-edit-selected-btn:hover {
  background: linear-gradient(90deg, #66523d, #765f47);
}

.quiz-delete-selected-btn {
  background: linear-gradient(90deg, #8a4f4f, #a05d5d);
}

.quiz-delete-selected-btn:hover {
  background: linear-gradient(90deg, #743b3b, #8c4c4c);
}

@media (max-width: 760px) {
  .quiz-management-actions {
    flex-direction: column;
  }

  .quiz-management-actions button {
    width: 100%;
  }
}

/* =========================
   STUDENT HOME LEARNING PROGRESS ICONS
========================= */

.learning-progress-item {
  align-items: center;
}

.learning-progress-icon {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
}

.learning-progress-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

/* =========================
   STUDENT HOME RECENT ACTIVITY ICONS
========================= */

.recent-activity-icon {
  width: 46px;
  height: 46px;
  border: none;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
}

.recent-activity-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   TERM CARDS ASSET INSERTIONS
========================= */

.term-search-icon-asset {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.term-search-icon-asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.term-empty-center-asset {
  width: 94px;
  height: 94px;
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.term-empty-center-asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   STUDENT PROFILE STAT ICON ASSETS
========================= */

.profile-stat-icon-asset {
  border: none;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-stat-icon-asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

/* =========================
   TEACHER CLASSES CREATE CLASS ICON
========================= */

.create-class-icon-asset {
  border: none;
  background: transparent;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.create-class-icon-asset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =========================
   LOGIN + REGISTER ILLUSTRATION ASSET
========================= */

.auth-illustration-frame {
  overflow: hidden;
  border: none;
  background: transparent;
}

.auth-illustration-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

/* =========================
   STUDENT HOME HUB PREVIEW CAROUSEL
========================= */

.hub-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hub-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 2.4s ease;
}

.hub-carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hub-carousel-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(18, 25, 15, 0.08) 0%,
    rgba(18, 25, 15, 0.18) 100%
  );
}

.hub-overlay-card,
.hub-preview-label {
  z-index: 2;
}

/* =========================
   STUDENT TASK CARDS — NO EMPTY IMAGE HOLDER
========================= */

.task-item-card {
  gap: 0;
}

.task-item-content {
  width: 100%;
}

/* =========================
   REATTEMPT REQUEST RESUBMIT UI
========================= */

.quiz-request-status-pill + .request-reattempt-btn {
  margin-top: 10px;
}

/* =========================
   PASSWORD SECURITY RULE HINT
========================= */

.password-rule-hint {
  margin: -10px 0 14px;
  color: #6b543a;
  font-size: 13px;
  line-height: 1.35;
}

/* =========================
   GOOGLE AUTH BUTTON + PROFILE PHOTO SYNC
========================= */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #8a7357;
  font-size: 13px;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d6c8b7;
}

.google-auth-btn {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid #c8b89f;
  border-radius: 25px;
  background: #fffdf9;
  color: #3d2a1d;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.2s ease;
}

.google-auth-btn:hover {
  background: #f5eee2;
  border-color: #2f6b3f;
  color: #2f6b3f;
}

.google-auth-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.google-auth-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d6c8b7;
  color: #4285f4;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.student-user-avatar.has-profile-photo,
.teacher-user-avatar.has-profile-photo,
.profile-avatar-large.has-profile-photo {
  border-style: solid;
  border-color: #2f6b3f;
  background: #fffdf9;
  overflow: hidden;
}

.student-user-avatar.has-profile-photo img,
.teacher-user-avatar.has-profile-photo img,
.profile-avatar-large.has-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* LOGO SIZE OVERRIDE */

.logo-placeholder,
.logo-placeholder img {
  width: 144px !important;
  height: 144px !important;
}

.student-logo-placeholder,
.student-logo-placeholder img,
.teacher-logo-placeholder,
.teacher-logo-placeholder img {
  width: 60px !important;
  height: 60px !important;
}

/* =========================================================
   TERM CARDS LIBRARY - MEMORY CARD EXPERIENCE
   Search + collection filter + animated flip cards
   ========================================================= */

.term-ready-search-row {
  margin-bottom: 30px;
}

.term-library-controls {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(210px, 280px) auto;
  gap: 14px;
  align-items: end;
}

.term-ready-search-row .term-search-box {
  max-width: none;
  min-height: 50px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 14px;
  padding: 0 15px;
  box-shadow: 0 5px 14px rgba(54, 39, 24, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.term-ready-search-row .term-search-box:focus-within {
  border-color: #2f6b3f;
  box-shadow: 0 0 0 3px rgba(47, 107, 63, 0.12), 0 8px 18px rgba(54, 39, 24, 0.07);
  transform: translateY(-1px);
}

.term-ready-search-row .term-search-box input,
.term-ready-search-row .term-search-box input:disabled {
  min-width: 0;
  opacity: 1;
  cursor: text;
}

.term-ready-search-row .term-search-box input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.term-collection-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.term-control-label {
  color: #6c5943;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.term-collection-filter-wrap select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #d7c9b8;
  border-radius: 14px;
  background: #fffdf9;
  color: #2f241c;
  padding: 0 42px 0 15px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: 0 5px 14px rgba(54, 39, 24, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.term-collection-filter-wrap select:focus {
  border-color: #2f6b3f;
  box-shadow: 0 0 0 3px rgba(47, 107, 63, 0.12), 0 8px 18px rgba(54, 39, 24, 0.07);
  transform: translateY(-1px);
}

.term-result-count {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: #6b5944;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.term-card-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  perspective: 1400px;
}

/* The actual interactive memory card. */
.term-memory-card {
  --term-card-order: 0;
  position: relative;
  min-width: 0;
  height: 330px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  perspective: 1100px;
  appearance: none;
  animation: termCardDeal 520ms cubic-bezier(.2,.75,.22,1) both;
  animation-delay: calc(var(--term-card-order) * 55ms);
}

.term-memory-card:focus-visible {
  outline: 3px solid rgba(47, 107, 63, 0.38);
  outline-offset: 5px;
}

.term-memory-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(.2,.72,.2,1);
}

.term-memory-card.is-flipped .term-memory-card-inner {
  transform: rotateY(180deg);
}

.term-memory-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 22px;
  border: 1px solid #c9aa7e;
  border-radius: 20px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 12px 28px rgba(56, 38, 22, 0.12), inset 0 0 0 5px rgba(255, 253, 247, 0.34);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.term-memory-card-front {
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.42) 0 2%, transparent 38%),
    linear-gradient(145deg, #f5e2c4 0%, #ecd1a8 55%, #e2bf8f 100%);
}

.term-memory-card-back {
  transform: rotateY(180deg);
  align-items: flex-start;
  background:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,0.24), transparent 32%),
    linear-gradient(145deg, #315f3f 0%, #244d34 100%);
  border-color: #1f462f;
  color: #fffaf0;
  box-shadow: 0 12px 28px rgba(27, 57, 39, 0.18), inset 0 0 0 5px rgba(255, 250, 240, 0.08);
}

.term-memory-card:hover .term-memory-card-face {
  border-color: #a77f4d;
  box-shadow: 0 18px 34px rgba(56, 38, 22, 0.18), inset 0 0 0 5px rgba(255, 253, 247, 0.42);
}

.term-memory-card:hover .term-memory-card-inner {
  transform: translateY(-7px) rotateX(1.5deg);
}

.term-memory-card.is-flipped:hover .term-memory-card-inner {
  transform: translateY(-7px) rotateY(180deg) rotateX(1.5deg);
}

.term-memory-card:active .term-memory-card-inner {
  transition-duration: 120ms;
  transform: translateY(-2px) scale(0.985);
}

.term-memory-card.is-flipped:active .term-memory-card-inner {
  transform: translateY(-2px) rotateY(180deg) scale(0.985);
}

.term-memory-corner {
  position: absolute;
  width: 64px;
  height: 64px;
  opacity: 0.38;
  pointer-events: none;
}

.term-memory-corner::before,
.term-memory-corner::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 20px;
}

.term-memory-corner::before {
  width: 44px;
  height: 2px;
}

.term-memory-corner::after {
  width: 2px;
  height: 44px;
}

.term-memory-card-front .term-memory-corner {
  color: #8e6638;
}

.term-memory-card-back .term-memory-corner {
  color: #ead7b5;
}

.term-memory-corner-top {
  top: 14px;
  left: 14px;
}

.term-memory-corner-top::before,
.term-memory-corner-top::after {
  top: 0;
  left: 0;
}

.term-memory-corner-bottom {
  right: 14px;
  bottom: 14px;
  transform: rotate(180deg);
}

.term-memory-corner-bottom::before,
.term-memory-corner-bottom::after {
  top: 0;
  left: 0;
}

.term-memory-emblem {
  width: 68px;
  height: 68px;
  margin: 8px 0 15px;
  border: 2px solid rgba(74, 90, 52, 0.46);
  border-radius: 18px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  background: rgba(255, 251, 241, 0.35);
  box-shadow: inset 0 0 0 5px rgba(105, 78, 42, 0.07);
}

.term-memory-emblem span {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 8px;
  background: #356c43;
  transform: rotate(-45deg);
  box-shadow: 10px -8px 0 -5px #9a6e3c;
}

.term-memory-kicker,
.term-memory-back-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.term-memory-kicker {
  color: #805f38;
  margin-bottom: 8px;
}

.term-memory-title {
  width: 100%;
  color: #2b251e;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.term-memory-divider {
  width: 58px;
  height: 2px;
  margin: 16px auto 12px;
  border-radius: 2px;
  background: #987346;
  opacity: 0.52;
}

.term-memory-collection {
  color: #5f4a33;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.term-memory-hint {
  margin-top: auto;
  width: 100%;
  color: #765e43;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  opacity: 0.82;
}

.term-memory-back-label {
  color: #dfc89f;
  margin-bottom: 8px;
}

.term-memory-back-title {
  color: #fffaf0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.term-memory-definition {
  margin: 17px 0 14px;
  color: #f9f0df;
  font-size: 14px;
  line-height: 1.48;
  font-weight: 500;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}

.term-memory-back-collection {
  margin-top: auto;
  color: #e6d3b0;
  text-align: left;
}

.term-memory-card-back .term-memory-hint {
  margin-top: 10px;
  color: #e6d3b0;
  text-align: left;
}

.term-no-results-card {
  min-height: 260px;
}

.term-no-results-symbol {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border: 3px solid #b99d79;
  border-radius: 50%;
  opacity: 0.82;
}

.term-no-results-symbol::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -7px;
  width: 23px;
  height: 3px;
  border-radius: 4px;
  background: #b99d79;
  transform: rotate(45deg);
  transform-origin: left center;
}

@keyframes termCardDeal {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96) rotateX(7deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}

@media (max-width: 1050px) {
  .term-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .term-library-controls {
    grid-template-columns: minmax(240px, 1fr) minmax(200px, 260px);
  }

  .term-result-count {
    grid-column: 1 / -1;
    min-height: auto;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .term-card-grid {
    grid-template-columns: 1fr;
    max-width: 430px;
  }

  .term-library-controls {
    grid-template-columns: 1fr;
  }

  .term-memory-card {
    height: 315px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .term-memory-card {
    animation: none;
  }

  .term-memory-card-inner,
  .term-memory-card-face,
  .term-ready-search-row .term-search-box,
  .term-collection-filter-wrap select {
    transition-duration: 0.01ms !important;
  }

  .term-memory-card:hover .term-memory-card-inner {
    transform: none;
  }

  .term-memory-card.is-flipped:hover .term-memory-card-inner {
    transform: rotateY(180deg);
  }
}

/* =========================
   COMBINED LEADERBOARD POINTS
========================= */
.student-rank-card.student-rank-card-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leaderboard-points-table strong {
  color: #2f6b3f;
  font-size: 1.08em;
}

.leaderboard-muted {
  color: #7b6a57;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .student-rank-card.student-rank-card-three {
    grid-template-columns: 1fr;
  }

  .leaderboard-points-table {
    min-width: 1050px;
  }
}

/* =========================
   SECURE INSTRUCTOR REGISTRATION
========================= */

.registration-role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 5px;
  border: 1px solid #d7c9b8;
  border-radius: 14px;
  background: #f7f2e9;
}

.registration-role-option {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b543a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.registration-role-option:hover:not(:disabled),
.registration-role-option:focus-visible:not(:disabled) {
  color: #2f6b3f;
  transform: translateY(-1px);
  outline: none;
}

.registration-role-option.active {
  background: #ffffff;
  color: #2f6b3f;
  box-shadow: 0 3px 10px rgba(54, 75, 48, 0.12);
}

.registration-role-option:disabled {
  opacity: 0.65;
  cursor: wait;
}

.instructor-registration-notice {
  display: grid;
  gap: 4px;
  margin: 2px 0 16px;
  padding: 12px 13px;
  border: 1px solid #d8caa8;
  border-radius: 11px;
  background: #fffaf0;
  color: #6b543a;
  font-size: 13px;
  line-height: 1.45;
}

.instructor-registration-notice strong {
  color: #2f6b3f;
  font-size: 13px;
}

#instructorRegistrationFields[hidden],
#learnerRegistrationFields[hidden],
#learnerGoogleRegistration[hidden] {
  display: none !important;
}


/* =========================
   INSTRUCTOR INVITE GENERATOR
========================= */

.instructor-invite-section {
  margin-top: 4px;
}

.instructor-invite-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: stretch;
  padding: 24px 26px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.instructor-invite-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.instructor-invite-eyebrow {
  margin: 0 0 5px;
  color: #a26c19;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.instructor-invite-heading-row h2 {
  margin: 0;
  color: #1f5f34;
  font-size: 24px;
}

.instructor-invite-badge {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e9f5eb;
  border: 1px solid #bfd8c3;
  color: #1f5f34;
  font-size: 12px;
  font-weight: 800;
}

.instructor-invite-description {
  max-width: 720px;
  margin: 12px 0 18px;
  color: #5f5143;
  font-size: 15px;
  line-height: 1.55;
}

.instructor-invite-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.instructor-invite-generate-btn,
.instructor-invite-copy-btn {
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.instructor-invite-generate-btn {
  padding: 12px 18px;
  background: #2f6b3f;
  color: #fff;
  box-shadow: 0 7px 14px rgba(47, 107, 63, 0.2);
}

.instructor-invite-generate-btn:hover:not(:disabled),
.instructor-invite-copy-btn:hover {
  transform: translateY(-1px);
}

.instructor-invite-generate-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.instructor-invite-status {
  margin: 0;
  color: #6e604e;
  font-size: 13px;
  line-height: 1.4;
}

.instructor-invite-result {
  align-self: stretch;
  padding: 18px;
  background: #f5ecdf;
  border: 1px solid #ddc7a8;
  border-radius: 14px;
}

.instructor-invite-result[hidden] {
  display: none;
}

.instructor-invite-result-label {
  margin: 0 0 9px;
  color: #6a4b20;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.instructor-invite-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.instructor-invite-code-row code {
  min-width: 0;
  flex: 1;
  padding: 12px 13px;
  overflow-wrap: anywhere;
  border: 1px dashed #b78b4b;
  border-radius: 9px;
  background: #fffdf9;
  color: #2f241c;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.instructor-invite-copy-btn {
  flex: 0 0 auto;
  padding: 11px 13px;
  background: #4d3a28;
  color: #fff;
}

.instructor-invite-warning {
  margin: 11px 0 0;
  color: #755d3c;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .instructor-invite-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .instructor-invite-card {
    padding: 19px;
  }

  .instructor-invite-heading-row,
  .instructor-invite-code-row {
    align-items: stretch;
    flex-direction: column;
  }

  .instructor-invite-badge {
    align-self: flex-start;
  }

  .instructor-invite-copy-btn {
    width: 100%;
  }
}


/* =========================
   COMPACT INSTRUCTOR INVITE ACTION
========================= */
.teacher-invite-compact-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #b9cdbd;
  border-radius: 18px;
  background: #eef6ef;
  color: #245d35;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.teacher-invite-compact-btn:hover {
  background: #e0efe3;
  border-color: #8fb39a;
  transform: translateY(-1px);
}

.invite-modal-open {
  overflow: hidden;
}

.instructor-invite-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.instructor-invite-modal[hidden] {
  display: none !important;
}

.instructor-invite-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 27, 21, 0.36);
  backdrop-filter: blur(2px);
}

.instructor-invite-dialog {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  padding: 20px;
  background: #fffdf9;
  border: 1px solid #d7c9b8;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.instructor-invite-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.instructor-invite-dialog .instructor-invite-eyebrow {
  margin: 0 0 3px;
  font-size: 10px;
}

.instructor-invite-dialog h2 {
  margin: 0;
  color: #1f5f34;
  font-size: 20px;
}

.instructor-invite-close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d7c9b8;
  border-radius: 50%;
  background: #f8f1e7;
  color: #5a4632;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.instructor-invite-dialog .instructor-invite-description {
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.45;
}

.instructor-invite-dialog .instructor-invite-generate-btn {
  width: 100%;
  padding: 10px 14px;
}

.instructor-invite-dialog .instructor-invite-status {
  min-height: 18px;
  margin-top: 9px;
  font-size: 12px;
}

.instructor-invite-dialog .instructor-invite-result {
  margin-top: 12px;
  padding: 13px;
}

.instructor-invite-dialog .instructor-invite-code-row {
  gap: 8px;
}

.instructor-invite-dialog .instructor-invite-code-row code {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.instructor-invite-dialog .instructor-invite-copy-btn {
  flex: 0 0 auto;
  padding: 8px 11px;
}

.instructor-invite-dialog .instructor-invite-warning {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 680px) {
  .teacher-topbar-right {
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .teacher-invite-compact-btn {
    order: 2;
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }
}


/* =========================================================
   AUTH PAGE REDESIGN — LOGIN / REGISTER
   ========================================================= */
body.auth-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.65), transparent 26%),
    linear-gradient(135deg, #efe7d9 0%, #f8f3ea 50%, #f1ebdd 100%);
  color: #243126;
}

.auth-page .login-header,
.auth-page .login-footer,
.auth-page .clean-login-footer {
  display: none !important;
}

.auth-page .login-wrapper.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
}

.auth-page .modern-login-card.auth-split-card {
  width: min(1220px, 100%);
  min-height: 760px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(122, 96, 60, 0.14);
  box-shadow:
    0 28px 70px rgba(55, 40, 21, 0.14),
    0 8px 26px rgba(55, 40, 21, 0.08);
  position: relative;
}

.auth-page .login-image-side.auth-visual-panel {
  position: relative;
  padding: 52px 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  color: #1f3527;
  background: linear-gradient(180deg, rgba(255,249,240,0.16), rgba(255,249,240,0.08));
}

.auth-page .auth-illustration-frame {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,248,236,0.10), rgba(255,248,236,0.08)),
    linear-gradient(0deg, rgba(24,40,26,0.18), rgba(24,40,26,0.18)),
    url("../assets/images/login-journey-illustration.png") center center / cover no-repeat;
  z-index: -3;
}

.auth-page .login-image-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,0.38), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 28%);
  z-index: -2;
  pointer-events: none;
}

.auth-page .login-image-side::before {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 200px;
  height: 200px;
  opacity: 0.16;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 30%, transparent 0 10px, #6f5537 10px 12px, transparent 12px 100%),
    linear-gradient(45deg, #6f5537 12.5%, transparent 12.5% 37.5%, #6f5537 37.5% 50%, transparent 50% 62.5%, #6f5537 62.5% 75%, transparent 75% 87.5%, #6f5537 87.5%);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
}

.auth-page .auth-brand-block {
  max-width: 470px;
}

.auth-page .auth-brand-logo {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(255, 250, 242, 0.22);
  border: 1px solid rgba(58, 45, 31, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(32, 22, 12, 0.08);
}

.auth-page .auth-brand-logo img,
.auth-page .login-loading-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-page .auth-brand-title {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #5b3b1e;
  text-shadow: 0 2px 10px rgba(255,255,255,0.18);
}

.auth-page .auth-brand-title span {
  color: #1d4a35;
}

.auth-page .auth-brand-divider {
  width: 170px;
  height: 16px;
  margin: 18px 0 20px;
  position: relative;
}

.auth-page .auth-brand-divider::before,
.auth-page .auth-brand-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 70px;
  height: 1.5px;
  background: rgba(92, 68, 39, 0.55);
}

.auth-page .auth-brand-divider::before { left: 0; }
.auth-page .auth-brand-divider::after { right: 0; }

.auth-page .auth-brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page .auth-brand-divider::marker { content: ""; }

.auth-page .auth-brand-divider:after,
.auth-page .auth-brand-divider:before {}

.auth-page .auth-brand-divider {
  --diamond-size: 10px;
}

.auth-page .auth-brand-divider > * { display: none; }

.auth-page .auth-brand-divider:empty::selection { background: transparent; }

.auth-page .auth-brand-divider:empty {
  background:
    linear-gradient(45deg, transparent calc(50% - 6px), rgba(92, 68, 39, 0.9) calc(50% - 6px) calc(50% - 4px), transparent calc(50% - 4px)),
    linear-gradient(-45deg, transparent calc(50% - 6px), rgba(92, 68, 39, 0.9) calc(50% - 6px) calc(50% - 4px), transparent calc(50% - 4px));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.auth-page .auth-brand-subtitle {
  max-width: 470px;
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.55;
  color: #24372a;
  text-wrap: balance;
}

.auth-page .auth-visual-caption {
  max-width: 420px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.6;
  color: #f7f3ea;
  background: rgba(28, 55, 40, 0.66);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(16, 22, 16, 0.14);
}

.auth-page .login-form-side.auth-form-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.4)),
    radial-gradient(circle at bottom left, rgba(46,107,63,0.08), transparent 26%);
}

.auth-page .login-form-side.auth-form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 110px;
  height: 100%;
  opacity: 0.10;
  background:
    linear-gradient(45deg, #836545 12.5%, transparent 12.5% 37.5%, #836545 37.5% 50%, transparent 50% 62.5%, #836545 62.5% 75%, transparent 75% 87.5%, #836545 87.5%);
  background-size: 34px 34px;
  pointer-events: none;
}

.auth-page .auth-form-card {
  width: min(100%, 500px);
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid rgba(124, 95, 62, 0.12);
  border-radius: 28px;
  padding: 34px 36px 28px;
  box-shadow:
    0 24px 52px rgba(39, 29, 18, 0.09),
    0 4px 14px rgba(39, 29, 18, 0.05);
  backdrop-filter: blur(10px);
}

.auth-page .auth-form-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #183625;
}

.auth-page .auth-form-intro {
  margin: 0 0 24px;
  color: #5a635c;
  line-height: 1.6;
  font-size: 0.98rem;
}

.auth-page .registration-role-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: #efe8db;
  border: 1px solid rgba(124, 95, 62, 0.12);
}

.auth-page .registration-role-option {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: #6a614f;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-page .registration-role-option.active,
.auth-page .registration-role-option:hover {
  background: linear-gradient(135deg, #2f6b3f 0%, #1f5f34 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(47, 107, 63, 0.22);
}

.auth-page form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-page form label {
  margin-top: 4px;
  font-weight: 700;
  color: #2e372f;
  font-size: 0.98rem;
}

.auth-page form input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid #d8d1c2;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 18px;
  font-size: 1rem;
  color: #253127;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.auth-page form input::placeholder {
  color: #93978d;
}

.auth-page form input:focus {
  outline: none;
  border-color: #3e7a52;
  box-shadow: 0 0 0 4px rgba(47, 107, 63, 0.12);
  transform: translateY(-1px);
}

.auth-page .auth-password-field {
  position: relative;
}

.auth-page .auth-password-field input {
  padding-right: 88px;
}

.auth-page .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #2f6b3f;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-page .auth-password-toggle:hover {
  background: rgba(47, 107, 63, 0.09);
  color: #20492d;
}

.auth-page .auth-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-page .auth-inline-row--end {
  justify-content: flex-end;
}

.auth-page .auth-text-link,
.auth-page .create-account a {
  color: #8b5c34;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-page .auth-text-link:hover,
.auth-page .create-account a:hover {
  color: #6d4321;
}

.auth-page .auth-form-message {
  min-height: 20px;
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.auth-page .auth-form-message.error {
  color: #b03434;
}

.auth-page .login-btn,
.auth-page .google-auth-btn {
  width: 100%;
  border-radius: 18px;
  padding: 15px 18px;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, background 0.22s ease;
}

.auth-page .login-btn {
  margin-top: 6px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #2e6a3f 0%, #1f5f34 100%);
  box-shadow: 0 14px 24px rgba(41, 93, 57, 0.22);
}

.auth-page .login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(41, 93, 57, 0.26);
  filter: brightness(1.04);
}

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

.auth-page .google-auth-btn {
  border: 1px solid #ddd4c6;
  background: #fff;
  color: #263227;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(29, 20, 11, 0.05);
}

.auth-page .google-auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(29, 20, 11, 0.08);
}

.auth-page .google-auth-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  color: #4285f4;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e4ded2;
}

.auth-page .auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0;
  color: #7b7a72;
}

.auth-page .auth-divider::before,
.auth-page .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d2c5b3, transparent);
}

.auth-page .auth-divider span {
  font-weight: 600;
}

.auth-page .registration-extra-fields {
  display: contents;
}

.auth-page .auth-hidden {
  display: none !important;
}

.auth-page .instructor-account-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  color: #5f644e;
  background: rgba(143, 114, 65, 0.08);
  border: 1px solid rgba(143, 114, 65, 0.14);
  line-height: 1.55;
  font-size: 0.94rem;
}

.auth-page .create-account {
  margin: 18px 0 0;
  text-align: center;
  color: #585f58;
  line-height: 1.5;
}

.auth-page .auth-footer-mark {
  margin-top: 20px;
  text-align: center;
  color: #7b7a72;
  font-size: 0.9rem;
}

.auth-page .auth-footer-mark .auth-brand-divider {
  margin: 0 auto 12px;
}

.auth-page .login-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 20, 15, 0.42);
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-page .login-loading-overlay:not(.active) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-page .login-loading-card {
  width: min(100%, 370px);
  padding: 28px 26px;
  border-radius: 26px;
  background: rgba(255, 251, 245, 0.94);
  border: 1px solid rgba(124, 95, 62, 0.12);
  box-shadow: 0 28px 52px rgba(22, 16, 10, 0.18);
  text-align: center;
}

.auth-page .login-loading-logo {
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
}

.auth-page .login-loading-card h2 {
  margin: 0 0 8px;
  color: #183625;
}

.auth-page .login-loading-card p {
  margin: 0;
  color: #5a635c;
  line-height: 1.6;
}

.auth-page .login-loading-dots {
  display: inline-flex;
  gap: 8px;
  margin-top: 18px;
}

.auth-page .login-loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f6b3f;
  animation: authDotPulse 1.1s infinite ease-in-out;
}

.auth-page .login-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.auth-page .login-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes authDotPulse {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 1100px) {
  .auth-page .modern-login-card.auth-split-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-page .login-image-side.auth-visual-panel {
    min-height: 420px;
  }

  .auth-page .login-form-side.auth-form-panel::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .auth-page .login-wrapper.auth-wrapper {
    padding: 16px;
  }

  .auth-page .login-image-side.auth-visual-panel {
    padding: 28px 24px 24px;
    min-height: 360px;
  }

  .auth-page .login-form-side.auth-form-panel {
    padding: 16px;
  }

  .auth-page .auth-form-card {
    padding: 24px 18px 22px;
    border-radius: 22px;
  }

  .auth-page .auth-brand-logo {
    width: 96px;
    height: 96px;
  }

  .auth-page .auth-brand-subtitle {
    font-size: 1.06rem;
  }

  .auth-page .auth-visual-caption {
    max-width: none;
    font-size: 0.95rem;
  }

  .auth-page .registration-role-switch {
    width: 100%;
  }

  .auth-page .registration-role-option {
    flex: 1;
    text-align: center;
  }
}


/* =========================================================
   AUTH PAGE LAYOUT FIX v4
   Prevent legacy login/register widths from collapsing the
   new split-screen layout.
   ========================================================= */

.auth-page .modern-login-card.auth-split-card > .login-image-side.auth-visual-panel,
.auth-page .modern-login-card.auth-split-card > .login-form-side.auth-form-panel {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.auth-page .login-image-side.auth-visual-panel {
  text-align: left !important;
}

.auth-page .login-image-side.auth-visual-panel > .auth-illustration-frame {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.auth-page .auth-form-card {
  width: 100% !important;
  max-width: 520px !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.auth-page .auth-form-card form,
.auth-page .auth-form-card input,
.auth-page .auth-form-card button {
  min-width: 0;
}

.auth-page .auth-form-card input {
  margin-bottom: 0 !important;
}

.auth-page .auth-form-message[hidden],
.auth-page .auth-form-message:empty {
  display: none !important;
}

.auth-page .forgot-link {
  margin: 0 !important;
}

@media (min-width: 1101px) {
  .auth-page .modern-login-card.auth-split-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(460px, 0.95fr) !important;
  }

  .auth-page .login-form-side.auth-form-panel {
    width: 100% !important;
    padding: 48px 54px !important;
  }

  .auth-page .login-image-side.auth-visual-panel {
    width: 100% !important;
    min-height: 760px !important;
  }
}

@media (max-width: 1100px) {
  .auth-page .modern-login-card.auth-split-card {
    grid-template-columns: 1fr !important;
  }

  .auth-page .login-image-side.auth-visual-panel,
  .auth-page .login-form-side.auth-form-panel {
    width: 100% !important;
  }

  .auth-page .login-image-side.auth-visual-panel {
    min-height: 420px !important;
  }
}

