@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&family=Sora:wght@500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #0E131B;
  color: #E8F6FF;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  border-bottom: 3px solid #1B9FBF;
  background-color: #0E131B;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2BE3FF;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  color: #93ACBF;
  font-size: 0.95rem;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-left: 1rem;
}

.nav-icons span {
  font-size: 1.2rem;
  cursor: pointer;
  color: #93ACBF;
}

/* Main Container */
main {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  flex-grow: 1;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 5rem;
}

.hero-content {
  flex: 1;
  max-width: 480px;
}

.hero-content h1 {
  font-size: 1.85rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #E8F6FF;
  margin-bottom: 1.2rem;
}

.hero-content p {
  font-size: 0.85rem;
  color: #7B93A8;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.75rem 1.5rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.btn-primary {
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #137E96;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.55);
}

.btn-secondary {
  background-color: #0E131B;
  color: #CFE4F2;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px currentColor;
}

/* Code Graphic Section */
.hero-graphic {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
}

.terminal-shadow {
  position: absolute;
  top: 15px;
  left: -15px;
  width: 100%;
  height: 100%;
  border: 2px solid #2BB9D6;
  pointer-events: none;
}

.terminal-window {
  position: relative;
  width: 100%;
  max-width: 460px;
  background-color: #05070A;
  border: 2px solid #1E3A47;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.60);
  border-radius: 2px;
  overflow: hidden;
}

.terminal-header {
  background-color: #0A0E14;
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1E3A47;
}

.dots {
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}

.dot-1 {
  background-color: #7A1A2E;
}

.dot-2 {
  background-color: #3C5A05;
}

.dot-3 {
  background-color: #12A0BD;
}

.terminal-title {
  font-family: monospace;
  font-size: 0.75rem;
  color: #5E7488;
}

.terminal-body {
  padding: 1.2rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #7B93A8;
}

.code-keyword {
  color: #FF7AD9;
}

.code-fn {
  color: #6DECFF;
}

.code-highlight {
  background-color: rgba(255, 60, 90, 0.16);
  color: #FF8FA3;
  display: block;
  margin: 0.2rem 0;
}

.code-comment {
  color: #FF5C7A;
  font-style: italic;
}

.terminal-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #0F8CA8;
  color: #E8F6FF;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.5px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.cta-section p {
  font-size: 0.85rem;
  color: #7B93A8;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.btn-cta {
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #137E96;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.55);
  padding: 0.9rem 2rem;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background-color: #0E131B;
  border-top: 2px solid #1E3A47;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left .logo {
  font-size: 1.25rem;
}

.footer-left p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #A9C0D2;
  margin-top: 0.2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A9C0D2;
}

.footer-icon {
  font-size: 1rem;
  margin-left: 1rem;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
  }

  header,
  footer {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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




/* Register */

/* Top Navigation */
.register-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  border-bottom: 2px solid #1E3A47;
  background-color: #0E131B;
}

.register-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2BE3FF;
}

.register-help-btn {
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  color: #A9C0D2;
}

/* Main Section */
.register-main-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* System Status Badges */
.register-status-wrapper {
  align-self: flex-end;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.register-status-tag {
  font-family: monospace;
  font-size: 0.65rem;
  border: 1px solid #22323F;
  padding: 0.2rem 0.5rem;
  color: #93ACBF;
  background-color: #0A0F16;
}

/* Registration Card Box */
.register-card-box {
  width: 100%;
  max-width: 480px;
  border: 2px solid #1E3A47;
  padding: 2.5rem 2rem 2rem;
  background-color: #0E131B;
}

.register-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #E8F6FF;
  margin-bottom: 0.4rem;
}

.register-subheading {
  font-family: monospace;
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.4;
  margin-bottom: 1.8rem;
}

/* Input Groups */
.register-field-group {
  margin-bottom: 1.2rem;
}

.register-field-label {
  display: block;
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: bold;
  color: #A9C0D2;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.register-required-star {
  color: #4FE9FF;
}

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

.register-text-input {
  width: 100%;
  padding: 0.65rem 2.2rem 0.65rem 0.8rem;
  border: 2px solid #1E3A47;
  background-color: #121A24;
  font-family: monospace;
  font-size: 0.8rem;
  color: #A9C0D2;
  outline: none;
}

.register-text-input::placeholder {
  color: #5E7488;
}

.register-field-icon {
  position: absolute;
  right: 0.8rem;
  color: #93ACBF;
  font-size: 0.9rem;
  pointer-events: none;
}

/* Alerts */
.register-alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  border: 2px solid;
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.4;
}

.register-alert-error {
  background-color: #2A0F18;
  border-color: #B32444;
  color: #FF6B85;
}

.register-alert-error ul {
  margin-left: 1.2rem;
  margin-top: 0.25rem;
}

.register-alert-success {
  background-color: #0A2018;
  border-color: #1FBF74;
  color: #2FD98A;
}

/* Role Radio Options */
.register-role-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.register-role-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: #A9C0D2;
  cursor: pointer;
}

.register-role-option input[type="radio"] {
  accent-color: #2BE3FF;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Checkbox & Terms */
.register-agreement-group {
  display: flex;
  gap: 0.6rem;
  margin: 1.5rem 0;
  align-items: flex-start;
}

.register-checkbox-input {
  margin-top: 0.2rem;
  accent-color: #E8F6FF;
  cursor: pointer;
}

.register-agreement-text {
  font-size: 0.7rem;
  color: #93ACBF;
  line-height: 1.4;
  font-weight: normal;
}

.register-agreement-text a {
  text-decoration: underline;
  font-weight: 600;
}

/* Buttons */
.register-action-button {
  width: 100%;
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #137E96;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.55);
  padding: 0.8rem;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.1s ease;
}

.register-action-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.55);
}

.register-section-divider {
  border: none;
  border-top: 2px dashed #22323F;
  margin: 1.5rem 0 1.2rem;
}

.register-login-redirect {
  text-align: center;
  font-size: 0.8rem;
  color: #93ACBF;
}

.register-login-redirect a {
  font-weight: bold;
  margin-left: 0.2rem;
}

/* Logs Area */
.register-logs-wrapper {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 480px;
}

.register-log-card {
  flex: 1;
  border: 1px solid #1E3A47;
  padding: 0.5rem 0.75rem;
  font-family: monospace;
  font-size: 0.6rem;
  color: #7B93A8;
  background-color: #0E131B;
  line-height: 1.3;
}

.register-log-prefix {
  color: #4FE9FF;
}

/* Footer */
.register-footer {
  background-color: #0E131B;
  border-top: 2px solid #1E3A47;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.register-footer-brand .register-logo {
  font-size: 1.25rem;
}

.register-footer-brand p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #A9C0D2;
  margin-top: 0.2rem;
}

.register-footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.register-footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A9C0D2;
}

.register-footer-symbol {
  font-size: 1rem;
  margin-left: 1rem;
}

@media (max-width: 600px) {
  .register-main-container {
    padding: 1rem;
  }

  .register-logs-wrapper {
    flex-direction: column;
  }

  .register-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .register-footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Login */

/* Top Navigation */
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  border-bottom: 2px solid #1E3A47;
  background-color: #0E131B;
}

.login-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2BE3FF;
}

.login-help-btn {
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  color: #A9C0D2;
}

/* Main Container */
.login-main-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top Centered Status Badge */
.login-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: monospace;
  font-size: 0.65rem;
  font-weight: bold;
  color: #E8F6FF;
  background-color: #0F8CA8;
  border: 2px solid #0B6C82;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.55);
  padding: 0.25rem 0.6rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
}

/* Login Card Box */
.login-card-box {
  width: 100%;
  max-width: 480px;
  border: 2px solid #1E3A47;
  padding: 2.5rem 2rem 2rem;
  background-color: #0E131B;
}

.login-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #E8F6FF;
  margin-bottom: 0.4rem;
}

.login-subheading {
  font-family: monospace;
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.4;
  margin-bottom: 1.8rem;
}

/* Input Groups */
.login-field-group {
  margin-bottom: 1.2rem;
}

.login-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.login-field-label {
  display: block;
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: bold;
  color: #A9C0D2;
  text-transform: uppercase;
}

.login-forgot-link {
  font-size: 0.7rem;
  color: #2BE3FF;
  font-weight: 600;
}

.login-text-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 2px solid #1E3A47;
  background-color: #121A24;
  font-family: monospace;
  font-size: 0.8rem;
  color: #A9C0D2;
  outline: none;
}

.login-text-input::placeholder {
  color: #5E7488;
}

/* Main Submit Button */
.login-action-button {
  width: 100%;
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #137E96;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.55);
  padding: 0.8rem;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.2rem;
  transition: transform 0.1s ease;
}

.login-action-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.55);
}

/* Social Auth Buttons */
.login-social-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  padding: 0.6rem;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #E8F6FF;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s ease;
}

.login-social-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.login-social-icon {
  width: 16px;
  height: 16px;
}

/* Redirect Prompt */
.login-register-redirect {
  text-align: center;
  font-size: 0.8rem;
  color: #93ACBF;
  padding-top: 1rem;
  border-top: 2px dashed #22323F;
}

.login-register-redirect a {
  font-weight: bold;
  margin-left: 0.2rem;
}

/* Notice Box Below Form */
.login-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  width: 100%;
  max-width: 480px;
  margin-top: 2rem;
  padding: 1rem;
  background-color: #12303D;
  border: 1px solid #2BB9D6;
}

.login-notice-icon {
  font-size: 1.1rem;
  color: #2BE3FF;
  line-height: 1;
}

.login-notice-text {
  font-family: monospace;
  font-size: 0.68rem;
  color: #4FE9FF;
  line-height: 1.4;
  font-weight: 600;
  text-transform: uppercase;
}

/* Footer */
.login-footer {
  background-color: #0E131B;
  border-top: 2px solid #1E3A47;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-footer-brand .login-logo {
  font-size: 1.25rem;
}

.login-footer-brand p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #A9C0D2;
  margin-top: 0.2rem;
}

.login-footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.login-footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A9C0D2;
}

.login-footer-symbol {
  font-size: 1rem;
  margin-left: 1rem;
}

@media (max-width: 600px) {
  .login-main-container {
    padding: 1rem;
  }

  .login-social-group {
    flex-direction: column;
  }

  .login-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

/* Student Dashboard*/

.student-dashboard-code-font {
  font-family: 'JetBrains Mono', monospace;
}

/* Header Navbar */
.student-dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: #0E131B;
  border-bottom: 2px solid #1E3A47;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  width: 100%;
}

.student-dashboard-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2BE3FF;
}

.student-dashboard-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.student-dashboard-nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #93ACBF;
  transition: color 0.2s ease;
}

.student-dashboard-nav-link.student-dashboard-active {
  color: #2BE3FF;
  font-weight: 700;
  border-bottom: 2px solid #1B9FBF;
  padding-bottom: 0.2rem;
}

.student-dashboard-nav-link:hover {
  color: #2BE3FF;
}

.student-dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.student-dashboard-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #93ACBF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.student-dashboard-icon-btn:hover {
  color: #2BE3FF;
}

/* Sidebar Navigation */
.student-dashboard-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  z-index: 40;
  background-color: #0E131B;
  border-right: 2px solid #1E3A47;
  width: 260px;
}

.student-dashboard-profile-card-mini {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid #1E3A47;
}

.student-dashboard-avatar-wrapper {
  width: 80px;
  height: 80px;
  background-color: #12303D;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 2px solid #1E3A47;
}

.student-dashboard-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-dashboard-level-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2BE3FF;
}

.student-dashboard-xp-label {
  font-size: 0.75rem;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.2rem;
}

.student-dashboard-xp-progress-bar {
  width: 100%;
  height: 8px;
  background-color: #0F2430;
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
  border: 1px solid #1E3A47;
}

.student-dashboard-xp-progress-fill {
  height: 100%;
  background-color: #0F8CA8;
}

.student-dashboard-sidebar-menu {
  flex-grow: 1;
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
}

.student-dashboard-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  color: #93ACBF;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.student-dashboard-sidebar-item:hover {
  background-color: #0F2430;
  color: #E8F6FF;
}

.student-dashboard-sidebar-item.student-dashboard-active {
  background-color: #0F8CA8;
  color: #E8F6FF;
}

.student-dashboard-upgrade-btn-wrapper {
  margin: 1.5rem 1rem 0;
}

.student-dashboard-upgrade-btn {
  width: 100%;
  background-color: #A3FF12;
  color: #7ABF22;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
  border: 2px solid #1E3A47;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.student-dashboard-upgrade-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.student-dashboard-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid #1E3A47;
}

/* Main Content Area */
.student-dashboard-main {
  margin-left: 260px;
  padding-top: 64px;
  min-height: 100vh;
  flex-grow: 1;
}

.student-dashboard-content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Grid Layouts */
.student-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.student-dashboard-col-12 {
  grid-column: span 12;
}

.student-dashboard-col-8 {
  grid-column: span 8;
}

.student-dashboard-col-4 {
  grid-column: span 4;
}

.student-dashboard-col-6 {
  grid-column: span 6;
}

.student-dashboard-col-3 {
  grid-column: span 3;
}

/* Header Welcome Section */
.student-dashboard-welcome-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.student-dashboard-tag-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #2BE3FF;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.student-dashboard-welcome-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #E8F6FF;
  margin-bottom: 0.5rem;
}

.student-dashboard-welcome-subtext {
  font-size: 1rem;
  color: #93ACBF;
  line-height: 1.5;
  max-width: 550px;
}

.student-dashboard-welcome-subtext span {
  color: #2BE3FF;
  font-weight: 600;
}

/* Bento Cards */
.student-dashboard-bento-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.student-dashboard-bento-card:active {
  transform: scale(0.99);
}

/* Mastery Card */
.student-dashboard-mastery-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.student-dashboard-mastery-bg-icon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1rem;
  opacity: 0.08;
  pointer-events: none;
}

.student-dashboard-mastery-bg-icon span {
  font-size: 120px;
}

.student-dashboard-mastery-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-weight: 700;
}

.student-dashboard-circle-chart-wrapper {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.student-dashboard-circle-chart-wrapper svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.student-dashboard-chart-bg-circle {
  color: #7FF0FF;
}

.student-dashboard-chart-fill-circle {
  color: #2BE3FF;
  transition: all 1s ease-out;
}

.student-dashboard-circle-chart-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.student-dashboard-chart-percentage {
  font-size: 1.75rem;
  font-weight: 700;
  color: #E8F6FF;
  line-height: 1;
}

.student-dashboard-chart-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #93ACBF;
  margin-top: 0.2rem;
}

.student-dashboard-mastery-description {
  font-size: 0.85rem;
  color: #93ACBF;
  padding: 0 1rem;
}

.student-dashboard-mastery-description span {
  font-weight: 700;
  color: #2BE3FF;
}

/* Section Headers */
.student-dashboard-section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.student-dashboard-section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.student-dashboard-section-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #2BE3FF;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.student-dashboard-section-link:hover {
  text-decoration: underline;
}

/* Lesson Cards */
.student-dashboard-lesson-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.student-dashboard-lesson-thumbnail-box {
  aspect-ratio: 16 / 9;
  background-color: #12303D;
  position: relative;
  overflow: hidden;
}

.student-dashboard-lesson-thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.student-dashboard-lesson-card:hover .student-dashboard-lesson-thumbnail-box img {
  transform: scale(1.05);
}

.student-dashboard-lesson-tags {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.35rem;
}

.student-dashboard-badge-tag {
  background-color: rgba(5, 7, 10, 0.82);
  border: 1px solid #1E3A47;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
}

.student-dashboard-badge-tag.student-dashboard-primary {
  color: #2BE3FF;
}

.student-dashboard-badge-tag.student-dashboard-secondary {
  color: #A9C0D2;
}

.student-dashboard-lesson-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.student-dashboard-lesson-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.student-dashboard-lesson-description {
  font-size: 0.85rem;
  color: #93ACBF;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.student-dashboard-lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.student-dashboard-avatar-stack {
  display: flex;
}

.student-dashboard-stacked-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  margin-left: -8px;
}

.student-dashboard-stacked-avatar:first-child {
  margin-left: 0;
}

.student-dashboard-avatar-1 {
  background-color: #12303D;
}

.student-dashboard-avatar-2 {
  background-color: #12303D;
}

.student-dashboard-avatar-3 {
  background-color: #0F8CA8;
}

.student-dashboard-btn-lesson-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #2BE3FF;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
}

.student-dashboard-btn-lesson-action span {
  transition: transform 0.2s ease;
}

.student-dashboard-lesson-card:hover .student-dashboard-btn-lesson-action span {
  transform: translateX(4px);
}

/* Recent Activity Section */
.student-dashboard-activity-list {
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  background-color: #0E131B;
  overflow: hidden;
}

.student-dashboard-activity-item {
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-bottom: 1px solid #22323F;
}

.student-dashboard-activity-item:last-child {
  border-bottom: none;
}

.student-dashboard-activity-icon-box {
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1E3A47;
}

.student-dashboard-icon-box-primary {
  background-color: #12303D;
  color: #2BE3FF;
}

.student-dashboard-icon-box-secondary {
  background-color: #12303D;
  color: #8FD32B;
}

.student-dashboard-icon-box-muted {
  background-color: #12303D;
  color: #93ACBF;
}

.student-dashboard-activity-content {
  flex-grow: 1;
}

.student-dashboard-activity-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #E8F6FF;
  line-height: 1.2;
}

.student-dashboard-activity-timestamp {
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  color: #93ACBF;
  margin-top: 0.25rem;
}

.student-dashboard-xp-pill {
  display: inline-block;
  margin-top: 0.35rem;
  background-color: #12303D;
  color: #2BE3FF;
  padding: 0.1rem 0.5rem;
  border-radius: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid #1B9FBF;
}

.student-dashboard-btn-more {
  background: none;
  border: none;
  color: #93ACBF;
  cursor: pointer;
}

/* Streak Footer Card */
.student-dashboard-streak-footer-box {
  padding: 1rem;
  background-color: #0A0F16;
  border-top: 2px solid #1E3A47;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-dashboard-streak-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.student-dashboard-streak-icon {
  color: #8FD32B;
}

.student-dashboard-streak-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.student-dashboard-btn-contact-support {
  width: 100%;
  border: 2px solid #1B9FBF;
  color: #2BE3FF;
  background-color: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 2px 2px 0px rgba(0,229,255,0.30);
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.2s ease;
}

.student-dashboard-btn-contact-support:hover {
  background-color: rgba(43, 227, 255, 0.06);
}

/* Global Footer */
.student-dashboard-footer {
  margin-left: 260px;
  background-color: #0E131B;
  border-top: 2px solid #1E3A47;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
}

.student-dashboard-footer-left-content .student-dashboard-brand {
  font-size: 1.25rem;
}

.student-dashboard-footer-left-content p {
  font-size: 0.75rem;
  font-weight: 600;
  color: #A9C0D2;
  margin-top: 0.2rem;
}

.student-dashboard-footer-right-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.student-dashboard-footer-nav {
  display: flex;
  gap: 1.5rem;
}

.student-dashboard-footer-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  color: #A9C0D2;
  font-family: 'JetBrains Mono', monospace;
}

.student-dashboard-footer-nav a:hover {
  text-decoration: underline;
}

/* ================================
       LESSONS PAGE SPECIFIC STYLES
       ================================ */

.lessons-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.lessons-search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #1E3A47;
  padding: 0.5rem 0.75rem;
  background-color: #0E131B;
  min-width: 280px;
}

.lessons-search-wrapper .material-symbols-outlined {
  color: #5E7488;
  font-size: 1.2rem;
}

.lessons-search-input {
  border: none;
  background: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  width: 100%;
  color: #E8F6FF;
}

.lessons-search-input::placeholder {
  color: #5E7488;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

/* Track Filter Tabs */
.lessons-tracks-section {
  margin-bottom: 1.5rem;
}

.lessons-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lessons-filter-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #93ACBF;
}

.lessons-filter-tab:hover {
  background-color: #0F2430;
}

.lessons-filter-active {
  background-color: #0F8CA8 !important;
  color: #E8F6FF !important;
  border-color: #1B9FBF !important;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

/* Learning Path Card */
.lessons-path-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.lessons-path-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.lessons-path-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lessons-path-icon {
  font-size: 2.5rem;
  color: #2BE3FF;
}

.lessons-path-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.lessons-path-subtitle {
  font-size: 0.8rem;
  color: #93ACBF;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.2rem;
}

.lessons-path-progress-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
}

.lessons-path-progress-bar {
  flex-grow: 1;
  height: 12px;
  background-color: #0F2430;
  border: 1px solid #1E3A47;
  border-radius: 6px;
  overflow: hidden;
}

.lessons-path-progress-fill {
  height: 100%;
  background-color: #0F8CA8;
  border-radius: 6px;
  transition: width 1s ease;
}

.lessons-path-percentage {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2BE3FF;
  min-width: 3rem;
}

/* Inline Lesson Progress Bars */
.lessons-inline-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lessons-inline-bar {
  flex-grow: 1;
  height: 6px;
  background-color: #0F2430;
  border: 1px solid #1E3A47;
  border-radius: 3px;
  overflow: hidden;
}

.lessons-inline-fill {
  height: 100%;
  background-color: #0E7A4E;
  border-radius: 3px;
}

.lessons-inline-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #93ACBF;
  min-width: 2.5rem;
  text-align: right;
}

/* Lesson Meta (time info) */
.lessons-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
}

/* Recommended Card */
.lessons-recommend-card {
  padding: 0;
  overflow: hidden;
}

.lessons-recommend-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
}

.lessons-recommend-icon-box {
  width: 56px;
  height: 56px;
  background-color: #12303D;
  border: 2px solid #1E3A47;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lessons-recommend-text {
  flex-grow: 1;
}

.lessons-recommend-text h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.lessons-recommend-text p {
  font-size: 0.8rem;
  color: #93ACBF;
  line-height: 1.4;
}

.lessons-recommend-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.lessons-recommend-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Stats Card */
.lessons-stats-card {
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  background-color: #0E131B;
  padding: 1rem;
}

.lessons-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.lessons-stat-item .material-symbols-outlined {
  font-size: 2rem;
}

.lessons-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.lessons-stat-label {
  font-size: 0.75rem;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.1rem;
}

.lessons-stat-divider {
  height: 1px;
  background-color: #131C26;
  margin: 0;
}

/* ================================
       PROFILE PAGE SPECIFIC STYLES
       ================================ */

/* Profile Hero Section */
.profile-hero-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
}

.profile-hero-avatar-col {
  flex-shrink: 0;
}

.profile-avatar-large {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 1rem;
  overflow: hidden;
  border: 3px solid #1E3A47;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 36px;
  height: 36px;
  background-color: #0F8CA8;
  color: #E8F6FF;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-hero-info {
  flex-grow: 1;
}

.profile-hero-info .student-dashboard-welcome-title {
  margin-bottom: 0.75rem;
}

.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.profile-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #93ACBF;
  font-family: 'JetBrains Mono', monospace;
}

.profile-hero-meta-item .material-symbols-outlined {
  font-size: 1.1rem;
  color: #2BE3FF;
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.profile-edit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.profile-edit-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.profile-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.profile-share-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Profile Stat Cards */
.profile-stat-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-stat-icon {
  font-size: 2.5rem !important;
  margin-bottom: 0.5rem;
}

.profile-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1;
}

.profile-stat-label {
  font-size: 0.7rem;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badges Grid */
.profile-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.profile-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  transition: transform 0.15s ease;
}

.profile-badge-earned {
  background-color: #0E131B;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
}

.profile-badge-earned:hover {
  transform: translateY(-2px);
}

.profile-badge-locked {
  background-color: #0A0F16;
  border-style: dashed;
  opacity: 0.7;
}

.profile-badge-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 2px solid #1E3A47;
}

.profile-badge-icon-wrapper .material-symbols-outlined {
  font-size: 1.75rem;
}

.profile-badge-name {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.profile-badge-desc {
  font-size: 0.65rem;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.3;
}

/* Settings Card */
.profile-settings-card {
  padding: 0;
  overflow: hidden;
}

.profile-settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
}

.profile-settings-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-settings-label .material-symbols-outlined {
  color: #2BE3FF;
}

.profile-settings-value {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #93ACBF;
  font-family: 'JetBrains Mono', monospace;
}

.profile-settings-change-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  cursor: pointer;
  transition: background-color 0.15s;
}

.profile-settings-change-btn:hover {
  background-color: #0F2430;
}

.profile-settings-divider {
  height: 1px;
  background-color: #131C26;
  margin: 0 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .lessons-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .lessons-search-wrapper {
    min-width: unset;
  }

  .lessons-path-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .lessons-path-progress-section {
    width: 100%;
  }

  .lessons-recommend-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-hero-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-hero-meta {
    justify-content: center;
  }

  .profile-hero-actions {
    width: 100%;
    justify-content: center;
  }

  .profile-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

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

  .lessons-filter-tabs {
    justify-content: center;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .student-dashboard-sidebar {
    display: none;
  }

  .student-dashboard-main,
  .student-dashboard-footer {
    margin-left: 0;
  }
}

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

  .student-dashboard-col-8,
  .student-dashboard-col-4,
  .student-dashboard-col-6,
  .student-dashboard-col-3,
  .student-dashboard-col-12 {
    grid-column: span 12;
  }

  .student-dashboard-header {
    padding: 0 1rem;
  }

  .student-dashboard-nav {
    display: none;
  }

  .student-dashboard-content-container {
    padding: 1rem;
  }

  .student-dashboard-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .student-dashboard-footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ================================
       LESSON DETAILS PAGE STYLES
       ================================ */

.lesson-details-main {
  margin-left: 260px;
  padding-top: 64px;
  min-height: 100vh;
  flex-grow: 1;
}

.lesson-details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Breadcrumb */
.lesson-details-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #7B93A8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lesson-details-breadcrumb a {
  color: #2BE3FF;
  font-weight: 600;
}

.lesson-details-breadcrumb a:hover {
  text-decoration: underline;
}

.lesson-details-breadcrumb-sep {
  color: #5E7488;
}

.lesson-details-breadcrumb-current {
  color: #E8F6FF;
  font-weight: 600;
}

/* Header Card */
.lesson-details-header-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.lesson-details-header-left {
  flex: 1;
}

.lesson-details-header-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.lesson-details-badge-progress {
  background-color: #0A2018;
  border: 1px solid #1FBF74;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: #2FD98A;
}

.lesson-details-title {
  font-size: 2rem;
  font-weight: 800;
  color: #E8F6FF;
  margin-bottom: 0.5rem;
}

.lesson-details-subtitle {
  font-size: 0.9rem;
  color: #93ACBF;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.lesson-details-header-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.lesson-details-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #93ACBF;
}

.lesson-details-meta-item .material-symbols-outlined {
  font-size: 1.1rem;
  color: #2BE3FF;
}

/* Progress Ring */
.lesson-details-header-right {
  flex-shrink: 0;
}

.lesson-details-header-progress-ring {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-details-header-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.lesson-details-ring-bg {
  fill: none;
  stroke: #7FF0FF;
  stroke-width: 8;
}

.lesson-details-ring-fill {
  fill: none;
  stroke: #3DFFA0;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.lesson-details-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lesson-details-ring-percent {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3DFFA0;
  line-height: 1;
}

.lesson-details-ring-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: #93ACBF;
  margin-top: 0.15rem;
  letter-spacing: 0.05em;
}

/* Main Layout: Content + Sidebar */
.lesson-details-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.lesson-details-content-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lesson-details-sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Video Card */
.lesson-details-video-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  overflow: hidden;
}

.lesson-details-video-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #05070A 0%, #0A0E14 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #E8F6FF;
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative;
}

.lesson-details-video-placeholder:hover {
  background: linear-gradient(135deg, #0A0E14 0%, #0F151D 100%);
}

.lesson-details-video-placeholder .material-symbols-outlined {
  font-size: 4rem;
  color: #2BE3FF;
}

.lesson-details-video-placeholder p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lesson-details-video-duration {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 0.25rem 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  border-radius: 0.25rem;
}

/* Section Cards */
.lesson-details-section-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.lesson-details-section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lesson-details-section-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 1rem;
}

.lesson-details-section-header-flex .lesson-details-section-heading {
  margin-bottom: 0;
}

.lesson-details-module-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #7B93A8;
}

.lesson-details-section-text {
  font-size: 0.9rem;
  color: #93ACBF;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Learning Goals */
.lesson-details-learning-goals {
  background-color: #0A0F16;
  border: 1px solid #1B9FBF;
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.lesson-details-learning-goals h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #2BE3FF;
}

.lesson-details-learning-goals ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.lesson-details-learning-goals li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #93ACBF;
}

.lesson-details-learning-goals li .material-symbols-outlined {
  font-size: 1.1rem;
  color: #3DFFA0;
}

/* Modules List */
.lesson-details-modules-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lesson-details-module-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  background-color: #0E131B;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lesson-details-module-item:hover:not(.lesson-details-module-locked) {
  border-color: #1B9FBF;
  box-shadow: 2px 2px 0px rgba(43, 227, 255, 0.14);
}

.lesson-details-module-completed {
  border-color: #1FBF74;
  background-color: #0A2018;
}

.lesson-details-module-active {
  border-color: #1B9FBF;
  background-color: #0C121A;
}

.lesson-details-module-locked {
  opacity: 0.65;
  background-color: #0A0F16;
}

.lesson-details-module-check .material-symbols-outlined {
  font-size: 1.5rem;
}

.lesson-details-module-completed .lesson-details-module-check .material-symbols-outlined {
  color: #3DFFA0;
}

.lesson-details-module-active .lesson-details-module-check .material-symbols-outlined {
  color: #2BE3FF;
}

.lesson-details-module-locked .lesson-details-module-check .material-symbols-outlined {
  color: #5E7488;
}

.lesson-details-module-info {
  flex: 1;
}

.lesson-details-module-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 0.2rem;
}

.lesson-details-module-desc {
  font-size: 0.8rem;
  color: #7B93A8;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.lesson-details-module-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #5E7488;
}

.lesson-details-module-meta .material-symbols-outlined {
  font-size: 0.85rem;
}

.lesson-details-module-dot {
  color: #7B93A8;
  margin: 0 0.1rem;
}

.lesson-details-module-action {
  flex-shrink: 0;
}

.lesson-details-module-status-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
}

.lesson-details-status-done {
  background-color: #0C2A1C;
  color: #2FD98A;
  border: 1px solid #1FBF74;
}

.lesson-details-status-locked {
  background-color: #121A24;
  color: #7B93A8;
  border: 1px solid #243040;
}

.lesson-details-module-btn {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease;
}

.lesson-details-module-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Collapsible modules */
.lesson-details-modules-collapse {
  border: none;
  margin-top: 0.5rem;
}

.lesson-details-modules-collapse-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2BE3FF;
  cursor: pointer;
  padding: 0.75rem;
  background-color: #0C121A;
  border: 2px solid #1B9FBF;
  border-radius: 0.375rem;
  list-style: none;
  transition: background-color 0.2s;
}

.lesson-details-modules-collapse-summary::-webkit-details-marker {
  display: none;
}

.lesson-details-modules-collapse-summary:hover {
  background-color: #12303D;
}

.lesson-details-modules-collapse[open] .lesson-details-modules-collapse-summary {
  margin-bottom: 0.5rem;
}

