/* =========================================================================
   CORPORATE EXECUTIVE DESIGN SYSTEM
   Benchmark: Linear, Stripe Dashboard, Notion Enterprise, Vanta
   Strict Directive: No academic or high-school portal aesthetics.
   ========================================================================= */

:root {
  /* Slate & Obsidian Neutrals */
  --bg-main: #0B0F17;
  --bg-sidebar: #0F172A;
  --bg-card: #131D31;
  --bg-card-hover: #19243C;
  --bg-elevated: #1E293B;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(13, 148, 136, 0.5);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Executive Accents */
  --accent-teal: #0D9488;
  --accent-teal-hover: #14B8A6;
  --accent-teal-subtle: rgba(13, 148, 136, 0.15);

  --accent-blue: #2563EB;
  --accent-blue-subtle: rgba(37, 99, 235, 0.15);

  --status-success: #10B981;
  --status-success-subtle: rgba(16, 185, 129, 0.15);

  --status-warning: #F59E0B;
  --status-warning-subtle: rgba(245, 158, 11, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Shell Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Top Executive Bar */
.topbar {
  height: 60px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

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

.brand-badge {
  background: linear-gradient(135deg, var(--accent-teal), #065F46);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.brand-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-subtext {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Pitch Mode Stepper Navigation (Top Center) */
.pitch-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.pitch-step-pill {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pitch-step-pill:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.pitch-step-pill.active {
  background-color: var(--accent-teal);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(13, 148, 136, 0.4);
}

/* Topbar Controls */
.topbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: var(--accent-blue-subtle);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-weight: 600;
}

.mode-toggle {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

/* Main Body View */
.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-category {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin: 16px 8px 8px 8px;
}

.sidebar-category:first-of-type {
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-teal-subtle);
  color: var(--accent-teal-hover);
  border: 1px solid rgba(13, 148, 136, 0.3);
  font-weight: 600;
}

.nav-num {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.6;
  width: 16px;
}

/* Content Area */
.content-area {
  flex: 1;
  background-color: var(--bg-main);
  padding: 28px 36px;
  overflow-y: auto;
}

/* Screen Header */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.screen-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.screen-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.screen-actions {
  display: flex;
  gap: 10px;
}

/* Corporate Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-teal);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-teal-hover);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

/* Corporate Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

/* Metric / Stat Tiles */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-tile {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.stat-trend {
  font-size: 11px;
  color: var(--status-success);
  margin-top: 4px;
  font-weight: 500;
}

/* High-Fidelity Placeholder Container */
.placeholder-container {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  background-color: rgba(19, 29, 49, 0.5);
  margin-top: 12px;
}

.placeholder-icon {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.placeholder-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.placeholder-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 16px auto;
}

.placeholder-meta {
  display: inline-flex;
  gap: 8px;
  margin-top: 8px;
}

.tag-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.tag-pill.live {
  background-color: var(--status-success-subtle);
  color: var(--status-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.tag-pill.mockup {
  background-color: var(--accent-blue-subtle);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.2);
}

/* Form Controls & Inputs */
.input-text {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-text:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25);
}

/* Radio Selection Cards */
.radio-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.radio-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: var(--bg-card-hover);
}

.radio-card.selected {
  border-color: var(--accent-teal);
  background-color: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 1px var(--accent-teal);
}

/* Data Table Styling */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background-color: var(--bg-card);
}

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

.data-table thead {
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--accent-teal);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 13px;
  color: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Dialog Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  width: 90%;
  max-width: 560px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  padding: 24px;
  position: relative;
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Course Selection Tabs */
.course-tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.course-tab {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 220px;
  text-align: left;
}

.course-tab:hover {
  background-color: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.course-tab.active {
  border-color: var(--accent-teal);
  background-color: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 1px var(--accent-teal);
}

.course-tab-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.course-tab-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========================================================================= */
/* Screen 3: AI Document-to-Course Ingestion Studio                          */
/* ========================================================================= */

.preset-pill-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.preset-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.preset-pill:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-pill.active {
  background-color: var(--accent-teal-subtle);
  color: var(--accent-teal-hover);
  border-color: var(--accent-teal);
}

.sop-editor-container {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background-color: #0B0F17;
  overflow: hidden;
}

.sop-editor-textarea {
  width: 100%;
  height: 380px;
  background-color: transparent;
  border: none;
  color: #CBD5E1;
  font-family: "JetBrains Mono", Consolas, "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  white-space: pre-wrap;
}

.sop-editor-textarea:focus {
  border-color: var(--accent-teal);
}

.citation-highlight-banner {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.25), rgba(13, 148, 136, 0.05));
  border-left: 3px solid var(--accent-teal);
  padding: 8px 12px;
  font-size: 11.5px;
  color: var(--accent-teal-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 4px 4px 0;
  margin-bottom: 8px;
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 0 rgba(13, 148, 136, 0); }
  50% { box-shadow: 0 0 12px rgba(13, 148, 136, 0.4); }
  100% { box-shadow: 0 0 0 rgba(13, 148, 136, 0); }
}

/* Stepper Progress Bar */
.stepper-progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 0;
}

.stepper-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), #2DD4BF);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.stepper-phase-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.stepper-phase-item.active {
  background-color: rgba(13, 148, 136, 0.08);
  border-left: 2px solid var(--accent-teal);
}

