:root {
  --primary: #7c3aed;
  /* Purple theme for training */
  --primary-dark: #6d28d9;
  --page: #f6f7fb;
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.25s ease;
}

/* Reset & base */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--page);
  display: grid;
  place-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 36px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  text-align: center;
  animation: fade-in 0.45s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 24px;
}

/* ---------- Form ---------- */
.field {
  position: relative;
  margin-bottom: 14px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.95rem;
  color: #1f2937;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #9ca3af;
  padding: 2px 6px;
  border-radius: 8px;
}

.toggle-password:hover {
  color: var(--primary);
}

/* ---------- Button ---------- */
.btn {
  width: 100%;
  padding: 14px;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), transform 0.05s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-dark);
}

.btn:active {
  transform: translateY(1px);
}

/* ---------- Messages ---------- */
#message {
  margin-top: 14px;
  font-size: 0.93rem;
  font-weight: 500;
  min-height: 1.2em;
}

.error {
  color: #d52731;
}

.success {
  color: #269f53;
}

/* ---------- Logout button ---------- */
.logout-icon {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
  transition: background var(--transition), transform 0.05s ease;
  z-index: 1000;
}

.logout-icon i {
  font-size: 14px;
  line-height: 1;
}

.logout-icon:hover {
  background: var(--primary-dark);
}

.logout-icon:active {
  transform: translateY(1px);
}

/* ---------- Floating Action Button ---------- */
.fab-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s;
  z-index: 100;
}

.fab-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ---------- Modal Overlay ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-overlay.open {
  display: grid;
  animation: fade-in 0.2s ease forwards;
}

/* ---------- Modal Card ---------- */
.modal-card {
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.two-cols {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 400px;
}

.col-left {
  background: #faf5ff;
  padding: 24px 28px;
  border-right: 1px solid #edf2f7;
}

.col-right {
  background: #ffffff;
  padding: 24px;
}

@media (max-width: 768px) {
  .two-cols {
    grid-template-columns: 1fr;
  }

  .col-left {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  text-align: right;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.modal-body {
  padding: 0;
  overflow-y: auto;
  max-height: 85vh;
}

.section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #111;
}

.close-icon {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
  padding: 4px;
}

/* ---------- Form Elements ---------- */
.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  text-align: left;
}

.field select {
  width: 100%;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 0.95rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

/* Week Day Checkboxes */
.week-days {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.week-days label {
  cursor: pointer;
}

.week-days input {
  display: none;
}

.week-days span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.week-days span:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #faf5ff;
}

.week-days input:checked+span {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

/* ==============================
   Trainees page + cards UI
   ============================== */

.trainees-page {
  position: fixed;
  inset: 0;
  padding: 18px 18px 110px;
  overflow: auto;
  display: none;
  background: var(--page);
}

.trainees-topbar {
  max-width: 1100px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trainees-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}

.trainees-subtitle {
  margin-top: 4px;
  font-size: 0.95rem;
  color: #6b7280;
}

.trainees-status {
  max-width: 1100px;
  margin: 0 auto 14px;
  font-size: 0.95rem;
  color: #6b7280;
}

.trainees-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 600px) {
  .trainees-grid {
    grid-template-columns: 1fr;
  }
}

/* Trainee Card */
.trainee-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.07);
  border: 1px solid rgba(229, 231, 235, 0.9);
  padding: 16px 16px 14px;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trainee-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  border-color: #ddd6fe;
}

/* Card Top */
.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.top-info {
  flex: 1;
  min-width: 0;
}

.trainee-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.top-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trainee-name {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0;
}

