/*
 * bs4-compat.css — aparencia Bootstrap 4 sobre o Bootstrap 5.3.
 *
 * Carregar DEPOIS do CSS do Bootstrap 5 e ANTES do design-system.css/theme
 * (o Material 3 continua sobrescrevendo .badge-*, .alert-*, .close etc.).
 * Enquanto os templates nao forem migrados (Task 4), as classes BS4 abaixo
 * precisam continuar com o visual e o comportamento do BS4.
 *
 * Fonte das classes: app_chatguard/bs5_mapping.py (TABELA_CLASSES).
 * Casos com mudanca de marcacao estao em CLASSES_MANUAIS e recebem apenas
 * o alias visual aqui.
 */

/* --- Espacamento: ml/mr/pl/pr -> ms/me/ps/pe (mesmos valores do BS4) --- */
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.ml-auto { margin-left: auto !important; }
.ml-n1 { margin-left: -.25rem !important; }
.ml-n2 { margin-left: -.5rem !important; }
.ml-n3 { margin-left: -1rem !important; }
.ml-n4 { margin-left: -1.5rem !important; }
.ml-n5 { margin-left: -3rem !important; }
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }
.mr-auto { margin-right: auto !important; }
.mr-n1 { margin-right: -.25rem !important; }
.mr-n2 { margin-right: -.5rem !important; }
.mr-n3 { margin-right: -1rem !important; }
.mr-n4 { margin-right: -1.5rem !important; }
.mr-n5 { margin-right: -3rem !important; }
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: .25rem !important; }
.pr-2 { padding-right: .5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

@media (min-width: 576px) {
  .ml-sm-0 { margin-left: 0 !important; }
  .ml-sm-1 { margin-left: .25rem !important; }
  .ml-sm-2 { margin-left: .5rem !important; }
  .ml-sm-3 { margin-left: 1rem !important; }
  .ml-sm-4 { margin-left: 1.5rem !important; }
  .ml-sm-5 { margin-left: 3rem !important; }
  .ml-sm-auto { margin-left: auto !important; }
  .ml-sm-n1 { margin-left: -.25rem !important; }
  .ml-sm-n2 { margin-left: -.5rem !important; }
  .ml-sm-n3 { margin-left: -1rem !important; }
  .ml-sm-n4 { margin-left: -1.5rem !important; }
  .ml-sm-n5 { margin-left: -3rem !important; }
  .mr-sm-0 { margin-right: 0 !important; }
  .mr-sm-1 { margin-right: .25rem !important; }
  .mr-sm-2 { margin-right: .5rem !important; }
  .mr-sm-3 { margin-right: 1rem !important; }
  .mr-sm-4 { margin-right: 1.5rem !important; }
  .mr-sm-5 { margin-right: 3rem !important; }
  .mr-sm-auto { margin-right: auto !important; }
  .mr-sm-n1 { margin-right: -.25rem !important; }
  .mr-sm-n2 { margin-right: -.5rem !important; }
  .mr-sm-n3 { margin-right: -1rem !important; }
  .mr-sm-n4 { margin-right: -1.5rem !important; }
  .mr-sm-n5 { margin-right: -3rem !important; }
  .pl-sm-0 { padding-left: 0 !important; }
  .pl-sm-1 { padding-left: .25rem !important; }
  .pl-sm-2 { padding-left: .5rem !important; }
  .pl-sm-3 { padding-left: 1rem !important; }
  .pl-sm-4 { padding-left: 1.5rem !important; }
  .pl-sm-5 { padding-left: 3rem !important; }
  .pr-sm-0 { padding-right: 0 !important; }
  .pr-sm-1 { padding-right: .25rem !important; }
  .pr-sm-2 { padding-right: .5rem !important; }
  .pr-sm-3 { padding-right: 1rem !important; }
  .pr-sm-4 { padding-right: 1.5rem !important; }
  .pr-sm-5 { padding-right: 3rem !important; }
}

@media (min-width: 768px) {
  .ml-md-0 { margin-left: 0 !important; }
  .ml-md-1 { margin-left: .25rem !important; }
  .ml-md-2 { margin-left: .5rem !important; }
  .ml-md-3 { margin-left: 1rem !important; }
  .ml-md-4 { margin-left: 1.5rem !important; }
  .ml-md-5 { margin-left: 3rem !important; }
  .ml-md-auto { margin-left: auto !important; }
  .ml-md-n1 { margin-left: -.25rem !important; }
  .ml-md-n2 { margin-left: -.5rem !important; }
  .ml-md-n3 { margin-left: -1rem !important; }
  .ml-md-n4 { margin-left: -1.5rem !important; }
  .ml-md-n5 { margin-left: -3rem !important; }
  .mr-md-0 { margin-right: 0 !important; }
  .mr-md-1 { margin-right: .25rem !important; }
  .mr-md-2 { margin-right: .5rem !important; }
  .mr-md-3 { margin-right: 1rem !important; }
  .mr-md-4 { margin-right: 1.5rem !important; }
  .mr-md-5 { margin-right: 3rem !important; }
  .mr-md-auto { margin-right: auto !important; }
  .mr-md-n1 { margin-right: -.25rem !important; }
  .mr-md-n2 { margin-right: -.5rem !important; }
  .mr-md-n3 { margin-right: -1rem !important; }
  .mr-md-n4 { margin-right: -1.5rem !important; }
  .mr-md-n5 { margin-right: -3rem !important; }
  .pl-md-0 { padding-left: 0 !important; }
  .pl-md-1 { padding-left: .25rem !important; }
  .pl-md-2 { padding-left: .5rem !important; }
  .pl-md-3 { padding-left: 1rem !important; }
  .pl-md-4 { padding-left: 1.5rem !important; }
  .pl-md-5 { padding-left: 3rem !important; }
  .pr-md-0 { padding-right: 0 !important; }
  .pr-md-1 { padding-right: .25rem !important; }
  .pr-md-2 { padding-right: .5rem !important; }
  .pr-md-3 { padding-right: 1rem !important; }
  .pr-md-4 { padding-right: 1.5rem !important; }
  .pr-md-5 { padding-right: 3rem !important; }
}

@media (min-width: 992px) {
  .ml-lg-0 { margin-left: 0 !important; }
  .ml-lg-1 { margin-left: .25rem !important; }
  .ml-lg-2 { margin-left: .5rem !important; }
  .ml-lg-3 { margin-left: 1rem !important; }
  .ml-lg-4 { margin-left: 1.5rem !important; }
  .ml-lg-5 { margin-left: 3rem !important; }
  .ml-lg-auto { margin-left: auto !important; }
  .ml-lg-n1 { margin-left: -.25rem !important; }
  .ml-lg-n2 { margin-left: -.5rem !important; }
  .ml-lg-n3 { margin-left: -1rem !important; }
  .ml-lg-n4 { margin-left: -1.5rem !important; }
  .ml-lg-n5 { margin-left: -3rem !important; }
  .mr-lg-0 { margin-right: 0 !important; }
  .mr-lg-1 { margin-right: .25rem !important; }
  .mr-lg-2 { margin-right: .5rem !important; }
  .mr-lg-3 { margin-right: 1rem !important; }
  .mr-lg-4 { margin-right: 1.5rem !important; }
  .mr-lg-5 { margin-right: 3rem !important; }
  .mr-lg-auto { margin-right: auto !important; }
  .mr-lg-n1 { margin-right: -.25rem !important; }
  .mr-lg-n2 { margin-right: -.5rem !important; }
  .mr-lg-n3 { margin-right: -1rem !important; }
  .mr-lg-n4 { margin-right: -1.5rem !important; }
  .mr-lg-n5 { margin-right: -3rem !important; }
  .pl-lg-0 { padding-left: 0 !important; }
  .pl-lg-1 { padding-left: .25rem !important; }
  .pl-lg-2 { padding-left: .5rem !important; }
  .pl-lg-3 { padding-left: 1rem !important; }
  .pl-lg-4 { padding-left: 1.5rem !important; }
  .pl-lg-5 { padding-left: 3rem !important; }
  .pr-lg-0 { padding-right: 0 !important; }
  .pr-lg-1 { padding-right: .25rem !important; }
  .pr-lg-2 { padding-right: .5rem !important; }
  .pr-lg-3 { padding-right: 1rem !important; }
  .pr-lg-4 { padding-right: 1.5rem !important; }
  .pr-lg-5 { padding-right: 3rem !important; }
}

@media (min-width: 1200px) {
  .ml-xl-0 { margin-left: 0 !important; }
  .ml-xl-1 { margin-left: .25rem !important; }
  .ml-xl-2 { margin-left: .5rem !important; }
  .ml-xl-3 { margin-left: 1rem !important; }
  .ml-xl-4 { margin-left: 1.5rem !important; }
  .ml-xl-5 { margin-left: 3rem !important; }
  .ml-xl-auto { margin-left: auto !important; }
  .ml-xl-n1 { margin-left: -.25rem !important; }
  .ml-xl-n2 { margin-left: -.5rem !important; }
  .ml-xl-n3 { margin-left: -1rem !important; }
  .ml-xl-n4 { margin-left: -1.5rem !important; }
  .ml-xl-n5 { margin-left: -3rem !important; }
  .mr-xl-0 { margin-right: 0 !important; }
  .mr-xl-1 { margin-right: .25rem !important; }
  .mr-xl-2 { margin-right: .5rem !important; }
  .mr-xl-3 { margin-right: 1rem !important; }
  .mr-xl-4 { margin-right: 1.5rem !important; }
  .mr-xl-5 { margin-right: 3rem !important; }
  .mr-xl-auto { margin-right: auto !important; }
  .mr-xl-n1 { margin-right: -.25rem !important; }
  .mr-xl-n2 { margin-right: -.5rem !important; }
  .mr-xl-n3 { margin-right: -1rem !important; }
  .mr-xl-n4 { margin-right: -1.5rem !important; }
  .mr-xl-n5 { margin-right: -3rem !important; }
  .pl-xl-0 { padding-left: 0 !important; }
  .pl-xl-1 { padding-left: .25rem !important; }
  .pl-xl-2 { padding-left: .5rem !important; }
  .pl-xl-3 { padding-left: 1rem !important; }
  .pl-xl-4 { padding-left: 1.5rem !important; }
  .pl-xl-5 { padding-left: 3rem !important; }
  .pr-xl-0 { padding-right: 0 !important; }
  .pr-xl-1 { padding-right: .25rem !important; }
  .pr-xl-2 { padding-right: .5rem !important; }
  .pr-xl-3 { padding-right: 1rem !important; }
  .pr-xl-4 { padding-right: 1.5rem !important; }
  .pr-xl-5 { padding-right: 3rem !important; }
}

/* --- Texto e flutuacao --- */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.float-left { float: left !important; }
.float-right { float: right !important; }

/* --- Tipografia --- */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-light { font-weight: 300 !important; }
.font-weight-lighter { font-weight: lighter !important; }
.font-weight-bolder { font-weight: bolder !important; }
.font-italic { font-style: italic !important; }

/* --- Tamanhos fixos de titulo do BS4 (o BS5 usa RFS/calc, que encolhe no mobile) --- */
.h1, h1 { font-size: 2.5rem; }
.h2, h2 { font-size: 2rem; }
.h3, h3 { font-size: 1.75rem; }
.h4, h4 { font-size: 1.5rem; }
.h5, h5 { font-size: 1.25rem; }
.h6, h6 { font-size: 1rem; }
.display-1 { font-size: 6rem; }
.display-2 { font-size: 5.5rem; }
.display-3 { font-size: 4.5rem; }
.display-4 { font-size: 3.5rem; }
.lead { font-size: 1.25rem; }

/* --- Espacamento dos componentes do BS4 ---
   O BS5.3 compactou paddings; restaurar os valores do BS4 4.0.0 (CSS da base).
   O design-system.css carrega depois e continua sobrescrevendo onde ja define. */
.card {
  --bs-card-spacer-y: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
  --bs-card-cap-padding-y: .75rem;
  --bs-card-cap-padding-x: 1.25rem;
}
.table > :not(caption) > * > * { padding: .75rem; }
/* .table-sm tem a mesma especificidade (0,1,1); sem esta regra o .75rem acima
   venceria e as tabelas compactas perderiam o padding de .3rem do BS4. */
.table-sm > :not(caption) > * > * { padding: .3rem; }

/* Listras/hover/active: o BS4 usa preto (invisivel no tema escuro); o BS5 pinta
   o overlay por box-shadow no * com `--bs-emphasis-color-rgb`, que vira branco
   no escuro. Anular no proprio * (mais forte que a variavel no .table, que o
   tema/outras regras do BS5 podem redefinir); a listra visivel fica por conta
   do design-system (2% branco/preto no tema), como no baseline BS4. */
.table {
  --bs-table-striped-bg: rgba(0, 0, 0, .05);
  --bs-table-hover-bg: rgba(0, 0, 0, .075);
  --bs-table-active-bg: rgba(0, 0, 0, .075);
  --bs-table-accent-bg: transparent;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: transparent;
  --bs-table-accent-bg: transparent;
}
.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: transparent;
  --bs-table-accent-bg: transparent;
}
.table-active,
.table-active > * {
  --bs-table-bg-state: transparent;
  --bs-table-accent-bg: transparent;
}
.table-active,
.table-active > th,
.table-active > td {
  background-color: rgba(0, 0, 0, .075);
}