.stepper-phase-item.completed {
  opacity: 0.9;
}

.stepper-phase-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.stepper-phase-icon.pending {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.stepper-phase-icon.running {
  background-color: var(--accent-teal-subtle);
  color: var(--accent-teal);
  animation: spinSlow 1.5s linear infinite;
}

.stepper-phase-icon.done {
  background-color: var(--status-success-subtle);
  color: var(--status-success);
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Sub-Tab Navigation Bar */
.sub-tabs-bar {
  display: flex;
  gap: 4px;
  background-color: var(--bg-elevated);
  padding: 4px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.sub-tab-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 4px;
  background-color: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sub-tab-btn:hover {
  color: var(--text-primary);
}

.sub-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Chapter Accordion Styling */
.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-bottom: 10px;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: all 0.15s ease;
}

.accordion-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.02);
  user-select: none;
}

.accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.accordion-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion-body {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-main);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Quiz Option Buttons */
.quiz-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

.quiz-option-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-option-btn:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.quiz-option-btn.correct {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: var(--status-success);
  color: #86EFAC;
  font-weight: 600;
}

.quiz-option-btn.incorrect {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: var(--status-danger);
  color: #FCA5A5;
}

.quiz-feedback-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent-teal);
}

/* ========================================================================= */
/* Screen 4: Notion-Style Course Authoring Studio & Drag-and-Drop            */
/* ========================================================================= */

.authoring-block {
  position: relative;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.15s ease;
  background-color: transparent;
}

.authoring-block:hover {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

.authoring-block.dragging {
  opacity: 0.35;
  background-color: rgba(13, 148, 136, 0.1);
  border: 1px dashed var(--accent-teal);
}

.authoring-block.drag-over {
  border-top: 2px solid var(--accent-teal);
  padding-top: 18px;
}

.block-handle {
  cursor: grab;
  opacity: 0.2;
  transition: opacity 0.15s ease;
  user-select: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.authoring-block:hover .block-handle {
  opacity: 0.8;
}

.block-toolbar {
  position: absolute;
  top: 8px;
  right: 12px;
  display: none;
  gap: 4px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.authoring-block:hover .block-toolbar {
  display: flex;
}

.block-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.block-tool-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.block-tool-btn.btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--status-danger);
}

/* Slash Command Menu & Modal Palette */
.slash-command-menu {
  position: absolute;
  z-index: 500;
  width: 320px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: scaleUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay .slash-command-menu {
  position: relative;
  z-index: 2501;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.slash-menu-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.02);
}

.slash-menu-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.slash-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.slash-menu-item:hover, .slash-menu-item.active {
  background-color: var(--accent-teal-subtle);
  color: var(--accent-teal-hover);
}

.slash-menu-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.slash-menu-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.slash-menu-item:hover .slash-menu-title {
  color: var(--accent-teal-hover);
}

.slash-menu-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Slide Deck Embed Player */
.slide-player-card {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-elevated);
}

