/* public/css/style.css - Modern Responsive Stylesheet with Print Book Engine */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  background-color: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

.brand-badge {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

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

.nav-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.nav-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--gray-100);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.role-tag {
  background-color: var(--primary);
  color: white;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.role-tag.admin {
  background-color: #7c3aed;
}

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
  width: 100%;
}

.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.page-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* Card Styles */
.card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: #059669; }

.btn-warning { background-color: var(--warning); color: white; }
.btn-warning:hover { background-color: #d97706; }

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

.btn-secondary {
  background-color: #ffffff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}
.btn-secondary:hover { background-color: var(--gray-100); }

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Grid & Metrics */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.metric-title {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* Table Styles */
.table-responsive {
  overflow-x: auto;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

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

.data-table th {
  background-color: var(--gray-100);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.data-table tr:hover { background-color: var(--gray-50); }

/* CBT EXAM INTERFACE */
.exam-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
}

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

.exam-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timer-box {
  background: #1e293b;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
}

.timer-box.warning {
  background: #dc2626;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Section Progress Bar Steppers */
.section-progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.section-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid transparent;
}

.section-step.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.section-step.completed {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.section-step.locked {
  opacity: 0.6;
}

.section-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.section-step.active .section-step-num {
  background: var(--primary);
  color: white;
}

.section-step.completed .section-step-num {
  background: var(--success);
  color: white;
}

.passage-panel {
  background-color: #f8fafc;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  max-height: 480px;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 0.95rem;
}

.question-panel {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.75rem;
}

.question-text {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  background-color: white;
}

.option-card:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.option-card.selected {
  border-color: var(--primary);
  background-color: #dbeafe;
  font-weight: 600;
}

.option-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--gray-200);
  color: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-card.selected .option-badge {
  background-color: var(--primary);
  color: white;
}

/* Number Navigator Grid */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.num-btn {
  aspect-ratio: 1;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.num-btn:hover { border-color: var(--primary); }
.num-btn.active { box-shadow: 0 0 0 2px var(--primary); }
.num-btn.answered { background-color: var(--success); color: white; border-color: var(--success); }
.num-btn.flagged { background-color: var(--warning); color: white; border-color: var(--warning); }

.legend-row {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 0.35rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

/* Audio Player Box */
.audio-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

/* Result Screen */
.score-hero {
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.score-number {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.score-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.review-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: white;
}

.review-card.correct { border-left: 5px solid var(--success); }
.review-card.wrong { border-left: 5px solid var(--danger); }
.review-card.unanswered { border-left: 5px solid var(--gray-400); }

.explanation-box {
  background: #f8fafc;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-purple { background: #f3e8ff; color: #6b21a8; }

/* ==================================================== */
/* PRINTABLE BOOK / BLUEPRINT MODULE STYLING            */
/* ==================================================== */
.book-paper {
  background: #ffffff;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem;
  line-height: 1.6;
  color: #111827;
}

.book-cover {
  border-bottom: 3px double #1f2937;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.book-title {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.book-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 1rem;
}

.book-meta-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1rem;
}

.book-section-divider {
  background: #f3f4f6;
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 2.5rem 0 1.5rem 0;
  page-break-before: always;
}

.book-item-card {
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #ffffff;
  page-break-inside: avoid;
}

.book-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.book-q-num {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1f2937;
}

.book-competency-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 1rem;
}

.book-passage-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #6b7280;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}

.book-options-grid {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.book-option-line {
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}

.book-option-line.is-correct {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 700;
}

.book-solution-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.book-step-list {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* ==================================================== */
/* MEDIA PRINT (A4 READY BOOK FORMAT)                   */
/* ==================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .navbar,
  .no-print,
  #auth-header-section,
  .btn,
  select,
  input,
  button {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .book-paper {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .book-item-card {
    border: 1px solid #000000 !important;
    page-break-inside: avoid !important;
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
  }

  .book-section-divider {
    page-break-before: always !important;
    border-left: 4px solid #000000 !important;
    background: #f0f0f0 !important;
    color: #000000 !important;
  }

  .book-competency-box {
    border: 1px solid #666666 !important;
    background: #f9f9f9 !important;
    color: #000000 !important;
  }

  .book-solution-box {
    border: 1px solid #666666 !important;
    background: #f9f9f9 !important;
    color: #000000 !important;
  }

  .book-option-line.is-correct {
    border: 1px solid #000000 !important;
    background: #e5e5e5 !important;
    color: #000000 !important;
    font-weight: bold !important;
  }

  @page {
    size: A4 portrait;
    margin: 15mm 15mm 15mm 15mm;
  }
}

/* ============================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================ */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 400px;
  width: calc(100vw - 2.5rem);
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  transform: translateX(110%);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.toast-item.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-item.hide {
  opacity: 0;
  transform: translateX(110%);
}

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: var(--gray-800);
}

/* Toast Variants */
.toast-success {
  border-left: 5px solid #10b981;
}
.toast-success .toast-icon {
  background: #d1fae5;
  color: #065f46;
}

.toast-error {
  border-left: 5px solid #ef4444;
}
.toast-error .toast-icon {
  background: #fee2e2;
  color: #991b1b;
}

.toast-warning {
  border-left: 5px solid #f59e0b;
}
.toast-warning .toast-icon {
  background: #fef3c7;
  color: #92400e;
}

.toast-info {
  border-left: 5px solid #2563eb;
}
.toast-info .toast-icon {
  background: #dbeafe;
  color: #1e40af;
}

/* ============================================================
   EXAM CARD COVER GRAPHICS & BANNERS
   ============================================================ */
.exam-card-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exam-card-wrapper:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.exam-cover-banner {
  height: 145px;
  position: relative;
  overflow: hidden;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.exam-cover-tbs {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
}

.exam-cover-toefl {
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #9333ea 100%);
}

.exam-cover-lpdp {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 50%, #ea580c 100%);
}

.exam-cover-default {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

.exam-cover-watermark {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 6.5rem;
  opacity: 0.18;
  user-select: none;
  pointer-events: none;
}

.exam-cover-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exam-cover-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exam-cover-status {
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.exam-cover-title {
  position: relative;
  z-index: 2;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  margin-top: auto;
  line-height: 1.35;
}

.exam-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

/* ============================================================
   ERROR / 404 NOT FOUND VIEW
   ============================================================ */
.error-view-wrapper {
  max-width: 620px;
  margin: 3rem auto;
  text-align: center;
}

.error-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  padding: 3rem 2rem;
}

.error-badge-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--danger-light);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
}

.error-code-pill {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.error-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   PROFILE PHOTO, REGISTRATION & USER MANAGEMENT STYLES
   ============================================================ */

/* Navbar Avatar */
.user-avatar-header {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
}

.default-avatar {
  background: var(--gray-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Table Avatar */
.user-avatar-table {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Public Register Header */
.pub-reg-header-icon {
  width: 58px;
  height: 58px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

/* Photo Upload Circle */
.photo-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.avatar-upload-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px dashed var(--primary);
  background: var(--gray-50);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.avatar-upload-circle:hover {
  border-color: var(--primary-hover);
  background: var(--primary-light);
  transform: scale(1.02);
}

.avatar-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 50%;
}

.avatar-upload-circle:hover .avatar-hover-overlay {
  opacity: 1;
}

/* Form Section Blocks */
.form-section-block {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Exam Select Cards in Public Register */
.exam-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exam-select-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #ffffff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.exam-select-card:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

.exam-select-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.exam-select-card input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.exam-select-info {
  flex: 1;
}

.exam-select-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.exam-select-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.exam-select-desc {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.exam-select-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Share Link Banner */
.share-link-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid #bfdbfe;
  padding: 1.25rem;
}

/* Enrolled Exam Badges */
.enrolled-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
}
.enrolled-badge-tbs {
  background: #dbeafe;
  color: #1e40af;
}
.enrolled-badge-toefl {
  background: #f3e8ff;
  color: #6b21a8;
}
.enrolled-badge-lpdp {
  background: #ffedd5;
  color: #9a3412;
}

/* ==================================================== */
/* PENDING VERIFICATION SCREEN                          */
/* ==================================================== */
.pending-card-wrapper {
  max-width: 620px;
  margin: 3rem auto;
  text-align: center;
}
.pending-icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: #fef3c7;
  color: #d97706;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: pulse 2s infinite;
}
.pending-details-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}
.pending-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
}
.pending-info-row:last-child {
  border-bottom: none;
}
.pending-info-label {
  color: var(--gray-600);
  font-weight: 500;
}
.pending-info-val {
  font-weight: 600;
  color: var(--gray-900);
}

/* ==================================================== */
/* INTERACTIVE LEARNING MODULE & BEDAH SOAL             */
/* ==================================================== */
.learning-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.learning-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.learning-module-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.learning-module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.learning-module-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.learning-q-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.learning-q-card:hover {
  border-color: var(--gray-300);
}
.learning-q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}
.learning-blueprint-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.learning-explanation-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #166534;
  line-height: 1.6;
}
.learning-explanation-box strong {
  color: #14532d;
}

/* Learning Practice Interactive Answer Buttons */
.interactive-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--gray-800);
  transition: all 0.2s;
}
.interactive-option-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: var(--primary);
}
.interactive-option-btn.selected {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.interactive-option-btn.is-correct-reveal {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  font-weight: 700 !important;
}
.interactive-option-btn.is-wrong-reveal {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}

/* ==================================================== */
/* ==================================================== */
/* OFFICIAL CERTIFICATE (PORTRAIT & LANDSCAPE TEMPLATES) */
/* ==================================================== */
.certificate-wrapper {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0;
  background: #334155;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* Certificate Customizer Panel */
.cert-customizer-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.cert-customizer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}
.cert-customizer-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.35rem;
  display: block;
}

/* ---------------------------------------------------- */
/* TEMPLATE 1: PORTRAIT RESMI 32JP (EDUKARYA STYLE)     */
/* ---------------------------------------------------- */
.cert-paper-portrait {
  width: 794px;
  min-height: 1123px;
  height: 1123px;
  background: #ffffff;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  padding: 42px 48px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 2px;
}

/* Decorative Geometric Edges for Portrait (Ref 1) */
.cert-p1-corner-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, transparent 50.1%);
  pointer-events: none;
  z-index: 1;
}
.cert-p1-corner-tr {
  position: absolute;
  top: 0;
  right: 0;
  width: 130px;
  height: 130px;
  background: linear-gradient(225deg, #e11d48 0%, #f97316 50%, transparent 50.1%);
  pointer-events: none;
  z-index: 1;
}
.cert-p1-corner-bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 130px;
  height: 130px;
  background: linear-gradient(45deg, #0284c7 0%, #2563eb 50%, transparent 50.1%);
  pointer-events: none;
  z-index: 1;
}
.cert-p1-corner-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: linear-gradient(315deg, #f97316 0%, #fbbf24 50%, transparent 50.1%);
  pointer-events: none;
  z-index: 1;
}
.cert-p1-inner-frame {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cert-p1-header-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.cert-p1-title {
  text-align: center;
  font-size: 3.1rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: #1e3a8a;
  line-height: 1;
  margin: 0.25rem 0;
  text-transform: uppercase;
}
.cert-p1-number-capsule {
  display: inline-block;
  background: #1d4ed8;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.4rem 1.6rem;
  border-radius: 9999px;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px -1px rgba(29, 78, 216, 0.25);
}
.cert-p1-given-to {
  font-size: 1.05rem;
  color: #475569;
  font-weight: 500;
  margin: 0.6rem 0 0.2rem;
  text-align: center;
}
.cert-p1-recipient-name {
  font-size: 2.15rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  line-height: 1.2;
  margin: 0.2rem 0;
}
.cert-p1-recipient-inst {
  font-size: 1.15rem;
  font-weight: 700;
  color: #334155;
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: 0.5px;
}
.cert-p1-as-role {
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  margin: 0.15rem 0;
}
.cert-p1-role-title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 900;
  color: #1e40af;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.cert-p1-desc-text {
  text-align: center;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.45;
  max-width: 650px;
  margin: 0 auto 0.6rem;
}

/* 32JP Table (Ref 1) */
.cert-curriculum-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 0.75rem;
  font-size: 0.8rem;
  border: 1.5px solid #2563eb;
}
.cert-curriculum-table th, 
.cert-curriculum-table td {
  border: 1px solid #93c5fd;
  padding: 5px 8px;
  text-align: left;
}
.cert-curriculum-table th {
  background: #f0f7ff;
  color: #1e40af;
  font-weight: 700;
  text-align: center;
  font-size: 0.78rem;
}
.cert-curriculum-table tr.total-row {
  background: #eff6ff;
  font-weight: 800;
  color: #1e3a8a;
}

/* Attendance Boxes */
.cert-attendance-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.4rem 0 0.85rem;
}
.cert-attendance-box {
  border: 1.5px solid #2563eb;
  border-radius: 6px;
  overflow: hidden;
  min-width: 140px;
  text-align: center;
}
.cert-attendance-date {
  background: #f0f7ff;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e40af;
  border-bottom: 1px solid #bfdbfe;
}
.cert-attendance-status {
  padding: 4px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #059669;
}

