/* ═══════════════════════════════════════════════════════════════════════════
   TRAINING DATABASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Training Content Layout ─── */
.training-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.training-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.training-section h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #fde047;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.3);
  border-bottom: 2px solid #fde047;
  padding-bottom: 8px;
}

/* ─── Add Trainee Form ─── */
.add-trainee-form {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.add-trainee-form .form-title {
  color: #fde047;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.add-trainee-form .form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.add-trainee-form .form-group {
  flex: 1;
}

.add-trainee-form .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 14px;
}

.add-trainee-form .form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.add-trainee-form .form-group input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.add-trainee-form .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.add-trainee-form .save-btn {
  background: #fde047;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  height: 41px;
}

.add-trainee-form .save-btn:hover {
  background: #fff;
  transform: scale(1.02);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  transition: background-color 0.3s ease;
}

.status-dot.connected {
  background: #22c55e;
}

.status-text {
  font-size: 12px;
  color: #9ca3af;
}

/* ─── Training Procedures Section ─── */
.training-procedures .training-procedures-header {
  cursor: pointer;
  user-select: none;
  color: #22c55e !important;
  border-bottom-color: #22c55e !important;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.training-procedures .toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.training-procedures.expanded .toggle-icon {
  transform: rotate(180deg);
}

.training-module {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.training-module-header {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  transition: background 0.2s ease;
}

.training-module-header:hover {
  background: rgba(34, 197, 94, 0.15);
}

.training-module-content {
  padding: 16px;
  padding-top: 24px;
  display: none;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.training-module-section {
  margin-bottom: 12px;
}

.training-module-section h4 {
  color: #22c55e;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 6px;
  font-weight: 600;
}

.training-module-section p {
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
}

.edit-module-btn {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: absolute;
  top: 12px;
  right: 12px;
}

.edit-module-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
  transform: scale(1.05);
}

.edit-module-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── Training Tables ─── */
.training-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
}

.training-table th {
  background: #fde047;
  color: #000;
  padding: 12px 10px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  text-align: left;
}

.training-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.training-table th:last-child {
  border-radius: 0 8px 8px 0;
}

.training-table tr.trainee-row {
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s ease;
}

.training-table tr.trainee-row:hover {
  background: rgba(253, 224, 71, 0.1);
}

.training-table td {
  padding: 12px 10px;
  font-size: 13px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.training-table td:first-child {
  border-radius: 8px 0 0 8px;
}

.training-table td:last-child {
  border-radius: 0 8px 8px 0;
}

/* ─── Drag Handle ─── */
.drag-handle {
  cursor: grab;
  color: #9ca3af;
  font-size: 18px;
  user-select: none;
  transition: color 0.2s;
  text-align: center;
  width: 40px;
}

.drag-handle:hover {
  color: #fde047;
}

.drag-handle:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.5;
  background: rgba(253, 224, 71, 0.1) !important;
}

.drag-over {
  border-top: 2px solid #fde047 !important;
}

/* ─── Rank Badges ─── */
.rank-badge {
  font-family: var(--font-mono);
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  display: inline-block;
  position: relative;
  border: 1px solid;
}

.rank-badge.intern { 
  background: rgba(148, 163, 184, 0.2); 
  color: #cbd5e1; 
  border-color: rgba(148, 163, 184, 0.4);
}
.rank-badge.trainee { 
  background: rgba(34, 197, 94, 0.2); 
  color: #4ade80; 
  border-color: rgba(34, 197, 94, 0.4);
}
.rank-badge.recruit { 
  background: rgba(234, 179, 8, 0.2); 
  color: #facc15; 
  border-color: rgba(234, 179, 8, 0.4);
}
.rank-badge.agent { 
  background: rgba(239, 68, 68, 0.2); 
  color: #f87171; 
  border-color: rgba(239, 68, 68, 0.4);
}
.rank-badge.special { 
  background: rgba(168, 85, 247, 0.2); 
  color: #c084fc; 
  border-color: rgba(168, 85, 247, 0.4);
}

.rank-badge .badge-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 100;
  margin-bottom: 6px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-badge:hover .badge-tooltip {
  display: block;
}

/* ─── Rank Select ─── */
.rank-select {
  position: relative;
  display: inline-block;
}

.rank-select-btn {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rank-select-btn:hover .rank-badge {
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.3);
}

.rank-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: #1a1a1f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px;
  min-width: 160px;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.rank-select.open .rank-select-dropdown {
  display: block;
}

.rank-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #fff;
}

.rank-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.rank-option.selected {
  background: rgba(253, 224, 71, 0.1);
}

/* ─── Department/Division Badges ─── */
.dept-badges,
.div-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dept-badge,
.div-badge {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  position: relative;
  border: 1px solid;
}

