/* Modular CSS slice extracted from style.css (1436-2151) */

/* 1. Grid Cards Mode */
.exam-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.exam-hub-card-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.exam-hub-card-item:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.1);
}

.exam-hub-card-item.active {
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.16);
  background: #fafcff;
}

.exam-hub-card-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--nav-indicator-color, #f59e0b);
  border-radius: 0 4px 4px 0;
}

.exam-hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.exam-cat-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.exam-cat-15p {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #a5f3fc;
}

.exam-cat-45p {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.exam-cat-term {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.exam-cat-special {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
}

.exam-hub-card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.exam-hub-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exam-hub-card-item.active .exam-hub-card-title {
  color: #1d4ed8;
}

/* Progress bar inside card */
.exam-hub-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.2rem;
}

.exam-hub-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.exam-hub-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.exam-hub-card-stats strong {
  color: var(--text-main);
}

.exam-hub-card-badge-done {
  color: #059669;
  font-weight: 600;
  background: #ecfdf5;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
}

.exam-hub-card-badge-pending {
  color: #d97706;
  font-weight: 600;
  background: #fffbeb;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
}

/* 2. Timeline View Mode */
.exam-timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.exam-timeline-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.exam-timeline-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* 3. Compact Tray Mode */
.exam-switcher-tray {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.exam-switcher-tray::-webkit-scrollbar {
  height: 4px;
}
.exam-switcher-tray::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.exam-card-chip {
  flex-shrink: 0;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  min-width: 200px;
  transition: var(--fast-transition);
}

.exam-card-chip:hover {
  background: #ffffff;
  border-color: var(--border-strong);
}

.exam-card-chip.active {
  background: #ffffff;
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14);
}

.exam-card-chip.active .exam-chip-title {
  color: #1d4ed8;
}

.exam-card-chip.active .chip-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.exam-chip-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-chip-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.chip-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-weight: 500;
  font-family: var(--font-mono);
}

.chip-badge-count {
  background: var(--surface-active);
  color: var(--text-main);
  font-weight: 600;
}

/* Active Exam Hero Bar */
.exam-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.exam-hero-info h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.exam-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.exam-hero-meta strong {
  color: var(--text-secondary);
}

.exam-hero-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Empty State */
.exam-hub-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.exam-hub-empty-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

/* Responsive Styles for Mobile & Tablet */
@media (max-width: 768px) {
  .exam-hub-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .exam-hub-search-box {
    max-width: 100%;
    min-width: 100%;
  }

  .exam-hub-view-modes {
    align-self: flex-start;
  }

  .exam-hub-grid {
    grid-template-columns: 1fr;
  }

  .exam-hero-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .exam-hero-action-buttons {
    justify-content: flex-start;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .exam-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- DUAL-VIEW STUDIO TABS & TABLE WORKSPACE --- */
.studio-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.studio-mode-pills {
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  gap: 0.2rem;
}

.btn-mode-toggle {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  transition: var(--fast-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-mode-toggle.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Table Card */
.studio-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Variant Filter Tabs */
.variant-tab-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.v-tab {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: var(--fast-transition);
}

.v-tab:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

.v-tab.active {
  background: var(--surface-subtle);
  color: var(--text-main);
  border-color: var(--border-color);
  font-weight: 600;
}

/* Table Styles - Stripe Grade */
.submissions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.submissions-table th {
  padding: 0.55rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--canvas-bg);
  border-bottom: 1px solid var(--border-color);
}

.submissions-table td {
  padding: 0.55rem 0.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.submissions-table tbody tr {
  transition: background 0.1s ease;
}

.submissions-table tbody tr:hover {
  background: var(--surface-subtle);
}

.col-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 44px;
}

.col-id {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.8rem;
}

.submissions-table .col-stt {
  width: 44px;
  min-width: 40px;
  text-align: center;
}

.submissions-table .col-student {
  min-width: 170px;
  max-width: 250px;
}

.submissions-table .col-variant {
  width: 68px;
  min-width: 60px;
  text-align: center;
}

.submissions-table .col-pages {
  width: 88px;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

.submissions-table .col-status {
  width: 92px;
  min-width: 85px;
  text-align: center;
  white-space: nowrap;
}

.submissions-table .col-score {
  width: 96px;
  min-width: 90px;
  text-align: center;
  white-space: nowrap;
}

.submissions-table td.col-pages,
.submissions-table th.col-pages {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.submissions-table td.col-status,
.submissions-table th.col-status {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

/* Table Action Cell & Group - Desktop Ergonomics & Zero Horizontal Overflow */
.submissions-table .col-actions {
  white-space: nowrap;
  min-width: 220px;
  text-align: right;
  vertical-align: middle;
}

/* Student Profile & Avatar Cell */
.student-profile-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.student-avatar-pill {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.student-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}
.student-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-quick-rename {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 2px 4px;
  opacity: 0.45;
  transition: all 0.15s ease;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-quick-rename:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.05);
}
.student-meta-subrow {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.student-code-tag {
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  font-size: 0.72rem;
  background: var(--surface-subtle, #f1f5f9);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--primary-dark, #3b82f6);
}

/* Checkbox styling */
.sub-row-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary, #2563eb);
  flex-shrink: 0;
  margin: 0;
}

/* Page Thumbnail & Proof Box */
.page-chip-composite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.sub-proof-thumb-box {
  width: 26px !important;
  height: 34px !important;
  max-width: 26px !important;
  max-height: 34px !important;
  border-radius: 4px;
  overflow: hidden !important;
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  flex-shrink: 0 !important;
  background: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-block;
}
.sub-proof-thumb-box:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}
.sub-proof-thumb-img {
  width: 26px !important;
  height: 34px !important;
  max-width: 26px !important;
  max-height: 34px !important;
  object-fit: cover !important;
  display: block !important;
}

/* Academic Score Cell Stack */
.score-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 90px;
}
.score-micro-track {
  width: 100%;
  height: 3.5px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.score-micro-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.score-academic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid;
  line-height: 1.2;
  white-space: nowrap;
}
.score-academic-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* Class Pulse Summary Bar */
.class-pulse-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.15rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  flex-wrap: wrap;
}
.pulse-stat-capsule {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pulse-capsule-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}
.pulse-capsule-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  font-feature-settings: 'tnum';
}