/* Bottom Footer (Ref 1) */
.cert-p1-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}
.cert-p1-sign-block {
  text-align: center;
  min-width: 210px;
}
.cert-p1-sign-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-p1-sign-space {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0.25rem 0;
}
.cert-p1-sign-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}
.cert-p1-sign-nip {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}
.cert-p1-stamp-overlay {
  position: absolute;
  width: 92px;
  height: 92px;
  top: -16px;
  right: 18px;
  pointer-events: none;
}

/* ---------------------------------------------------- */
/* TEMPLATE 2: LANDSCAPE PRESTASI (MAJAUTAMA STYLE)     */
/* ---------------------------------------------------- */
.cert-paper-landscape {
  width: 1050px;
  min-height: 742px;
  height: 742px;
  background: #ffffff;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  padding: 38px 48px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 2px;
}

/* Geometric Borders for Landscape (Ref 2) */
.cert-p2-ornament-tl {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 0% 0%, #1e40af 0%, #2563eb 45%, #60a5fa 75%, transparent 76%);
  pointer-events: none;
  z-index: 1;
}
.cert-p2-ornament-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 100% 100%, #1e40af 0%, #2563eb 45%, #38bdf8 75%, transparent 76%);
  pointer-events: none;
  z-index: 1;
}
.cert-p2-inner-frame {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cert-p2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cert-p2-title-main {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 5px;
  color: #1e3a8a;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
}
.cert-p2-title-sub {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 6px;
  color: #3b82f6;
  text-transform: uppercase;
  margin: 0.2rem 0 0.8rem;
}
.cert-p2-given {
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  color: #475569;
}
.cert-p2-name {
  text-align: center;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0.35rem 0;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 2rem;
  border-bottom: 2px solid #2563eb;
}
.cert-p2-name::before, .cert-p2-name::after {
  content: '♦';
  position: absolute;
  bottom: -9px;
  color: #2563eb;
  font-size: 14px;
}
.cert-p2-name::before { left: -8px; }
.cert-p2-name::after { right: -8px; }

.cert-p2-badge-pill {
  display: inline-block;
  background: #eff6ff;
  border: 1.5px solid #3b82f6;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.45rem 1.8rem;
  border-radius: 9999px;
  margin: 0.5rem auto;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.15);
}
.cert-p2-desc {
  text-align: center;
  max-width: 750px;
  margin: 0.4rem auto;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
}

