/* ARQUIVO: style.css */
:root {
    --salutis-red: #c00000;
    --salutis-hover: #a00000;
    --salutis-light: #fff5f5; 
    --sidebar-width: 260px;
}

body {
    overflow-x: hidden;
    background-color: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- UTILITÁRIOS GERAIS --- */
.text-salutis { color: var(--salutis-red) !important; }
.bg-salutis { background-color: var(--salutis-red) !important; color: white; }
.btn-salutis { background-color: var(--salutis-red); color: white; border: none; }
.btn-salutis:hover { background-color: var(--salutis-hover); color: white; }
.btn-outline-salutis { color: var(--salutis-red); border-color: var(--salutis-red); }
.btn-outline-salutis:hover { background-color: var(--salutis-red); color: white; }
.border-top-salutis { border-top: 3px solid var(--salutis-red) !important; }

/* --- SIDEBAR --- */
#sidebar-wrapper { 
    min-height: 100vh; 
    margin-left: -15rem; 
    transition: margin 0.25s ease-out; 
    width: var(--sidebar-width); 
    background-color: var(--salutis-light);
    border-right: 1px solid #ffdede;
}

#sidebar-wrapper .sidebar-heading { 
    padding: 1.2rem 1.25rem; 
    font-size: 1.4rem; 
    background-color: var(--salutis-light);
    border-bottom: 1px solid #ffdede;
}

#sidebar-wrapper .list-group { 
    width: var(--sidebar-width); 
    padding-top: 20px;
}

#page-content-wrapper { min-width: 100vw; }

body.sb-sidenav-toggled #sidebar-wrapper { margin-left: 0; }

@media (min-width: 768px) {
    #sidebar-wrapper { margin-left: 0; }
    #page-content-wrapper { min-width: 0; width: 100%; }
    body.sb-sidenav-toggled #sidebar-wrapper { margin-left: -15rem; }
}

/* --- ITENS DO MENU --- */
.list-group-item { 
    border: none; 
    padding: 15px 25px; 
    font-weight: 600; 
    color: #888; 
    background-color: transparent; 
    cursor: pointer; 
    transition: all 0.2s;
    margin-bottom: 5px;
    border-radius: 0 25px 25px 0; 
    margin-right: 15px; 
}

.list-group-item:hover { 
    color: var(--salutis-red); 
    background-color: rgba(255, 255, 255, 0.5); 
    padding-left: 30px; 
}

