/* Identidade Aura SST. Azul do portal e verde-agua da marca; camada final apos os estilos base. */
:root {
  --aura-primary: #0b5694;
  --adm-tab-accent: var(--aura-primary);
  --aura-primary-dark: #083e6d;
  --aura-text: #18384f;
  --aura-muted: #627384;
  --aura-background: #f5f9fb;
  --aura-surface: #fff;
  --aura-soft: #eef8fa;
  --aura-border: #dce7ed;
  --aura-focus: rgba(11, 86, 148, .2);
  --aura-accent: #4ed7bd;
  --primary: #0b5694;
}

body, #wrapper #content-wrapper {
  background-color: var(--aura-background);
}

#wrapper, #content-wrapper, #content, #content > .container-fluid,
#content .row > [class*="col-"], .card, .card-body, .tab-content, .tab-pane,
.dataTables_wrapper {
  min-width: 0;
  max-width: 100%;
}

/* Corrigir a largura flex em vez de recortar tabela, acoes ou foco. */
#wrapper #content-wrapper { overflow-x: visible; }
.dataTables_wrapper { width: 100%; }
.dataTables_wrapper > table.dataTable { width: 100% !important; max-width: 100%; }
.dataTables_wrapper td, .dataTables_wrapper th { overflow-wrap: anywhere; }
/* Tabelas responsivas recolhem colunas pela largura minima real: quebra so entre palavras. */
.dataTables_wrapper table[data-responsive="true"], .dataTables_wrapper table[data-op-responsive="true"] { table-layout: auto; }
.dataTables_wrapper table[data-responsive="true"] thead th,
.dataTables_wrapper table[data-op-responsive="true"] thead th { white-space: nowrap; }
.dataTables_wrapper table[data-responsive="true"] td,
.dataTables_wrapper table[data-op-responsive="true"] td { overflow-wrap: normal; word-break: normal; }
body div.dataTables_wrapper div.dataTables_filter label,
body div.dataTables_wrapper div.dataTables_length label { max-width: 100%; white-space: normal; }
body div.dataTables_wrapper div.dataTables_filter input { min-width: 0; max-width: 100%; }
.dataTables_wrapper .dataTables_length select { min-width: 4.25rem; padding-right: 1.75rem; }
body div.dataTables_wrapper div.dataTables_info,
body div.dataTables_wrapper div.dataTables_paginate { white-space: normal; overflow-wrap: anywhere; }
.dataTables_wrapper .pagination { flex-wrap: wrap; }

a, .btn-link { color: var(--aura-primary); }
a:hover { color: var(--aura-primary-dark); }
.text-primary { color: var(--aura-primary) !important; }
.border-left-primary { border-left-color: var(--aura-primary) !important; }
.border-bottom-primary { border-bottom-color: var(--aura-primary) !important; }
.bg-primary, .badge-primary, .page-item.active .page-link,
.nav-pills:not([role="tablist"], :has([data-toggle="tab"], [data-toggle="pill"], [data-bs-toggle="tab"], [data-bs-toggle="pill"])) .nav-link.active,
.nav-pills:not([role="tablist"], :has([data-toggle="tab"], [data-toggle="pill"], [data-bs-toggle="tab"], [data-bs-toggle="pill"])) .show > .nav-link {
  color: #fff !important;
  background-color: var(--aura-primary) !important;
  border-color: var(--aura-primary) !important;
}
.page-link { color: var(--aura-primary); }
.bg-gradient-primary {
  background-color: var(--aura-primary);
  background-image: linear-gradient(180deg, #0b5694 10%, #083e6d 100%);
}
.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--aura-primary);
  border-color: var(--aura-primary);
}