.cert-p2-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0 1.5rem;
}
.cert-p2-gold-medal {
  width: 95px;
  height: 110px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.18));
}

/* ==================================================== */
/* PRINT MEDIA SPECIFIC RULES                           */
/* ==================================================== */
@media print {
  /* Hide UI components during print */
  body.printing-cert-portrait .navbar,
  body.printing-cert-portrait .modal-overlay:not(#modal-certificate),
  body.printing-cert-portrait .no-print,
  body.printing-cert-portrait .cert-customizer-box,
  body.printing-cert-landscape .navbar,
  body.printing-cert-landscape .modal-overlay:not(#modal-certificate),
  body.printing-cert-landscape .no-print,
  body.printing-cert-landscape .cert-customizer-box,
  body.printing-report .navbar,
  body.printing-report .no-print {
    display: none !important;
  }

  body.printing-cert-portrait,
  body.printing-cert-landscape,
  body.printing-report {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-cert-portrait #modal-certificate,
  body.printing-cert-landscape #modal-certificate {
    position: static !important;
    display: block !important;
    background: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.printing-cert-portrait .certificate-wrapper,
  body.printing-cert-landscape .certificate-wrapper {
    background: none !important;
    padding: 0 !important;
    display: block !important;
  }

  body.printing-cert-portrait .cert-paper-portrait {
    width: 100% !important;
    height: 100vh !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    margin: 0 !important;
  }

  body.printing-cert-landscape .cert-paper-landscape {
    width: 100% !important;
    height: 100vh !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    margin: 0 !important;
  }
}

/* ========================================== */
/* BILLING & IMPORT BANK SOAL STYLES          */
/* ========================================== */
.dropdown-menu-custom {
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu-link:hover {
  background-color: var(--gray-50);
}

.pricing-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.upload-dropzone:hover {
  border-color: var(--primary-hover) !important;
  background-color: #f0f7ff !important;
}

.adm-order-filter-btn {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.adm-order-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 700;
}

/* =====================================================================
   RESPONSIVE DESIGN ENGINE (LAPTOP, TABLET, MOBILE HP)
   ===================================================================== */

/* 1. Hamburger Toggle Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: var(--gray-200);
}
.hamburger-bar {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* 2. Desktop Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  z-index: 100;
  animation: fadeInDown 0.15s ease-out;
}
.nav-dropdown-menu.show {
  display: block;
}
.dropdown-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  padding: 0.4rem 0.75rem 0.2rem;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: all 0.15s ease;
}
.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.4rem 0;
}

/* User Profile Pill & Unified Account Dropdown */
.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.user-profile-pill:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}
.user-profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-name-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-caret {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-left: 2px;
}
.user-dropdown-box {
  min-width: 240px;
  top: calc(100% + 8px);
  right: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}
.user-dropdown-header {
  padding: 0.6rem 0.85rem 0.4rem;
}
.dropdown-item-danger:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

/* 3. Mobile Offcanvas Drawer & Backdrop */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer-backdrop.show {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.drawer-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gray-50);
}
.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.drawer-close-btn {
  background: var(--gray-200);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-menu-list {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.5rem 0.25rem;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.drawer-item:hover, .drawer-item.active {
  background: var(--primary-light);
  color: var(--primary);
}
.drawer-item .d-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}
.drawer-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.5rem 0;
}
.drawer-footer {
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* 4. Mobile Bottom Bar (HP Only) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bbar-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  height: 100%;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}
.bbar-btn.active, .bbar-btn:hover {
  color: var(--primary);
}
.bbar-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.bbar-label {
  font-size: 0.7rem;
  font-weight: 600;
}

/* 5. Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
}
.table-responsive .data-table {
  margin: 0;
  border: none;
  min-width: 650px;
}

/* =====================================================================
   DEVICE SPECIFIC MEDIA QUERIES
   ===================================================================== */

/* Default state: hide student and admin navs */
#student-nav,
#admin-nav {
  display: none !important;
}

/* LAPTOP / DESKTOP (>= 992px) */
@media (min-width: 992px) {
  .hamburger-btn {
    display: none !important;
  }
  .mobile-bottom-bar {
    display: none !important;
  }
  body.is-logged-in.role-student:not(.is-auth-page) #student-nav {
    display: flex !important;
  }
  body.is-logged-in.role-admin:not(.is-auth-page) #admin-nav {
    display: flex !important;
  }
}

