/* =========================================
   KACC E-Learning System — Main Stylesheet
   Modern, glassmorphism, clean minimal design
   ========================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* colors */
  --navy: #0b1a2e;
  --navy-dark: #0b1a2e;
  --navy-light: #0d2137;
  --gold: #d4a843;
  --gold-light: #f0d78c;
  --gold-hover: #c49a35;
  --off-white: #f3f5f8;
  --white: #ffffff;
  --text: #1a2332;
  --text-muted: #7a8599;
  --accent: #1a6b8a;

  /* glass */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

  /* shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
  --shadow-gold: 0 4px 14px rgba(212, 168, 67, 0.35);

  /* radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* layout */
  --sidebar-width: 260px;
  --header-height: 64px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
}

/* ---------- Typography ---------- */
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
}

small, .text-muted {
  font-size: 14px;
  color: var(--text-muted);
}

.text-gold {
  color: var(--gold);
}

.text-center {
  text-align: center;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes progressGrow {
  0% {
    width: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 50%, #102a45 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

/* Abstract geometric circles */
.login-body::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
  top: -120px;
  right: -100px;
  pointer-events: none;
}

.login-body::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.05) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  pointer-events: none;
}

/* Secondary layer of geometric shapes */
.login-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-bg-circle:nth-child(1) {
  width: 180px;
  height: 180px;
  border: 1px solid rgba(212, 168, 67, 0.06);
  top: 20%;
  left: 10%;
}

.login-bg-circle:nth-child(2) {
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  bottom: 15%;
  right: 12%;
}

/* Login card */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 40px 36px 36px;
  box-shadow: var(--glass-shadow);
  animation: fadeSlideUp 0.6s ease-out;
  text-align: center;
}

.login-logo {
  max-width: 120px;
  height: auto;
  margin: 0 auto 24px;
  border-radius: var(--radius-lg);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}

/* Form groups */
.login-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-form .input-field {
  width: 100%;
  padding: 12px 0;
  font-size: 16px;
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color var(--transition-base);
}

.login-form .input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.login-form .input-field:focus {
  border-bottom-color: var(--gold);
}

.login-form .input-field:-webkit-autofill,
.login-form .input-field:-webkit-autofill:hover,
.login-form .input-field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
}

.login-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

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

.login-error {
  font-size: 14px;
  color: #ef4444;
  margin-top: 12px;
  min-height: 20px;
}

.login-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 28px;
  letter-spacing: 0.03em;
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 26, 46, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: fadeSlideUp 0.35s ease-out;
}

.modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.modal-message {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 100px;
}

.modal-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.modal-btn-confirm {
  background: linear-gradient(135deg, var(--gold), var(--gold-hover));
  color: var(--navy);
}

.modal-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.toast-success {
  background: rgba(34, 197, 94, 0.85);
  border-color: rgba(34, 197, 94, 0.5);
  color: #fff;
}

.toast-error {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

/* =========================================
   APP SHELL
   ========================================= */
#app {
  display: flex;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 16px;
}

.app-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header .header-logo {
  height: 32px;
  width: auto;
}

.app-header .header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
}

.app-header .header-spacer {
  flex: 1;
}

.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.app-header .header-user-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.header-logout-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.header-logout-btn:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Hamburger ---------- */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 4px;
  transition: all var(--transition-fast);
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.20);
}

.hamburger-btn svg {
  display: block;
}

/* Sidebar overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--navy-dark);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base);
}

/* ---------- Sidebar sections ---------- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.20);
}

.sidebar-section {
  padding: 8px 0;
}

.sidebar-label {
  padding: 8px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 400;
  touch-action: manipulation;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-item.active {
  border-left-color: var(--gold);
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold-light);
  font-weight: 500;
}

.sidebar-status {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sidebar-item-content {
  flex: 1;
  min-width: 0;
}

.sidebar-item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.sidebar-item-sub {
  display: block;
  font-size: 11px;
  opacity: 0.6;
  margin-top: 2px;
}

.sidebar-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.sidebar-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Chapter progress bar (in chapter page) */
.chapter-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chapter-progress .progress-bar {
  flex: 1;
}

