/* Variáveis CSS atualizadas */

/* Variáveis CSS para tema branco (padrão) */
:root {
    --primary-color: #34a0f8af;
    --primary-dark: #f5f7fa;
    --primary-light: #534bae;
    --secondary-color: #333333;
    --accent-color: #3949ab;
    --success-color: #4caf50;
    --success-dark: #388e3c;
    --warning-color: #ff9800;
    --warning-dark: #f57c00;
    --danger-color: #f44336;
    --danger-dark: #d32f2f;
    --info-color: #2196f3;
    --info-dark: #1976d2;
    --purple: #9c27b0;
    --teal: #009688;
    --indigo: #3f51b5;
    --light-gray: #ffffff;
    --medium-gray: #666666;
    --dark-gray: #333333;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --hover-bg: #f5f7fa;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajustes específicos para o tema branco */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--primary-dark); /* Agora é #f5f7fa (fundo claro) */
    color: var(--secondary-color); /* Agora é #333333 (texto escuro) */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Login Page - ajustado para tema branco */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 20px;
}

.login-box {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.6s ease-out;
}

/* Main content */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: var(--primary-dark); /* Fundo claro */
}

/* Header ajustado */
.header {
    background-color: var(--card-bg);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Cards ajustados para tema claro */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    border-left: 4px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: move;
    margin-bottom: 12px;
    user-select: none;
    color: var(--secondary-color);
}

/* Ajustes para o kanban board */
.kanban-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Ajustes para as etapas (stages) */
.stage {
    background-color: var(--hover-bg);
    border-radius: var(--border-radius-md);
    min-width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stage-header {
    padding: 16px 20px;
    background-color: rgba(0, 0, 0, 0.02); /* Mais claro */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--secondary-color);
}

/* Ajustes para formulários */
.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--secondary-color);
    font-size: 1rem;
    transition: var(--transition);
}

/* Ajustes para dropdowns */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--secondary-color);
    cursor: pointer;
    min-width: 200px;
    justify-content: space-between;
}

/* Ajustes para botões */
.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff; /* Texto branco para contraste */
}

