.crm-main-container {
    padding: 20px;
}

.pipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.pipe-card {
    background: linear-gradient(135deg,
            rgba(var(--pipe-color-rgb), 0.12),
            rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    min-height: 180px;
    background-color: var(--card-bg) !important;
}

/* Variáveis Locais do Módulo */
:root {
    --dark-gray-ui-rgb: 30, 42, 58;
}

.pipe-card:hover {
    background: linear-gradient(135deg,
            rgba(var(--pipe-color-rgb), 0.18),
            rgba(255, 255, 255, 0.05));
    border-color: var(--pipe-color);
    transform: translateY(-5px);
    box-shadow: 0 0 0 1px var(--pipe-color),
        0 10px 30px rgba(var(--pipe-color-rgb), 0.25);
}

.pipe-color-bar {
    height: 4px;
    width: 100%;
    background: var(--pipe-color);
}

.pipe-card-body {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px;
}


.pipe-card>div:not(.pipe-color-bar) {
    padding: 24px;
}

.pipe-card>div:first-of-type:not(.pipe-color-bar) {
    padding-top: 20px;
}

.pipe-card-icon {
    font-size: 2rem;
    background: rgba(var(--pipe-color-rgb), 0.15);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.pipe-card-content {
    flex: 1;
}

.pipe-card-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.pipe-card-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.pipe-card-meta {
    margin-top: 8px;
}

.card-count-badge {
    background: rgba(var(--pipe-color-rgb), 0.15);
    color: var(--pipe-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}


/* Kanban View */
.kanban-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative; /* Para o dropdown de exportação */
}

/* Kanban View Header Actions Alignment Fix */
.header-actions button {
    position: relative !important;
    overflow: visible !important; /* Importante para animações não cliparem */
}

.export-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px); 
    left: 0; /* Alinhado à esquerda do BOTÃO onde foi anexado */
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.export-dropdown-menu button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.export-dropdown-menu button:hover {
    background: var(--glass-hover);
    color: var(--accent);
}

.kanban-phases {
    display: flex;
    gap: 20px;
    padding: 20px 40px;
    overflow-x: auto;
    flex: 1;
    align-items: flex-start;
}

.kanban-column {
    min-width: 300px;
    max-width: 400px;
    flex: 1 0 300px; /* Cresce, mas tem base de 300px */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    transition: var(--transition);
}

.kanban-column:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.column-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.column-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-count {
    font-size: 0.75rem;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
}

.cards-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    min-height: 50px;
    max-height: calc(100vh - 320px); /* Hard limit viewport constraint to force inner scroll! */
    flex: 1 1 auto;
}

.cards-container.drag-over {
    background: rgba(var(--accent-rgb), 0.05);
    outline: 2px dashed var(--accent);
    outline-offset: -4px;
    border-radius: 12px;
}

.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    user-select: none;
}

.kanban-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 10px rgba(108, 99, 255, 0.2);
    z-index: 2;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.kanban-header {
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.kanban-actions {
    margin-left: auto;
    display: flex;
    gap: 12px;
}

/* Regras de exibição das abas de configuração */
.config-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.config-tabs button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.config-tabs button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.config-tabs button.active {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
    border-bottom: 2px solid var(--accent);
    border-radius: 8px 8px 0 0;
}

/* V3: Kanban Toolbar */
.kanban-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px 20px 40px;
    gap: 20px;
    background: transparent;
    flex-wrap: wrap;
}

.toolbar-search {
    flex: 1;
    min-width: 300px;
}

.toolbar-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.toolbar-search input:focus {
    background: rgba(var(--accent-rgb), 0.05) !important;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.1);
}

.toolbar-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar-filters select.small {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.05) !important;
    cursor: pointer;
}

.toolbar-filters select:hover {
    border-color: var(--accent);
}

#btn-clear-filters {
    color: var(--text-muted);
    opacity: 0.7;
    transition: var(--transition);
}