.chapter-progress .progress-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Sidebar footer - profile */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-footer .sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}

.sidebar-footer .sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-footer .sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer .sidebar-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer .sidebar-logout {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-footer .sidebar-logout:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.header-reset-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  line-height: 1;
}

.header-reset-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 32px 40px;
  background: var(--off-white);
  min-height: calc(100vh - var(--header-height));
  animation: fadeIn 0.3s ease-out;
}

.main-content-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Content fade-slide-up on change */
.fade-slide-up {
  animation: fadeSlideUp 0.4s ease-out;
}

.content-pane {
  animation: fadeSlideUp 0.4s ease-out;
}

/* Desktop: collapsible sidebar */
@media (min-width: 1025px) {
  .sidebar.closed {
    transform: translateX(-100%);
  }
  .main-content.sidebar-closed {
    margin-left: 0;
  }
}

/* ---------- Chapter/Module List ---------- */
.chapter-header {
  margin-bottom: 28px;
}

.chapter-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.module-card {
  cursor: pointer;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.module-card.done {
  border-left: 4px solid #22c55e;
}

.module-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.module-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
}

.module-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.4;
}

.module-status {
  font-size: 13px;
  color: var(--text-muted);
}

.module-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.module-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Module View ---------- */
.module-view-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
  line-height: 1.35;
}

.module-view-wrapper {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.content-column {
  flex: 3;
  min-width: 0;
}

.notes-panel {
  flex: 1;
  max-width: 300px;
  min-width: 220px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: calc(100vh - var(--header-height) - 48px);
  display: flex;
  flex-direction: column;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #eef0f4;
}

.notes-header h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0;
}

.notes-header .notes-status {
  font-size: 11px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.notes-header .notes-status.saved {
  color: #22c55e;
}

.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef0f4;
  background: #fafbfc;
}

.notes-toolbar button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notes-toolbar button:hover {
  background: #e8ecf0;
  color: var(--text);
}

.notes-toolbar .toolbar-sep {
  width: 1px;
  height: 20px;
  background: #e0e4e8;
  margin: 0 4px;
}

.notes-editor {
  flex: 1;
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  overflow-y: auto;
  min-height: 120px;
  outline: none;
}

.notes-editor:empty::before {
  content: 'Tulis catatan Anda di sini...';
  color: var(--text-muted);
  font-style: italic;
}

.notes-editor ul, .notes-editor ol {
  padding-left: 20px;
  margin: 8px 0;
}

.notes-editor p {
  margin-bottom: 8px;
}

.module-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.module-content p {
  margin-bottom: 18px;
}

.module-content strong {
  color: var(--navy);
}

.module-content ul,
.module-content ol {
  margin: 0 0 18px 20px;
  padding: 0;
}

.module-content ul {
  list-style: disc;
}

.module-content ol {
  list-style: decimal;
}

.module-content li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.module-content li strong {
  color: var(--gold);
}

.module-content li:last-child {
  margin-bottom: 0;
}

.key-points-card {
  margin-top: 24px;
}

.key-points-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.key-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.5;
}

.kp-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.diagram-card {
  margin-top: 24px;
}

.diagram-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}

.diagram-container {
  overflow-x: auto;
}

.quiz-card {
  margin-top: 24px;
  margin-bottom: 24px;
}

.quiz-number {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 8px;
}

/* =========================================
   COMPONENTS
   ========================================= */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
  color: var(--navy);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

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

.btn-secondary {
  background: var(--accent);
  color: var(--white);
}

.btn-secondary:hover {
  background: #155974;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid #d0d5dd;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 168, 67, 0.04);
}

.btn-danger {
  background: #ef4444;
  color: var(--white);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0;
}

.card-body {
  /* default spacing handled by parent padding */
}

.card-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--off-white);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.chip-gold {
  color: #8a6d2b;
  background: rgba(212, 168, 67, 0.12);
}

