﻿/* ==================== */
/*   RESET E BASE       */
/* ==================== */

body {
    font-family: 'Roboto', sans-serif !important;
    background-color: #ebebeb !important;
    margin: 0;
    padding: 0;
}

ol, ul, menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ==================== */
/*   UTILITÁRIOS        */
/* ==================== */

.a-none {
    color: inherit !important;
    text-decoration: inherit !important;
}

.flex-1 {
    flex: 1 1 0%;
}

.bg-opacity-85 {
    opacity: 0.85;
}

/* ==================== */
/*   TABELAS            */
/* ==================== */

table {
    font-size: 0.9em !important;
    line-height: 2em !important;
    background-color: transparent !important;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 1.15em;
    font-size: 0.9rem;
}

.icoInfotabelaResultados {
    position: absolute !important;
}

/* ==================== */
/*   CONTAINERS         */
/* ==================== */
@media (min-width: 1200px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl {
        max-width: 1024px;
    }
}

/* ==================== */
/*   FORMULÁRIOS        */
/* ==================== */

input[readonly], select[readonly] {
    background-color: #e1e1e1;
    border: 1px solid #e1e1e1;
    color: #c1c1c1;
}

    input[readonly]:focus, select[readonly]:focus {
        background-color: #EBEBEA;
        color: #616160;
        border: none;
        outline: none;
        box-shadow: none;
    }

.card-area {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.375rem !important;
}

.img-fluid-reverse {
    max-height: 100%;
    width: auto;
}

.text-grey {
    color: #616160; /* Cinza */
}

/* ==================== */
/*   BACKGROUND         */
/* ==================== */

.bg-externo {
    background-color: #F5F5F5 !important;
}

.bg-interno {
    background-color: #EBEBEA !important;
}

.bg-danger-light {
    background-color: #ff161f;
}

.bg-neutral-700 {
    --tw-bg-opacity: 1;
    background-color: rgb(64 64 64 / var(--tw-bg-opacity));
}

.card {
    background-color: transparent;
}

/* ==================== */
/*   INPUT GROUP        */
/* ==================== */

.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: -0.1em !important;
    background-color: #f8f9fa;
}

.btn-outline-secondary, .input-group-text {
    border-color: #d2d2d2 !important;
    color: #6c757d !important;
}

/* ==================== */
/*   BOTÕES             */
/* ==================== */

.btn {
    font-size: 0.9rem !important;
    line-height: 1.5rem !important;
}

.btn-danger {
    background-color: #E52C2D !important;
    color: #fff !important;
    border-color: #E52C2D !important;
}

    .btn-danger:hover {
        background-color: #d12424 !important;
        color: #fff !important;
        border-color: #d12424 !important;
    }

.btn-outline-danger {
    color: #E52C2D !important;
    background-color: #fff !important;
    border-color: #E52C2D !important;
}

    .btn-outline-danger:hover {
        background-color: #E52C2D !important;
        color: #fff !important;
        border-color: #E52C2D !important;
    }

.btn-link.gray {
    color: #555555;
    text-decoration: none;
}

/* ==================== */
/*   TÍTULOS            */
/* ==================== */

h1.title {
    display: flex;
    align-items: center;
    font: 500 20px / 28px Roboto, sans-serif !important;
    margin: 0;
}

    h1.title::before {
        content: '';
        width: 27px;
        height: 20px;
        background-image: url(/img/interface_padrao_2026/login/icone_logo_cdhu_titles.png);
        background-size: contain;
        background-repeat: no-repeat;
        margin-right: 10px;
    }

h1 .line {
    flex-grow: 1;
    height: 1px;
    background-color: #e52521;
    margin: 1rem 0 1rem 1rem;
}

h2.title {
    display: flex;
    align-items: center;
    font: 500 16px / 20px Roboto, sans-serif !important;
    margin: 30px 0 15px !important;
    padding: 0;
}

h2 .line {
    flex-grow: 1;
    height: 1px;
    background-color: #9e9e9e;
    margin: 1rem 0 1rem 1rem;
    opacity: 0.8;
}

/* ==================== */
/*   CARDS              */
/* ==================== */

.custom-bootstrap-card {
    border-color: rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem !important;
    padding: 10px;
    margin: 20px 0;
}

.custom-bootstrap-card-content {
    margin-top: 30px !important;
    padding: 10px;
}

/* ==================== */
/*   NAVBAR             */
/* ==================== */

.dropdown-menu {
    min-width: 12rem !important;
}

.nav-link {
    color: rgba(0, 0, 0, 0.95);
    font-size: 1em;
    padding: 0.8rem 0rem;
}

    .nav-link:hover {
        color: #0b090a;
    }

    .nav-link.active {
        border-radius: 0.5rem;
        color: #e61c21 !important;
    }