.dept-badge-inline {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dept-badge-inline i {
  color: var(--primary);
  font-size: 0.75rem;
}

/* Department Tags Row */
.dept-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.dept-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dept-tag-ttkb {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #15803d;
  border: 1px solid #86efac;
}

.dept-tag-breakout {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  color: #c2410c;
  border: 1px solid #fdba74;
}

.dept-tag-default {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Days Past Badge */
.days-past-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.days-past-badge i {
  font-size: 0.65rem;
}

.days-past-badge.alert {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #dc2626;
  border: 1px solid #f87171;
  animation: pulse-alert 2s infinite;
}

@keyframes pulse-alert {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
  }
}

/* Card Top - Status Badge Position */
.card-top .status-badge {
  margin-left: auto;
  flex-shrink: 0;
}

/* Status Badges */
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-training {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-completed {
  background: #dcfce7;
  color: #16a34a;
}

.status-paused {
  background: #fef3c7;
  color: #d97706;
}

.status-quit {
  background: #fee2e2;
  color: #dc2626;
}

.status-default {
  background: #f3f4f6;
  color: #6b7280;
}

/* Card Mid */
.card-mid {
  display: flex;
  gap: 8px;
}

.meta-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #4b5563;
  font-weight: 600;
}

.meta-pill i {
  color: #9ca3af;
}

/* Card Bottom - Days */
.card-bot {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.day-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
  cursor: default;
}

.day-pill.active {
  background: #f3e8ff;
  color: var(--primary);
  border: 1px solid rgba(124, 58, 237, 0.2);
  font-weight: 800;
}

.day-pill.inactive {
  visibility: hidden;
  pointer-events: none;
}

/* Card Actions */
.card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 10;
}

.trainee-card:hover .card-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-edit {
  background: #fff;
  color: var(--primary);
  border: 1px solid #eef2f7;
}

.btn-edit:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-delete {
  background: #fff;
  color: #ef4444;
  border: 1px solid #fef2f2;
}