.slide-player-header {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.slide-screen {
  min-height: 260px;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  position: relative;
  transition: all 0.3s ease;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--accent-teal);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Curriculum Hierarchy & Unit Switcher Styles */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.curriculum-sidebar-card {
  width: 360px;
  min-width: 340px;
  max-width: 400px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.curriculum-modules-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding-right: 6px;
}

.curriculum-modules-list::-webkit-scrollbar {
  width: 6px;
}

.curriculum-modules-list::-webkit-scrollbar-track {
  background: transparent;
}

.curriculum-modules-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.curriculum-module-group {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
  flex-shrink: 0; /* CRITICAL: Never shrink and clip inner units */
}

.curriculum-module-group:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.curriculum-module-header {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.curriculum-unit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 4px 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  border: 1px solid transparent;
}

.curriculum-unit-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.curriculum-unit-row.active-unit {
  background-color: var(--accent-teal-subtle);
  border-color: rgba(13, 148, 136, 0.35);
}

.unit-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.unit-type-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.unit-type-card:hover {
  border-color: var(--accent-teal);
  background-color: rgba(13, 148, 136, 0.05);
}

.unit-type-card.selected {
  border-color: var(--accent-teal);
  background-color: var(--accent-teal-subtle);
}

/* Screen 5: Interactive Video Player & Timeline Studio */
.video-player-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.video-screen-canvas {
  width: 100%;
  height: 400px;
  display: block;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  position: relative;
}

.video-scrubber-track {
  position: relative;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  cursor: pointer;
  transition: height 0.15s ease;
}

.video-scrubber-track:hover {
  height: 12px;
}

.video-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-teal-hover));
  border-radius: 4px;
  pointer-events: none;
}

.video-checkpoint-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #F59E0B;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  cursor: pointer;
  z-index: 15;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.video-checkpoint-pin:hover {
  transform: translate(-50%, -50%) scale(1.4);
}

.video-checkpoint-pin.passed {
  background-color: var(--status-success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.video-checkpoint-pin.active-lock {
  background-color: #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 1);
  animation: pulsePin 1.2s infinite;
}

@keyframes pulsePin {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.video-checkpoint-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 16px;
  overflow-y: auto;
  animation: fadeIn 0.18s ease;
}

.video-telemetry-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 11px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.video-caption-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  max-width: 82%;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   Screen 6: In-Course Contextual AI Tutor ("Tanya Cikgu") Styles
   ========================================================================== */

.sop-reader-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 210px);
  min-height: 580px;
  overflow: hidden;
}

.sop-sections-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sop-sections-scroll::-webkit-scrollbar {
  width: 5px;
}
.sop-sections-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sop-section-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.sop-section-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.sop-section-card.highlighted {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.4), 0 8px 24px rgba(13, 148, 136, 0.2);
  background-color: rgba(13, 148, 136, 0.08);
  animation: pulseSection 2s ease;
}

@keyframes pulseSection {
  0% { transform: scale(1); }
  30% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.tutor-chat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 210px);
  min-height: 580px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.tutor-chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.tutor-chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tutor-chat-stream::-webkit-scrollbar {
  width: 5px;
}
.tutor-chat-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.tutor-msg-user {
  align-self: flex-end;
  max-width: 84%;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(15, 118, 110, 0.9));
  border: 1px solid rgba(13, 148, 136, 0.4);
  color: #FFFFFF;
  border-radius: 12px 12px 2px 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
  word-break: break-word;
}

.tutor-msg-assistant {
  align-self: flex-start;
  max-width: 90%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px 12px 12px 2px;
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  word-break: break-word;
}

.tutor-citation-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-teal-hover);
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.28);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  width: fit-content;
}