/* O tema do DataTables (carregado DEPOIS do compat) pinta listra/hover com um
   box-shadow proprio e, em `:root[data-bs-theme=dark]`, troca --dt-row-stripe
   e --dt-row-hover por branco. Remove so os overlays de listra/hover (o
   design-system continua pintando a listra de 2%); .selected mantem o destaque. */
:root[data-bs-theme="dark"] {
  --dt-row-stripe: 0, 0, 0 !important;
  --dt-row-hover: 0, 0, 0 !important;
}
/* O tema do DataTables do BS4 zera o fundo da linha listrada (deixando so a
   listra de 2% do design-system no td); o tema do BS5 nao tem essa regra e o
   color-mix do .md3 aparece na linha. Replica o BS4 (especificidade maior). */
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) {
  background-color: transparent;
}
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1):not(.selected) > * {
  box-shadow: none !important;
}
table.dataTable.table-hover > tbody > tr:hover:not(.selected) > * {
  box-shadow: none !important;
}

.list-group-item { padding: .75rem 1.25rem; }
.alert { padding: .75rem 1.25rem; }
.page-link { padding: .5rem .75rem; }
.badge { padding: .25em .4em; }
.modal-footer { padding: 1rem; }
/* .form-text e bloco no BS4; no BS5 e inline e a ajuda do checkbox sobe para a mesma linha. */
.form-text { display: block; margin-top: .25rem; }

