/* KANBAN.CSS - Kanban board styles */

.kanban{
  display:grid; 
  grid-template-columns:repeat(5, 1fr); 
  gap:12px; 
  flex:1;
  min-height:0;
  overflow:hidden;
  overflow-x:hidden;
}
.kanban-column{
  background:var(--chip);
  border-radius:12px;
  padding:0;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
.kanban-header{
  position:sticky;
  top:0;
  z-index:5;
  background:var(--chip);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  border-radius:12px 12px 0 0;
  border-bottom:1px solid var(--stroke);
  flex-shrink:0;
}
.kanban-body{
  padding:10px;
  overflow-y:auto;
  flex:1;
  min-height:0;
}
.kanban-body::-webkit-scrollbar{width:6px;}
.kanban-body::-webkit-scrollbar-track{background:#f1f1f1; border-radius:10px;}
.kanban-body::-webkit-scrollbar-thumb{background:#d1d5db; border-radius:10px;}
.kanban-body::-webkit-scrollbar-thumb:hover{background:#9ca3af;}
.kanban-title{font-size:13px; font-weight:700; text-transform:uppercase; color:var(--text)}
.kanban-count{
  background:#fff;
  color:var(--text);
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
}
.kanban-card{
  background:#fff;
  border-radius:10px;
  padding:10px;
  padding-bottom:8px;
  margin-bottom:8px;
  border:2px solid var(--stroke);
  cursor:move;
  transition:all 0.2s;
  position:relative;
}
.kanban-card.has-driver {
  padding-bottom: 38px;
}
.kanban-card.has-comment-indicator {
  padding-bottom: 24px;
}
.kanban-card.has-driver.has-comment-indicator {
  padding-bottom: 38px;
}
/* Дополнительные отступы для карточек со слотами (статус assigned) */
.kanban-card[data-status="assigned"] {
  padding-bottom: 6px;
}
.kanban-card[data-status="assigned"].has-driver {
  padding-bottom: 36px;
}
/* Дополнительные отступы для карточек в работе (со слотами + прогресс баром) */
.kanban-card[data-status="in_progress"] {
  padding-bottom: 10px;
}
.kanban-card[data-status="in_progress"].has-driver {
  padding-bottom: 46px;
}
/* Дополнительные отступы для завершенных */
.kanban-card[data-status="completed"] {
  padding-bottom: 8px;
}
.kanban-card[data-status="completed"].has-driver {
  padding-bottom: 36px;
}
.kanban-card[data-priority="express"]{border-color:#ef4444}
.kanban-card.reserved{border-color:#9ca3af; border-width:3px}
.kanban-card[data-type="REF"]:not([data-priority="express"]):not(.reserved){border-color:#2563eb}
.kanban-card[data-type="DRY"]:not([data-priority="express"]):not(.reserved){border-color:#fb923c}
.kanban-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1); transform:translateY(-2px)}
.kanban-card.dragging{opacity:0.5; transform:rotate(2deg)}
.kanban-column.drag-over{background:rgba(79,70,229,0.1); border:2px dashed var(--indigo)}
.kanban-card-title{font-size:13px; font-weight:700; margin-bottom:6px}
.kanban-card-info{font-size:11px; color:var(--muted); margin-bottom:4px}

.drivers-panel{
  display:none;
}

.priority-badge{
  position:absolute;
  top:6px;
  right:6px;
  padding:3px 7px;
  border-radius:6px;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.5px;
  line-height:1;
}
.priority-badge.express{
  background:var(--warning);
  color:#fff;
}
.priority-badge.vip{
  background:var(--danger);
  color:#fff;
}
.priority-badge.reserved{
  background:#f97316;
  color:#fff;
}
.priority-badge.normal{display:none}

/* Зеленая рамка вокруг имени водителя на Канбан доске - как на экране Обзор */
.driver-badge-kanban {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
}
.driver-badge-kanban:hover {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

@media (max-width: 960px){
  .kanban{grid-template-columns:repeat(2, 1fr)}
}
@media (max-width: 640px){
  .kanban{grid-template-columns:1fr}
}

/* === Массовые комментарии === */
#massCommentButtons {
  display: flex !important;
}

.mass-comment-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #9ca3af;
  background-color: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.mass-comment-btn:hover {
  border-color: #6b7280;
  background-color: #f9fafb;
}

.mass-comment-btn svg {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

.mass-comment-btn.active {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.mass-comment-btn.active svg {
  color: #3b82f6;
}

/* Кнопка написать текст */
.write-comment-btn {
  padding: 8px 16px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s;
  display: none;
  white-space: nowrap;
}

.write-comment-btn.show {
  display: block;
}

.write-comment-btn:hover {
  background-color: #2563eb;
}

/* Индикатор комментария */
.comment-indicator {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid #ef4444;
  border-radius: 50%;
  background-color: transparent;
  transition: all 0.2s;
  z-index: 5;
}

.comment-indicator.has-comment {
  background-color: #dcfce7;
  border-color: #bbf7d0;
}

.comment-indicator.selected {
  background-color: #dcfce7;
  border-color: #bbf7d0;
}

/* Режим выбора */
.kanban-card.selection-mode {
  cursor: pointer;
  user-select: none;
}

.kanban-card.selection-mode:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

/* Progress bar wrapper: base line + filled part + dots on top
   - base line spans full width minus 8px inset on both sides
   - filled line width is computed inline via style attribute from JS
   - dots sit above the line; fill stops 5px before each dot to prevent overlap */
.progress-wrapper{position:relative; width:100%; padding:0 8px; box-sizing:border-box; height:20px}
.progress-line-base{position:absolute; left:8px; right:8px; top:50%; height:2px; background:#e5e7eb; transform:translateY(-50%); border-radius:2px}
.progress-line-fill{position:absolute; left:8px; top:50%; height:2px; background:var(--green); transform:translateY(-50%); border-radius:2px; transition:width 0.3s ease;}
.progress-dots{position:relative; display:flex; justify-content:space-between; align-items:center; height:100%; z-index:2}
.progress-dot{width:10px; height:10px; border-radius:50%; background:#fff; border:2px solid #d1d5db; box-sizing:border-box; transition:all 0.3s ease;}
.progress-dot.completed{background:var(--green); border-color:var(--green)}