.tutor-citation-pill:hover {
  background: rgba(13, 148, 136, 0.22);
  border-color: var(--accent-teal);
  transform: translateY(-1px);
}

.tutor-prompt-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tutor-prompt-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-teal);
  color: var(--accent-teal-hover);
}

.tutor-thinking-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--accent-teal);
  background: rgba(13, 148, 136, 0.08);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  animation: fadeIn 0.15s ease;
}

.tutor-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-teal);
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.tutor-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.tutor-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Screen 7: Practical Video Submission & AI Rubric Pre-Grading Styles
   ========================================================================== */

.practical-workspace-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.recorder-cinema-viewport {
  position: relative;
  width: 100%;
  height: 380px;
  background: #000000;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recording-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #EF4444;
  animation: pulseRecordingDot 1.2s infinite ease-in-out;
  display: inline-block;
}

@keyframes pulseRecordingDot {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.3); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rubric-score-badge {
  padding: 8px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.rubric-score-badge.pass {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--status-success);
  color: var(--status-success);
}

.rubric-score-badge.remediation {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--status-danger);
  color: #F87171;
}

.rubric-dimension-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.15s ease;
}

.rubric-dimension-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.transcript-quote-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 140px;
  overflow-y: auto;
}

.transcript-quote-box::-webkit-scrollbar {
  width: 5px;
}
.transcript-quote-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.highlight-kw-pass {
  background: rgba(16, 185, 129, 0.2);
  color: #A7F3D0;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.highlight-kw-miss {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  text-decoration: line-through;
}

.candidate-selector-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.candidate-selector-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.candidate-selector-btn.active {
  background: rgba(13, 148, 136, 0.15);
  border-color: var(--accent-teal);
  color: var(--accent-teal-hover);
}

/* Screen 7 Role Switcher & Playback Controls */
.role-segmented-switcher {
  display: inline-flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.role-segmented-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.role-segmented-btn:hover {
  color: var(--text-primary);
}

.role-segmented-btn.active {
  background: var(--bg-card);
  color: var(--accent-teal-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(13, 148, 136, 0.3);
}

.video-playback-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.video-playback-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-teal-hover);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.8);
}


/* ==========================================================================
   SCREEN 8: TAMPER-PROOF DIGITAL CERTIFICATE & QR VERIFICATION STYLES
   ========================================================================== */

.cert-diploma-frame {
  background: linear-gradient(135deg, #111A2E 0%, #0B1120 50%, #080D1A 100%);
  border: 2px solid rgba(20, 184, 166, 0.4);
  border-radius: 12px;
  padding: 38px 42px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  color: #F8FAFC;
}

/* Guilloche Pattern Accents */
.cert-guilloche-accent-1 {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 40px solid rgba(13, 148, 136, 0.04);
  pointer-events: none;
}

.cert-guilloche-accent-2 {
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 35px solid rgba(245, 158, 11, 0.03);
  pointer-events: none;
}

.cert-inner-border {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 24px 28px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.cert-gold-seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #FFF;
  border: 2px solid rgba(254, 243, 199, 0.6);
  flex-shrink: 0;
}

.signature-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 140px;
  margin-bottom: 6px;
}

.signature-font {
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 20px;
  color: #38BDF8;
  opacity: 0.9;
  letter-spacing: 1px;
}

/* Smartphone Mockup Frame */
.smartphone-mockup-frame {
  width: 320px;
  height: 580px;
  background: #000;
  border: 10px solid #1E293B;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.smartphone-notch {
  width: 130px;
  height: 18px;
  background: #1E293B;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.smartphone-screen-content {
  flex: 1;
  overflow-y: auto;
  background: #0B0F19;
  padding: 14px 12px;
}

.smartphone-screen-content::-webkit-scrollbar {
  width: 4px;
}
.smartphone-screen-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Print Styles: Export Full Certificate cleanly */
@media print {
  body * {
    visibility: hidden;
  }
  .cert-diploma-frame, .cert-diploma-frame * {
    visibility: visible;
  }
  .cert-diploma-frame {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    box-shadow: none;
    background: #0F172A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 30px;
  }
  .topbar, .sidebar, .screen-header, .breadcrumb-bar, .pitch-stepper, .screen-actions, .authoring-workspace > div:last-child {
    display: none !important;
  }
}

