/* ==========================================================================
   CICRM Exam Portal - Official Design System & Stylesheet
   Theme: Royal Purple & Corporate Academic Excellence
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Space+Mono:wght@700&display=swap');

:root {
  --primary-950: #2e0854;
  --primary-900: #3b0764;
  --primary-800: #581c87;
  --primary-700: #6b21a8;
  --primary-600: #7e22ce;
  --primary-500: #9333ea;
  --primary-400: #a855f7;
  --primary-300: #c084fc;
  --primary-200: #e9d5ff;
  --primary-100: #f3e8ff;
  --primary-50:  #faf5ff;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50:  #ecfdf5;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --amber-50:  #fffbeb;

  --rose-600: #e11d48;
  --rose-500: #f43f5e;
  --rose-100: #ffe4e6;
  --rose-50:  #fff1f2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-purple: 0 10px 25px -5px rgba(126, 34, 206, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--slate-800);
  background-color: #fcfaff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary-700);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-900);
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

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

.gradient-text {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.portal-navbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--primary-100);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(88, 28, 135, 0.04);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-950);
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.brand-motto {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-600);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-700);
  background: var(--primary-50);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
  text-decoration: none;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(107, 33, 168, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
  box-shadow: 0 6px 16px rgba(107, 33, 168, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-50);
  color: var(--primary-800);
  border-color: var(--primary-200);
}

.btn-secondary:hover {
  background: var(--primary-100);
  border-color: var(--primary-300);
}

.btn-outline {
  background: #ffffff;
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-900);
}

.btn-success {
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-500) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-success:hover {
  background: var(--emerald-600);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--rose-600);
  color: #ffffff;
}

.btn-danger:hover {
  background: var(--rose-500);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 34px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-purple, .badge-distinction {
  background: var(--primary-100);
  color: var(--primary-800);
  border: 1px solid var(--primary-200);
}

.badge-success, .badge-pass, .badge-merit {
  background: var(--emerald-50);
  color: var(--emerald-600);
  border: 1px solid var(--emerald-100);
}

.badge-warning {
  background: var(--amber-50);
  color: var(--amber-600);
  border: 1px solid var(--amber-100);
}

.badge-danger, .badge-fail {
  background: var(--rose-50);
  color: var(--rose-600);
  border: 1px solid var(--rose-100);
}

.badge-gray {
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

/* ==========================================================================
   Cards & Layout
   ========================================================================== */
.portal-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
  flex: 1;
}

.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(147, 51, 234, 0.12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
}

/* ==========================================================================
   Hero Section (Home)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #2e0854 0%, #581c87 50%, #7e22ce 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 50px 36px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-purple);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero-desc {
  font-size: 16px;
  color: var(--primary-100);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--slate-800);
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
  min-height: 46px;
}

.form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.15);
}

.form-text {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 6px;
}

/* ==========================================================================
   CBT Exam Interface
   ========================================================================== */
.exam-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.exam-main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exam-header-bar {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(147, 51, 234, 0.15);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 75px;
  z-index: 40;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary-50);
  border: 1.5px solid var(--primary-200);
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-800);
}

.timer-box.warning {
  background: var(--amber-50);
  border-color: var(--amber-500);
  color: var(--amber-600);
  animation: pulse 1s infinite alternate;
}

.timer-box.danger {
  background: var(--rose-50);
  border-color: var(--rose-500);
  color: var(--rose-600);
  animation: urgentPulse 0.5s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

@keyframes urgentPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
}

.question-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(147, 51, 234, 0.15);
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-100);
}

.question-num-pill {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.module-pill {
  font-size: 13px;
  color: var(--slate-600);
  font-weight: 600;
  background: var(--slate-100);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.question-prompt {
  font-size: 17px;
  font-weight: 600;
  color: var(--slate-900);
  line-height: 1.6;
  margin-bottom: 24px;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  background: #ffffff;
}

.option-item:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
}

.option-item.selected {
  border-color: var(--primary-600);
  background: #fbf5ff;
  box-shadow: 0 0 0 1px var(--primary-600);
}

.option-item input[type="radio"] {
  display: none;
}

.option-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--slate-100);
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  border: 1px solid var(--slate-200);
}

.option-item:hover .option-badge {
  background: var(--primary-100);
  color: var(--primary-800);
  border-color: var(--primary-300);
}

.option-item.selected .option-badge {
  background: var(--primary-600);
  color: #ffffff;
  border-color: var(--primary-600);
}

.option-text {
  font-size: 15px;
  color: var(--slate-800);
  line-height: 1.5;
  padding-top: 4px;
}

/* Exam Navigation Footer */
.exam-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

/* Question Palette / Sidebar */
.palette-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(147, 51, 234, 0.15);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 75px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.palette-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-100);
}

.palette-filter-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.palette-grid {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.palette-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  transition: all 0.15s ease;
  position: relative;
}

.palette-btn:hover {
  border-color: var(--primary-400);
  transform: translateY(-1px);
}

.palette-btn.current {
  border: 2px solid var(--primary-600);
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--primary-200);
}

.palette-btn.answered {
  background: var(--emerald-600);
  color: #ffffff;
  border-color: var(--emerald-600);
}