/* --- Badges (o BS5 nao define cor no .badge; contraste igual ao BS4) --- */
.badge-primary { color: #fff; background-color: #007bff; }
.badge-secondary { color: #fff; background-color: #6c757d; }
.badge-success { color: #fff; background-color: #28a745; }
.badge-danger { color: #fff; background-color: #dc3545; }
.badge-warning { color: #212529; background-color: #ffc107; }
.badge-info { color: #212529; background-color: #17a2b8; }
.badge-light { color: #212529; background-color: #f8f9fa; }
.badge-dark { color: #fff; background-color: #343a40; }
.badge-pill { border-radius: 10rem !important; }

/* --- Formularios --- */
.form-group { margin-bottom: 1rem; }

/* .form-row do BS4 usava gutter de 5px; o BS5 nao tem .form-row. */
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col,
.form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }

/* .form-inline removido no BS5: mesmo flex do BS4. */
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }
.form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
.form-inline .input-group,
.form-inline .custom-select { width: auto; }
.form-inline .form-group { display: flex; flex: 0 0 auto; flex-flow: row wrap; align-items: center; margin-bottom: 0; }
@media (min-width: 576px) {
  .form-inline label { display: flex; align-items: center; justify-content: center; margin-bottom: 0; }
  .form-inline .form-check { display: flex; align-items: center; justify-content: center; width: auto; padding-left: 0; }
  .form-inline .custom-control { align-items: center; justify-content: center; }
  .form-inline .custom-control-label { margin-bottom: 0; }
}

/* .form-check do BS4: o BS5 aumenta a linha (min-height:1.5rem + margin-bottom)
   e usa 1.5em de recuo, o que empurra cada checkbox ~5px para baixo. Restaura a
   caixa do BS4 sem mexer na aparencia (o accent azul e o mesmo). */
.form-check {
  position: relative;
  min-height: 0;
  margin-bottom: 0;
  padding-left: 1.25rem;
}
/* (0,2,0) empata com `.form-switch .form-check-input` do BS5 e vence por ordem;
   hoje nao ha .form-switch no projeto — se aparecer, tratar o layout dele aqui. */
.form-check .form-check-input {
  float: none;
  position: absolute;
  margin-top: .3rem;
  margin-left: -1.25rem;
}
.form-check-label { margin-bottom: 0; }
.form-check-inline { display: inline-flex; align-items: center; padding-left: 0; margin-right: .75rem; }
.form-check-inline .form-check-input { position: static; margin-top: 0; margin-right: .3125rem; margin-left: 0; }

/* .form-control-file/.form-control-range foram removidos no BS5. */
.form-control-file,
.form-control-range { display: block; width: 100%; }

/* .custom-select -> aparencia do .form-select do BS5. */
.custom-select {
  display: block;
  width: 100%;
  padding: .375rem 2.25rem .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color, #212529);
  background-color: var(--bs-body-bg, #fff);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px 12px;
  border: var(--bs-border-width, 1px) solid var(--bs-border-color, #ced4da);
  border-radius: var(--bs-border-radius, .25rem);
  appearance: none;
}
.custom-select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.custom-select:disabled { opacity: .6; }

/* .input-group-append/prepend: o BS5 so estiliza filhos diretos, e o wrapper
 * do BS4 esconde o botao dessa regra. Mantem flex e os raios externos. */
.input-group-append,
.input-group-prepend { display: flex; }
.input-group-prepend { margin-right: -1px; }
.input-group-append { margin-left: -1px; }
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-append > .btn,
.input-group > .input-group-append > .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* .btn-block: largura total como no BS4. */
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: .5rem; }

/* --- Utilidades removidas/renomeadas --- */
.no-gutters {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin-right: 0;
  margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

.sr-only,
.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.dropdown-menu-right { right: 0; left: auto; }
.dropdown-menu-left { right: auto; left: 0; }

.border-left { border-left: 1px solid var(--bs-border-color, #dee2e6) !important; }
.border-right { border-right: 1px solid var(--bs-border-color, #dee2e6) !important; }
.border-left-0 { border-left: 0 !important; }
.border-right-0 { border-right: 0 !important; }

.rounded-left {
  border-top-left-radius: var(--bs-border-radius, .25rem) !important;
  border-bottom-left-radius: var(--bs-border-radius, .25rem) !important;
}
.rounded-right {
  border-top-right-radius: var(--bs-border-radius, .25rem) !important;
  border-bottom-right-radius: var(--bs-border-radius, .25rem) !important;
}
.rounded-sm { border-radius: var(--bs-border-radius-sm, .2rem) !important; }
.rounded-lg { border-radius: var(--bs-border-radius-lg, .3rem) !important; }

/* .thead-dark/.thead-light: no BS5 a cor vem de .table-dark/.table-light. */
.thead-dark th { color: #fff; background-color: #343a40; border-color: #454d55; }
.thead-light th { color: #495057; background-color: #e9ecef; border-color: #dee2e6; }

/* --- Componentes com mudanca de marcacao (CLASSES_MANUAIS) --- */
/* .close: mantem o glyph &times; e o visual do BS4; a Task 4 troca por .btn-close. */
.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
}
.close:hover,
.close:focus { color: #000; text-decoration: none; opacity: .75; }
.close:not(:disabled):not(.disabled) { cursor: pointer; }
button.close { padding: 0; background-color: transparent; border: 0; appearance: none; }

.alert-dismissible { padding-right: 4rem; }
.alert-dismissible .close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: .75rem 1.25rem;
  color: inherit;
}

/* .card-deck removido no BS5: mesma distribuicao do BS4. */
.card-deck { display: flex; flex-flow: row wrap; margin-right: -15px; margin-left: -15px; }
.card-deck .card {
  display: flex;
  flex: 1 0 0%;
  flex-direction: column;
  margin-right: 15px;
  margin-left: 15px;
}

/* .media removido no BS5. */
.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }

/* --- Controles customizados do BS4 ---
   O crispy-bootstrap4 (pacote mantido por ora) emite .custom-control,
   .custom-checkbox, .custom-radio, .custom-switch, .custom-file e .custom-range
   em runtime; o lint de templates nao os ve. Sem estas regras os formularios
   crispy perdem o visual ao rodar sobre o BS5. Mecanica copiada do BS4 4.6. */
.custom-control {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5rem;
}
.custom-control-inline { display: inline-flex; margin-right: 1rem; }
.custom-control-input {
  position: absolute;
  left: 0;
  z-index: -1;
  width: 1rem;
  height: 1.25rem;
  opacity: 0;
}
.custom-control-input:checked ~ .custom-control-label::before {
  color: #fff;
  border-color: #007bff;
  background-color: #007bff;
}
.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25);
}
.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
  border-color: #80bdff;
}
.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
  color: #fff;
  border-color: #b3d7ff;
  background-color: #b3d7ff;
}
.custom-control-input[disabled] ~ .custom-control-label,
.custom-control-input:disabled ~ .custom-control-label { color: #6c757d; }
.custom-control-input[disabled] ~ .custom-control-label::before,
.custom-control-input:disabled ~ .custom-control-label::before { background-color: #e9ecef; }
.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
}
.custom-control-label::before {
  position: absolute;
  top: .25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  content: "";
  background-color: #fff;
  border: #adb5bd solid 1px;
}
.custom-control-label::after {
  position: absolute;
  top: .25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  content: "";
  background: no-repeat 50% / 50% 50%;
}
.custom-checkbox .custom-control-label::before { border-radius: .25rem; }
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
}
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
  border-color: #007bff;
  background-color: #007bff;
}
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e");
}
.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before,
.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before,
.custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before {
  background-color: rgba(0, 123, 255, .5);
}
.custom-radio .custom-control-label::before { border-radius: 50%; }
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.custom-switch { padding-left: 2.25rem; }
.custom-switch .custom-control-label::before {
  left: -2.25rem;
  width: 1.75rem;
  pointer-events: all;
  border-radius: .5rem;
}
.custom-switch .custom-control-label::after {
  top: calc(.25rem + 2px);
  left: calc(-2.25rem + 2px);
  width: calc(1rem - 4px);
  height: calc(1rem - 4px);
  background-color: #adb5bd;
  border-radius: .5rem;
  transition: transform .15s ease-in-out, background-color .15s ease-in-out,
    border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
  background-color: #fff;
  transform: translateX(.75rem);
}
.custom-file {
  position: relative;
  display: inline-block;
  width: 100%;
  height: calc(1.5em + .75rem + 2px);
  margin-bottom: 0;
}
.custom-file-input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: calc(1.5em + .75rem + 2px);
  margin: 0;
  opacity: 0;
}
.custom-file-input:focus ~ .custom-file-label {
  border-color: #80bdff;
  box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25);
}
.custom-file-input[disabled] ~ .custom-file-label,
.custom-file-input:disabled ~ .custom-file-label { background-color: #e9ecef; }
.custom-file-label {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: calc(1.5em + .75rem + 2px);
  padding: .375rem .75rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: .25rem;
}
.custom-file-label::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: block;
  height: calc(1.5em + .75rem);
  padding: .375rem .75rem;
  line-height: 1.5;
  color: #495057;
  content: "Browse";
  background-color: #e9ecef;
  border-left: inherit;
  border-radius: 0 .25rem .25rem 0;
}
.custom-range {
  width: 100%;
  height: 1.4rem;
  padding: 0;
  background-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}
.custom-range:focus { outline: none; }
.custom-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25);
}
.custom-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25);
}
.custom-range:focus::-ms-thumb {
  box-shadow: 0 0 0 1px #fff, 0 0 0 .2rem rgba(0, 123, 255, .25);
}
.custom-range::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  margin-top: -.25rem;
  background-color: #007bff;
  border: 0;
  border-radius: 1rem;
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out,
    box-shadow .15s ease-in-out;
  appearance: none;
  -webkit-appearance: none;
}
.custom-range::-webkit-slider-thumb:active { background-color: #b3d7ff; }
.custom-range::-webkit-slider-runnable-track {
  width: 100%;
  height: .5rem;
  color: transparent;
  cursor: pointer;
  background-color: #dee2e6;
  border-color: transparent;
  border-radius: 1rem;
}
.custom-range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  background-color: #007bff;
  border: 0;
  border-radius: 1rem;
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out,
    box-shadow .15s ease-in-out;
}
.custom-range::-moz-range-thumb:active { background-color: #b3d7ff; }
.custom-range::-moz-range-track {
  width: 100%;
  height: .5rem;
  color: transparent;
  cursor: pointer;
  background-color: #dee2e6;
  border-color: transparent;
  border-radius: 1rem;
}
.custom-range::-ms-thumb {
  width: 1rem;
  height: 1rem;
  background-color: #007bff;
  border: 0;
  border-radius: 1rem;
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out,
    box-shadow .15s ease-in-out;
}
.custom-range::-ms-thumb:active { background-color: #b3d7ff; }
.custom-range::-ms-track {
  width: 100%;
  height: .5rem;
  color: transparent;
  cursor: pointer;
  background-color: transparent;
  border-color: transparent;
  border-width: .5rem;
}
.custom-range::-ms-fill-lower { background-color: #dee2e6; border-radius: 1rem; }
.custom-range::-ms-fill-upper { background-color: #dee2e6; border-radius: 1rem; }
.custom-range:disabled::-webkit-slider-thumb { background-color: #adb5bd; }
.custom-range:disabled::-webkit-slider-runnable-track { cursor: default; }
.custom-range:disabled::-moz-range-thumb { background-color: #adb5bd; }
.custom-range:disabled::-moz-range-track { cursor: default; }
.custom-range:disabled::-ms-thumb { background-color: #adb5bd; }

/* Âncoras: o BS5 sublinha todo <a>; o BS4 só sublinhava no :hover. Hover só nos links sem classe: `a:hover` (0,1,1) venceria o
   `text-decoration:none` de .btn/.nav-link/.dropdown-item/.page-link (0,1,0), que o BS4 nunca
   sublinhava; links com classe fora desses componentes perdem o hover (aproximação aceita).
   Especificidade baixa de propósito (sem !important) para não vencer .btn/.nav-link/.dropdown-item/
   .page-link etc. A cor do link fica como está (BS5 #0d6efd contra BS4 #007bff, aceito).
   ATENÇÃO: ao apagar este arquivo (Task 6 Step 5), mover este bloco para o CSS próprio. */
a { text-decoration: none; }
a:not([class]):hover { text-decoration: underline; }
a:not([href]):not([tabindex]),
a:not([href]):not([tabindex]):hover { color: inherit; text-decoration: none; }
