/* ==================== DASHBOARD STYLES ==================== */
@charset "UTF-8";
/* Container principal */
#dashboardContent {
    width: 100%;
    height: auto;
    min-height: calc(100vh - 250px); /* Garante que o fundo branco preencha a tela */
    overflow: visible;
    padding: 10px 0;
}

/* Ajustes finos para reduzir o espaço até o footer */
.home-main-content {
    gap: 0 !important; 
    padding-bottom: 5px !important;
}

.home-main-content .dashboard-filters {
    margin-bottom: 10px !important;
}

/* ==================== BADGE PULSANTE - FILTROS AVANÇADOS ATIVOS ==================== */
/* Botão precisa ter position: relative para o badge */
#toggleAdvancedFiltersBtn {
    position: relative;
}

/* Badge azul, igual ao sininho mas em azul primário */
.filter-active-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444; /* Vermelho — chama atenção */
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    pointer-events: none; /* não interfere no clique do botão */
    animation: pulse-filter 2s infinite;
}

@keyframes pulse-filter {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==================== FILTROS - LAYOUT DOS CAMPOS ==================== */
/* Acordeão de filtros avançados: fechado por default, abre via classe JS */
#advancedFiltersContainer {
    display: none;
}
#advancedFiltersContainer.advanced-filters-open {
    display: block;
    margin-top: 15px;
    border-top: 1px dashed var(--border-color);
    padding-top: 15px;
}

/* Linha principal: filho direto do container - 5 campos + botão */
.home-main-content .dashboard-filters-container > .dashboard-filters {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) auto !important;
    gap: 16px;
    margin-bottom: 0 !important;
    padding: 0;
    box-shadow: none;
}

/* Botão "Filtros Avançados" alinha na base da linha, junto com os inputs */
.home-main-content .dashboard-filters-container .filter-toggle-box {
    align-self: end;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Linha avançada: filho direto de #advancedFiltersContainer - 3 campos, largura total */
.home-main-content #advancedFiltersContainer > .dashboard-filters {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
    margin-bottom: 0 !important;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 1200px) {
    .home-main-content .dashboard-filters-container > .dashboard-filters {
        grid-template-columns: repeat(3, 1fr) auto !important;
    }
    .home-main-content #advancedFiltersContainer > .dashboard-filters {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .home-main-content .dashboard-filters-container > .dashboard-filters,
    .home-main-content #advancedFiltersContainer > .dashboard-filters {
        grid-template-columns: 1fr !important;
    }
}


.home-main-content .main-footer {
    padding: 15px 0 !important;
    margin-top: auto !important; /* Rodapé fixo no final da área visível */
    border-top: 1px solid var(--gray-200);
}

/* ==================== BOTÃO DE ALTERNÂNCIA ==================== */
.view-toggle-container {
    margin-right: 20px;
}

.view-toggle-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary-color, #55CEB5);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-toggle-button:hover {
    background: var(--primary-dark, #3FB89A);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.view-toggle-button svg {
    width: 20px;
    height: 20px;
}

/* Ocultar ícone inativo */
.view-toggle-button .icon-kanban,
.view-toggle-button .icon-table {
    display: none;
}

/* Modo Kanban - mostrar ícone de tabela */
.view-toggle-button[data-view="kanban"] .icon-table {
    display: block;
}

/* Modo Tabela - mostrar ícone de kanban */
.view-toggle-button[data-view="table"] .icon-kanban {
    display: block;
}

/* ==================== VISUALIZAÇÃO KANBAN ==================== */
.kanban-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    height: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.kanban-column-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-count {
    background: rgba(0, 0, 0, 0.1);
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

/* Scrollbar personalizada para colunas */
.kanban-cards::-webkit-scrollbar {
    width: 6px;
}

.kanban-cards::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.kanban-cards::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.kanban-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Cards do Kanban */
.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #ccc;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.kanban-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    flex: 1;
}

.kanban-card-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
}

.kanban-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
}

.kanban-card-info svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.kanban-card-budget {
    font-size: 15px;
    font-weight: 700;
    color: #27ae60;
    margin-top: 4px;
}

/* Cores das colunas */
.kanban-column[data-status="briefing"] .kanban-column-header {
    border-bottom-color: #06b6d4;
}

.kanban-column[data-status="briefing"] .kanban-card {
    border-left-color: #06b6d4;
}

.kanban-column[data-status="concorrencia"] .kanban-column-header {
    border-bottom-color: #3b82f6;
}

.kanban-column[data-status="concorrencia"] .kanban-card {
    border-left-color: #3b82f6;
}

.kanban-column[data-status="andamento"] .kanban-column-header {
    border-bottom-color: #8b5cf6;
}

.kanban-column[data-status="andamento"] .kanban-card {
    border-left-color: #8b5cf6;
}

.kanban-column[data-status="finalizado"] .kanban-column-header {
    border-bottom-color: #10b981;
}

.kanban-column[data-status="finalizado"] .kanban-card {
    border-left-color: #10b981;
}

.kanban-column[data-status="cancelado"] .kanban-column-header {
    border-bottom-color: #ef4444;
}

.kanban-column[data-status="cancelado"] .kanban-card {
    border-left-color: #ef4444;
}

/* Status tags */
.status-tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-tag.concorrencia {
    background: #dbeafe;
    color: #1e40af;
}

.status-tag.andamento {
    background: #ede9fe;
    color: #6d28d9;
}

.status-tag.finalizado {
    background: #d1fae5;
    color: #065f46;
}

.status-tag.briefing {
    background: #cffafe;
    color: #0e7490;
}

.status-tag.cancelado {
    background: #fee2e2;
    color: #991b1b;
}

/* ==================== VISUALIZAÇÃO TABELA ==================== */
.table-view {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-container {
    overflow-x: auto;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.events-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.events-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.events-table tbody tr:hover {
    background-color: #f8f9fa;
}

.events-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #495057;
}

.events-table td:first-child {
    font-weight: 600;
    color: #2c3e50;
}

.table-status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.table-budget {
    font-weight: 700;
    color: #27ae60;
}

/* ==================== MENSAGEM VAZIA ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #6c757d;
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
    .kanban-view {
        grid-template-columns: 1fr;
    }
    
    .view-toggle-text {
        display: none;
    }
    
    .view-toggle-button {
        padding: 10px;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    .events-table th,
    .events-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kanban-card,
.events-table tbody tr {
    animation: slideIn 0.3s ease-out;
}