.chip-accent {
  color: var(--accent);
  background: rgba(26, 107, 138, 0.10);
}

/* ---------- Definition Box ---------- */
.definition-box {
  border-left: 3px solid var(--gold);
  background: #fbf8f0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.definition-box p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.definition-box .definition-term {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

/* ---------- Key Points Grid ---------- */
.key-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.key-point-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.5;
}

.key-point-item::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- Tables ---------- */
.table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  border: 1px solid #eef0f4;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

thead {
  background: var(--off-white);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid #e8ecf0;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f4;
  color: var(--text);
  line-height: 1.5;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:hover {
  background: #f3f5f8;
}

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

td small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

td em {
  font-style: italic;
  color: var(--text-muted);
}

td:first-child {
  font-weight: 500;
  background: var(--off-white);
  white-space: nowrap;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 6px;
  background: #e8ecf0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  animation: progressGrow 1s ease-out;
  transition: width var(--transition-slow);
}

/* ---------- Navigation Buttons ---------- */
.nav-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #eef0f4;
}

.nav-buttons .btn {
  min-width: 150px;
}

.nav-buttons .nav-spacer {
  flex: 1;
}

/* =========================================
   QUIZ STYLES
   ========================================= */
.quiz-container {
  max-width: 720px;
  margin: 0 auto;
}

.quiz-question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.quiz-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.quiz-question-text {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #e8ecf0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--white);
}

.quiz-option:hover:not(.disabled) {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.03);
}

.quiz-option.selected {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.06);
}

.quiz-option .option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d0d5dd;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.quiz-option.selected .option-radio {
  border-color: var(--gold);
  background: var(--gold);
}

.quiz-option.selected .option-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
}

.quiz-option .option-letter {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 20px;
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

.quiz-option.correct .option-radio {
  border-color: #22c55e;
  background: #22c55e;
}

.quiz-option.correct .option-radio::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.quiz-option.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.quiz-option.wrong .option-radio {
  border-color: #ef4444;
  background: #ef4444;
}

.quiz-option.wrong .option-radio::after {
  content: '✕';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.quiz-option.show-correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.04);
}

.quiz-option.show-correct .option-radio {
  border-color: #22c55e;
  background: #22c55e;
}

.quiz-option.show-correct .option-radio::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.quiz-option.disabled {
  cursor: default;
  opacity: 0.85;
}

.quiz-feedback {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  border-left: 3px solid var(--accent);
  font-style: italic;
}

.quiz-feedback.correct-feedback {
  border-left-color: #22c55e;
}

.quiz-feedback.wrong-feedback {
  border-left-color: #ef4444;
}

.quiz-score {
  text-align: center;
  padding: 32px 24px;
}

.quiz-score-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.quiz-score-label {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}

.quiz-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.quiz-actions .btn {
  min-width: 140px;
}

/* =========================================
   DIAGRAM STYLES
   ========================================= */
.diagram-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0;
}