.lesson-details-modules-collapse .lesson-details-module-item {
  margin-bottom: 0.5rem;
}

/* Sidebar Cards */
.lesson-details-sidebar-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.lesson-details-sidebar-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1E3A47;
}

/* Progress in Sidebar */
.lesson-details-progress-block {
  margin-bottom: 1rem;
}

.lesson-details-progress-bar-lg {
  height: 10px;
  background-color: #0F2430;
  border: 1px solid #1E3A47;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.lesson-details-progress-fill-lg {
  height: 100%;
  background-color: #0F8CA8;
  border-radius: 5px;
  transition: width 1s ease;
}

.lesson-details-progress-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
}

.lesson-details-progress-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.lesson-details-progress-stat {
  text-align: center;
  flex: 1;
  padding: 0.5rem;
  background-color: #0A0F16;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
}

.lesson-details-progress-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1;
}

.lesson-details-progress-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #7B93A8;
  margin-top: 0.2rem;
}

/* Resources List */
.lesson-details-resources-list {
  list-style: none;
}

.lesson-details-resources-list li {
  margin-bottom: 0.5rem;
}

.lesson-details-resources-list li:last-child {
  margin-bottom: 0;
}

.lesson-details-resource-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #93ACBF;
  transition: background-color 0.2s;
}

.lesson-details-resource-link:hover {
  background-color: #0F2430;
  color: #2BE3FF;
}

.lesson-details-resource-link .material-symbols-outlined {
  font-size: 1.2rem;
  color: #2BE3FF;
}

/* Instructor */
.lesson-details-instructor-block {
  display: flex;
  gap: 0.75rem;
}

.lesson-details-instructor-avatar {
  width: 48px;
  height: 48px;
  background-color: #0F8CA8;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-details-instructor-avatar .material-symbols-outlined {
  font-size: 1.5rem;
  color: #E8F6FF;
}

.lesson-details-instructor-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8F6FF;
}

.lesson-details-instructor-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #2BE3FF;
  margin-bottom: 0.25rem;
}

.lesson-details-instructor-bio {
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.4;
}

/* XP Card */
.lesson-details-xp-card {
  background: linear-gradient(135deg, #0C121A 0%, #0A0F16 100%);
}

.lesson-details-xp-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lesson-details-xp-display .material-symbols-outlined {
  font-size: 2.5rem;
  color: #A3FF12;
}

.lesson-details-xp-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1;
}

.lesson-details-xp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
}

.lesson-details-xp-share-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.lesson-details-xp-share-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* ================================
       CODING EXERCISE PAGE STYLES
       ================================ */

.exercise-main {
  margin-left: 260px;
  padding-top: 64px;
  min-height: 100vh;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: #121A24;
}

/* Top Bar */
.exercise-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background-color: #0E131B;
  border-bottom: 2px solid #1E3A47;
}

.exercise-top-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exercise-back-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2BE3FF;
  transition: opacity 0.2s;
}

.exercise-back-link:hover {
  opacity: 0.8;
}

.exercise-top-bar-divider {
  width: 1px;
  height: 24px;
  background-color: #17222E;
}

.exercise-top-bar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #7B93A8;
}

.exercise-top-bar-label {
  color: #93ACBF;
  font-weight: 500;
}

.exercise-top-bar-current {
  color: #2BE3FF;
  font-weight: 700;
}

.exercise-top-bar-sep {
  color: #7B93A8;
}

.exercise-top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.exercise-timer {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #93ACBF;
  padding: 0.35rem 0.75rem;
  background-color: #0A0F16;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
}

.exercise-timer .material-symbols-outlined {
  font-size: 1rem;
}

.exercise-hint-btn,
.exercise-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #1E3A47;
  background-color: #0E131B;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #93ACBF;
  transition: background-color 0.2s, color 0.2s;
}

.exercise-hint-btn:hover,
.exercise-settings-btn:hover {
  background-color: #0F2430;
  color: #2BE3FF;
}

/* Workspace: 3 Columns */
.exercise-workspace {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  flex: 1;
  overflow: hidden;
}

/* Instructions Panel */
.exercise-instructions-panel {
  background-color: #0E131B;
  border-right: 2px solid #1E3A47;
  display: flex;
  flex-direction: column;
}

.exercise-instructions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 2px solid #1E3A47;
  background-color: #0A0F16;
}

.exercise-instructions-title {
  font-size: 1rem;
  font-weight: 700;
}

.exercise-instructions-difficulty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #3DFFA0;
}

.exercise-instructions-difficulty .material-symbols-outlined {
  font-size: 0.9rem;
}

.exercise-instructions-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.exercise-instructions-question h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 0.5rem;
}

.exercise-instructions-question p {
  font-size: 0.85rem;
  color: #93ACBF;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.exercise-instructions-details h4,
.exercise-instructions-example h4,
.exercise-instructions-hints h4,
.exercise-test-cases h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 0.5rem;
}

.exercise-instructions-details ul,
.exercise-instructions-hints ul {
  list-style: none;
  margin-bottom: 1.25rem;
}

.exercise-instructions-details li,
.exercise-instructions-hints li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: #93ACBF;
  line-height: 1.5;
}

.exercise-instructions-details li::before {
  content: '•';
  position: absolute;
  left: 0.35rem;
  color: #2BE3FF;
  font-weight: 700;
}

.exercise-code-inline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  background-color: #121A24;
  padding: 0.1rem 0.3rem;
  border: 1px solid #1E3A47;
  border-radius: 0.2rem;
  color: #FF5C7A;
}

.exercise-code-block {
  background-color: #05070A;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 1rem;
  border-radius: 0.375rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.exercise-code-comment {
  color: #7B93A8;
  font-style: italic;
}

/* Hints (collapsible) */
.exercise-instructions-hints {
  margin-bottom: 1.25rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.exercise-instructions-hints.exercise-hints-visible {
  opacity: 1;
  pointer-events: auto;
}

.exercise-instructions-hints h4 .material-symbols-outlined {
  font-size: 1.1rem;
  vertical-align: middle;
  color: #A3FF12;
}

/* Test Cases */
.exercise-test-cases {
  background-color: #0A0F16;
  border: 1px solid #1E3A47;
  border-radius: 0.5rem;
  padding: 1rem;
}

.exercise-test-case-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #1E3A47;
}

.exercise-test-case-item:last-child {
  border-bottom: none;
}

.exercise-test-case-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #93ACBF;
}

.exercise-test-case-header .material-symbols-outlined {
  font-size: 1rem;
}

.exercise-test-case-header .material-symbols-outlined:first-child {
  color: #3DFFA0;
}

.exercise-test-case-result {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.exercise-test-pass {
  background-color: #0C2A1C;
  color: #2FD98A;
}

.exercise-test-fail {
  background-color: #2A0F18;
  color: #FF6B85;
}

.exercise-test-pending {
  background-color: #1A2408;
  color: #8FD32B;
}

/* Code Editor Panel */
.exercise-editor-panel {
  display: flex;
  flex-direction: column;
  background-color: #05070A;
}

.exercise-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #05070A;
  border-bottom: 1px solid #1E3A47;
}

.exercise-editor-tabs {
  display: flex;
  gap: 0.25rem;
}

.exercise-editor-tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.2s, color 0.2s;
}

.exercise-editor-tab .material-symbols-outlined {
  font-size: 0.9rem;
}

.exercise-editor-tab:hover {
  background-color: #0F151D;
  color: #DCEBF7;
}

.exercise-editor-tab-active {
  background-color: #0F151D;
  color: #DCEBF7;
}

.exercise-editor-actions {
  display: flex;
  gap: 0.25rem;
}

.exercise-editor-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: #7B93A8;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.2s, color 0.2s;
}

.exercise-editor-action-btn:hover {
  background-color: #0F151D;
  color: #DCEBF7;
}

.exercise-code-editor {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.exercise-editor-gutter {
  width: 48px;
  flex-shrink: 0;
  padding: 0.75rem 0;
  text-align: right;
  padding-right: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #7B93A8;
  background-color: #05070A;
  border-right: 1px solid #1E3A47;
  user-select: none;
}

.exercise-editor-textarea {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #DCEBF7;
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.exercise-editor-textarea::placeholder {
  color: #7B93A8;
}

/* Console Panel */
.exercise-console-panel {
  background-color: #05070A;
  border-left: 2px solid #1E3A47;
  display: flex;
  flex-direction: column;
}

.exercise-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1B2A36;
}

.exercise-console-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7B93A8;
}

.exercise-console-actions {
  display: flex;
  gap: 0.25rem;
}

.exercise-console-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  color: #7B93A8;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.exercise-console-action-btn:hover {
  color: #DCEBF7;
}

.exercise-console-output {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
}

.exercise-console-line {
  color: #7B93A8;
  word-break: break-all;
}

.exercise-console-empty-line {
  height: 0.5rem;
}

.exercise-console-prefix {
  color: #7B93A8;
  margin-right: 0.5rem;
  font-weight: 600;
}

.exercise-console-info .exercise-console-prefix {
  color: #4FE9FF;
}

.exercise-console-stdout .exercise-console-prefix {
  color: #5E7488;
}

.exercise-console-result .exercise-console-prefix {
  color: #3DFFA0;
}

.exercise-console-success {
  color: #3DFFA0;
}

.exercise-console-error {
  color: #FF5C7A;
}

.exercise-console-waiting {
  color: #A3FF12;
}

/* Console Actions Bar */
.exercise-console-actions-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #1B2A36;
  background-color: #05070A;
}

.exercise-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border: 2px solid;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s;
  flex: 1;
}

.exercise-btn:active:not(:disabled) {
  transform: translate(1px, 1px);
}

.exercise-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.exercise-btn .material-symbols-outlined {
  font-size: 1rem;
}

.exercise-btn-run {
  background-color: #0E7A4E;
  color: #E8F6FF;
  border-color: #1FBF74;
  box-shadow: 2px 2px 0px rgba(61,255,160,0.25);
}

.exercise-btn-run:active:not(:disabled) {
  box-shadow: 1px 1px 0px rgba(61,255,160,0.25);
}

.exercise-btn-submit {
  background-color: #0F8CA8;
  color: #E8F6FF;
  border-color: #137E96;
  box-shadow: 2px 2px 0px rgba(0,229,255,0.22);
}

.exercise-btn-submit:active:not(:disabled) {
  box-shadow: 1px 1px 0px rgba(0,229,255,0.22);
}

/* Status Bar */
.exercise-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 2rem;
  background-color: #05070A;
  border-top: 1px solid #1E3A47;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

.exercise-status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #7B93A8;
}

.exercise-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.exercise-status-idle {
  background-color: #0E141D;
}

.exercise-status-running {
  background-color: #3C5A05;
  animation: pulse 1s infinite;
}

.exercise-status-success {
  background-color: #0E7A4E;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.exercise-status-text {
  color: #DCEBF7;
}

.exercise-status-right {
  display: flex;
  gap: 1.25rem;
  color: #7B93A8;
}

.exercise-status-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.exercise-status-item .material-symbols-outlined {
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .lesson-details-layout {
    grid-template-columns: 1fr;
  }

  .exercise-workspace {
    grid-template-columns: 300px 1fr;
  }

  .exercise-console-panel {
    display: none;
  }
}

@media (max-width: 1024px) {
  .lesson-details-header-card {
    flex-direction: column;
    text-align: center;
  }

  .lesson-details-header-meta {
    justify-content: center;
  }

  .exercise-workspace {
    grid-template-columns: 1fr;
  }

  .exercise-instructions-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .lesson-details-learning-goals ul {
    grid-template-columns: 1fr;
  }

  .lesson-details-header-meta {
    flex-direction: column;
    align-items: center;
  }

  .exercise-top-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .exercise-top-bar-left {
    flex-wrap: wrap;
  }

  .exercise-status-bar {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 1rem;
  }
}

/* ================================
       CODING EXERCISE PAGE (REDESIGN)
       ================================ */

.coding-exercise-body {
  background-color: #121A24;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.coding-exercise-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background-color: #0E131B;
  border-bottom: 2px solid #1E3A47;
  gap: 1rem;
  flex-wrap: wrap;
}

.exercise-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exercise-back-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2BE3FF;
  padding: 0.35rem 0.75rem;
  border: 2px solid #1B9FBF;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.exercise-back-btn:hover {
  background-color: #0F2430;
}

.exercise-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
}

.exercise-breadcrumb a {
  color: #2BE3FF;
  font-weight: 600;
}

.exercise-breadcrumb a:hover {
  text-decoration: underline;
}

.exercise-header-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8F6FF;
}

.exercise-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.exercise-xp-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #8FD32B;
  background-color: #1A2408;
  border: 1px solid #A3FF12;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
}

.exercise-run-btn,
.exercise-check-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.exercise-run-btn {
  background-color: #0E7A4E;
  color: #E8F6FF;
  box-shadow: 2px 2px 0px rgba(61,255,160,0.25);
}

.exercise-run-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(61,255,160,0.25);
}

.exercise-check-btn {
  background-color: #0F8CA8;
  color: #E8F6FF;
  box-shadow: 2px 2px 0px rgba(0,229,255,0.22);
}

.exercise-check-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,229,255,0.22);
}

/* Workspace */
.exercise-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  flex: 1;
  overflow: hidden;
  min-height: calc(100vh - 120px);
}

/* Problem Panel */
.exercise-problem-panel {
  background-color: #0E131B;
  border-right: 2px solid #1E3A47;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exercise-tag-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #2BE3FF;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.exercise-problem-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1.2;
}

.exercise-badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.exercise-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exercise-badge-primary {
  background-color: #12303D;
  color: #2BE3FF;
  border-color: #1B9FBF;
}

.exercise-badge-accent {
  background-color: #0F2430;
  color: #2BE3FF;
  border-color: #1B9FBF;
}

.exercise-badge-success {
  background-color: #0C2A1C;
  color: #2FD98A;
  border-color: #1FBF74;
}

/* An exercise whose XP has already been banked reads as done, not winnable. */
.exercise-badge-muted {
  background-color: #16232B;
  color: #8FA7B8;
  border-color: #3A4E5C;
}

.exercise-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7B93A8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.exercise-problem-description {
  font-size: 0.85rem;
  color: #93ACBF;
  line-height: 1.6;
}

.exercise-goal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.exercise-goal-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #93ACBF;
  line-height: 1.4;
}

.exercise-goal-list li .material-symbols-outlined {
  font-size: 1rem;
  color: #3DFFA0;
}

.exercise-example-box {
  background-color: #0A0F16;
  border: 1px solid #1E3A47;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #A9C0D2;
  white-space: pre-wrap;
}

.exercise-example-arrow {
  display: block;
  color: #5E7488;
  font-size: 0.65rem;
  margin: 0.5rem 0;
  font-weight: 600;
}

.exercise-expected-box {
  background-color: #05070A;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Test Chips */
.exercise-test-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.exercise-test-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #93ACBF;
  background-color: #0A0F16;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
}

.exercise-test-chip .material-symbols-outlined {
  font-size: 0.9rem;
  color: #2BE3FF;
}

/* IDE Panel */
.exercise-ide-panel {
  display: flex;
  flex-direction: column;
  background-color: #05070A;
  min-height: 0;
}

.exercise-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #05070A;
  border-bottom: 1px solid #1E3A47;
}

.exercise-file-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #DCEBF7;
  background-color: #0F151D;
  padding: 0.3rem 0.75rem;
  border-radius: 0.25rem;
}

.exercise-file-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0C2A1C;
}

.exercise-editor-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.exercise-lang-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: #7FF0B4;
  background-color: #05070A;
  border: 1px solid #22323F;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

.exercise-reset-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #7B93A8;
  background: none;
  border: 1px solid #22323F;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.exercise-reset-btn:hover {
  color: #DCEBF7;
  border-color: #1E3A47;
}

.exercise-editor-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.exercise-editor-gutter {
  width: 48px;
  flex-shrink: 0;
  padding: 0.75rem 0;
  text-align: right;
  padding-right: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #7B93A8;
  background-color: #05070A;
  border-right: 1px solid #1E3A47;
  user-select: none;
  overflow: hidden;
  white-space: pre;
}

.exercise-editor-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #DCEBF7;
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* Console */
.exercise-console {
  flex-shrink: 0;
  border-top: 1px solid #1E3A47;
  background-color: #05070A;
  display: flex;
  flex-direction: column;
  max-height: 200px;
}

.exercise-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #1B2A36;
}

.exercise-console-tabs {
  display: flex;
  gap: 0.25rem;
}

.exercise-console-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: #7B93A8;
  background: none;
  border: none;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
}

.exercise-console-tab:hover {
  color: #DCEBF7;
  background-color: #0F151D;
}

.exercise-console-tab-active {
  color: #DCEBF7;
  background-color: #0F151D;
}

.exercise-console-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: #7B93A8;
}

.exercise-console-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #7B93A8;
}

.exercise-console-placeholder {
  color: #7B93A8;
  font-style: italic;
}

.exercise-console-cmd {
  color: #7FF0B4;
}

.exercise-console-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background-color: #0F151D;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ================================
       LESSON DETAILS PAGE (REDESIGN)
       ================================ */

.lesson-details-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2BE3FF;
  transition: opacity 0.2s;
}

.lesson-details-back:hover {
  opacity: 0.8;
}

.lesson-details-hero {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.lesson-details-hero-left {
  flex: 1;
}

.lesson-details-title {
  font-size: 2rem;
  font-weight: 800;
  color: #E8F6FF;
  margin-bottom: 0.5rem;
}

.lesson-details-subtitle {
  font-size: 0.9rem;
  color: #93ACBF;
  line-height: 1.5;
  margin-bottom: 1rem;
  max-width: 600px;
}

.lesson-details-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lesson-details-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  border: 1px solid #1E3A47;
  background-color: #0E131B;
  color: #93ACBF;
}

.lesson-details-badge-primary {
  background-color: #12303D;
  color: #2BE3FF;
  border-color: #1B9FBF;
}

.lesson-details-badge-accent {
  background-color: #0F2430;
  color: #2BE3FF;
  border-color: #1B9FBF;
}

.lesson-details-badge-success {
  background-color: #0C2A1C;
  color: #2FD98A;
  border-color: #1FBF74;
}

.lesson-details-start-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.lesson-details-start-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.lesson-details-card {
  padding: 1.5rem;
}

.lesson-details-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 1rem;
}

.lesson-details-card h3 .material-symbols-outlined {
  color: #2BE3FF;
  font-size: 1.3rem;
}

.lesson-details-objectives {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lesson-details-objectives li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #93ACBF;
  line-height: 1.5;
}

.lesson-details-objectives li .material-symbols-outlined {
  font-size: 1.1rem;
  color: #3DFFA0;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.lesson-details-explanation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lesson-details-explanation p {
  font-size: 0.85rem;
  color: #93ACBF;
  line-height: 1.7;
}

.lesson-details-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #1E3A47;
}

.lesson-details-info-row:last-of-type {
  border-bottom: none;
}

.lesson-details-info-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #7B93A8;
}

.lesson-details-info-label .material-symbols-outlined {
  font-size: 0.9rem;
  color: #2BE3FF;
}

.lesson-details-info-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #E8F6FF;
}

.lesson-details-info-progress {
  width: 100%;
  height: 8px;
  background-color: #0F2430;
  border: 1px solid #1E3A47;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.lesson-details-info-progress-fill {
  height: 100%;
  background-color: #0F8CA8;
  border-radius: 4px;
  transition: width 1s ease;
}

/* Code Examples Section */
.lesson-details-examples-section {
  margin-top: 1rem;
}

.lesson-details-examples-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-bottom: 1rem;
}

.lesson-code-example {
  margin-bottom: 1.5rem;
}

.lesson-code-example-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2BE3FF;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.lesson-code-window {
  background-color: #05070A;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
}

.lesson-code-window-header {
  background-color: #0A0E14;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 1px solid #1E3A47;
}

.lesson-code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.lesson-code-dot-red {
  background-color: #7A1A2E;
}

.lesson-code-dot-yellow {
  background-color: #3C5A05;
}

.lesson-code-dot-green {
  background-color: #12A0BD;
}

.lesson-code-window-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #5E7488;
  margin-left: 0.5rem;
}

.lesson-code-window pre {
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #7B93A8;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.lesson-code-keyword {
  color: #FF7AD9;
  font-weight: 600;
}

.lesson-code-fn {
  color: #6DECFF;
}

.lesson-code-string {
  color: #A3FF12;
}

.lesson-code-number {
  color: #D8FF4D;
}

.lesson-code-comment {
  color: #7B93A8;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
  .exercise-workspace {
    grid-template-columns: 1fr;
  }

  .exercise-problem-panel {
    border-right: none;
    border-bottom: 2px solid #1E3A47;
    max-height: 50vh;
  }

  .lesson-details-hero {
    flex-direction: column;
    text-align: center;
  }

  .lesson-details-hero .lesson-details-subtitle {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .exercise-header {
    flex-direction: column;
    align-items: stretch;
  }

  .exercise-header-left {
    flex-wrap: wrap;
  }

  .exercise-header-right {
    justify-content: stretch;
  }

  .exercise-run-btn,
  .exercise-check-btn {
    flex: 1;
    justify-content: center;
  }

  .exercise-header-title {
    font-size: 0.8rem;
  }

  .lesson-details-hero-left {
    text-align: center;
  }

  .lesson-details-badges {
    justify-content: center;
  }

  .lesson-details-start-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Manage User */

:root {
  --admin-brand-blue: #2BE3FF;
  --admin-brand-lightblue: #12303D;
  --admin-brand-darkblue: #19B8D6;
  --admin-brand-text: #A9C0D2;
  --admin-brand-muted: #7B93A8;
  --admin-brand-border: #1E3A47;
  --admin-brand-bg: #0A0F16;
  --admin-status-active: #3DFFA0;
  --admin-status-inactive: #7B93A8;
  --admin-status-banned: #FF5C7A;
}

.admin-body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--admin-brand-text);
  background-color: var(--admin-brand-bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-body button,
.admin-body input,
.admin-body select,
.admin-body td,
.admin-body th {
  font-family: 'JetBrains Mono', monospace;
}

.admin-body * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.admin-body a {
  color: inherit;
  text-decoration: none;
}

.admin-body button,
.admin-body input,
.admin-body select {
  font-family: inherit;
  font-size: inherit;
}

.admin-body button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Utility Classes for Neobrutalism */
.admin-neobrutal-shadow {
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60);
  border: 2px solid #1E3A47;
}

.admin-neobrutal-shadow-sm {
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  border: 2px solid #1E3A47;
}

/* Header Styles */
.admin-header {
  background-color: #0E131B;
  border-bottom: 2px solid #1E3A47;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--admin-brand-blue);
  letter-spacing: -0.025em;
}

.admin-header-logo .admin-badge {
  font-size: 0.65rem;
  background: #2A0F18;
  color: #FF6B85;
  padding: 0.15rem 0.4rem;
  border: 1px solid #B32444;
  font-weight: 700;
}

.admin-header-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--admin-brand-blue);
  margin-left: 1rem;
  border-left: 2px solid #243040;
  padding-left: 1.5rem;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-search-wrapper {
  position: relative;
  width: 20rem;
}

.admin-search-icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  pointer-events: none;
  color: #5E7488;
}

.admin-search-input {
  background-color: #0A0F16;
  border: 1px solid #243040;
  color: #E8F6FF;
  font-size: 0.875rem;
  display: block;
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 2.5rem;
  border-radius: 0;
}

.admin-search-input:focus {
  outline: 2px solid var(--admin-brand-blue);
  border-color: var(--admin-brand-blue);
}

.admin-bell-btn {
  color: #93ACBF;
  font-size: 1.25rem;
}

.admin-bell-btn:hover {
  color: #E8F6FF;
}

/* App Container Layout */
.admin-app-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Styles */
.admin-sidebar {
  width: 16rem;
  background-color: var(--admin-brand-bg);
  border-right: 2px solid #1E3A47;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.admin-user-profile-badge {
  padding: 1rem;
  border-bottom: 1px solid #1E3A47;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-avatar-placeholder {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #101823;
  color: #E8F6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
}

.admin-user-info-name {
  font-weight: bold;
  font-size: 0.75rem;
}

.admin-user-info-version {
  font-size: 10px;
  color: #7B93A8;
}

.admin-nav-menu {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #93ACBF;
  font-weight: bold;
}

.admin-nav-item:hover {
  background-color: #121A24;
}

.admin-nav-item.admin-active {
  background-color: var(--admin-brand-blue);
  color: #E8F6FF;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.admin-nav-icon {
  width: 1.25rem;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #1E3A47;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-footer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  color: #93ACBF;
  font-weight: bold;
  font-size: 0.75rem;
}

.admin-footer-link:hover {
  color: #E8F6FF;
}

.admin-support-btn {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--admin-brand-lightblue);
  color: var(--admin-brand-blue);
  font-weight: bold;
  border: 1px solid var(--admin-brand-blue);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.admin-support-btn:hover {
  background-color: #12303D;
}

/* Main Content Area */
.admin-main-content {
  flex: 1;
  background-color: #0E131B;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Filters & Actions Header */
.admin-filters-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.admin-filter-group {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.admin-filter-label {
  display: block;
  font-size: 0.65rem;
  font-weight: bold;
  color: #7B93A8;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-filter-select,
.admin-filter-input {
  background-color: #0A0F16;
  border: 2px solid #1E3A47;
  color: #E8F6FF;
  font-size: 0.75rem;
  padding: 0.5rem;
  display: block;
}

.admin-filter-input {
  width: 8rem;
}

.admin-btn-reset {
  padding: 0.5rem 1rem;
  border: 1px solid #243040;
  background-color: #0E131B;
  color: #A9C0D2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.admin-btn-reset:hover {
  background-color: #0A0F16;
}

.admin-btn-add-user {
  background-color: #0F8CA8;
  color: #E8F6FF;
  padding: 0.5rem 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  letter-spacing: 0.03em;
}

.admin-btn-add-user:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Tabs */
.admin-tabs-container {
  display: flex;
  margin-bottom: 1rem;
  border-bottom: 1px solid #1E3A47;
}

.admin-tab-btn {
  padding: 0.5rem 1.5rem;
  font-weight: bold;
}

.admin-tab-btn.admin-active {
  background-color: var(--admin-brand-blue);
  color: #E8F6FF;
  border-top: 1px solid #1E3A47;
  border-left: 1px solid #1E3A47;
  border-right: 1px solid #1E3A47;
  margin-bottom: -1px;
  position: relative;
  z-index: 10;
}

.admin-tab-btn.admin-inactive {
  background-color: #0E131B;
  color: #93ACBF;
  border-top: 1px solid #1E3A47;
  border-right: 1px solid #1E3A47;
}

.admin-tab-btn.admin-inactive:hover {
  background-color: #0A0F16;
}

/* Data Table */
.admin-table-wrapper {
  background-color: #0E131B;
  margin-bottom: 2rem;
  border: 2px solid #1E3A47;
}

.admin-data-table {
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.admin-data-table th {
  font-size: 0.75rem;
  color: #A9C0D2;
  text-transform: uppercase;
  background-color: #131C26;
  border-bottom: 1px solid #1E3A47;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  border-right: 1px solid #1E3A47;
}

.admin-data-table th:last-child {
  border-right: none;
  text-align: center;
  width: 8rem;
}

.admin-data-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #1E3A47;
  border-right: 1px solid #1E3A47;
}

.admin-data-table td:last-child {
  border-right: none;
  text-align: center;
}

.admin-data-table tr:hover {
  background-color: #0A0F16;
}

/* Table Content Formatting */
.admin-profile-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user-avatar-initials {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 1px solid;
}

.admin-avatar-blue {
  background-color: #12303D;
  color: #19B8D6;
  border-color: #2BB9D6;
}

.admin-avatar-gray {
  background-color: #131C26;
  color: #CFE4F2;
  border-color: #22323F;
}

.admin-avatar-orange {
  background-color: #12303D;
  color: #8FD32B;
  border-color: #8FE83A;
}

.admin-avatar-red {
  background-color: #2A0F18;
  color: #FF6B85;
  border-color: #B32444;
}

.admin-user-name {
  font-weight: bold;
  color: #E8F6FF;
}

.admin-user-email {
  font-size: 0.75rem;
  color: #7B93A8;
}

.admin-badge-role {
  font-size: 10px;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border: 1px solid;
  text-transform: uppercase;
  display: inline-block;
}

.admin-role-admin {
  background-color: #131C26;
  color: #CFE4F2;
  border-color: #22323F;
}

.admin-role-dev {
  background-color: #121A24;
  color: #93ACBF;
  border-color: #243040;
}

.admin-role-student {
  background-color: #0E131B;
  color: #93ACBF;
  border-color: #243040;
}

.admin-role-guest {
  background-color: #0A0F16;
  color: #2BE3FF;
  border-color: #2BB9D6;
}

.admin-activity-cell {
  font-size: 0.75rem;
}

.admin-activity-reg {
  font-weight: bold;
  color: var(--admin-brand-blue);
}

.admin-activity-log {
  font-weight: bold;
  color: #7B93A8;
}

.admin-status-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 0.75rem;
}

.admin-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.admin-dot-active {
  background-color: #0F8CA8;
}

.admin-dot-inactive {
  background-color: #131B25;
}

.admin-dot-banned {
  background-color: #7A1A2E;
}

.admin-text-banned {
  color: #FF5C7A;
}

.admin-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #93ACBF;
}

.admin-action-buttons button:hover {
  color: #E8F6FF;
}

/* Pagination */
.admin-pagination-container {
  background-color: #0E131B;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #1E3A47;
}

.admin-pagination-info {
  font-size: 0.75rem;
  color: #93ACBF;
  font-weight: bold;
}

.admin-pagination-info span {
  color: #E8F6FF;
}

.admin-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-pg-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #243040;
  background-color: #0E131B;
  color: #A9C0D2;
  font-weight: bold;
}

.admin-pg-btn:hover {
  background-color: #0A0F16;
}

.admin-pg-btn.admin-active {
  border-color: var(--admin-brand-blue);
  background-color: var(--admin-brand-blue);
  color: #E8F6FF;
}

.admin-pg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-pg-btn-wide {
  width: 3rem;
}

/* Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.admin-stat-card {
  background-color: #0E131B;
  padding: 1.5rem;
  border: 2px solid #1E3A47;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.admin-stat-badge {
  font-size: 10px;
  font-weight: bold;
  padding: 0.125rem 0.5rem;
  text-transform: uppercase;
}

.admin-badge-total {
  background-color: #12303D;
  color: #19B8D6;
}

.admin-badge-active {
  background-color: #12303D;
  color: #8FD32B;
}

.admin-badge-banned {
  background-color: #2A0F18;
  color: #FF6B85;
}

.admin-stat-value {
  font-size: 2.25rem;
  font-weight: bold;
  color: #E8F6FF;
  margin-bottom: 0.25rem;
}

.admin-stat-subtext {
  font-size: 10px;
  color: #5E7488;
  font-weight: bold;
  text-transform: uppercase;
}

.admin-progress-bar-bg {
  width: 100%;
  background-color: #131C26;
  height: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid #243040;
}

.admin-progress-bar-fill {
  background-color: #12A0BD;
  height: 100%;
  width: 75%;
}

.admin-report-card {
  background-color: var(--admin-brand-blue);
  padding: 1.5rem;
  border: 2px solid #1E3A47;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #E8F6FF;
  cursor: pointer;
  transition: background-color 0.2s;
}

.admin-report-card:hover {
  background-color: #0B6C82;
}

.admin-report-card i {
  font-size: 1.875rem;
  margin-bottom: 1rem;
}

.admin-report-card span {
  font-weight: bold;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Footer */
