/* ==========================================================================
   KNACK TUTORING RECAP & TOPIC PROGRESSION SYSTEM
   Authentic 2015 IBM Design Language & Early Carbon Architecture
   Rectilinear geometry (0px border-radius), flat surfaces, no nested rectangles
   ========================================================================== */

:root {
  /* IBM Core Color Palette (circa 2015 Design Language) */
  --ibm-blue-60: #0f62fe;
  --ibm-blue-70: #0043ce;
  --ibm-blue-80: #002d9c;
  --ibm-blue-10: #edf5ff;
  --ibm-blue-20: #d0e2ff;

  --ibm-gray-100: #161616;
  --ibm-gray-90:  #262626;
  --ibm-gray-80:  #393939;
  --ibm-gray-70:  #525252;
  --ibm-gray-60:  #6f6f6f;
  --ibm-gray-50:  #8d8d8d;
  --ibm-gray-30:  #e0e0e0;
  --ibm-gray-20:  #e8e8e8;
  --ibm-gray-10:  #f4f4f4;
  --ibm-white:    #ffffff;

  --ibm-red-60:   #da1e28;
  --ibm-red-70:   #ba1b23;
  --ibm-red-10:   #fff0f1;

  --ibm-green-60: #198038;
  --ibm-green-70: #0e6027;
  --ibm-green-10: #defbe6;

  --ibm-yellow-30: #f1c21b;
  --ibm-yellow-10: #fdf4d8;
  --ibm-yellow-text: #8a6800;

  /* Theme Layout Mappings */
  --bg-page: #f4f4f4;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f4f4f4;
  --bg-sidebar: #161616;
  --bg-sidebar-hover: #262626;
  --bg-sidebar-active: #393939;

  --border-subtle: #e0e0e0;
  --border-strong: #8d8d8d;
  --border-interactive: #0f62fe;

  --text-primary: #161616;
  --text-secondary: #525252;
  --text-muted: #6f6f6f;
  --text-inverse: #ffffff;
  --text-on-dark-muted: #c6c6c6;

  /* Typography */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;

  /* Strict 2015 IBM Rectilinear Geometry - Zero rounded bubbles */
  --radius: 0px;

  /* Architectural Low-Elevation Shadows */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-dropdown: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-modal: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Base Reset & Universal Rectilinear Enforcement */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Authentic 2015 IBM: Strict 0px corners */
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Layout Grid */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Classic IBM Authoritative Charcoal Nav */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #262626;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid #262626;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background-color: var(--ibm-blue-60);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.brand-text h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}

.brand-text .badge-sub {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #8d8d8d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--text-on-dark-muted);
  border: none;
  border-left: 3px solid transparent !important;
  padding: 12px 18px;
  text-align: left;
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  width: 100%;
}

.nav-item svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: #ffffff;
}

.nav-item.active {
  background-color: var(--bg-sidebar-active);
  color: #ffffff;
  border-left-color: var(--ibm-blue-60) !important;
  font-weight: 500;
}

/* Main Content Workspace */
.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1440px;
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

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

.page-title {
  font-size: 26px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.page-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  background-color: var(--ibm-blue-10);
  color: var(--ibm-blue-70);
  border: 1px solid var(--ibm-blue-20);
}

/* Clean IBM Cards (No nested boxes) */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.glass-panel {
  background-color: var(--bg-surface);
}

/* Selector Row Form */
.selector-card {
  margin-bottom: 20px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  stroke: var(--ibm-gray-60);
  pointer-events: none;
}

.input-with-icon select,
.input-with-icon input[type="date"] {
  padding-left: 36px;
}

/* Form Inputs - Flat, Rectilinear, Clean Borders */
input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: border-color 0.15s ease, outline 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-interactive);
  outline: 2px solid var(--border-interactive);
  outline-offset: -1px;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--ibm-blue-60);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 4px;
}

.btn-text-action:hover {
  text-decoration: underline;
  color: var(--ibm-blue-70);
}