.diagram-container svg {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.diagram-container .diagram-wrapper {
  position: relative;
  max-width: 100%;
}

.diagram-container .diagram-interactive-layer {
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.diagram-container .diagram-interactive-layer:hover {
  opacity: 0.8;
}

.diagram-container .diagram-interactive-element {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.diagram-container .diagram-interactive-element:hover {
  filter: brightness(1.1);
}

/* CSS-only tooltip */
.diagram-tooltip {
  position: relative;
  display: inline-block;
}

.diagram-tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 180px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  position: absolute;
  z-index: 50;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  transition: all var(--transition-fast);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.diagram-tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--navy) transparent transparent transparent;
}

.diagram-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Diagram legend */
.diagram-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 20px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.diagram-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.diagram-legend-item .legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.diagram-legend-item .legend-label {
  font-size: 13px;
  color: var(--text);
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.ml-8 { margin-left: 8px; }
.mr-8 { margin-right: 8px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }

/* =========================================
   RESPONSIVE
   ========================================= */

/* ---------- Tablet / Small Desktop ---------- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    z-index: 99;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .main-content {
    margin-left: 0;
    padding: 24px 20px;
  }

  .key-points {
    grid-template-columns: 1fr;
  }

  .nav-buttons {
    flex-wrap: wrap;
  }

  .nav-buttons .btn {
    flex: 1;
    min-width: 0;
  }

  .module-view-wrapper {
    flex-direction: column;
  }

  .notes-panel {
    position: static;
    max-width: none;
    width: 100%;
    max-height: none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  .app-header {
    padding: 0 16px;
  }

  .app-header .header-title {
    font-size: 15px;
  }

  .app-header .header-user-name {
    display: none;
  }

  .sidebar.open {
    width: 100%;
  }

  .main-content {
    padding: 16px 12px;
  }

  .card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .card-header {
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .btn-full-mobile {
    width: 100%;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  .chapter-title {
    font-size: 22px;
  }

  .module-view-title {
    font-size: 20px;
  }

  .module-number {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .login-card {
    padding: 28px 20px 24px;
  }

  .login-title {
    font-size: 20px;
  }

  .quiz-question-card {
    padding: 20px;
  }

  .quiz-question-text {
    font-size: 16px;
  }

  .quiz-option {
    padding: 12px 14px;
    font-size: 14px;
  }

  .key-point-item {
    font-size: 14px;
    padding: 10px 12px;
  }

  .definition-box {
    padding: 12px 16px;
  }

  .table-wrapper {
    font-size: 13px;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .nav-buttons .btn {
    width: 100%;
  }

  .quiz-actions {
    flex-direction: column;
  }

  .quiz-actions .btn {
    width: 100%;
  }

  .diagram-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-logout-btn span {
    display: none;
  }
}

/* ---------- Dashboard ---------- */
.dashboard-view {
  animation: fadeSlideUp 0.4s ease-out;
}

.dashboard-welcome {
  margin-bottom: 28px;
}

.dashboard-welcome h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.dashboard-welcome p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-stat {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition-base);
}

.dashboard-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.dashboard-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dashboard-stat-icon.icon-modules {
  background: rgba(26, 107, 138, 0.12);
  color: var(--accent);
}

.dashboard-stat-icon.icon-quiz {
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold);
}