.admin-footer {
  background-color: #0E131B;
  border-top: 2px solid #1E3A47;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.admin-footer-brand {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--admin-brand-blue);
  margin-bottom: 0.25rem;
}

.admin-footer-copyright {
  font-size: 0.75rem;
  color: #93ACBF;
  font-weight: bold;
}

.admin-footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  color: #93ACBF;
}

.admin-footer-links a:hover {
  color: #E8F6FF;
}

.admin-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-social-icon {
  width: 2rem;
  height: 2rem;
  border: 1px solid #22323F;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93ACBF;
}

.admin-social-icon:hover {
  color: #E8F6FF;
  border-color: #1E3A47;
}

/* Welcome Banner */
.admin-welcome-banner {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid #1E3A47;
  background: #0A0F16;
}

.admin-welcome-prefix {
  font-size: 0.7rem;
  color: #2BE3FF;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.admin-welcome-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #E8F6FF;
  margin-bottom: 0.25rem;
}

.admin-welcome-sub {
  font-size: 0.8rem;
  color: #7B93A8;
}

.admin-welcome-sub span {
  color: #2BE3FF;
  font-weight: 600;
}

/* Filter Button Style */
.admin-filter-btn-style {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.admin-filter-btn-style:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Add Button (Body Scoped) */
.admin-body .admin-btn-add {
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.6rem 1rem;
}

.admin-btn-add:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Content Badge */
.admin-content-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
  border: 1px solid;
  display: inline-block;
}

.admin-badge-syntax {
  background-color: #0A0F16;
  color: #19B8D6;
  border-color: #2BB9D6;
}

.admin-badge-logic {
  background-color: #0A0F16;
  color: #19B8D6;
  border-color: #2BB9D6;
}

.admin-badge-architecture {
  background-color: #131C26;
  color: #CFE4F2;
  border-color: #22323F;
}

/* Content Status */
.admin-status-active {
  color: #3DFFA0;
}

.admin-status-draft {
  color: #B6FF3D;
}

/* Content Action Button */
.admin-content-action-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #243040;
  background-color: #0E131B;
  color: #93ACBF;
  cursor: pointer;
}

.admin-content-action-btn:hover {
  color: #E8F6FF;
  border-color: #1E3A47;
}

/* Lesson Title Cell */
.admin-lesson-title-cell {
  font-weight: 700;
  color: #E8F6FF;
}

.admin-lesson-subtitle {
  font-size: 0.7rem;
  color: #7B93A8;
  margin-top: 0.15rem;
}

/* Lesson Track Badge */
.admin-badge-track {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
  border: 1px solid;
}

.admin-track-python {
  background-color: #0A0F16;
  color: #19B8D6;
  border-color: #2BB9D6;
}

.admin-track-javascript {
  background-color: #141C08;
  color: #8FD32B;
  border-color: #A3FF12;
}

.admin-track-webdev {
  background-color: #0A2018;
  color: #2FD98A;
  border-color: #1FBF74;
}

.admin-track-logic {
  background-color: #14101C;
  color: #C77DFF;
  border-color: #B14BFF;
}

.admin-track-data {
  background-color: #0F151D;
  color: #8FD32B;
  border-color: #8FE83A;
}

/* Lesson Difficulty Badge */
.admin-badge-difficulty {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
  border: 1px solid;
}

.admin-diff-beginner {
  background-color: #0A2018;
  color: #2FD98A;
  border-color: #1FBF74;
}

.admin-diff-intermediate {
  background-color: #141C08;
  color: #8FD32B;
  border-color: #A3FF12;
}

.admin-diff-advanced {
  background-color: #2A0F18;
  color: #FF6B85;
  border-color: #B32444;
}

/* Lesson Status Dot Variants */
.admin-dot-published {
  background-color: #0E7A4E;
}

.admin-dot-draft {
  background-color: #3C5A05;
}

.admin-dot-archived {
  background-color: #131B25;
}

.admin-text-published {
  color: #3DFFA0;
}

.admin-text-draft {
  color: #B6FF3D;
}

.admin-text-archived {
  color: #7B93A8;
}

/* =============================================
     INSTRUCTOR MODULE – Sprint 3 UI Styles
     ============================================= */

/* Quick Actions Grid on Dashboard */
.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.admin-quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  font-weight: 700;
  font-size: 0.75rem;
  color: #A9C0D2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.admin-quick-action-btn i {
  font-size: 1.5rem;
  color: #2BE3FF;
}

.admin-quick-action-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-quick-action-btn:hover {
  background-color: #0A0F16;
}

/* Recent Items List on Dashboard */
.admin-recent-list {
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  background-color: #0E131B;
  overflow: hidden;
}

.admin-recent-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1E3A47;
  background-color: #0A0F16;
}

.admin-recent-list-title {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #A9C0D2;
}

.admin-recent-list-count {
  font-size: 0.65rem;
  background-color: #0F8CA8;
  color: #E8F6FF;
  padding: 0.1rem 0.4rem;
  font-weight: 700;
}

.admin-recent-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1E3A47;
}

.admin-recent-item:last-child {
  border-bottom: none;
}

.admin-recent-item-avatar {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
  border: 1px solid;
}

.admin-recent-item-content {
  flex: 1;
  min-width: 0;
}

.admin-recent-item-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #E8F6FF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-recent-item-sub {
  font-size: 0.65rem;
  color: #7B93A8;
}

.admin-recent-item-meta {
  font-size: 0.6rem;
  color: #5E7488;
  font-weight: 600;
  flex-shrink: 0;
  text-align: right;
}

/* Dashboard 2-column layout */
.admin-dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* =============================================
     MODAL STYLES
     ============================================= */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.60);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid #1E3A47;
  background-color: #0A0F16;
}

.admin-modal-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-modal-close {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #7B93A8;
  font-size: 1rem;
  background: none;
  border: 1px solid #243040;
}

.admin-modal-close:hover {
  color: #E8F6FF;
  border-color: #1E3A47;
}

.admin-modal-body {
  padding: 1.5rem;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 2px solid #1E3A47;
  background-color: #0A0F16;
}

.admin-modal-confirm-text {
  font-size: 0.85rem;
  color: #A9C0D2;
  line-height: 1.5;
}

.admin-modal-confirm-icon {
  font-size: 2rem;
  color: #FF5C7A;
  margin-bottom: 1rem;
  text-align: center;
}

.admin-modal-confirm-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Modal buttons */
.admin-modal-btn-cancel {
  padding: 0.5rem 1.25rem;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  color: #A9C0D2;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-modal-btn-cancel:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-modal-btn-danger {
  padding: 0.5rem 1.25rem;
  border: 2px solid #1E3A47;
  background-color: #7A1A2E;
  color: #E8F6FF;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-modal-btn-danger:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-modal-btn-primary {
  padding: 0.5rem 1.25rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-modal-btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Wide modal variant */
.admin-modal.admin-modal-lg {
  max-width: 720px;
}

/* =============================================
     FORM STYLES (Add/Edit Lesson, Exercise, Remedial)
     ============================================= */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-form-group.full-width {
  grid-column: 1 / -1;
}

.admin-form-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7B93A8;
}

.admin-form-label .required {
  color: #FF5C7A;
}

.admin-form-input,
.admin-form-select,
.admin-form-textarea {
  background-color: #0A0F16;
  border: 2px solid #1E3A47;
  color: #E8F6FF;
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
  outline: none;
  width: 100%;
}

.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
  border-color: #1B9FBF;
  box-shadow: 0 0 0 2px rgba(43, 227, 255, 0.14);
}

.admin-form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: 'JetBrains Mono', monospace;
}

.admin-form-textarea.code-editor {
  min-height: 120px;
  background-color: #05070A;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
}

.admin-form-help {
  font-size: 0.6rem;
  color: #5E7488;
}

.admin-form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2BE3FF;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #1E3A47;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  grid-column: 1 / -1;
}

/* =============================================
     PROGRESS BAR COMPONENTS
     ============================================= */
.admin-progress-track {
  width: 100%;
  height: 10px;
  background-color: #131C26;
  border: 1px solid #243040;
  overflow: hidden;
}

.admin-progress-fill {
  height: 100%;
  transition: width 0.8s ease;
}

.admin-progress-fill.green {
  background-color: #0E7A4E;
}

.admin-progress-fill.blue {
  background-color: #0F8CA8;
}

.admin-progress-fill.orange {
  background-color: #12A0BD;
}

.admin-progress-fill.red {
  background-color: #7A1A2E;
}

.admin-progress-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #7B93A8;
  margin-top: 0.25rem;
}

.admin-progress-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-progress-inline .admin-progress-track {
  flex: 1;
}

.admin-progress-pct {
  font-weight: 700;
  font-size: 0.75rem;
  min-width: 2.5rem;
  text-align: right;
}

/* =============================================
     STATUS BADGE COMPONENTS
     ============================================= */
.admin-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.admin-badge-submitted {
  background-color: #12303D;
  color: #19B8D6;
  border-color: #2BB9D6;
}

.admin-badge-graded {
  background-color: #0A2018;
  color: #2FD98A;
  border-color: #1FBF74;
}

.admin-badge-pending {
  background-color: #141C08;
  color: #8FD32B;
  border-color: #A3FF12;
}

.admin-badge-overdue {
  background-color: #2A0F18;
  color: #FF6B85;
  border-color: #B32444;
}

.admin-badge-complete {
  background-color: #0A2018;
  color: #2FD98A;
  border-color: #1FBF74;
}

.admin-badge-incomplete {
  background-color: #2A0F18;
  color: #FF6B85;
  border-color: #B32444;
}

.admin-badge-assigned {
  background-color: #0A0F16;
  color: #19B8D6;
  border-color: #2BB9D6;
}

/* =============================================
     EMPTY / LOADING / ERROR / SUCCESS STATES
     ============================================= */
.admin-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 2px dashed #243040;
  background-color: #0A0F16;
}

.admin-empty-state i {
  font-size: 3rem;
  color: #7B93A8;
  margin-bottom: 1rem;
  display: block;
}

.admin-empty-state-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #A9C0D2;
  margin-bottom: 0.25rem;
}

.admin-empty-state-desc {
  font-size: 0.75rem;
  color: #5E7488;
}

.admin-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.admin-loading-spinner i {
  font-size: 2rem;
  color: #2BE3FF;
  animation: admin-spin 1s linear infinite;
}

@keyframes admin-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-success-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #1FBF74;
  background-color: #0A2018;
  color: #2FD98A;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-success-banner i {
  font-size: 1rem;
}

.admin-error-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #B32444;
  background-color: #2A0F18;
  color: #FF6B85;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-error-banner i {
  font-size: 1rem;
}

/* =============================================
     DETAIL / VIEW MODAL
     ============================================= */
.admin-detail-section {
  margin-bottom: 1rem;
}

.admin-detail-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2BE3FF;
  margin-bottom: 0.5rem;
}

.admin-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #1E3A47;
  font-size: 0.8rem;
}

.admin-detail-label {
  color: #7B93A8;
  font-weight: 600;
}

.admin-detail-value {
  color: #E8F6FF;
  font-weight: 700;
  text-align: right;
}

.admin-detail-code-block {
  background-color: #05070A;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  border: 2px solid #1E3A47;
  max-height: 250px;
  overflow-y: auto;
}

/* =============================================
     STUDENT PROGRESS CARD
     ============================================= */
.admin-progress-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.admin-progress-card {
  border: 2px solid #1E3A47;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
  background-color: #0E131B;
  overflow: hidden;
}

.admin-progress-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #1E3A47;
}

.admin-progress-card-avatar {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  border: 1px solid;
}

.admin-progress-card-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-progress-card-course {
  font-size: 0.65rem;
  color: #7B93A8;
}

.admin-progress-card-body {
  padding: 1rem;
}

.admin-progress-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.admin-progress-card-stat {
  font-size: 0.65rem;
  color: #7B93A8;
}

.admin-progress-card-stat strong {
  display: block;
  font-size: 0.85rem;
  color: #E8F6FF;
}

.admin-progress-card-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid #1E3A47;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: #5E7488;
}

.admin-view-detail-link {
  color: #2BE3FF;
  font-weight: 700;
  font-size: 0.65rem;
  cursor: pointer;
  background: none;
  border: none;
}

.admin-view-detail-link:hover {
  text-decoration: underline;
}

/* =============================================
     RESPONSIVE: ADMIN LAYOUT
     ============================================= */
@media (max-width: 1024px) {
  .admin-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-dashboard-two-col {
    grid-template-columns: 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-progress-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main-content {
    padding: 1rem;
  }

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

  .admin-filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .admin-filter-group {
    flex-wrap: wrap;
  }

  .admin-quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-table-wrapper {
    overflow-x: auto;
  }

  .admin-data-table {
    min-width: 600px;
  }

  .admin-modal {
    max-width: 95%;
    margin: 0 1rem;
  }

  .admin-progress-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    padding: 0.75rem 1rem;
  }

  .admin-header-title {
    display: none;
  }

  .admin-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
  }

  .admin-footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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

  .admin-pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* =============================================
   ADMIN BUTTON FIXES
   ============================================= */
.admin-btn-add-user,
button.admin-btn-add-user,
.admin-filters-container .admin-btn-add-user {
  background-color: #0F8CA8 !important;
  color: #E8F6FF !important;
  padding: 0.6rem 1.5rem !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  border: 2px solid #1E3A47 !important;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.60) !important;
  letter-spacing: 0.05em !important;
  cursor: pointer !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
}

.admin-btn-add-user *,
button.admin-btn-add-user *,
.admin-btn-add-user span,
button.admin-btn-add-user span,
.admin-btn-add-user i,
button.admin-btn-add-user i {
  color: #E8F6FF !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: inline !important;
  font-weight: 800 !important;
}

.admin-btn-add-user:hover,
button.admin-btn-add-user:hover {
  background-color: #0B6C82 !important;
  color: #E8F6FF !important;
}

.admin-btn-add-user:active,
button.admin-btn-add-user:active {
  transform: translate(2px, 2px) !important;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60) !important;
}

/* =============================================
   MODAL BUTTON VISIBILITY FIX
   ---------------------------------------------------------------
   `.admin-body button { background:none; border:none; }` has a
   higher specificity (0,1,1) than `.admin-modal-btn-*` (0,1,0),
   so it was stripping the background/border from every modal
   button. The result: the "Save Lesson" / "Delete" buttons were
   white text on a light footer => invisible.
   The scoped selectors below (0,2,0) restore them.
   ============================================= */
.admin-body .admin-modal-close {
  background-color: #0E131B;
  border: 1px solid #243040;
  color: #7B93A8;
}

.admin-body .admin-modal-close:hover {
  background-color: #121A24;
  border-color: #1E3A47;
  color: #E8F6FF;
}

.admin-body .admin-modal-btn-cancel {
  background-color: #0E131B;
  color: #A9C0D2;
  border: 2px solid #1E3A47;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-cancel:hover {
  background-color: #121A24;
}

.admin-body .admin-modal-btn-cancel:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-danger {
  background-color: #7A1A2E;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-danger:hover {
  background-color: #7A1A2E;
}

.admin-body .admin-modal-btn-danger:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-danger:disabled {
  background-color: #2A0F18;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-primary {
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-primary:hover {
  background-color: #0B6C82;
}

.admin-body .admin-modal-btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-modal-btn-primary:disabled {
  background-color: #12A0BD;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
}

/* Same override also flattened these page-level buttons (they lost their
   background + border and looked like plain text). */
.admin-body .admin-btn-reset {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  color: #A9C0D2;
  cursor: pointer;
}

.admin-body .admin-btn-reset:hover {
  background-color: #121A24;
}

.admin-body .admin-support-btn {
  background-color: var(--admin-brand-lightblue);
  border: 2px solid var(--admin-brand-blue);
  color: var(--admin-brand-blue);
  cursor: pointer;
}

.admin-body .admin-support-btn:hover {
  background-color: #12303D;
}

/* =============================================
   SCROLLABLE MODAL (keeps footer buttons on screen)
   ---------------------------------------------------------------
   The Add/Edit Lesson form is taller than the viewport on many
   laptops. Previously the whole modal scrolled, pushing the
   "Save Lesson" button below the fold. Now the body scrolls and
   the header/footer stay pinned.
   ============================================= */
.admin-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-modal-header,
.admin-modal-footer {
  flex: 0 0 auto;
}

.admin-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* =============================================
   NOTEPAD / RICH-TEXT LESSON EDITOR
   ============================================= */
.admin-editor {
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  display: flex;
  flex-direction: column;
}

.admin-body .admin-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  background-color: #131C26;
  border-bottom: 2px solid #1E3A47;
}

.admin-body .admin-editor-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.6rem;
  border: 2px solid #1E3A47;
  background-color: #0E131B;
  color: #E8F6FF;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  transition: background-color 0.12s ease, color 0.12s ease,
              transform 0.08s ease, box-shadow 0.08s ease;
}

.admin-body .admin-editor-toolbar button i {
  font-size: 0.85rem;
}

.admin-body .admin-editor-toolbar button:hover {
  background-color: #0C121A;
  color: #2BE3FF;
}

.admin-body .admin-editor-toolbar button:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px rgba(0,0,0,0.60);
}

.admin-body .admin-editor-toolbar button.is-active {
  background-color: #0F8CA8;
  color: #E8F6FF;
}

.admin-editor-sep {
  width: 2px;
  height: 1.8rem;
  background-color: #131B25;
  margin: 0 0.15rem;
  flex: 0 0 auto;
}

.admin-editor-surface {
  min-height: 260px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 1.15rem 1.3rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #E8F6FF;
  background-color: #0E131B;
  outline: none;
  word-wrap: break-word;
}

.admin-editor-surface.is-empty::before {
  content: attr(data-placeholder);
  color: #5E7488;
  pointer-events: none;
}

.admin-editor-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(43, 227, 255, 0.16);
}

.admin-editor-surface h2 {
  font-size: 1.4rem;
  margin: 0.85rem 0 0.45rem;
}

.admin-editor-surface h3 {
  font-size: 1.15rem;
  margin: 0.7rem 0 0.4rem;
}

.admin-editor-surface p {
  margin: 0.5rem 0;
}

.admin-editor-surface ul,
.admin-editor-surface ol {
  margin: 0.5rem 0 0.5rem 1.6rem;
}

.admin-editor-surface li {
  margin: 0.2rem 0;
}

.admin-editor-surface pre {
  background-color: #05070A;
  color: #7B93A8;
  padding: 0.8rem 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0.6rem 0;
  white-space: pre-wrap;
}

.admin-editor-surface code {
  font-family: 'JetBrains Mono', monospace;
  background-color: #0C121A;
  color: #2BE3FF;
  padding: 0.08rem 0.35rem;
  font-size: 0.9rem;
}

.admin-editor-surface blockquote {
  border-left: 3px solid #1B9FBF;
  padding-left: 0.8rem;
  color: #93ACBF;
  margin: 0.6rem 0;
}

.admin-editor-surface a {
  color: #2BE3FF;
  text-decoration: underline;
}

.admin-editor-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-top: 2px solid #1E3A47;
  background-color: #0A0F16;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7B93A8;
}

/* Read-only preview body (lesson preview modal) */
.admin-lesson-preview {
  font-size: 1rem;
  line-height: 1.75;
  color: #E8F6FF;
  word-wrap: break-word;
}

.admin-lesson-preview h2 {
  font-size: 1.4rem;
  margin: 0.85rem 0 0.45rem;
}

.admin-lesson-preview h3 {
  font-size: 1.15rem;
  margin: 0.7rem 0 0.4rem;
}

.admin-lesson-preview p {
  margin: 0.5rem 0;
}

.admin-lesson-preview ul,
.admin-lesson-preview ol {
  margin: 0.5rem 0 0.5rem 1.6rem;
}

.admin-lesson-preview pre {
  background-color: #05070A;
  color: #7B93A8;
  padding: 0.8rem 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0.6rem 0;
  white-space: pre-wrap;
}

.admin-lesson-preview code {
  font-family: 'JetBrains Mono', monospace;
  background-color: #0C121A;
  color: #2BE3FF;
  padding: 0.08rem 0.35rem;
  font-size: 0.9rem;
}

.admin-lesson-preview blockquote {
  border-left: 3px solid #1B9FBF;
  padding-left: 0.8rem;
  color: #93ACBF;
  margin: 0.6rem 0;
}

.admin-lesson-preview a {
  color: #2BE3FF;
  text-decoration: underline;
}

.admin-lesson-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.admin-lesson-preview-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border: 1px solid #243040;
  background-color: #0A0F16;
  color: #A9C0D2;
}

/* =============================================
   STUDENT LESSONS (real published lessons)
   ============================================= */

/* Lesson thumbnails — lessons have no image column, so each card gets a
   deterministic gradient + topic icon instead of an external image. */
.lessons-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.lessons-thumb-icon {
  font-size: 2.75rem;
  color: #E8F6FF;
  transition: transform 0.4s ease;
}

.student-dashboard-lesson-card:hover .lessons-thumb-icon {
  transform: scale(1.12);
}

.lessons-thumb-topic {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(5, 7, 10, 0.82);
  text-align: center;
  padding: 0 0.75rem;
}

.lessons-thumb-g1 {
  background-image: linear-gradient(135deg, #0F8CA8 0%, #12A0BD 100%);
}

.lessons-thumb-g2 {
  background-image: linear-gradient(135deg, #0A5B56 0%, #0A5B56 100%);
}

.lessons-thumb-g3 {
  background-image: linear-gradient(135deg, #2A3F04 0%, #3C5A05 100%);
}

.lessons-thumb-g4 {
  background-image: linear-gradient(135deg, #3A0E52 0%, #4A1170 100%);
}

.lessons-thumb-g5 {
  background-image: linear-gradient(135deg, #0F8CA8 0%, #0F8CA8 100%);
}

/* Card action is now an <a>, keep it looking identical to the old button */
a.student-dashboard-btn-lesson-action {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Recommended card button rendered as a link */
a.lessons-recommend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

/* Support button used as a link (anchors ignore width:100% while inline) */
a.student-dashboard-btn-contact-support {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

/* Loading + empty states */
.lessons-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #7B93A8;
}

.lessons-spin {
  animation: lessons-spin 1s linear infinite;
  font-size: 1.25rem;
}

@keyframes lessons-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.lessons-empty-state {
  border: 2px dashed #22323F;
  border-radius: 0.5rem;
  background-color: #0E131B;
  padding: 3rem 2rem;
  text-align: center;
}

.lessons-empty-icon {
  font-size: 3rem;
  color: #5E7488;
}

.lessons-empty-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #E8F6FF;
  margin-top: 0.75rem;
}

.lessons-empty-desc {
  font-size: 0.85rem;
  color: #93ACBF;
  margin-top: 0.35rem;
}

/* Extra detail-page badge tone */
.lesson-details-badge-neutral {
  background-color: #121A24;
  color: #93ACBF;
  border-color: #22323F;
}

/* Instructor-authored lesson body (rendered HTML) */
.lesson-content-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #E8F6FF;
  word-wrap: break-word;
}

.lesson-content-body h2 {
  font-size: 1.35rem;
  margin: 1rem 0 0.5rem;
}

.lesson-content-body h3 {
  font-size: 1.15rem;
  margin: 0.85rem 0 0.45rem;
}

.lesson-content-body p {
  margin: 0.6rem 0;
}

.lesson-content-body ul,
.lesson-content-body ol {
  margin: 0.6rem 0 0.6rem 1.6rem;
}

.lesson-content-body li {
  margin: 0.2rem 0;
}

.lesson-content-body pre {
  background-color: #05070A;
  color: #7B93A8;
  padding: 0.9rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0.7rem 0;
  white-space: pre-wrap;
}

.lesson-content-body code {
  font-family: 'JetBrains Mono', monospace;
  background-color: #0C121A;
  color: #2BE3FF;
  padding: 0.08rem 0.35rem;
  font-size: 0.9rem;
}

.lesson-content-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.lesson-content-body blockquote {
  border-left: 3px solid #1B9FBF;
  padding-left: 0.8rem;
  color: #93ACBF;
  margin: 0.7rem 0;
}

.lesson-content-body a {
  color: #2BE3FF;
  text-decoration: underline;
}

.lesson-content-body img {
  max-width: 100%;
  height: auto;
}

.lesson-content-body strong {
  font-weight: 700;
}

.lesson-content-empty {
  font-size: 0.9rem;
  color: #7B93A8;
}

/* ==========================================================================
   Student header logout button
   A visible, always-reachable logout control that sits in the top header of
   every student page (the sidebar link alone is easy to miss / gets clipped
   on short viewports). Neobrutalist treatment to match the rest of the shell.
   ========================================================================== */
.student-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background-color: #0E131B;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease,
    color 0.2s ease;
}

.student-logout-btn:hover {
  background-color: #2A0F18;
  color: #FF6B85;
}

.student-logout-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.student-logout-btn .material-symbols-outlined {
  font-size: 1.05rem;
  line-height: 1;
}

/* Matches the monospace type used elsewhere in the exercise top bar. */
.student-logout-btn.student-logout-btn-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

/* The exercise page's header is not the fixed dashboard header, so it needs
   a touch more vertical breathing room next to Run / Check My Code. */
.exercise-header-right .student-logout-btn {
  padding: 0.5rem 0.85rem;
}

@media (max-width: 720px) {
  .student-logout-btn-label {
    display: none;
  }

  .student-logout-btn {
    padding: 0.5rem;
  }
}

/* ==========================================================================
   Instructor - coding exercises (lesson-scoped)
   ========================================================================== */

/* Banner showing which lesson the current exercise set belongs to. */
.admin-lesson-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  background-color: var(--admin-brand-lightblue, #0F2430);
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
}

.admin-lesson-context-main {
  min-width: 0;
}

.admin-lesson-context-title {
  font-size: 1rem;
  font-weight: 800;
  color: #E8F6FF;
  margin-bottom: 0.35rem;
}

.admin-lesson-context-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #93ACBF;
}

.admin-lesson-context-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background-color: #0E131B;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease;
}

.admin-lesson-context-link:hover {
  background-color: #0E131B;
  color: var(--admin-brand-blue, #2BE3FF);
}

.admin-lesson-context-link:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

/* Monospace code blocks inside modals (preview, expected output, solutions). */
.admin-code-preview {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background-color: #05070A;
  color: #7B93A8;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
}

/* Exercise preview modal */
.admin-preview-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-preview-xp {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  background-color: #1A2408;
  color: #8FD32B;
  border: 1px solid #A3FF12;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-preview-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7B93A8;
  margin-bottom: 0.5rem;
}

.admin-preview-note {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #5E7488;
}

.admin-preview-text {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #CFE4F2;
  margin-bottom: 1.25rem;
}

/* The code textareas in the exercise form. */
.admin-body .admin-form-textarea.code-editor {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  tab-size: 4;
}

/* "Exercises" column on the lessons table: a button that jumps straight to the
   exercise set for that lesson. Scoped as `.admin-body .x` so it survives the
   `.admin-body button { background:none; border:none }` reset. */
.admin-body .admin-btn-exercise-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  background-color: #0E131B;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease,
    color 0.2s ease;
}

.admin-body .admin-btn-exercise-count:hover {
  background-color: var(--admin-brand-lightblue, #12303D);
  color: var(--admin-brand-blue, #2BE3FF);
}

.admin-body .admin-btn-exercise-count:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.60);
}

.admin-exercise-count-live {
  font-weight: 500;
  opacity: 0.65;
}

/* ==========================================================================
   Student - exercise list on the lesson details page
   ========================================================================== */
.lesson-exercise-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.lesson-exercise-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease;
}

.lesson-exercise-item:hover {
  background-color: #0A0F16;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px rgba(0,0,0,0.60);
}

.lesson-exercise-item.is-solved {
  background-color: #0A2018;
  border-color: #1FBF74;
  box-shadow: 2px 2px 0px rgba(61,255,160,0.28);
}

.lesson-exercise-item.is-solved:hover {
  background-color: #0A2018;
  box-shadow: 3px 3px 0px rgba(61,255,160,0.28);
}

.lesson-exercise-index {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0F2430;
  color: #2BE3FF;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
}

.lesson-exercise-item.is-solved .lesson-exercise-index {
  background-color: #0C2A1C;
  color: #3DFFA0;
  border-color: #1FBF74;
}

.lesson-exercise-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lesson-exercise-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8F6FF;
}

.lesson-exercise-desc {
  font-size: 0.78rem;
  color: #7B93A8;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lesson-exercise-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lesson-exercise-diff,
.lesson-exercise-xp,
.lesson-exercise-state {
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.lesson-exercise-diff-easy {
  background-color: #0C2A1C;
  color: #2FD98A;
  border: 1px solid #1FBF74;
}

.lesson-exercise-diff-medium {
  background-color: #1A2408;
  color: #8FD32B;
  border: 1px solid #A3FF12;
}

.lesson-exercise-diff-hard {
  background-color: #2A0F18;
  color: #FF6B85;
  border: 1px solid #B32444;
}

.lesson-exercise-xp {
  background-color: #0F151D;
  color: #8FD32B;
  border: 1px solid #8FE83A;
}

.lesson-exercise-state {
  background-color: #121A24;
  color: #93ACBF;
  border: 1px solid #243040;
}

.lesson-exercise-item.is-solved .lesson-exercise-state {
  background-color: #0C2A1C;
  color: #2FD98A;
  border-color: #1FBF74;
}

.lesson-exercise-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.8rem;
  background-color: #0F8CA8;
  color: #E8F6FF;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.60);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.lesson-exercise-go .material-symbols-outlined {
  font-size: 1rem;
}

.lesson-exercise-item.is-solved .lesson-exercise-go {
  background-color: #0E131B;
  color: #3DFFA0;
  border-color: #1FBF74;
  box-shadow: 2px 2px 0px rgba(61,255,160,0.28);
}

/* Empty state */
.lesson-exercise-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.5rem 1.25rem;
  background-color: #0A0F16;
  border: 2px dashed #243040;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.lesson-exercise-empty > .material-symbols-outlined {
  font-size: 1.6rem;
  color: #5E7488;
}

.lesson-exercise-empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #A9C0D2;
  margin-bottom: 0.2rem;
}

.lesson-exercise-empty-desc {
  font-size: 0.8rem;
  color: #7B93A8;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .lesson-exercise-item {
    flex-wrap: wrap;
  }

  .lesson-exercise-main {
    flex-basis: 100%;
    order: 2;
  }

  .lesson-exercise-meta {
    order: 3;
    justify-content: flex-start;
  }

  .lesson-exercise-go {
    order: 4;
  }
}

/* ==========================================================================
   Student - live coding exercise page
   ========================================================================== */

/* The gutter is a plain div holding newline-separated numbers, so it needs
   `white-space: pre` or every line number collapses onto one row. */
.exercise-editor-gutter {
  white-space: pre;
  overflow: hidden;
}

.exercise-editor-input:disabled {
  color: #7B93A8;
  cursor: not-allowed;
}

/* Banner shown when no Python interpreter is available on the host. */
.exercise-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  background-color: #141C08;
  border-bottom: 2px solid #A3FF12;
  color: #8FD32B;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}

