/* === KANBAN BOARD ADDITIONAL STYLES === */
/* Adicione este CSS ao seu app.css ou como um arquivo separado */

/* === DRAG AND DROP ENHANCEMENTS === */
.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
}

.column-body.drag-over {
    background: rgba(78, 124, 210, 0.08) !important;
    border: 2px dashed var(--primary-color) !important;
    border-radius: 12px !important;
}

    .column-body.drag-over::before {
        content: "Solte aqui";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: var(--primary-color);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.9rem;
        z-index: 10;
        pointer-events: none;
    }

/* === KANBAN BOARD ANIMATIONS === */
.kanban-card {
    animation: slideInCard 0.3s ease-out;
}

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kanban-column {
    animation: slideInColumn 0.4s ease-out;
}

@keyframes slideInColumn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === HOVER EFFECTS === */
.kanban-card:hover .card-status-indicator {
    width: 6px;
    transition: width 0.3s ease;
}

.kanban-card:hover .company-name {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* === STATUS SPECIFIC STYLES === */
.kanban-card.novo:hover {
    border-color: #2196F3;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
}

.kanban-card.qualificado:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

.kanban-card.proposta:hover {
    border-color: #FF9800;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.15);
}

.kanban-card.negociando:hover {
    border-color: #9C27B0;
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.15);
}

.kanban-card.fechado:hover {
    border-color: #2E7D32;
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}

.kanban-card.perdido:hover {
    border-color: #F44336;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.15);
}

/* === COLUMN HEADER ENHANCEMENTS === */
.column-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-opacity=".2"/><stop offset="100%" stop-opacity="0"/></radialGradient></defs><circle cx="10" cy="10" r="8" fill="url(%23a)"/><circle cx="30" cy="5" r="6" fill="url(%23a)"/><circle cx="60" cy="15" r="4" fill="url(%23a)"/><circle cx="80" cy="8" r="7" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.column-header {
    position: relative;
    overflow: hidden;
}

/* === LOADING STATES === */
.kanban-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

    .kanban-card.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: shimmer 1.5s infinite;
    }

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
    .kanban-container {
        gap: 0;
        border-radius: 12px;
        overflow: hidden;
    }

    .kanban-column {
        border-radius: 0;
    }

        .kanban-column:first-child {
            border-radius: 12px 12px 0 0;
        }

        .kanban-column:last-child {
            border-radius: 0 0 12px 12px;
        }

    .column-header {
        padding: 1rem;
        min-height: 70px;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-count {
        font-size: 0.8rem;
    }

    .column-value {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* === ACCESSIBILITY === */
.kanban-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.quick-action-btn:focus {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .kanban-card {
        border: 2px solid #000;
    }

    .card-status-indicator {
        width: 6px;
    }

    .column-header {
        border: 2px solid #fff;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .kanban-card,
    .kanban-column,
    .card-status-indicator,
    .kanban-card::after {
        animation: none !important;
        transition: none !important;
    }

        .kanban-card:hover {
            transform: none !important;
        }
}

/* === PRINT STYLES === */
@media print {
    .kanban-board {
        break-inside: avoid;
    }

    .kanban-container {
        display: block !important;
    }

    .kanban-column {
        break-inside: avoid;
        margin-bottom: 2rem;
    }

    .quick-actions,
    .card-menu {
        display: none !important;
    }
}

/* === DARK MODE SUPPORT === */
/*@media (prefers-color-scheme: dark) {
    .kanban-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #f7fafc;
    }

        .kanban-card:hover {
            background: #374151;
            border-color: var(--primary-color);
        }

    .column-body {
        background: #1a202c;
    }

    .empty-column {
        color: #a0aec0;
    }

    .contact-item,
    .date-text {
        color: #cbd5e0;
    }

    .value-item {
        background: #374151;
        border-color: #4a5568;
    }

    .card-footer {
        border-color: #4a5568;
    }
}*/

/* === PERFORMANCE OPTIMIZATIONS === */
.kanban-container {
    contain: layout style;
}

.kanban-column {
    contain: layout;
}

.kanban-card {
    contain: layout style;
    will-change: transform;
}

/* === CUSTOM SCROLLBAR FOR WEBKIT === */
.column-body::-webkit-scrollbar {
    width: 8px;
}

.column-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.column-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

    .column-body::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }

/* === TOOLTIPS === */
[title] {
    position: relative;
}

    [title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        white-space: nowrap;
        z-index: 1000;
        pointer-events: none;
    }

    [title]:hover::before {
        content: '';
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border: 4px solid transparent;
        border-top-color: rgba(0, 0, 0, 0.8);
        z-index: 1000;
        pointer-events: none;
    }

/* === EMPTY STATE ANIMATIONS === */
.empty-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* === NOTIFICATION STYLES === */
.status-change-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === FOCUS MANAGEMENT === */
.kanban-card[tabindex]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    z-index: 10;
}

/* === GRID LAYOUT FALLBACK === */
@supports not (display: grid) {
    .kanban-container {
        display: flex;
        flex-wrap: wrap;
    }

    .kanban-column {
        flex: 1;
        min-width: 250px;
        margin: 0 8px;
    }
}
/* === KANBAN CARD === */
.kanban-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.75rem;
    display: 1;
}

    .kanban-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
