/* ══════════════════════════════════════════════════════
   TEAMS.CSS — Vista de Teams · Puerto de Chancay
══════════════════════════════════════════════════════ */

/* ── BOARD ── */
.teams-board {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 24px;
  min-height: 500px;
}

.teams-dynamic {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
  flex-wrap: wrap;
}

/* ── COLUMNA ── */
.team-col {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 16px;
  width: 280px;
  min-width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.team-col:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Columna sin asignar */
.unassigned-col {
  border-style: dashed;
  border-color: #CBD5E1;
  background: #FAFBFC;
}

/* ── HEADER DE COLUMNA ── */
.team-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  gap: 8px;
}

.team-col-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.team-avatar-gray {
  background: #F1F5F9;
  color: #94A3B8;
  border: 1.5px solid #E2E8F0;
}

.team-col-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--texto-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-col-count {
  display: block;
  font-size: 11px;
  color: var(--gris-texto);
  margin-top: 1px;
}

.team-col-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Descripción del team */
.team-col-desc {
  font-size: 11.5px;
  color: var(--gris-texto);
  padding: 0 16px 10px;
  margin: 0;
  line-height: 1.5;
  border-bottom: 1px solid var(--gris-borde);
}

/* ── BUSCADOR EN COLUMNA ── */
.col-search {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gris-borde);
}
.col-search svg {
  position: absolute;
  left: 22px; top: 50%;
  transform: translateY(-50%);
  color: #B0B8C4;
  pointer-events: none;
}
.col-search input {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--fuente);
  background: var(--gris-fondo);
  color: var(--texto-main);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.col-search input:focus {
  border-color: var(--azul-medio);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.10);
  background: var(--blanco);
}
.col-search input::placeholder { color: #C0C8D2; }

/* ── DROP ZONE ── */
.team-drop-zone {
  padding: 10px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s;
  border-radius: 0 0 16px 16px;
}

.team-drop-zone.drag-over {
  background: rgba(24,95,165,0.05);
  outline: 2px dashed rgba(24,95,165,0.30);
  outline-offset: -4px;
  border-radius: 8px;
}

/* Empty state dentro de zona */
.drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 12px;
  color: #B0B8C4;
  font-size: 12px;
  text-align: center;
  flex: 1;
}

/* ── CARD COLABORADOR ── */
.colab-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 10px;
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
  user-select: none;
}
.colab-card:hover {
  border-color: rgba(24,95,165,0.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.colab-card:active { cursor: grabbing; }

.colab-card.dragging {
  opacity: 0.45;
  transform: scale(0.97);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.colab-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul-medio), var(--azul-claro));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.colab-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.colab-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--texto-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.colab-cargo {
  font-size: 11px;
  color: var(--gris-texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.colab-drag-handle {
  color: #CBD5E1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.colab-card:hover .colab-drag-handle { color: #94A3B8; }

/* ── COLOR PICKER ── */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.color-opt {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.color-opt:hover {
  transform: scale(1.15);
}
.color-opt.active {
  border-color: var(--texto-main);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.10);
  transform: scale(1.1);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .teams-board    { flex-direction: column; }
  .teams-dynamic  { flex-direction: column; }
  .team-col       { width: 100%; min-width: unset; }
  .unassigned-col { width: 100%; min-width: unset; }
}