.exercise-notice .material-symbols-outlined {
  font-size: 1.15rem;
  flex: 0 0 auto;
}

/* Hint box in the problem panel */
.exercise-hint-box {
  background-color: #141C08;
  border: 2px solid #A3FF12;
  border-radius: 0.375rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1.25rem;
}

.exercise-hint-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  color: #8FD32B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.exercise-hint-toggle .material-symbols-outlined {
  font-size: 1rem;
}

.exercise-hint-text {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #7ABF22;
  white-space: pre-wrap;
}

/* Attempt summary pills */
.exercise-attempt-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #7B93A8;
}

.exercise-attempt-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.exercise-attempt-pill.is-new {
  background-color: #121A24;
  color: #93ACBF;
  border: 1px solid #243040;
}

.exercise-attempt-pill.is-solved {
  background-color: #0C2A1C;
  color: #2FD98A;
  border: 1px solid #1FBF74;
}

.exercise-attempt-pill.is-trying {
  background-color: #1A2408;
  color: #8FD32B;
  border: 1px solid #A3FF12;
}

.exercise-attempt-pill.is-plain {
  background-color: #0E131B;
  color: #93ACBF;
  border: 1px solid #243040;
}

.exercise-next-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.85rem;
  background-color: #0E131B;
  color: #2BE3FF;
  border: 2px solid #1B9FBF;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.exercise-next-link:hover {
  background-color: #0F2430;
}

.exercise-next-link .material-symbols-outlined {
  font-size: 1rem;
}

.exercise-badge-danger {
  background-color: #2A0F18;
  color: #FF6B85;
  border-color: #B32444;
}

/* Console status colours */
.exercise-console-status.is-passed {
  color: #7FF0B4;
}

.exercise-console-status.is-failed {
  color: #FF7AD9;
}

/* Console output blocks (the console sits on a dark surface) */
.exercise-console-out,
.exercise-console-err {
  margin: 0.4rem 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.exercise-console-out {
  color: #7B93A8;
}

.exercise-console-err {
  color: #FF7AD9;
}

.exercise-console-muted {
  color: #7B93A8;
}

.exercise-console-warn {
  display: block;
  color: #C7FF66;
  margin: 0.3rem 0;
}

.exercise-console-ok {
  color: #7FF0B4;
}

.exercise-console-err-text {
  color: #FF7AD9;
}

.exercise-console-meta {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid #1E3A47;
  font-size: 0.68rem;
  color: #7B93A8;
}

/* Pass / fail banner inside the console */
.exercise-result-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  margin-bottom: 0.9rem;
  line-height: 1.55;
  font-size: 0.78rem;
}

.exercise-result-banner .material-symbols-outlined {
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.exercise-result-banner.is-pass {
  background-color: rgba(61, 255, 160, 0.12);
  border-color: #1FBF74;
  color: #7FF0B4;
}

.exercise-result-banner.is-fail {
  background-color: rgba(255, 122, 217, 0.12);
  border-color: #B34BB0;
  color: #FF7AD9;
}

/* Expected vs actual side-by-side */
.exercise-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.exercise-compare-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7B93A8;
  margin-bottom: 0.3rem;
}

.exercise-compare-pre {
  margin: 0;
  padding: 0.6rem 0.7rem;
  background-color: #0F151D;
  border: 1px solid #22323F;
  border-radius: 0.3rem;
  color: #7B93A8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

@media (max-width: 720px) {
  .exercise-compare {
    grid-template-columns: 1fr;
  }
}
/* ============================================================================
   CODESUGOD · "CYBER TERMINAL" IDENTITY LAYER
   ----------------------------------------------------------------------------
   A dark, modern, gamified system: a near-black canvas with a faint technical
   grid, glass HUD panels, phosphor cyan + lime accents, monospace chrome and
   neon-glow feedback on every progress / reward surface.

     · canvas ............ #05070A with a 44px grid + two corner glows
     · structure ......... glass panels, 1px hairlines, deep soft shadows
     · accents ........... cyan #2BE3FF (primary) · lime #A3FF12 (XP / reward)
     · type .............. Sora (display) · Inter (body) · JetBrains Mono (chrome)
     · gamification ...... neon XP meters, glowing rank chips, HUD selection bars
   ========================================================================== */

:root {
  --ct-bg:        #05070A;
  --ct-bg-2:      #080C11;
  --ct-surface:   #0E131B;
  --ct-surface-2: #131C26;
  --ct-line:      #1E3A47;
  --ct-line-soft: rgba(43, 227, 255, 0.14);
  --ct-text:      #E8F6FF;
  --ct-muted:     #93ACBF;
  --ct-dim:       #7B93A8;
  --ct-cyan:      #2BE3FF;
  --ct-cyan-deep: #0F8CA8;
  --ct-lime:      #A3FF12;
  --ct-green:     #3DFFA0;
  --ct-amber:     #FFC24B;
  --ct-red:       #FF5C7A;
  --ct-violet:    #C77DFF;
  --ct-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ct-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ct-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ct-elev:    0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.55);
  --ct-elev-lg: 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 60px rgba(0, 0, 0, 0.68);
  --ct-glow-cyan: 0 0 0 1px rgba(43, 227, 255, 0.30), 0 0 26px rgba(43, 227, 255, 0.16);
  --ct-glow-lime: 0 0 0 1px rgba(163, 255, 18, 0.30), 0 0 26px rgba(163, 255, 18, 0.14);
  --ct-radius: 14px;
}

/* --- 1. Canvas + typography ---------------------------------------------- */
body {
  font-family: var(--ct-body);
  background-color: var(--ct-bg);
  background-image:
    radial-gradient(900px 520px at 10% -10%, rgba(43, 227, 255, 0.11), transparent 62%),
    radial-gradient(820px 480px at 94% 2%, rgba(163, 255, 18, 0.07), transparent 64%),
    linear-gradient(rgba(43, 227, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 227, 255, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  color: var(--ct-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ct-display);
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(43, 227, 255, 0.32);
  color: #FFFFFF;
}

/* Terminal-style scrollbars */
* {
  scrollbar-color: #22323F transparent;
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #1E3A47;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #2BE3FF; background-clip: content-box; }

/* --- 2. Glass HUD chrome (headers) --------------------------------------- */
header,
.login-header,
.register-header,
.student-dashboard-header,
.admin-header {
  background-color: rgba(8, 12, 17, 0.86);
  background-image: none;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(43, 227, 255, 0.28);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(43, 227, 255, 0.10);
  color: var(--ct-text);
}

/* Brand marks read as a terminal prompt */
.logo,
.login-logo,
.register-logo,
.student-dashboard-brand,
.admin-header-logo {
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ct-text);
}
.logo::before,
.login-logo::before,
.register-logo::before,
.student-dashboard-brand::before,
.admin-header-logo::before {
  content: ">";
  color: var(--ct-cyan);
  font-weight: 700;
  margin-right: 0.45ch;
  text-shadow: 0 0 12px rgba(43, 227, 255, 0.85);
}

/* Landing nav */
header .nav-links a,
header .nav-icons span { color: var(--ct-muted); }
header .nav-links a:hover,
header .nav-icons span:hover { color: var(--ct-cyan); }

/* Auth help chips */
.register-help-btn,
.login-help-btn {
  border: 1px solid rgba(43, 227, 255, 0.35);
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.07);
}

/* Student header */
.student-dashboard-nav-link {
  font-family: var(--ct-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ct-muted);
}
.student-dashboard-nav-link:hover { color: var(--ct-cyan); }
.student-dashboard-nav-link.student-dashboard-active {
  color: var(--ct-cyan);
  border-bottom: 2px solid var(--ct-cyan);
  text-shadow: 0 0 14px rgba(43, 227, 255, 0.55);
}
.student-dashboard-icon-btn { color: var(--ct-muted); }
.student-dashboard-icon-btn:hover { color: var(--ct-cyan); }
.student-logout-btn {
  background-color: rgba(43, 227, 255, 0.10);
  color: var(--ct-cyan);
  border: 1px solid rgba(43, 227, 255, 0.42);
  border-radius: 8px;
  box-shadow: none;
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.student-logout-btn:hover {
  background-color: rgba(43, 227, 255, 0.20);
  box-shadow: 0 0 20px rgba(43, 227, 255, 0.25);
}

/* Admin / instructor header */
.admin-header-logo,
.admin-header-title { color: var(--ct-text); }
.admin-header-title { border-left: 1px solid rgba(43, 227, 255, 0.22); }
.admin-header-logo .admin-badge {
  background: rgba(163, 255, 18, 0.14);
  color: var(--ct-lime);
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 6px;
  font-family: var(--ct-mono);
}
.admin-bell-btn { color: var(--ct-muted); }
.admin-bell-btn:hover { color: var(--ct-cyan); }
.admin-header-right { color: var(--ct-muted); }

/* --- 3. Sidebar ---------------------------------------------------------- */
.student-dashboard-sidebar,
.admin-sidebar {
  background-color: rgba(8, 12, 17, 0.92);
  border-right: 1px solid var(--ct-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.student-dashboard-profile-card-mini {
  background-image: linear-gradient(160deg, rgba(43, 227, 255, 0.10), rgba(163, 255, 18, 0.05));
  border-bottom: 1px solid var(--ct-line);
}
.student-dashboard-avatar-wrapper {
  border: 1px solid rgba(43, 227, 255, 0.45);
  border-radius: 12px;
  background-color: var(--ct-bg);
  box-shadow: 0 0 0 4px rgba(43, 227, 255, 0.06), 0 0 22px rgba(43, 227, 255, 0.16);
}
.student-dashboard-level-title {
  font-family: var(--ct-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--ct-lime);
  background-color: rgba(163, 255, 18, 0.10);
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 8px;
  padding: 0.15rem 0.8rem;
  text-shadow: 0 0 14px rgba(163, 255, 18, 0.55);
}
.student-dashboard-xp-label {
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* Neon XP meter */
.student-dashboard-xp-progress-bar {
  height: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ct-line);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.student-dashboard-xp-progress-fill {
  background-color: var(--ct-lime);
  background-image: linear-gradient(90deg, #6FE000 0%, var(--ct-lime) 55%, var(--ct-cyan) 100%);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(163, 255, 18, 0.55);
}

/* Sidebar nav */
.student-dashboard-sidebar-item {
  color: var(--ct-muted);
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: var(--ct-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}
.student-dashboard-sidebar-item:hover {
  background-color: rgba(43, 227, 255, 0.08);
  color: var(--ct-text);
  border-color: rgba(43, 227, 255, 0.20);
}
.student-dashboard-sidebar-item.student-dashboard-active {
  background-image: linear-gradient(90deg, rgba(43, 227, 255, 0.20), rgba(43, 227, 255, 0.02));
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.45);
  box-shadow: inset 2px 0 0 var(--ct-cyan), 0 0 20px rgba(43, 227, 255, 0.12);
}
.student-dashboard-upgrade-btn {
  background-image: linear-gradient(135deg, var(--ct-lime) 0%, #6FE000 100%);
  color: #12210A;
  border: 1px solid rgba(163, 255, 18, 0.55);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(163, 255, 18, 0.25), 0 10px 26px rgba(163, 255, 18, 0.16);
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.student-dashboard-upgrade-btn:hover { filter: brightness(1.08); }

/* --- 4. Glass panels / cards --------------------------------------------- */
.student-dashboard-bento-card,
.lessons-stats-card,
.login-card-box,
.register-card-box,
.admin-stat-card,
.admin-progress-card,
.admin-recent-item,
.profile-settings-card,
.lesson-details-card,
.profile-badge-item {
  background-color: rgba(19, 28, 38, 0.62);
  background-image: linear-gradient(180deg, rgba(43, 227, 255, 0.045), rgba(19, 28, 38, 0.0));
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-elev);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.student-dashboard-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(43, 227, 255, 0.38);
  box-shadow: var(--ct-elev-lg), 0 0 30px rgba(43, 227, 255, 0.10);
}

/* Signature: cyan→lime energy rail across the top of lesson cards */
.student-dashboard-lesson-card { position: relative; overflow: hidden; }
.student-dashboard-lesson-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  box-shadow: 0 0 14px rgba(43, 227, 255, 0.6);
  z-index: 3;
}

.student-dashboard-lesson-thumbnail-box { background-color: #0A0F16; }
.student-dashboard-lesson-title { font-family: var(--ct-display); font-weight: 700; }
.student-dashboard-lesson-description { color: var(--ct-muted); }

/* Thumbnail chips */
.student-dashboard-badge-tag {
  background-color: rgba(5, 7, 10, 0.82);
  color: var(--ct-cyan);
  border: 1px solid rgba(43, 227, 255, 0.40);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.student-dashboard-badge-tag.student-dashboard-primary { color: var(--ct-cyan); }
.student-dashboard-badge-tag.student-dashboard-secondary {
  background-color: rgba(5, 7, 10, 0.82);
  color: var(--ct-lime);
  border-color: rgba(163, 255, 18, 0.40);
}

/* Lesson action */
.student-dashboard-btn-lesson-action {
  background-color: rgba(43, 227, 255, 0.10);
  color: var(--ct-cyan);
  border: 1px solid rgba(43, 227, 255, 0.45);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  box-shadow: none;
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.student-dashboard-btn-lesson-action:hover {
  background-color: rgba(43, 227, 255, 0.22);
  box-shadow: 0 0 20px rgba(43, 227, 255, 0.28);
  transform: none;
}

/* XP pill + activity feed */
.student-dashboard-xp-pill {
  background-color: rgba(163, 255, 18, 0.12);
  color: var(--ct-lime);
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 6px;
  padding: 0.08rem 0.55rem;
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}
.student-dashboard-activity-icon-box {
  border: 1px solid var(--ct-line);
  border-radius: 10px;
  background-color: rgba(5, 7, 10, 0.55);
}
.student-dashboard-activity-title { font-family: var(--ct-display); font-weight: 600; }
.student-dashboard-activity-timestamp { color: var(--ct-dim); font-family: var(--ct-mono); font-size: 0.68rem; }

/* Streak callout */
.student-dashboard-streak-footer-box {
  background-image: linear-gradient(135deg, rgba(255, 194, 75, 0.12), rgba(255, 92, 122, 0.08));
  border-top: 1px solid rgba(255, 194, 75, 0.30);
}
.student-dashboard-streak-text {
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ct-amber);
}
.student-dashboard-streak-icon { color: var(--ct-amber); text-shadow: 0 0 16px rgba(255, 194, 75, 0.65); }

/* Outline / support buttons */
.student-dashboard-btn-contact-support {
  background-color: rgba(19, 28, 38, 0.6);
  border: 1px solid var(--ct-line);
  color: var(--ct-muted);
  border-radius: 9px;
  box-shadow: none;
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.student-dashboard-btn-contact-support:hover {
  border-color: rgba(43, 227, 255, 0.40);
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.08);
}

/* Section headers */
.student-dashboard-section-title { font-family: var(--ct-display); font-weight: 700; }
.student-dashboard-section-link {
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-cyan);
}
.student-dashboard-tag-prefix {
  color: var(--ct-cyan);
  font-family: var(--ct-mono);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-shadow: 0 0 14px rgba(43, 227, 255, 0.45);
}
.student-dashboard-welcome-title { font-family: var(--ct-display); color: var(--ct-text); }
.student-dashboard-welcome-subtext { color: var(--ct-muted); }
.student-dashboard-welcome-subtext span { color: var(--ct-cyan); }

/* --- 5. Curriculum page -------------------------------------------------- */
.lessons-search-input {
  background-color: rgba(5, 7, 10, 0.72);
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  color: var(--ct-text);
  font-family: var(--ct-mono);
  font-size: 0.78rem;
}
.lessons-search-input::placeholder { color: var(--ct-dim); }
.lessons-search-input:focus {
  outline: none;
  border-color: rgba(43, 227, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 227, 255, 0.12), 0 0 22px rgba(43, 227, 255, 0.15);
}

.lessons-filter-tab {
  background-color: rgba(19, 28, 38, 0.6);
  border: 1px solid var(--ct-line);
  border-radius: 999px;
  box-shadow: none;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lessons-filter-tab:hover { color: var(--ct-text); border-color: rgba(43, 227, 255, 0.30); }
.lessons-filter-tab.lessons-filter-active {
  background-color: rgba(43, 227, 255, 0.16);
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.50);
  box-shadow: 0 0 20px rgba(43, 227, 255, 0.18);
}

.lessons-path-card {
  background-image: linear-gradient(135deg, rgba(43, 227, 255, 0.10), rgba(163, 255, 18, 0.05));
}
.lessons-path-icon { color: var(--ct-cyan); text-shadow: 0 0 16px rgba(43, 227, 255, 0.6); }
.lessons-path-title { font-family: var(--ct-display); font-weight: 700; }
.lessons-path-subtitle { color: var(--ct-muted); font-family: var(--ct-mono); font-size: 0.72rem; }
.lessons-path-progress-bar {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ct-line);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}
.lessons-path-progress-fill {
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(43, 227, 255, 0.55);
}
.lessons-path-percentage {
  font-family: var(--ct-mono);
  color: var(--ct-cyan);
  text-shadow: 0 0 14px rgba(43, 227, 255, 0.5);
}

.lessons-inline-bar {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ct-line);
  border-radius: 999px;
  box-shadow: none;
}
.lessons-inline-fill {
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(43, 227, 255, 0.5);
}
.lessons-inline-label { font-family: var(--ct-mono); font-size: 0.66rem; color: var(--ct-muted); }
.lessons-meta { color: var(--ct-dim); font-family: var(--ct-mono); font-size: 0.68rem; }

.lessons-stat-value { font-family: var(--ct-mono); font-weight: 700; color: var(--ct-text); }
.lessons-stat-label {
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lessons-stat-divider { background-color: var(--ct-line); }

.lessons-recommend-card {
  background-image: linear-gradient(135deg, rgba(163, 255, 18, 0.09), rgba(43, 227, 255, 0.05));
}
.lessons-recommend-icon-box {
  background-color: rgba(5, 7, 10, 0.7);
  color: var(--ct-lime);
  border: 1px solid rgba(163, 255, 18, 0.40);
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(163, 255, 18, 0.16);
}
.lessons-recommend-btn {
  background-image: linear-gradient(135deg, var(--ct-cyan), var(--ct-lime));
  color: #04121A;
  border: 1px solid rgba(43, 227, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.22), 0 10px 26px rgba(0, 229, 255, 0.18);
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* --- 6. Profile / badges ------------------------------------------------- */
.profile-stat-value { font-family: var(--ct-mono); color: var(--ct-text); }
.profile-stat-label { font-family: var(--ct-mono); color: var(--ct-dim); letter-spacing: 0.08em; }
.profile-badge-item { border: 1px solid var(--ct-line); border-radius: 12px; }
.profile-badge-earned {
  background-color: rgba(19, 28, 38, 0.6);
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.10), 0 10px 26px rgba(0, 0, 0, 0.5);
}
.profile-badge-earned:hover {
  border-color: rgba(43, 227, 255, 0.40);
  box-shadow: 0 0 26px rgba(43, 227, 255, 0.16);
}
.profile-badge-locked { background-color: rgba(11, 17, 25, 0.7); opacity: 0.55; }
.profile-badge-icon-wrapper { border: 1px solid var(--ct-line); border-radius: 12px; }
.profile-badge-name { font-family: var(--ct-display); }
.profile-badge-desc { font-family: var(--ct-mono); color: var(--ct-dim); font-size: 0.62rem; }
.profile-settings-change-btn {
  background-color: rgba(43, 227, 255, 0.08);
  border: 1px solid rgba(43, 227, 255, 0.35);
  border-radius: 7px;
  box-shadow: none;
  color: var(--ct-cyan);
  font-family: var(--ct-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-settings-change-btn:hover { background-color: rgba(43, 227, 255, 0.18); }
.profile-settings-label .material-symbols-outlined { color: var(--ct-cyan); }
.profile-settings-value { color: var(--ct-muted); font-family: var(--ct-mono); }
.profile-settings-divider { background-color: var(--ct-line); }

/* --- 7. Landing page ----------------------------------------------------- */
.hero-content h1 {
  font-family: var(--ct-display);
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  color: var(--ct-text);
  text-shadow: 0 0 40px rgba(43, 227, 255, 0.30);
}
.hero-content p { color: var(--ct-muted); }
.hero-content h1 br + * { color: var(--ct-cyan); }

.terminal-window {
  background-color: rgba(5, 7, 10, 0.92);
  border: 1px solid rgba(43, 227, 255, 0.32);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.08), 0 26px 70px rgba(0, 0, 0, 0.7),
              0 0 50px rgba(43, 227, 255, 0.10);
}
.terminal-shadow { border: 1px solid rgba(43, 227, 255, 0.18); border-radius: 12px; }
.terminal-header { background-color: rgba(8, 12, 17, 0.95); border-bottom: 1px solid var(--ct-line); }
.terminal-title { font-family: var(--ct-mono); color: var(--ct-dim); }
.terminal-body { font-family: var(--ct-mono); color: #B7D7E4; }
.code-keyword { color: var(--ct-violet); }
.code-fn { color: var(--ct-cyan); }
.code-comment { color: #4E6577; font-style: italic; }
.code-highlight {
  background-color: rgba(61, 255, 160, 0.10);
  color: var(--ct-green);
  text-shadow: 0 0 14px rgba(61, 255, 160, 0.35);
}
.terminal-badge {
  background-color: rgba(163, 255, 18, 0.14);
  color: var(--ct-lime);
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 5px;
  font-family: var(--ct-mono);
}
.cta-section h2 { font-family: var(--ct-display); color: var(--ct-text); }
.cta-section p { color: var(--ct-muted); }

/* Arcade buttons -> neon gradient controls */
.btn {
  font-family: var(--ct-mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: 10px;
  border: 1px solid var(--ct-line);
}
.btn-primary,
.btn-cta {
  background-image: linear-gradient(135deg, var(--ct-cyan) 0%, var(--ct-lime) 100%);
  color: #04121A;
  border: 1px solid rgba(43, 227, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.22), 0 12px 32px rgba(0, 229, 255, 0.20);
  font-weight: 700;
}
.btn-secondary {
  background-color: rgba(19, 28, 38, 0.7);
  color: var(--ct-text);
  border: 1px solid var(--ct-line);
  box-shadow: none;
}
.btn-primary:hover,
.btn-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.4), 0 18px 44px rgba(0, 229, 255, 0.28);
}
.btn-secondary:hover {
  border-color: rgba(43, 227, 255, 0.45);
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.08);
  transform: none;
  box-shadow: none;
}

/* --- 8. Auth pages ------------------------------------------------------- */
.login-card-box,
.register-card-box {
  background-color: rgba(14, 19, 27, 0.78);
  border: 1px solid var(--ct-line);
  border-radius: 18px;
  box-shadow: var(--ct-elev-lg), 0 0 60px rgba(43, 227, 255, 0.06);
}
.login-title,
.register-title { font-family: var(--ct-display); color: var(--ct-text); }
.login-subheading,
.register-subheading { color: var(--ct-dim); font-family: var(--ct-mono); font-size: 0.76rem; }

.login-text-input,
.register-text-input {
  background-color: rgba(5, 7, 10, 0.75);
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  color: var(--ct-text);
  font-family: var(--ct-mono);
  font-size: 0.82rem;
}
.login-text-input::placeholder,
.register-text-input::placeholder { color: #4E6577; }
.login-text-input:focus,
.register-text-input:focus {
  outline: none;
  border-color: rgba(43, 227, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 227, 255, 0.12), 0 0 22px rgba(43, 227, 255, 0.14);
}
.login-field-label,
.register-field-label {
  font-family: var(--ct-mono);
  font-size: 0.66rem;
  letter-spacing: 0.10em;
  color: var(--ct-muted);
}
.register-required-star { color: var(--ct-red); }
.login-forgot-link { color: var(--ct-cyan); }

.login-action-button,
.register-action-button {
  background-image: linear-gradient(135deg, var(--ct-cyan) 0%, var(--ct-lime) 100%);
  color: #04121A;
  border: 1px solid rgba(43, 227, 255, 0.55);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.22), 0 12px 30px rgba(0, 229, 255, 0.18);
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.login-action-button:hover,
.register-action-button:hover { filter: brightness(1.08); }

.login-social-btn {
  background-color: rgba(19, 28, 38, 0.6);
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.login-social-btn:hover {
  border-color: rgba(43, 227, 255, 0.40);
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.08);
}

.login-status-badge,
.register-status-tag {
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  border: 1px solid rgba(43, 227, 255, 0.30);
  background-color: rgba(43, 227, 255, 0.07);
  color: var(--ct-cyan);
  border-radius: 5px;
}
.login-notice-box {
  background-color: rgba(19, 28, 38, 0.55);
  border: 1px solid var(--ct-line);
  border-radius: 12px;
  box-shadow: none;
}
.login-notice-text { color: var(--ct-muted); font-size: 0.76rem; }
.login-notice-icon { color: var(--ct-cyan); }
.register-role-option {
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  background-color: rgba(19, 28, 38, 0.55);
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.74rem;
}
.register-role-option:has(input:checked) {
  border-color: rgba(43, 227, 255, 0.55);
  background-color: rgba(43, 227, 255, 0.12);
  color: var(--ct-cyan);
  box-shadow: 0 0 20px rgba(43, 227, 255, 0.14);
}
.register-log-card {
  background-color: rgba(5, 7, 10, 0.7);
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.68rem;
}
.register-log-prefix { color: var(--ct-lime); }
.register-agreement-text { color: var(--ct-muted); font-size: 0.74rem; }
.register-agreement-text a { color: var(--ct-cyan); }
.register-section-divider { border-color: var(--ct-line); }
.register-login-redirect,
.login-register-redirect { color: var(--ct-muted); font-size: 0.78rem; }
.register-login-redirect a,
.login-register-redirect a { color: var(--ct-cyan); }
.register-alert-error {
  background-color: rgba(255, 60, 90, 0.10);
  border: 1px solid rgba(255, 92, 122, 0.40);
  border-radius: 9px;
  color: #FFB3C1;
}
.register-alert-success {
  background-color: rgba(61, 255, 160, 0.10);
  border: 1px solid rgba(61, 255, 160, 0.40);
  border-radius: 9px;
  color: #A7FFD4;
}

/* --- 9. Footers ---------------------------------------------------------- */
footer,
.login-footer,
.register-footer,
.student-dashboard-footer,
.admin-footer {
  background-color: rgba(5, 7, 10, 0.92);
  background-image: none;
  border-top: 1px solid rgba(43, 227, 255, 0.20);
  color: var(--ct-dim);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
}
.footer-left p,
.footer-links a,
.footer-icon,
.login-footer-brand p,
.login-footer-links a,
.login-footer-symbol,
.register-footer-brand p,
.register-footer-links a,
.register-footer-symbol,
.student-dashboard-footer-left-content p,
.student-dashboard-footer-nav a,
.student-dashboard-footer-right-content,
.admin-footer a,
.admin-footer-brand,
.admin-footer-copyright {
  color: var(--ct-dim);
  font-size: 0.76rem;
}
.footer-links a,
.login-footer-links a,
.register-footer-links a,
.student-dashboard-footer-nav a,
.admin-footer a {
  font-family: var(--ct-mono);
  letter-spacing: 0.05em;
}
.footer-links a:hover,
.login-footer-links a:hover,
.register-footer-links a:hover,
.student-dashboard-footer-nav a:hover,
.admin-footer a:hover { color: var(--ct-cyan); }
.login-footer-brand .login-logo,
.register-footer-brand .register-logo,
.student-dashboard-footer-left-content .student-dashboard-brand { color: var(--ct-text); }
.admin-footer .admin-social-icon {
  color: var(--ct-muted);
  border-color: var(--ct-line);
  border-radius: 8px;
}
.admin-footer .admin-social-icon:hover { color: var(--ct-cyan); border-color: rgba(43, 227, 255, 0.45); }

/* --- 10. Coding exercise (IDE) ------------------------------------------- */
.exercise-header {
  background-color: rgba(8, 12, 17, 0.92);
  background-image: none;
  border-bottom: 1px solid rgba(43, 227, 255, 0.28);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}
.exercise-header-title { font-family: var(--ct-display); color: var(--ct-text); }
.exercise-breadcrumb { font-family: var(--ct-mono); color: var(--ct-dim); font-size: 0.68rem; }
.exercise-breadcrumb a { color: var(--ct-cyan); }
.exercise-back-btn {
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-cyan);
  border: 1px solid rgba(43, 227, 255, 0.35);
  border-radius: 7px;
  padding: 0.3rem 0.6rem;
}
.exercise-back-btn:hover { background-color: rgba(43, 227, 255, 0.14); }
.exercise-xp-pill {
  background-color: rgba(163, 255, 18, 0.12);
  color: var(--ct-lime);
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 6px;
  font-family: var(--ct-mono);
  font-size: 0.68rem;
}
.exercise-run-btn {
  background-color: rgba(61, 255, 160, 0.12);
  color: var(--ct-green);
  border: 1px solid rgba(61, 255, 160, 0.45);
  border-radius: 8px;
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.exercise-run-btn:hover:not(:disabled) { background-color: rgba(61, 255, 160, 0.22); box-shadow: 0 0 20px rgba(61, 255, 160, 0.22); }
.exercise-check-btn {
  background-image: linear-gradient(135deg, var(--ct-cyan), var(--ct-lime));
  color: #04121A;
  border: 1px solid rgba(43, 227, 255, 0.5);
  border-radius: 8px;
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.2), 0 8px 22px rgba(0, 229, 255, 0.18);
}
.exercise-check-btn:hover:not(:disabled) { filter: brightness(1.08); }
.exercise-reset-btn {
  color: var(--ct-muted);
  border: 1px solid var(--ct-line);
  border-radius: 7px;
  font-family: var(--ct-mono);
  font-size: 0.7rem;
}
.exercise-reset-btn:hover:not(:disabled) { color: var(--ct-cyan); border-color: rgba(43, 227, 255, 0.4); }

.exercise-problem-panel {
  background-color: rgba(14, 19, 27, 0.7);
  border: 1px solid var(--ct-line);
  border-radius: 12px;
}
.exercise-tag-prefix {
  font-family: var(--ct-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--ct-cyan);
  text-shadow: 0 0 14px rgba(43, 227, 255, 0.45);
}
.exercise-problem-title { font-family: var(--ct-display); color: var(--ct-text); }
.exercise-problem-description { color: var(--ct-muted); }
.exercise-section-label {
  font-family: var(--ct-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ct-dim);
}
.exercise-badge {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
  border: 1px solid var(--ct-line);
  background-color: rgba(5, 7, 10, 0.7);
}
.exercise-badge-primary { color: var(--ct-cyan); border-color: rgba(43, 227, 255, 0.42); }
.exercise-badge-accent { color: var(--ct-amber); border-color: rgba(255, 194, 75, 0.42); }
.exercise-badge-success { color: var(--ct-lime); border-color: rgba(163, 255, 18, 0.42); }
.exercise-expected-box,
.exercise-hint-box,
.exercise-attempt-summary {
  background-color: rgba(5, 7, 10, 0.72);
  border: 1px solid var(--ct-line);
  border-radius: 9px;
  color: var(--ct-green);
  font-family: var(--ct-mono);
  font-size: 0.74rem;
}
.exercise-hint-box { color: var(--ct-amber); border-color: rgba(255, 194, 75, 0.28); }
.exercise-hint-toggle { font-family: var(--ct-mono); font-size: 0.7rem; color: var(--ct-amber); }
.exercise-next-link {
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-cyan);
}

/* IDE + console read as the same terminal family */
.exercise-ide-panel,
.exercise-console,
.code-editor-panel,
.console-panel,
.ide-panel {
  background-color: rgba(5, 7, 10, 0.86);
  border: 1px solid var(--ct-line);
  border-radius: 12px;
  overflow: hidden;
}
.exercise-editor-toolbar,
.exercise-console-header {
  background-color: rgba(8, 12, 17, 0.95);
  border-bottom: 1px solid var(--ct-line);
}
.exercise-file-tab { font-family: var(--ct-mono); font-size: 0.7rem; color: var(--ct-cyan); }
.exercise-file-dot { background-color: var(--ct-lime); box-shadow: 0 0 10px rgba(163, 255, 18, 0.8); }
.exercise-lang-pill {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.10em;
  color: var(--ct-dim);
  border: 1px solid var(--ct-line);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
}
.exercise-editor-area { background-color: rgba(5, 7, 10, 0.9); }
.exercise-editor-gutter {
  font-family: var(--ct-mono);
  color: #33465A;
  border-right: 1px solid var(--ct-line);
}
.exercise-editor-input {
  font-family: var(--ct-mono);
  color: #C9E8F5;
  background-color: transparent;
  caret-color: var(--ct-cyan);
}
.exercise-console-tab {
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-dim);
}
.exercise-console-tab-active { color: var(--ct-cyan); border-bottom: 2px solid var(--ct-cyan); }
.exercise-console-status {
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  color: var(--ct-lime);
  text-shadow: 0 0 12px rgba(163, 255, 18, 0.5);
}
.exercise-console-body {
  font-family: var(--ct-mono);
  font-size: 0.76rem;
  color: #B7D7E4;
  background-image: repeating-linear-gradient(
    0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}
.exercise-console-muted { color: #4E6577; }
.exercise-console-ok { color: var(--ct-green); }
.exercise-console-error { color: var(--ct-red); }
.exercise-notice {
  background-color: rgba(255, 194, 75, 0.10);
  border: 1px solid rgba(255, 194, 75, 0.35);
  border-radius: 10px;
  color: #FFD9A0;
  font-family: var(--ct-mono);
  font-size: 0.74rem;
}

/* --- 11. Admin console --------------------------------------------------- */
.admin-modal,
.admin-modal-content {
  background-color: #0E131B;
  border: 1px solid var(--ct-line);
  border-radius: 14px;
  box-shadow: var(--ct-elev-lg);
}
.admin-modal-header { border-bottom-color: var(--ct-line) !important; }
.admin-search-input {
  background-color: rgba(5, 7, 10, 0.72);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  color: var(--ct-text);
}
.admin-search-input::placeholder { color: #4E6577; }
.admin-search-input:focus { outline: none; border-color: rgba(43, 227, 255, 0.5); box-shadow: 0 0 0 3px rgba(43, 227, 255, 0.10); }
.admin-search-icon { color: var(--ct-dim); }
.admin-table th {
  background-color: rgba(8, 12, 17, 0.9);
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.64rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ct-line);
}
.admin-table td { border-bottom: 1px solid rgba(30, 58, 71, 0.5); }
.admin-table tr:hover td { background-color: rgba(43, 227, 255, 0.04); }
.admin-nav-item {
  font-family: var(--ct-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--ct-muted);
  border-radius: 8px;
}
.admin-nav-item:hover { background-color: rgba(43, 227, 255, 0.08); color: var(--ct-text); }
.admin-nav-item.admin-active {
  background-image: linear-gradient(90deg, rgba(43, 227, 255, 0.20), rgba(43, 227, 255, 0.02));
  color: var(--ct-cyan);
  box-shadow: inset 2px 0 0 var(--ct-cyan);
}
.admin-badge {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
}
.admin-avatar-placeholder { border-radius: 10px; border: 1px solid rgba(43, 227, 255, 0.35); }

/* --- 12. Generic surfaces & controls ------------------------------------- */
.admin-modal-btn,
.admin-filter-btn,
.admin-action-btn,
.admin-btn {
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid var(--ct-line);
}
input, select, textarea { color-scheme: dark; }
input::placeholder, textarea::placeholder { color: #4E6577; }

/* ============================================================================
   CODESUGOD · CYBER TERMINAL — POLISH PASS
   Second half of the identity layer: component-level detail, richer neon on
   thumbnails / gamification surfaces, and coverage for the lesson-detail and
   admin console screens.
   ========================================================================== */

/* --- Lesson thumbnails: vivid neon gradients ----------------------------- */
.lessons-thumb-g1 { background-image: linear-gradient(135deg, #06323F 0%, #0F8CA8 58%, #2BE3FF 100%); }
.lessons-thumb-g2 { background-image: linear-gradient(135deg, #05321F 0%, #0E7A4E 58%, #3DFFA0 100%); }
.lessons-thumb-g3 { background-image: linear-gradient(135deg, #1D2A05 0%, #4A6B08 58%, #A3FF12 100%); }
.lessons-thumb-g4 { background-image: linear-gradient(135deg, #24083A 0%, #5A1A85 58%, #C77DFF 100%); }
.lessons-thumb-g5 { background-image: linear-gradient(135deg, #3A0E28 0%, #8A1A55 58%, #FF7AD9 100%); }

.lessons-thumb-icon {
  color: #FFFFFF;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 255, 255, 0.25);
}
.lessons-thumb-topic {
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--ct-mono);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.lessons-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* --- Mastery card -------------------------------------------------------- */
.student-dashboard-mastery-card-title {
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ct-muted);
}
.student-dashboard-chart-percentage {
  font-family: var(--ct-mono);
  font-weight: 700;
  color: var(--ct-text);
  text-shadow: 0 0 24px rgba(43, 227, 255, 0.45);
}
.student-dashboard-chart-status {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ct-cyan);
}
.student-dashboard-chart-bg-circle { color: #17242E; }
.student-dashboard-chart-fill-circle {
  color: var(--ct-cyan);
  filter: drop-shadow(0 0 6px rgba(43, 227, 255, 0.7));
}
.student-dashboard-mastery-description { color: var(--ct-muted); font-size: 0.8rem; }
.student-dashboard-mastery-description span { color: var(--ct-cyan); }
.student-dashboard-mastery-bg-icon { opacity: 0.05; color: var(--ct-cyan); }

/* --- Activity feed / misc ------------------------------------------------ */
.student-dashboard-activity-item { border-bottom: 1px solid rgba(30, 58, 71, 0.55); }
.student-dashboard-btn-more { color: var(--ct-dim); }
.student-dashboard-btn-more:hover { color: var(--ct-cyan); }
.student-dashboard-icon-box-primary { background-color: rgba(43, 227, 255, 0.12); color: var(--ct-cyan); }
.student-dashboard-icon-box-secondary { background-color: rgba(163, 255, 18, 0.12); color: var(--ct-lime); }
.student-dashboard-icon-box-muted { background-color: rgba(255, 255, 255, 0.04); color: var(--ct-dim); }
.student-dashboard-avatar-stack .student-dashboard-stacked-avatar {
  border: 2px solid #0E131B;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.35);
}
.student-dashboard-stacked-avatar.student-dashboard-avatar-1 { background-image: linear-gradient(135deg, #2BE3FF, #0F8CA8); }
.student-dashboard-stacked-avatar.student-dashboard-avatar-2 { background-image: linear-gradient(135deg, #A3FF12, #6FE000); }
.student-dashboard-stacked-avatar.student-dashboard-avatar-3 { background-image: linear-gradient(135deg, #C77DFF, #7A2AB8); }

/* --- Loading / empty states --------------------------------------------- */
.lessons-loading,
.lessons-empty-state,
.admin-empty-state {
  background-color: rgba(14, 19, 27, 0.6);
  border: 1px dashed rgba(43, 227, 255, 0.28);
  border-radius: var(--ct-radius);
  color: var(--ct-muted);
  font-family: var(--ct-mono);
}
.lessons-empty-icon,
.lessons-spin,
.admin-empty-state-icon { color: var(--ct-cyan); }
.lessons-empty-title,
.admin-empty-state-title { font-family: var(--ct-display); color: var(--ct-text); }
.lessons-empty-desc,
.admin-empty-state-desc { color: var(--ct-dim); }

/* --- Lesson details page ------------------------------------------------- */
.lesson-details-hero {
  background-image: linear-gradient(135deg, rgba(43, 227, 255, 0.10), rgba(163, 255, 18, 0.04));
}
.lesson-details-title { font-family: var(--ct-display); color: var(--ct-text); }
.lesson-details-subtitle { color: var(--ct-muted); }
.lesson-details-back {
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-cyan);
}
.lesson-details-badge {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 5px;
  border: 1px solid var(--ct-line);
  background-color: rgba(5, 7, 10, 0.7);
  color: var(--ct-muted);
}
.lesson-details-badge-primary { color: var(--ct-cyan); border-color: rgba(43, 227, 255, 0.42); }
.lesson-details-badge-accent { color: var(--ct-amber); border-color: rgba(255, 194, 75, 0.42); }
.lesson-details-badge-success { color: var(--ct-green); border-color: rgba(61, 255, 160, 0.42); }
.lesson-details-badge-neutral { color: var(--ct-dim); }
.lesson-details-info-label {
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ct-dim);
}
.lesson-details-info-value { font-family: var(--ct-mono); color: var(--ct-text); }
.lesson-details-info-row { border-bottom: 1px solid rgba(30, 58, 71, 0.5); }
.lesson-details-info-progress {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ct-line);
  border-radius: 999px;
}
.lesson-details-info-progress-fill {
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(43, 227, 255, 0.5);
}
.lesson-details-start-btn {
  background-image: linear-gradient(135deg, var(--ct-cyan), var(--ct-lime));
  color: #04121A;
  border: 1px solid rgba(43, 227, 255, 0.5);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.22), 0 12px 30px rgba(0, 229, 255, 0.18);
  font-family: var(--ct-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lesson-details-start-btn:hover { filter: brightness(1.08); }

/* Instructor-authored lesson body */
.lesson-details-card h1,
.lesson-details-card h2,
.lesson-details-card h3 { font-family: var(--ct-display); color: var(--ct-text); }
.lesson-details-card p,
.lesson-details-card li { color: var(--ct-muted); }
.lesson-details-card code,
.lesson-details-card pre {
  background-color: rgba(5, 7, 10, 0.85);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  color: var(--ct-green);
  font-family: var(--ct-mono);
}
.lesson-details-card a { color: var(--ct-cyan); }
.lesson-details-card blockquote { border-left: 3px solid rgba(43, 227, 255, 0.5); color: var(--ct-muted); }

/* --- Admin console tables / tabs / pagination ---------------------------- */
.admin-table-wrapper {
  background-color: rgba(14, 19, 27, 0.7);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-elev);
  overflow: hidden;
}
.admin-data-table { width: 100%; border-collapse: collapse; }
.admin-data-table th {
  background-color: rgba(8, 12, 17, 0.92);
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ct-line);
}
.admin-data-table td { border-bottom: 1px solid rgba(30, 58, 71, 0.5); color: var(--ct-muted); }
.admin-data-table tr:hover td { background-color: rgba(43, 227, 255, 0.045); }
.admin-tab-btn {
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--ct-line);
  background-color: rgba(19, 28, 38, 0.6);
  color: var(--ct-muted);
}
.admin-tab-btn.admin-active,
.admin-tab-btn.admin-neobrutal-shadow-sm.admin-active {
  background-color: rgba(43, 227, 255, 0.16);
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.5);
  box-shadow: 0 0 18px rgba(43, 227, 255, 0.16);
}
.admin-pg-btn {
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  background-color: rgba(19, 28, 38, 0.6);
  color: var(--ct-muted);
}
.admin-pg-btn.admin-active {
  background-color: rgba(43, 227, 255, 0.16);
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.5);
}
.admin-table-loading { color: var(--ct-dim); font-family: var(--ct-mono); }
.admin-stat-card-header { color: var(--ct-dim); font-family: var(--ct-mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-stat-value { font-family: var(--ct-mono); color: var(--ct-text); }
.admin-user-info-name { font-family: var(--ct-mono); color: var(--ct-text); }
.admin-user-info-version { color: var(--ct-dim); }
.admin-filter-btn, .admin-action-btn {
  background-color: rgba(19, 28, 38, 0.6);
  color: var(--ct-muted);
  border: 1px solid var(--ct-line);
}
.admin-filter-btn:hover, .admin-action-btn:hover {
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.4);
  background-color: rgba(43, 227, 255, 0.08);
}
.admin-form input, .admin-form select, .admin-form textarea {
  background-color: rgba(5, 7, 10, 0.72);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  color: var(--ct-text);
}
.admin-form label { color: var(--ct-muted); font-family: var(--ct-mono); font-size: 0.68rem; letter-spacing: 0.06em; }
.admin-progress-bar { background-color: rgba(255, 255, 255, 0.05); border: 1px solid var(--ct-line); border-radius: 999px; }
.admin-progress-fill {
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(43, 227, 255, 0.5);
}

/* ============================================================================
   STUDENT PROGRESS · LIVE MONITOR
   Live-sync bar, change-flash on cards, and the detail-modal breakdown.
   ========================================================================== */

.admin-live-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.9rem;
  margin-bottom: 1rem;
  background-color: rgba(14, 19, 27, 0.85);
  border: 1px solid var(--ct-line);
  border-radius: 10px;
  font-family: var(--ct-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-dim);
}

.admin-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background-color: #3A4A57;
}

.admin-live-dot.is-on {
  background-color: #2FD98A;
  animation: adminLivePulse 2s ease-out infinite;
}

.admin-live-dot.is-off {
  background-color: #FF6B85;
}

@keyframes adminLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 217, 138, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(47, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 217, 138, 0); }
}

.admin-live-text {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #2FD98A;
}

.admin-live-time {
  color: var(--ct-muted);
  text-transform: none;
  letter-spacing: 0.02em;
}

.admin-live-online { color: var(--ct-dim); }

.admin-live-online i {
  margin-right: 0.15rem;
  color: #2FD98A;
}

.admin-live-divider {
  width: 1px;
  height: 12px;
  background-color: var(--ct-line);
}

.admin-live-actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.admin-body .admin-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  background-color: rgba(19, 28, 38, 0.85);
  color: var(--ct-muted);
  border: 1px solid var(--ct-line);
  border-radius: 6px;
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.admin-body .admin-live-btn:hover {
  color: var(--ct-cyan);
  border-color: rgba(43, 227, 255, 0.45);
  background-color: rgba(43, 227, 255, 0.08);
}

.admin-body .admin-live-btn.is-paused {
  color: #FFC24B;
  border-color: rgba(255, 194, 75, 0.45);
  background-color: rgba(255, 194, 75, 0.08);
}

.admin-live-btn.is-spinning i {
  animation: adminSpin 0.9s linear infinite;
}

@keyframes adminSpin {
  to { transform: rotate(360deg); }
}

/* --- Card change flash ---------------------------------------------------- */
.admin-progress-card--pulse {
  animation: adminCardPulse 1.5s ease;
}

@keyframes adminCardPulse {
  0% {
    border-color: #2BE3FF;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(43, 227, 255, 0.55);
  }
  55% {
    border-color: #2BE3FF;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6), 0 0 0 5px rgba(43, 227, 255, 0.12);
  }
  100% {
    border-color: #1E3A47;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(43, 227, 255, 0);
  }
}

.admin-sp-online {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.4rem;
  vertical-align: middle;
  border-radius: 50%;
  background-color: #2FD98A;
  box-shadow: 0 0 8px rgba(47, 217, 138, 0.9);
}

.admin-sp-card-id {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.admin-progress-card-name,
.admin-progress-card-course {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* At-risk fills stay red instead of picking up the global neon gradient. */
.admin-progress-card .admin-progress-fill.red,
.admin-sp-lesson-row .admin-progress-fill.red {
  background-image: linear-gradient(90deg, #FF5C7A, #B32444);
  box-shadow: 0 0 12px rgba(255, 92, 122, 0.45);
}

/* --- Detail modal --------------------------------------------------------- */
.admin-sp-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem;
  font-family: var(--ct-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ct-dim);
}

.admin-sp-detail-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--ct-line);
}

.admin-sp-detail-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ct-text);
}

.admin-sp-detail-email {
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  color: var(--ct-dim);
}

.admin-sp-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.admin-sp-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.35rem;
  background-color: rgba(5, 7, 10, 0.65);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
}

.admin-sp-metric-value {
  font-family: var(--ct-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ct-cyan);
}

.admin-sp-metric-label {
  font-family: var(--ct-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ct-dim);
}

.admin-sp-lesson-row {
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.5rem;
  background-color: rgba(5, 7, 10, 0.5);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
}

.admin-sp-lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.admin-sp-lesson-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ct-text);
}

.admin-sp-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-top: 0.45rem;
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--ct-dim);
}

.admin-sp-activity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(30, 58, 71, 0.55);
}

.admin-sp-activity:last-child { border-bottom: none; }

.admin-sp-activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  font-size: 0.6rem;
  border-radius: 50%;
}

.admin-sp-activity-icon.is-pass { background-color: rgba(61, 255, 160, 0.14); color: #3DFFA0; }
.admin-sp-activity-icon.is-fail { background-color: rgba(255, 92, 122, 0.14); color: #FF5C7A; }

.admin-sp-activity-body {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-sp-activity-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ct-text);
}

.admin-sp-activity-sub {
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  color: var(--ct-dim);
}

.admin-sp-activity-score {
  font-family: var(--ct-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ct-muted);
}

.admin-sp-empty-note {
  padding: 0.9rem;
  text-align: center;
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  color: var(--ct-dim);
  background-color: rgba(5, 7, 10, 0.5);
  border: 1px dashed rgba(43, 227, 255, 0.22);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .admin-sp-metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-live-actions { margin-left: 0; width: 100%; }
}

/* --- Fixes surfaced by the progress monitor ------------------------------- */

/* `.admin-nav-item.admin-active` set background-color to the brand cyan and
   then the identity layer re-coloured the text cyan too, so the active nav
   item rendered as a blank cyan block on every instructor page. */
.admin-nav-item.admin-active {
  background-color: rgba(43, 227, 255, 0.14);
  background-image: linear-gradient(90deg, rgba(43, 227, 255, 0.22), rgba(43, 227, 255, 0.02));
  color: var(--ct-cyan);
  box-shadow: inset 2px 0 0 var(--ct-cyan);
}

/* Long student names in the "Top Student" stat card should truncate, not wrap
   into a second line that collides with the subtext. */
.admin-stats-grid .admin-stat-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   SUBMISSIONS · REMEDIAL EXERCISES
   Shared bits for the review table and the remedial authoring form.
   ========================================================================== */

.admin-tab-count {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  line-height: 1.3;
  color: var(--ct-dim);
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.admin-tab-btn.admin-active .admin-tab-count {
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.16);
}

/* "a remedial already exists for this student + exercise" marker */
.admin-sub-remedial-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.55rem;
  color: #3DFFA0;
  background-color: rgba(61, 255, 160, 0.14);
  border-radius: 50%;
}

.admin-sub-prose {
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--ct-muted);
  background-color: rgba(5, 7, 10, 0.5);
  border: 1px solid var(--ct-line);
  border-radius: 8px;
}

.admin-sub-unassigned {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--ct-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--ct-dim);
}

.admin-sub-unassigned i { color: #FFC24B; }

.admin-sub-muted { color: var(--ct-dim); }

.admin-sp-activity.is-current {
  background-color: rgba(43, 227, 255, 0.06);
  border-radius: 6px;
}

.admin-form-error {
  margin-top: 0.9rem;
  padding: 0.6rem 0.75rem;
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  color: #FF6B85;
  background-color: rgba(255, 92, 122, 0.1);
  border: 1px solid rgba(255, 92, 122, 0.4);
  border-radius: 8px;
}

/* Date / time cell: the date is the anchor, the time + relative hint is chrome. */
.admin-sub-when {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ct-text);
  white-space: nowrap;
}

.admin-sub-when-time {
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--ct-dim);
  white-space: nowrap;
}

.admin-sub-when.is-overdue { color: #FF6B85; }

/* ============================================================================
   STUDENT · REMEDIAL WORK
   Compact task cards shown above the lesson grid when work is outstanding.
   ========================================================================== */

.lessons-remedial-list {
  display: grid;
  gap: 0.6rem;
}

.lessons-remedial-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  background-color: rgba(14, 19, 27, 0.75);
  border: 1px solid var(--ct-line);
  border-left: 3px solid var(--ct-amber);
  border-radius: 10px;
}

.lessons-remedial-card.is-overdue {
  border-left-color: var(--ct-red);
  background-color: rgba(255, 92, 122, 0.05);
}

.lessons-remedial-icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
  color: var(--ct-amber);
}