/* Ajustes para a sidebar */
.sidebar {
    width: 280px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

/* Ajustes para estatísticas */
.stat-item {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 120px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Ajustes para gráficos */
.chart-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    height: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Ajustes para atividade recente */
.activity-list {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    height: fit-content;
}

/* Personalização da scrollbar para tema claro */
.stage-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.stage-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Ajustes para mensagens de erro */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(244,67,54,0.1);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    color: #f44336;
}

/* Ajustes para badges de automação */
.automation-badge {
    background-color: var(--purple);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilo para cards sendo arrastados */
.card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/* Container do botão - acima dos cards */
.stage-add-btn-wrapper {
    margin-bottom: 12px;
    position: relative;
    z-index: 10; /* Garante que fique acima dos cards */
}

/* Botão adicionar card */
.add-card-btn {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--medium-gray);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.add-card-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    border-style: solid;
}

.add-card-btn:active {
    transform: translateY(1px);
}

/* Garantir que o botão NÃO seja arrastável */
.add-card-btn {
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Área dos cards */
.stage-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 50px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 4px;
    position: relative;
    z-index: 1;
    background: #00000015;
}

/* Custom scrollbar */
.stage-body::-webkit-scrollbar {
    width: 6px;
}

.stage-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.stage-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.stage-body::-webkit-scrollbar-thumb:hover {
    background: var(--medium-gray);
}

/* Estilo para etapas durante o drag */
.stage.drag-over {
    border-color: var(--primary) !important;
    background: rgba(83, 75, 174, 0.05);
}

/* Garantir que o stage-body ocupe todo o espaço disponível */
.stage-body {
    min-height: 100px;
    flex: 1;
}

/* Remover qualquer padding/margin que possa interferir */
.stage-body > * {
    pointer-events: none; /* Permite que o drop funcione sobre os elementos filhos */
}

.stage-body > .card {
    pointer-events: auto; /* Mas os cards ainda precisam ser arrastáveis */
}

/* Botão "Adicionar Card" com tratamento especial */
.stage-footer {
    pointer-events: none; /* Desativa eventos de mouse no botão durante drag */
}

.stage-footer button {
    pointer-events: auto; /* Mas o botão ainda precisa ser clicável */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--primary-dark);
    color: var(--secondary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Estilo para cards sendo arrastados */
.card.dragging {
    opacity: 0.4;
    transform: rotate(3deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Estilo para etapas durante o drag */
.stage.drag-over {
    border-color: var(--primary) !important;
    background: rgba(83, 75, 174, 0.05);
    box-shadow: 0 0 0 2px rgba(83, 75, 174, 0.2);
}

/* Aumentar a área de drop do stage-body */
.stage-body {
    min-height: 100px;
    flex: 1;
    position: relative;
}

/* Adicionar um overlay invisível para facilitar o drop */
.stage.drag-over .stage-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(83, 75, 174, 0.05);
    pointer-events: none;
    border-radius: 8px;
}

/* Garantir que o botão não tenha background durante drag */
.stage.drag-over .stage-footer {
    background: transparent;
}

/* Botão de adicionar card - destacar durante drag */
.stage.drag-over .add-card-btn {
    border-color: var(--primary);
    background: rgba(83, 75, 174, 0.1);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 20px;
}

.login-box {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.6s ease-out;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-logo p {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(244,67,54,0.1);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    color: #f44336;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--medium-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: var(--primary-dark);
}

/* Header */
.header {
    background-color: var(--card-bg);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Tabs */
.tab-navigation {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.tab-content {
    display: none;
    padding: 24px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
    border-radius: var(--border-radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Kanban Board */
.kanban-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.stages-container {
    display: flex;
    gap: 16px;
    padding: 20px;
    overflow-x: auto;
    min-height: calc(100vh - 300px);
}

.stage {
    background-color: var(--hover-bg);
    border-radius: 12px; /* Aumentado para 12px (era 8px) */
    min-width: 320px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden; /* Importante para arredondar os filhos também */
}

.stage:hover {
    border-color: var(--primary-light);
}

.stage-header {
    padding: 16px 16px;
    background-color: #34a0f8af;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-actions {
    display: flex;
    gap: 5px;
}

.stage-actions button {
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.stage-actions button:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    border-left: 4px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: move;
    margin-bottom: 12px;
    user-select: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* File attachments */
.file-attachments {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius-sm);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: var(--hover-bg);
    border-radius: 4px;
    margin-bottom: 6px;
}

.file-icon {
    color: var(--info-color);
}

.file-download {
    color: var(--success-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.file-download:hover {
    background: rgba(76, 175, 80, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* Automation */
.automation-badge {
    background-color: var(--purple);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.automation-panel {
    background-color: rgba(156, 39, 176, 0.1);
    border: 1px solid var(--purple);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    margin-top: 10px;
}

/* Charts Container */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    height: 280px;
    position: relative;
}

.chart-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--secondary-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(83, 75, 174, 0.2);
}

/* File input */
.file-input-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: var(--hover-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--medium-gray);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.file-input-button:hover {
    border-color: var(--primary-light);
    background-color: rgba(83, 75, 174, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Email configurations */
.email-account {
    background: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.email-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.email-provider-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.email-provider-option {
    background: var(--hover-bg);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.email-provider-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.email-provider-option.active {
    border-color: var(--primary-color);
    background: rgba(26, 35, 126, 0.2);
}

/* Menu Highlight */
.nav-item.active {
    background: linear-gradient(90deg, rgba(192, 196, 235, 0.3) 0%, rgba(192, 196, 235, 0.15) 100%) !important;
    color: #1a237e !important; /* Texto azul escuro para contraste */
    border-left: 4px solid var(--primary-color) !important;
    font-weight: 600;
}

.tab-btn.active {
    color: var(--primary-light) !important;
    border-bottom: 3px solid var(--primary-light) !important;
}

/* Dropdown Improvements */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--secondary-color);
    cursor: pointer;
    min-width: 200px;
    justify-content: space-between;
}


.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background-color: var(--hover-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        height: 100vh;
    }

    .sidebar.active {
        left: 0;
    }

    .stages-container {
        flex-direction: column;
    }

    .stage {
        min-width: 100%;
        max-width: 100%;
    }

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

    .chart-container {
        height: 250px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Helpdesk Public Link */
.public-link-container {
    padding: 15px;
    background-color: rgba(33, 150, 243, 0.1);
    border-radius: var(--border-radius-sm);
    margin-bottom: 15px;
    border: 1px solid var(--info-color);
}

.public-link-label {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 5px;
    font-weight: 500;
}

.public-link {
    font-size: 0.95rem;
    color: var(--info-color);
    text-decoration: none;
    word-break: break-all;
}

.public-link:hover {
    text-decoration: underline;
}

/* Enhanced dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(83, 75, 174, 0.2) 0%, rgba(26, 35, 126, 0.2) 100%);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
}

.positive {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.negative {
    color: var(--danger-color);
    background: rgba(244, 67, 54, 0.1);
}

/* Recent activity */
.activity-list {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: var(--hover-bg);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.activity-context {
    font-size: 0.8rem;
    color: var(--primary-light);
    background: rgba(83, 75, 174, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* Access denied message */
.access-denied {
    text-align: center;
    padding: 60px 20px;
}

.access-denied-icon {
    font-size: 4rem;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.access-denied h2 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.access-denied p {
    color: var(--medium-gray);
    margin-bottom: 20px;
}
/* ==================== */
/* DASHBOARD FIXO E SIMÉTRICO */
/* ==================== */

/* Container principal do dashboard */
.tab-content.active[data-tab="dashboard"] {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

/* Grid de estatísticas fixo e simétrico */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
    position: relative;
}

/* Item de estatística com altura fixa e layout consistente */
.stat-item {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 120px; /* Altura fixa mínima */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Efeito de hover suave */
.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Ícone com tamanho fixo */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(83, 75, 174, 0.1) 0%, rgba(26, 35, 126, 0.1) 100%);
    flex-shrink: 0;
}

/* Informações da estatística */
.stat-info {
    flex: 1;
    min-width: 0; /* Permite que o texto quebre corretamente */
}

/* Valor da estatística */
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--secondary-color);
    font-family: 'Inter', sans-serif;
}

/* Label da estatística */
.stat-label {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

/* Mudança/status */
.stat-change {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.positive {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
}

.negative {
    color: var(--danger-color);
    background: rgba(244, 67, 54, 0.1);
}

/* ==================== */
/* GRID DE GRÁFICOS FIXO */
/* ==================== */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    height: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    flex-shrink: 0;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    min-height: 200px;
}

/* ==================== */
/* LAYOUT INFERIOR DO DASHBOARD */
/* ==================== */

/* Container de 2 colunas */
.tab-content.active[data-tab="dashboard"] > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

/* Atividade recente */
.activity-list {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    height: fit-content;
}

.activity-list h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Container de produtividade */
.tab-content.active[data-tab="dashboard"] > div:last-child > div:last-child {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    height: fit-content;
}

/* Barra de progresso */
.tab-content.active[data-tab="dashboard"] .progress-bar {
    height: 6px;
    background: var(--hover-bg);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.tab-content.active[data-tab="dashboard"] .progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ==================== */
/* RESPONSIVIDADE */
/* ==================== */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .tab-content.active[data-tab="dashboard"] > div:last-child {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        min-height: 100px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

/* ==================== */
/* ANIMAÇÕES PARA CARREGAMENTO */
/* ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* Animar itens sequencialmente */
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
.stat-item:nth-child(5) { animation-delay: 0.5s; }
.stat-item:nth-child(6) { animation-delay: 0.6s; }
.stat-item:nth-child(7) { animation-delay: 0.7s; }
.stat-item:nth-child(8) { animation-delay: 0.8s; }

/* ==================== */
/* ESTILOS PARA DADOS VAZIOS */
/* ==================== */

.stat-item.empty {
    opacity: 0.6;
}

.stat-item.empty .stat-value {
    color: var(--medium-gray);
}

.stat-item.empty .stat-change {
    background: rgba(144, 164, 174, 0.1);
    color: var(--medium-gray);
}

/* ==================== */
/* BOTÕES NO DASHBOARD */
/* ==================== */

#addKanbanFromDashboard {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    font-weight: 600;
}

/* ==================== */
/* SCROLLBAR PERSONALIZADA */
/* ==================== */

.tab-content.active[data-tab="dashboard"]::-webkit-scrollbar {
    width: 6px;
}

.tab-content.active[data-tab="dashboard"]::-webkit-scrollbar-track {
    background: transparent;
}

.tab-content.active[data-tab="dashboard"]::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.tab-content.active[data-tab="dashboard"]::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
/* Versão mínima - apenas adiciona scroll */
.sidebar {
    width: 280px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto; /* Adiciona scroll vertical */
    overflow-x: hidden; /* Esconde scroll horizontal */
}

/* Personaliza a scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Para Firefox */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