#btn-clear-filters:hover {
    opacity: 1;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.kanban-board {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 20px 40px;
    overflow-x: auto;
    overflow-y: visible !important; /* Forces layout to defer to native site scrollbar */
    align-items: stretch;
    height: auto; /* Natural growth */
    scroll-behavior: smooth;
}

/* Kanban Drag Scroll */
.kanban-board.active-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

.kanban-phases {
    display: flex;
    gap: 20px;
    flex: 1 1 0; 
    min-height: 0; 
    align-items: flex-start; /* empty phases stay short */
    margin-bottom: 0px; 
}

.add-phase-column {
    flex: 0 0 320px;
    padding: 0 10px;
}

/* V3: Footer do Board para botão Adicionar Fase */
.kanban-board-footer {
    width: 100%;
    margin-top: 20px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    border-top: 1px dashed var(--glass-border);
    flex-shrink: 0; /* Previne que o footer seja engolido */
}

.btn-add-phase {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-phase:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: var(--text-primary);
}

.card-editor-modal.small {
    width: 450px;
    height: auto;
    max-height: 80vh;
}

.card-editor-modal.mini {
    width: 400px;
    height: auto;
}

/* Ajustes de botões no editor */
.btn-icon-plus {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px dashed var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-plus:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.assignee-list {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.kanban-column {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    max-height: calc(100vh - 250px);
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.column-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.phase-reorder-actions {
    display: flex;
    gap: 4px;
}

.btn-reorder {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-reorder:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

.column-title {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.cards-container {
    padding: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 50px;
    max-height: none;
}

.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* Prevent cards from squashing inside a fixed height column! */
}

.kanban-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
    transform: translateY(-2px);
}

.card-header-v3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    margin-bottom: 8px;
}

/* V3: SLA Badges */
.card-sla-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.sla-on-time {
    background: rgba(80, 200, 120, 0.15);
    color: #50C878;
    border: 1px solid rgba(80, 200, 120, 0.3);
}

.sla-warning {
    background: rgba(243, 156, 18, 0.15);
    color: #F39C12;
    border: 1px solid rgba(243, 156, 18, 0.3);
    animation: pulse-warning 2s infinite;
}

.sla-overdue {
    background: rgba(231, 76, 60, 0.2);
    color: #E74C3C;
    border: 1px solid rgba(231, 76, 60, 0.4);
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(243, 156, 18, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
    }
}

.highlight-pulse {
    animation: crm-highlight-glow 2s ease-out;
    z-index: 100 !important;
}

@keyframes crm-highlight-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.8), 0 0 20px rgba(108, 99, 255, 0.8);
        border-color: var(--accent);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 20px rgba(108, 99, 255, 0), 0 0 0 rgba(108, 99, 255, 0);
        border-color: var(--glass-border);
        transform: scale(1);
    }
}

