/*================================================================================
	Item Name: Materialize - Material Design Admin Template
	Version: 5.0
	Author: PIXINVENT
	Author URL: https://themeforest.net/user/pixinvent/portfolio
================================================================================

NOTE:
------
PLACE HERE YOUR OWN CSS CODES AND IF NEEDED, OVERRIDE THE STYLES FROM THE OTHER STYLESHEETS.
WE WILL RELEASE FUTURE UPDATES SO IN ORDER TO NOT OVERWRITE YOUR STYLES IT'S BETTER LIKE THIS.  */

/* Aplica na Navbar, Footer e em qualquer elemento com a combinação de classes do tema */
nav.navbar-main.light-green.gmup,
nav.navbar-main.light-green.gmup-dark,
.light-green.gmup,
.light-green.gmup-dark,
footer.page-footer.light-green {
    background: #015901 !important; /* Fallback para navegadores antigos */
    background: linear-gradient(45deg, #015901, #03c303) !important;
}

/* Garante que o fundo do breadcrumbs-dark não interfira se estiver usando o gradiente */
.breadcrumbs-dark .breadcrumbs-wrapper.light-green {
    background: linear-gradient(45deg, #015901, #03c303) !important;
}

table.dataTable td {
    white-space: nowrap !important;
}

/* ColReorder: feedback visual ao arrastar colunas (identidade GMUP) */
.dt-columnReorder-helper {
    background: #015901 !important;
    background: linear-gradient(45deg, #015901, #03c303) !important;
}

/* Coluna Ações: sem setas de ordenação no cabeçalho (DataTables 1.10) */
table.dataTable thead th.no-sort:before,
table.dataTable thead th.no-sort:after {
    display: none !important;
}

table.dataTable thead th.no-sort {
    cursor: default !important;
}

/* GMUP: alinhamento do seletor de registros (lengthMenu) com os botões */
.dataTables_wrapper .dataTables_length {
    float: left !important;
    margin-right: 20px !important;
    margin-top: 5px !important;
}

.dataTables_length select {
    display: inline-block !important;
    width: auto !important;
    height: 2rem !important;
    margin: 0 5px !important;
}

/* GMUP: garantir visibilidade do length + pesquisa (sobrescreve tema / cache; carrega por último) */
#main .section-data-tables .dataTables_wrapper .dataTables_length,
#main .section-data-tables .dataTables_wrapper .dataTables_filter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#main .section-data-tables .dataTables_wrapper .dataTables_filter input[type="search"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 12rem !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0.5rem !important;
    line-height: 1.5 !important;
    height: auto !important;
}

/* GMUP: larguras estáveis (scrollX + ordenação); não afeta gradientes da marca */
#main .section-data-tables table.dataTable.tabela-gmup,
#main .section-data-tables table.dataTable.tabela-gmup-dt,
#main .section-data-tables table.dataTable#TabelaDados,
#main .section-data-tables table.dataTable#ListTable {
    table-layout: fixed !important;
    width: 100% !important;
}

#main .section-data-tables table.dataTable.tabela-gmup th,
#main .section-data-tables table.dataTable.tabela-gmup td,
#main .section-data-tables table.dataTable.tabela-gmup-dt th,
#main .section-data-tables table.dataTable.tabela-gmup-dt td {
    overflow: hidden;
    text-overflow: ellipsis;
}

table.dataTable td.truncate-cell,
table.dataTable th.truncate-cell {
    overflow: hidden;
    text-overflow: ellipsis;
}

#main .section-data-tables table.dataTable thead th.no-sort,
#main .section-data-tables table.dataTable tbody td.gmup-col-acoes {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 140px !important;
    box-sizing: border-box;
}

/* Lista OS (#TabelaDados): pílulas Categoria / Status sem corte; Urgência mais estreita */
#main .section-data-tables table.dataTable#TabelaDados thead th.gmup-col-categoria-pill,
#main .section-data-tables table.dataTable#TabelaDados tbody td.gmup-col-categoria-pill {
    min-width: 210px !important;
    width: 230px !important;
    overflow: visible !important;
    text-overflow: clip;
}

#main .section-data-tables table.dataTable#TabelaDados thead th.gmup-col-status-pill,
#main .section-data-tables table.dataTable#TabelaDados tbody td.gmup-col-status-pill {
    min-width: 180px !important;
    width: 200px !important;
    overflow: visible !important;
    text-overflow: clip;
}

#main .section-data-tables table.dataTable#TabelaDados thead th.gmup-col-urgencia,
#main .section-data-tables table.dataTable#TabelaDados tbody td.gmup-col-urgencia {
    min-width: 72px !important;
    width: 88px !important;
    max-width: 96px !important;
}

#main .section-data-tables table.dataTable#TabelaDados td.gmup-col-categoria-pill .gmup-cat-pill,
#main .section-data-tables table.dataTable#TabelaDados td.gmup-col-status-pill .chip {
    max-width: none;
    white-space: nowrap;
}

/* =============================================================================
   GMUP — ações de formulário CRUD (lista flex, primário / secundário)
   ============================================================================= */
.gmup-btn-row {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gmup-btn-row .gmup-btn-row-inline-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

/* Secundário (Cancelar/Voltar): mesma “linguagem” de movimento e sombra do primário */
.gmup-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 4px;
    color: #015901 !important;
    text-transform: none;
    padding: 0 16px;
    background: #eeeeee !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease, background-color 0.08s ease;
}

.gmup-btn-secondary i.left {
    color: #015901 !important;
    margin-right: 6px;
}

.gmup-btn-secondary:hover {
    filter: brightness(0.98);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
    background-color: #e8e8e8 !important;
}

.gmup-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    filter: brightness(0.96);
}

.gmup-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 4px;
    text-transform: none;
    padding: 0 16px;
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.gmup-btn-primary:hover {
    filter: brightness(0.98);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.gmup-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

/* Ajuda inline (tooltips em formulários) */
.gmup-help-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.gmup-help-inline .material-icons {
    color: #015901;
    font-size: 18px;
    vertical-align: middle;
}

.gmup-help-inline .tooltipped {
    display: inline-flex;
    align-items: center;
}

.material-tooltip {
    max-width: 320px;
}