.nav-text {
    display: none;
}

@media (max-width: 768px) {
    .navbar .fa-solid, .navbar .svg-inline--fa {
        display: none;
    }

    .nav-link .nav-text {
        display: inline;
    }

    .dropdown-menu.show {
        background: #ebebeb;
        border-radius: 0;
        border: 0;
    }

    .navbar-collapse {
        margin-top: 0.7rem !important;
    }
}

.breadcrumb-item.active {
    font-weight: 700;
}

/* ==================== */
/*   FORMULÁRIOS (CONT.)*/
/* ==================== */

.label {
    font-size: 0.9rem;
}

.card-filtro {
    border: 0;
    background: #ebebeb;
    margin-top: 2em;
}

.card-dados {
    margin-top: 2em;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
}

.form-control, .form-select {
    padding: 0.575rem 0.55rem;
    line-height: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.175);
    font-size: 0.9rem !important;
}

.form-select {
    padding: 0.575rem 2.25rem 0.575rem .75rem !important;
    border: 1px solid rgba(0, 0, 0, 0.175) !important;
}

.form-control::placeholder {
    opacity: 0.5;
    color: #9e9e9e;
}

.form-group label {
    font-size: .8rem;
}

label {
    font-size: 0.9rem;
}

/* ==================== */
/*   SELECT2            */
/* ==================== */

.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.6em + .75rem + 2px);
    line-height: 1.7em;
    border: 1px solid #d2d2d2;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-size: 0.775rem !important;
    line-height: 1.67rem !important;
    color: #000 !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
    border-color: #d2d2d2;
    box-shadow: none;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #d2d2d2;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #d2d2d2;
    box-shadow: none;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__message {
    color: #6c757d;
    font-size: 0.8rem;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    line-height: 0.9;
}

.field-validation-error {
    font-size: 0.8rem;
}

/* ==================== */
/*   PAGINAÇÃO          */
/* ==================== */

.page-item:last-child .page-link {
    border-top-right-radius: var(--bs-pagination-border-radius);
    border-bottom-right-radius: var(--bs-pagination-border-radius);
}

.page-item:first-child .page-link {
    border-top-left-radius: var(--bs-pagination-border-radius);
    border-bottom-left-radius: var(--bs-pagination-border-radius);
}

.active > .page-link, .page-link.active {
    background-color: #0b090a;
    border-color: #0b090a;
}

.page-link {
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    color: #262625;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    margin: 0 0 2rem 0 !important;
}

/* ==================== */
/*   UTILITÁRIOS        */
/* ==================== */

.isDisabled {
    cursor: not-allowed;
    opacity: 0.5;
}

    .isDisabled > a {
        color: currentColor;
        display: inline-block;
        pointer-events: none;
        text-decoration: none;
    }

.table > :not(caption) > * > * {
    line-height: 1rem;
}

/* ==================== */
/*   TOOLTIPS (TIPPY)   */
/* ==================== */

.tippy-box {
    z-index: 2147483647 !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.tippy-content {
    background-color: #000 !important;
    color: #fff !important;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    max-width: 200px;
}

.tippy-arrow {
    color: #000 !important;
}

/* ==================== */
/*   DROPDOWN           */
/* ==================== */

.dropdown-item {
    padding: 0.6rem 1rem !important;
}

    .dropdown-item.active, .dropdown-item:active {
        background-color: #0c0c0c !important;
    }

/* ==================== */
/*   MENU FLUTUANTE     */
/* ==================== */

/* Variável global para fonte */
:root {
    --accessibility-font-size: 1rem;
}

/* Aplicar aumento de fonte apenas em conteúdo, não no menu */
body.accessibility-large-text,
body.accessibility-large-text h1,
body.accessibility-large-text h2,
body.accessibility-large-text h3,
body.accessibility-large-text h4,
body.accessibility-large-text h5,
body.accessibility-large-text h6,
body.accessibility-large-text p,
body.accessibility-large-text span,
body.accessibility-large-text li,
body.accessibility-large-text td,
body.accessibility-large-text .form-control,
body.accessibility-large-text .btn,
body.accessibility-large-text .card,
body.accessibility-large-text .table,
body.accessibility-large-text .navbar,
body.accessibility-large-text .breadcrumb {
    font-size: var(--accessibility-font-size) !important;
}

/* Resetar herança de fonte no menu */
.floating-menu,
.floating-menu *,
.floating-menu *::before,
.floating-menu *::after {
    font-size: 1rem !important;
    font-size: inherit !important;
}

.floating-menu {
    position: fixed;
    top: 50%;
    /* Remova o right: 10px do CSS para evitar conflito com JS */
    transform: translateY(-50%); /* não use translateX */
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: #262625;
    padding: 5px 5px 4px 5px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    cursor: grab;
    user-select: none;
    min-width: 38px;
    max-height: 80vh;
    transition: all 0.2s ease;
    will-change: transform;
    /* Evita que o menu ultrapasse a tela */
    max-width: calc(100vw - 20px);
}

    .floating-menu.collapsed {
        padding: 2px 5px 4px 5px;
    }

    .floating-menu button {
        background: none;
        border: none;
        color: white;
        font-size: 1rem;
        padding: 6px;
        border-radius: 5px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
        width: 38px;
        height: 38px;
        overflow: hidden;
    }

        .floating-menu button:hover {
            background-color: #ff0000;
        }

        .floating-menu button i,
        .floating-menu button .icon-overlay {
            font-size: 1.1rem !important;
        }

.icon-overlay {
    position: absolute;
    font-size: 0.7rem;
    right: 2px;
    bottom: 2px;
}

.floating-menu button .icon-overlay {
    font-size: 0.7rem !important;
}

.btn-collapse {
    margin-top: 4px;
}

    .btn-collapse button {
        width: 38px;
        height: 38px;
        padding: 7px;
    }

/* Menu expandido: botões de baixo para cima */
.floating-menu:not(.collapsed) {
    flex-direction: column-reverse;
}

    .floating-menu:not(.collapsed) .menu-buttons {
        order: 2;
    }

    .floating-menu:not(.collapsed) .btn-collapse {
        order: 1;
    }

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.floating-menu.collapsed .menu-buttons {
    display: none;
}

.tooltip {
    position: absolute;
    background-color: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10000;
}


/* Overlay escuro semi-transparente */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease-out;
}

