/* =====================================================
   ISA WORKFLOW HE
   LAYOUT PRINCIPAL
   ===================================================== */


/* =====================================================
   RESET
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family: var(--isa-fonte);

    background: var(--isa-fundo);
    color: var(--isa-texto);

    -webkit-font-smoothing: antialiased;
}


/* =====================================================
   CABEÇALHO
   ===================================================== */

.isa-header {
    min-height: 76px;

    background: var(--isa-branco);

    border-bottom:
        1px solid var(--isa-borda);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    position: sticky;
    top: 0;

    z-index: 100;

    box-shadow:
        0 1px 4px rgba(7, 31, 58, 0.04);
}

.isa-logo {
    height: 50px;
    width: auto;

    display: block;
}

.isa-header-right {
    display: flex;
    align-items: center;

    gap: 12px;
}

.isa-header-title {
    color: var(--isa-azul);

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.1px;
}


/* =====================================================
   CONTAINER
   ===================================================== */

.isa-container {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 32px;
}


/* =====================================================
   TÍTULO DA PÁGINA
   ===================================================== */

.isa-page-title {
    margin-bottom: 26px;
}

.isa-page-title h1 {
    color: var(--isa-azul);

    font-size: 27px;
    line-height: 1.2;

    font-weight: 700;
}

.isa-page-title p {
    margin-top: 7px;

    color: var(--isa-texto-secundario);

    font-size: 14px;
    line-height: 1.5;
}


/* =====================================================
   CABEÇALHO DE PÁGINA
   ===================================================== */

.isa-page-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 24px;

    margin-bottom: 26px;
}


/* =====================================================
   CARDS
   ===================================================== */

.isa-card {
    background: var(--isa-superficie);

    border:
        1px solid var(--isa-borda);

    border-radius:
        var(--isa-raio-lg);

    box-shadow:
        var(--isa-sombra);

    padding: 26px;

    margin-bottom: 20px;
}

.isa-card:last-child {
    margin-bottom: 0;
}

.isa-card h2 {
    color: var(--isa-azul);

    font-size: 19px;
    line-height: 1.3;

    font-weight: 700;

    margin-bottom: 5px;
}

.isa-card>p {
    color: var(--isa-texto-secundario);

    font-size: 14px;
    line-height: 1.5;
}


/* =====================================================
   GRID
   ===================================================== */

.isa-grid {
    display: grid;

    gap: 20px;
}

.isa-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.isa-grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.isa-grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* =====================================================
   FORMULÁRIOS
   ===================================================== */

.isa-form-group {
    margin-bottom: 20px;
}

.isa-form-group:last-child {
    margin-bottom: 0;
}

.isa-label,
.isa-form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--isa-texto);

    font-size: 13px;
    font-weight: 700;

    line-height: 1.3;
}


/* =====================================================
   CAMPOS
   ===================================================== */

.isa-input,
.isa-select,
.isa-textarea,
.isa-form-group input,
.isa-form-group select,
.isa-form-group textarea,
.campo-atividade,
.campo-entrada,
.campo-saida,
.campo-observacao {

    width: 100%;
    min-width: 0;

    border:
        1px solid var(--isa-borda-forte);

    border-radius:
        var(--isa-raio);

    background:
        var(--isa-branco);

    color:
        var(--isa-texto);

    font-family:
        var(--isa-fonte);

    font-size:
        14px;

    outline:
        none;

    box-sizing:
        border-box;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}


/* =====================================================
   INPUTS
   ===================================================== */

.isa-input,
.isa-form-group input,
.campo-atividade,
.campo-entrada,
.campo-saida {

    height: 46px;
    min-height: 46px;

    padding:
        0 14px;
}


/* =====================================================
   SELECT
   ===================================================== */

