/**
 * =====================================================
 * ESTILOS PERSONALIZADOS - SISTEMA NEW COMBATH
 * =====================================================
 * CSS padrão para todo o sistema
 * Mantém visual consistente em todas as telas
 */

:root {
    --cor-primaria: #007bff;
    --cor-secundaria: #6c757d;
    --cor-sucesso: #28a745;
    --cor-perigo: #dc3545;
    --cor-aviso: #ffc107;
    --cor-info: #17a2b8;
    --cor-escura: #343a40;
    --cor-clara: #f8f9fa;
    --cor-combath: #2c3e50;
    --cor-combath-clara: #34495e;
}

/* ===================================== */
/* RESET E CONFIGURAÇÕES GLOBAIS */
/* ===================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cor-clara);
    color: #333;
    line-height: 1.6;
}

/* ===================================== */
/* PÁGINA DE LOGIN */
/* ===================================== */
.pagina-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cor-combath) 0%, var(--cor-combath-clara) 100%);
    padding: 20px;
}

.card-login {
    max-width: 420px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: surgir 0.5s ease;
}

@keyframes surgir {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cabecalho-login {
    background: var(--cor-combath);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.logo-login {
    max-height: 80px;
    margin-bottom: 15px;
}

.cabecalho-login h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.cabecalho-login p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.corpo-login {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primario {
    background: var(--cor-primaria);
    color: white;
    width: 100%;
}

.btn-primario:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.link-recuperacao {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--cor-primaria);
    text-decoration: none;
    font-size: 14px;
}

.link-recuperacao:hover {
    text-decoration: underline;
}

.rodape-login {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    color: #666;
    font-size: 13px;
}

/* ===================================== */
/* PAINEL (ÁREA LOGADA) */
/* ===================================== */
.pagina-painel {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--cor-combath);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-collapsed {
    width: 70px;
}

.logo-sidebar {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-sidebar img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
}

.menu-lateral {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-menu {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.link-menu {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-menu:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.link-menu.ativo {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 4px solid var(--cor-primaria);
}

.icone-menu {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.conteudo-principal {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s ease;
}

.conteudo-principal.expandido {
    margin-left: 70px;
}

.barra-superior {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.informacoes-usuario {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-usuario {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cor-primaria);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.dropdown-usuario {
    position: relative;
}

.btn-dropdown {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 200px;
    display: none;
    margin-top: 10px;
}

.menu-dropdown.ativo {
    display: block;
}

.item-dropdown {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.item-dropdown:last-child {
    border-bottom: none;
}

.item-dropdown a {
    color: #333;
    text-decoration: none;
    display: block;
}

.item-dropdown:hover {
    background: var(--cor-clara);
}

.area-conteudo {
    padding: 30px;
}

/* ===================================== */
/* CARDS E COMPONENTES */
/* ===================================== */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-titulo {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--cor-combath);
    font-weight: 600;
}

.estatisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card-estatistica {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--cor-primaria);
}

.card-estatistica.sucesso {
    border-left-color: var(--cor-sucesso);
}

.card-estatistica.aviso {
    border-left-color: var(--cor-aviso);
}

.card-estatistica.perigo {
    border-left-color: var(--cor-perigo);
}

.valor-estatistica {
    font-size: 32px;
    font-weight: 700;
    color: var(--cor-combath);
    margin-bottom: 5px;
}

.label-estatistica {
    color: #666;
    font-size: 14px;
}

/* ===================================== */
/* TABELAS */
/* ===================================== */
.tabela-responsiva {
    overflow-x: auto;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tabela thead {
    background: var(--cor-combath);
    color: white;
}

.tabela th,
.tabela td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.tabela tbody tr:hover {
    background: #f8f9fa;
}

/* ===================================== */
/* BADGES E ALERTAS */
/* ===================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-sucesso {
    background: #d4edda;
    color: #155724;
}

.badge-perigo {
    background: #f8d7da;
    color: #721c24;
}

.badge-aviso {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===================================== */
/* RESPONSIVIDADE */
/* ===================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.aberto {
        transform: translateX(0);
    }
    
    .conteudo-principal {
        margin-left: 0;
    }
    
    .estatisticas {
        grid-template-columns: 1fr;
    }
    
    .area-conteudo {
        padding: 15px;
    }
}

/* ===================================== */
/* ANIMAÇÕES */
/* ===================================== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================== */
/* CUSTOMIZAÇÃO DO SWEETALERT2 */
/* ===================================== */
.swal2-popup {
    border-radius: 15px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.swal2-title {
    color: var(--cor-combath) !important;
}

.swal2-confirm {
    background: var(--cor-primaria) !important;
    border-radius: 8px !important;
    padding: 10px 30px !important;
}

.swal2-cancel {
    border-radius: 8px !important;
    padding: 10px 30px !important;
}

/* ===================================== */
/* UTILIDADES */
/* ===================================== */
.texto-centro {
    text-align: center;
}

.texto-direita {
    text-align: right;
}

.margem-top {
    margin-top: 20px;
}

.margem-bottom {
    margin-bottom: 20px;
}

.espacamento {
    padding: 20px;
}

.oculto {
    display: none !important;
}

.visivel {
    display: block !important;
}

