/* Estilo de cores personalizadas para o topo e barra principal */

:root {
  --topo-background: #ffffff;
  --topo-text: #3f3f3f;
  --barra-background: #f3f3f3;
  --barra-text-color: #3f3f3f;
  /* --barra-text-background: brown; */
  --barra-text-hover-color: #e19800;
  --barra-text-hover-background: #fff1d1;
  --barra-border-top: #d8d8d8;
  --barra-border-bottom: #d8d8d8;
  --barra-border-right: #d8d8d8;
  --barra-border-left: #d8d8d8;
}

div.topo-color, span.topo-color {
  background-color: var(--topo-background) !important;
  color: var(--topo-text) !important;
}

a.topo-color {
  color: var(--topo-text) !important;
}

div.barra {
  color: var(--barra-text-color) !important;
  background-color: var(--barra-background) !important;
  border-right-color: var(--barra-border-right) !important;
  border-left-color: var(--barra-border-left) !important;
  border-top: 2px solid var(--barra-border-top) !important;
  border-bottom: 2px solid var(--barra-border-bottom) !important;
  line-height: 2em;
}



.td-barra {
  padding: 5px;
  color: var(--barra-text-color) !important;
  /* background-color: white !important; */
}

.td-barra:hover {
  color: var(--barra-text-hover-color) !important;
  background-color: var(--barra-text-hover-background) !important;
}

a.barra-selected {
    color: var(--barra-text-hover-color) !important;
    background-color: var(--barra-text-hover-background) !important;
}

.td-barra-right {
  /* float: inline-end !important; */
  color: var(--barra-text-color) !important;
}

.login-screen {
  /* background-color: #D1D4DB; */
  background-image: url('../imgs/login-background.jpg') !important;
  background-size: cover !important;
  /* height: 100vh !important; */
}

#header_logo img {
width:150px;
}

