/* ========== KANBAN FULL-SCREEN LAYOUT ========== */
#panel-kanban {
  position: absolute;
  top: 0; left: 48px;
  right: 0; bottom: 0;
  display: none;
  flex-direction: row;
  background: var(--bg);
  z-index: 10;
}

.kanban-inbox {
  width: 270px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.kanban-inbox-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kanban-inbox-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.kanban-inbox-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text1);
}

.kanban-inbox-count {
  background: var(--surface2);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

.kanban-inbox-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.kanban-inbox-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text1);
  font-size: 12px;
  width: 100%;
}

.kanban-inbox-list {
  flex: 1;
  overflow-y: auto;
}

.kanban-inbox-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kanban-inbox-item:hover { background: var(--surface1); }
.kanban-inbox-item.active { background: var(--surface1); }

.kinbox-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kinbox-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

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

.kinbox-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kinbox-msg {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kinbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kinbox-time {
  font-size: 10px;
  color: var(--text2);
}

.kinbox-unread {
  background: #22c55e;
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.kinbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.15s;
}

.kanban-inbox-item:hover .kinbox-actions { opacity: 1; }

.kinbox-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text2);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.kinbox-icon-btn:hover {
  background: var(--surface2);
  color: var(--text1);
}

/* ========== BOARD AREA ========== */
.kanban-board-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.kanban-board-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kanban-board-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text1);
  margin-right: auto;
}

.kanban-global-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  width: 200px;
}

.kanban-global-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text1);
  font-size: 12px;
  width: 100%;
}

.kanban-add-col-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.kanban-add-col-btn:hover { opacity: 0.85; }

.kanban-scroll-area {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.kanban-scroll-area::-webkit-scrollbar { height: 6px; }
.kanban-scroll-area::-webkit-scrollbar-track { background: transparent; }
.kanban-scroll-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ========== COLUMNS ========== */
.kanban-col {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--surface1);
  border-radius: 10px;
  max-height: calc(100vh - 120px);
  border: 1px solid var(--border);
  overflow: hidden;
}

.kanban-col-header {
  padding: 12px 12px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  min-width: 0;
}

.kanban-col-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-width: 0;
}

.kanban-col-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.kanban-col-count {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 11px;
}

.kanban-col-actions {
  display: flex;
  gap: 4px;
}

.kanban-col-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text2);
  transition: background 0.15s, color 0.15s;
}
.kanban-col-action-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.kanban-col-action-btn.danger:hover { background: #ef4444; border-color: #ef4444; }

.kanban-col-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
}

.kanban-col-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text1);
  font-size: 11px;
  width: 100%;
}

.kanban-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
  width: 100%;
  min-width: 0;
}

.kanban-col-body::-webkit-scrollbar { width: 3px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.kanban-col-body.drag-over {
  background: rgba(99,102,241,0.05);
  outline: 2px dashed var(--primary);
  border-radius: 6px;
}

/* ========== CARDS ========== */
.kcard {
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px;
  cursor: grab;
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, transform 0.15s;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.kcard:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.kcard.dragging { opacity: 0.35; cursor: grabbing; }

.kcard-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
}

.kcard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.kcard-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text1);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.kcard-unread {
  background: #22c55e;
  color: white;
  border-radius: 10px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.kcard-msg {
  font-size: 11px;
  color: var(--text2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-bottom: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.kcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 4px;
}

.kcard-time {
  font-size: 10px;
  color: var(--text2);
}

.kcard-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.kcard-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text2);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}

.kcard-btn:hover {
  background: var(--surface1);
  color: var(--text1);
}

.kcard-btn.primary:hover {
  background: var(--primary);
  color: white;
}

.kcol-empty {
  text-align: center;
  color: var(--text2);
  font-size: 12px;
  padding: 24px 12px;
  opacity: 0.6;
}