.lessons-remedial-card.is-overdue .lessons-remedial-icon { color: var(--ct-red); }

.lessons-remedial-body {
  flex: 1 1 auto;
  min-width: 0;
}

.lessons-remedial-title {
  font-family: var(--ct-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ct-text);
}

.lessons-remedial-desc {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ct-muted);
  white-space: pre-wrap;
}

.lessons-remedial-meta {
  margin-top: 0.35rem;
  font-family: var(--ct-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-dim);
}

.lessons-remedial-badge {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.2rem 0.5rem;
  font-family: var(--ct-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ct-amber);
  background-color: rgba(255, 194, 75, 0.12);
  border: 1px solid rgba(255, 194, 75, 0.45);
  border-radius: 999px;
}

.lessons-remedial-badge.is-overdue {
  color: var(--ct-red);
  background-color: rgba(255, 92, 122, 0.12);
  border-color: rgba(255, 92, 122, 0.5);
}

.lessons-remedial-start {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.55rem;
  padding: 0.35rem 0.7rem;
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0A0F16;
  background-color: var(--ct-amber);
  border-radius: 6px;
}
.lessons-remedial-start .material-symbols-outlined { font-size: 0.95rem; }
.lessons-remedial-start:hover,
.lessons-remedial-start:focus-visible { filter: brightness(1.1); outline: 2px solid var(--ct-amber); outline-offset: 2px; }

@media (max-width: 640px) {
  .lessons-remedial-card { flex-wrap: wrap; }
  .lessons-remedial-badge { align-self: flex-start; }
}

/* Table row actions: give the icon buttons a real hit area and hover state. */
.admin-body .admin-action-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.8rem;
  color: var(--ct-muted);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.admin-body .admin-action-buttons button:hover {
  color: var(--ct-cyan);
  background-color: rgba(43, 227, 255, 0.1);
  border-color: rgba(43, 227, 255, 0.35);
}

/* =====================================================================
   XP AWARDS (student exercise page)
   XP is granted once per exercise, so the UI has three states to show:
   a first-time award, a repeat pass worth nothing, and a level-up.
   ===================================================================== */

.exercise-level-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9FD8FF;
  background-color: #0F2029;
  border: 1px solid #2E6C8A;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.exercise-xp-pill.is-earned {
  color: #9FB3C4;
  background-color: #16232B;
  border-color: #3A4E5C;
}

.exercise-xp-pill.is-earned .material-symbols-outlined {
  color: #6E8799;
}

.exercise-xp-award {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.9rem;
  border-radius: 0.375rem;
  border: 1px dashed #3A4E5C;
  background-color: #0F1A21;
  color: #C6D6E3;
  font-size: 0.78rem;
  line-height: 1.5;
}

.exercise-xp-award .material-symbols-outlined {
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.exercise-xp-award-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.exercise-xp-award-body strong {
  font-size: 0.85rem;
}

.exercise-xp-award-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #7B93A8;
}

.exercise-xp-award.is-new {
  border-style: solid;
  border-color: #1FBF74;
  background-color: rgba(61, 255, 160, 0.1);
  color: #7FF0B4;
}

.exercise-xp-award.is-new .material-symbols-outlined {
  color: #A3FF12;
}

.exercise-xp-award.is-repeat {
  border-color: #3A4E5C;
  color: #9FB3C4;
}

.exercise-xp-award.is-repeat .material-symbols-outlined {
  color: #6E8799;
}

.exercise-xp-award.is-levelup {
  border-style: solid;
  border-color: #FFC53D;
  background-color: rgba(255, 197, 61, 0.12);
  color: #FFD97A;
}

.exercise-xp-award.is-levelup .material-symbols-outlined {
  color: #FFC53D;
}

@media (max-width: 720px) {
  .exercise-level-pill {
    display: none;
  }
}

/* Small "N XP to level X" caption under the dashboard XP meter. */
.student-dashboard-xp-next {
  font-family: var(--ct-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--ct-dim);
  text-align: center;
  min-height: 1em;
}

/* The mini profile card stacks level / XP / meter / caption with no gap by
   default, which made the caption collide with the meter. */
.student-dashboard-profile-card-mini {
  gap: 0.4rem;
}
.student-dashboard-profile-card-mini .student-dashboard-xp-progress-bar {
  width: 100%;
}

/* =====================================================================
   PROFILE SCREEN (shared by Student, Instructor and Administrator)
   Markup: config/profile_view.php   Behaviour: assets/js/profile.js
   Every rule is scoped under .cs-profile so it outranks the admin reset
   `.admin-body button { background:none; border:none }` (0,1,1) and
   `.admin-body * { margin:0; padding:0 }` (0,1,0).
   ===================================================================== */

.cs-profile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  max-width: 1180px;
  color: #C6D6E3;
}

.cs-profile * {
  box-sizing: border-box;
}

/* The components below set `display`, which outranks the UA style for the
   [hidden] attribute. Without this, anything toggled with `hidden` (the
   loading veil, the avatar spinner, field errors, the strength meter) would
   stay visible. */
.cs-profile [hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- heading */
.cs-profile .cs-profile-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cs-profile .cs-profile-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: #2BE3FF;
  text-transform: uppercase;
}

.cs-profile .cs-profile-title {
  font-family: 'Hanken Grotesk', 'Inter', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
  color: #EAF4FF;
  margin: 0;
}

.cs-profile .cs-profile-subtitle {
  font-size: 0.86rem;
  color: #7B93A8;
  margin: 0;
}

/* ------------------------------------------------------------------- hero */
.cs-profile .cs-profile-hero {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid #1E3A47;
  border-radius: 14px;
  background-image: linear-gradient(140deg, rgba(43, 227, 255, 0.08), rgba(163, 255, 18, 0.04));
  background-color: #0C141B;
  flex-wrap: wrap;
}

.cs-profile .cs-profile-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cs-profile .cs-profile-avatar {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(43, 227, 255, 0.45);
  background-color: #0A0F16;
  box-shadow: 0 0 0 4px rgba(43, 227, 255, 0.06), 0 0 22px rgba(43, 227, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-profile .cs-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-profile .cs-profile-avatar-fallback {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #2BE3FF;
}

.cs-profile .cs-profile-avatar-busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 15, 22, 0.72);
}

.cs-profile .cs-profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cs-profile .cs-profile-avatar-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #6E8799;
  text-align: center;
  max-width: 170px;
  line-height: 1.4;
}

.cs-profile .cs-profile-identity {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 260px;
}

.cs-profile .cs-profile-name {
  font-family: 'Hanken Grotesk', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #EAF4FF;
  line-height: 1.2;
  margin: 0;
  word-break: break-word;
}

.cs-profile .cs-profile-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #8FA7B8;
  margin: 0;
  word-break: break-all;
}

.cs-profile .cs-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.cs-profile .cs-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #2E4655;
  color: #9FB3C4;
  background-color: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.cs-profile .cs-chip-role {
  color: #0A0F16;
  background-color: #2BE3FF;
  border-color: #2BE3FF;
}

.cs-profile .cs-chip-quiet {
  color: #6E8799;
}

.cs-profile .cs-chip-warn {
  color: #FFD97A;
  border-color: #8A6B1F;
  background-color: rgba(255, 197, 61, 0.12);
}

/* ------------------------------------------------------------------ stats */
.cs-profile .cs-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
}

.cs-profile .cs-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid #1E3A47;
  border-radius: 12px;
  background-color: #0C141B;
  min-height: 92px;
  justify-content: center;
}

.cs-profile .cs-stat-icon {
  font-size: 1.15rem;
  color: #2BE3FF;
  line-height: 1;
}

.cs-profile .cs-stat-value {
  font-family: 'Hanken Grotesk', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #EAF4FF;
  line-height: 1.1;
}

.cs-profile .cs-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7B93A8;
}

.cs-profile .cs-stat-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #5E7488;
  margin-top: 0.1rem;
}

/* ------------------------------------------------------------------ cards */
.cs-profile .cs-profile-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.cs-profile .cs-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid #1E3A47;
  border-radius: 14px;
  background-color: #0C141B;
}

.cs-profile .cs-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #16262F;
}

.cs-profile .cs-card-title {
  font-family: 'Hanken Grotesk', 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #EAF4FF;
  margin: 0;
}

.cs-profile .cs-card-sub {
  font-size: 0.74rem;
  color: #7B93A8;
  margin: 0.15rem 0 0;
  line-height: 1.45;
}

.cs-profile .cs-card-icon {
  font-size: 1.2rem;
  color: #2E6C8A;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ forms */
.cs-profile .cs-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cs-profile .cs-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cs-profile .cs-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.cs-profile .cs-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8FA7B8;
}

.cs-profile .cs-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #EAF4FF;
  background-color: #0A1218;
  border: 1px solid #24404F;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cs-profile .cs-input::placeholder {
  color: #4E6474;
}

.cs-profile .cs-input:focus {
  border-color: #2BE3FF;
  box-shadow: 0 0 0 3px rgba(43, 227, 255, 0.15);
}

.cs-profile .cs-input.is-invalid {
  border-color: #FF5C7A;
  box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.14);
}

.cs-profile .cs-input-readonly {
  color: #7B93A8;
  background-color: #0C161D;
  cursor: not-allowed;
}

.cs-profile .cs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cs-profile .cs-input-wrap .cs-input {
  padding-right: 2.4rem;
}

.cs-profile .cs-reveal {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6E8799;
  cursor: pointer;
  line-height: 1;
}

.cs-profile .cs-reveal:hover {
  color: #2BE3FF;
  background-color: rgba(43, 227, 255, 0.1);
}

.cs-profile .cs-reveal .material-symbols-outlined {
  font-size: 1.05rem;
}

.cs-profile .cs-hint {
  font-size: 0.68rem;
  color: #6E8799;
  line-height: 1.45;
  margin: 0;
}

.cs-profile .cs-field-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #FF8FA3;
  line-height: 1.4;
  margin: 0;
}

.cs-profile .cs-form-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

.cs-profile .cs-saved-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  color: #3DFFA0;
  letter-spacing: 0.05em;
}

/* ----------------------------------------------------------------- buttons */
.cs-profile .cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.95rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.cs-profile .cs-btn .material-symbols-outlined {
  font-size: 1rem;
}

.cs-profile .cs-btn-primary {
  background-color: #2BE3FF;
  border-color: #2BE3FF;
  color: #06131A;
}

.cs-profile .cs-btn-primary:hover:not(:disabled) {
  background-color: #6DECFF;
  border-color: #6DECFF;
}

.cs-profile .cs-btn-ghost {
  background-color: rgba(43, 227, 255, 0.08);
  border-color: #2E6C8A;
  color: #9FD8FF;
}

