/* ====================== Task Manager Header ===================== */

.tm-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 20px 30px 0;
  border-radius: 10px;
}

.tm-header h2 {
  margin: 0;
  font-size: 24px;
  color: #111827;
}

.tm-header p {
  font-size: 15px;
  margin: 4px 0 0;
  color: #6b7280;
}

.tm-headerRight {
  display: flex;
}

@media (max-width: 768px) {
  .tm-header {
    display: flex;
    flex-direction: column;
    margin: 20px 20px 0;
  }
}

/* =========================== Header KPIs ======================== */

.tm-kpiGrid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 10px;
}

.tm-kpiCard {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.tm-kpiContent {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tm-kpiCard span {
  font-size: 13px;
  color: #6b7280;
}

.tm-kpiCard h3 {
  margin: 4px 0 0;
  font-size: 16px;
  color: #111827;
}

.tm-kpiCard i {
  font-size: 15px;
  color: #2563eb;
}

.tm-kpiCard.highlight {
  background: #3178d3;
  color: white;
}

.tm-kpiCard.highlight i,
.tm-kpiCard.highlight h3,
.tm-kpiCard.highlight span {
  color: white;
}

@media (max-width: 768px) {
  .tm-kpiGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ====================== Task Manager Wrapper ===================== */

.tasksManager-wrapper {
  padding: 13px 30px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 10px;
}

.tm-tasksWrapper {
  display: grid;
  align-content: start;
}

@media (max-width: 768px) {
  .tasksManager-wrapper {
    grid-template-columns: 1fr;
    padding: 13px 20px;
  }
}

/* =========================== TASKS FILTRE ======================== */

.tm-tasksTopBar {
  padding: 15px;
}

.tm-topBarContent {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-advancedToggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1px solid #ccc;
  outline: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s ease;
}

.tm-advancedToggle:hover {
  background: #e5e7eb;
}

.tm-rotateIcon {
  transition: transform 0.25s ease;
}

.tm-advancedToggle.active .tm-rotateIcon {
  transform: rotate(180deg);
}

.tm-advancedFilters {
  display: flex;
  gap: 10px;
  flex-flow: column;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.tm-advancedFilters.open {
  margin-top: 10px;
  max-height: 200px;
  opacity: 1;
}

.tm-advancedFilters select,
.tm-advancedFilters input {
  font-family: "Roboto", sans-serif;
  padding: 8px 12px;
  border: 1px solid #ccc;
  outline: none;
  border-radius: 6px;
  font-size: 13px;
  background: #fafafa;
}

.tm-search {
  position: relative;
  display: flex;
  align-items: center;
}

.tm-search i {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.2s ease;
}

.tm-search input {
  font-family: "Roboto", sans-serif;
  padding: 8px 12px 8px 36px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  background: #fafafa;
  outline: none;
  min-width: 90px;
  transition: all 0.25s ease;
}

.tm-search input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.tm-search input:focus + i,
.tm-search:focus-within i {
  color: #3b82f6;
}

/* ======================== VIEW SWITCHER ========================== */

.tm-viewSwitcher {
  display: none;
  gap: 6px;
  background: #f3f4f6;
  border: 1px solid #ccc;
  padding: 4px;
  border-radius: 10px;
}

.tm-viewBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s ease;
}

.tm-viewBtn i {
  font-size: 18px;
}

.tm-viewBtn:hover {
  background: #ffffff;
  color: #111827;
}

.tm-viewBtn.active {
  background: #ffffff;
  color: #1e40af;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* ========================= TASKS SIDEBAR ========================= */

.tm-tasksList {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.tm-tasksCards {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 2000px;
  overflow-y: auto;
  border-top: 1px solid #e5e7eb;
}

.tm-taskRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f1f1;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-taskRow:hover {
  background: #f3f4f6;
}

.tm-taskRow.active {
  background: #eaf1ff;
  border-left: 3px solid #2563eb;
}

.tm-taskRow-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-taskRow-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.tm-taskRow-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.tm-taskRow-right {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.tm-statusDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tm-statusDot.Draft { background: #9ca3af; }
.tm-statusDot.Pending { background: #f97316; }
.tm-statusDot.Open { background: #2563eb; }
.tm-statusDot.Assigned { background: #9333ea; }
.tm-statusDot.Progressing { background: #facc15; }
.tm-statusDot.Completed { background: #10b981; }
.tm-statusDot.Cancelled { background: #6b7280; }

.tm-tasksListEmpty {
  padding: 60px 40px;
  text-align: center;
  display: grid;
  grid-auto-rows: max-content;
  gap: 5px;
  align-content: center;
  align-items: center;
  justify-items: center;
}

.tm-tasksListEmpty h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.tm-tasksListEmpty p {
  font-size: 14px;
  color: #6b7280;
  max-width: 380px;
}

.tm-emptyBtn{
  display:inline-flex;
  align-items:center;
  padding:8px 14px;
  color:#2563eb;
  font-size:13px;
  font-weight:600;
  border-radius:8px;
  text-decoration:none;
  transition:all 0.2s ease;
}

.tm-emptyBtn:hover{
  color:#1d4ed8;
  transform:translateY(-1px);
}

@media (max-width: 768px) {
  .tm-tasksCards {
    max-height: 600px;
  }
}

/* ========================= EMPTY TASK VIEW ======================== */

.tm-emptyState {
  padding: 60px 40px;
  text-align: center;
  display: grid;
  grid-auto-rows: max-content;
  gap: 14px;
  align-content: center;
  align-items: center;
  justify-items: center;
  min-height: 320px;
}

.tm-emptyIcon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #9ca3af;
}

.tm-emptyState h3 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.tm-emptyState p {
  font-size: 14px;
  color: #6b7280;
  max-width: 380px;
}

/* ========================= Task Card Actions ======================= */

.pv-taskCard {
  position: relative;
  padding: 18px 18px 18px;
}

.pv-cardActions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.pv-actionBtn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  transition: all 0.2s ease;
}

.pv-actionBtn i {
  font-size: 16px;
}

.pv-actionBtn.edit:hover {
  background: #eff6ff;
  color: #2563eb;
}

.pv-actionBtn.duplicate:hover {
  background: #fef9c3;
  color: #ca8a04;
}

.pv-actionBtn.delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.pv-statusBadge {
  display: inline-block;
  align-content: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  color: white;
}

.pv-statusBadge.Draft { background: #9ca3af; }
.pv-statusBadge.Pending { background: #f97316; }
.pv-statusBadge.Open { background: #2563eb; }
.pv-statusBadge.Assigned { background: #9333ea; }
.pv-statusBadge.Progressing { background: #facc15; color: #111; }
.pv-statusBadge.Completed { background: #10b981; }
.pv-statusBadge.Cancelled { background: #6b7280; }

.pv-taskStatusContainer {
  margin: 12px 0;
}

@media (max-width: 768px) {
  .pv-taskCard {
    padding: 50px 18px 18px;
  }
}

/* ================= KANBAN BOARD ================= */

.tm-boardWrapper {
  display: none;
  overflow-x: auto;
  padding-bottom: 10px;
}

.tm-board {
  display: flex;
  gap: 18px;
  min-width: max-content;
  max-height: 700px;
}

.tm-column {
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px;
  padding: 14px;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-column.Draft {
  background: #f3f3f3;
}

.tm-column.Pending {
  background: #fff1e6;
}

.tm-column.Open {
  background: #eff6ff;
}

.tm-column.Assigned {
  background: #f5edff;
}

.tm-column.Progressing {
  background: #fff9db;
}

.tm-column.Completed {
  background: #ecfdf5;
}

.tm-column.Cancelled {
  background: #f8fafc;
}

.tm-columnBody {
  display: grid;
  gap: 10px;
}

.tm-column h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-columnCount {
  background: #e5e7eb;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
}

.tm-taskCardMini {
  background: white;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-taskCardMini:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
}

.tm-taskTitleMini {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tm-taskMetaMini {
  font-size: 11px;
  color: #6b7280;
}

/* ================= GANTT BOARD ================= */

.tm-ganttWrapper {
  display: none;
  overflow-x: auto;
  padding-bottom: 10px;
}

.tm-gantt {
  display: flex;
  gap: 18px;
  min-width: max-content;
  max-height: 700px;
}

/* ================= TASK APPLIERS ================= */

.tm-appliersLayout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.tm-appliersPanel {
  display: block;
  gap: 20px;
  max-height: 2500px;
  margin-top: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.tm-appliersHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-toggleAppliers {
  background: transparent;
  border: none;
  outline: none;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tm-toggleAppliers.open {
  transform: rotate(180deg);
}

.tm-appliersList.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.tm-appliersPanel h3 {
  margin: 0px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.tm-appliersList {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.tm-applierMini {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 300px;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: 0.25s ease;
}

.tm-applyStatus {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.tm-applyStatus.pending {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

.tm-applyStatus.accepted {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.tm-applyStatus.assigned {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.tm-applyStatus.progressing {
  background: #fff7ed;
  border-color: #fdba74;
  color: #b45309;
}

.tm-applyStatus.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.tm-applyStatus.declined {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.tm-applyStatus.saved {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.tm-applyStatus.reported {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.tm-applierMini:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.tm-applierMini img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.tm-applierMiniContent {
  flex: 1;
}

.tm-applierMiniName {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

.tm-applierMiniSpeciality {
  font-size: 13px;
  color: #6b7280;
}

.tm-applierMiniSummary {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-fullCV {
  max-height: 600px;
  overflow: auto;
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  animation: fadeIn 0.25s ease;
}

.tm-fullCV-hobbies {
  font-size: 13px;
  color: #1f2937;
  margin-top: 10px;
}

.tm-fullCV-hobbies strong {
  font-size: 15px;
  color: black;
}

.tm-closeFullCV {
  float: right;
  background: white;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  font-size: 18px;
  margin: 0px 10px;
  cursor: pointer;
}

.tm-closeFullCV:hover {
  color: #ef4444;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .tm-appliersPanel {
    background: none;
    border: none;
    padding: 10px 0 0;
  }
}

/* =============================== CV KPIs ============================ */

.tm-kpi {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: 0.2s ease;
}

.tm-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.tm-kpiValue {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.tm-kpiLabel {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.tm-kpi.highlight {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
}

.tm-kpi.highlight .tm-kpiValue {
  color: white;
}

.tm-kpi.highlight .tm-kpiLabel {
  color: rgba(255,255,255,0.85);
}

.tm-applierProgress {
  height: 6px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.tm-progressBar {
  height: 100%;
  background: linear-gradient(135deg, #3178d3, #28a745);
  width: 0%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ================================= FULL CV ========================== */

.tm-fullCV-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tm-fullCV-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.tm-cvAction {
  border: 1px solid #e5e7eb;
  outline: none;
  background: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
}

.tm-cvAction:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.tm-cvAction.accept {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tm-cvAction.assign {
  color: #b453f2;
  border-color: #e9d5ff;
  background: #f5f3ff;
}

.tm-cvAction.decline {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.tm-cvAction.follow {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tm-cvAction.report {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

.tm-reportBox {
  display: grid;
  grid-template-columns: 1fr max-content;
  margin-bottom: 10px;
  gap: 8px;
  align-items: center;
  animation: fadeSlide 0.25s ease;
}

.tm-reportBox input,
.tm-reportBox textarea {
  padding: 4px 6px;
  min-height: 25px;
  max-height: 100px;
  font-size: small;
  resize: vertical;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  font-family: sans-serif;
  transition: all 0.25s ease;
  outline: none;
}

.tm-cancelReport {
  border: 1px solid #e5e7eb;
  background: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-cancelReport:hover {
  background: #f3f4f6;
}

.tm-submitReport {
  border: none;
  background: #b45309;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-submitReport:hover {
  background: #92400e;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================== APPLIER RECOMMENDATION KPIs =================== */

.tm-recoKpiGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tm-recoKpi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  animation: 0.2s ease;
}

.tm-recoKpi.strong {
  background: white;
  border-color: #bbf7d0;
  color: #15803d;
}

.tm-recoKpi.medium {
  background: white;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.tm-recoKpi.soft {
  background: white;
  border-color: #fde68a;
  color: #b45309;
}

/* =========================== ACCEPTED TEAM ========================== */

.tm-collaborationWrapper {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  align-items: stretch;
}

.tm-acceptedSection {
  display: flex;
  flex-direction: column;
  flex: 0 0 280px;
  padding: 16px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.tm-acceptedHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.tm-acceptedTitle {
  font-weight: 600;
  font-size: 16px;
}

.tm-openGroupChat {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: white;
  color: #2563eb;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-openGroupChat:hover {
  background: #2563eb;
  color: white;
}

.tm-openGroupChat.active-group {
  background: #eff6ff;
  color: #2563eb;
}

.tm-acceptedList {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-acceptedCard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 10px;
  background: white;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: 0.2s ease;
}

.tm-acceptedCard:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

.tm-acceptedCard.active {
  border: 1px solid #2563eb;
  background: #eaf1ff;
  box-shadow: 0 6px 16px rgba(37,99,235,0.15);
  transform: translateY(-1px);
}

.tm-acceptedInfo {
  display: flex;
  gap: 10px;
}

.tm-acceptedCard img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.tm-acceptedProfil {
  display: flex;
  flex-direction: column;
  align-self: center;
}

.tm-acceptedName {
  font-size: 14px;
  font-weight: 600;
}

.tm-acceptedSpec {
  font-size: 12px;
  color: #6b7280;
}

.tm-statusStar {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-bottom: 3px;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  color: #f59e0b;
  background: none;
  box-shadow: none;
  text-transform: capitalize;
}

.tm-statusStar.assigned { color: #9333ea; }
.tm-statusStar.progressing { color: #ea580c; }
.tm-statusStar.completed { color: #059669; }

.tm-statusStar i {
  font-size: 14px;
  vertical-align: middle;
  color: inherit;
}

.tm-applierNotification {
  display: block;
}

.tm-applierNotif {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 6px 8px;
  margin-top: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.tm-applierNotif.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #065f46;
}

.tm-applierNotif.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

.tm-applierNotif.progressing {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.tm-applierNotif.completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #065f46;
}

.tm-applierNotif i {
  font-size: 13px;
}

.tm-applierNotif button {
  border: none;
  outline: none;
  background: white;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 600;
}

.tm-applierNotif button:hover {
  background: rgba(0,0,0,0.05);
}

.tm-applierNotif.progressing button {
  color: #ea580c;
}

.tm-applierNotif.completed button {
  color: #059669;
}

/* ============================= CHAT LAYOUT =========================== */

.tm-chatContainer {
  flex: 1;
  min-width: 0;
}

.tm-chatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.tm-chatHeader-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-chatHeader-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.tm-chatHeader-info {
  display: flex;
  flex-direction: column;
}

.tm-chatHeader-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.tm-chatHeader-status {
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
}

.tm-chatHeader-status.awaiting {
  color: #6b7280;
}

.tm-chatHeader-status.muted {
  color: #f59e0b;
}

.tm-chatHeader-status.stopped {
  color: #ef4444;
}

.tm-chatHeader-flag {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-chatHeader-flag i {
  font-size: 18px;
}

.tm-chatHeader-actions {
  display: flex;
  gap: 6px;
}

.tm-chatAction {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.tm-chatAction i {
  font-size: 16px;
}

.tm-chatAction:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.06);
}

.tm-chatAction.open:hover {
  background: #eff6ff;
  color: #2563eb;
}

.tm-chatAction.mute:hover {
  background: #fef3c7;
  color: #d97706;
}

.tm-chatAction.stop:hover {
  background: #fee2e2;
  color: #dc2626;
}

.tm-chatBox {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  height: 420px;
  overflow: hidden;
}

.tm-chatMessages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f9fafb;
}

.tm-messageRow {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 80%;
}

.tm-messageRow.me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.tm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.tm-bubble {
  background: white;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 14px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.tm-messageRow.me .tm-bubble {
  background: #3178d3;
  color: white;
}

.tm-meta {
  font-size: 11px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.tm-time {
  font-size: 10px;
  margin-top: 6px;
  opacity: 0.6;
  text-align: right;
}

.tm-dateSeparator {
  display: flex;
  align-items: center;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin: 14px 30px;
}

.tm-dateSeparator::before,
.tm-dateSeparator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.tm-dateSeparator::before {
  margin-right: 12px; /* space between line and text */
}

.tm-dateSeparator::after {
  margin-left: 12px; /* space between text and line */
}

.tm-chatEmpty {
  margin: auto;
  text-align: center;
  color: #6b7280;
}

.tm-chatEmpty i {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.tm-chatInput {
  display: flex;
  border-top: 1px solid #e5e7eb;
  background: white;
}

.tm-chatInput input {
  flex: 1;
  padding: 14px;
  border: none;
  outline: none;
  font-size: 14px;
}

.tm-chatInput button {
  padding: 0 18px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-weight: 500;
}

.tm-loadMoreWrapper {
  display: none;
}

.tm-loadMoreBtn {
  display: flex;
  justify-self: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f0f2f5;
  border: none;
  outline: none;
  border-radius: 8px;
  color: #1877f2;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tm-loadMoreBtn:hover {
  background: #e4e6e9;
  transform: translateY(-1px);
}

.tm-loadMoreBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tm-loadMoreBtn i {
  font-size: 18px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ri-spin {
  animation: spin 1s linear infinite;
}

@media (max-width: 900px) {

  .tm-collaborationWrapper {
    flex-direction: column;
  }

  .tm-acceptedSection {
    flex: unset;
  }

  .tm-chatBox {
    height: 60vh;
  }
}

@media (max-width: 600px) {

  .tm-acceptedCard {
    padding: 12px;
  }

  .tm-chatBox {
    border-radius: 12px;
  }

  .tm-chatMessages {
    padding: 14px;
  }

  .tm-chatInput input {
    font-size: 16px;
  }
}