/* Container do spinner */
.loader-spinner {
    width: 10px;
    height: 10px;
}

    /* Animação sutil de pulsação */
    .loader-spinner svg {
        width: 100%;
        height: 100%;
        animation: pulse 1.4s ease-in-out infinite alternate;
        transform-origin: center;
    }


@keyframes pulse {
    0% {
        transform: scale(0.9);
        fill: #E62E2F;
        filter: brightness(1) drop-shadow(0 0 4px rgba(230, 46, 47, 0.3));
    }

    100% {
        transform: scale(1.05);
        fill: #c42021;
        filter: brightness(0.9) drop-shadow(0 0 6px rgba(230, 46, 47, 0.2));
    }
}

.linha_rodape_governo {
    background-color: #df081c;
}

.rodape_governo {
    background-color: #010101;
}

.logo_rodape_governo {
    height: 90px;
    max-height: 90px;
}

@media (max-width: 768px) {
    .logo_rodape_governo {
        height: 75px;
        max-height: 75px;
    }
}

/* ==================== */
/*   DARK MODE          */
/* ==================== */
[data-bs-theme="dark"] {
    --bs-body-bg: #09090b;
    --bs-body-color: #ffffff;
    --bs-card-bg: #1e1e1e;
    --bs-btn-color: #fff;
    --bs-border-color: #444;
    --bs-table-color: #e0e0e0;
    --bs-table-bg: #1e1e1e;
    --bs-link-color: #bb86fc;
    --bs-link-hover-color: #ccaaff;
    --bs-input-bg: #18181b;
    --bs-input-border-color: #555;
    --bs-input-color: #e0e0e0;
    --bs-dropdown-bg: #1e1e1e;
    --bs-dropdown-color: #e0e0e0;
    --bs-dropdown-border-color: #444;
    --bs-breadcrumb-bg: #1e1e1e;
    --bs-breadcrumb-divider-color: #888;
}

    [data-bs-theme="dark"] body {
        background-color: var(--bs-body-bg) !important;
    }

    /* Fundos */
    [data-bs-theme="dark"] .bg-externo {
        background-color: #1a1a1a !important;
    }

    [data-bs-theme="dark"] .bg-interno {
        background-color: #252525 !important;
    }

    [data-bs-theme="dark"] .bg-danger-light {
        background-color: #b00000;
    }

    [data-bs-theme="dark"] .card-area {
        background-color: #18181b !important;
    }

    [data-bs-theme="dark"] .login-area-radius {
        background-color: #18181b !important;
    }

    /* Botões */
    [data-bs-theme="dark"] .btn-outline-secondary,
    [data-bs-theme="dark"] .input-group-text {
        border-color: #555 !important;
        color: #ccc !important;
        background-color: #18181b;
    }

    [data-bs-theme="dark"] .btn-danger {
        background-color: #b00000 !important;
        border-color: #b00000 !important;
    }

        [data-bs-theme="dark"] .btn-danger:hover {
            background-color: #900 !important;
        }

    [data-bs-theme="dark"] .btn-outline-danger {
        color: #ffffff !important;
        border-color: #27272a !important;
        background-color: transparent !important;
    }

        [data-bs-theme="dark"] .btn-outline-danger:hover {
            color: #ffffff !important;
            border-color: #71717a !important;
            background-color: #27272a !important;
        }

    [data-bs-theme="dark"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
        margin-left: -0.1em !important;
        background-color: #09090b;
    }

    [data-bs-theme="dark"] .btn-dark {
        --bs-btn-border-color: #27272a;
        --bs-btn-color: #d4d4d8;
        --bs-btn-bg: #27272a;
    }

        [data-bs-theme="dark"] .btn-dark:hover {
            --bs-btn-border-color: #3f3f46;
            --bs-btn-hover-color: #e4e4e7;
            --bs-btn-hover-bg: #3f3f46;
        }

    /* Formulários */
    [data-bs-theme="dark"] .form-control,
    [data-bs-theme="dark"] .form-select {
        background-color: #09090b !important;
        border-color: #52525b !important;
        color: #ffffff !important;
    }

        [data-bs-theme="dark"] .form-control::placeholder,
        [data-bs-theme="dark"] .form-select::placeholder {
            color: #aaa !important;
        }

    /* Títulos */
    [data-bs-theme="dark"] h1.title,
    [data-bs-theme="dark"] h2.title {
        color: #e0e0e0;
    }

    [data-bs-theme="dark"] h1 .line {
        background-color: #e62930;
    }

    [data-bs-theme="dark"] h2 .line {
        background-color: #e62930;
    }

    /* Tabelas */
    [data-bs-theme="dark"] table {
        color: #e0e0e0;
        border-color: #444;
    }

    [data-bs-theme="dark"] .table > :not(caption) > * > * {
        border-color: #444;
    }

    /* Cards */
    [data-bs-theme="dark"] .custom-bootstrap-card {
        border-color: #444;
    }

    /* Navbar */

    [data-bs-theme="dark"] .bg-white {
        background-color: #18181b !important;
    }

    [data-bs-theme="dark"] .nav-link {
        color: #fff !important;
    }

        [data-bs-theme="dark"] .nav-link:hover {
            color: #e62930;
        }

        [data-bs-theme="dark"] .nav-link.active {
            color: #e62930 !important;
        }

    /* Breadcrumb */
    [data-bs-theme="dark"] .breadcrumb-item.active {
        color: #e0e0e0;
    }