.isa-select,
.isa-form-group select {

    height: 46px;
    min-height: 46px;

    padding:
        0 42px 0 14px;

    cursor:
        pointer;

    appearance:
        none;

    -webkit-appearance:
        none;

    -moz-appearance:
        none;

    background-image:
        linear-gradient(45deg,
            transparent 50%,
            #64748B 50%),
        linear-gradient(135deg,
            #64748B 50%,
            transparent 50%);

    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat:
        no-repeat;
}


/* =====================================================
   DATA
   ===================================================== */

input[type="date"] {

    height: 46px;
    min-height: 46px;

    padding:
        0 14px;

    appearance:
        none;

    -webkit-appearance:
        none;
}


/* =====================================================
   HORA
   ===================================================== */

input[type="time"] {

    height: 46px;
    min-height: 46px;

    padding:
        0 14px;

    appearance:
        none;

    -webkit-appearance:
        none;
}


/* =====================================================
   TEXTAREA
   ===================================================== */

.isa-textarea,
.isa-form-group textarea,
.campo-observacao {

    min-height:
        105px;

    padding:
        12px 14px;

    line-height:
        1.5;

    resize:
        vertical;
}


/* =====================================================
   PLACEHOLDER
   ===================================================== */

.isa-input::placeholder,
.isa-textarea::placeholder,
.isa-form-group input::placeholder,
.isa-form-group textarea::placeholder,
.campo-atividade::placeholder,
.campo-observacao::placeholder {

    color:
        var(--isa-texto-terciario);
}


/* =====================================================
   FOCO
   ===================================================== */

.isa-input:focus,
.isa-select:focus,
.isa-textarea:focus,
.isa-form-group input:focus,
.isa-form-group select:focus,
.isa-form-group textarea:focus,
.campo-atividade:focus,
.campo-entrada:focus,
.campo-saida:focus,
.campo-observacao:focus {

    border-color:
        var(--isa-azul);

    box-shadow:
        0 0 0 3px rgba(14, 50, 100, 0.09);

    background:
        var(--isa-branco);
}


/* =====================================================
   HOVER
   ===================================================== */

.isa-input:hover,
.isa-select:hover,
.isa-textarea:hover,
.campo-atividade:hover,
.campo-entrada:hover,
.campo-saida:hover,
.campo-observacao:hover {

    border-color:
        #B8C6D5;
}


/* =====================================================
   CAMPO DESABILITADO
   ===================================================== */

.isa-input:disabled,
.isa-select:disabled,
.isa-textarea:disabled,
.isa-form-group input:disabled,
.isa-form-group select:disabled,
.isa-form-group textarea:disabled {

    background:
        #F1F5F9;

    color:
        var(--isa-texto-terciario);

    cursor:
        not-allowed;
}


/* =====================================================
   TEXTO AUXILIAR
   ===================================================== */

.isa-form-group small {

    display:
        block;

    margin-top:
        7px;

    color:
        var(--isa-texto-secundario);

    font-size:
        12px;

    line-height:
        1.4;
}


/* =====================================================
   BOTÕES
   ===================================================== */

.isa-btn {

    min-height:
        42px;

    border:
        0;

    border-radius:
        var(--isa-raio-sm);

    padding:
        10px 18px;

    font-family:
        inherit;

    font-size:
        13px;

    font-weight:
        700;

    line-height:
        1;

    cursor:
        pointer;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    white-space:
        nowrap;

    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.1s ease;
}

.isa-btn:hover {

    box-shadow:
        var(--isa-sombra-sm);
}

.isa-btn:active {

    transform:
        translateY(1px);
}

.isa-btn:disabled {

    opacity:
        0.55;

    cursor:
        not-allowed;

    box-shadow:
        none;
}


/* =====================================================
   BOTÃO AZUL
   ===================================================== */

.isa-btn-secondary {

    background:
        var(--isa-azul);

    color:
        var(--isa-branco);
}

.isa-btn-secondary:hover {

    background:
        var(--isa-azul-hover);
}


/* =====================================================
   BOTÃO VERMELHO
   ===================================================== */

.isa-btn-primary {

    background:
        var(--isa-vermelho);

    color:
        var(--isa-branco);
}

.isa-btn-primary:hover {

    background:
        var(--isa-vermelho-hover);
}


/* =====================================================
   BOTÃO SECUNDÁRIO CLARO
   ===================================================== */

.isa-btn-light {

    background:
        var(--isa-superficie-secundaria);

    color:
        var(--isa-azul);

    border:
        1px solid var(--isa-borda);
}

.isa-btn-light:hover {

    background:
        #EEF2F6;
}


/* =====================================================
   STATUS
   ===================================================== */

.isa-status {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        28px;

    padding:
        5px 10px;

    border-radius:
        20px;

    font-size:
        12px;

    font-weight:
        700;

    white-space:
        nowrap;
}

.isa-status-sucesso {

    background:
        var(--isa-sucesso-fundo);

    color:
        var(--isa-sucesso);

    border:
        1px solid var(--isa-sucesso-borda);
}

.isa-status-alerta {

    background:
        var(--isa-alerta-fundo);

    color:
        var(--isa-alerta);

    border:
        1px solid var(--isa-alerta-borda);
}

.isa-status-erro {

    background:
        var(--isa-erro-fundo);

    color:
        var(--isa-erro);

    border:
        1px solid var(--isa-erro-borda);
}

.isa-status-info {

    background:
        var(--isa-info-fundo);

    color:
        var(--isa-info);

    border:
        1px solid var(--isa-info-borda);
}


/* =====================================================
   TABELAS
   ===================================================== */

.isa-table-wrapper {

    width:
        100%;

    overflow-x:
        auto;

    border:
        1px solid var(--isa-borda);

    border-radius:
        var(--isa-raio);

    background:
        var(--isa-branco);
}

.isa-table {

    width:
        100%;

    border-collapse:
        collapse;
}

.isa-table th {

    background:
        #F5F7FA;

    color:
        var(--isa-azul);

    padding:
        13px 14px;

    text-align:
        left;

    font-size:
        12px;

    font-weight:
        700;

    border-bottom:
        1px solid var(--isa-borda);
}

.isa-table td {

    padding:
        13px 14px;

    border-bottom:
        1px solid #EDF1F5;

    color:
        var(--isa-texto);

    font-size:
        13px;
}

.isa-table tbody tr:last-child td {

    border-bottom:
        none;
}

.isa-table tbody tr:hover {

    background:
        #F8FAFC;
}


/* =====================================================
   ATIVIDADES
   ===================================================== */

.atividade-card {

    background:
        var(--isa-branco);

    border:
        1px solid var(--isa-borda);

    border-radius:
        var(--isa-raio-lg);

    padding:
        24px;

    margin-top:
        18px;

    box-shadow:
        var(--isa-sombra-sm);

    transition:
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.atividade-card:hover {

    border-color:
        #CBD6E2;

    box-shadow:
        var(--isa-sombra);
}

.atividade-cabecalho {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap:
        20px;

    margin-bottom:
        22px;
}

.atividade-cabecalho h3 {

    margin:
        2px 0 0;

    color:
        var(--isa-azul);

    font-size:
        18px;
}

.atividade-numero {

    color:
        var(--isa-texto-terciario);

    font-size:
        11px;

    font-weight:
        700;

    letter-spacing:
        0.7px;

    text-transform:
        uppercase;
}


/* =====================================================
   FUNCIONÁRIOS
   ===================================================== */

.funcionarios-box {

    display:
        grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        10px;

    max-height:
        280px;

    overflow-y:
        auto;

    padding:
        4px;

    border:
        0;

    background:
        transparent;
}


/* =====================================================
   CARD DO FUNCIONÁRIO
   ===================================================== */

.funcionario-item {

    position: relative;

    display: flex;

    align-items: center;

    gap: 10px;

    min-height: 52px;

    padding: 8px 11px;

    border:
        1px solid var(--isa-borda);

    border-radius:
        var(--isa-raio);

    background:
        var(--isa-branco);

    cursor:
        pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.1s ease;
}

.funcionario-item:hover {

    border-color:
        #B9C8D8;

    background:
        #FAFCFE;

    box-shadow:
        var(--isa-sombra-sm);
}

.funcionario-item:has(input:checked) {

    border-color:
        var(--isa-azul);

    background:
        var(--isa-azul-claro);

    box-shadow:
        0 0 0 1px rgba(14, 50, 100, 0.08);
}


/* =====================================================
   CHECKBOX PERSONALIZADO
   ===================================================== */

.funcionario-item input {

    appearance: none;

    -webkit-appearance: none;

    flex: 0 0 auto;

    width: 18px;

    height: 18px;

    margin: 0;

    border:
        2px solid #B7C3D0;

    border-radius:
        4px;

    background:
        var(--isa-branco);

    cursor:
        pointer;

    position:
        relative;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.funcionario-item input:hover {

    border-color:
        var(--isa-azul);
}

.funcionario-item input:checked {

    background:
        var(--isa-azul);

    border-color:
        var(--isa-azul);
}

.funcionario-item input:checked::after {

    content:
        "";

    position:
        absolute;

    left:
        5px;

    top:
        2px;

    width:
        5px;

    height:
        10px;

    border:
        solid white;

    border-width:
        0 2px 2px 0;

    transform:
        rotate(45deg);
}


/* =====================================================
   INFORMAÇÕES
   ===================================================== */

.funcionario-info {

    min-width:
        0;

    display:
        flex;

    flex-direction:
        column;

    gap:
        3px;
}

.funcionario-nome {

    color:
        var(--isa-texto);

    font-size:
        14px;

    font-weight:
        700;

    line-height:
        1.2;
}

.funcionario-matricula {

    color:
        var(--isa-texto-secundario);

    font-size:
        11px;

    line-height:
        1.2;
}

.contador-funcionarios {

    margin-top:
        10px;

    color:
        var(--isa-azul);

    font-size:
        12px;

    font-weight:
        700;
}

.sem-funcionarios {

    grid-column:
        1 / -1;

    padding:
        22px;

    text-align:
        center;

    color:
        var(--isa-texto-secundario);

    background:
        var(--isa-superficie-secundaria);

    border:
        1px dashed var(--isa-borda-forte);

    border-radius:
        var(--isa-raio);
}


/* =====================================================
   REMOVER ATIVIDADE
   ===================================================== */

.btn-remover {

    border:
        0;

    background:
        transparent;

    color:
        var(--isa-erro);

    font-family:
        inherit;

    font-size:
        12px;

    font-weight:
        700;

    cursor:
        pointer;

    padding:
        6px 4px;
}

.btn-remover:hover {

    text-decoration:
        underline;
}


/* =====================================================
   RESUMO
   ===================================================== */

.resumo-box {

    display:
        flex;

    align-items:
        center;

    gap:
        6px;

    min-height:
        48px;

    padding:
        13px 15px;

    margin-top:
        20px;

    background:
        var(--isa-superficie-secundaria);

    border:
        1px solid var(--isa-borda);

    border-radius:
        var(--isa-raio);

    color:
        var(--isa-texto-secundario);

    font-size:
        13px;
}

.resumo-box strong {

    color:
        var(--isa-azul);
}


/* =====================================================
   AÇÕES
   ===================================================== */

.acoes-solicitacao {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        12px;

    margin-top:
        24px;

    padding-top:
        20px;

    border-top:
        1px solid #EDF1F5;
}


/* =====================================================
   MENSAGENS
   ===================================================== */

.mensagem {

    display:
        none;

    margin-top:
        18px;

    padding:
        12px 14px;

    border-radius:
        var(--isa-raio);

    font-size:
        13px;

    line-height:
        1.45;
}

.mensagem.erro {

    display:
        block;

    background:
        var(--isa-erro-fundo);

    color:
        var(--isa-erro);

    border:
        1px solid var(--isa-erro-borda);
}

.mensagem.sucesso {

    display:
        block;

    background:
        var(--isa-sucesso-fundo);

    color:
        var(--isa-sucesso);

    border:
        1px solid var(--isa-sucesso-borda);
}


/* =====================================================
   RODAPÉ
   ===================================================== */

.isa-footer {

    padding:
        22px 32px;

    text-align:
        center;

    color:
        var(--isa-texto-terciario);

    font-size:
        11px;

    border-top:
        1px solid var(--isa-borda);

    background:
        var(--isa-branco);

    margin-top:
        30px;
}


/* =====================================================
   RESPONSIVO
   ===================================================== */

@media (max-width: 900px) {

    .isa-container {
        padding:
            24px 20px;
    }

    .isa-grid-4,
    .isa-grid-3 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .funcionarios-box {

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;

        max-height: 260px;

        overflow-y: auto;

        padding: 2px;

        border: 0;

        background: transparent;
    }
}


@media (max-width: 700px) {

    .isa-header {

        min-height:
            68px;

        padding:
            0 18px;
    }

    .isa-logo {
        height:
            44px;
    }

    .isa-header-right {
        display:
            none;
    }

    .isa-container {

        padding:
            20px 16px;
    }

    .isa-page-header {

        flex-direction:
            column;

        align-items:
            stretch;
    }

    .isa-page-title h1 {

        font-size:
            24px;
    }

    .isa-grid-2,
    .isa-grid-3,
    .isa-grid-4 {

        grid-template-columns:
            1fr;
    }

    .isa-card {

        padding:
            20px;
    }

    .atividade-card {

        padding:
            18px;
    }

    .atividade-cabecalho {

        flex-direction:
            column;

        align-items:
            stretch;
    }

    .acoes-solicitacao {

        flex-direction:
            column-reverse;

        align-items:
            stretch;
    }

    .acoes-solicitacao .isa-btn {

        width:
            100%;
    }
}
/* =====================================================
   AJUSTE DOS CARDS DE FUNCIONÁRIOS — VERSÃO FINAL
   ===================================================== */

.funcionarios-box .funcionario-item {
    position: relative !important;

    display: flex !important;
    align-items: center !important;

    min-height: 58px !important;
    height: auto !important;

    padding: 9px 12px !important;
    margin: 0 !important;

    gap: 10px !important;

    border: 1px solid var(--isa-borda) !important;
    border-radius: 8px !important;

    background: var(--isa-branco) !important;

    box-sizing: border-box !important;
}

/* CHECKBOX */
.funcionarios-box .funcionario-item input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;

    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;

    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 20px !important;

    border: 2px solid #B7C3D0 !important;
    border-radius: 5px !important;

    background: #FFFFFF !important;

    position: relative !important;
    box-sizing: border-box !important;

    cursor: pointer !important;
}

/* CHECKBOX MARCADO */
.funcionarios-box .funcionario-item input[type="checkbox"]:checked {
    background: var(--isa-azul) !important;
    border-color: var(--isa-azul) !important;
}

/* VISTO */
.funcionarios-box .funcionario-item input[type="checkbox"]:checked::after {
    content: "" !important;

    position: absolute !important;

    left: 5px !important;
    top: 2px !important;

    width: 5px !important;
    height: 10px !important;

    border: solid #FFFFFF !important;
    border-width: 0 2px 2px 0 !important;

    transform: rotate(45deg) !important;
}

/* INFORMAÇÕES DO FUNCIONÁRIO */
.funcionarios-box .funcionario-info {
    display: flex !important;
    flex-direction: column !important;

    justify-content: center !important;

    min-width: 0 !important;

    gap: 2px !important;
}

/* NOME */
.funcionarios-box .funcionario-nome {
    display: block !important;

    margin: 0 !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    line-height: 1.2 !important;

    color: var(--isa-texto) !important;
}

/* MATRÍCULA */
.funcionarios-box .funcionario-matricula {
    display: block !important;

    margin: 0 !important;

    font-size: 10px !important;
    line-height: 1.2 !important;

    color: var(--isa-texto-secundario) !important;
}

/* CARD SELECIONADO */
.funcionarios-box .funcionario-item:has(input[type="checkbox"]:checked) {
    border-color: var(--isa-azul) !important;

    background: var(--isa-azul-claro) !important;

    box-shadow: 0 0 0 1px rgba(14, 50, 100, 0.08) !important;
}
.th-sort{cursor:pointer;user-select:none;position:relative;transition:background .15s ease}.th-sort:hover{background:#e8f0f8}.sort-icon{display:inline-block;margin-left:5px;font-size:9px;opacity:.55}.th-sort:hover .sort-icon{opacity:1}
.tabela-wrap{max-height:370px}.frete-table-wrap{max-height:300px}

/* CABEÇALHO PADRÃO ISA LOGÍSTICA — alinhado ao Workflow HE */
.isa-header{
  min-height:76px!important;height:76px!important;box-sizing:border-box;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:24px!important;padding:10px 28px!important;background:#fff!important;
  border-bottom:1px solid var(--isa-borda,#e5e7eb)!important;
  box-shadow:0 3px 16px rgba(0,0,0,.07)!important;
}
.isa-header>.isa-logo{flex:0 0 auto}
.isa-logo{max-height:48px!important;height:auto!important;width:auto!important;display:block!important}
.isa-header-right{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;flex:1!important;min-width:0!important}
.isa-header-home,.isa-header-logout{
  border:1px solid #d5dfeb;border-radius:9px;padding:9px 12px;background:#fff;
  color:var(--isa-azul,#1d4f91);font-family:inherit;font-size:12px;font-weight:800;
  cursor:pointer;white-space:nowrap;transition:.18s ease;text-decoration:none;
}
.isa-header-home:hover{background:var(--isa-azul,#1d4f91);color:#fff;border-color:var(--isa-azul,#1d4f91);text-decoration:none}
.isa-header-logout{background:#fff5f5;color:#a61b1b;border-color:#efcaca}
.isa-header-logout:hover{background:#a61b1b;color:#fff;border-color:#a61b1b}
.sessao-conteudo{text-align:right;line-height:1.25;min-width:0}
.sessao-boas-vindas{font-size:13px;color:var(--isa-texto,#263238);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}
.sessao-data{margin-top:4px;font-size:11px;color:var(--isa-texto-secundario,#687587);white-space:nowrap;display:flex;align-items:center;justify-content:flex-end;gap:5px}
.sessao-sep{opacity:.8}
.system-status-dot{width:11px;height:11px;border-radius:50%;display:inline-block;flex:0 0 11px}
.system-status-dot.online{background:#36a938;border:1px solid #268228}
.system-status-dot.stale{background:#e2b52d;border:1px solid #b88d14}
.system-status-dot.offline{background:#d64545;border:1px solid #ac2929}

/* Atualização discreta sob demanda */
.page-refresh.is-refreshing{opacity:.68;pointer-events:none}
.isa-refresh-toast{position:fixed;right:18px;bottom:18px;z-index:1000;max-width:min(420px,calc(100vw - 36px));padding:12px 14px;border-radius:10px;background:#123b65;color:#fff;font-size:13px;font-weight:600;box-shadow:0 10px 30px rgba(7,31,58,.22);opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s ease}
.isa-refresh-toast.show{opacity:1;transform:translateY(0)}
.isa-refresh-toast.erro{background:#9b1c1c}

@media(max-width:850px){
  .isa-header{padding:9px 16px!important;gap:10px!important}
  .isa-logo{max-height:42px!important}
  .sessao-boas-vindas{max-width:240px}
}
@media(max-width:650px){
  .isa-header{height:auto!important;min-height:104px!important;padding:10px 12px!important;align-items:flex-start!important}
  .isa-logo{max-height:48px!important;margin-top:12px}
  .isa-header-right{flex-wrap:wrap!important;justify-content:flex-end!important;gap:8px!important}
  .sessao-conteudo{order:3;width:100%;text-align:right}
  .sessao-data{font-size:10px;justify-content:flex-end;gap:4px}
  .sessao-boas-vindas{max-width:none;font-size:13px}
  .isa-header-home,.isa-header-logout{font-size:11px;padding:8px 9px}
  .isa-container{padding:18px 12px}
  .isa-refresh-toast{right:12px;bottom:12px;max-width:calc(100vw - 24px)}
}


/* Contenção de tabelas, cards e filtros: a página não recebe a largura da tabela. */
.isa-container,.isa-card,.grid,.home,.kpis,.age-dashboard,.chart-wrap,.grafico-wrap{min-width:0;max-width:100%;box-sizing:border-box}
.isa-card>*,.kpi,.modulo,.isa-form-group{min-width:0}
.wrap,.subwrap,.ics-dia,.isa-table-wrapper{max-width:100%;min-width:0;overflow:auto;overscroll-behavior:contain}
canvas{max-width:100%}
.chart-head,.table-head,.just-head,.chart-tools,.table-tools,.just-tools,.filtros,.filtros-extra{flex-wrap:wrap}
.reason-name{white-space:normal!important;overflow-wrap:anywhere}
.reason-value{white-space:normal;line-height:1.5}
thead th{cursor:pointer;user-select:none}
.tab th.sortable:after{content:none!important}
.modal-backdrop{box-sizing:border-box;padding:12px!important}
.modal{display:flex;flex-direction:column;width:min(1100px,100%)!important;max-height:calc(100dvh - 24px)!important;min-width:0}
.modal-head{gap:12px;flex:0 0 auto}.modal-head>div{min-width:0;overflow-wrap:anywhere}.modal-close{flex:0 0 36px;min-height:36px}
.modal-body{min-height:0;overflow:auto;max-height:none!important}.subwrap{max-height:65dvh!important}
@media(max-width:650px){
 .isa-card{padding:14px}.isa-page-title h1{font-size:23px;overflow-wrap:anywhere}
 .kpi strong{font-size:21px}.bar,.chart-head,.table-head,.just-head{flex-direction:column;align-items:stretch!important;gap:10px}
 .filtros,.filtros-extra{grid-template-columns:minmax(0,1fr)!important}
 .chart-tools,.table-tools,.just-tools{width:100%;gap:8px}
 .isa-input,.isa-select,.slicer-search{max-width:100%;min-width:0!important;width:100%}
 .slicer-head{align-items:stretch}.slicer-search{flex-basis:100%}
 .reason-list{grid-template-columns:minmax(0,1fr)!important}
 .reason-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;font-size:11px!important}
 .reason-track{grid-column:1/-1;grid-row:2}.reason-value{grid-column:2;grid-row:1}
 .age-dashboard{grid-template-columns:minmax(0,1fr)!important}.pie-box{min-width:0}
 .modal-head{padding:12px!important}.modal-head strong{font-size:14px!important}
 .modal-body{padding:0 8px 8px!important}.sessao-boas-vindas{white-space:normal}
 .chart-note,.chart-legend{line-height:1.5}.chart-wrap{height:390px!important}
}

.age-badge{display:inline-block;white-space:nowrap;border-radius:7px;padding:5px 9px;font-size:12px;font-weight:800;color:#243b2b}.age-badge-0-4{background:#d5edca}.age-badge-5-10{background:#ffe066;color:#5d4800}.age-badge-11-20{background:#f4a261;color:#60340e}.age-badge-21plus{background:#c82929;color:#fff}
.history-chart{height:310px;min-width:0}.history-chart canvas{display:block;width:100%;height:100%}.history-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12px;margin:14px 0}.history-legend span{display:flex;align-items:center;gap:5px}.history-legend i{width:16px;height:3px;display:inline-block}

.candidate-modal .subtable{width:max-content;min-width:1800px}.candidate-modal .subtable th,.candidate-modal .subtable td{white-space:nowrap}.candidate-modal .subtable td:last-child{white-space:normal;min-width:300px;max-width:420px;line-height:1.45}

/* Controles compartilhados de seleção e visão. */
.isa-segment{display:inline-flex;gap:0;border:1px solid var(--isa-borda,#bccbd9);border-radius:10px;overflow:hidden;align-self:center}.isa-segment button{background:var(--isa-branco,#fff);color:var(--isa-texto,#173f70);border:0;padding:10px 18px;font-weight:700;cursor:pointer}.isa-segment button[aria-pressed=true]{background:#173f70;color:#fff}.isa-segment button:focus-visible,.isa-select-action:focus-visible{outline:3px solid #d9a436;outline-offset:-3px}.isa-selection-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.isa-selection-actions .isa-select-action{display:inline-flex;align-items:center;justify-content:center;min-height:36px;height:auto;padding:7px 12px;border:1px solid var(--isa-borda,#bccbd9);border-radius:8px;background:var(--isa-branco,#fff);color:var(--isa-texto,#173f70);font:600 13px Arial;cursor:pointer;white-space:nowrap}.isa-selection-actions .isa-select-action:hover{background:var(--isa-azul-claro,#eaf2fa)}.isa-select-action:disabled{opacity:.5;cursor:default}.isa-selection-count{color:var(--isa-texto-secundario,#64748b);font-size:12px}.checklist-ic{display:flex;align-items:flex-start;gap:9px;padding:9px;border-bottom:1px solid var(--isa-borda,#d4dce5);line-height:1.5}.checklist-ic input{margin-top:4px;flex:none}.otd-reason-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.otd-reason-columns .wrap{min-width:0}@media(max-width:700px){.otd-reason-columns{grid-template-columns:1fr}.isa-selection-actions{gap:7px}.isa-selection-actions .isa-select-action{flex:1}.isa-segment button{padding:10px 16px}}

.otd-reason-table{table-layout:fixed;width:100%}.otd-reason-table th:first-child{width:42%}.otd-reason-table th:nth-child(2){width:12%}.otd-reason-table th:nth-child(3){width:26%}.otd-reason-table th:nth-child(4){width:20%}.otd-reason-table td:first-child{white-space:normal;overflow-wrap:anywhere}.otd-reason-table .btn-detalhe{white-space:normal;max-width:100%;overflow-wrap:anywhere;text-align:left}.carteira-nav{display:inline-flex;margin:8px 0 14px;scroll-margin-top:150px}#carteiraProducao{scroll-margin-top:150px}

#carteiraProducao .tabela{min-width:1500px;width:max-content}#carteiraProducao .tabela :is(th,td){white-space:nowrap}#carteiraProducao .tabela td:nth-child(2){min-width:180px}

#otdHistorico .otd-reason-table{min-width:0;width:100%;max-width:100%}#otdHistorico .otd-reason-table td{white-space:normal;overflow-wrap:anywhere}
.header-reference{font-size:11px;line-height:1.5;color:var(--muted,#526678);text-align:right}.header-reference span{display:inline-block}.header-reference .header-clock{font-variant-numeric:tabular-nums;margin-left:7px}.isa-header-right{flex-wrap:wrap}.sessao-conteudo{min-width:0}
@media(max-width:650px){.header-reference{font-size:9px;text-align:right;overflow-wrap:normal;line-height:1.4}.sessao-conteudo{flex:1 1 180px}.isa-header{height:auto;min-height:104px}.isa-header>.isa-logo{width:105px!important;max-width:28vw!important}.isa-header-right{gap:4px!important}.isa-header-home,.isa-header-logout{font-size:10px!important;padding:6px!important}.sessao-boas-vindas{font-size:11px!important}}
#kEntregasPedido{text-align:left;font-family:inherit;cursor:pointer;width:100%}#kEntregasPedido:focus-visible{outline:3px solid #7394b9;outline-offset:2px}

/* Seletor de equipe sempre visível junto ao período. */
.emb-press-filter{padding:10px 12px;border:1px solid #98b3cd;border-radius:10px;background:#edf4fb}.emb-press-filter label{font-weight:700}.emb-press-filter select{min-width:175px}:root[data-theme=dark] .emb-press-filter{background:#152b40}

/* R17: gráficos contidos na largura disponível, inclusive em modais. */
@media(max-width:850px){
 :is(.chart-wrap,.grafico-wrap,.history-chart,.op-chart,.closing-chart,.closing-daily-chart){width:100%;min-width:0!important;max-width:100%;box-sizing:border-box;overflow-x:clip!important}
 :is(.chart-wrap,.grafico-wrap,.history-chart,.op-chart,.closing-chart,.closing-daily-chart)>:is(canvas,svg){display:block;min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box}
 :is(.closing-panel,.closing-daily-grid>section,.quality-pair>section,.op-panel){min-width:0;max-width:100%;box-sizing:border-box}
}
