.kanban-board {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  overflow-x: auto;
  background: transparent;
}

/* Columna Kanban */
.kanban-column {
  background: #1e1e2f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  width: 300px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: #25253b;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.column-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  opacity: 1;
}
.column-header .col-icon {
  filter: none;
  width: 24px;
  height: 24px;
}
.add-chat-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.add-chat-btn:hover {
  opacity: 1;
}

.column-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(30,30,47,0.4);
  min-height: 100px;
}

/* Tarjeta Kanban moderna */
.kanban-card {
  display: flex;
  align-items: flex-start;
  background: rgba(34, 40, 49, 0.90);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  padding: 10px 14px 10px 11px;
  margin-bottom: 12px;
  min-height: 60px;
  position: relative;
  cursor: grab;
  transition: box-shadow 0.18s, background 0.18s, border-color 0.15s;
  border: 3.5px solid #353951;  /* <--- NUEVO BORDE más grueso, color sutil tipo GL */
}
.kanban-card:active {
  cursor: grabbing;
  background: rgba(40, 46, 60, 1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  border-color: #467cff;       /* Azul más visible al arrastrar */
}

.card-avatar-section {
  margin-right: 11px;
  align-items: center;
}
.card-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 2px solid #222839;
  box-shadow: 0 2px 7px rgba(0,0,0,0.11);
}
.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-title-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 6px;
  font-size: 0.96em;           /* MÁS PEQUEÑO */
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.card-flag {
  width: 18px;
  height: 14px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
  object-fit: cover;
  box-shadow: 0 0 2px #0002;
  border: 1px solid #ddd;
}

.card-title-row .alias-view {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
  font-size: 1em;
  font-weight: 500;
}

.card-title-row .edit-alias-btn {
  flex-shrink: 0;
  margin-left: 8px;
  margin-right: 0;
  font-size: 1em;
  color: #f7b731;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.83;
  transition: color 0.15s, opacity 0.15s;
  align-self: flex-start;
}
.card-title-row .edit-alias-btn:hover { color: #ff9800; opacity:1; }

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.card-num {
  color: #b6bac5;
  font-size: 0.79em;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62%;
}
.card-time {
  color: #b7b9c6;
  font-size: 0.79em;
  min-width: 64px;
  text-align: right;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.delete-col-btn:hover {
    color: #fff;
    background: #c00;
    border-radius: 50%;
}
.card-msg {
    color: #e2e5ed;
    font-size: 0.98em;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Muestra máximo 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Permite saltos de línea */
    min-height: 2.5em;
    font-size: 0.95em;
    font-weight: 400;
    max-width: 90%;
    letter-spacing: 0.01em;
    margin-top: 3px;
}
.card-unread {
  position: absolute;
  top: 30px;
  right: 22px;
  background: #00E091;
  color: #fff;
  border-radius: 10px;
  padding: 0.5px 8px;
  font-size: 0.89em;
  font-weight: 600;
  min-width: 19px;
  text-align: center;
  box-shadow: 0 0 5px #00e09144;
  z-index: 2;
}
.alias-edit input[type="text"] {
  font-size: 1em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #bbb;
  outline: none;
}
/* Modal flotante para detalle de chat */
.kanban-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.kanban-modal > * {
  background: #1e1e2f;
  width: 80%;
  height: 80%;
  overflow: auto;
  border-radius: 8px;
  padding: 1rem;
  color: #f0f0f0;
}
/* Scrollbar personalizada (opcional) */
.kanban-board, .column-list {
  scrollbar-width: thin;
  scrollbar-color: #444 #222;
}
.kanban-board::-webkit-scrollbar,
.column-list::-webkit-scrollbar {
  height: 7px; width: 7px;
  background: #222;
}
.kanban-board::-webkit-scrollbar-thumb,
.column-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 6px;
}
/* Drag & drop: efecto fantasma */
.sortable-ghost {
  opacity: 0.5 !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.kanban-board {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    overflow-x: auto;
    min-height: 80vh;
    gap: 12px; /* Espacio entre columnas */
}
.kanban-column {
    flex: 1 1 0;
    min-width: 220px;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}
/* Responsive para móvil: columnas más angostas y tarjetas full ancho */
@media (max-width: 600px) {
  .kanban-board { gap: 0.5rem; padding: 0.5rem; }
  .kanban-column { width: 96vw; min-width: 240px; }
  .kanban-card { padding: 8px 5px; }
  .card-avatar { width: 32px; height: 32px; }
}
