/*
Path: C:/Users/Owner/Desktop/vscode/BodyPlus_XPro/admin_web/static/css/learn_mode.css
Description: Learn Mode admin dashboard styles; input: learn_mode.html class names; output: responsive operator UI.
Last-Updated: 2026-05-17
*/

.lm-page {
  display: grid;
  gap: 14px;
  color: #0f172a;
}

.lm-header,
.lm-start-panel,
.lm-panel,
.lm-stat {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lm-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.lm-title-block {
  min-width: 0;
}

.lm-kicker {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
}

.lm-header h2,
.lm-panel h3 {
  margin: 0;
  color: #0f172a;
}

.lm-header h2 {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 750;
}

.lm-header p,
.lm-panel-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.lm-controls {
  display: grid;
  grid-template-columns: 120px minmax(180px, 260px) 130px auto;
  gap: 10px;
  align-items: end;
}

.lm-controls label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}

.lm-controls input,
.lm-controls select,
.lm-controls button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 8px 10px;
  font-size: 13px;
  color: #0f172a;
}

.lm-controls button {
  border-color: #0369a1;
  background: #0369a1;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.lm-controls button:hover,
.lm-video-controls button:hover,
.lm-control-link:hover {
  filter: brightness(0.98);
}

.lm-start-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  background: #f8fafc;
}

.lm-start-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.lm-start-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.lm-start-copy p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.lm-action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lm-action {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "step title"
    "step copy";
  gap: 3px 10px;
  align-items: start;
  min-height: 82px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
}

.lm-action:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.lm-action.primary {
  border-color: #7dd3fc;
  background: #f0f9ff;
}

.lm-action.coach {
  border-color: #86efac;
  background: #f0fdf4;
}

.lm-action.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.lm-action-step {
  grid-area: step;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.lm-action.primary .lm-action-step {
  background: #0369a1;
}

.lm-action.coach .lm-action-step {
  background: #15803d;
}

.lm-action.warn .lm-action-step {
  background: #b45309;
}

.lm-action-title {
  grid-area: title;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.lm-action-copy {
  grid-area: copy;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.lm-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lm-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.lm-video-panel {
  display: flex;
  flex-direction: column;
}

.lm-video-shell {
  position: relative;
  width: 100%;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #020617;
}

.lm-video-shell img,
.lm-video-shell canvas,
.lm-video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lm-video-shell img {
  object-fit: contain;
  z-index: 1;
}

.lm-video-shell canvas {
  pointer-events: none;
  z-index: 2;
}

.lm-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  color: #cbd5e1;
  font-size: 13px;
}

.lm-video-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lm-video-controls button,
.lm-control-link,
.lm-camera-choice select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #0369a1;
  border-radius: 8px;
  padding: 8px 12px;
  background: #0369a1;
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.lm-camera-choice {
  display: grid;
  gap: 4px;
  min-width: 220px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.lm-camera-choice span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lm-camera-choice em {
  color: #64748b;
  font-style: normal;
  font-weight: 700;
}

.lm-camera-choice select {
  width: 100%;
  min-height: 38px;
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  appearance: auto;
}

.lm-video-controls button.secondary,
.lm-control-link {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.lm-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.lm-toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lm-live-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lm-live-metrics div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.lm-live-metrics span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.lm-live-metrics strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lm-advanced {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.lm-advanced summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.lm-advanced > section {
  margin-top: 12px;
}

.lm-stat {
  padding: 14px;
  min-width: 0;
}

.lm-stat span,
.lm-detail-grid span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.lm-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lm-stat small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.lm-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
}

.lm-panel {
  padding: 16px;
  min-width: 0;
}

.lm-full-panel {
  grid-column: 1 / -1;
}

.lm-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.lm-panel h3 {
  font-size: 16px;
  font-weight: 750;
}

.lm-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.lm-pill.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.lm-pill.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.lm-pill.is-bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.lm-cue-text {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: #111827;
}

.lm-correction {
  margin: 10px 0 0;
  border-left: 3px solid #f59e0b;
  padding-left: 10px;
  color: #92400e;
  font-size: 14px;
}

.lm-correction:empty {
  display: none;
}

.lm-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.lm-detail-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  min-width: 0;
}

.lm-detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lm-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-timeline li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  color: #475569;
  background: #ffffff;
}

.lm-timeline li.is-active {
  border-color: #0ea5e9;
  background: #f0f9ff;
  color: #075985;
}

.lm-timeline li.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.lm-step-index {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.lm-timeline li.is-active .lm-step-index {
  background: #0ea5e9;
  color: #ffffff;
}

.lm-timeline li.is-done .lm-step-index {
  background: #22c55e;
  color: #ffffff;
}

.lm-step-label {
  display: block;
  font-size: 13px;
  font-weight: 750;
}

.lm-step-role {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  overflow-wrap: anywhere;
}

.lm-kv {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.lm-kv dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.lm-kv dd {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lm-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lm-chip {
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
}

.lm-chip.is-clear {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.lm-table-wrap {
  max-height: 360px;
  overflow-x: auto;
  overflow-y: auto;
}

.lm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.lm-table th,
.lm-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.lm-table th {
  color: #475569;
  font-weight: 750;
  background: #f8fafc;
}

.lm-table td {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.lm-muted {
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .lm-header,
  .lm-main-grid,
  .lm-start-panel,
  .lm-live-grid {
    grid-template-columns: 1fr;
  }

  .lm-header {
    display: grid;
    align-items: stretch;
  }

  .lm-controls,
  .lm-status-strip,
  .lm-action-row,
  .lm-live-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lm-controls,
  .lm-status-strip,
  .lm-action-row,
  .lm-live-metrics,
  .lm-detail-grid,
  .lm-kv {
    grid-template-columns: 1fr;
  }

  .lm-video-shell {
    min-height: 260px;
  }

  .lm-header h2 {
    font-size: 24px;
  }

  .lm-cue-text {
    font-size: 18px;
  }
}
