/* Kanban Board Styles - HS CRM */

.pipeline-container {
    display: flex;
    height: calc(100vh - 128px);
    min-height: 520px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 20px 24px 20px;
    background: #f1f5f9;
    gap: 16px;
    align-items: stretch;
}

.pipeline-container::-webkit-scrollbar {
    height: 8px;
}
.pipeline-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}
.pipeline-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.pipeline-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Coluna do Kanban */
.kanban-column {
    width: 310px;
    min-width: 310px;
    max-width: 310px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.kanban-column.drag-over {
    background: #eef2ff !important;
    border: 2px dashed #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

.column-header {
    padding: 12px 14px;
    border-bottom: 2px solid;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #ffffff;
    border-radius: 14px 14px 0 0;
}

.column-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.column-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.column-header-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.column-total-val {
    color: #059669;
    font-weight: 700;
}

.kanban-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
}

.kanban-body::-webkit-scrollbar {
    width: 6px;
}
.kanban-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Área vazia convidativa para Drop */
.kanban-empty-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 30px 14px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    margin: auto 0;
    pointer-events: none;
}

.kanban-column.drag-over .kanban-empty-drop-zone {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    transform: scale(1.02);
}

/* Card do Negócio / Lead */
.deal-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary-color);
    position: relative;
    user-select: none;
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.deal-card.dragging {
    opacity: 0.4 !important;
    cursor: grabbing !important;
    transform: scale(0.98);
}

.deal-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    margin-bottom: 4px;
    padding-right: 20px;
    line-height: 1.35;
    word-break: break-word;
}

.deal-value {
    font-size: 0.92rem;
    color: #10b981;
    font-weight: 700;
    margin-bottom: 6px;
}

.deal-phone-link {
    color: #15803d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 197, 94, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.deal-phone-link:hover {
    background: rgba(34, 197, 94, 0.22);
}

.deal-notes-box {
    font-size: 0.77rem;
    color: #475569;
    background: #f8fafc;
    border-left: 3px solid #0ea5e9;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 6px 0;
    font-style: italic;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.deal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Barra de ação rápida na base do Card */
.deal-quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deal-stage-quick-select {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    outline: none;
    max-width: 105px;
}

.deal-stage-quick-select:hover {
    border-color: #6366f1;
    color: #4f46e5;
}

.delete-card {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.15s, color 0.15s;
}

.delete-card:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Botão Novo Negócio no rodapé da coluna */
.btn-add-deal {
    width: 100%;
    padding: 8px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-deal:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Animações e Toasts */
@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}