.card-field-preview {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-field-preview small {
    opacity: 0.7;
    margin-right: 8px;
}

.preview-field-item.dragging {
    opacity: 0.5;
    border: 2px dashed var(--accent);
}

/* Field Constructor UI */
.field-constructor-modal {
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.constructor-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: var(--bg-dark);
}

.card-badges-v3 {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.card-financial-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(108, 99, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(108, 99, 255, 0.2);
}

.card-deadline-icon {
    font-size: 1rem;
    cursor: help;
    transition: transform 0.2s;
    line-height: 1;
}

.card-deadline-icon:hover {
    transform: scale(1.2);
}

.card-deadline-icon.overdue {
    filter: drop-shadow(0 0 5px #E74C3C);
    animation: flash-red 1s infinite;
}

@keyframes flash-red {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 800px) {
    .constructor-body {
        flex-direction: column;
        overflow-y: auto;
    }

    .field-types-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--glass-border);
        max-height: 200px;
    }

    .field-constructor-modal {
        height: 95vh;
    }
}

.field-types-sidebar {
    width: 280px;
    padding: 20px;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    flex-shrink: 0;
}

.field-types-sidebar h4 {
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.field-types-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-type-item {
    padding: 10px 14px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.field-type-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    transform: translateX(5px);
}

.field-type-item span {
    font-size: 1rem;
    filter: grayscale(0.5);
    transition: var(--transition);
}

.field-type-item:hover span {
    filter: grayscale(0);
}

.preview-field-item.drag-over {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

.field-type-item.dragging-source {
    opacity: 0.4;
    border: 1px dashed var(--accent);
}

.preview-field-item.dragging-preview {
    opacity: 0.4;
    border: 1px dashed var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.field-item.horizontal {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.btn-delete-field:hover {
    color: #ff4d4d !important;
    background: rgba(255, 77, 77, 0.1) !important;
}

.constructor-preview {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .constructor-preview {
        padding: 10px;
    }

    .preview-card {
        padding: 0;
    }

    .preview-header,
    .preview-fields {
        padding: 16px;
    }

    .empty-preview {
        min-height: 150px;
        font-size: 0.85rem;
    }
}

.preview-card {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.card-temp-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.preview-fields {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.empty-preview {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--glass-border);
}

.preview-field-item {
    padding: 16px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: move;
    transition: var(--transition);
}

.preview-field-item:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.field-drag-handle {
    color: var(--text-secondary);
    cursor: grab;
}

.field-info {
    flex: 1;
}

.field-info label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.preview-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    pointer-events: none;
    /* Não clicável no preview */
}

textarea.preview-input {
    height: 60px;
    resize: none;
}

.select-mock {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-mock {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-primary);
}

.preview-field-item .field-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    /* Só mostra no hover do item */
    transition: opacity 0.2s;
}

.preview-field-item:hover .field-actions {
    opacity: 1;
}

.btn-edit-field,
.btn-delete-field {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text-secondary);
}

.btn-edit-field:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
}

.btn-delete-field:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.kanban-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--accent);
    background: rgba(108, 99, 255, 0.05);
}

/* --- CRM Fase 10: Responsividade & Polimento --- */

@media (max-width: 1024px) {
    .kanban-toolbar {
        padding: 0 20px 15px 20px;
    }

    .kanban-board {
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .crm-main-container {
        padding: 10px;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .header-actions button {
        flex: 1;
        justify-content: center;
    }

    .pipes-grid {
        grid-template-columns: 1fr;
    }

    .kanban-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-filters {
        overflow-x: auto;
        padding-bottom: 5px;
        width: 100%;
    }

    .toolbar-filters select {
        flex-shrink: 0;
    }

    .kanban-column {
        flex: 0 0 85vw;
        /* Colunas maiores no mobile para foco */
    }

    .card-editor-modal {
        width: 95vw !important;
        height: 95vh !important;
        border-radius: 12px 12px 0 0;
        bottom: 0px !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        margin: auto;
        transform: translateY(0);
    }

    .card-editor-overlay.closing .card-editor-modal {
        transform: translateY(100%);
    }
}

/* Efeito de Scroll Suave nas Colunas */
.kanban-board {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.kanban-board::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.kanban-board::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Refined */
.kanban-card,
.pipe-card,
.report-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Pulse sutil para urgências no dashboard */
.urgency-item.overdue {
    animation: crm-pulse-danger 2s infinite ease-in-out;
}

@keyframes crm-pulse-danger {
    0% {
        border-color: rgba(231, 76, 60, 0.4);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.2);
    }

    50% {
        border-color: rgba(231, 76, 60, 0.8);
        box-shadow: 0 0 10px 2px rgba(231, 76, 60, 0.3);
    }

    100% {
        border-color: rgba(231, 76, 60, 0.4);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.2);
    }
}

.kanban-column.drag-over {
    background: rgba(108, 99, 255, 0.05);
    border: 1px dashed var(--accent);
}

/* Removido duplicata .card-title */

.card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(108, 99, 255, 0.2);
    color: var(--accent);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.assignees {
    display: flex;
    gap: -8px;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid var(--card-bg);
}

/* Card Editor Modal */
.card-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.card-editor-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

.card-editor-modal {
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    width: 900px;
    max-width: 95vw;
    height: 80vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.editor-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input[type="text"].card-title-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    width: 100% !important;
    outline: none !important;
    font-family: var(--font-heading) !important;
    padding: 0 !important;
    height: auto !important;
}

.card-title-input:focus {
    color: var(--accent);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.editor-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.editor-main {
    flex: 2;
    padding: 32px;
    overflow-y: auto;
    border-right: 1px solid var(--glass-border);
}

.editor-sidebar {
    flex: 1;
    padding: 32px;
    background: rgba(255, 255, 255, 0.01);
    overflow-y: auto;
}

.editor-section {
    margin-bottom: 32px;
}

.editor-section h4,
.sidebar-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.custom-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.field-item label {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    gap: 4px;
}

.required-mark {
    color: #ef4444;
    font-weight: bold;
}

.field-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.field-input:focus {
    border-color: var(--accent);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}


/* Checkbox Container - Custom Purple Style */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    padding-left: 28px;
    /* Space for custom checkmark */
    user-select: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.checkbox-container:hover {
    color: var(--text-primary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--accent);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Buttons - Spacing & alignment improvements */
.editor-footer .btn-secondary {
    margin-right: auto;
    /* Push primary button to the right if space-between is used */
}

/* Field Type Items in Constructor */
.field-type-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-type-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* Hover effect */
    border-color: var(--accent);
    transform: translateY(-2px);
}

.field-type-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Config Modal - Specialized styles */
.config-modal-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.config-modal-section:last-child {
    border-bottom: none;
}

.config-modal-section h4 {
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.currency-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0;
    width: 100%;
    overflow: hidden;
}

.currency-input-wrapper span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* CHECKLISTS PREMIUM REBUILD */
.checklists-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-top: 24px !important;
}

.checklist-group {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

.checklist-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
}

.checklist-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.checklist-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--accent) !important;
}

