/* ==========================================================================
   GUAXINIM Minuano 2.0 — modo escuro
   Ativado por <html data-theme="dark"> (definido no <head> a partir do cookie
   do usuário). Carregado depois de gx-ui.css. A barra vermelha, o hero e a
   curva Guaxinim continuam iguais: só as superfícies, textos e bordas mudam.
   ========================================================================== */

html[data-theme="dark"] {
    color-scheme: dark;

    --canvas: #0F1113;
    --surface: #17191C;
    --surface-2: #1F2226;
    --ink: #ECEFF2;
    --ink-2: #AEB6BF;
    --ink-3: #7D8690;
    --ink-50: #262A2F;
    --line: #32373D;

    --gx-red-fg: #FF5E64;
    --gx-red-700: #FF8C91;
    --gx-red-800: #FFB3B6;
    --gx-red-50: rgba(207, 1, 15, .20);
    --gx-red-100: rgba(207, 1, 15, .32);
    --gx-amber-700: #F5B94A;
    --gx-amber-50: rgba(239, 166, 29, .16);
    --success-50: rgba(46, 170, 99, .18);
    --info-50: rgba(58, 140, 214, .20);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .25);
    --shadow-2: 0 12px 32px rgba(0, 0, 0, .55);
    --ring: 0 0 0 4px rgba(255, 94, 100, .22);
}
html[data-theme="light"] { color-scheme: light; }

/* Transição suave ao trocar de tema */
html.gx-theme-anim,
html.gx-theme-anim *,
html.gx-theme-anim *::before,
html.gx-theme-anim *::after {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease !important;
}