.list-group-item.active { 
    color: var(--salutis-red); 
    background-color: #ffffff; 
    font-weight: bold; 
    border-left: 5px solid var(--salutis-red); 
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.list-group-item i { width: 25px; text-align: center; }

.menu-sair {
    margin-top: auto;
    color: #dc3545 !important;
}
.menu-sair:hover {
    background-color: #fff5f5 !important;
    padding-left: 30px;
}

/* --- ESTILOS COMPARTILHADOS --- */
.card-header .btn-outline-light:hover { background-color: #fff !important; color: #333 !important; border-color: #fff !important; }

.step-container, .exec-step { background: #fff; border: 1px solid #e0e0e0; margin-bottom: 10px; border-radius: 6px; border-left: 4px solid #ddd; transition: all 0.2s; }
.step-container:hover, .exec-step:hover { border-left-color: var(--salutis-red); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.step-header, .exec-header { padding: 8px 15px; background-color: #f8f9fa; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; border-top-right-radius: 6px; cursor: pointer; }
.step-header .btn-light, .exec-header .btn-light { background-color: #fff; border: 1px solid #ccc; color: #555; }
.step-header .btn-light:hover, .exec-header .btn-light:hover { background-color: #e2e6ea; color: #333; }

.step-body, .exec-body { padding: 15px; }
.step-container.collapsed .step-body, .exec-step.collapsed .exec-body { display: none; }
.step-container.collapsed .step-header, .exec-step.collapsed .exec-header { border-bottom: none; background-color: #fff; }

.step-summary, .exec-summary { margin-left: 15px; color: #666; font-weight: 500; font-size: 0.95rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 600px; display: none; }
.step-container.collapsed .step-summary, .exec-step.collapsed .exec-summary { display: inline-block; }

.step-number { background: var(--salutis-red); color: white; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: bold; font-size: 0.8rem; flex-shrink: 0; }

.step-group .step-header, .exec-group .exec-header { background-color: #495057 !important; color: white !important; border-color: #495057; padding: 10px 15px; }
.step-group.collapsed .step-header, .exec-group.collapsed .exec-header { border-bottom: none; }
.step-group-input { background: transparent; border: none; color: white !important; font-weight: bold; width: 100%; outline: none; }
.step-group-input::placeholder { color: #ccc; }
.step-group .btn-light, .exec-group .btn-light { background: rgba(255,255,255,0.15) !important; color: white !important; border: 1px solid rgba(255,255,255,0.3) !important; }
.step-group .btn-light:hover, .exec-group .btn-light:hover { background: rgba(255,255,255,0.3) !important; color: white !important; }

.exec-group { border-left: 5px solid #c00000; }
.exec-grid { display: flex; gap: 15px; }
.exec-col-left { width: 35%; background: #fdfdfd; padding: 10px; border: 1px solid #eee; border-radius: 4px; font-size: 0.9rem; display: flex; flex-direction: column; }
.exec-col-right { width: 65%; }

.scrollable-content { background: white; border: 1px solid #dee2e6; border-radius: 4px; padding: 10px; max-height: 200px; overflow-y: auto; transition: max-height 0.3s ease; }
.scrollable-content.expanded { max-height: none; overflow-y: visible; }

.label-mini { font-size: 0.75rem; font-weight: bold; color: #999; text-transform: uppercase; margin-bottom: 5px; display: block; }
.read-only-content { color: #444; overflow-wrap: break-word; }
.note-editor { border-color: #dee2e6; background-color: white; margin-bottom: 0; }

.status-selector { background-color: #f8f9fa; font-weight: 600 !important; border: 1px solid #ced4da; cursor: pointer; transition: all 0.2s; }
.status-selector:hover { background-color: #e9ecef; border-color: #adb5bd; }
.status-selector option { background-color: white; color: #333; padding: 10px; }


/* --- IMPRESSÃO REFINADA --- */
@media print {
    .d-print-none, #wrapper, .modal, .note-toolbar { display: none !important; }
    .d-print-block { display: block !important; }
    
    body { 
        background-color: white; 
        font-family: 'Segoe UI', Arial, sans-serif; 
        font-size: 10px; 
        color: #333;
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    
    /* Container */
    .print-container { width: 100%; }

    /* Tabelas */
    .table-header-print, .table-meta-print, .table-steps-print {
        border-collapse: collapse;
        width: 100%;
        border: 1px solid #000;
        margin-bottom: -1px;
    }
    
    td, th { border: 1px solid #000; padding: 5px; vertical-align: middle; }

    /* Header */
    .header-left { padding: 8px 10px; }
    .header-right { padding: 5px; vertical-align: top; }

    /* Badge ID */
    .req-id-badge {
        background-color: #212529;
        color: white;
        font-weight: bold;
        padding: 6px 12px;
        font-size: 14px;
        border-radius: 4px;
        display: inline-block;
    }

    /* LGPD Box */
    .lgpd-text { 
        font-size: 7px; 
        color: #555; 
        line-height: 1.1; 
        text-align: justify; 
        margin-top: 5px;
        border-top: 1px solid #ccc;
        padding-top: 3px;
    }

    /* Metadados */
    .table-meta-print .label { font-weight: bold; background-color: #f2f2f2; width: 70px; color: #444; }
    .table-meta-print .value { font-weight: normal; }

    /* Barra de Status */
    .status-banner {
        color: white;
        text-align: center;
        font-weight: bold;
        padding: 5px;
        font-size: 12px;
        border: 1px solid #000;
        text-transform: uppercase;
        margin-top: 5px;
    }

    /* Tabela de Passos */
    .table-steps-print { margin-top: 5px; }
    .table-steps-print th { background-color: #e9ecef; font-weight: bold; text-align: center; color: #495057; }
    .table-steps-print td { vertical-align: top; padding: 6px; }
    
    /* GRUPO VERMELHO (ESTILO SOLICITADO) */
    .tr-group td { 
        background-color: #c00000 !important; 
        color: white !important; 
        font-weight: bold; 
        padding: 8px; 
        border-top: 2px solid #000;
    }

    /* EFEITO ZEBRA NAS LINHAS */
    .table-steps-print tbody tr.tr-step:nth-child(even) td {
        background-color: #f8f9fa !important;
    }

    /* Evidências */
    .evidence-box img { 
        max-width: 100%; 
        height: auto; 
        border: 1px solid #ccc; 
        display: block; 
        max-height: 450px; 
        margin-top: 5px;
    }

    /* Quebras */
    tr.no-break {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Carimbos */
    .stamp-passed, .stamp-failed {
        position: fixed; 
        top: 140px; 
        right: 40px;
        font-size: 24px; font-weight: bold;
        padding: 5px 15px;
        transform: rotate(-15deg); opacity: 0.9;
        z-index: 9999;
        text-transform: uppercase;
        border-width: 3px; border-style: solid;
        background-color: rgba(255,255,255,0.8);
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    .stamp-passed { color: #198754; border-color: #198754; }
    .stamp-failed { color: #dc3545; border-color: #dc3545; }
}

/* --- Adição para o Logotipo de Imagem --- */

/* Garante que a div do logo centralize a imagem se sobrar espaço */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Controla o tamanho da imagem do logotipo na impressão */
.logo img {
    max-width: 100%; /* Não deixa passar da largura da coluna 'logo' */
    height: auto;    /* Mantém a proporção da imagem */
    max-height: 80px; /* Define uma altura máxima razoável para o cabeçalho. Ajuste se achar pequeno ou grande demais */
}
.bg-indigo {
    background-color: #6610f2 !important; /* Roxo padrão */
    color: white !important;
}