.checklist-item-text {
    flex: 1 !important;
    font-size: 0.95rem !important;
    color: var(--text-primary) !important;
}

.checklist-item-meta {
    font-size: 0.8rem !important;
    color: var(--text-soft) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.btn-delete-item {
    background: rgba(255, 77, 77, 0.1) !important;
    border: none !important;
    color: #ff4d4d !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

.btn-delete-item:hover {
    background: #ff4d4d !important;
    color: white !important;
}

.checklist-add-form {
    display: flex !important;
    gap: 10px !important;
    margin-top: 20px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    padding: 12px !important;
    border-radius: 10px !important;
}

.comments-area {
    width: 100%;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
}

.comments-area textarea {
    width: 100% !important;
    min-height: 120px;
    max-height: 120px;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
    resize: none !important;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.comments-area textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

/* HISTÓRICO CLEAN */
.audit-log {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    display: flex;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.log-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--accent-light);
}

.log-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.log-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.log-action {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.log-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.log-author {
    color: var(--accent-light);
    font-weight: 700;
}

/* BOTÃO DE RESPONSÁVEIS PREMIUM */
.assignee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.btn-icon-circular {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px dashed var(--accent) !important;
    background: rgba(var(--accent-rgb), 0.05) !important;
    color: var(--accent-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    padding: 0 !important;
    outline: none !important;
}

.btn-icon-circular:hover {
    background: var(--gradient-primary) !important;
    color: white !important;
    border-style: solid !important;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.5);
}

.btn-icon-circular svg {
    width: 18px;
    height: 18px;
}

.avatar-xs, .avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--bg-main, #0B1C2D);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Tabs logic */
.config-tab-content {
    display: none !important;
}

.config-tab-content.active {
    display: block !important;
}

.config-tabs {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 30px !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding-bottom: 10px !important;
}

.tab-btn {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border-radius: 8px !important;
}

.tab-btn:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.tab-btn.active {
    color: var(--accent) !important;
    background: rgba(108, 99, 255, 0.1) !important;
    box-shadow: inset 0 -2px 0 var(--accent) !important;
}
/* === CRITICAL FIX: UNIVERSAL CLOSE BUTTON (ANTI-WINDOWS-95) === */
.btn-close-modal, 
#btn-close-editor, 
#btn-close-pipe-config,
#btn-close-field-config,
#btn-close-constructor,
#btn-close-new-pipe,
.btn-close-import {
    position: relative !important; /* Permitir alinhamento flex no header */
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10 !important;
    flex-shrink: 0;
    font-size: 1.2rem !important;
}


.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ff4d4d !important;
    transform: rotate(90deg) scale(1.1) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

/* === CARD EDITOR HEADER FIX === */
.premium-header-flex {
    padding: 20px 30px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    border-bottom: 1px solid var(--glass-border);
}

.header-actions-premium {
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* === HISTÓRICO SPACING FIX === */
.log-header, h4.log-header {
    margin-top: 100px !important; /* Espaço massivo de 100px */
    margin-bottom: 20px !important;
    padding-top: 30px !important;
    border-top: 2px solid rgba(255, 255, 255, 0.05) !important;
    color: #8C82FF !important; /* Roxo Tech Suave */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    display: block !important;
    width: 100% !important;
}

.history-section {
    padding-top: 20px !important;
}

/* Modal Footers are managed by styles/modals.css */

/* === EMOJI PICKER REBUILD V7 === */
.emoji-picker, #config-emoji-picker {
    background: #0E2238 !important;
    border: 1px solid var(--accent) !important;
    border-radius: 16px !important;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9) !important;
    padding: 24px !important;
    z-index: 100010 !important;
    width: 420px !important;
    height: auto !important;
    max-height: 500px !important; /* Evita cortes */
    overflow: visible !important;
}

.emoji-picker-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    height: 100% !important;
}

.emoji-search-wrapper {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    display: flex !important;
    margin-bottom: 5px !important;
}

.emoji-search-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    width: 100% !important;
    font-size: 1rem !important;
    outline: none !important;
}