/* ==========================================================================
   ENHANCED CERTIFICATE LIGHT MODE & LANDSCAPE PRINT SYSTEM
   ========================================================================== */

/* QR Code SVG sizing fix */
#cert-embedded-qr svg, #station-live-qr svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Light Mode Diploma Styling (Default Print-Standard) */
.cert-diploma-frame.theme-light {
  background: linear-gradient(135deg, #FFFFFF 0%, #FBFDFF 50%, #F8FAFC 100%);
  border: 2px solid #D97706;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(217, 119, 6, 0.2);
  color: #0F172A;
}

.cert-diploma-frame.theme-light .cert-inner-border {
  border: 1px solid rgba(217, 119, 6, 0.25);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 20px rgba(217, 119, 6, 0.03);
  color: #0F172A;
}

.cert-diploma-frame.theme-light .cert-title-org {
  color: #0F172A !important;
}

.cert-diploma-frame.theme-light .cert-sub-text {
  color: #475569 !important;
}

.cert-diploma-frame.theme-light .cert-recipient-name {
  color: #0F172A !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cert-diploma-frame.theme-light .cert-program-name {
  color: #0F172A !important;
}

.cert-diploma-frame.theme-light .cert-metric-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.cert-diploma-frame.theme-light .cert-metric-label {
  color: #64748B !important;
}

.cert-diploma-frame.theme-light .signature-line {
  border-bottom: 1px solid #334155 !important;
}

.cert-diploma-frame.theme-light .signature-font {
  color: #0369A1 !important;
}

.cert-diploma-frame.theme-light .cert-signer-name {
  color: #0F172A !important;
}

.cert-diploma-frame.theme-light .cert-signer-title {
  color: #475569 !important;
}

.cert-diploma-frame.theme-light .cert-qr-container {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Landscape Print Engine (Automatically sets landscape & formats A4) */
@page {
  size: A4 landscape;
  margin: 6mm;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 6mm;
  }

  html, body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body * {
    visibility: hidden !important;
  }

  #printable-certificate, #printable-certificate * {
    visibility: visible !important;
  }

  #printable-certificate {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 275mm !important;
    max-width: 98vw !important;
    height: auto !important;
    padding: 24px 28px !important;
    margin: 0 !important;
    border: 3px double #D97706 !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #printable-certificate .cert-inner-border {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
  }

  #printable-certificate .cert-gold-seal {
    background: #D97706 !important;
    color: #FFFFFF !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #printable-certificate .cert-qr-container {
    background: #FFFFFF !important;
    border: 1px solid #94A3B8 !important;
  }

  .topbar, .sidebar, .screen-header, .breadcrumb-bar, .pitch-stepper, .screen-actions, .card, .toast-notification, .modal-overlay, .theme-switcher-row, .cert-action-row {
    display: none !important;
  }
}

/* ==========================================================================
   SCREEN 9: FEATURE SPOTLIGHT & INNOVATION HUB STYLES
   ========================================================================== */

/* WhatsApp Mockup Phone */
.whatsapp-phone-container {
  width: 100%;
  max-width: 320px;
  background: #0B141A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.whatsapp-topbar {
  background: #1F2C34;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #00A884;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #FFF;
  flex-shrink: 0;
}

.whatsapp-chat-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  background: #0B141A url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23121B22" fill-opacity="0.3"><circle cx="20" cy="20" r="1.5"/></g></svg>');
}

.whatsapp-bubble {
  background: #1F2C34;
  border-radius: 8px 8px 8px 2px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #E9EDEF;
  max-width: 90%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.whatsapp-bubble.outbound {
  background: #005C4B;
  align-self: flex-end;
  border-radius: 8px 8px 2px 8px;
}

.whatsapp-time {
  font-size: 9.5px;
  color: #8696A0;
  text-align: right;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.whatsapp-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 168, 132, 0.4);
  color: #00A884;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  margin-top: 6px;
  text-align: center;
  display: block;
  width: 100%;
  transition: all 0.15s ease;
}