.palette-btn.flagged::after {
  content: '★';
  position: absolute;
  top: -4px;
  right: -2px;
  font-size: 10px;
  color: var(--amber-500);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.palette-legend {
  padding: 14px 16px;
  border-top: 1px solid var(--slate-100);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
  color: var(--slate-600);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ==========================================================================
   Scorecard & Results
   ========================================================================== */
.score-hero-card {
  background: linear-gradient(135deg, #3b0764 0%, #6b21a8 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 40px 30px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: var(--shadow-purple);
}

.score-big-num {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin: 12px 0;
}

.score-big-total {
  font-size: 24px;
  opacity: 0.8;
  font-weight: 500;
}

.score-badge-status {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.score-badge-status.passed {
  background: #10b981;
  color: #ffffff;
}

.score-badge-status.failed {
  background: #f43f5e;
  color: #ffffff;
}

/* Module Progress Bars */
.module-progress-table {
  width: 100%;
  border-collapse: collapse;
}

.module-progress-table td, .module-progress-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-100);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--slate-100);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600) 0%, var(--primary-400) 100%);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* ==========================================================================
   Official Printable Academic Transcript
   ========================================================================== */
.transcript-wrapper {
  max-width: 860px;
  margin: 20px auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.transcript-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  opacity: 0.035;
  pointer-events: none;
  width: 500px;
  z-index: 1;
}

.transcript-header {
  text-align: center;
  border-bottom: 3px double var(--primary-800);
  padding-bottom: 24px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

.transcript-seal-img {
  width: 96px;
  height: auto;
  margin-bottom: 12px;
}

.transcript-inst-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-950);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.transcript-inst-motto {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-700);
  font-style: italic;
  margin-top: 4px;
}

.transcript-doc-title {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 18px;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  color: var(--primary-900);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
}

.transcript-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin-bottom: 28px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 18px 24px;
  border-radius: 6px;
  position: relative;
  z-index: 2;
}

.meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.meta-label {
  color: var(--slate-500);
  font-weight: 600;
  min-width: 140px;
}

.meta-value {
  color: var(--slate-900);
  font-weight: 700;
}

.transcript-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.transcript-table th {
  background: var(--primary-900);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
}

.transcript-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 13px;
}

.transcript-table tr:nth-child(even) td {
  background: #fafafa;
}

.transcript-summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-50);
  border: 1.5px solid var(--primary-300);
  padding: 16px 24px;
  border-radius: 6px;
  margin-bottom: 36px;
  position: relative;
  z-index: 2;
}

.transcript-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 24px;
  margin-top: 20px;
  border-top: 1px solid var(--slate-200);
  position: relative;
  z-index: 2;
}

.sig-box {
  text-align: center;
  width: 220px;
}

.sig-line {
  border-bottom: 1px solid var(--slate-700);
  margin-bottom: 8px;
  height: 40px;
}

.sig-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-800);
}

.sig-dept {
  font-size: 11px;
  color: var(--slate-500);
}

/* ==========================================================================
   Admin Tables & Modals
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: var(--slate-50);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--slate-200);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-100);
  font-size: 14px;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--primary-50);
}

/* Modal Overlay */
.portal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.portal-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.portal-modal {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.portal-modal-overlay.active .portal-modal {
  transform: translateY(0);
}

.portal-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.portal-modal-footer {
  padding: 16px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 991px) {
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .palette-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 900;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 70vh;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .palette-card.drawer-open {
    transform: translateY(0);
  }

  .mobile-palette-toggle-bar {
    display: flex !important;
  }
}

.mobile-palette-toggle-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 12px 20px;
  border-top: 1px solid var(--primary-200);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  z-index: 100;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-banner {
    padding: 30px 20px;
  }

  .hero-title {
    font-size: 26px;
  }

  .transcript-wrapper {
    padding: 20px;
    margin: 10px;
  }

  .transcript-meta-grid {
    grid-template-columns: 1fr;
  }

  .transcript-signatures {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .sig-box {
    width: 100%;
  }

  .navbar-inner {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 13px;
  }
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .portal-navbar,
  .no-print,
  .btn,
  footer {
    display: none !important;
  }

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

  .transcript-watermark {
    opacity: 0.06 !important;
  }

  .transcript-header {
    border-bottom: 2px solid #000 !important;
  }

  .transcript-table th {
    background: #4a148c !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ==========================================================================
   Active Diet Banner & Countdown Timer
   ========================================================================== */
.diet-banner-card {
  background: linear-gradient(135deg, #2e0854 0%, #4a148c 50%, #6b21a8 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  margin-bottom: 30px;
  box-shadow: 0 12px 30px -5px rgba(74, 20, 140, 0.35);
  border: 1px solid rgba(233, 213, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.diet-banner-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.diet-countdown-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.countdown-box {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 68px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.countdown-box:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.countdown-digit {
  font-family: 'Space Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-unit {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e9d5ff;
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   Induction Ceremony Gallery Showcase
   ========================================================================== */
.induction-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.induction-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.induction-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-purple);
  border-color: var(--primary-300);
}

.induction-img-wrap {
  width: 100%;
  height: 230px;
  overflow: hidden;
  position: relative;
  background: #1e1b4b;
}

.induction-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.induction-card:hover .induction-img {
  transform: scale(1.05);
}

.induction-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.induction-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  background: var(--primary-100);
  color: var(--primary-800);
  margin-bottom: 8px;
}

.induction-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.induction-desc {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.6;
}

/* ==========================================================================
   Printable Result Notification Slip (For Student)
   ========================================================================== */
.result-notification-slip {
  background: #ffffff;
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
}

@media print {
  .result-notification-slip {
    border: 1px solid #333 !important;
    box-shadow: none !important;
    padding: 20px !important;
    margin: 0 !important;
  }
}