/*        border-color: var(--primary-color);*/
    }

        .kanban-card:hover .quick-actions {
            opacity: 1;
            visibility: visible;
        }

/* === STATUS INDICATOR === */
.card-status-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

    .card-status-indicator.novo {
        background: linear-gradient(180deg, #2196F3, #21CBF3);
    }

    .card-status-indicator.qualificado {
        background: linear-gradient(180deg, #4CAF50, #66BB6A);
    }

    .card-status-indicator.proposta {
        background: linear-gradient(180deg, #FF9800, #FFB74D);
    }

    .card-status-indicator.negociando {
        background: linear-gradient(180deg, #9C27B0, #BA68C8);
    }

    .card-status-indicator.fechado {
        background: linear-gradient(180deg, #2E7D32, #4CAF50);
    }

    .card-status-indicator.perdido {
        background: linear-gradient(180deg, #F44336, #EF5350);
    }

/* === CARD HEADER === */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1rem 0.75rem 1.25rem;
    gap: 0.5rem;
    margin-left: 2px;
}

.company-info {
    max-width: 230px;
    min-width: 0;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.company-text {
    max-width: 290px; /* ou a largura que você quiser */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.company-icon {
    color: var(--primary-color) !important;
    font-size: 1rem !important;
    flex-shrink: 0;
}

.search-term {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(78, 124, 210, 0.08);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    width: fit-content;
}

.card-menu {
    flex-shrink: 0;
}

/* === CONTACT SECTION === */
.contact-section {
    padding: 0 1rem 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    max-width: 230px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.contact-icon {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    flex-shrink: 0;
}

.contact-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .contact-text.email {
        max-width: 150px;
    }

/* === VALUE SECTION === */
.value-section {
    padding: 0 1rem 0.75rem 1.25rem;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

    .value-item.proposal {
        background: rgba(255, 152, 0, 0.05);
        border-color: rgba(255, 152, 0, 0.2);
    }

    .value-item.closed {
        background: rgba(46, 125, 50, 0.05);
        border-color: rgba(46, 125, 50, 0.2);
    }

.value-icon {
    color: var(--success-color) !important;
    font-size: 1rem !important;
}

.value-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    flex: 1;
}

/* === CARD FOOTER === */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem 1rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    margin-left: 2px;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.date-icon {
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
}

.date-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-chip {
    font-size: 0.7rem !important;
    height: 20px !important;
}

/* === QUICK ACTIONS === */
.quick-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.quick-action-btn {
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
}

/* === DIALOG STYLES === */
.detail-section {
    margin-bottom: 1.5rem;
}

    .detail-section h4 {
        margin: 0 0 1rem 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    font-size: 0.9rem;
    line-height: 1.4;
}

    .detail-item strong {
        color: var(--text-primary);
        margin-right: 0.5rem;
    }

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .kanban-card {
        margin-bottom: 0.5rem;
    }

    .card-header {
        padding: 0.75rem 0.75rem 0.5rem 1rem;
    }

    .contact-section,
    .value-section {
        padding: 0 0.75rem 0.5rem 1rem;
    }

/*    .card-footer {
        padding: 0.5rem 0.75rem 0.75rem 1rem;
    }*/

    .company-name {
        font-size: 0.9rem;
    }

    .contact-item {
        font-size: 0.75rem;
    }

    .quick-actions {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        backdrop-filter: none;
        padding: 0;
        margin-top: 0.5rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

/*    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }*/

    .contact-text.email {
        max-width: none;
    }
}

/* INCLUSOS 04-07-2025 */
/* === PERFORMANCE ALERT === */
.performance-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* === LOAD MORE === */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px;
    gap: 0.5rem;
}

    .load-more-container span {
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

/* === EXISTING CSS (mantém todo o CSS anterior) === */
.kanban-board {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.kanban-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #e2e8f0;
    min-height: 70vh;
}

.kanban-column {
    background: white;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}

.column-header {
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 100px;
}

    .column-header.novo {
        background: linear-gradient(135deg, #2196F3, #21CBF3);
    }

    .column-header.qualificado {
        background: linear-gradient(135deg, #4CAF50, #66BB6A);
    }

    .column-header.proposta {
        background: linear-gradient(135deg, #FF9800, #FFB74D);
    }

    .column-header.negociando {
        background: linear-gradient(135deg, #9C27B0, #BA68C8);
    }

    .column-header.fechado {
        background: linear-gradient(135deg, #2E7D32, #4CAF50);
    }

.header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    color: white !important;
    font-size: 1.5rem !important;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.header-count {
    font-size: 0.85rem;
    opacity: 0.9;
}

.column-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.column-body {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    min-height: 0;
    background: #fafbfc;
}

    .column-body::-webkit-scrollbar {
        width: 6px;
    }

    .column-body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .column-body::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        .column-body::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

    .column-body.drag-over {
        background: rgba(78, 124, 210, 0.05);
        border: 2px dashed var(--primary-color);
        border-radius: 12px;
    }

.empty-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    height: 300px;
}

.empty-icon {
    font-size: 3rem !important;
    color: #ddd !important;
    margin-bottom: 1rem;
}

.empty-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.empty-subtitle {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

.pipeline-summary {
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-icon {
    color: var(--primary-color) !important;
    font-size: 1.5rem !important;
}

.summary-header h4 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-label-white {
    display: block;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

    .stat-value.primary {
        color: var(--primary-color);
    }

    .stat-value.warning {
        color: var(--warning-color);
    }

    .stat-value.success {
        color: var(--success-color);
    }

    .stat-value.accent {
        color: var(--accent-color);
    }

.metrics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid;
    border-left-color: #4E7CD2;
}

    .metric-card.novo {
        border-left-color: #2196F3;
    }

    .metric-card.qualificado {
        border-left-color: #4CAF50;
    }

    .metric-card.proposta {
        border-left-color: #FF9800;
    }

    .metric-card.negociando {
        border-left-color: #9C27B0;
    }

    .metric-card.fechado {
        border-left-color: #2E7D32;
    }

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
}

    .metric-icon.novo {
        background: linear-gradient(135deg, #2196F3, #21CBF3);
    }

    .metric-icon.qualificado {
        background: linear-gradient(135deg, #4CAF50, #66BB6A);
    }

    .metric-icon.proposta {
        background: linear-gradient(135deg, #FF9800, #FFB74D);
    }

    .metric-icon.negociando {
        background: linear-gradient(135deg, #9C27B0, #BA68C8);
    }

    .metric-icon.fechado {
        background: linear-gradient(135deg, #2E7D32, #4CAF50);
    }

.metric-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-title {
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.loading-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

/* === RESPONSIVIDADE === */
@media (max-width: 1400px) {
    .kanban-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .kanban-container {
        grid-template-columns: repeat(2, 1fr);
        min-height: 60vh;
    }

    .kanban-column {
        min-height: 60vh;
    }
}

@media (max-width: 768px) {
    .kanban-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .kanban-column {
        min-height: 400px;
    }

    .column-header {
        padding: 1rem;
        min-height: 80px;
    }

    .header-info {
        flex-direction: row;
        align-items: center;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }

    .column-body {
        padding: 0.75rem;
    }

    .empty-column {
        padding: 2rem 1rem;
        height: 200px;
    }
}