/* Override sidebar theme colors to keep contrast on light/dark background */
.simai-theme .sidebar-wrapper {
  background: linear-gradient(180deg, #f8fafc 0%, #f2f5f9 100%) !important;
  border-right: 1px solid #dfe6ee !important;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08) !important;
}

.simai-theme .sidebar-wrapper-full {
  background: linear-gradient(180deg, #f8fafc 0%, #f2f5f9 100%) !important;
  border-right: 1px solid #dfe6ee !important;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.08) !important;
}

.simai-theme .sidebar-wrapper .sidebar-content {
  padding: 8px 8px 14px 8px;
}

.simai-theme .sidebar-wrapper .sidebar-item {
  border-top: 0 !important;
}

.simai-theme .sidebar-wrapper a:not(.dropdown-item),
.simai-theme .sidebar-wrapper .sidebar-header,
.simai-theme .sidebar-wrapper .sidebar-search input,
.simai-theme .sidebar-wrapper .sidebar-search i,
.simai-theme .sidebar-wrapper .sidebar-menu .header-menu span {
  color: #314155 !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu {
  padding-bottom: 14px;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu {
  margin: 4px 6px 10px 6px;
  padding: 0;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu > .row {
  margin: 6px !important;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  padding: 6px !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.035);
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu > .row > .col {
  padding-left: 4px !important;
  padding-right: 4px !important;
  min-width: 0;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu > .row > .col:first-child {
  flex: 1 1 auto;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu > .row > .col:last-child {
  flex: 0 0 auto;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu > .row > .col:first-child > span {
  display: block !important;
  width: 100%;
  padding: 2px 6px !important;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu .pin-sidebar {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border-radius: 9px;
  background: #f3f6fa !important;
  border: 1px solid #dde6ef !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  color: #4a5b6f !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu .pin-sidebar:hover {
  background: #eaf0f7 !important;
  border-color: #d3deea !important;
  color: #334155 !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .header-menu .pin-sidebar i {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-size: 12px !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu ul li {
  margin: 3px 6px;
}

.simai-theme .sidebar-wrapper .sidebar-menu ul li a {
  border-radius: 12px;
  padding: 7px 10px 7px 8px;
  border: 1px solid #edf2f7;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.simai-theme .sidebar-wrapper .sidebar-menu ul li a .menu-text {
  color: #3a4756 !important;
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0.005em;
}

.simai-theme .sidebar-wrapper a:not(.dropdown-item):hover,
.simai-theme .sidebar-wrapper .sidebar-menu li.active > a {
  color: #1f2a37 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%) !important;
  border-color: #dbe5ef !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06) !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu ul li > a i {
  background: linear-gradient(180deg, #eef2f7 0%, #e4eaf2 100%) !important;
  color: #314155 !important;
  border: 1px solid #d9e2ec;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  width: 32px;
  height: 32px;
  line-height: 32px;
  font-size: 12px;
  margin-right: 10px;
}

.simai-theme .sidebar-wrapper .sidebar-menu li.active > a .menu-text {
  color: #1f2a37 !important;
  font-weight: 600;
}

.simai-theme .sidebar-wrapper .sidebar-menu li.active > a i {
  background: linear-gradient(180deg, #fff4cf 0%, #ffe8aa 100%) !important;
  color: #b97800 !important;
  border-color: #efd496 !important;
  box-shadow: 0 3px 10px rgba(204, 138, 0, 0.12);
}

.simai-theme .sidebar-wrapper .sidebar-menu ul li a:hover .menu-text {
  color: #273444 !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown > a:after {
  color: #64748b !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu {
  margin-top: 4px;
  padding: 4px 4px 4px 8px;
  border-left: 1px dashed #d7e0ea;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  line-height: normal !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu ul {
  padding: 2px 0 !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li {
  margin: 2px 4px;
  padding-left: 12px !important;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li a {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  padding-top: 6px;
  padding-bottom: 6px;
  border: 1px solid #edf2f7;
}

.simai-theme .sidebar-wrapper .sidebar-menu .sidebar-dropdown .sidebar-submenu li a:before {
  color: #94a3b8;
  font-size: 7px !important;
  margin-right: 8px !important;
}

.simai-theme .sidebar-wrapper .sidebar-footer {
  background: rgba(247, 250, 252, 0.94) !important;
  border-top: 1px solid #dfe6ee !important;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.05) !important;
}

.simai-theme .sidebar-wrapper .sidebar-search > div {
  padding: 0.6rem 0.75rem 0.75rem 0.75rem;
}

.simai-theme .sidebar-wrapper .sidebar-search input {
  border-radius: 12px !important;
  border: 1px solid #dbe5ef !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.simai-theme .sidebar-wrapper .sidebar-search .input-group-append .input-group-text {
  border-radius: 0 12px 12px 0 !important;
  border-color: #dbe5ef !important;
  background: #eef3f8 !important;
  color: #475569 !important;
}

.simai-theme .sidebar-wrapper .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
  background: #cbd5e1 !important;
  border-radius: 999px !important;
}

.simai-theme .sidebar-wrapper .mCSB_scrollTools .mCSB_draggerRail {
  background: transparent !important;
}

.topo .text-white,
.topo .text-light {
  color: var(--topo-text) !important;
}

.barra .text-white,
.barra .text-light {
  color: var(--barra-text-color) !important;
}

.bg-anon {
  background-color: #ff0000 !important;
  color: #fff !important;
}

/* Contrast safety layer: prioritize readable foreground on brand backgrounds */
.btn-primary,
.btn-warning,
.btn-oc-orange,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #1f1f1f !important;
}

.btn-secondary,
.btn-info,
.btn-dark {
  color: #ffffff !important;
}

.bg-primary,
.bg-warning,
.bg-oc-orange,
.badge-primary,
.badge-warning,
.badge-oc-orange,
.badge.bg-primary,
.badge.bg-warning {
  color: #1f1f1f !important;
}

.bg-secondary,
.bg-info,
.bg-dark,
.badge-secondary,
.badge-info,
.badge-dark,
.badge.bg-secondary,
.badge.bg-info,
.badge.bg-dark {
  color: #ffffff !important;
}

.bg-info {
  background-color: #5b5b5b !important;
}

.text-muted {
  color: #555555 !important;
}
