/**
 * Student Track — 7-step progress bar (full + mini on Leads list).
 */

/* Red dot when Interviews status / level / round changed */
.lms-interview-change-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
  animation: lms-interview-change-pulse 1.4s ease-in-out infinite;
}

.lms-interview-change-dot.hidden {
  display: none !important;
}

.lms-interview-change-row {
  background: rgba(239, 68, 68, 0.06);
}

@keyframes lms-interview-change-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

.lms-student-track-row--updated {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  outline-offset: -2px;
  transition: outline-color 0.4s ease;
}

.lms-student-track--mini {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 8rem;
  max-width: 14rem;
}

.lms-student-track__mini-bar {
  display: flex;
  gap: 3px;
  align-items: stretch;
  height: 6px;
}

.lms-student-track__seg {
  flex: 1;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.35);
}

.lms-student-track__seg--done {
  background: rgba(34, 197, 94, 0.85);
}

.lms-student-track__seg--current {
  background: rgba(251, 191, 36, 0.95);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.4);
}

.lms-student-track__seg--alert.lms-student-track__seg--current {
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.55);
}

.lms-student-track__mini-detail {
  font-size: 0.6rem;
  line-height: 1.2;
  color: var(--cui-text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lms-student-track__seg--pending {
  background: rgba(100, 116, 139, 0.35);
}

.lms-student-track__mini-label {
  font-size: 0.65rem;
  line-height: 1.2;
  color: var(--cui-text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lms-student-track--full {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.lms-student-track__track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 42rem;
  position: relative;
}

.lms-student-track__track::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(100, 116, 139, 0.4);
  z-index: 0;
}

.lms-student-track__node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.25rem;
  position: relative;
  z-index: 1;
}

.lms-student-track__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  border: 2px solid rgba(100, 116, 139, 0.5);
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
}

.lms-student-track__node--done .lms-student-track__dot {
  border-color: rgba(34, 197, 94, 0.9);
  background: rgba(22, 101, 52, 0.5);
  color: #86efac;
}

.lms-student-track__node--current .lms-student-track__dot {
  border-color: rgba(251, 191, 36, 0.95);
  background: rgba(120, 53, 15, 0.55);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.lms-student-track__node--pending .lms-student-track__dot {
  opacity: 0.75;
}

.lms-student-track__label {
  margin-top: 0.4rem;
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--cui-text-muted, #94a3b8);
  max-width: 6.5rem;
}

.lms-student-track__node--current .lms-student-track__label {
  color: #fde68a;
  font-weight: 600;
}

.lms-student-track__node--done .lms-student-track__label {
  color: #86efac;
}

@media (max-width: 768px) {
  .lms-student-track__track {
    min-width: 36rem;
  }

  .lms-student-track__label {
    font-size: 0.58rem;
    max-width: 5.5rem;
  }
}

.lms-student-track-kpi-panel {
  background: rgba(15, 23, 42, 0.65);
}

.lms-student-track-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.65rem;
}

.lms-student-track-kpi__item {
  padding: 0.75rem 0.5rem;
  border-radius: 0.65rem;
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid rgba(148, 163, 184, 0.35);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.lms-student-track-kpi__item:hover {
  border-color: rgba(148, 163, 184, 0.65);
  transform: translateY(-1px);
}

.lms-student-track-kpi__item--active {
  border-color: #fbbf24;
  background: rgba(120, 53, 15, 0.55);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.lms-student-track-kpi__item--all {
  border-color: rgba(96, 165, 250, 0.45);
}

.lms-student-track-kpi__item--all.lms-student-track-kpi__item--active {
  border-color: #60a5fa;
  background: rgba(30, 58, 138, 0.45);
}

.lms-student-track-kpi__num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.lms-student-track-kpi__step-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-top: 0.2rem;
}

.lms-student-track-kpi__label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-top: 0.25rem;
  line-height: 1.2;
}

.lms-student-track-kpi__item--active .lms-student-track-kpi__label,
.lms-student-track-kpi__item--active .lms-student-track-kpi__step-num {
  color: #fde68a;
}

.lms-student-track-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  background: #fbbf24;
  font-variant-numeric: tabular-nums;
}

/* ── Student Track table meta (readable in light + dark) ── */
.lms-st-track-call-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

.lms-st-track-round {
  font-weight: 600;
  color: #6d28d9;
}

.lms-st-track-level {
  font-weight: 600;
  color: #0e7490;
}

.lms-st-track-step-label {
  display: block;
  margin-top: 0.25rem;
  max-width: 8rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--cui-text-muted);
}

html[data-theme="dark"] .lms-st-track-call-badge {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.45);
  border-color: rgba(251, 191, 36, 0.45);
}

html[data-theme="dark"] .lms-st-track-round {
  color: #c4b5fd;
}

html[data-theme="dark"] .lms-st-track-level {
  color: #67e8f9;
}

/* ── Full progress bar — light theme contrast ── */
html[data-theme="light"] .lms-student-track__track::before {
  background: var(--cui-border-2);
}

html[data-theme="light"] .lms-student-track__dot {
  background: var(--cui-surface);
  border-color: var(--cui-border-2);
  color: var(--cui-text-muted);
}

html[data-theme="light"] .lms-student-track__node--done .lms-student-track__dot {
  background: var(--cui-success-bg);
  border-color: var(--cui-success);
  color: var(--cui-success);
}

html[data-theme="light"] .lms-student-track__node--current .lms-student-track__dot {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

html[data-theme="light"] .lms-student-track__label {
  color: var(--cui-text-muted);
}

html[data-theme="light"] .lms-student-track__node--done .lms-student-track__label {
  color: var(--cui-success);
  font-weight: 600;
}

html[data-theme="light"] .lms-student-track__node--current .lms-student-track__label {
  color: #b45309;
  font-weight: 600;
}

html[data-theme="light"] .lms-student-track__seg--done {
  background: #22c55e;
}

html[data-theme="light"] .lms-student-track__seg--current {
  background: #f59e0b;
}

html[data-theme="light"] .lms-student-track__seg--pending {
  background: var(--cui-border);
}

html[data-theme="light"] .lms-student-track-page .text-gray-500 {
  color: var(--cui-text-muted) !important;
}