/* STRICT RULE: When on Auth/Login/Register page OR when logged out, HIDE all navigation menus */
body.is-auth-page #student-nav,
body.is-auth-page #admin-nav,
body.is-auth-page #auth-header-section,
body.is-auth-page #btn-hamburger,
body.is-auth-page #mobile-bottom-bar,
body.is-auth-page .nav-links,
body:not(.is-logged-in) #student-nav,
body:not(.is-logged-in) #admin-nav,
body:not(.is-logged-in) #auth-header-section,
body:not(.is-logged-in) #btn-hamburger,
body:not(.is-logged-in) #mobile-bottom-bar,
body:not(.is-logged-in) .nav-links {
  display: none !important;
}

body.is-auth-page .navbar {
  justify-content: center;
}

/* TABLET (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .hamburger-btn {
    display: flex !important;
  }
  .mobile-bottom-bar {
    display: none !important;
  }
  .container {
    padding: 1.25rem 1.5rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .modal-content {
    width: 90% !important;
    max-width: 700px !important;
  }
  .exam-layout {
    grid-template-columns: 1fr 260px !important;
  }
}

/* MOBILE PHONES / HP (< 768px) */
@media (max-width: 767px) {
  body.has-bottom-nav {
    padding-bottom: 75px !important;
  }
  .desktop-nav {
    display: none !important;
  }
  .hamburger-btn {
    display: flex !important;
  }
  .mobile-bottom-bar {
    display: flex !important;
  }
  .navbar {
    padding: 0.6rem 1rem;
  }
  .brand-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  .nav-brand {
    font-size: 1.1rem;
    gap: 0.5rem;
  }
  #user-info #user-name-display {
    display: none;
  }
  #user-info #user-role-display {
    display: none;
  }
  #btn-edit-profile {
    display: none !important;
  }
  .container {
    padding: 0.85rem 0.75rem;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .page-title {
    font-size: 1.35rem;
  }
  .page-desc {
    font-size: 0.82rem;
  }
  .card {
    padding: 1rem !important;
  }
  
  /* Grids Stacked */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }
  .stat-card {
    padding: 0.85rem !important;
  }
  .stat-card .val {
    font-size: 1.45rem !important;
  }
  .grid-2 {
    grid-template-columns: 1fr !important;
  }
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }

  /* CBT Exam View Mobile */
  .exam-layout {
    grid-template-columns: 1fr !important;
  }
  .timer-box {
    font-size: 1.15rem !important;
    padding: 0.35rem 0.65rem !important;
  }
  .options-list .option-item {
    padding: 0.85rem !important;
    font-size: 0.95rem;
    min-height: 48px;
  }
  .nav-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.4rem !important;
  }
  .nav-grid-btn {
    height: 38px !important;
    font-size: 0.9rem !important;
  }

  /* Modals Mobile */
  .modal-overlay {
    padding: 0.5rem !important;
  }
  .modal-content {
    width: 96% !important;
    max-width: 100% !important;
    padding: 1.25rem 1rem !important;
    max-height: 92vh !important;
    border-radius: var(--radius-md) !important;
  }
  .form-input, .form-select, textarea {
    font-size: 16px !important; /* Prevents auto zoom in iOS */
  }

  /* Learning Tabs scrollable horizontally */
  .learning-tab-nav {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .learning-tab-btn {
    flex: 0 0 auto !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.85rem !important;
  }
}

/* ==================================================== */
/* COURSES & SHOPPING CART STYLES (seeducation)          */
/* ==================================================== */
.course-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1);
  border-color: #10b981;
}

.course-filter-tabs .btn {
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s;
}
.course-filter-tabs .btn.active-filter {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

.pay-option-card {
  transition: all 0.2s ease;
}
.pay-option-card:hover {
  border-color: var(--primary) !important;
  background: #f8fafc !important;
}

@media (max-width: 992px) {
  #student-courses-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  #student-courses-grid {
    grid-template-columns: 1fr !important;
  }
  .course-filter-tabs {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap !important;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .course-filter-tabs .btn {
    flex: 0 0 auto;
    font-size: 0.8rem;
  }
}