.emoji-grid {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 8px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    padding-right: 10px !important;
}

/* Forçando remover fundo branco de qualquer lugar no grid */
.emoji-grid button,
.emoji-grid span,
.emoji-grid div,
.emoji-item {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.emoji-tabs {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 12px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.emoji-cat-btn {
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-soft) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-weight: 600 !important;
}

.emoji-cat-btn.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3) !important;
}

.emoji-item {
    background: transparent !important;
    border: none !important;
    font-size: 1.8rem !important;
    padding: 10px !important;
    cursor: pointer !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    transform: scale(1.25) !important;
}

.assignee-section {
    margin-bottom: 32px !important;
}
/* === PREMIUM CONFIGURATION SYSTEM (V3 STAGE 09) === */
.premium-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 10px 0 !important;
}

.premium-item {
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 16px 24px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    position: relative !important;
    width: 100% !important;
}

.premium-item:hover {
    background: var(--glass-hover) !important;
    border-color: var(--accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.config-item-drag {
    color: var(--text-muted) !important;
    cursor: grab !important;
    display: flex !important;
    align-items: center !important;
    padding-right: 15px !important;
    border-right: 1px solid var(--glass-border) !important;
}

.config-item-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.config-item-main.horizontal {
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
}

.premium-label {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    font-family: 'Poppins', sans-serif !important;
}

.color-options {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 10px !important;
}

.color-option {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    outline: none !important;
}

.color-option:hover {
    transform: scale(1.15) !important;
}

.color-option.active {
    border-color: white !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.1) !important;
}

.color-option span {
    display: none !important; /* Esconde texto dentro se houver */
}

.phase-name-input-premium {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    width: 250px !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: all 0.2s !important;
}

.phase-name-input-premium:focus {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2) !important;
}

/* Forcing all inputs in config to be Dark */
.phase-type-badges {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    background: transparent !important;
    padding: 4px !important;
    border-radius: 20px !important;
    border: 1px solid var(--glass-border) !important;
}