.whatsapp-action-btn:hover {
  background: rgba(0, 168, 132, 0.2);
  color: #25D366;
}

.whatsapp-quiz-option {
  background: #111B21;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #E9EDEF;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.whatsapp-quiz-option:hover {
  background: #202C33;
  border-color: #00A884;
}

.whatsapp-quiz-option.correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  color: #A7F3D0 !important;
}

/* HLS Ladder Step */
.hls-ladder-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 6px;
}

.hls-ladder-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease, background 0.4s ease;
}

/* Mini Browser Preview for White-Labeling */
.mini-browser-preview {
  background: #0F172A;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.mini-browser-topbar {
  background: #1E293B;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-browser-dots {
  display: flex;
  gap: 4px;
}

.mini-browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.mini-browser-address {
  background: #0F172A;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-family: monospace;
  color: #94A3B8;
  flex: 1;
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVE SYSTEM (Malaysian Enterprise Mobile Standards)
   Target viewports: iPhone (375px - 430px), Android (360px - 412px), iPad (768px - 834px)
   ========================================================================== */

/* Mobile Hamburger Button (Hidden on Desktop) */
.mobile-hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-teal);
  color: var(--accent-teal-hover);
}

.mobile-hamburger-btn:active {
  transform: scale(0.95);
}

/* Mobile Sidebar Top Close Bar */
.mobile-sidebar-header {
  display: none;
}

.mobile-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
}

.mobile-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: #F87171;
}

.sidebar-backdrop {
  display: none;
}

/* Tablet & Intermediate Desktop Query (< 900px) */
@media (max-width: 900px) {
  .topbar {
    padding: 0 16px;
  }
  
  .brand-company .brand-subtext {
    display: none;
  }

  .content-area {
    padding: 20px 16px;
  }
}

