* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    min-height: 100vh;
}

/* ==========================================
   Header SKA com Logo por Imagem
   ========================================== */
.ska-header, .main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e1e8ed;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header-left, .brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tamanho e proporção do Logo em imagem */
.brand-logo, .logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
    display: block;
}

.app-subtitle, .ska-header h1 {
    font-size: 15px;
    font-weight: 600;
    color: #7f8c8d;
}

.header-right, .user-panel {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ==========================================
   Botões Globais
   ========================================== */
.btn-primary {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #004c99;
}

.btn-secondary {
    background-color: #f0f4f8;
    border: 1px solid #d0d7de;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background-color: #e1e8ed;
}

.btn-full {
    width: 100%;
    margin-top: 15px;
}

.btn-logout {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: #e74c3c;
    color: white;
}

/* ==========================================
   Toolbar de Filtros
   ========================================== */
.toolbar {
    background-color: white;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.filters {
    display: flex;
    gap: 12px;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13px;
}

/* ==========================================
   Grid Layout Principal (Atualizado)
   ========================================== */
.dashboard-grid {
    display: grid;
    /* Coluna 1: Kanban Fixo (820px), Coluna 2: Gráficos de BI Fixos (420px), Coluna 3: Atividades Recentes Auto-fill (1fr) */
    grid-template-columns: 820px 620px 1fr;
    gap: 20px;
    padding: 20px;
}

h2 {
    font-size: 16px;
    color: #003366;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ==========================================
   Kanban Board
   ========================================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.column {
    background-color: #ebedf0;
    border-radius: 6px;
    padding: 10px;
    min-height: 480px;
}

.column-header {
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
}

.status-afazer { background-color: #0066cc; }
.status-progresso { background-color: #e67e22; }
.status-concluido { background-color: #27ae60; }

.badge {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Card de Tarefas & Tooltip Customizado ao Passar o Mouse */
.task-card {
    background-color: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* Tooltip flutuante que aparece ao passar o mouse utilizando o atributo data-tooltip */
.task-card[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 105%;
    left: 0;
    z-index: 100;
    background-color: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    max-width: 300px;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    pointer-events: none;
}

.task-card h4 { font-size: 14px; margin-bottom: 6px; color: #2c3e50; }
.task-card p { font-size: 12px; color: #666; margin-bottom: 4px; }

/* ==========================================
   Seção BI & Notificações
   ========================================== */
.chart-container {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.chart-container h3 {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}

.notifications-section {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    height: 100%;
}

.notifications-list {
    list-style: none;
    font-size: 13px;
}

.notifications-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.notifications-list li:last-child {
    border-bottom: none;
}

/* ==========================================
   Modal
   ========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 400px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #888;
}

.close-btn:hover {
    color: #333;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.modal input, .modal select, .modal textarea {
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 13px;
    background-color: #fafbfc;
    color: #333;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.modal input:focus, .modal select:focus, .modal textarea:focus {
    border-color: #0066cc;
    background-color: #fff;
}

/* ==========================================
   Tela de Login (Com Logo em Imagem)
   ========================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #003366;
}

.login-card {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    width: 360px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.login-logo {
    max-width: 240px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.input-group {
    text-align: left;
    margin-top: 12px;
}

.input-group label {
    font-size: 12px;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #444;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.error-msg {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 10px;
}

/* =========================================
   AJUSTES DE RESPONSIVIDADE PARA CELULAR
   ========================================= */

@media (max-width: 768px) {
    .main-header, .ska-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        text-align: center;
    }

    .user-panel {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .user-panel span {
        width: 100%;
        margin-bottom: 2px;
        font-size: 13px;
    }

    .toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .filters {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .filters select, .filters input, .toolbar button {
        width: 100% !important;
    }

    .dashboard-grid, .main-content, .content-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 15px !important;
        padding: 10px !important;
    }

    .kanban-board {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .kanban-column {
        width: 100% !important;
        min-height: auto !important;
    }

    .chart-container, .bi-section, .activities-panel, .card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .modal-content {
        width: 90% !important;
        margin: 10% auto !important;
        padding: 20px !important;
    }
    
    .kpi-container {
        display: flex;
        gap: 20px;
        padding: 20px;
        justify-content: center;
    }

    .kpi-card {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        text-align: center;
        flex: 1;
        max-width: 300px;
    }

    .kpi-value {
        font-size: 2em;
        font-weight: bold;
        color: #0052cc;
        margin-top: 10px;
    }
}