.dept-badge { 
  background: rgba(34, 197, 94, 0.15); 
  color: #4ade80; 
  border-color: rgba(34, 197, 94, 0.3);
}
.div-badge { 
  background: rgba(132, 204, 22, 0.15); 
  color: #a3e635; 
  border-color: rgba(132, 204, 22, 0.3);
}

.dept-badge.add-dept,
.div-badge.add-div {
  background: rgba(148, 163, 184, 0.1);
  color: #9ca3af;
  border-color: rgba(148, 163, 184, 0.2);
  font-weight: normal;
}

.dept-badge .badge-tooltip,
.div-badge .badge-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 100;
  margin-bottom: 6px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dept-badge:hover .badge-tooltip,
.div-badge:hover .badge-tooltip {
  display: block;
}

.dept-select-container {
  position: relative;
}

.dept-select-btn {
  background: rgba(148, 163, 184, 0.1);
  color: #9ca3af;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

.dept-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: #1a1a1f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px;
  min-width: 180px;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.dept-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  border-radius: 4px;
  transition: background 0.2s;
}

.dept-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dept-option input[type="checkbox"] {
  accent-color: #22c55e;
  width: 16px;
  height: 16px;
}

/* ─── Progress Bar ─── */
.progress-cell {
  padding: 8px !important;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  transition: width 0.3s ease;
  border-radius: 12px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.progress-details {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  font-size: 12px;
  color: #fff;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.progress-cell:hover .progress-details {
  display: block;
}

.progress-details ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-details li {
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  position: relative;
  font-size: 12px;
}

.progress-details li::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  left: 0;
}

.progress-details li.completed::before {
  background: #22c55e;
}

.progress-details li.pending::before {
  background: #ef4444;
}

/* ─── Promote Button ─── */
.promote-btn {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promote-btn:hover {
  background: rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
  transform: scale(1.1);
}

/* ─── Deleted Section ─── */
.deleted-section .deleted-header {
  cursor: pointer;
  user-select: none;
  color: #ef4444 !important;
  border-bottom-color: #ef4444 !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.deleted-section .toggle-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.deleted-section.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* ─── Profile Modal ─── */
.training-profile-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  backdrop-filter: blur(8px);
}

.training-profile-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #0f0f14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 24px;
  overflow-y: auto;
}

.training-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.training-profile-name {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  color: #fde047;
  font-family: var(--font-mono);
}

.training-profile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.2s ease;
}

.training-profile-close:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.training-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.training-profile-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px;
}

.training-profile-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #fde047;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.training-profile-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.training-profile-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.training-profile-info-item:last-child {
  border-bottom: none;
}

.training-profile-info-label {
  font-size: 12px;
  color: #9ca3af;
  min-width: 100px;
}

.training-profile-info-value {
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}