/* Smart Mobile Query (< 768px) */
@media (max-width: 768px) {
  /* Layout Shell */
  .app-container {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
  }

  .main-wrapper {
    flex-direction: column !important;
    overflow: visible !important;
  }

  /* Topbar Mobile Reconfiguration */
  .topbar {
    height: auto !important;
    min-height: 52px !important;
    padding: 8px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #0F172A !important;
  }

  .mobile-hamburger-btn {
    display: flex !important;
  }

  .brand-section {
    gap: 8px !important;
  }

  .brand-badge {
    font-size: 11.5px !important;
    padding: 3px 7px !important;
  }

  .brand-company {
    font-size: 13px !important;
  }

  .brand-company .brand-subtext {
    display: none !important;
  }

  .topbar-controls {
    gap: 6px !important;
    margin-left: auto !important;
  }

  .role-badge, .mode-toggle {
    font-size: 10.5px !important;
    padding: 3px 6px !important;
  }

  /* Horizontal Scroll Pitch Stepper with Touch Momentum */
  .pitch-stepper {
    order: 10 !important;
    width: 100% !important;
    margin-top: 4px !important;
    padding: 4px 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    scrollbar-width: none !important;
  }

  .pitch-stepper::-webkit-scrollbar {
    display: none !important;
  }

  .pitch-step-pill {
    padding: 4px 9px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  /* Sliding Drawer Navigation Sidebar */
  .sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1150 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
  }

  .sidebar-backdrop.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 84vw !important;
    height: 100vh !important;
    background-color: #0F172A !important;
    z-index: 1200 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
    padding: 18px 14px !important;
    overflow-y: auto !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.85) !important;
  }

  .mobile-sidebar-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 12px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  /* Main Content Area Mobile Optimization */
  .content-area {
    padding: 16px 12px !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Screen Header & Action Row Stacking */
  .screen-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
  }

  .screen-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  .screen-subtitle {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin-top: 4px !important;
  }

  .screen-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .screen-actions .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    font-size: 11.5px !important;
    padding: 8px 12px !important;
    text-align: center !important;
  }

  /* Breadcrumb Hierarchy Bar */
  .breadcrumb-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .breadcrumb-bar > div:last-child {
    display: flex !important;
    justify-content: flex-end !important;
  }

  /* Universal Workspace Flex & Grid Stacking */
  .authoring-workspace {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .authoring-workspace > div {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .curriculum-sidebar-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-bottom: 6px !important;
  }

  /* General Grid Collapse to Single Column */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1.25fr 0.85fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 110px 1fr"],
  [style*="grid-template-columns: 120px 1fr"],
  .onboarding-main-grid,
  .ingestion-main-grid,
  .cert-main-grid,
  .spotlight-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Stat & Metric Grids (4 columns -> 2 columns on mobile) */
  .metrics-row,
  .metric-grid,
  [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Tables: Touch-friendly horizontal swipe */
  .table-responsive-container,
  .table-container,
  .card table,
  table {
    display: block;
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Buttons & Segmented Switchers */
  .role-segmented-switcher {
    width: 100% !important;
    display: flex !important;
  }

  .role-segmented-btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
  }

  /* Screen 5: Video Cinema Player Responsive Aspect Ratio */
  .video-player-card {
    width: 100% !important;
  }

  .video-screen-container,
  .video-player-card > div:first-child {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    max-height: 250px !important;
  }

  #video-canvas {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: contain !important;
  }

  .video-telemetry-badge {
    flex-wrap: wrap !important;
    font-size: 9.5px !important;
    padding: 4px 8px !important;
    gap: 6px !important;
  }

  .video-caption-bar {
    font-size: 11px !important;
    padding: 4px 10px !important;
    bottom: 8px !important;
    width: 92% !important;
  }

  /* Screen 6: Tanya Cikgu Layout */
  .sop-reader-card {
    width: 100% !important;
    min-width: 0 !important;
    max-height: 320px !important;
  }

  .tutor-chat-card {
    width: 100% !important;
    min-width: 0 !important;
    height: 500px !important;
  }

  /* Screen 7: Practical Video Assessment */
  .practical-workspace-card {
    width: 100% !important;
  }

  .recorder-cinema-viewport {
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    min-height: 220px !important;
  }

  #practical-canvas {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: contain !important;
  }

  /* Screen 8: Digital Certificate Mobile Presentation */
  .cert-diploma-frame {
    padding: 18px 12px !important;
    border-radius: 8px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cert-inner-border {
    padding: 12px 8px !important;
  }

  .cert-gold-seal {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    min-width: 28px !important;
  }

  .cert-title-org {
    font-size: 14px !important;
  }

  .cert-sub-text {
    font-size: 10px !important;
  }

  .cert-recipient-name {
    font-size: 19px !important;
    letter-spacing: -0.2px !important;
    margin: 6px 0 !important;
    word-break: break-word !important;
  }

  .cert-program-name {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .cert-metric-card {
    padding: 8px 6px !important;
  }

  .cert-metric-label {
    font-size: 9px !important;
  }

  .cert-metric-card > div:nth-child(2) {
    font-size: 13px !important;
  }

  #printable-certificate .cert-inner-border > div:last-child {
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px !important;
    text-align: center !important;
  }

  #printable-certificate .cert-inner-border > div:last-child > div:first-child {
    display: flex !important;
    gap: 16px !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .cert-qr-container {
    width: 84px !important;
    height: 84px !important;
    margin: 0 auto !important;
  }

  /* Screen 9: Innovation Hub Cards & WhatsApp Phone */
  .whatsapp-phone-container {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .candidate-selector-btn.brand-btn {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* Universal Touch-Friendly Modals */
  .modal-box {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px auto !important;
    padding: 18px 14px !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
  }

  .slash-command-menu {
    width: 94vw !important;
    max-width: 400px !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Touch Hit Target Ergonomics */
  .btn, .nav-item, .pitch-step-pill, .candidate-selector-btn {
    min-height: 36px;
    touch-action: manipulation;
  }
}