.cs-profile .cs-btn-ghost:hover:not(:disabled) {
  background-color: rgba(43, 227, 255, 0.16);
  border-color: #2BE3FF;
}

.cs-profile .cs-btn-quiet {
  background-color: transparent;
  border-color: #24404F;
  color: #8FA7B8;
}

.cs-profile .cs-btn-quiet:hover:not(:disabled) {
  color: #EAF4FF;
  border-color: #3A5E72;
}

.cs-profile .cs-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.68rem;
}

.cs-profile .cs-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* -------------------------------------------------------- strength meter */
.cs-profile .cs-strength {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cs-profile .cs-strength-track {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background-color: #16262F;
  overflow: hidden;
}

.cs-profile .cs-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background-color: #FF5C7A;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.cs-profile .cs-strength-fill.is-0 { background-color: #FF5C7A; }
.cs-profile .cs-strength-fill.is-1 { background-color: #FF8A5C; }
.cs-profile .cs-strength-fill.is-2 { background-color: #FFC53D; }
.cs-profile .cs-strength-fill.is-3 { background-color: #8FD32B; }
.cs-profile .cs-strength-fill.is-4 { background-color: #3DFFA0; }

.cs-profile .cs-strength-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #7B93A8;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ misc */
.cs-profile .cs-profile-footnote {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #5E7488;
  line-height: 1.5;
  margin: 0;
}

.cs-profile .cs-profile-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: rgba(10, 15, 22, 0.82);
  border-radius: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #8FA7B8;
  z-index: 5;
}

.cs-profile .cs-profile-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(43, 227, 255, 0.25);
  border-top-color: #2BE3FF;
  border-radius: 50%;
  animation: cs-profile-spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes cs-profile-spin {
  to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------------- toasts */
.cs-toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
  pointer-events: none;
}

.cs-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 340px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #24404F;
  background-color: #0C141B;
  color: #C6D6E3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.cs-toast .material-symbols-outlined {
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.cs-toast.is-success {
  border-color: #1FBF74;
  color: #7FF0B4;
}

.cs-toast.is-success .material-symbols-outlined {
  color: #3DFFA0;
}

.cs-toast.is-error {
  border-color: #B34B5F;
  color: #FFB3C1;
}

.cs-toast.is-error .material-symbols-outlined {
  color: #FF5C7A;
}

.cs-toast.is-info .material-symbols-outlined {
  color: #2BE3FF;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cs-profile .cs-profile-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .cs-profile .cs-profile-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-profile .cs-profile-avatar-block {
    align-items: flex-start;
  }

  .cs-profile .cs-profile-avatar-actions {
    justify-content: flex-start;
  }

  .cs-profile .cs-form-row {
    grid-template-columns: 1fr;
  }

  .cs-profile .cs-profile-title {
    font-size: 1.55rem;
  }

  .cs-profile .cs-profile-name {
    font-size: 1.3rem;
  }
}

/* Drag handle to resize the Output / Result panel */
.exercise-console-resizer {
  height: 10px;
  margin-top: -5px;
  cursor: ns-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  touch-action: none;
}
.exercise-console-resizer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 44px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: #33465A;
}
.exercise-console-resizer:hover::after,
.exercise-console-resizer:focus-visible::after,
.exercise-console-resizer:active::after { background: #0F8CA8; }
.exercise-console-resizer:focus-visible { outline: none; }
.exercise-console { min-height: 0; }
.exercise-console-body { min-height: 0; }

/* =========================================================================
   Announcements (shared by student / instructor / admin)
   ========================================================================= */
.cs-ann { max-width: 920px; margin: 0 auto; padding: 1.5rem 1rem 3rem; color: var(--ct-text, #E8F6FF); }
.cs-ann-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cs-ann-tag { margin: 0 0 .25rem; font: 600 .75rem var(--ct-mono, monospace); color: var(--ct-cyan, #2BE3FF); letter-spacing: .08em; }
.cs-ann-title { margin: 0; font: 800 1.9rem var(--ct-display, sans-serif); }
.cs-ann-subtitle { margin: .35rem 0 0; color: var(--ct-muted, #93ACBF); }
.cs-ann-list { display: flex; flex-direction: column; gap: 1rem; }
.cs-ann-empty { padding: 2rem; text-align: center; color: var(--ct-muted, #93ACBF); border: 1px dashed var(--ct-line, #1E3A47); border-radius: 12px; }
.cs-ann-card { padding: 1.25rem 1.4rem; background: var(--ct-surface, #0E131B); border: 1px solid var(--ct-line, #1E3A47); border-radius: 12px; }
.cs-ann-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.cs-ann-card-title { margin: 0; font: 700 1.2rem var(--ct-display, sans-serif); overflow-wrap: anywhere; }
.cs-ann-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cs-ann-meta { margin: .4rem 0 .9rem; font: 500 .75rem var(--ct-mono, monospace); color: var(--ct-dim, #7B93A8); }
.cs-ann-role { padding: .05rem .45rem; border: 1px solid var(--ct-line, #1E3A47); border-radius: 999px; color: var(--ct-cyan, #2BE3FF); }
.cs-ann-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: var(--ct-muted, #93ACBF); }

.cs-ann-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; font: 700 .8rem var(--ct-mono, monospace); color: var(--ct-text, #E8F6FF); background: transparent; border: 1px solid var(--ct-line, #1E3A47); border-radius: 8px; cursor: pointer; }
.cs-ann-btn:hover { border-color: var(--ct-cyan, #2BE3FF); }
.cs-ann-btn:focus-visible { outline: 2px solid var(--ct-cyan, #2BE3FF); outline-offset: 2px; }
.cs-ann-btn:disabled { opacity: .55; cursor: not-allowed; }
.cs-ann-btn .material-symbols-outlined { font-size: 1.1rem; }
.cs-ann-btn-sm { padding: .35rem .7rem; font-size: .72rem; }
.cs-ann-btn-primary { background: var(--ct-cyan-deep, #0F8CA8); border-color: var(--ct-cyan-deep, #0F8CA8); color: #fff; }
.cs-ann-btn-primary:hover { filter: brightness(1.1); }
.cs-ann-btn-danger { color: var(--ct-red, #FF5C7A); border-color: rgba(255, 92, 122, .5); }
.cs-ann-btn-danger:hover { background: rgba(255, 92, 122, .12); border-color: var(--ct-red, #FF5C7A); }

.cs-ann-modal[hidden] { display: none; }
.cs-ann-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cs-ann-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 5, 9, .72); }
.cs-ann-modal-card { position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 1.5rem; background: var(--ct-surface, #0E131B); border: 1px solid var(--ct-line, #1E3A47); border-radius: 14px; box-shadow: 0 22px 60px rgba(0, 0, 0, .6); }
.cs-ann-modal-card h2 { margin: 0 0 1rem; font: 700 1.2rem var(--ct-display, sans-serif); }
.cs-ann-label { display: block; margin: .9rem 0 .3rem; font: 700 .72rem var(--ct-mono, monospace); letter-spacing: .06em; color: var(--ct-muted, #93ACBF); }
.cs-ann-input { width: 100%; box-sizing: border-box; padding: .65rem .8rem; font: 400 .95rem var(--ct-body, sans-serif); color: var(--ct-text, #E8F6FF); background: var(--ct-bg, #05070A); border: 1px solid var(--ct-line, #1E3A47); border-radius: 8px; resize: vertical; }
.cs-ann-input:focus { outline: none; border-color: var(--ct-cyan, #2BE3FF); }
.cs-ann-error { margin: .3rem 0 0; font-size: .8rem; color: var(--ct-red, #FF5C7A); }
.cs-ann-delete-text { margin: 0; color: var(--ct-muted, #93ACBF); overflow-wrap: anywhere; }
.cs-ann-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; }
body.cs-ann-lock { overflow: hidden; }

.cs-ann [hidden] { display: none !important; }

/* =========================================================================
   Student sidebar: compact sizing, scrolls instead of clipping, and stays
   usable (icon rail) on narrower screens so Settings / Logout are always
   reachable.
   ========================================================================= */
.student-dashboard-sidebar {
  box-sizing: border-box;
  height: 100vh;
  width: 232px;
  overflow: hidden;
}
.student-dashboard-profile-card-mini {
  flex: 0 0 auto;
  padding: 0.7rem 0.9rem;
  gap: 0.25rem;
}
.student-dashboard-avatar-wrapper {
  width: 56px;
  height: 56px;
  margin-bottom: 0.25rem;
}
.student-dashboard-sidebar .student-dashboard-xp-progress-bar { height: 8px; margin-top: 0.25rem; }
.student-dashboard-sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.4rem 0;
}
.student-dashboard-sidebar-item {
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  margin: 0.1rem 0.5rem;
  font-size: 0.74rem;
}
.student-dashboard-sidebar-item .material-symbols-outlined { font-size: 20px; flex: 0 0 auto; }
.student-dashboard-upgrade-btn-wrapper { margin: 0.75rem 0.75rem 0; }
.student-dashboard-upgrade-btn { padding: 0.5rem; font-size: 0.7rem; }
.student-dashboard-sidebar-footer {
  flex: 0 0 auto;
  padding: 0.4rem 0;
  border-top: 1px solid var(--ct-line, #1E3A47);
}
.student-dashboard-main,
.student-dashboard-footer { margin-left: 232px; }
/* The generic landing-page rule `main { width: 100%; max-width: 1050px;
   margin: 0 auto }` also matches the student <main>:
   - width 100% plus the sidebar margin made pages wider than the window;
   - margin-right: auto switches off flex stretching, so on small screens
     <main> grew to its content's natural width instead of the screen's.
   Undo both, so the body's flex column sizes <main> to exactly the space
   beside the sidebar. */
.student-dashboard-main {
  width: auto;
  max-width: none;
  min-width: 0;
  margin-right: 0;
}

/* Short screens: drop the optional bits so nothing is cut off. */
@media (max-height: 700px) {
  .student-dashboard-upgrade-btn-wrapper { display: none; }
  .student-dashboard-xp-next { display: none; }
}
@media (max-height: 560px) {
  .student-dashboard-profile-card-mini { display: none; }
}

/* Tablet widths: collapse to an icon rail. Phones (<=768px) get the slide-out
   drawer instead - see "Responsive shell" at the end of this file. */
@media (min-width: 769px) and (max-width: 1024px) {
  .student-dashboard-sidebar { display: flex; width: 56px; }
  .student-dashboard-main,
  .student-dashboard-footer { margin-left: 56px; }
  .student-dashboard-profile-card-mini,
  .student-dashboard-upgrade-btn-wrapper { display: none; }
  .student-dashboard-sidebar-item {
    justify-content: center;
    padding: 0.6rem 0;
    margin: 0.15rem 0.3rem;
  }
  .student-dashboard-sidebar-item > span:not(.material-symbols-outlined) {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ============================================================================
   SUBSCRIPTION PAGE - subscription.php
   Pricing hero, plan cards, comparison table and FAQ.

   Everything is namespaced under .sub-* (plus .page-subscription on <body>)
   so none of it can reach the other pages. Colours use the shared --ct-*
   palette defined near the top of this file.
   ========================================================================== */


main.sub-main {
  max-width: 1180px;
  padding: 2.75rem 1.5rem 5rem;
}

/* --- Hero ---------------------------------------------------------- */
.sub-hero {
  max-width: 780px;
  margin: 0 auto 0.5rem;
  text-align: center;
}

.sub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(43, 227, 255, 0.28);
  border-radius: 999px;
  background-color: rgba(43, 227, 255, 0.07);
  color: var(--ct-cyan);
  font-family: var(--ct-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sub-eyebrow .material-symbols-outlined {
  font-size: 0.95rem;
}

.sub-title {
  margin: 1.15rem 0 0.9rem;
  font-family: var(--ct-display);
  font-size: clamp(2rem, 4.6vw, 3.05rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ct-text);
}

.sub-title em {
  font-style: normal;
  background-image: linear-gradient(100deg, var(--ct-cyan), var(--ct-lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub-lede {
  color: var(--ct-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Billing period toggle ----------------------------------------- */
.sub-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.sub-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--ct-line);
  border-radius: 999px;
  background-color: rgba(19, 28, 38, 0.78);
}

.sub-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.sub-toggle-btn:hover {
  color: var(--ct-text);
}

.sub-toggle-btn.is-active {
  background-image: linear-gradient(135deg, rgba(43, 227, 255, 0.22), rgba(43, 227, 255, 0.05));
  box-shadow: inset 0 0 0 1px rgba(43, 227, 255, 0.42);
  color: var(--ct-cyan);
}

.sub-save {
  padding: 0.08rem 0.4rem;
  border: 1px solid rgba(163, 255, 18, 0.4);
  border-radius: 4px;
  background-color: rgba(163, 255, 18, 0.14);
  color: var(--ct-lime);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

/* --- Plan cards ---------------------------------------------------- */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 2.75rem;
}

.sub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.9rem 1.6rem 1.7rem;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  background-color: rgba(19, 28, 38, 0.62);
  background-image: linear-gradient(180deg, rgba(43, 227, 255, 0.045), rgba(19, 28, 38, 0));
  box-shadow: var(--ct-elev);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(43, 227, 255, 0.36);
  box-shadow: var(--ct-elev-lg), 0 0 30px rgba(43, 227, 255, 0.10);
}

.sub-card--featured {
  border-color: rgba(163, 255, 18, 0.42);
  box-shadow: var(--ct-elev-lg), 0 0 40px rgba(163, 255, 18, 0.12);
}

.sub-card--featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
  background-image: linear-gradient(90deg, var(--ct-cyan), var(--ct-lime));
  box-shadow: 0 0 14px rgba(43, 227, 255, 0.6);
}

.sub-card-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.22rem 0.7rem;
  border: 1px solid rgba(163, 255, 18, 0.55);
  border-radius: 999px;
  background-color: #0B1207;
  color: var(--ct-lime);
  font-family: var(--ct-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sub-plan-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sub-plan-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(43, 227, 255, 0.28);
  border-radius: 9px;
  background-color: rgba(43, 227, 255, 0.08);
  color: var(--ct-cyan);
  flex: 0 0 auto;
}

.sub-plan-icon .material-symbols-outlined {
  font-size: 1.1rem;
}

.sub-plan-name {
  font-family: var(--ct-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ct-text);
}

.sub-plan-tagline {
  margin-top: 0.85rem;
  color: var(--ct-dim);
  font-size: 0.8rem;
  line-height: 1.55;
  min-height: 2.5rem;
}

.sub-price {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  margin: 1.15rem 0 0.4rem;
}

.sub-price-currency {
  margin-bottom: 0.55rem;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 1.05rem;
}

.sub-price-amount {
  font-family: var(--ct-display);
  font-size: 2.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ct-text);
  font-variant-numeric: tabular-nums;
}

.sub-price-period {
  margin-bottom: 0.42rem;
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.68rem;
}

.sub-price-note {
  min-height: 2.1rem;
  color: var(--ct-dim);
  font-family: var(--ct-mono);
  font-size: 0.65rem;
  line-height: 1.5;
}

.sub-price-note.is-saving {
  color: var(--ct-lime);
}

.sub-rule {
  height: 1px;
  margin: 1.2rem 0 1.15rem;
  background-image: linear-gradient(90deg, rgba(43, 227, 255, 0.22), rgba(30, 58, 71, 0.1));
}

.sub-features {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.sub-feature {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: #C4D6E4;
  font-size: 0.855rem;
  line-height: 1.45;
}

.sub-feature .material-symbols-outlined {
  flex: 0 0 auto;
  margin-top: 0.08rem;
  color: var(--ct-cyan);
  font-size: 1rem;
}

.sub-feature--muted {
  color: var(--ct-dim);
}

.sub-feature--muted .material-symbols-outlined {
  color: #3E5566;
}

/* --- CTA buttons --------------------------------------------------- */
.sub-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: auto;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(43, 227, 255, 0.45);
  border-radius: 10px;
  background-color: rgba(43, 227, 255, 0.1);
  color: var(--ct-cyan);
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sub-cta .material-symbols-outlined {
  font-size: 1rem;
}

.sub-cta:hover {
  background-color: rgba(43, 227, 255, 0.2);
  box-shadow: 0 0 22px rgba(43, 227, 255, 0.25);
}

.sub-cta--primary {
  border-color: rgba(163, 255, 18, 0.55);
  background-image: linear-gradient(135deg, var(--ct-lime) 0%, #6FE000 100%);
  color: #12210A;
  box-shadow: 0 0 0 1px rgba(163, 255, 18, 0.25), 0 10px 26px rgba(163, 255, 18, 0.16);
}

.sub-cta--primary:hover {
  background-color: transparent;
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(163, 255, 18, 0.35), 0 12px 30px rgba(163, 255, 18, 0.24);
}

.sub-cta:active {
  transform: translateY(1px);
}

/* --- Section headings ---------------------------------------------- */
.sub-section-head {
  margin-bottom: 1.5rem;
  text-align: center;
}

.sub-section-kicker {
  color: var(--ct-cyan);
  font-family: var(--ct-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sub-section-title {
  margin-top: 0.55rem;
  font-family: var(--ct-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ct-text);
}

/* --- Comparison table ---------------------------------------------- */
.sub-compare {
  margin-top: 4.25rem;
}

.sub-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  background-color: rgba(19, 28, 38, 0.5);
}

table.sub-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.sub-table th,
.sub-table td {
  padding: 0.8rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(30, 58, 71, 0.7);
}

.sub-table thead th {
  background-color: rgba(5, 7, 10, 0.6);
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sub-table tbody tr:last-child td {
  border-bottom: 0;
}

.sub-table tbody tr:hover {
  background-color: rgba(43, 227, 255, 0.04);
}

.sub-table td:not(:first-child),
.sub-table th:not(:first-child) {
  text-align: center;
}

.sub-table .is-featured-col {
  background-color: rgba(163, 255, 18, 0.04);
  color: var(--ct-lime);
}

.sub-table .sub-cell-yes {
  color: var(--ct-cyan);
  font-size: 1rem;
  vertical-align: middle;
}

.sub-table .sub-cell-no {
  color: #3E5566;
  font-size: 1rem;
  vertical-align: middle;
}

.sub-table .sub-cell-text {
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-size: 0.72rem;
}

/* --- FAQ ------------------------------------------------------------ */
.sub-faq {
  display: grid;
  gap: 0.7rem;
  max-width: 820px;
  margin: 4.25rem auto 0;
}

.sub-faq-item {
  overflow: hidden;
  border: 1px solid var(--ct-line);
  border-radius: 12px;
  background-color: rgba(19, 28, 38, 0.55);
  transition: border-color 0.15s ease;
}

.sub-faq-item:hover {
  border-color: rgba(43, 227, 255, 0.3);
}

.sub-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
  color: var(--ct-text);
  font-size: 0.88rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.sub-faq-item summary::-webkit-details-marker {
  display: none;
}

.sub-faq-item summary:focus-visible {
  outline: 2px solid var(--ct-cyan);
  outline-offset: -2px;
}

.sub-faq-item summary .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--ct-cyan);
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.sub-faq-item[open] summary .material-symbols-outlined {
  transform: rotate(45deg);
}

.sub-faq-body {
  padding: 0 1.2rem 1.1rem;
  color: var(--ct-muted);
  font-size: 0.855rem;
  line-height: 1.7;
}

/* --- Footnote / contact strip --------------------------------------- */
.sub-note {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 2.75rem;
  padding: 1rem 1.2rem;
  border: 1px dashed rgba(43, 227, 255, 0.3);
  border-radius: 12px;
  background-color: rgba(43, 227, 255, 0.05);
  color: var(--ct-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.sub-note .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--ct-cyan);
  font-size: 1.05rem;
}

.sub-note a {
  color: var(--ct-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Toast ---------------------------------------------------------- */
.sub-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 60;
  padding: 0.8rem 1.15rem;
  border: 1px solid rgba(43, 227, 255, 0.4);
  border-radius: 10px;
  background-color: #0B1219;
  color: var(--ct-text);
  font-family: var(--ct-mono);
  font-size: 0.72rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 1.25rem);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.sub-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 980px) {
  .sub-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .sub-card--featured {
    order: -1;
  }

  .sub-plan-tagline,
  .sub-price-note {
    min-height: 0;
  }

  .sub-compare,
  .sub-faq {
    margin-top: 3rem;
  }
}

@media (max-width: 520px) {
  main.sub-main {
    padding: 1.75rem 1rem 3.5rem;
  }

  /* The shared header keeps 2rem gaps, which overflows once the theme
     toggle joins the icon cluster on a narrow phone. */
  .page-subscription header .nav-links {
    gap: 1rem;
  }

  .sub-toggle-btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.64rem;
  }

  .sub-price-amount {
    font-size: 2.2rem;
  }
}

/* ============================================================================
   Tutor feedback panel (student/Coding-Exercise.php)
   The grader's verdict sits in .exercise-result-banner; this panel explains
   *why* an attempt failed, pointing at the student's own code.
   ========================================================================== */
.tutor-panel {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #1E3A47;
  border-left: 3px solid #2BE3FF;
  border-radius: 0.375rem;
  background: rgba(43, 227, 255, 0.05);
  color: #E8F6FF;
  font-size: 0.82rem;
  line-height: 1.6;
}
.tutor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.6rem;
}
.tutor-head .material-symbols-outlined { color: #2BE3FF; font-size: 1.15rem; }
.tutor-title { font-weight: 800; letter-spacing: 0.02em; }
.tutor-chip {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid #1E3A47;
  border-radius: 999px;
  color: #93ACBF;
}
.tutor-chip.is-cat { color: #FFC24B; border-color: rgba(255, 194, 75, 0.45); }
.tutor-headline { font-size: 0.92rem; font-weight: 700; margin: 0 0 0.5rem; }
.tutor-section { margin-top: 0.75rem; }
.tutor-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7B93A8;
  margin-bottom: 0.25rem;
}
.tutor-panel p { margin: 0; }
.tutor-panel code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
  padding: 0.05rem 0.3rem;
  border-radius: 0.2rem;
  background: #0F151D;
  border: 1px solid #22323F;
  color: #A3FF12;
}
.tutor-code {
  display: flex;
  align-items: stretch;
  margin: 0.35rem 0 0;
  border: 1px solid #22323F;
  border-radius: 0.3rem;
  background: #0F151D;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  overflow-x: auto;
}
.tutor-code-line {
  flex: 0 0 auto;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-right: 1px solid #22323F;
  background: rgba(255, 92, 122, 0.12);
  color: #FF7AD9;
  font: inherit;
  cursor: pointer;
}
.tutor-code-line:hover { background: rgba(255, 92, 122, 0.22); }
.tutor-code pre { margin: 0; padding: 0.45rem 0.7rem; white-space: pre; color: #E8F6FF; }
.tutor-list { margin: 0; padding-left: 1.1rem; }
.tutor-list li { margin: 0.15rem 0; }
.tutor-strengths li::marker { color: #3DFFA0; }
.tutor-hint {
  margin: 0.3rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 0.3rem;
  background: rgba(163, 255, 18, 0.06);
  border: 1px solid rgba(163, 255, 18, 0.25);
}
.tutor-hint strong { color: #A3FF12; margin-right: 0.3rem; }
.tutor-more {
  margin-top: 0.45rem;
  padding: 0.3rem 0.7rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: #2BE3FF;
  background: transparent;
  border: 1px solid #0F8CA8;
  border-radius: 0.3rem;
  cursor: pointer;
}
.tutor-more:hover { background: rgba(43, 227, 255, 0.1); }
.tutor-question { font-style: italic; color: #C9E6F5; }
.tutor-foot { margin-top: 0.75rem; font-size: 0.68rem; color: #7B93A8; }

/* =====================================================================
   Achievements & badges (dashboard grid + exercise unlock banner)
   ===================================================================== */
.exercise-xp-award.is-badge {
  border-style: solid;
  border-color: var(--ct-violet, #C77DFF);
  background-color: rgba(199, 125, 255, 0.12);
  color: #E2C2FF;
}

.exercise-xp-award.is-badge .material-symbols-outlined {
  color: var(--ct-violet, #C77DFF);
}

.student-dashboard-badges {
  margin-top: 2rem;
}

.student-dashboard-badges-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #7B93A8;
}

.student-dashboard-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.9rem;
}

.student-dashboard-badge-empty {
  color: #7B93A8;
  font-size: 0.85rem;
}

.student-dashboard-badge {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.9rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  min-width: 0;
}

.student-dashboard-badge-icon {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  background-color: #080C11;
  color: #4A6274;
  overflow: hidden;
}

.student-dashboard-badge-icon .material-symbols-outlined {
  font-size: 1.35rem;
}

.student-dashboard-badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) opacity(0.5);
}

.student-dashboard-badge-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 auto;
}

.student-dashboard-badge-body strong {
  font-size: 0.9rem;
  color: #A9C0D2;
}

.student-dashboard-badge-body > span {
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.4;
}

.student-dashboard-badge-body .student-dashboard-badge-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #7B93A8;
}

.student-dashboard-badge-bar {
  height: 4px;
  margin-top: 0.3rem;
  background-color: #131C26;
  border-radius: 2px;
  overflow: hidden;
}

.student-dashboard-badge-bar > div {
  height: 100%;
  background-color: #2BE3FF;
}

/* Earned: full colour. Locked badges stay muted so progress is the focus. */
.student-dashboard-badge.is-earned {
  border-color: rgba(199, 125, 255, 0.55);
}

.student-dashboard-badge.is-earned .student-dashboard-badge-icon {
  border-color: #C77DFF;
  background-color: rgba(199, 125, 255, 0.14);
  color: #C77DFF;
}

.student-dashboard-badge.is-earned .student-dashboard-badge-icon img {
  filter: none;
}

.student-dashboard-badge.is-earned .student-dashboard-badge-body strong {
  color: #E8F6FF;
}

.student-dashboard-badge.is-earned .student-dashboard-badge-status {
  color: #C77DFF;
}

/* =====================================================================
   Boss battles - student list, battle page, instructor editor
   ===================================================================== */
.boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.boss-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.1rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  color: #A9C0D2;
  text-decoration: none;
  transition: transform 0.1s ease, border-color 0.15s ease;
  min-width: 0;
}

a.boss-card:hover {
  border-color: #C77DFF;
  transform: translateY(-2px);
}

.boss-card.is-locked {
  opacity: 0.75;
  border-style: dashed;
}

.boss-card.is-defeated {
  border-color: rgba(61, 255, 160, 0.45);
}

.boss-card-top {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.boss-card-icon {
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 2px solid #C77DFF;
  background-color: rgba(199, 125, 255, 0.12);
  color: #C77DFF;
}

.boss-card.is-locked .boss-card-icon {
  border-color: #3A4E5C;
  background-color: #080C11;
  color: #6E8799;
}

.boss-card.is-defeated .boss-card-icon {
  border-color: #3DFFA0;
  background-color: rgba(61, 255, 160, 0.1);
  color: #3DFFA0;
}

.boss-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #E8F6FF;
}

.boss-card-tagline,
.boss-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #93ACBF;
  font-style: italic;
  line-height: 1.45;
}

.boss-tagline {
  margin: -0.4rem 0 0.8rem;
}

.boss-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.boss-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border: 1px solid #1E3A47;
  border-radius: 999px;
  background-color: #080C11;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  color: #93ACBF;
}

.boss-chip.is-easy { border-color: #1FBF74; color: #7FF0B4; }
.boss-chip.is-medium { border-color: #FFC24B; color: #FFD97A; }
.boss-chip.is-hard { border-color: #FF5C7A; color: #FF9AAD; }
.boss-chip.is-xp { border-color: #A3FF12; color: #C6FF6B; }

.boss-card-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.boss-card-status .material-symbols-outlined { font-size: 1.05rem; }
.boss-card-status.is-ready { color: #2BE3FF; }
.boss-card-status.is-locked { color: #93ACBF; }
.boss-card-status.is-defeated { color: #3DFFA0; }

.boss-prereq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.boss-prereq-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #93ACBF;
  line-height: 1.4;
}

.boss-prereq-list li .material-symbols-outlined {
  font-size: 0.95rem;
  color: #4A6274;
}

.boss-prereq-list li.is-met {
  color: #7FF0B4;
}

.boss-prereq-list li.is-met .material-symbols-outlined {
  color: #3DFFA0;
}

.boss-prereq-list.is-large li {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

/* Battle page */
.boss-fight-btn {
  background-color: #7B2CBF;
  border-color: #C77DFF;
}

.boss-sample {
  margin-bottom: 0.7rem;
}

.boss-sample-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #A9C0D2;
  margin-bottom: 0.3rem;
}

.boss-sample-io,
.boss-result-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.boss-sample-io span,
.boss-result-detail span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6E8799;
  margin-bottom: 0.2rem;
}

.boss-sample-io pre,
.boss-result-detail pre {
  margin: 0;
  padding: 0.5rem 0.65rem;
  background-color: #05070A;
  border-radius: 0.375rem;
  color: #A9C0D2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.boss-hidden-note {
  font-size: 0.75rem;
  color: #93ACBF;
  line-height: 1.5;
  margin: 0.2rem 0 1rem;
}

.boss-results {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.boss-result {
  padding: 0.55rem 0.75rem;
  border: 1px solid #1E3A47;
  border-left-width: 3px;
  border-radius: 0.375rem;
  background-color: #0B1118;
}

.boss-result-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #C6D6E3;
}

.boss-result-head .material-symbols-outlined { font-size: 1.05rem; }
.boss-result-status { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; }
.boss-result-error { margin-top: 0.35rem; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: #FF9AAD; }
.boss-result-detail { margin-top: 0.5rem; }

.boss-result.is-passed { border-left-color: #3DFFA0; }
.boss-result.is-passed .material-symbols-outlined,
.boss-result.is-passed .boss-result-status { color: #3DFFA0; }
.boss-result.is-wrong,
.boss-result.is-error { border-left-color: #FF5C7A; }
.boss-result.is-wrong .material-symbols-outlined,
.boss-result.is-wrong .boss-result-status,
.boss-result.is-error .material-symbols-outlined,
.boss-result.is-error .boss-result-status { color: #FF5C7A; }
.boss-result.is-timeout { border-left-color: #FFC24B; }
.boss-result.is-timeout .material-symbols-outlined,
.boss-result.is-timeout .boss-result-status { color: #FFC24B; }
.boss-result.is-skipped { opacity: 0.6; }

.boss-victory {
  border-color: #C77DFF;
}

/* Instructor editor */
.boss-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.6rem 0;
}

.boss-editor-row {
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  padding: 0.6rem;
  background-color: #0A0F16;
}

.boss-prereq-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 2fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.boss-test-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.boss-test-head .admin-form-input { flex: 1 1 auto; }

.boss-test-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #2BE3FF;
  min-width: 2rem;
}

.boss-test-hidden {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  white-space: nowrap;
  color: #A9C0D2;
}

.boss-test-io {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.boss-test-io label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #93ACBF;
}

.boss-editor-remove {
  border: 2px solid #1E3A47;
  background: #121A24;
  color: #FF5C7A;
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
}

.boss-editor-add {
  border: 2px dashed #1E3A47;
  background: transparent;
  color: #2BE3FF;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.3rem;
}

.boss-editor-add:hover { border-color: #2BE3FF; }
.boss-editor-add:disabled { opacity: 0.5; cursor: wait; }

.boss-check-summary {
  margin-top: 0.7rem;
  padding: 0.6rem 0.8rem;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid;
}

.boss-check-summary.is-pass { border-color: #3DFFA0; color: #3DFFA0; }
.boss-check-summary.is-fail { border-color: #FF5C7A; color: #FF5C7A; }

.boss-check-row {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #A9C0D2;
}

.boss-check-row.is-passed strong { color: #3DFFA0; }
.boss-check-row:not(.is-passed) strong { color: #FF5C7A; }

.boss-check-row pre {
  margin: 0.3rem 0 0;
  padding: 0.5rem;
  background: #05070A;
  font-size: 0.72rem;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .boss-prereq-row,
  .boss-test-io {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Student pages on phones / narrow tablets.
   The redesign block above sets .student-dashboard-grid to 12 columns
   unconditionally, overriding the older single-column rule. Twelve columns
   with eleven 1.5rem gaps cannot shrink below ~300px, so pages scrolled
   sideways on phones. Below 768px: one real column, items span it with
   1 / -1 (span 12 would recreate the gaps as implicit columns), and a
   16px gutter instead of stacked 24px + 32px padding.
   ===================================================================== */
@media (max-width: 768px) {
  .student-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-dashboard-grid > * {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .student-dashboard-main {
    padding-left: 0;
    padding-right: 0;
  }

  .student-dashboard-content-container {
    padding: 1.25rem 1rem;
  }
}

/* Announcements on very small phones: the 1.9rem one-word title plus two
   layers of side padding is wider than a 320px screen. */
@media (max-width: 480px) {
  .cs-ann {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .cs-ann-title {
    font-size: 1.5rem;
    overflow-wrap: anywhere;
  }
}

/* =====================================================================
   Rewards - avatar frames, equipped titles, Rewards page
   ===================================================================== */

/* Avatar frames. Applied to .student-dashboard-avatar-wrapper (sidebar,
   showcase) and to the small previews on the Rewards page. */
.reward-frame {
  border-width: 3px !important;
  border-style: solid !important;
}

.reward-frame-bronze {
  border-color: #C77B3B !important;
  box-shadow: 0 0 0 3px rgba(199, 123, 59, 0.18), 0 0 16px rgba(199, 123, 59, 0.35) !important;
}

.reward-frame-silver {
  border-color: #CFD8E3 !important;
  box-shadow: 0 0 0 3px rgba(207, 216, 227, 0.16), 0 0 18px rgba(207, 216, 227, 0.35) !important;
}

.reward-frame-gold {
  border-color: #FFC24B !important;
  box-shadow: 0 0 0 3px rgba(255, 194, 75, 0.2), 0 0 22px rgba(255, 194, 75, 0.45) !important;
}

.reward-frame-dragon {
  border-color: #3DFFA0 !important;
  border-style: double !important;
  border-width: 4px !important;
  box-shadow: 0 0 0 3px rgba(199, 125, 255, 0.35), 0 0 22px rgba(61, 255, 160, 0.4) !important;
}

.reward-frame-prism {
  border-color: transparent !important;
  background-image: linear-gradient(#0A0F16, #0A0F16), linear-gradient(135deg, #2BE3FF, #C77DFF, #FFC24B, #3DFFA0) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow: 0 0 24px rgba(199, 125, 255, 0.45) !important;
}

/* Equipped title under the level in the sidebar (and on the Rewards page). */
.student-reward-title {
  margin: 0.15rem 0 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #93ACBF;
  text-align: center;
  overflow-wrap: anywhere;
}

.student-reward-title.is-common { color: #A9C0D2; }
.student-reward-title.is-rare { color: #2BE3FF; }
.student-reward-title.is-epic { color: #C77DFF; }
.student-reward-title.is-legendary { color: #FFC24B; }
.student-reward-title.is-empty { color: #4A6274; }

/* Collapsed icon-rail sidebar has no room for the title line. */
@media (max-width: 1024px) {
  .student-dashboard-sidebar .student-reward-title { display: none; }
}

/* Unlock banner on exercise / boss result panels. */
.exercise-xp-award.is-reward {
  border-style: solid;
  border-color: #FFC24B;
  background-color: rgba(255, 194, 75, 0.1);
  color: #FFE2A3;
}

.exercise-xp-award.is-reward .material-symbols-outlined { color: #FFC24B; }
.exercise-xp-award.is-reward a { color: #FFC24B; text-decoration: underline; }

.boss-chip.is-reward { border-color: #C77DFF; color: #E2C2FF; }

/* Rewards page */
.reward-showcase {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
}

.reward-showcase-avatar {
  width: 88px !important;
  height: 88px !important;
  flex: 0 0 auto;
  margin: 0 !important;
}

.reward-showcase-body { min-width: 0; }

.reward-showcase-body .student-reward-title {
  text-align: left;
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.reward-showcase-label {
  margin: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6E8799;
}

.reward-showcase-name {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  color: #E8F6FF;
  overflow-wrap: anywhere;
}

.reward-showcase-frame {
  margin: 0;
  font-size: 0.75rem;
  color: #93ACBF;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 0.9rem;
}

.reward-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.9rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  min-width: 0;
}

.reward-card.is-locked { opacity: 0.72; border-style: dashed; }
.reward-card.is-equipped { border-color: #C77DFF; }

.reward-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}

.reward-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.reward-card-head strong {
  font-size: 0.9rem;
  color: #E8F6FF;
  overflow-wrap: anywhere;
}

.reward-card-desc {
  margin: 0;
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.4;
}

.reward-rarity {
  flex: 0 0 auto;
  padding: 0.1rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reward-rarity.is-common { color: #A9C0D2; }
.reward-rarity.is-rare { color: #2BE3FF; }
.reward-rarity.is-epic { color: #C77DFF; }
.reward-rarity.is-legendary { color: #FFC24B; }

.reward-preview-frame {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background-color: #080C11;
  color: #4A6274;
}

.reward-preview-title {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 12px;
  background-color: #080C11;
  color: #A9C0D2;
}

.reward-preview-title .material-symbols-outlined { font-size: 1.5rem; }
.reward-preview-title.is-rare { color: #2BE3FF; }
.reward-preview-title.is-epic { color: #C77DFF; }
.reward-preview-title.is-legendary { color: #FFC24B; }

.reward-card-source {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.7rem;
  color: #7FF0B4;
}

.reward-card-source .material-symbols-outlined { font-size: 0.95rem; }

.reward-btn {
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.35rem 0.85rem;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #121A24;
  color: #2BE3FF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.reward-btn:hover { border-color: #2BE3FF; }
.reward-btn.is-equipped { color: #C77DFF; border-color: rgba(199, 125, 255, 0.55); }

.reward-unlock {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reward-unlock li {
  display: flex;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #93ACBF;
}

.reward-unlock li > div { flex: 1 1 auto; min-width: 0; }
.reward-unlock .material-symbols-outlined { font-size: 0.9rem; color: #4A6274; }

.reward-unlock-progress {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: #6E8799;
}

@media (max-width: 480px) {
  .reward-showcase { flex-direction: column; text-align: center; }
  .reward-showcase-body .student-reward-title { text-align: center; }
}

/* =====================================================================
   Dashboard progress indicators (Your Progress section)
   ===================================================================== */
/* One column on phones, a balanced 2 x 2 from tablet width up (an auto-fit
   grid left the fourth card alone on its own row at common laptop widths). */
.dash-prog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .dash-prog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.dash-prog-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  min-width: 0;
}

.dash-prog-loading,
.dash-prog-muted {
  margin: 0;
  font-size: 0.75rem;
  color: #7B93A8;
  line-height: 1.45;
}

.dash-prog-muted strong { color: #C6D6E3; }

.dash-prog-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dash-prog-head .material-symbols-outlined {
  font-size: 1.1rem;
  color: #2BE3FF;
}

.dash-prog-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A9C0D2;
}

.dash-prog-link {
  margin-left: auto;
  font-size: 0.72rem;
  color: #2BE3FF;
  white-space: nowrap;
}

.dash-prog-link:hover { text-decoration: underline; }

.dash-prog-hero {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dash-prog-big {
  font-size: 1.75rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1.1;
}

.dash-prog-big small {
  font-size: 1rem;
  font-weight: 600;
  color: #7B93A8;
}

.dash-prog-chip {
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(163, 255, 18, 0.45);
  border-radius: 999px;
  background-color: rgba(163, 255, 18, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #A3FF12;
}

.dash-prog-bar {
  height: 8px;
  background-color: #131C26;
  border-radius: 999px;
  overflow: hidden;
}

.dash-prog-bar > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0F8CA8, #2BE3FF);
  transition: width 0.4s ease;
}

.dash-prog-bar.is-thin { height: 4px; margin: 0.25rem 0 0.15rem; }

.dash-prog-caption {
  margin: 0;
  font-size: 0.75rem;
  color: #93ACBF;
}

.dash-prog-caption strong { color: #E8F6FF; }

.dash-prog-sub {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6E8799;
}

.dash-prog-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.2rem 0 0;
}

.dash-prog-stats div {
  padding: 0.4rem 0.3rem;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #0A0F16;
  text-align: center;
  min-width: 0;
}

.dash-prog-stats dt {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6E8799;
}

.dash-prog-stats dd {
  margin: 0.1rem 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #E8F6FF;
}

/* Stacked bars (XP sources, boss states) */
.dash-prog-stack {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background-color: #131C26;
  gap: 2px;
}

.dash-prog-stack span { display: block; height: 100%; min-width: 3px; }
.dash-prog-stack .is-defeated { background-color: #3DFFA0; }
.dash-prog-stack .is-ready { background-color: #2BE3FF; }
.dash-prog-stack .is-locked { background-color: #3A4E5C; }

.dash-prog-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  font-size: 0.7rem;
  color: #93ACBF;
}

.dash-prog-legend li { display: inline-flex; align-items: center; gap: 0.3rem; }
.dash-prog-legend strong { color: #E8F6FF; }

.dash-prog-legend i {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 2px;
}

.dash-prog-legend i.is-defeated { background-color: #3DFFA0; }
.dash-prog-legend i.is-ready { background-color: #2BE3FF; }
.dash-prog-legend i.is-locked { background-color: #3A4E5C; }

/* Badge icons + "closest to unlocking" list */
.dash-prog-icons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dash-prog-icon {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  background-color: #080C11;
  color: #4A6274;
  overflow: hidden;
}

.dash-prog-icon .material-symbols-outlined { font-size: 1.1rem; }
.dash-prog-icon img { width: 100%; height: 100%; object-fit: cover; }

.dash-prog-icon.is-earned {
  border-color: #C77DFF;
  background-color: rgba(199, 125, 255, 0.14);
  color: #C77DFF;
}

.dash-prog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dash-prog-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.dash-prog-list li > div { flex: 1 1 auto; min-width: 0; }

.dash-prog-list strong {
  font-size: 0.8rem;
  color: #C6D6E3;
}

/* Boss target */
.dash-prog-target {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #0A0F16;
  color: inherit;
  min-width: 0;
}

.dash-prog-target > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.dash-prog-target strong {
  font-size: 0.85rem;
  color: #E8F6FF;
  overflow-wrap: anywhere;
}

.dash-prog-target .material-symbols-outlined { color: #6E8799; }
.dash-prog-target.is-ready { border-color: rgba(199, 125, 255, 0.55); }
.dash-prog-target.is-ready .material-symbols-outlined { color: #C77DFF; }
.dash-prog-target:hover { border-color: #C77DFF; }

.dash-prog-go {
  flex: 0 0 auto;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  background-color: #7B2CBF;
  color: #F3E6FF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Rewards */
.dash-prog-equipped {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.dash-prog-equipped > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-prog-equipped .student-reward-title {
  margin: 0;
  text-align: left;
  font-size: 0.8rem;
}

.dash-prog-frame {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1E3A47;
  border-radius: 10px;
  background-color: #080C11;
  color: #4A6274;
}

.dash-prog-milestone {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dash-prog-milestone > strong {
  font-size: 0.85rem;
  color: #E8F6FF;
}

.dash-prog-milestone .reward-rarity { align-self: flex-start; }

@media (max-width: 480px) {
  .dash-prog-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   Student leaderboard
   ===================================================================== */
.lb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lb-tab {
  padding: 0.45rem 0.9rem;
  border: 2px solid #1E3A47;
  border-radius: 999px;
  background-color: #0E131B;
  color: #A9C0D2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.lb-tab:hover { border-color: #2BE3FF; color: #E8F6FF; }
.lb-tab.is-active { border-color: #2BE3FF; background-color: rgba(43, 227, 255, 0.12); color: #2BE3FF; }

.lb-me {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
  background-color: #0E131B;
  border: 2px solid rgba(163, 255, 18, 0.45);
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  min-width: 0;
}

.lb-me .lb-avatar { width: 3.5rem; height: 3.5rem; }
.lb-me-body { min-width: 0; }

.lb-me-label {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A3FF12;
}

.lb-me-rank {
  margin: 0.1rem 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #E8F6FF;
  line-height: 1.1;
}

.lb-me-rank small { font-size: 1rem; font-weight: 600; color: #7B93A8; }

.lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  min-width: 0;
}

.lb-row.is-me { border-color: #A3FF12; background-color: rgba(163, 255, 18, 0.06); }
.lb-row.is-rank-1 { border-color: rgba(255, 194, 75, 0.7); }
.lb-row.is-rank-2 { border-color: rgba(198, 214, 227, 0.6); }
.lb-row.is-rank-3 { border-color: rgba(205, 127, 50, 0.7); }
.lb-row.is-me.is-rank-1, .lb-row.is-me.is-rank-2, .lb-row.is-me.is-rank-3 { border-color: #A3FF12; }

.lb-rank {
  flex: 0 0 3.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #7B93A8;
}

.lb-rank .material-symbols-outlined { font-size: 1rem; font-variation-settings: 'FILL' 1; }
.is-rank-1 .lb-rank { color: #FFC24B; }
.is-rank-2 .lb-rank { color: #C6D6E3; }
.is-rank-3 .lb-rank { color: #CD7F32; }

.lb-avatar {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  overflow: hidden;
  background-color: #080C11;
}

.lb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lb-who {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lb-who strong {
  font-size: 0.9rem;
  color: #E8F6FF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-meta {
  font-size: 0.72rem;
  color: #7B93A8;
  overflow-wrap: anywhere;
}

.lb-meta .student-reward-title { display: inline; margin: 0; font-size: inherit; }

.lb-you {
  margin-left: 0.3rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background-color: #A3FF12;
  color: #0A0F16;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  vertical-align: middle;
}

.lb-score {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2BE3FF;
  white-space: nowrap;
}

.lb-gap { text-align: center; color: #4A6274; letter-spacing: 0.3em; }

.lb-empty {
  padding: 1rem;
  text-align: center;
  color: #7B93A8;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .lb-row { gap: 0.5rem; padding: 0.55rem 0.6rem; }
  .lb-rank { flex-basis: 2.4rem; font-size: 0.8rem; }
  .lb-rank .material-symbols-outlined { display: none; }
  .lb-avatar { width: 2rem; height: 2rem; }
  .lb-score { font-size: 0.75rem; }
}

/* =====================================================================
   Student learning analytics
   Chart colours validated for the dark surface (#0E131B):
   passed #1497AE, failed #A24FE0 (CVD dE 10.9, contrast >= 3:1).
   ===================================================================== */
.an-insights[hidden], .an-chart[hidden], .an-legend[hidden],
.an-table-wrap[hidden], .an-tooltip[hidden] { display: none !important; }

.an-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.an-jump a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: 2px solid #1E3A47;
  border-radius: 999px;
  background-color: #0E131B;
  color: #A9C0D2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.an-jump a:hover { border-color: #2BE3FF; color: #2BE3FF; }
.an-jump .material-symbols-outlined { font-size: 1rem; }

.an-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.an-insight {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border: 2px solid #1E3A47;
  border-left-width: 4px;
  border-radius: 0.5rem;
  background-color: #0E131B;
  min-width: 0;
}

.an-insight p { margin: 0; font-size: 0.8rem; line-height: 1.45; color: #C6D6E3; }
.an-insight .material-symbols-outlined { font-size: 1.2rem; color: #2BE3FF; }
.an-insight.is-good { border-left-color: #3DFFA0; }
.an-insight.is-good .material-symbols-outlined { color: #3DFFA0; }
.an-insight.is-warn { border-left-color: #FFC24B; }
.an-insight.is-warn .material-symbols-outlined { color: #FFC24B; }
.an-insight.is-info { border-left-color: #2BE3FF; }

.an-section { margin-bottom: 2.25rem; scroll-margin-top: 5rem; }

.an-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #E8F6FF;
}

.an-section-title .material-symbols-outlined { color: #2BE3FF; }

.an-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.an-tile,
.an-card {
  background-color: #0E131B;
  border: 2px solid #1E3A47;
  border-radius: 0.5rem;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
  min-width: 0;
}

.an-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
}

.an-tile-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A9C0D2;
}

.an-tile-label .material-symbols-outlined { font-size: 1rem; color: #2BE3FF; }

.an-tile-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #E8F6FF;
}

.an-tile-value small { font-size: 0.95rem; font-weight: 600; color: #7B93A8; }
.an-tile-sub { font-size: 0.72rem; line-height: 1.45; color: #93ACBF; }

.an-trend { display: inline-flex; align-items: center; gap: 0.1rem; font-weight: 600; }
.an-trend .material-symbols-outlined { font-size: 0.85rem; }
.an-trend.is-up { color: #3DFFA0; }
.an-trend.is-down { color: #FFC24B; }

.an-card { padding: 1rem 1.1rem; margin-bottom: 1rem; }

.an-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.an-card-head h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: #E8F6FF; }
.an-card-meta { margin-left: auto; font-size: 0.72rem; color: #7B93A8; }
.an-card-sub { margin: 0 0 0.75rem; font-size: 0.75rem; line-height: 1.45; color: #7B93A8; }
.an-card-sub strong { color: #E8F6FF; }

.an-toggle {
  margin-left: auto;
  padding: 0.25rem 0.65rem;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  background: transparent;
  color: #2BE3FF;
  font-size: 0.72rem;
  cursor: pointer;
}

.an-toggle:hover { border-color: #2BE3FF; }

.an-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 900px) {
  .an-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Weekly chart */
.an-legend {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0 0 0.6rem;
  padding: 0;
  font-size: 0.72rem;
  color: #A9C0D2;
}

.an-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }

.an-legend i,
.an-tooltip i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
}

.an-legend i.is-pass, .an-tooltip i.is-pass, .an-stack .is-pass { background-color: #1497AE; }
.an-legend i.is-fail, .an-tooltip i.is-fail, .an-stack .is-fail { background-color: #A24FE0; }

.an-chart {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-rows: 180px auto;
  column-gap: 0.4rem;
}

.an-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: #6E8799;
  transform: translateY(-0.35rem);
  height: calc(100% + 0.7rem);
}

.an-plot { position: relative; min-width: 0; }

.an-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #18242F;
}

.an-cols {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 2px;
}

.an-col {
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 4px 4px 0 0;
  cursor: default;
  outline: none;
  min-width: 0;
}

.an-col:hover,
.an-col.is-hover,
.an-col:focus-visible { background-color: rgba(43, 227, 255, 0.06); }
.an-col:focus-visible { box-shadow: inset 0 0 0 2px #2BE3FF; }

.an-stack {
  width: min(70%, 34px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.an-stack span { display: block; min-height: 3px; }
.an-stack span:first-child { border-radius: 4px 4px 0 0; }

.an-xaxis {
  grid-column: 2;
  display: flex;
  gap: 2px;
  margin-top: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #6E8799;
}

.an-xaxis span { flex: 1 1 0; text-align: center; white-space: nowrap; min-width: 0; }

.an-tooltip {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #080C11;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  font-size: 0.72rem;
  color: #A9C0D2;
  pointer-events: none;
  white-space: nowrap;
}

.an-tooltip strong { color: #E8F6FF; font-size: 0.75rem; }
.an-tooltip span { display: flex; align-items: center; gap: 0.35rem; }
.an-tooltip b { margin-left: auto; padding-left: 0.8rem; color: #E8F6FF; font-family: 'JetBrains Mono', monospace; }

/* Tables */
.an-table-wrap { overflow-x: auto; }

.an-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.an-table th,
.an-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #18242F;
  text-align: right;
  white-space: nowrap;
  color: #C6D6E3;
  font-variant-numeric: tabular-nums;
}

.an-table thead th {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6E8799;
}

.an-table th:first-child,
.an-table td:first-child { text-align: left; }

.an-diff {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #1E3A47;
  font-size: 0.7rem;
  font-weight: 700;
}

.an-diff.is-easy { color: #3DFFA0; border-color: rgba(61, 255, 160, 0.4); }
.an-diff.is-medium { color: #FFC24B; border-color: rgba(255, 194, 75, 0.4); }
.an-diff.is-hard { color: #FF6B8B; border-color: rgba(255, 107, 139, 0.4); }

/* Lesson list */
.an-lessons {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.an-lesson {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #18242F;
  min-width: 0;
}

.an-lesson:last-child { border-bottom: 0; }
.an-lesson-icon { color: #4A6274; }
.an-lesson.is-done .an-lesson-icon { color: #3DFFA0; font-variation-settings: 'FILL' 1; }
.an-lesson.is-active .an-lesson-icon { color: #2BE3FF; }

.an-lesson-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.an-lesson-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.an-lesson-top a strong { font-size: 0.88rem; color: #E8F6FF; }
.an-lesson-top a:hover strong { color: #2BE3FF; text-decoration: underline; }
.an-lesson-meta { font-size: 0.72rem; color: #7B93A8; }

.an-lesson-pct {
  flex: 0 0 3rem;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #E8F6FF;
}

/* Mastery levels: one hue, darker -> brighter as mastery grows, always with a text label */
.an-level {
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #1E3A47;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
  color: #93ACBF;
}

.an-level.is-not_started { color: #6E8799; border-style: dashed; }
.an-level.is-beginner { color: #A9C0D2; border-color: #2A4554; }
.an-level.is-developing { color: #7FD8EA; border-color: rgba(43, 227, 255, 0.35); }
.an-level.is-proficient { color: #2BE3FF; border-color: rgba(43, 227, 255, 0.6); background-color: rgba(43, 227, 255, 0.08); }
.an-level.is-mastered { color: #0A0F16; border-color: #2BE3FF; background-color: #2BE3FF; }

.an-mastery-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 720px) {
  .an-mastery-hero { grid-template-columns: minmax(180px, auto) 1fr; gap: 2rem; }
}

.an-hero-num { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.an-hero-num strong { font-size: 2.6rem; font-weight: 800; line-height: 1; color: #E8F6FF; }

.an-scale { min-width: 0; }

.an-scale-track {
  position: relative;
  display: flex;
  gap: 2px;
  height: 12px;
  margin-top: 0.4rem;
}

.an-scale-track span { display: block; height: 100%; background-color: #18242F; }
.an-scale-track span:first-child { border-radius: 4px 0 0 4px; }
.an-scale-track span:last-of-type { border-radius: 0 4px 4px 0; }
.an-scale-track span.is-developing { background-color: #133A47; }
.an-scale-track span.is-proficient { background-color: #0F5A6B; }
.an-scale-track span.is-mastered { background-color: #0F8CA8; }
.an-scale-track span.is-current { box-shadow: inset 0 0 0 2px #2BE3FF; }

.an-scale-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 22px;
  margin-left: -2px;
  border-radius: 2px;
  background-color: #E8F6FF;
  box-shadow: 0 0 0 2px #0E131B;
}

.an-scale-labels {
  display: flex;
  gap: 2px;
  margin: 0.45rem 0 0.6rem;
}

.an-scale-labels span {
  display: flex;
  flex-direction: column;
  font-size: 0.68rem;
  font-weight: 600;
  color: #A9C0D2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.an-scale-labels small { font-size: 0.6rem; font-weight: 400; color: #6E8799; }

.an-scale-legend { display: none; margin: 0.45rem 0 0.4rem; font-size: 0.68rem; line-height: 1.5; color: #A9C0D2; }

.an-bars {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.an-bar-row { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

.an-bar-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.an-bar-top strong { font-size: 0.85rem; color: #E8F6FF; }

.an-bar-val {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #E8F6FF;
}

.an-bar-sub { font-size: 0.7rem; line-height: 1.4; color: #7B93A8; }

.an-explain {
  padding: 0.8rem 1rem;
  border: 1px dashed #1E3A47;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  color: #93ACBF;
}

.an-explain summary { cursor: pointer; color: #2BE3FF; font-weight: 600; }
.an-explain p { margin: 0.6rem 0; line-height: 1.5; }

.an-explain ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.an-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.6rem 0 0;
}

.an-mini-stats div {
  padding: 0.7rem;
  border: 1px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #0A0F16;
}

.an-mini-stats dt {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6E8799;
}

.an-mini-stats dd {
  margin: 0.2rem 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #E8F6FF;
}

@media (max-width: 480px) {
  .an-card { padding: 0.85rem 0.8rem; }
  .an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .an-tile { padding: 0.7rem 0.75rem; }
  .an-tile-value { font-size: 1.3rem; }
  .an-chart { grid-template-rows: 150px auto; grid-template-columns: 1.6rem 1fr; }
  .an-xaxis span { font-size: 0.55rem; }
  .an-scale-labels { display: none; }
  .an-scale-legend { display: block; }
  .an-hero-num strong { font-size: 2.1rem; }
}

/* =====================================================================
   Instructor learning analytics (reuses the .an-* analytics components)
   Mastery levels use one cyan ramp, dark -> bright, always with a label.
   ===================================================================== */
#iaContentRoot[hidden], #iaEmpty[hidden], #iaLoading[hidden] { display: none !important; }

.admin-main-content .an-jump a i,
.an-section-title i,
.an-tile-label i { color: #2BE3FF; }
.an-section-title i { font-size: 1rem; }
.an-tile-label i { font-size: 0.8rem; }
.admin-main-content .an-tiles { margin-top: 1.25rem; }
.admin-main-content .an-jump a i { font-size: 0.8rem; }

/* Needs attention */
.ia-attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.ia-att {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #18242F;
}

.ia-att:last-child { border-bottom: 0; }
.ia-att-who { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ia-att-who > div { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.ia-att-who strong { font-size: 0.88rem; color: #E8F6FF; }
.ia-att-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.ia-att-actions .an-toggle { margin-left: 0; text-decoration: none; white-space: nowrap; }

@media (max-width: 900px) {
  .ia-att { grid-template-columns: 1fr; }
  .ia-att-actions { justify-content: flex-start; }
}

.ia-initials {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  border: 2px solid #1E3A47;
  background-color: #0A0F16;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #A9C0D2;
}

.ia-att-who .ia-initials { margin-right: 0; }

.ia-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }

.ia-reasons li {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #C6D6E3;
}

.ia-reasons i { font-size: 0.72rem; color: #FFC24B; }
.ia-reasons .is-stuck i { color: #FF6B8B; }
.ia-modal-reasons { margin: 0 0 1rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(255, 194, 75, 0.35); border-radius: 0.375rem; }

/* Distribution */
.ia-dist { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }

.ia-dist li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 4.2rem;
  gap: 0.6rem;
  align-items: center;
}

.ia-dist-track { height: 14px; border-radius: 4px; background-color: #131C26; overflow: hidden; }
.ia-dist-track span { display: block; height: 100%; min-width: 0; border-radius: 0 4px 4px 0; }
.ia-dist-val { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 700; color: #E8F6FF; }
.ia-dist-val small { font-weight: 400; color: #6E8799; }

.ia-lvl-fill.is-not_started, .ia-cell.is-not_started, .ia-cell-swatch.is-not_started { background-color: #18242F; }
.ia-lvl-fill.is-beginner, .ia-cell.is-beginner, .ia-cell-swatch.is-beginner { background-color: #133A47; }
.ia-lvl-fill.is-developing, .ia-cell.is-developing, .ia-cell-swatch.is-developing { background-color: #0F5A6B; }
.ia-lvl-fill.is-proficient, .ia-cell.is-proficient, .ia-cell-swatch.is-proficient { background-color: #0F8CA8; }
.ia-lvl-fill.is-mastered, .ia-cell.is-mastered, .ia-cell-swatch.is-mastered { background-color: #2BE3FF; }

/* Matrix */
.ia-legend-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.2rem 0 0.75rem; font-size: 0.7rem; color: #A9C0D2; }
.ia-legend-row span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ia-cell-swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; border: 1px solid #1E3A47; }

.ia-matrix { border-collapse: separate; border-spacing: 2px; }
.ia-matrix th, .ia-matrix td { border-bottom: 0; }
.ia-matrix thead th { text-align: center; vertical-align: bottom; }
.ia-matrix thead th:first-child { text-align: left; }
.ia-matrix-head { display: block; color: #A9C0D2; }
.ia-matrix-title { display: block; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; font-weight: 400; text-transform: none; letter-spacing: 0; }
.ia-matrix tbody th { text-align: left; }

.ia-cell {
  min-width: 3.4rem;
  text-align: center !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: #E8F6FF !important;
  border-radius: 3px;
}

.ia-cell.is-not_started { color: #4A6274 !important; }
.ia-cell.is-mastered { color: #0A0F16 !important; }

/* Tables */
.ia-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #E8F6FF;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ia-link:hover, .ia-link:focus-visible { color: #2BE3FF; text-decoration: underline; }
.ia-strong { color: #E8F6FF; }
.ia-block { display: block; white-space: normal; }
.ia-muted { color: #6E8799; }
.ia-inline-bar { display: inline-block; width: 4rem; margin-right: 0.5rem; vertical-align: middle; }
.ia-flag { display: inline-flex; align-items: center; gap: 0.3rem; color: #FFC24B; font-weight: 700; }
.ia-flag-icon { color: #FFC24B; font-size: 0.75rem; }
.an-table tr.is-flagged td { background-color: rgba(255, 194, 75, 0.04); }
.an-table td .an-level { margin-right: 0.3rem; }

.ia-check { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: #A9C0D2; cursor: pointer; }
.ia-search { margin-left: auto; max-width: 16rem; width: 100%; }

/* Modal */
.ia-modal-tiles { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.ia-modal-tiles .an-tile { box-shadow: none; }
.ia-modal-h { margin: 1.1rem 0 0.4rem; font-size: 0.85rem; font-weight: 700; color: #E8F6FF; }
.ia-modal-link { text-decoration: none; display: inline-flex; align-items: center; }

/* =====================================================================
   Administrator learning analytics (adds to the .an-* / .ia-* blocks)
   ===================================================================== */
#adPlatform[hidden], #adInstructors[hidden], #adFilterBar[hidden], #adHealth[hidden] { display: none !important; }

.ad-filter {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border: 2px solid #2BE3FF;
  border-radius: 0.5rem;
  background-color: #0E131B;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60);
}

.ad-filter .admin-filter-label { margin: 0; }
.ad-filter .admin-filter-select { min-width: 14rem; max-width: 100%; }
.ad-filter-note { flex: 1 1 16rem; font-size: 0.75rem; color: #93ACBF; }

.ad-mini-4 div { display: flex; flex-direction: column; gap: 0.15rem; }

.ad-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; }
.ad-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; padding: 0.55rem 0; border-bottom: 1px solid #18242F; }
.ad-list li:last-child { border-bottom: 0; }
.ad-list strong { font-size: 0.85rem; color: #E8F6FF; }
.ad-list .an-bar-sub { flex-basis: 100%; }

.an-table tr.is-selected td { background-color: rgba(43, 227, 255, 0.07); }

/* =====================================================================
   System reports (admin_system_reports.php)
   ===================================================================== */
.rp-generate-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  padding: 0.6rem 1.5rem !important;
  border: 2px solid #1E3A47 !important;
  background-color: #0F8CA8 !important;
  color: #E8F6FF !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.60) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.rp-generate-btn i, .rp-generate-btn span { color: #E8F6FF !important; display: inline !important; }
.rp-report-card { border: 0; font: inherit; cursor: pointer; width: 100%; }
.rp-track-gamification { color: #FFC24B !important; border-color: rgba(255, 194, 75, 0.45) !important; }
.rp-track-health { color: #3DFFA0 !important; border-color: rgba(61, 255, 160, 0.45) !important; }
.rp-loading { padding: 1.25rem; text-align: center; color: #7B93A8; font-size: 0.85rem; }

.admin-action-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.rp-help { margin: 0.4rem 0 0; font-size: 0.78rem; line-height: 1.5; color: #93ACBF; }
.rp-error { margin: 0.75rem 0 0; padding: 0.6rem 0.75rem; border: 1px solid rgba(255, 92, 122, 0.5); border-radius: 0.375rem; font-size: 0.8rem; color: #FF8FA6; }
.rp-error[hidden] { display: none; }

.rp-presets > div { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.rp-chip {
  padding: 0.3rem 0.7rem;
  border: 1px solid #1E3A47;
  border-radius: 999px;
  background-color: #0A0F16;
  color: #A9C0D2;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.rp-chip:hover:not(:disabled) { border-color: #2BE3FF; color: #2BE3FF; }
.rp-chip:disabled, .admin-form-input:disabled { opacity: 0.45; cursor: not-allowed; }

.rp-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: 2px solid #1E3A47;
  background-color: #0F8CA8;
  color: #E8F6FF;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.60);
  cursor: pointer;
}

.rp-primary:disabled { opacity: 0.6; cursor: wait; }
.rp-danger { background-color: #B3264A; }

.rp-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 0.6rem 1rem;
}

.rp-info > div { display: flex; flex-direction: column; gap: 0.15rem; }
.rp-info .admin-detail-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6E8799; }
.rp-info .admin-detail-value { font-size: 0.82rem; color: #E8F6FF; text-align: left; }
.rp-info .admin-detail-label { text-align: left; }
.rp-h { margin: 1.1rem 0 0.5rem; font-size: 0.85rem; font-weight: 700; color: #E8F6FF; }
.rp-h small { font-weight: 400; color: #7B93A8; }

.rp-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 0.5rem;
  margin: 0;
}

.rp-summary div { padding: 0.55rem 0.7rem; border: 1px solid #1E3A47; border-radius: 0.375rem; background-color: #0A0F16; min-width: 0; }
.rp-summary dt { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6E8799; }
.rp-summary dd { margin: 0.2rem 0 0; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; font-weight: 700; color: #E8F6FF; overflow-wrap: anywhere; }

.rp-table-wrap { max-height: 22rem; overflow: auto; border: 1px solid #18242F; border-radius: 0.375rem; }
.rp-table thead th { position: sticky; top: 0; background-color: #0E131B; }
.rp-table td, .rp-table th { text-align: left; }
.rp-detail .admin-modal-body { max-height: 70vh; overflow-y: auto; }

/* System reports: let the filter row and category tabs wrap instead of overflowing */
.rp-filters { flex-wrap: wrap; gap: 0.9rem 1rem; }
.rp-filters .admin-filter-group { flex-wrap: wrap; min-width: 0; }
.rp-filters .admin-filter-group > div { min-width: 0; }
.rp-filters .admin-filter-input, .rp-filters .admin-filter-select { max-width: 100%; }
.rp-tabs { flex-wrap: wrap; row-gap: 0.4rem; border-bottom: 0; }
.rp-tabs .admin-tab-btn { padding: 0.45rem 1rem; border: 1px solid #1E3A47; margin-bottom: 0; }
.rp-table-scroll { overflow-x: auto; }
.rp-table-scroll .admin-data-table { min-width: 720px; }
@media (max-width: 480px) {
  .rp-filters .admin-filter-group > div { flex: 1 1 100%; }
  .rp-filters .admin-filter-input, .rp-filters .admin-filter-select { width: 100%; }
  .rp-generate-btn { width: 100%; justify-content: center !important; }
}
/* System reports: the header search box (20rem) must shrink on phones */
@media (max-width: 640px) {
  .rp-page .admin-header-left { min-width: 0; }
  .rp-page .admin-header-right { min-width: 0; flex: 1 1 auto; justify-content: flex-end; gap: 0.5rem; }
  .rp-page .admin-search-wrapper { width: auto; flex: 1 1 8rem; min-width: 0; max-width: 20rem; }
}

/* ============================================================================
   Locked lessons (student Lessons page) - see config/lesson_unlock.php
   ========================================================================== */
.lessons-card-locked .lessons-thumb { filter: grayscale(0.85) brightness(0.6); }
.lessons-card-locked .student-dashboard-lesson-title,
.lessons-card-locked .student-dashboard-lesson-description { color: #7B93A8; }
.lessons-card-locked:hover { transform: none; }
.lessons-locked-btn { color: #7B93A8; cursor: not-allowed; }
.lessons-lock-note {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.6rem;
  border: 1px dashed rgba(255, 194, 75, 0.45);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #FFC24B;
}
.lessons-lock-note .material-symbols-outlined { font-size: 1rem; line-height: 1.1; }
.lessons-lock-note strong { color: #E8F6FF; }

/* ============================================================================
   Administrator > System Settings
   ========================================================================== */
.st-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(255, 194, 75, 0.6);
  border-radius: 0.375rem;
  background-color: rgba(255, 194, 75, 0.08);
  color: #FFC24B;
  font-size: 0.85rem;
}
.st-banner[hidden] { display: none; }
.st-banner strong { color: #FFE2A3; }
.st-card {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem 0.4rem;
  border: 2px solid #1E3A47;
  border-radius: 0.375rem;
  background-color: #0E131B;
}
.st-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2BE3FF;
}
.st-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding: 0.9rem 0;
  border-top: 1px solid #18242F;
}
.st-card-title + .st-row { border-top: 0; }
.st-label { display: block; font-size: 0.9rem; font-weight: 700; color: #E8F6FF; }
.st-help { margin: 0.25rem 0 0; font-size: 0.78rem; line-height: 1.5; color: #93ACBF; }
.st-meta { margin: 0.3rem 0 0; font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: #6E8799; }
.st-row-control { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; min-width: 0; }
.st-row-control .admin-form-input { width: 100%; }
.st-number { max-width: 8rem; text-align: right; font-family: 'JetBrains Mono', monospace; }
.st-error { margin: 0; font-size: 0.75rem; color: #FF8FA6; text-align: right; }
.st-error[hidden] { display: none; }
.st-row.has-error .admin-form-input { border-color: #FF5C7A; }

.st-switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.st-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-switch-track {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  border: 2px solid #1E3A47;
  border-radius: 999px;
  background-color: #0A0F16;
  transition: background-color 0.15s, border-color 0.15s;
}
.st-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: #7B93A8;
  transition: transform 0.15s, background-color 0.15s;
}
.st-switch input:checked + .st-switch-track { background-color: rgba(43, 227, 255, 0.18); border-color: #2BE3FF; }
.st-switch input:checked + .st-switch-track::after { transform: translateX(1.25rem); background-color: #2BE3FF; }
.st-switch input:focus-visible + .st-switch-track { outline: 2px solid #2BE3FF; outline-offset: 2px; }
.st-switch-label { min-width: 1.75rem; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 700; color: #E8F6FF; }

.st-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.85rem 0;
  background: linear-gradient(to top, #0A0F16 70%, rgba(10, 15, 22, 0));
}
.st-status { margin: 0 auto 0 0; font-size: 0.8rem; color: #93ACBF; }
.st-status.is-dirty { color: #FFC24B; }
.st-status.is-ok { color: #3DFFA0; }
.st-status.is-error { color: #FF8FA6; }
.st-save:disabled, .st-actions .admin-btn-reset:disabled { opacity: 0.45; cursor: not-allowed; }
.st-save i, .st-save span { color: #E8F6FF !important; display: inline !important; }

@media (max-width: 720px) {
  .st-row { grid-template-columns: minmax(0, 1fr); }
  .st-row-control { align-items: flex-start; }
  .st-error { text-align: left; }
  .st-number { max-width: none; text-align: left; }
}

/* ============================================================================
   Administrator > System Logs
   ========================================================================== */
.lg-stats { margin-bottom: 1.25rem; }
.lg-table td { vertical-align: top; }
.lg-cat { display: inline-block; margin-top: 0.3rem; font-size: 0.62rem; }
.lg-track-settings { color: #C77DFF !important; border-color: rgba(199, 125, 255, 0.45) !important; }
.lg-details { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; line-height: 1.5; color: #A9C0D2; overflow-wrap: anywhere; }
.lg-user { overflow-wrap: anywhere; }
.lg-ip { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; color: #7B93A8; white-space: nowrap; }
.lg-warn td:first-child { box-shadow: inset 3px 0 0 #FFC24B; }
.lg-warn-icon { color: #FFC24B; }
.lg-gap { padding: 0 0.35rem; color: #7B93A8; }
.lg-page .rp-table-scroll .admin-data-table { min-width: 860px; }
.lessons-step-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background-color: #05070A;
  color: #A3FF12;
  border: 1px solid rgba(163, 255, 18, 0.45);
  font-family: 'JetBrains Mono', monospace;
}
.lessons-step-tag .material-symbols-outlined { font-size: 0.8rem; }
.lessons-card-locked .lessons-step-tag { color: #FFC24B; border-color: rgba(255, 194, 75, 0.45); }

/* Register: note under the role choice (instructor approval) */
.register-role-note { margin: 0.5rem 0 0; font-size: 0.75rem; line-height: 1.45; color: #93ACBF; }

/* Manage Users: pending instructor accounts */
.mu-pending-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(255, 194, 75, 0.6);
  border-radius: 0.375rem;
  background-color: rgba(255, 194, 75, 0.08);
  color: #FFC24B;
  font-size: 0.85rem;
}
.mu-pending-banner[hidden] { display: none; }
.mu-pending-banner strong { color: #FFE2A3; }
.mu-pending-banner button {
  margin-left: auto;
  padding: 0.4rem 0.9rem;
  border: 2px solid #FFC24B;
  border-radius: 0.25rem;
  background: transparent;
  color: #FFC24B;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mu-pending-banner button:hover { background-color: rgba(255, 194, 75, 0.15); }
.mu-status-pending { color: #FFC24B; }
.mu-status-pending .admin-status-dot { background-color: #FFC24B; }
.admin-action-buttons .mu-approve { color: #3DFFA0; }
.admin-action-buttons .mu-reject { color: #FF5C7A; }

/* ============================================================================
   Student > Roadmap (student/Roadmap.php) - see config/lesson_unlock.php
   ========================================================================== */
.rm-page { max-width: 860px; }
.rm-intro { margin: 0.5rem 0 1.5rem; color: #93ACBF; font-size: 0.95rem; line-height: 1.55; }
.rm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid #1E3A47;
  border-radius: 14px;
  background-color: #0E131B;
}
.rm-summary-stat { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.rm-summary-value { font-family: 'JetBrains Mono', monospace; font-size: 1.35rem; font-weight: 700; color: #E8F6FF; }
.rm-summary-label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: #7B93A8; }
.rm-summary-bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background-color: #131C26; overflow: hidden; }
.rm-summary-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2BE3FF, #A3FF12); transition: width 0.6s ease; }

.rm-path { list-style: none; margin: 0; padding: 0; position: relative; }
.rm-loading { display: flex; align-items: center; gap: 0.5rem; padding: 1.5rem; color: #93ACBF; }
.rm-step { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding-bottom: 1.25rem; }
/* The connecting line between nodes. */
.rm-step::before {
  content: '';
  position: absolute;
  left: calc(1.5rem - 2px);
  top: 3rem;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background-color: #1E3A47;
}
.rm-step:last-child::before { display: none; }
.rm-step.is-done::before, .rm-step.is-reading::before { background-color: #3DFFA0; }
.rm-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 3px solid #1E3A47;
  border-radius: 50%;
  background-color: #0E131B;
  color: #7B93A8;
}
.rm-node .material-symbols-outlined { font-size: 1.35rem; }
.rm-step.is-done .rm-node { border-color: #3DFFA0; background-color: #0C2A1C; color: #3DFFA0; }
.rm-step.is-reading .rm-node { border-color: #3DFFA0; color: #3DFFA0; }
.rm-step.is-current .rm-node { border-color: #2BE3FF; background-color: #12303D; color: #2BE3FF; box-shadow: 0 0 0 6px rgba(43, 227, 255, 0.14); }
.rm-step.is-open .rm-node { border-color: #2BE3FF; color: #2BE3FF; }
.rm-step.is-locked .rm-node { border-style: dashed; color: #5E7488; }

.rm-card {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid #1E3A47;
  border-radius: 14px;
  background-color: #0E131B;
}
.rm-step.is-current .rm-card { border-color: rgba(43, 227, 255, 0.55); box-shadow: 0 0 0 1px rgba(43, 227, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.45); }
.rm-step.is-locked .rm-card { background-color: #0A0F16; }
.rm-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.rm-step-no { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: #A3FF12; }
.rm-step.is-locked .rm-step-no { color: #7B93A8; }
.rm-state { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7B93A8; }
.rm-step.is-done .rm-state, .rm-step.is-reading .rm-state { color: #3DFFA0; }
.rm-step.is-current .rm-state { color: #2BE3FF; }
.rm-step.is-locked .rm-state { color: #FFC24B; }
.rm-title { margin: 0.35rem 0 0.15rem; font-size: 1.05rem; color: #E8F6FF; }
.rm-step.is-locked .rm-title { color: #93ACBF; }
.rm-meta { margin: 0 0 0.6rem; font-size: 0.78rem; color: #7B93A8; }
.rm-bar { position: relative; display: inline-block; vertical-align: middle; width: calc(100% - 3rem); height: 8px; border-radius: 999px; background-color: #131C26; }
.rm-bar-fill { height: 100%; border-radius: inherit; background-color: #2BE3FF; }
.rm-step.is-done .rm-bar-fill { background-color: #3DFFA0; }
.rm-bar-goal { position: absolute; top: -3px; bottom: -3px; width: 2px; background-color: #FFC24B; }
.rm-bar-label { display: inline-block; width: 2.75rem; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: #93ACBF; }
.rm-detail { margin: 0.55rem 0 0.75rem; font-size: 0.82rem; line-height: 1.5; color: #93ACBF; }
.rm-detail strong { color: #E8F6FF; }
.rm-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid #1E3A47;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2BE3FF;
  text-decoration: none;
}
.rm-action .material-symbols-outlined { font-size: 1rem; }
.rm-action:hover { border-color: #2BE3FF; }
.rm-action.is-primary { background-color: #0F8CA8; border-color: #0F8CA8; color: #E8F6FF; }
.rm-action.is-locked { color: #7B93A8; cursor: not-allowed; }

@media (max-width: 560px) {
  .rm-summary { grid-template-columns: minmax(0, 1fr); }
  .rm-step { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; }
  .rm-node { width: 2.25rem; height: 2.25rem; border-width: 2px; }
  .rm-step::before { left: calc(1.125rem - 2px); top: 2.25rem; }
}

/* Unlock banner in exercise results + corner toast (student/Coding-Exercise.php) */
.exercise-xp-award.is-unlock { border-color: rgba(163, 255, 18, 0.5); background-color: rgba(163, 255, 18, 0.06); }
.exercise-xp-award.is-unlock .material-symbols-outlined { color: #A3FF12; }
.roadmap-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: min(22rem, calc(100vw - 2.5rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(163, 255, 18, 0.55);
  border-radius: 14px;
  background-color: #0E131B;
  box-shadow: 0 0 0 1px rgba(163, 255, 18, 0.25), 0 22px 60px rgba(0, 0, 0, 0.68);
  color: #E8F6FF;
  animation: roadmap-toast-in 0.35s ease-out;
}
.roadmap-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.5s; }
.roadmap-toast-icon { color: #A3FF12; font-size: 1.6rem; }
.roadmap-toast-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; font-size: 0.85rem; }
.roadmap-toast-body strong { font-size: 0.95rem; }
.roadmap-toast-body span { color: #93ACBF; overflow-wrap: anywhere; }
.roadmap-toast-body a { color: #A3FF12; font-weight: 700; text-decoration: none; }
.roadmap-toast-body a:hover { text-decoration: underline; }
.roadmap-toast-close { margin-left: auto; border: 0; background: none; color: #7B93A8; font-size: 1.25rem; line-height: 1; cursor: pointer; }
@keyframes roadmap-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .roadmap-toast { animation: none; }
  .rm-summary-fill { transition: none; }
}

/* ============================================================================
   Admin > Manage Content > Reorder roadmap (drag and drop)
   ========================================================================== */
.ro-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.ro-toolbar-text { margin: 0; font-size: 0.85rem; color: #93ACBF; }
.ro-toolbar-text i { color: #A3FF12; margin-right: 0.3rem; }
.ro-toolbar-text strong { color: #E8F6FF; }
.ro-open-btn, .ro-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 2px solid #1E3A47;
  border-radius: 4px;
  background-color: #121A24;
  color: #E8F6FF;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.ro-open-btn:hover, .ro-btn:hover { border-color: #2BE3FF; }
.ro-btn.is-primary { background-color: #0F8CA8; border-color: #0F8CA8; }
.ro-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ro-dialog {
  width: min(680px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 3px solid #1E3A47;
  border-radius: 6px;
  background-color: #0E131B;
  color: #E8F6FF;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
}
.ro-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.ro-dialog[open] { display: flex; flex-direction: column; }
.ro-head { padding: 1.1rem 1.25rem 0.5rem; border-bottom: 2px solid #1E3A47; }
.ro-head h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.ro-head p { margin: 0 0 0.6rem; font-size: 0.8rem; line-height: 1.5; color: #93ACBF; }
.ro-head kbd { padding: 0 0.3rem; border: 1px solid #1E3A47; border-radius: 3px; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; }
.ro-list { list-style: none; margin: 0; padding: 0.75rem 1.25rem; overflow-y: auto; flex: 1 1 auto; }
.ro-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid #1E3A47;
  border-radius: 6px;
  background-color: #121A24;
  cursor: grab;
}
.ro-item:hover { border-color: #2BE3FF; }
.ro-item:focus-within { border-color: #2BE3FF; }
.ro-item.is-dragging { opacity: 0.5; border-style: dashed; cursor: grabbing; }
.ro-item.is-draft { background-color: #0A0F16; }
.ro-handle { color: #5E7488; }
.ro-pos {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background-color: #12303D;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2BE3FF;
}
.ro-item.is-draft .ro-pos { background-color: #131C26; color: #7B93A8; }
.ro-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ro-title { font-weight: 700; font-size: 0.9rem; overflow-wrap: anywhere; }
.ro-meta { font-size: 0.72rem; color: #7B93A8; }
.ro-moves { display: flex; gap: 0.3rem; }
.ro-moves button {
  width: 2rem;
  height: 2rem;
  border: 2px solid #1E3A47;
  border-radius: 4px;
  background: #0E131B;
  color: #E8F6FF;
  cursor: pointer;
}
.ro-moves button:hover:not(:disabled), .ro-moves button:focus-visible { border-color: #2BE3FF; color: #2BE3FF; }
.ro-moves button:disabled { opacity: 0.3; cursor: default; }
.ro-empty { padding: 1rem; color: #93ACBF; }
.ro-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ro-foot { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; padding: 0.85rem 1.25rem; border-top: 2px solid #1E3A47; }
.ro-status { margin-right: auto; font-size: 0.8rem; color: #FFC24B; }

/* ------------------------------------------------------------------
   Student notification bell (assets/js/notifications.js)
------------------------------------------------------------------ */
.notif-wrap { position: relative; }
.notif-btn { position: relative; }
.notif-btn[aria-expanded="true"] { color: var(--ct-cyan); }
.notif-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--ct-red); color: #fff;
  font: 700 0.68rem/18px var(--ct-mono); text-align: center;
  box-shadow: 0 0 0 2px var(--ct-bg);
  pointer-events: none;
}
.notif-badge[hidden] { display: none; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 100px));
  display: flex; flex-direction: column;
  background: var(--ct-surface); border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius); box-shadow: var(--ct-elev-lg);
  overflow: hidden;
}
.notif-panel[hidden] { display: none; }
.notif-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--ct-line);
  font: 700 0.78rem var(--ct-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ct-text);
}
.notif-head-sub { color: var(--ct-cyan); font-weight: 500; text-transform: none; letter-spacing: 0; }
.notif-list { list-style: none; margin: 0; padding: 0.3rem 0; overflow-y: auto; }
.notif-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.65rem 1rem; color: var(--ct-text); text-decoration: none;
}
.notif-item:hover, .notif-item:focus-visible { background: var(--ct-surface-2); outline: none; }
.notif-item.is-unread { background: rgba(43, 227, 255, 0.06); }
.notif-icon {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--ct-surface-2); color: var(--ct-cyan);
}
.notif-k-unlock .notif-icon   { color: var(--ct-lime); }
.notif-k-remedial .notif-icon { color: var(--ct-amber); }
.notif-k-badge .notif-icon,
.notif-k-reward .notif-icon   { color: var(--ct-violet); }
.notif-k-level .notif-icon    { color: var(--ct-green); }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-title { font-size: 0.82rem; font-weight: 600; }
.notif-body { font-size: 0.8rem; color: var(--ct-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font: 0.7rem var(--ct-mono); color: var(--ct-dim); }
.notif-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ct-cyan); }
.notif-empty {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1.6rem 1rem; color: var(--ct-muted); font-size: 0.85rem; text-align: center;
}
/* Phones: the bell is not at the right edge, so pin the panel to the viewport. */
@media (max-width: 640px) {
  .notif-panel { position: fixed; left: 16px; right: 16px; width: auto; top: var(--notif-top, 64px); }
}

/* Roadmap: recently unlocked, not started yet (student/Roadmap.php) */
.rm-new-banner {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin: 0 0 1.5rem; padding: 0.9rem 1.1rem;
  border: 1px solid rgba(163, 255, 18, 0.45); border-radius: 12px;
  background: linear-gradient(90deg, rgba(163, 255, 18, 0.10), rgba(43, 227, 255, 0.06));
  animation: rm-new-in 0.4s ease-out;
}
.rm-new-banner-icon {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(163, 255, 18, 0.14); color: #A3FF12; font-size: 1.35rem;
}
.rm-new-banner-body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 14rem; min-width: 0; }
.rm-new-banner-body strong { color: #E8F6FF; font-size: 0.95rem; }
.rm-new-banner-body span { color: #93ACBF; font-size: 0.8rem; }
.rm-new-more { color: #A3FF12 !important; font-weight: 600; }
.rm-new-banner .rm-action { margin: 0; }
.rm-new-jump {
  background: none; border: none; padding: 0.4rem 0.2rem; cursor: pointer;
  color: #93ACBF; font: inherit; font-size: 0.8rem; text-decoration: underline;
}
.rm-new-jump:hover { color: #2BE3FF; }
.rm-new-chip {
  margin-right: auto; padding: 0.1rem 0.45rem; border-radius: 999px;
  background-color: #A3FF12; color: #05070A;
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
}
.rm-step.is-new .rm-node { border-color: #A3FF12; color: #A3FF12; animation: rm-new-pulse 2s ease-out 3; }
.rm-step.is-new .rm-card { border-color: rgba(163, 255, 18, 0.5); }
.rm-step.is-flash .rm-card { animation: rm-flash 1.2s ease-out; }
@keyframes rm-new-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rm-new-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(163, 255, 18, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(163, 255, 18, 0); }
}
@keyframes rm-flash {
  0%, 40% { box-shadow: 0 0 0 3px rgba(163, 255, 18, 0.7); }
  100%    { box-shadow: 0 0 0 0 rgba(163, 255, 18, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .rm-new-banner, .rm-step.is-new .rm-node, .rm-step.is-flash .rm-card { animation: none; }
}


/* =========================================================================
   Learning Trends (admin/admin_learning_trends.php, instructor/…)
   Chart colours: the validated pass/fail pair of the analytics pages; lines
   use the brand cyan (single series, so no legend).
   ========================================================================= */
.lt-controls { position: static; }
.lt-controls .admin-filter-select { min-width: 12rem; }
.lt-sr { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lt-tile-foot { display: flex; flex-direction: column; gap: 0.2rem; }
.lt-delta {
  position: relative; /* anchors the hidden .lt-sr text; otherwise it lands on <body> and stretches the page */
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #1E3A47;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: #A9C0D2;
  white-space: nowrap;
}
.lt-delta i { font-size: 0.7rem; }
.lt-delta.is-good { color: #3DFFA0; border-color: rgba(61, 255, 160, 0.4); }
.lt-delta.is-bad { color: #FFC24B; border-color: rgba(255, 194, 75, 0.45); }

.lt-insight i { margin-top: 0.15rem; font-size: 1rem; color: #2BE3FF; }
.lt-insight.is-good i { color: #3DFFA0; }
.lt-insight.is-warn i { color: #FFC24B; }
.lt-insight-tag {
  display: inline-block;
  margin-right: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7B93A8;
}

.lt-dir { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; font-size: 0.72rem; font-weight: 700; color: #A9C0D2; }
.lt-dir small { font-weight: 500; color: #7B93A8; }
.lt-dir.is-rising i { color: #3DFFA0; }
.lt-dir.is-falling i { color: #FFC24B; }

/* Period bands behind the plots */
.lt-band {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.lt-band span {
  position: absolute;
  top: 2px;
  left: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6E8799;
}
.lt-band.is-cur { background-color: rgba(43, 227, 255, 0.045); border-left: 1px dashed #2A4B5A; }

.lt-line-svg, .lt-dots { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lt-line { fill: none; stroke: #2BE3FF; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.lt-dot {
  position: absolute;
  box-sizing: content-box;
  width: 8px;
  height: 8px;
  margin: 0 0 -6px -6px;
  border-radius: 50%;
  background: #2BE3FF;
  border: 2px solid #0E131B;
}
.lt-hit { background: transparent; }

.lt-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lt-people li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid #18242F; }
.lt-people li:last-child { border-bottom: 0; }
.lt-people strong { display: block; font-size: 0.82rem; color: #E8F6FF; }
.lt-count { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #E8F6FF; }


/* =========================================================================
   Responsive shell (all roles)
   - Phones (<= 768px): the sidebar becomes a slide-out drawer opened from a
     hamburger button in the header (button + backdrop come from
     assets/js/mobile-nav.js); admin/instructor pages scroll as a normal page
     instead of inside a fixed-height box, so the footer no longer eats the
     screen; page headers stay on one row.
   - Tablets (769-1024px): student sidebar is an icon rail (see above),
     admin/instructor keep the full sidebar.
   ========================================================================= */
.nav-toggle,
.nav-backdrop { display: none; }

@media (max-width: 768px) {
  /* --- Hamburger button ------------------------------------------------ */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ct-line, #1E3A47);
    border-radius: 8px;
    background: transparent;
    color: var(--ct-text, #E8F6FF);
    cursor: pointer;
  }
  .nav-toggle:hover,
  .nav-toggle:focus-visible { color: var(--ct-cyan, #2BE3FF); border-color: currentColor; outline: none; }

  /* --- Drawer ---------------------------------------------------------- */
  .student-dashboard-sidebar,
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    flex: none;
    width: min(280px, 85vw);
    height: 100vh;
    height: 100dvh;
    padding-top: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }
  html.nav-open .student-dashboard-sidebar,
  html.nav-open .admin-sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.25s ease, visibility 0s;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55);
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 7, 10, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  html.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  html.nav-open,
  html.nav-open body { overflow: hidden; }

  /* Student drawer shows the full sidebar (profile card + labels). */
  .student-dashboard-sidebar .student-dashboard-profile-card-mini { display: flex; }
  .student-dashboard-sidebar .student-dashboard-upgrade-btn-wrapper { display: block; }
  .student-dashboard-sidebar .student-dashboard-sidebar-item { justify-content: flex-start; padding: 0.65rem 0.85rem; font-size: 0.8rem; }
  .student-dashboard-main,
  .student-dashboard-footer { margin-left: 0; }

  .admin-sidebar .admin-nav-item,
  .admin-sidebar .admin-footer-link { padding-top: 0.7rem; padding-bottom: 0.7rem; }

  /* --- Admin / instructor: let the page scroll naturally ---------------- */
  .admin-body { height: auto; min-height: 100vh; min-height: 100dvh; }
  .admin-app-container { flex: 1 0 auto; overflow: visible; }
  .admin-main-content { overflow: visible; min-width: 0; }

  /* --- Headers: one row (the landing page's generic `header` rule stacks
         every <header> into a column on phones). ------------------------ */
  .admin-header,
  .student-dashboard-header,
  .exercise-header { flex-direction: row; text-align: left; }

  .admin-header {
    flex-wrap: wrap;
    gap: 0.6rem 0.5rem;
    padding: 0.6rem 0.9rem;
  }
  .admin-header-left { flex: 1 1 auto; min-width: 0; gap: 0.6rem; }
  .admin-header-logo { font-size: 1.15rem; min-width: 0; white-space: nowrap; }
  /* Bell + theme stay on the first row; the search box drops to its own
     full-width row underneath. */
  .admin-header-right { display: contents; }
  .admin-header .admin-search-wrapper,
  .rp-page .admin-header .admin-search-wrapper { order: 10; flex: 1 1 100%; width: auto; max-width: none; }

  .student-dashboard-header { gap: 0.6rem; padding: 0 0.9rem; }
  .student-dashboard-brand { flex: 1 1 auto; min-width: 0; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .student-dashboard-header-actions { gap: 0.35rem; }

  /* Stat tiles: one column on phones, 2-3 on large phones / small tablets. */
  .admin-stats-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

  /* Tab pills wrap onto extra rows instead of running off the screen. */
  .admin-tabs-container { flex-wrap: wrap; gap: 0.5rem; }
  .admin-tab-btn { flex: 1 1 auto; padding: 0.55rem 0.9rem; margin-bottom: 0; }

  /* --- General content safety nets ------------------------------------ */
  .admin-main-content img,
  .student-dashboard-main img,
  .admin-main-content video,
  .student-dashboard-main video { max-width: 100%; height: auto; }
  .admin-main-content pre,
  .student-dashboard-main pre { max-width: 100%; overflow-x: auto; }
  .admin-modal { max-height: calc(100dvh - 2rem); overflow-y: auto; }
  /* 16px inputs stop iOS Safari zooming in on focus. */
  .admin-body input:not([type=checkbox]):not([type=radio]),
  .admin-body select,
  .admin-body textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .student-dashboard-sidebar,
  .admin-sidebar,
  .nav-backdrop { transition: none !important; }
}

/* --- Landing / Subscription top nav on phones ---------------------------- */
@media (max-width: 640px) {
  header .nav-links { flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.1rem; }
  header .nav-links a { font-size: 0.9rem; }
  /* The search / menu glyphs are decorative (no behaviour) - drop them so the
     real links fit; the theme toggle stays. */
  header .nav-icons > .material-symbols-outlined { display: none; }
  header .nav-icons { margin: 0; }
}