/* Profile Picture */
.training-profile-picture-section {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.training-profile-picture-container {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(253, 224, 71, 0.3);
}

.training-profile-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.training-profile-picture-upload {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  padding: 8px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.training-profile-picture-container:hover .training-profile-picture-upload {
  opacity: 1;
}

.training-picture-url-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(253, 224, 71, 0.3);
  border-radius: 4px;
  padding: 6px 8px;
  color: #fff;
  font-size: 11px;
}

.training-picture-url-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Certificates */
.training-profile-certificates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.certificate-badge {
  background: rgba(253, 224, 71, 0.1);
  border: 1px solid rgba(253, 224, 71, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: #fde047;
  font-weight: 500;
}

.certificate-badge::before {
  content: '✓ ';
  font-weight: bold;
  color: #4ade80;
}

/* Timeline */
.training-profile-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.training-timeline-item {
  position: relative;
  padding-left: 24px;
  padding-bottom: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.training-timeline-item:last-child {
  border-left: none;
}

.training-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fde047;
}

.training-timeline-date {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.training-timeline-content {
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
}

.training-timeline-instructor {
  font-size: 12px;
  color: #fde047;
  margin-top: 4px;
}

/* Notes */
.training-profile-notes textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 12px;
  color: #fff;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.training-profile-notes textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.training-profile-notes textarea:focus {
  outline: none;
  border-color: rgba(253, 224, 71, 0.4);
}

/* Strikes/Commendations */
.training-profile-strikes { color: #f87171 !important; }
.training-profile-commendations { color: #4ade80 !important; }

/* ─── Dialog Styles ─── */
.training-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0f0f14;
  border: 2px solid #22c55e;
  border-radius: 12px;
  padding: 24px;
  min-width: 340px;
  z-index: 100001;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.25);
}

.training-dialog-title {
  color: #22c55e;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.training-dialog-input {
  width: 100%;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 6px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  outline: none;
}

.training-dialog-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.training-dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.training-dialog-btn {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.training-dialog-btn:hover {
  background: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.training-dialog-btn.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

.training-dialog-btn.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ─── Skills Dialog List ─── */
.skills-list {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.skill-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
  color: #fff;
  font-size: 13px;
}

.skill-item:last-child {
  border-bottom: none;
}

.skill-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.skill-item .skill-number {
  color: #fde047;
  font-weight: bold;
  min-width: 28px;
}

.skill-item.completed {
  color: #4ade80;
}

/* ─── Name Hover Preview ─── */
.name-hover-picture {
  display: none;
  position: fixed;
  z-index: 10000;
  width: 200px;
  background: #0f0f14;
  border: 2px solid rgba(253, 224, 71, 0.3);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.name-hover-picture img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid rgba(253, 224, 71, 0.2);
}

.hover-info {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hover-name {
  color: #fde047;
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

/* ─── Training Auth Screen ─── */
#tab-training {
  position: relative;
}

.training-auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.training-auth-overlay.hidden {
  display: none;
}

.training-matrix-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
}

.training-auth-box {
  background: rgba(20, 20, 25, 0.95);
  padding: 40px 50px;
  border: 2px solid #ef4444;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.4);
  text-align: center;
  animation: trainingAuthPulse 2s infinite;
  max-width: 400px;
  width: 90%;
}

@keyframes trainingAuthPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 50px rgba(239, 68, 68, 0.5); }
}

.training-auth-title {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 8px;
  color: #ef4444;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
  font-family: var(--font-mono);
  letter-spacing: 3px;
}

.training-auth-subtitle {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0 0 30px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.training-auth-input {
  width: 100%;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  color: #fff;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
  outline: none;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.training-auth-input::placeholder {
  color: rgba(239, 68, 68, 0.5);
  letter-spacing: 1px;
}

.training-auth-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.12);
}

.training-auth-btn {
  width: 100%;
  background: #ef4444;
  border: none;
  border-radius: 6px;
  color: #000;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.training-auth-btn:hover {
  background: #f87171;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
  transform: scale(1.02);
}

.training-auth-btn:active {
  transform: scale(0.98);
}

.training-access-denied {
  color: #ef4444;
  font-size: 13px;
  margin-top: 16px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  display: none;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .training-content {
    padding: 16px;
  }
  
  .add-trainee-form .form-row {
    flex-direction: column;
  }
  
  .training-table {
    font-size: 12px;
  }
  
  .training-table th,
  .training-table td {
    padding: 8px 6px;
  }
  
  .training-profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRAINING SETTINGS MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.training-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.training-settings-content {
  background: #0a0a0f;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.training-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.training-settings-header h2 {
  margin: 0;
  color: #fde047;
  font-size: 20px;
  font-weight: 700;
}

.training-settings-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.training-settings-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.training-settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  gap: 8px;
}

.settings-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.settings-tab:hover {
  color: var(--text);
}

.settings-tab.active {
  color: #fde047;
  border-bottom-color: #fde047;
}

.training-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

.settings-description {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: move;
  transition: all 0.2s;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(253, 224, 71, 0.3);
}

.settings-item.dragging {
  opacity: 0.5;
}

.settings-item.drag-over {
  border-color: #fde047;
  background: rgba(253, 224, 71, 0.1);
}

.settings-drag-handle {
  color: var(--text-muted);
  font-size: 18px;
  cursor: grab;
  user-select: none;
}

.settings-drag-handle:active {
  cursor: grabbing;
}

.settings-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-module-item .settings-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-module-item .settings-fields textarea {
  grid-column: 1 / -1;
}

.settings-input,
.settings-textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
}

.settings-input:focus,
.settings-textarea:focus {
  outline: none;
  border-color: #fde047;
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.1);
}

.settings-textarea {
  resize: vertical;
  min-height: 60px;
}

.settings-delete-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  color: var(--red);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
}

.settings-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.settings-add-btn {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  color: var(--green);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-add-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.training-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border);
}

.settings-save-btn {
  background: var(--green);
  border: none;
  border-radius: 6px;
  color: #000;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-save-btn:hover {
  background: #16a34a;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.settings-cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sop-settings-btn {
  background: rgba(253, 224, 71, 0.1);
  border: 1px solid rgba(253, 224, 71, 0.3);
  border-radius: 6px;
  color: #fde047;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.sop-settings-btn:hover {
  background: rgba(253, 224, 71, 0.2);
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.2);
}

.sop-settings-btn svg {
  width: 18px;
  height: 18px;
}

.training-module {
  position: relative;
}

.training-module-content {
  position: relative;
}