.btn-delete:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* Assign Button - Bottom Right (legacy - keep for assign modal) */
.btn-assign {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  transform: translateY(5px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  white-space: nowrap;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trainee-card:hover .btn-assign {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-assign:hover {
  background: linear-gradient(135deg, var(--primary-dark), #5b21b6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}

.btn-assign i {
  font-size: 0.75rem;
}

/* NEW: Compact Assign Badge Button */
.assign-badge-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  color: var(--primary);
  border: 1px solid #c4b5fd;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.assign-badge-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
}

.assign-badge-btn i {
  font-size: 0.65rem;
}

/* Suggestions List */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.suggestion-item {
  padding: 10px 14px;
  font-size: 0.95rem;
  color: #374151;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #faf5ff;
  color: var(--primary);
}

/* ==============================
   Redesigned Assign Modal
   ============================== */

.assign-modal-redesign {
  max-width: 800px;
  width: 95%;
  overflow: visible;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.assign-modal-redesign .modal-header {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
}

.assign-modal-redesign .modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
}

.assign-modal-redesign .modal-header h3 i {
  font-size: 1.1rem;
}

.assign-modal-redesign .modal-body {
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.assign-modal-redesign .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 20px 20px;
}

.assign-two-cols {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 350px;
}

.assign-col-left {
  background: #faf5ff;
  padding: 24px;
  border-right: 1px solid #edf2f7;
}

.assign-col-right {
  background: #ffffff;
  padding: 24px;
}

@media (max-width: 700px) {
  .assign-two-cols {
    grid-template-columns: 1fr;
  }
  
  .assign-col-left {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

.assign-sessions-container {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Assign Department Chips */
.assign-dept-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assign-dept-chips .dept-option-modern {
  flex: 0 0 auto;
}

.assign-dept-chips .dept-card-modern {
  padding: 10px 16px;
  border-radius: 10px;
}

.assign-dept-chips .icon-box {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.assign-dept-chips .dept-text {
  font-size: 0.85rem;
}
.assign-section {
  margin-bottom: 28px;
}

.modern-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.modern-search {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-search .search-icon {
  position: absolute;
  left: 14px;
  z-index: 10;
  color: #9ca3af;
  font-size: 0.9rem;
}

.modern-search input {
  width: 100%;
  padding-left: 40px;
  height: 48px;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1f2937;
  transition: all 0.2s ease;
}

.modern-search input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

/* Days Grid */
.days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assign-pill input {
  display: none;
}

.assign-pill span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.assign-pill input:checked+span {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

/* Department Grid */
.dept-grid-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dept-option-modern input {
  display: none;
}

.dept-card-modern {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.icon-box {
  width: 32px;
  height: 32px;
  background: #f3e8ff;
  color: var(--primary);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  margin-right: 10px;
}

.dept-text {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.check-mark {
  margin-left: auto;
  color: var(--primary);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.dept-option-modern input:checked+.dept-card-modern {
  border-color: var(--primary);
  background: #f3e8ff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.dept-option-modern input:checked+.dept-card-modern .check-mark {
  opacity: 1;
  transform: scale(1);
}

/* Footer Button */
.assign-modern-card .modal-footer {
  padding: 0 32px 32px;
  border: none;
}

.modern-btn {
  height: 50px;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.3);
}

/* Handler Badge Styling */
.assigned-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assigned-badge.style-ttkb {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.assigned-badge.style-breakout {
  background: #fff7ed;
  border-color: #ffedd5;
}

.teacher-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.teacher-header i {
  color: #64748b;
  font-size: 0.85rem;
}

.assigned-badge.style-ttkb .teacher-header {
  color: #14532d;
}

.assigned-badge.style-ttkb .teacher-header i {
  color: #16a34a;
}

.assigned-badge.style-breakout .teacher-header {
  color: #7c2d12;
}

.assigned-badge.style-breakout .teacher-header i {
  color: #ea580c;
}

.assignment-details {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  padding-left: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-sep {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 50%;
  display: inline-block;
}

/* Mini Badges */
.dept-mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 4px;
  line-height: 1.4;
}

.dept-mini-badge.badge-ttkb {
  background: #ffffff;
  color: #15803d;
  border: 1px solid #86efac;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dept-mini-badge.badge-breakout {
  background: #ffffff;
  color: #c2410c;
  border: 1px solid #fdba74;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dept-mini-badge.badge-default {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.day-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0;
  line-height: 1.4;
}

/* Comment Button */
.btn-comment {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  z-index: 10;
}

.trainee-card:hover .btn-comment {
  opacity: 1;
  transform: translateY(0);
}

.btn-comment:hover {
  background: #e5e7eb;
  color: #111;
}

/* Comment Drawer */
.comment-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #f9fafb;
  border-radius: 12px;
  margin-top: 10px;
}

.comment-drawer.open {
  max-height: 400px;
  border: 1px solid #e5e7eb;
  overflow-y: auto;
}

.comment-box {
  padding: 12px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 150px;
  overflow-y: auto;
}

.comment-item {
  font-size: 0.8rem;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.comment-author {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.comment-input-area {
  display: flex;
  gap: 6px;
}

.comment-input-area input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
}

.btn-send-comment {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Hide Report button when drawer is open */
.trainee-card.editing-comments .btn-comment {
  display: none;
}

/* Handler Instruction */
.handler-instruction {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.handler-instruction i {
  color: var(--primary);
  font-size: 0.85rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.handler-instruction span {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

/* Trainee Note */
.trainee-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.trainee-note i {
  color: #d97706;
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.trainee-note span {
  font-size: 0.85rem;
  color: #92400e;
  font-weight: 500;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Trainee Email */
.trainee-email {
  padding: 6px 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  color: #0369a1;
}

.trainee-email i {
  font-size: 0.75rem;
}

/* Custom Alert */
#customAlertOverlay {
  z-index: 9999;
}

.alert-card {
  max-width: 320px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.alert-message {
  font-size: 1rem;
  color: #374151;
  margin-bottom: 24px;
  line-height: 1.5;
  font-weight: 500;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Nested Comments */
.comment-item {
  position: relative;
  font-size: 0.85rem;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.comment-reply {
  margin-left: 24px;
  border-left: 2px solid #e5e7eb;
  background: #fdfdfd;
}

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

.comment-author {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.8rem;
}

.comment-date {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-left: 8px;
  font-weight: 400;
}

.btn-reply-trigger,
.btn-delete-comment {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
}

.btn-reply-trigger {
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-delete-comment {
  color: #9ca3af;
  font-size: 0.85rem;
}

.btn-reply-trigger:hover {
  background: #f3f4f6;
  color: var(--primary);
}

.btn-delete-comment:hover {
  background: #fee2e2;
  color: #ef4444;
}

.comment-item:hover .btn-reply-trigger,
.comment-item:hover .btn-delete-comment {
  opacity: 1;
}

.nested-reply-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eee;
  display: none;
  gap: 6px;
}

.nested-reply-box.open {
  display: flex;
}

.nested-reply-box input {
  flex: 1;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.8rem;
}



/* ==============================
   Training Sessions Styles
   ============================== */

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 12px;
  padding-top: 10px;
}

.session-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  position: relative;
}

/* Alternating colors for sessions */
.session-row:nth-child(1) { background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%); border-left: 4px solid #f59e0b; }
.session-row:nth-child(2) { background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%); border-left: 4px solid #3b82f6; }
.session-row:nth-child(3) { background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%); border-left: 4px solid #22c55e; }
.session-row:nth-child(4) { background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%); border-left: 4px solid #ec4899; }
.session-row:nth-child(5) { background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%); border-left: 4px solid #8b5cf6; }
.session-row:nth-child(6) { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); border-left: 4px solid #f97316; }
.session-row:nth-child(7) { background: linear-gradient(135deg, #cffafe 0%, #e0f7fa 100%); border-left: 4px solid #06b6d4; }

/* Session number badge */
.session-number-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  z-index: 5;
}

.session-row:nth-child(1) .session-number-badge { background: #f59e0b; }
.session-row:nth-child(2) .session-number-badge { background: #3b82f6; }
.session-row:nth-child(3) .session-number-badge { background: #22c55e; }
.session-row:nth-child(4) .session-number-badge { background: #ec4899; }
.session-row:nth-child(5) .session-number-badge { background: #8b5cf6; }
.session-row:nth-child(6) .session-number-badge { background: #f97316; }
.session-row:nth-child(7) .session-number-badge { background: #06b6d4; }

.session-row-top {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.session-row-bottom {
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.session-field {
  position: relative;
  flex: 1;
}

.session-field.small {
  flex: 0 0 90px;
}

.session-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
}

.day-indicator {
  position: absolute;
  right: 35px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.session-handler-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-handler-field i {
  color: #9ca3af;
  font-size: 0.9rem;
}

.session-handler-field input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
}

.btn-remove-session {
  width: 32px;
  height: 32px;
  border: none;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.btn-remove-session:hover {
  background: #ef4444;
  color: white;
}

.btn-add-session {
  width: 100%;
  padding: 10px;
  background: #f3e8ff;
  color: var(--primary);
  border: 1px dashed var(--primary);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-add-session:hover {
  background: var(--primary);
  color: white;
  border-style: solid;
}

/* Card Sessions Display */
.card-sessions {
  margin-top: 8px;
}

.sessions-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sessions-label i {
  color: var(--primary);
}

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

.session-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.8rem;
}

.session-day {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.session-date {
  font-weight: 600;
  color: #374151;
}

.session-time {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.session-time i {
  font-size: 0.7rem;
  color: #9ca3af;
}

.session-handler {
  color: #059669;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.session-handler i {
  font-size: 0.7rem;
}

.no-sessions {
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
  padding: 8px;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
}


/* Handler Suggestions Dropdown */
.handler-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.handler-suggestion-item {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.handler-suggestion-item:last-child {
  border-bottom: none;
}

.handler-suggestion-item:hover {
  background: #f3e8ff;
  color: var(--primary);
}


/* Department Checkboxes - Compact Chips */
.dept-checkboxes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dept-checkbox-card {
  cursor: pointer;
}

.dept-checkbox-card input {
  display: none;
}

.dept-checkbox-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.dept-checkbox-content i:first-child {
  font-size: 0.9rem;
  color: #9ca3af;
  transition: all 0.2s;
}

.dept-checkbox-content .dept-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
}

.dept-checkbox-content .check-icon {
  font-size: 0.75rem;
  color: var(--primary);
  opacity: 0;
  margin-left: 2px;
  transition: all 0.2s;
}

.dept-checkbox-card:hover .dept-checkbox-content {
  border-color: var(--primary);
  background: #faf5ff;
}

.dept-checkbox-card:hover .dept-checkbox-content i:first-child {
  color: var(--primary);
}

.dept-checkbox-card input:checked+.dept-checkbox-content {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.dept-checkbox-card input:checked+.dept-checkbox-content i:first-child {
  color: var(--primary);
}

.dept-checkbox-card input:checked+.dept-checkbox-content .dept-name {
  color: var(--primary);
}

.dept-checkbox-card input:checked+.dept-checkbox-content .check-icon {
  opacity: 1;
}

/* Session Department Checkboxes */
.session-dept-field {
  margin-top: 8px;
}

.session-dept-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.session-dept-chip {
  cursor: pointer;
}

.session-dept-chip input {
  display: none;
}

.session-dept-chip span {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.2s;
}

.session-dept-chip:hover span {
  border-color: var(--primary);
  background: #faf5ff;
  color: var(--primary);
}

.session-dept-chip input:checked+span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}


.session-dept-badge {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 4px;
}

.session-depts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}


/* ==============================
   Custom Time Picker
   ============================== */

.custom-time-input {
  position: relative;
  flex: 0 0 110px;
}

.time-display-btn {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #374151;
  transition: all 0.2s;
}

.time-display-btn:hover {
  border-color: var(--primary);
  background: #faf5ff;
}

.time-display-btn i {
  font-size: 0.75rem;
  color: #9ca3af;
}

.time-display-btn.has-value {
  color: #111;
  font-weight: 500;
}

.time-picker-popup {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 12px;
  display: none;
  min-width: 180px;
}

.time-picker-popup.open {
  display: block;
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.time-picker-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-align: center;
}

.time-picker-selectors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.time-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.time-selector-label {
  font-size: 0.65rem;
  color: #9ca3af;
  font-weight: 600;
}

.time-selector select {
  width: 60px;
  padding: 8px 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background: #f9fafb;
  color: #111;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.time-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.time-separator {
  font-size: 1.2rem;
  font-weight: 700;
  color: #6b7280;
  margin-top: 16px;
}

.time-picker-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #f3f4f6;
  padding-top: 10px;
}

.time-picker-actions button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-time-cancel {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

.btn-time-cancel:hover {
  background: #e5e7eb;
  color: #374151;
}

.btn-time-ok {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

.btn-time-ok:hover {
  background: var(--primary-dark);
}


/* ==============================
   Assign Modal - Enhanced Styles
   ============================== */

.assign-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.assign-session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.assign-session-item:hover {
  border-color: var(--primary);
  background: #faf5ff;
}

.assign-session-item.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.assign-session-item input[type="checkbox"] {
  display: none;
}

.assign-session-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.assign-session-item.selected .assign-session-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.assign-session-checkbox i {
  color: white;
  font-size: 0.7rem;
  opacity: 0;
}

.assign-session-item.selected .assign-session-checkbox i {
  opacity: 1;
}

.assign-session-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.assign-session-date {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assign-session-date .day-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.assign-session-time {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.assign-session-time i {
  font-size: 0.7rem;
}

.assign-session-dept {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.assign-session-dept-badge {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}

.selected-handler-display {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  display: none;
  align-items: center;
  gap: 10px;
}

.selected-handler-display.show {
  display: flex;
}

.selected-handler-display i {
  color: #16a34a;
}

.selected-handler-display span {
  font-weight: 600;
  color: #15803d;
}

.selected-handler-display .remove-handler {
  margin-left: auto;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
}

.selected-handler-display .remove-handler:hover {
  color: #ef4444;
}

/* Handler Name Display */
.handler-name-display {
  font-size: 0.8rem;
  color: #16a34a;
  font-weight: 600;
  margin-left: 8px;
  white-space: nowrap;
}


/* ==============================
   Assign Modal - Department Chips
   ============================== */

.assign-dept-chip-item {
  cursor: pointer;
}

.assign-dept-chip-item input {
  display: none;
}

.assign-dept-chip-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.assign-dept-chip-content i:first-child {
  font-size: 0.9rem;
  color: #9ca3af;
  transition: all 0.2s;
}

.assign-dept-chip-content span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

.assign-dept-chip-content .check-icon {
  font-size: 0.75rem;
  color: var(--primary);
  opacity: 0;
  transition: all 0.2s;
}

.assign-dept-chip-item:hover .assign-dept-chip-content {
  border-color: var(--primary);
  background: #faf5ff;
}

.assign-dept-chip-item:hover .assign-dept-chip-content i:first-child {
  color: var(--primary);
}

.assign-dept-chip-item input:checked + .assign-dept-chip-content {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.assign-dept-chip-item input:checked + .assign-dept-chip-content i:first-child {
  color: var(--primary);
}

.assign-dept-chip-item input:checked + .assign-dept-chip-content span {
  color: var(--primary);
}

.assign-dept-chip-item input:checked + .assign-dept-chip-content .check-icon {
  opacity: 1;
}

/* Enhanced Selected Handler Display */
#selectedHandlerDisplay {
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac;
  border-radius: 10px;
  display: none;
  align-items: center;
  gap: 10px;
}

#selectedHandlerDisplay.show {
  display: flex;
}

#selectedHandlerDisplay i:first-child {
  color: #16a34a;
  font-size: 1.1rem;
}

#selectedHandlerDisplay span {
  font-weight: 600;
  color: #15803d;
  font-size: 0.95rem;
}

#selectedHandlerDisplay .remove-handler {
  margin-left: auto;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

#selectedHandlerDisplay .remove-handler:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Enhanced Assign Sessions List */
.assign-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assign-session-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.assign-session-item:hover {
  border-color: var(--primary);
  background: #faf5ff;
  transform: translateX(4px);
}

.assign-session-item.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.assign-session-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.assign-session-item.selected .assign-session-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.assign-session-checkbox i {
  color: white;
  font-size: 0.75rem;
  opacity: 0;
}

.assign-session-item.selected .assign-session-checkbox i {
  opacity: 1;
}


/* ==============================
   Redesigned Assign Modal - Edit Mode
   ============================== */

.assign-modal-redesign {
  max-width: 700px;
  width: 95%;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.assign-modal-redesign .modal-header {
  background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 24px;
  border-radius: 20px 20px 0 0;
}

.assign-modal-redesign .modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.assign-modal-redesign .modal-body {
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.assign-modal-redesign .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Single Column Layout */
.assign-single-col {
  padding: 20px 24px;
}

/* Info Banner */
.assign-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  margin-bottom: 20px;
}

.assign-info-banner i {
  color: #2563eb;
  font-size: 1rem;
  margin-top: 2px;
}

.assign-info-banner span {
  font-size: 0.85rem;
  color: #1e40af;
  line-height: 1.5;
}

/* Trainee Info */
.assign-trainee-info {
  margin-bottom: 20px;
}

.trainee-info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.trainee-avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.trainee-info-text {
  flex: 1;
}

.trainee-info-name {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.trainee-info-email {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Trainee Info Departments in Assign Modal */
.trainee-info-depts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.trainee-info-depts .dept-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sessions Edit Container */
.assign-sessions-edit-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.assign-sessions-header {
  padding: 14px 18px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.assign-sessions-header .section-title {
  margin: 0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.assign-sessions-header .section-title i {
  color: var(--primary);
}

.assign-sessions-edit-list {
  max-height: 350px;
  overflow-y: auto;
}

/* No Sessions Message */
.no-sessions-message {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.no-sessions-message i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #d1d5db;
}

.no-sessions-message p {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* Session Edit Row */
.assign-session-edit-row {
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.assign-session-edit-row:last-child {
  border-bottom: none;
}

.assign-session-edit-row:hover {
  background: #fafafa;
}

.assign-session-edit-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.session-date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-date-badge .day-label {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.session-date-badge .date-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.session-time-label {
  color: #6b7280;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.session-time-label i {
  font-size: 0.75rem;
  color: #9ca3af;
}

.session-depts-row {
  display: flex;
  gap: 6px;
}

.assign-edit-dept-tag {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Handler Input Section */
.assign-session-edit-handler {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.handler-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.handler-label i {
  color: var(--primary);
  font-size: 0.85rem;
}

.handler-input-wrapper {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assign-handler-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: all 0.2s;
  background: #fff;
}

.assign-handler-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.assign-handler-input::placeholder {
  color: #9ca3af;
}

.handler-name-tag {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #15803d;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #86efac;
}

/* Handler Suggestions Dropdown */
.assign-handler-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  max-height: 180px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.assign-suggestion-item {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.assign-suggestion-item:last-child {
  border-bottom: none;
}

.assign-suggestion-item:hover {
  background: #f3e8ff;
  color: var(--primary);
}

/* Responsive */
@media (max-width: 600px) {
  .assign-session-edit-handler {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .handler-input-wrapper {
    width: 100%;
  }
}


/* ==============================
   Multiple Handlers Per Session
   ============================== */

.assign-handlers-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
}

.handlers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.no-handler-msg {
  font-size: 0.85rem;
  color: #9ca3af;
  font-style: italic;
  padding: 8px 0;
}

.handler-entry {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.2s;
}

.handler-entry:hover {
  border-color: var(--primary);
  background: #faf5ff;
}

.handler-entry-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.handler-icon {
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.handler-input-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.handler-input-group .assign-handler-input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
  transition: all 0.2s;
}

.handler-input-group .assign-handler-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.handler-input-group .handler-name-tag {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #15803d;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #86efac;
  white-space: nowrap;
}

.handler-input-group .assign-handler-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 60px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.btn-remove-handler {
  width: 32px;
  height: 32px;
  border: none;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-remove-handler:hover {
  background: #ef4444;
  color: white;
}

.btn-add-handler {
  width: 100%;
  padding: 10px 14px;
  background: #f3e8ff;
  color: var(--primary);
  border: 1px dashed var(--primary);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-add-handler:hover {
  background: var(--primary);
  color: white;
  border-style: solid;
}

.btn-add-handler i {
  font-size: 0.8rem;
}

/* Adjust session row for better spacing */
.assign-session-edit-row {
  padding: 18px;
  border-bottom: 1px solid #f3f4f6;
}

.assign-session-edit-row:last-child {
  border-bottom: none;
}

.assign-session-edit-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}


/* Handler Department Selection in Assign Modal */
.handler-dept-selection {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  margin-left: 30px;
}

.handler-dept-chips .session-dept-chip span {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.handler-entry {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #e5e7eb;
}

.handler-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}


/* Session Handlers List - Multiple Handlers */
.session-badge {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.8rem;
}

.session-main-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.session-handlers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed #86efac;
}

.session-handler-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #d1fae5;
}

.session-handler-row i {
  color: #059669;
  font-size: 0.75rem;
}

.session-handler-row .handler-name {
  font-weight: 600;
  color: #065f46;
  font-size: 0.8rem;
}

.session-handler-row .handler-depts {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.handler-dept-mini {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}


/* Session Handlers List - Multiple Handlers */
.session-main-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.session-handlers-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px dashed #86efac;
}

.session-handler-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #d1fae5;
}

.session-handler-row i {
  color: #059669;
  font-size: 0.75rem;
}

.session-handler-row .handler-name {
  font-weight: 600;
  color: #065f46;
  font-size: 0.8rem;
}

.session-handler-row .handler-depts {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.handler-dept-mini {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}


/* ==============================
   NEW: Trainee Name Row with Status
   ============================== */

.trainee-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trainee-name-row .trainee-name {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.trainee-name-row .status-badge {
  margin-left: 0;
}

/* ==============================
   NEW: Improved Session Cards
   ============================== */

.sessions-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.session-card-new {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.session-card-new:hover {
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.1);
}

.session-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.session-day-badge {
  background: var(--primary);
  color: white;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

.session-date-text {
  font-weight: 600;
  color: #374151;
  font-size: 0.85rem;
}

.session-time-inline {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
}

.session-time-inline::before {
  content: "⏱";
  font-size: 0.7rem;
}

.session-dept-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-dept-badge-new {
  background: #f0fdf4;
  color: #15803d;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}

.session-handler-row-new {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  background: #f0f9ff;
  border-radius: 5px;
  border: 1px solid #bae6fd;
}

.session-handler-row-new i {
  font-size: 0.65rem;
  color: #0ea5e9;
}

/* Hide old session badge styles for new design */
.card-sessions .session-badge {
  display: none;
}

/* Adjust card-top for new layout */
.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-top .top-info {
  flex: 1;
  min-width: 0;
}