/* Select2 Dark Mode */
.select2-container--bootstrap-5 .select2-dropdown,
.select2-container--bootstrap-5 .select2-results__option {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

/* Tooltip no Dark Mode */
.tippy-box[data-theme~="dark"] .tippy-content {
    background-color: #333 !important;
    color: #fff !important;
}

/* Menu Flutuante no Dark Mode */
[data-bs-theme="dark"] .floating-menu {
    background-color: #ffff;
}

    [data-bs-theme="dark"] .floating-menu button {
        background-color: #d0d0d0;
        color: #18181b;
    }

        [data-bs-theme="dark"] .floating-menu button:hover {
            background-color: #18181b;
            color: #d0d0d0;
        }

[data-bs-theme="dark"] .bg-neutral-700 {
    background-color: #09090b !important;
}

[data-bs-theme="dark"] .login-custom-card {
    background-color: #18181b !important;
}

[data-bs-theme="dark"] .card {
    background-color: #27272a !important;
}

[data-bs-theme="dark"] .tippy-content {
    background-color: #fff !important;
    color: #000 !important;
}

[data-bs-theme="dark"] .tippy-arrow {
    color: #fff !important;
}

.form-check-input:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.form-control:disabled {
    background-color: var(--bs-secondary-bg) !important;
    opacity: 1 !important;
}

.alert {
    font-size: 0.9rem!important;
}

.valid-feedback {
    color: var(--bs-form-valid-color)!important;
}

.iframe-wrap {
    position: relative;    
    overflow: hidden;
}

    .iframe-wrap iframe {
        width: 100%;
        height: 600px;
        border: none;
        display: block;
        position: relative;
        z-index: 10;
        pointer-events: auto;
    }

label.form-control {
    background-color: #e8ecef;
    border: 1px solid rgba(0, 0, 0, 0.175);
    color: #383838;
    height: 39px;
}

.form-check-input[type=checkbox] {    
    border-color: #737373!important;
}

.espaço, .espaco {
    margin-bottom: 0.6rem;
}

.text-bold, .font-bold {
    font-weight: 600;
}

.form-check-label {
    margin-top: 0.3rem;
}

.form-check .form-check-input:has(input[type="radio"]) {
    border: transparent !important;
}