.sidebar .sidebar-brand { height: auto; min-height: 5rem; padding: 1rem .75rem; }
.aura-brand-logo { filter: brightness(0) invert(1); width: 158px; max-width: 100%; height: auto; }
.aura-brand-symbol { display: none; width: 42px; height: 42px; object-fit: contain; }
.sidebar.toggled .aura-brand-logo { display: none; }
.sidebar.toggled .aura-brand-symbol { display: block; }
.sidebar.sidebar-dark .nav-item .nav-link { color: rgba(255, 255, 255, .9); }
.sidebar.sidebar-dark .nav-item .nav-link i { color: rgba(255, 255, 255, .75); }
.sidebar.sidebar-dark .nav-item .nav-link:hover,
.sidebar.sidebar-dark .nav-item .nav-link:focus-visible,
.sidebar.sidebar-dark .nav-item.active .nav-link,
.sidebar.sidebar-dark .nav-item.active .nav-link i { color: #fff; }
.sidebar .nav-item .collapse .collapse-inner .collapse-item.active {
  color: var(--aura-primary);
  background-color: var(--aura-soft);
}

body.admin-user-module {
  --admin-user-primary: #0b5694;
  --admin-user-primary-soft: #eef8fa;
  --admin-user-border: #dce7ed;
  --admin-user-border-soft: #e7eff3;
  --admin-user-surface-soft: #f1f7fa;
  --admin-user-text: #30364a;
  --admin-user-muted: #627384;
}
body.admin-user-module .admin-user-page-header { background: linear-gradient(135deg, #fff, #eef8fa); }
body.admin-user-module .admin-user-page-header__icon { border-color: var(--aura-border); }
.topbar-page-heading-accent { background: var(--aura-primary); box-shadow: none; }
.topbar-page-heading-title { color: var(--aura-text); }
.card { border-color: var(--aura-border); }
.card-header, .table thead th { background-color: #f1f7fa; border-color: var(--aura-border); }

.btn-primary, .btn-primary:not(:disabled):not(.disabled):active {
  color: #fff; background: var(--aura-primary); border-color: var(--aura-primary);
}
.btn-primary:hover { background: var(--aura-primary-dark); border-color: var(--aura-primary-dark); }
.btn-project-standard { max-width: 100%; white-space: normal; }
.btn-outline-primary, .btn-project-standard.btn-primary,
.btn-project-standard.btn-outline-primary, body.admin-user-module .btn-primary {
  color: var(--aura-primary); background: transparent; border-color: var(--aura-primary);
}
body .btn-outline-primary:hover, body .btn-outline-primary:focus-visible,
body .btn-outline-primary:not(:disabled):not(.disabled):active,
body .btn-project-standard.btn-primary:hover, body .btn-project-standard.btn-primary:focus-visible,
body .btn-project-standard.btn-outline-primary:hover, body .btn-project-standard.btn-outline-primary:focus-visible,
body.admin-user-module .btn-primary:hover, body.admin-user-module .btn-primary:focus-visible {
  color: #fff; background: var(--aura-primary); border-color: var(--aura-primary);
}

/* O clique conserva o foco funcional, sem deixar o botao com aparencia de hover. */
.btn-outline-primary, .btn-project-standard.btn-primary { --aura-button-tone: #0b5694; }
.btn-outline-secondary, .btn-project-standard.btn-secondary { --aura-button-tone: #6c757d; }
.btn-outline-success, .btn-project-standard.btn-success { --aura-button-tone: #1cc88a; }
.btn-outline-danger, .btn-project-standard.btn-danger { --aura-button-tone: #e74a3b; }
.btn-outline-warning, .btn-project-standard.btn-warning { --aura-button-tone: #a56a00; }
.btn-outline-info, .btn-project-standard.btn-info { --aura-button-tone: #36b9cc; }
.btn-outline-dark, .btn-project-standard.btn-dark { --aura-button-tone: #5a5c69; }
.btn-outline-light, .btn-project-standard.btn-light { --aura-button-tone: #6c757d; }
@supports selector(:focus-visible) {
  body .btn-project-standard:not(.active):not(:hover):not(:active):focus:not(:focus-visible),
  body .btn[class*="btn-outline-"]:not(.active):not(:hover):not(:active):focus:not(:focus-visible) {
    color: var(--aura-button-tone, #6c757d);
    background: transparent;
    box-shadow: none !important;
  }
}

.form-control:focus, .custom-select:focus,
body.admin-user-module .form-control:focus, body.admin-user-module .custom-select:focus,
body.admin-user-module .bootstrap-select.show > .dropdown-toggle {
  border-color: var(--aura-primary);
  box-shadow: 0 0 0 .2rem var(--aura-focus);
}
.form-control.is-invalid:focus, .custom-select.is-invalid:focus,
.was-validated .form-control:invalid:focus, .was-validated .custom-select:invalid:focus {
  border-color: #e74a3b;
  box-shadow: 0 0 0 .2rem rgba(231, 74, 59, .2);
}
.form-control.is-valid:focus, .custom-select.is-valid:focus,
.was-validated .form-control:valid:focus, .was-validated .custom-select:valid:focus {
  border-color: #1cc88a;
  box-shadow: 0 0 0 .2rem rgba(28, 200, 138, .2);
}
body :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--aura-primary);
  outline-offset: 3px;
}
body .bootstrap-select > .dropdown-toggle:focus-visible { outline: 2px solid var(--aura-primary) !important; }
.sidebar :is(a, button):focus-visible, .aura-auth-brand a:focus-visible { outline-color: #fff; }
.card-filter.border-left-primary { --card-filter-color: #0b5694; }
.config-nav-card--primary { --config-nav-color: var(--aura-primary); --config-nav-soft: rgba(11, 86, 148, .12); }
.config-nav-card { border-color: var(--aura-border); }
.config-nav-section-title, .config-nav-card-name { color: var(--aura-text); }
.card-filter:hover, .card-filter:focus { transform: none; }
.card-filter:focus-visible { outline-offset: 3px; }

/* O balao nao intercepta o mouse. Icones mantem area de clique e a cor cinza. */
.tooltip { pointer-events: none; }
.table .text-secondary.nounderline {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.75rem; min-height: 1.75rem; vertical-align: middle;
  color: #6c757d !important; background: transparent; border: 0; padding: .15rem;
}
.table .text-secondary.nounderline > :is(i, svg) { pointer-events: none; }
.table .text-secondary.nounderline:hover { color: #495057 !important; }
.modal-content { border-color: var(--aura-border); border-radius: .65rem; }
.modal-header { background: #f1f7fa; border-color: var(--aura-border); }
.modal-title { color: var(--aura-text); }
.modal .close { opacity: .8; }

body.admin-user-auth-layout { height: auto; min-height: 100vh; overflow-x: visible; background: var(--aura-background); }
.aura-auth-shell { display: flex; min-height: 100vh; min-height: 100svh; }
.aura-auth-brand {
  display: flex; flex: 0 0 45%; align-items: center; justify-content: center;
  min-width: 0; padding: 3rem; text-align: center;
  background: linear-gradient(160deg, #0b5694, #083e6d);
}
.aura-auth-brand__content { max-width: 28rem; }
.aura-auth-brand__logo { filter: brightness(0) invert(1); width: 300px; max-width: 100%; height: auto; margin-bottom: 2rem; }
.aura-auth-brand__label { color: rgba(255,255,255,.85); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.aura-auth-brand__name { color: #fff; font-size: 2rem; font-weight: 700; line-height: 1.3; }
.aura-auth-brand__site { display: inline-block; margin-top: 1rem; }
.aura-auth-brand__site, .aura-auth-brand__site:hover { color: #fff; }
.aura-auth-form { display: flex; flex: 1; flex-direction: column; justify-content: center; min-width: 0; padding: 2.5rem 1.5rem; }
.aura-auth-form > .container-fluid { width: 100%; max-width: 560px; }
.aura-auth-form > .container-fluid .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
body.admin-user-auth-layout .login-panel { width: 100%; max-width: 450px; border-color: var(--aura-border); box-shadow: 0 12px 36px rgba(21,42,93,.07); }
body.admin-user-auth-layout .login-panel__title { color: var(--aura-text); letter-spacing: 0; }
body.admin-user-auth-layout .login-panel { padding: 0; }
body.admin-user-auth-layout .login-panel__header { background: linear-gradient(135deg, var(--aura-soft), #fff); }
body.admin-user-auth-layout .login-panel__icon { color: var(--aura-primary); background: var(--aura-soft); border-color: var(--aura-border); }
body.admin-user-auth-layout .login-panel .form-control:focus { border-color: var(--aura-primary); box-shadow: 0 0 0 .2rem var(--aura-focus); }
.aura-auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.25rem; margin-top: 1.75rem; color: var(--aura-muted); font-size: .8rem; }

/* A validacao continua visivel mesmo nos formularios com CSS especifico. */
body.admin-user-module .form-control.is-invalid:focus,
body.admin-user-module .custom-select.is-invalid:focus,
body.admin-user-module .was-validated .form-control:invalid:focus,
body.admin-user-module .was-validated .custom-select:invalid:focus {
  border-color: #e74a3b; box-shadow: 0 0 0 .2rem rgba(231, 74, 59, .2);
}
body.admin-user-module .form-control.is-valid:focus,
body.admin-user-module .custom-select.is-valid:focus,
body.admin-user-module .was-validated .form-control:valid:focus,
body.admin-user-module .was-validated .custom-select:valid:focus {
  border-color: #1cc88a; box-shadow: 0 0 0 .2rem rgba(28, 200, 138, .2);
}

@media (max-width: 767.98px) {
  .sidebar .aura-brand-logo { display: none; }
  .sidebar .aura-brand-symbol { display: block; }
  .aura-auth-shell { flex-direction: column; }
  .aura-auth-brand { flex: 0 0 auto; padding: 1.5rem 1rem; }
  .aura-auth-brand__logo { width: 190px; margin-bottom: .5rem; }
  .aura-auth-brand__label { margin-bottom: .4rem; font-size: .7rem; }
  .aura-auth-brand__name { font-size: 1.15rem; margin-bottom: 0; }
  .aura-auth-brand__site { margin-top: .65rem; font-size: .9rem; }
  .aura-auth-form { padding: 1.5rem .75rem; }
  .aura-auth-form > .container-fluid { padding: 0 .5rem; }
  body div.dataTables_wrapper div.dataTables_filter input { display: block; width: 100%; margin: .4rem 0 0; }
  body div.dataTables_wrapper div.dataTables_filter label { display: block; width: 100%; }
  body div.dataTables_wrapper div.dataTables_filter { flex-wrap: wrap; gap: .35rem; }
  .dataTables_filter .app-datatable-clear { max-width: 100%; }
}
@media (max-width: 575.98px) {
  #content > .container-fluid { padding-left: .75rem; padding-right: .75rem; }
  body #content .card-body { padding: .875rem; }
  .rs-registry-page .summary-card .card-body { flex-wrap: wrap; gap: .35rem; }
  .rs-registry-page .summary-card .card-body > i { margin-left: auto; }
  body .dataTables_wrapper table.dataTable.table:not(.access-matrix-table) tbody td { padding: .5rem .25rem; }
  body .dataTables_wrapper table.dataTable.table:not(.access-matrix-table) thead th { padding: .5rem 1.25rem .5rem .25rem; }
  body .dataTables_wrapper table.dataTable.table:not(.access-matrix-table) thead th.sorting_disabled { padding-right: .25rem; }
  .table .table-action-icon { margin-right: .25rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .card-filter, .btn-project-standard, .modal.fade .modal-dialog, .collapsing { transition: none; }
  .animated--grow-in, .animated--fade-in { animation: none; }
}

/* As cores semanticas continuam pertencendo a cada estado. */
.aura-auth-brand__label { color: var(--aura-accent); }
.card-filter { --card-filter-color: var(--aura-primary); transition: box-shadow .15s ease, background-color .15s ease; }
.summary-card { transition: box-shadow .15s ease, background-color .15s ease; }
.summary-card:hover, .summary-card:focus, .card-filter:hover, .card-filter:focus,
.chat-floating-button:hover, .chat-floating-button:focus { transform: none !important; }
.chat-floating-button { background: var(--aura-primary); }
.chat-floating-button.has-unread { background: var(--aura-primary-dark); }
.dataTables_wrapper .row > [class*="col-"] { min-width: 0; max-width: 100%; }
.dataTables_wrapper td:not(.text-nowrap), .dataTables_wrapper th:not(.text-nowrap) { white-space: normal; }
.bootstrap-select, .bootstrap-select > .dropdown-toggle { max-width: 100%; }
.bootstrap-select .filter-option-inner-inner { overflow: hidden; text-overflow: ellipsis; }
/* Filtros RS Data: mesma altura de input, inclusive Tags e periodo. */
.rs-filter-bar > div, .rs-filter-bar .bootstrap-select { min-width: 0; }
.rs-filter-bar label { display: block; }
.rs-filter-bar .bootstrap-select.form-control > .dropdown-toggle {
  height: 100%; padding: .375rem .75rem; font-size: inherit; line-height: 1.5;
  color: inherit; background-color: #fff; border: 1px solid #d1d3e2; border-radius: .35rem;
}
.rs-filter-bar .bootstrap-select > .dropdown-toggle .filter-option-inner-inner { white-space: nowrap; }
.rs-filter-bar .bootstrap-select .dropdown-menu { max-width: 100%; }
.rs-filter-bar .bootstrap-select .dropdown-menu .text { white-space: normal; overflow-wrap: break-word; }
.rs-filter-bar .bootstrap-select > .dropdown-toggle:focus,
.rs-filter-bar .bootstrap-select.show > .dropdown-toggle {
  border-color: var(--aura-primary); box-shadow: 0 0 0 .2rem var(--aura-focus);
}
.rs-filter-bar .bootstrap-select.disabled > .dropdown-toggle {
  background-color: #eaecf4; opacity: 1; cursor: not-allowed;
}
.rs-filter-bar .form-control[data-rs-range][readonly] { background-color: #fff; cursor: pointer; }
.table-action-icon { cursor: pointer; font: inherit; }
@media (prefers-reduced-motion: reduce) {
  .summary-card, .card-filter, .btn, .form-control, .custom-select, .chat-floating-button { transition: none; }
  .chat-floating-button.has-unread { animation: none; }
}