/* IBM Solid Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--ibm-blue-60);
  color: #ffffff;
  border: 1px solid var(--ibm-blue-60);
}

.btn-primary:hover {
  background-color: var(--ibm-blue-70);
  border-color: var(--ibm-blue-70);
}

.btn-primary:active {
  background-color: var(--ibm-blue-80);
}

.btn-primary:disabled {
  background-color: var(--ibm-gray-30);
  border-color: var(--ibm-gray-30);
  color: var(--ibm-gray-60);
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--ibm-gray-10);
  border-color: var(--text-primary);
}

.btn-danger {
  background-color: var(--ibm-red-60);
  color: #ffffff;
  border: 1px solid var(--ibm-red-60);
}

.btn-danger:hover {
  background-color: var(--ibm-red-70);
  border-color: var(--ibm-red-70);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-large {
  width: 100%;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Intelligence Container & Curriculum Progress */
.intelligence-card {
  border-left: 3px solid var(--ibm-blue-60) !important;
}

.intelligence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.intel-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.intel-header-icon {
  width: 32px;
  height: 32px;
  background-color: var(--ibm-blue-10);
  color: var(--ibm-blue-60);
  display: flex;
  align-items: center;
  justify-content: center;
}

.intel-title-group h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.intel-date-banner {
  font-size: 12px;
  color: var(--ibm-blue-70);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.progress-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.intelligence-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
  margin-bottom: 18px;
}

.intel-col {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 16px;
}

.intel-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.intel-col-title svg {
  stroke: var(--ibm-gray-60);
}

.tag-auto {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  background-color: var(--ibm-blue-10);
  color: var(--ibm-blue-70);
}

.intel-content-box {
  font-size: 13px;
  color: var(--text-primary);
}

.intel-help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Topics Tag / Checkbox Group */
.topics-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-checkbox-label,
.topic-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.topic-checkbox-label:hover,
.topic-check-pill:hover {
  background-color: var(--ibm-gray-10);
  border-color: var(--text-primary);
}

.topic-checkbox-label input[type="checkbox"],
.topic-check-pill input[type="checkbox"] {
  accent-color: var(--ibm-blue-60);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.topic-checkbox-label.checked,
.topic-check-pill.checked {
  background-color: var(--ibm-blue-10);
  border-color: var(--ibm-blue-60);
  color: var(--ibm-blue-80);
}

.topic-date-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  margin-right: 6px;
  background-color: var(--ibm-gray-20);
  color: var(--text-secondary);
}

.prev-session-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: var(--ibm-gray-20);
  padding: 2px 6px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.prev-session-text {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.prev-session-text strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

/* RAG Accordion */
.rag-preview-accordion {
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  background-color: #ffffff;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}

.accordion-toggle:hover {
  background-color: var(--ibm-gray-10);
  color: var(--text-primary);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.chevron {
  transition: transform 0.2s ease;
}

.chevron.open {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--ibm-gray-10);
}

.rag-text-block {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

/* Loading Card */
.loading-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-left: 3px solid var(--ibm-blue-60) !important;
  background-color: #ffffff;
}

.spinner-ring {
  width: 24px;
  height: 24px;
  border: 3px solid var(--ibm-gray-30);
  border-top-color: var(--ibm-blue-60);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.loading-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 3 Recap Options Section - Clean IBM Architectural Cards (NO NESTED RECTANGLES) */
.options-section {
  margin-top: 24px;
}

.options-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.options-header-row h2 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}

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

.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.option-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease;
}

.option-card:hover {
  border-color: var(--border-strong);
}

.option-card.selected-card {
  border: 2px solid var(--ibm-blue-60) !important;
}

.option-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.option-number-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.angle-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-transform: uppercase;
}

/* NO NESTED RECTANGLES: The recap section is a clean layout group directly inside the card */
.recap-box {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recap-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perspective-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* IBM Rectangular Character Counter Pills */
.char-counter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  background-color: var(--ibm-green-10);
  color: var(--ibm-green-70);
  border: 1px solid #a7f0ba;
}

.char-counter-pill.warn {
  background-color: var(--ibm-yellow-10);
  color: var(--ibm-yellow-text);
  border-color: #f7e089;
}

.char-counter-pill.alert {
  background-color: var(--ibm-red-10);
  color: var(--ibm-red-70);
  border-color: #ffd7d9;
}

.recap-textarea {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  padding: 8px 10px;
  min-height: 82px;
  resize: vertical;
}

.recap-textarea:focus {
  border-color: var(--border-interactive);
  outline: 2px solid var(--border-interactive);
  outline-offset: -1px;
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: var(--ibm-gray-60);
  cursor: pointer;
  padding: 2px 4px;
}