/* ---------- Base e utilitários ---------- */
html[data-theme="dark"] body { background: var(--canvas); color: var(--ink); }
html[data-theme="dark"] ::selection { background: rgba(255, 90, 97, .35); color: #fff; }
html[data-theme="dark"] .text-success { color: #5FD08F !important; }
html[data-theme="dark"] .text-info { color: #7DB8EE !important; }
html[data-theme="dark"] .text-warning { color: #F5B94A !important; }
html[data-theme="dark"] .text-body, html[data-theme="dark"] .text-black { color: var(--ink) !important; }
html[data-theme="dark"] .text-black-50 { color: var(--ink-2) !important; }
html[data-theme="dark"] .bg-white { background-color: var(--surface) !important; }
html[data-theme="dark"] .bg-dark { background-color: #0A0C0D !important; }
html[data-theme="dark"] .border-dark { border-color: var(--line) !important; }
html[data-theme="dark"] .shadow, html[data-theme="dark"] .shadow-sm, html[data-theme="dark"] .shadow-lg { box-shadow: var(--shadow-1) !important; }
html[data-theme="dark"] hr { border-top-color: var(--line); }
html[data-theme="dark"] pre, html[data-theme="dark"] code { color: #F5C3C5; }
html[data-theme="dark"] kbd { background: var(--ink-50); color: var(--ink); }
html[data-theme="dark"] .img-thumbnail { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .jumbotron { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .close { color: var(--ink); text-shadow: none; }

/* Cores fixas escritas direto nos formulários (style="...") */
html[data-theme="dark"] [style*="background-color: #fff"], html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background: #fff"], html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background-color: #FFF"], html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background-color: #f9f9f9"], html[data-theme="dark"] [style*="background:#f9f9f9"],
html[data-theme="dark"] [style*="background-color: #f4f4f6"], html[data-theme="dark"] [style*="background-color: #F4F4F6"] {
    background-color: var(--surface) !important;
    color: var(--ink);
}
html[data-theme="dark"] [style*="background-color: #eee"], html[data-theme="dark"] [style*="background-color:#eee"],
html[data-theme="dark"] [style*="background-color: #ccc"], html[data-theme="dark"] [style*="background-color: #f0f8ff"],
html[data-theme="dark"] [style*="background-color:#f0f8ff"], html[data-theme="dark"] [style*="background-color: #F0F8FF"],
html[data-theme="dark"] [style*="background-color: rgba(195,195,195"], html[data-theme="dark"] [style*="background-color: rgba(195, 195, 195"] {
    background-color: var(--surface-2) !important;
    color: var(--ink);
}
html[data-theme="dark"] [style*="color: #333"], html[data-theme="dark"] [style*="color:#333"],
html[data-theme="dark"] [style*="color: #343a40"], html[data-theme="dark"] [style*="color: #47525d"],
html[data-theme="dark"] [style*="color: #000"], html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: black"] {
    color: var(--ink) !important;
}
html[data-theme="dark"] [style*="color: #676e8a"], html[data-theme="dark"] [style*="color: #888"] { color: var(--ink-2) !important; }
html[data-theme="dark"] [style*="box-shadow: 10px 10px 10px"] { box-shadow: var(--shadow-1) !important; }
html[data-theme="dark"] [style*="color: red"], html[data-theme="dark"] [style*="color:red"] { color: var(--gx-red-fg) !important; }

/* ---------- Estrutura ---------- */
html[data-theme="dark"] .gx-sidebar { box-shadow: 1px 0 0 var(--line); }
html[data-theme="dark"] .gx-nav__link:hover,
html[data-theme="dark"] .gx-nav__sublink:hover,
html[data-theme="dark"] .gx-sidebar__collapse:hover { background: var(--surface-2); }
html[data-theme="dark"] body.sidebar-main .gx-nav__group--single:hover .gx-nav__label { background: var(--ink); color: var(--canvas); }
html[data-theme="dark"] .gx-search__btn,
html[data-theme="dark"] .fm-search__adv { color: #CF010F; }
html[data-theme="dark"] .icon-btn:hover { background: #32373D; }
html[data-theme="dark"] .gx-profile__photo { border-color: var(--surface); }
html[data-theme="dark"] .gx-bottomnav { background: rgba(23, 25, 28, .94); box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .gx-totop { background: var(--surface-2); }
html[data-theme="dark"] .gx-backdrop { background: rgba(0, 0, 0, .6); }
/* no modo escuro o menu usa guaxinim-logo-dark.png (trocado pelo guaxinim-ui.js) */
html[data-theme="dark"] .stat--accent { box-shadow: 0 10px 24px rgba(207, 1, 15, .25); }
html[data-theme="dark"] #loading-center::after { background: linear-gradient(90deg, var(--gx-red) 0 35%, var(--ink-50) 35% 100%); background-size: 260% 100%; }
html[data-theme="dark"] .gx-auth__card { box-shadow: var(--shadow-2); }
html[data-theme="dark"] .gx-auth__logo { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .2)); }
html[data-theme="dark"] .gx-float-info { box-shadow: var(--shadow-2) !important; }
html[data-theme="dark"] .process-fav.text-secondary { color: #FFC928 !important; }

/* ---------- Cartões, formulários e botões ---------- */
html[data-theme="dark"] .card { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .content-page .card .card { border-color: var(--line); background: var(--surface-2); }
html[data-theme="dark"] .card-footer { background: var(--surface-2); }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] .custom-file-label { background-color: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .form-control:focus { background-color: var(--surface-2); }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] { background-color: #141619; color: var(--ink-2); }
html[data-theme="dark"] .custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23AEB6BF' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
}
html[data-theme="dark"] .custom-file-label::after { background: var(--ink-50); color: var(--ink); }
html[data-theme="dark"] .custom-control-label::before { border-color: #4A5058; background-color: var(--surface-2); }
html[data-theme="dark"] .input-group-text { background: var(--ink-50); border-color: var(--line); color: var(--ink-2); }
html[data-theme="dark"] label, html[data-theme="dark"] legend { color: inherit; }

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-light { color: var(--ink); background-color: var(--ink-50); border-color: var(--ink-50); }
html[data-theme="dark"] .btn-secondary:hover, html[data-theme="dark"] .btn-secondary:focus,
html[data-theme="dark"] .btn-default:hover, html[data-theme="dark"] .btn-default:focus,
html[data-theme="dark"] .btn-light:hover, html[data-theme="dark"] .btn-light:focus { color: var(--ink); background-color: #32373D; border-color: #32373D; }
html[data-theme="dark"] .btn-secondary:not(:disabled):not(.disabled):active,
html[data-theme="dark"] .btn-light:not(:disabled):not(.disabled):active,
html[data-theme="dark"] .show > .btn-secondary.dropdown-toggle { color: var(--ink); background-color: #3C424A; border-color: #3C424A; }
html[data-theme="dark"] .btn-secondary.disabled, html[data-theme="dark"] .btn-secondary:disabled { color: var(--ink-3); background-color: var(--ink-50); }
html[data-theme="dark"] .btn-dark { color: var(--ink); background-color: #32373D; border-color: #32373D; }
html[data-theme="dark"] .btn-dark:hover { background-color: #3C424A; border-color: #3C424A; color: #fff; }
html[data-theme="dark"] .btn-outline-secondary { color: var(--ink); background: transparent; border-color: var(--line); }
html[data-theme="dark"] .btn-outline-secondary:hover { background-color: var(--ink-50); color: var(--ink); }
html[data-theme="dark"] .btn-outline-success { color: #5FD08F; border-color: #2EAA63; }
html[data-theme="dark"] .btn-link { color: var(--gx-red-fg); }
html[data-theme="dark"] .modal-header .close:hover { background: #32373D; }

/* ---------- Badges, alertas, abas e tabelas ---------- */
html[data-theme="dark"] .badge-success { color: #6FD39A; }
html[data-theme="dark"] .badge-info { color: #7DB8EE; }
html[data-theme="dark"] .badge-warning { color: #F5C46A; }
html[data-theme="dark"] .badge-dark { background-color: #32373D; color: var(--ink); }
html[data-theme="dark"] .alert { background: var(--surface); }
html[data-theme="dark"] .alert-primary { background: var(--gx-red-50); }
html[data-theme="dark"] .alert-secondary, html[data-theme="dark"] .alert-warning { background: var(--gx-amber-50); color: #F5C46A; }
html[data-theme="dark"] .alert-success { background: var(--success-50); color: #7EDBA5; }
html[data-theme="dark"] .alert-info { background: var(--info-50); color: #8EC2F0; }
html[data-theme="dark"] .alert-danger { background: var(--gx-red-50); }
html[data-theme="dark"] .alert-dark { background: #0A0C0D; color: var(--ink); }
html[data-theme="dark"] .alert .close { color: inherit; }

html[data-theme="dark"] .nav-tabs .nav-link:hover, html[data-theme="dark"] .nav-tabs .nav-link:focus { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .nav-tabs .nav-link.active,
html[data-theme="dark"] .nav-tabs .nav-item.show .nav-link { background: var(--surface); }

html[data-theme="dark"] .table { color: var(--ink); }
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table .ligth th { background: #241416 !important; }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .025); }
html[data-theme="dark"] .table-hover tbody tr:hover,
html[data-theme="dark"] .table-striped tbody tr:hover { color: var(--ink); background-color: var(--gx-red-50); }
html[data-theme="dark"] .table-light, html[data-theme="dark"] .table-light > td, html[data-theme="dark"] .table-light > th,
html[data-theme="dark"] .thead-light th { background-color: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .table-bordered, html[data-theme="dark"] .table-bordered td, html[data-theme="dark"] .table-bordered th { border-color: var(--line); }
html[data-theme="dark"] .table-success, html[data-theme="dark"] .table-success > td { background-color: rgba(46, 170, 99, .16); }
html[data-theme="dark"] .table-danger, html[data-theme="dark"] .table-danger > td { background-color: rgba(207, 1, 15, .16); }
html[data-theme="dark"] .table-warning, html[data-theme="dark"] .table-warning > td { background-color: rgba(239, 166, 29, .16); }

/* ---------- Modais, menus e dicas ---------- */
html[data-theme="dark"] .modal-content { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .modal-backdrop { background-color: #000; }
html[data-theme="dark"] .modal-backdrop.show { opacity: .65; }
html[data-theme="dark"] .dropdown-menu { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
html[data-theme="dark"] .dropdown-item { color: var(--ink); }
html[data-theme="dark"] .dropdown-item:hover, html[data-theme="dark"] .dropdown-item:focus { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .dropdown-header { color: var(--ink-2); }
html[data-theme="dark"] .dropdown-divider { border-top-color: var(--line); }
html[data-theme="dark"] .list-group-item { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .list-group-item-action:hover { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .popover { background: var(--surface); }
html[data-theme="dark"] .popover-body { color: var(--ink); }
html[data-theme="dark"] .popover-header { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .tooltip-inner { background: var(--ink); color: #17191C; }

/* ---------- Plugins ---------- */
html[data-theme="dark"] .select2-container--bootstrap .select2-selection { background-color: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .select2-container--bootstrap .select2-dropdown { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
html[data-theme="dark"] .select2-container--bootstrap .select2-search--dropdown .select2-search__field { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .select2-container--bootstrap .select2-results__option { color: var(--ink); }
html[data-theme="dark"] .select2-container--bootstrap .select2-results__option[aria-selected="true"] { background: var(--surface-2); }
html[data-theme="dark"] .select2-container--bootstrap .select2-results__option[aria-disabled="true"] { color: var(--ink-3); }
html[data-theme="dark"] .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field { color: var(--ink); }
html[data-theme="dark"] .select2-container--bootstrap.select2-container--disabled .select2-selection { background-color: #141619; }

html[data-theme="dark"] .bootstrap-select > .dropdown-toggle,
html[data-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder,
html[data-theme="dark"] .bootstrap-select > .dropdown-toggle.btn-light { background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .bootstrap-select .dropdown-menu li a { color: var(--ink); }
html[data-theme="dark"] .bootstrap-select .dropdown-menu li a:hover { background: var(--surface-2); }
html[data-theme="dark"] .bootstrap-select .no-results { background: var(--surface-2); color: var(--ink-2); }

html[data-theme="dark"] .ts-wrapper .ts-control, html[data-theme="dark"] .ts-control { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .ts-control input { color: var(--ink); }
html[data-theme="dark"] .ts-control input::placeholder { color: var(--ink-3); }
html[data-theme="dark"] .ts-wrapper.disabled .ts-control { background: #141619; }
html[data-theme="dark"] .ts-dropdown { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
html[data-theme="dark"] .ts-dropdown .option, html[data-theme="dark"] .ts-dropdown .create, html[data-theme="dark"] .ts-dropdown .optgroup-header { background: transparent; color: var(--ink); }
html[data-theme="dark"] .ts-dropdown .optgroup-header { color: var(--ink-2); }

html[data-theme="dark"] .flatpickr-calendar { background: var(--surface); box-shadow: var(--shadow-2); }
html[data-theme="dark"] .flatpickr-months .flatpickr-month,
html[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
html[data-theme="dark"] .flatpickr-current-month input.cur-year { background: transparent; color: var(--ink); fill: var(--ink); }
html[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months option { background: var(--surface); }
html[data-theme="dark"] .flatpickr-months .flatpickr-prev-month, html[data-theme="dark"] .flatpickr-months .flatpickr-next-month { color: var(--ink); fill: var(--ink); }
html[data-theme="dark"] .flatpickr-weekdays, html[data-theme="dark"] span.flatpickr-weekday { background: transparent; color: var(--ink-3); }
html[data-theme="dark"] .flatpickr-day { color: var(--ink); }
html[data-theme="dark"] .flatpickr-day:hover { background: var(--ink-50); border-color: var(--ink-50); }
html[data-theme="dark"] .flatpickr-day.prevMonthDay, html[data-theme="dark"] .flatpickr-day.nextMonthDay, html[data-theme="dark"] .flatpickr-day.flatpickr-disabled { color: var(--ink-3); }
html[data-theme="dark"] .flatpickr-time input, html[data-theme="dark"] .flatpickr-time .flatpickr-am-pm { color: var(--ink); background: transparent; }
html[data-theme="dark"] .flatpickr-time { border-top-color: var(--line) !important; }
html[data-theme="dark"] .numInputWrapper span.arrowUp::after { border-bottom-color: var(--ink-2); }
html[data-theme="dark"] .numInputWrapper span.arrowDown::after { border-top-color: var(--ink-2); }

html[data-theme="dark"] div.dataTables_wrapper div.dataTables_filter input { background-color: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .dt-button-collection .dropdown-menu, html[data-theme="dark"] div.dt-button-info { background: var(--surface); color: var(--ink); }

html[data-theme="dark"] .jconfirm .jconfirm-box .jconfirm-buttons button.btn-default { background-color: var(--ink-50) !important; color: var(--ink) !important; }
html[data-theme="dark"] .jconfirm .jconfirm-box .jconfirm-buttons button.btn-default:hover { background-color: #32373D !important; }
html[data-theme="dark"] .jconfirm .jconfirm-bg { background-color: #000 !important; }

html[data-theme="dark"] .swal2-popup { background: var(--surface) !important; }
html[data-theme="dark"] .swal2-validation-message { background: var(--surface-2) !important; color: var(--ink) !important; }
html[data-theme="dark"] .swal2-input, html[data-theme="dark"] .swal2-textarea, html[data-theme="dark"] .swal2-select { background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .swal2-container.swal2-backdrop-show { background: rgba(0, 0, 0, .6) !important; }

html[data-theme="dark"] .fancybox__slide.has-iframe .fancybox__content { background: var(--canvas); }

html[data-theme="dark"] .fileuploader, html[data-theme="dark"] .fileuploader-theme-dragdrop .fileuploader-input { background: var(--surface-2); color: var(--ink); }
html[data-theme="dark"] .fileuploader-items .fileuploader-item { border-color: var(--line); }
html[data-theme="dark"] .fileuploader-items .fileuploader-item .column-title div { color: var(--ink); }
html[data-theme="dark"] .fileuploader-items .fileuploader-item .column-title span { color: var(--ink-2); }
html[data-theme="dark"] .tox.tox-tinymce { border-color: var(--line); }

/* Linha do tempo do processo */
html[data-theme="dark"] .tracking-item { color: var(--ink); }
html[data-theme="dark"] .tracking-item .tracking-date span, html[data-theme="dark"] .tracking-item .tracking-content span { color: var(--ink-2); }

/* ---------- Gerenciador de arquivos ---------- */
html[data-theme="dark"] .fm-table tbody tr:hover { background: var(--gx-red-50); }
html[data-theme="dark"] #snackbar { background: var(--ink); color: #17191C; }
html[data-theme="dark"] #snackbar i { color: #1F8A4C; }
html[data-theme="dark"] #snackbar.is-error i { color: #CF010F; }
html[data-theme="dark"] .filename a > i.fa-file-image, html[data-theme="dark"] .filename a > i.fa-file-excel { background: rgba(46, 170, 99, .18); color: #5FD08F; }
html[data-theme="dark"] .filename a > i.fa-file-zipper { background: rgba(160, 110, 60, .22); color: #D9A66E; }
html[data-theme="dark"] .filename a > i.fa-file-word { background: rgba(58, 120, 214, .2); color: #8EB6F0; }
html[data-theme="dark"] .filename a > i.fa-file-powerpoint { background: rgba(214, 90, 50, .2); color: #F29A7A; }
html[data-theme="dark"] .filename a > i.fa-file-video, html[data-theme="dark"] .filename a > i.fa-music, html[data-theme="dark"] .filename a > i.fa-file-audio { background: rgba(140, 100, 220, .2); color: #B89AF0; }
html[data-theme="dark"] .filename a > i.fa-file-code, html[data-theme="dark"] .filename a > i.fa-code, html[data-theme="dark"] .filename a > i.fa-html5, html[data-theme="dark"] .filename a > i.fa-css3-alt { color: #7DB8EE; }
html[data-theme="dark"] .fm-table tfoot .badge-light { background: var(--surface); }
html[data-theme="dark"] form.dropzone { background: var(--surface-2); }
html[data-theme="dark"] .dropzone .dz-preview.dz-image-preview { background: transparent; }
html[data-theme="dark"] #preview-image-plugin-overlay { background: var(--surface) !important; }
html[data-theme="dark"] ul#search-wrapper li:nth-child(odd) { background: var(--surface-2); }
html[data-theme="dark"] body.fm-login-page { background: linear-gradient(180deg, var(--gx-red) 0, var(--gx-red) 220px, var(--canvas) 220px); }

/* ---------- Seletor de tema ---------- */
.gx-theme-icon--dark { display: none; }
html[data-theme="dark"] .gx-theme-icon--light { display: none; }
html[data-theme="dark"] .gx-theme-icon--dark { display: inline-block; }

.gx-theme-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 14px 16px 0;
    padding: 4px;
    border-radius: 14px;
    background: var(--ink-50);
}
.gx-theme-switch__label { margin: 14px 16px -6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-align: left; }
.gx-theme-switch button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}
.gx-theme-switch button i { font-size: 14px; }
.gx-theme-switch button:hover { color: var(--ink); }
.gx-theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--gx-red-fg); box-shadow: var(--shadow-1); }

/* Botão flutuante nas telas de acesso */
.gx-theme-fab {
    position: fixed;
    top: calc(14px + var(--safe-top));
    right: 14px;
    z-index: 1050;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.gx-theme-fab:hover { background: rgba(255, 255, 255, .3); }
@media (min-width: 992px) {
    .gx-theme-fab { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
    .gx-theme-fab:hover { background: var(--surface-2); }
}

/* ---------- Guaxinim: dashboard no modo escuro ---------- */
html[data-theme="dark"] .gx-filtro, html[data-theme="dark"] .gx-filtro.btn-outline-primary:not(.active) { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
html[data-theme="dark"] .gx-filtro:hover { background: var(--gx-red-50); color: var(--gx-red-700); }
html[data-theme="dark"] .gx-filtro.active, html[data-theme="dark"] .gx-filtro.is-on, html[data-theme="dark"] .gx-filtro.btn-primary { background: var(--gx-red); border-color: var(--gx-red); color: #fff; }
html[data-theme="dark"] .gx-device { background: var(--surface); }
html[data-theme="dark"] .gx-device__head { background: #0A0C0D; }
html[data-theme="dark"] .gx-leitor + .gx-leitor { border-top-color: var(--line); }
html[data-theme="dark"] .gx-leitor__ip { color: var(--ink); }
html[data-theme="dark"] .icon-btn.is-on { background: #fff; color: var(--gx-red); }

/* ---------- Telas de acesso com a marcacao do template ---------- */
html[data-theme="dark"] body.gx-auth-legacy .card.auth-card { background: var(--surface) !important; }
html[data-theme="dark"] body.gx-auth-legacy .floating-label > label { color: var(--ink-2); }


/* ---------- Tom Select no modo escuro: borda e fundo solidos ---------- */
html[data-theme="dark"] .ts-wrapper .ts-control,
html[data-theme="dark"] .ts-wrapper.single .ts-control,
html[data-theme="dark"] .ts-wrapper.single.input-active .ts-control,
html[data-theme="dark"] .ts-wrapper.form-control .ts-control,
html[data-theme="dark"] .ts-wrapper.form-control.single.input-active .ts-control,
html[data-theme="dark"] .ts-wrapper.form-select .ts-control,
html[data-theme="dark"] .ts-wrapper.form-select.single.input-active .ts-control,
html[data-theme="dark"] .ts-wrapper.form-control:not(.disabled) .ts-control,
html[data-theme="dark"] .ts-wrapper.form-control:not(.disabled).single.input-active .ts-control,
html[data-theme="dark"] .ts-wrapper.form-select:not(.disabled) .ts-control,
html[data-theme="dark"] .ts-wrapper.form-select:not(.disabled).single.input-active .ts-control {
    background: var(--surface-2) !important;
    border-color: #3C424A !important;
    color: var(--ink);
}
html[data-theme="dark"] .ts-wrapper .ts-control:hover { border-color: #4A5058 !important; }
html[data-theme="dark"] .ts-wrapper.focus .ts-control,
html[data-theme="dark"] .ts-wrapper.dropdown-active .ts-control { border-color: #FF5E64 !important; }
html[data-theme="dark"] .ts-wrapper.disabled .ts-control { background: #141619 !important; }
html[data-theme="dark"] .ts-control .item { color: var(--ink); }
html[data-theme="dark"] .ts-dropdown,
html[data-theme="dark"] .ts-dropdown .ts-dropdown-content { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .ts-dropdown .option { color: var(--ink); }
html[data-theme="dark"] .ts-dropdown .active { background: rgba(207, 1, 15, .22); color: #FFB3B6; }

/* ---------- Icone do cabecalho dos cards ---------- */
html[data-theme="dark"] .header-title > i[class*="fa-"],
html[data-theme="dark"] .header-title > .btn-collapse > i[class*="fa-"],
html[data-theme="dark"] .modal-title > i[class*="fa-"]:first-child { background: rgba(207, 1, 15, .20); color: #FF5E64; }
html[data-theme="dark"] .header-title img[src*="guaxinim-ico.png"] { background: rgba(207, 1, 15, .20); }

/* ---------- Botoes do Guaxinim ---------- */
html[data-theme="dark"] .btn-black { background-color: #3C424A; border-color: #3C424A; }
html[data-theme="dark"] .btn-black:hover { background-color: #4A5058; border-color: #4A5058; }
/* seta do Tom Select mais visivel no escuro */
html[data-theme="dark"] .ts-wrapper.single .ts-control::after { border-color: #AEB6BF transparent transparent !important; }
html[data-theme="dark"] .ts-wrapper.single.dropdown-active .ts-control::after { border-color: transparent transparent #AEB6BF !important; }
/* icone do guaxinim nos cabecalhos: versao para fundo escuro */
html[data-theme="dark"] .header-title img[src*="guaxinim-ico.png"],
html[data-theme="dark"] .modal-title img[src*="guaxinim-ico.png"] { content: url("../images/guaxinim-ico-dark.png"); }

/* cron interno: textos dos selos legiveis no fundo escuro */
html[data-theme="dark"] .gx-cron-status--success,
html[data-theme="dark"] .gx-cron-pill--online { color: #5FD08D; }
html[data-theme="dark"] .gx-cron-status--info { color: #7DB8EE; }
html[data-theme="dark"] .gx-cron-status--dark { background: #ECEFF2; color: #0F1113; }
html[data-theme="dark"] .gx-footer__cron.is-online, html[data-theme="dark"] .gx-footer__cron.is-ocupado { color: #5FD08D; }
html[data-theme="dark"] .gx-console { background: #0B0C0E; border: 1px solid var(--line); }