.dashboard-stat-icon.icon-exam {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.dashboard-stat-icon.icon-progress {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.dashboard-stat-body {
  flex: 1;
  min-width: 0;
}

.dashboard-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}

.dashboard-stat-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Chapter progress list */
.dashboard-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-chapter-list {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.dashboard-chapter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #eef0f4;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dashboard-chapter-row:last-child {
  border-bottom: none;
}

.dashboard-chapter-row:hover {
  background: #f8fafc;
}

.dashboard-chapter-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dashboard-chapter-row.done .dashboard-chapter-num {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.dashboard-chapter-info {
  flex: 1;
  min-width: 0;
}

.dashboard-chapter-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chapter-title .check {
  margin-left: 6px;
  font-size: 12px;
}

.dashboard-chapter-progress {
  flex: 0 0 140px;
}

.dashboard-chapter-bar {
  height: 6px;
  background: var(--off-white);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2px;
}

.dashboard-chapter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.dashboard-chapter-fill.f100 { background: #22c55e; }
.dashboard-chapter-fill.f50 { background: var(--gold); }
.dashboard-chapter-fill.f0 { background: #cbd5e1; }

.dashboard-chapter-pct {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dashboard-chapter-quiz {
  flex-shrink: 0;
  text-align: right;
  min-width: 70px;
}

.dashboard-chapter-quiz-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dashboard-chapter-quiz-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Quick actions */
.dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Responsive dashboard */
@media (max-width: 1024px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-chapter-progress {
    display: none;
  }
  .dashboard-chapter-quiz {
    display: none;
  }
}

@media (max-width: 640px) {
  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .dashboard-stat {
    padding: 14px;
  }
  .dashboard-stat-value {
    font-size: 20px;
  }
  .dashboard-stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .dashboard-welcome h1 {
    font-size: 22px;
  }
  .dashboard-chapter-row {
    padding: 10px 14px;
  }
}

/* ---------- Evaluasi Final ---------- */
.evaluasi-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  max-width: 600px;
  margin: 0 auto;
}
.evaluasi-locked-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 52px 40px 40px;
  text-align: center;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.evaluasi-locked-icon {
  font-size: 72px;
  margin-bottom: 20px;
  display: block;
}
.evaluasi-locked h1 {
  font-size: 26px;
  margin-bottom: 16px;
  color: #1e293b;
}
.evaluasi-locked p {
  margin-bottom: 20px;
  color: #64748b;
  font-size: 15px;
}
.evaluasi-locked ul {
  text-align: left;
  display: inline-block;
  margin-bottom: 24px;
  padding: 0;
  list-style: none;
}
.evaluasi-locked ul li {
  padding: 6px 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}
.evaluasi-locked-reason {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #b91c1c;
  line-height: 1.5;
}
.evaluasi-container { max-width: 800px; margin: 0 auto; padding: 20px 0; }
.evaluasi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.evaluasi-header-left h1 { font-size: 22px; margin: 0 0 4px; }
.evaluasi-progress-text { font-size: 13px; color: #94a3b8; }
.evaluasi-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #d4a843;
  padding: 8px 16px;
  background: rgba(212,168,67,0.1);
  border-radius: 8px;
}
.evaluasi-timer.timer-warning { color: #f59e0b; background: rgba(245,158,11,0.15); }
.evaluasi-timer.timer-critical { color: #ef4444; background: rgba(239,68,68,0.15); animation: timerPulse 1s infinite; }
.timer-icon { font-size: 18px; }
@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.evaluasi-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}
.evaluasi-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4a843, #f0d080);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.evaluasi-question-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
}
.evaluasi-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #d4a843;
  color: #0b1a2e;
  font-weight: 700;
  font-size: 15px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.evaluasi-question-text {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #e2e8f0;
}
.evaluasi-options { display: flex; flex-direction: column; gap: 10px; }
.evaluasi-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  line-height: 1.4;
}
.evaluasi-option:hover:not(.correct):not(.wrong) { background: rgba(212,168,67,0.1); border-color: rgba(212,168,67,0.3); }
.evaluasi-option.selected { background: rgba(212,168,67,0.15); border-color: #d4a843; }
.evaluasi-option.correct { background: rgba(34,197,94,0.15); border-color: #22c55e; cursor: default; }
.evaluasi-option.wrong { background: rgba(239,68,68,0.15); border-color: #ef4444; cursor: default; }
.evaluasi-radio { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; }
.evaluasi-feedback {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.evaluasi-feedback.feedback-correct { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.evaluasi-feedback.feedback-wrong { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.evaluasi-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.evaluasi-nav-status { font-size: 13px; color: #94a3b8; white-space: nowrap; }
.evaluasi-submit-btn { background: #22c55e; }
.evaluasi-submit-btn:hover { background: #16a34a; }
.evaluasi-results { max-width: 600px; margin: 40px auto; text-align: center; }
.evaluasi-results-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 48px 32px;
}
.evaluasi-results-icon { font-size: 72px; margin-bottom: 16px; }
.evaluasi-results-card h1 { font-size: 28px; margin-bottom: 24px; }
.evaluasi-score-display { margin: 24px 0; }
.evaluasi-score-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 700;
}
.evaluasi-score-circle.score-pass { background: rgba(34,197,94,0.15); border: 4px solid #22c55e; color: #22c55e; }
.evaluasi-score-circle.score-fail { background: rgba(239,68,68,0.15); border: 4px solid #ef4444; color: #ef4444; }
.evaluasi-score-value { font-variant-numeric: tabular-nums; }
.evaluasi-score-detail { font-size: 16px; color: #94a3b8; margin-bottom: 8px; }
.evaluasi-score-message { font-size: 15px; color: #cbd5e1; margin-bottom: 32px; }
.evaluasi-results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
