/* ═══════════════════════════════════════════════════════════════
   AI READINESS & EMPLOYEE TRAINING PANEL
   ═══════════════════════════════════════════════════════════════ */

.trn-wrap { padding: 16px 24px; max-width: 1400px; margin: 0 auto; }
.trn-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.trn-header h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.trn-header-actions { display: flex; gap: 6px; }

/* Sub-tabs */
.trn-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.trn-tab {
  padding: 8px 16px; font-size: 0.8rem; font-weight: 500; cursor: pointer;
  color: var(--text-secondary); border-bottom: 2px solid transparent;
  transition: all var(--transition); background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font);
}
.trn-tab:hover { color: var(--text-primary); }
.trn-tab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }
.trn-section { display: none; }
.trn-section.active { display: block; animation: fadeIn 0.25s ease; }

/* Summary cards row */
.trn-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.trn-stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; text-align: center;
}
.trn-stat-val { font-size: 1.6rem; font-weight: 700; }
.trn-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* Employee cards grid */
.trn-emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.trn-emp-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; transition: border-color var(--transition);
}
.trn-emp-card:hover { border-color: var(--border-light); }
.trn-emp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.trn-emp-name { font-weight: 600; font-size: 0.9rem; }
.trn-emp-role { font-size: 0.72rem; color: var(--text-secondary); }
.trn-emp-badge {
  font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.trn-badge-ready { background: var(--accent-green-bg); color: var(--accent-green); }
.trn-badge-trainable { background: var(--accent-yellow-bg); color: var(--accent-yellow); }
.trn-badge-atrisk { background: var(--accent-red-bg); color: var(--accent-red); }
.trn-emp-score-big { font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.trn-emp-notes {
  font-size: 0.72rem; color: var(--text-muted); font-style: italic; margin-top: 6px;
  padding: 4px 8px; background: var(--bg-tertiary); border-radius: var(--radius-sm);
}
.trn-emp-notes:empty { display: none; }

/* Radar chart (SVG-based) */
.trn-radar-wrap { display: flex; justify-content: center; margin: 8px 0; }
.trn-radar-wrap svg { max-width: 200px; max-height: 200px; }
.trn-radar-poly { fill: rgba(88,166,255,0.2); stroke: var(--accent-blue); stroke-width: 1.5; }
.trn-radar-grid { fill: none; stroke: var(--border); stroke-width: 0.5; }
.trn-radar-axis { stroke: var(--border); stroke-width: 0.3; }
.trn-radar-label { font-size: 3px; fill: var(--text-muted); text-anchor: middle; }
.trn-radar-dot { fill: var(--accent-blue); }

/* Score sliders */
.trn-scores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.trn-score-row { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; }
.trn-score-row label { min-width: 70px; color: var(--text-secondary); font-size: 0.68rem; }
.trn-score-row input[type="range"] {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: var(--bg-tertiary); border-radius: 2px; outline: none; cursor: pointer;
}
.trn-score-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-blue); cursor: pointer;
}
.trn-score-val { min-width: 16px; text-align: right; font-weight: 600; font-size: 0.7rem; }

/* Curriculum */
.trn-level { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; }
.trn-level-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  cursor: pointer; transition: background var(--transition);
}
.trn-level-header:hover { background: var(--bg-hover); }
.trn-level-title { font-weight: 600; font-size: 0.88rem; }
.trn-level-meta { font-size: 0.7rem; color: var(--text-muted); }
.trn-level-body { padding: 0 16px 12px; display: none; }
.trn-level.open .trn-level-body { display: block; }
.trn-level.open .trn-level-chevron { transform: rotate(180deg); }
.trn-level-chevron { transition: transform var(--transition); font-size: 0.7rem; }

.trn-module {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.8rem;
}
.trn-module:last-child { border-bottom: none; }
.trn-module-title { font-weight: 500; margin-bottom: 4px; }
.trn-module-desc { font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 6px; }
.trn-module-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.trn-check-item { display: flex; align-items: center; gap: 4px; font-size: 0.68rem; color: var(--text-secondary); }
.trn-check-item input[type="checkbox"] { cursor: pointer; accent-color: var(--accent-green); }

/* Progress bars */
.trn-progress-section { margin-bottom: 16px; }
.trn-progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.trn-progress-name { min-width: 140px; font-size: 0.75rem; color: var(--text-secondary); }
.trn-progress-bar { flex: 1; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.trn-progress-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.trn-progress-fill.green { background: linear-gradient(90deg, var(--accent-green), #56d364); }
.trn-progress-fill.blue { background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)); }
.trn-progress-fill.yellow { background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange)); }
.trn-progress-pct { min-width: 36px; font-size: 0.7rem; font-weight: 600; text-align: right; }

/* Timeline */
.trn-timeline { position: relative; padding-left: 24px; }
.trn-timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent-blue), var(--accent-purple), var(--accent-green));
}
.trn-tl-item { position: relative; margin-bottom: 20px; padding-left: 16px; }
.trn-tl-dot {
  position: absolute; left: -20px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid var(--bg-primary);
}
.trn-tl-dot.current { background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.trn-tl-dot.future { background: var(--bg-tertiary); border-color: var(--border); }
.trn-tl-dot.done { background: var(--accent-green); }
.trn-tl-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.trn-tl-subtitle { font-size: 0.72rem; color: var(--accent-blue); margin-bottom: 4px; }
.trn-tl-details { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.6; }
.trn-tl-details li { margin-bottom: 2px; list-style: none; }
.trn-tl-details li::before { content: '→ '; color: var(--text-muted); }

/* Decision matrix */
.trn-matrix-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.trn-mx-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.trn-mx-card-header { grid-column: 1 / -1; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 4px; }
.trn-mx-role { font-weight: 600; font-size: 0.9rem; }
.trn-mx-verdict { font-size: 0.72rem; font-weight: 600; margin-top: 2px; }
.trn-mx-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.trn-mx-col ul { list-style: none; }
.trn-mx-col li { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; }

/* Add employee form */
.trn-add-form {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; margin-top: 12px; display: none;
}
.trn-add-form.open { display: block; }
.trn-add-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.trn-add-row input, .trn-add-row select {
  padding: 6px 10px; background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font);
  font-size: 0.8rem; flex: 1; min-width: 120px;
}
.trn-add-row input:focus, .trn-add-row select:focus { outline: none; border-color: var(--accent-blue); }

/* Responsive */
@media (max-width: 900px) {
  .trn-emp-grid { grid-template-columns: 1fr; }
  .trn-scores-grid { grid-template-columns: 1fr; }
  .trn-mx-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .trn-wrap { padding: 12px; }
  .trn-tabs { overflow-x: auto; }
  .trn-tab { white-space: nowrap; padding: 8px 10px; font-size: 0.72rem; }
}