.copy-mini-btn:hover {
  color: var(--text-primary);
}

.option-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.btn-select-save {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--ibm-blue-60);
  color: var(--ibm-blue-60);
  padding: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-select-save:hover,
.option-card.selected-card .btn-select-save {
  background-color: var(--ibm-blue-60);
  color: #ffffff;
}

/* Master-Detail Layouts (Classes & Students Tabs) */
.classes-layout,
.students-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.classes-list-col,
.students-list-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item-card {
  padding: 14px 16px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid transparent !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.list-item-card:hover {
  background-color: var(--ibm-gray-10);
  border-color: var(--border-strong);
}

.list-item-card.selected {
  border-left-color: var(--ibm-blue-60) !important;
  background-color: #ffffff;
  box-shadow: var(--shadow-card);
}

.item-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

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

.item-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  background-color: var(--ibm-blue-10);
  color: var(--ibm-blue-70);
  border: 1px solid var(--ibm-blue-20);
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.empty-card h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Class Banner Card */
.class-banner-card {
  border-left: 3px solid var(--ibm-blue-60) !important;
}

.banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.folder-path-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.banner-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Upload Dropzone */
.drop-zone {
  border: 1px dashed var(--border-strong);
  padding: 28px;
  text-align: center;
  background-color: var(--ibm-gray-10);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 12px;
  position: relative;
}

.drop-zone:hover {
  border-color: var(--ibm-blue-60);
  background-color: var(--ibm-blue-10);
}

.drop-zone svg {
  stroke: var(--ibm-blue-60);
  margin-bottom: 8px;
}

.drop-zone p {
  font-size: 13px;
  color: var(--text-secondary);
}

.drop-zone p span {
  color: var(--ibm-blue-60);
  font-weight: 500;
  text-decoration: underline;
}

.drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-status-box {
  margin-top: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 8px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
}

/* Source Files List */
.source-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.source-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

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

.card-header-flex h3 {
  font-size: 16px;
  font-weight: 600;
}

.topics-table-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topic-row {
  display: grid;
  grid-template-columns: 80px 1.5fr 2fr 100px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

.topic-lec-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ibm-blue-70);
}

.topic-row-title {
  font-weight: 500;
  color: var(--text-primary);
}

.topic-row-desc {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Student Profile Top & Mastery */
.student-profile-card {
  border-left: 3px solid var(--ibm-blue-60) !important;
}

.student-profile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.student-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  background-color: var(--ibm-blue-60);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.student-profile-identity h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-class {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.progress-block {
  margin-top: 10px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: var(--ibm-gray-30);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--ibm-blue-60);
  transition: width 0.4s ease;
}

/* Roadmap Grid */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.roadmap-card {
  padding: 10px 12px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.roadmap-card.covered {
  border-left: 3px solid var(--ibm-green-60) !important;
  background-color: var(--ibm-green-10);
}

.roadmap-card.next {
  border-left: 3px solid var(--ibm-blue-60) !important;
  background-color: var(--ibm-blue-10);
}

.roadmap-icon {
  font-size: 12px;
}

/* Historical Sessions Timeline */
.sessions-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.timeline-session-card {
  background-color: var(--ibm-gray-10);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--ibm-blue-60) !important;
  padding: 14px;
}

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

.session-date-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.prev-topics-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topic-pill-done {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.timeline-recaps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.timeline-recap-box {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 10px;
  font-size: 13px;
}

.timeline-recap-box strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Modals - Clean 2015 IBM Carbon Dialog */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(22, 22, 22, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-body .form-group {
  margin-bottom: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background-color: var(--ibm-gray-10);
  border-top: 1px solid var(--border-subtle);
}

/* Toast Notifications - Rectilinear & Informative */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--ibm-gray-100);
  border-left: 4px solid var(--ibm-blue-60) !important;
  color: #ffffff;
  font-size: 13px;
  box-shadow: var(--shadow-dropdown);
  animation: slideUp 0.15s ease-out;
}

.toast.success {
  border-left-color: var(--ibm-green-60) !important;
}

.toast.alert {
  border-left-color: var(--ibm-red-60) !important;
}

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

.hidden {
  display: none !important;
}

.bold {
  font-weight: 600;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
  .classes-layout,
  .students-layout {
    grid-template-columns: 1fr;
  }
  .intelligence-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}