.type-pill {
    padding: 6px 14px !important;
    border-radius: 16px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    color: var(--text-muted) !important;
}

.type-pill.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.4) !important;
}

.config-item-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.btn-icon-premium {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.btn-icon-premium:hover {
    color: var(--accent) !important;
    transform: scale(1.1);
}

.btn-premium-secondary {
    background: rgba(108, 99, 255, 0.1) !important;
    border: 1px solid rgba(108, 99, 255, 0.3) !important;
    color: var(--accent-light) !important;
    background: rgba(108, 99, 255, 0.2) !important;
    border-color: var(--accent) !important;
}

/* === MINIMALIST SECTIONS (ACCORDIONS) === */
.minimalist-section {
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.section-toggle:hover {
    background: rgba(var(--accent-rgb), 0.12) !important;
    border-color: var(--accent) !important;
}

.section-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === COLOR PICKER SPACING & SIZE === */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.color-options {
    gap: 18px !important; 
    display: flex;
    flex-wrap: wrap;
}

.color-option {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    transform: scale(1) !important;
    transition: transform 0.2s ease !important;
}

.color-option:hover, .color-option.active {
    transform: scale(1.2) !important;
    box-shadow: 0 0 10px rgba(255,255,255,0.2) !important;
}

.color-label {
    margin-top: 4px;
    font-weight: 600;
    color: var(--accent-light);
    font-size: 0.95rem;
}

/* === IMPORT CSV REFINEMENT === */
.import-drop-zone p {
    white-space: nowrap !important;
    overflow: visible !important; /* Permitir ver o texto se passar um pouco */
    text-overflow: clip;
    padding: 0 10px;
    margin: 0;
    min-width: 500px !important; /* Aumentado de 400 para 500 para evitar quebra */
    text-align: center;
    font-size: 0.95rem;
}

.import-drop-zone {
    min-width: 520px !important; /* Container também precisa ser largo */
    padding: 40px 20px !important;
}

input[type="text"].card-title-input::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.6 !important;
    font-weight: 500 !important;
}
/* CRM Notification System Styles */
.crm-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #13263C;
    border: 1px solid var(--accent);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: crmSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
}

.crm-toast.error { border-color: #EF4444; }

.crm-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.crm-toast-progress {
    height: 4px;
    background: var(--gradient-primary);
    width: 100%;
    border-radius: 2px;
    animation: crmProgress 4s linear forwards;
}

.crm-confirm-overlay {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.65) !important;
}

@keyframes crmSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes crmProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.fade-out {
    animation: crmSlideOut 0.5s ease-in forwards;
}

@keyframes crmSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

.empty-list-placeholder {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    border: 2px dashed var(--glass-border);
    border-radius: 14px;
    font-style: italic;
}

.export-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg) !important;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-top: 8px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 180px;
}

.export-dropdown-menu button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.export-dropdown-menu button:hover {
    background: var(--glass-hover);
    color: var(--accent);
}

/* =========================================================
   RESPONSIVIDADE MOBILE (CRM)
   ========================================================= */

@media (max-width: 768px) {
    .crm-main-container {
        padding: 10px;
    }

    .pipes-grid {
        grid-template-columns: 1fr;
    }

    .kanban-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .kanban-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .kanban-toolbar {
        padding: 0 20px 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search {
        min-width: 100%;
    }

    .toolbar-filters {
        flex-wrap: wrap;
    }

    .toolbar-filters select.small {
        flex: 1;
        min-width: 140px;
    }

    /* Kanban Horizontal Scroll with Snap */
    .kanban-board {
        padding: 10px 20px;
        flex-direction: row !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        min-height: calc(100vh - 250px);
    }

    .kanban-column {
        min-width: 85vw !important;
        max-width: 85vw !important;
        flex: 0 0 85vw !important;
        scroll-snap-align: center;
    }

    /* Modal de Edição no Mobile */
    .card-editor-modal, 
    .field-constructor-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }
}