/* ==========================================================================
   BOOTSTRAP 5.3.8 - VERSÃO CUSTOMIZÁVEL E EDITÁVEL (NÚCLEO ESSENCIAL)
   ========================================================================== */

/* --- VARIÁVEIS DO SISTEMA (Altere aqui para mudar o tema global) --- */
:root {
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
  
  /* Cores Padrões que você pode editar */
  --bs-primary: #0d6efd;
  --bs-success: #198754;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
}

/* --- RESET & LAYOUT BASE --- */
*, ::after, ::before { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 500; line-height: 1.2; }
.display-6 { font-size: calc(1.375rem + 1.5vw); font-weight: 300; line-height: 1.2; }
@media (min-width: 1200px) { .display-6 { font-size: 2.5rem; } }
p { margin-top: 0; margin-bottom: 1rem; }
ul { padding-left: 2rem; margin-top: 0; margin-bottom: 1rem; }
a { color: var(--bs-primary); text-decoration: underline; }
a:hover { color: #0a58ca; }

/* --- GRID & CONTAINERS --- */
.container-fluid { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; width: 100%; padding-right: calc(var(--bs-gutter-x) * .5); padding-left: calc(var(--bs-gutter-x) * .5); margin-right: auto; margin-left: auto; }
.row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-.5 * var(--bs-gutter-x)); margin-left: calc(-.5 * var(--bs-gutter-x)); }
.row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: calc(var(--bs-gutter-x) * .5); padding-left: calc(var(--bs-gutter-x) * .5); margin-top: var(--bs-gutter-y); }

/* Grid Responsivo (Colunas) */
.col { flex: 1 0 0%; }
.col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-md-6 { flex: 0 0 auto; width: 50%; }
@media (min-width: 992px) {
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 1200px) {
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
}

/* Gaps (Espaçamento na Grid) */
.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }

/* --- FLEXBOX UTILITÁRIOS --- */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-self-end { align-self: flex-end !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* --- COMPONENTE: CARDS --- */
.card {
  --bs-card-spacer-y: 1rem;
  --bs-card-spacer-x: 1rem;
  --bs-card-title-spacer-y: 0.5rem;
  --bs-card-border-width: 1px;
  --bs-card-border-color: rgba(0, 0, 0, 0.175);
  --bs-card-border-radius: 0.375rem;
  --bs-card-box-shadow: ;
  --bs-card-inner-border-radius: calc(0.375rem - 1px);
  --bs-card-cap-padding-y: 0.5rem;
  --bs-card-cap-padding-x: 1rem;
  --bs-card-cap-bg: rgba(0, 0, 0, 0.03);
  --bs-card-bg: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--bs-card-bg);
  background-clip: border-box;
  border: var(--bs-card-border-width) solid var(--bs-card-border-color);
  border-radius: var(--bs-card-border-radius);
}
.card-body { flex: 1 1 auto; padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); color: var(--bs-card-color); }
.h-100 { height: 100% !important; }

/* --- COMPONENTE: BOTÕES --- */
.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-family: var(--bs-body-font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.btn-warning { color: #000; background-color: #ffc107; border-color: #ffc107; }
.btn-warning:hover { color: #000; background-color: #ffca2c; border-color: #ffc720; }

/* --- COMPONENTE: ALERTS --- */
.alert { position: relative; padding: 1rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 0.375rem; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }

/* --- COMPONENTE: LIST GROUPS --- */
.list-group { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; border-radius: 0.375rem; }
.list-group-item { position: relative; display: block; padding: 0.5rem 1rem; color: #212529; text-decoration: none; background-color: #fff; border: 1px solid rgba(0,0,0,.125); }
.list-group-flush .list-group-item { border-right: 0; border-left: 0; border-radius: 0; }
.list-group-flush .list-group-item:last-child { border-bottom: 0; }

/* --- ESPAÇAMENTOS (MARGINS & PADDINGS) --- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.px-0 { padding-right: 0 !important; padding-left: 0 !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }

/* --- TIPOGRAFIA & AUXILIARES --- */
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-warning { color: rgba(var(--bs-warning-rgb), 1) !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.rounded-3 { border-radius: 0.5rem !important; }
.d-block { display: block !important; }

/* --- DATA-BS-THEME="DARK" (Mapeamento do Modo Escuro Nativo) --- */
[data-bs-theme=dark] {
  color-scheme: dark;
  --bs-body-color: #dee2e6;
  --bs-body-bg: #212529;
  --bs-card-bg: #2b3035;
  --bs-card-border-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   BOOTSTRAP 5.3.8 - NÚCLEO ESSENCIAL COM SUPORTE COMPLETO A FORMULÁRIOS
   ========================================================================== */

/* --- VARIÁVEIS DO SISTEMA (Altere aqui para mudar o tema global) --- */
:root {
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
  
  /* Cores Padrões */
  --bs-primary: #0d6efd;
  --bs-success: #198754;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
}

/* --- RESET & LAYOUT BASE --- */
*, ::after, ::before { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 500; line-height: 1.2; }
.display-6 { font-size: calc(1.375rem + 1.5vw); font-weight: 300; line-height: 1.2; }
@media (min-width: 1200px) { .display-6 { font-size: 2.5rem; } }
p { margin-top: 0; margin-bottom: 1rem; }
ul { padding-left: 2rem; margin-top: 0; margin-bottom: 1rem; }
a { color: var(--bs-primary); text-decoration: underline; }
a:hover { color: #0a58ca; }

/* --- GRID & CONTAINERS --- */
.container-fluid { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; width: 100%; padding-right: calc(var(--bs-gutter-x) * .5); padding-left: calc(var(--bs-gutter-x) * .5); margin-right: auto; margin-left: auto; }
.row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 0; display: flex; flex-wrap: wrap; margin-top: calc(-1 * var(--bs-gutter-y)); margin-right: calc(-.5 * var(--bs-gutter-x)); margin-left: calc(-.5 * var(--bs-gutter-x)); }
.row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: calc(var(--bs-gutter-x) * .5); padding-left: calc(var(--bs-gutter-x) * .5); margin-top: var(--bs-gutter-y); }

.col { flex: 1 0 0%; }
.col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-md-6 { flex: 0 0 auto; width: 50%; }
@media (min-width: 992px) { .col-lg-6 { flex: 0 0 auto; width: 50%; } }
@media (min-width: 1200px) { .col-xl-3 { flex: 0 0 auto; width: 25%; } }

.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }

/* --- FLEXBOX UTILITÁRIOS --- */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.align-self-end { align-self: flex-end !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* --- COMPONENTE: FORMULÁRIOS (ADICIONADO) --- */
.form-label {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-block;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-family: var(--bs-body-font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  appearance: none;
  border-radius: 0.375rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

textarea.form-control {
  min-height: calc(1.5em + 0.75rem + 2px);
}

.form-control:focus {
  color: #212529;
  background-color: #fff;
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control::placeholder {
  color: #6c757d;
  opacity: 1;
}

/* Validações de Formulário */
.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--bs-danger);
}

.was-validated .form-control:invalid {
  border-color: var(--bs-danger);
  padding-right: calc(1.5em + 0.75rem);
}

.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

/* --- COMPONENTE: CARDS --- */
.card {
  --bs-card-spacer-y: 1rem;
  --bs-card-spacer-x: 1rem;
  --bs-card-border-width: 1px;
  --bs-card-border-color: rgba(0, 0, 0, 0.175);
  --bs-card-border-radius: 0.375rem;
  --bs-card-bg: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--bs-card-bg);
  background-clip: border-box;
  border: var(--bs-card-border-width) solid var(--bs-card-border-color);
  border-radius: var(--bs-card-border-radius);
}
.card-body { flex: 1 1 auto; padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x); }
.h-100 { height: 100% !important; }

/* --- COMPONENTE: BOTÕES --- */
.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-family: var(--bs-body-font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.btn:disabled {
  pointer-events: none;
  opacity: .65;
}
.btn-warning { color: #000; background-color: #ffc107; border-color: #ffc107; }
.btn-warning:hover { color: #000; background-color: #ffca2c; border-color: #ffc720; }

/* --- COMPONENTE: ALERTS --- */
.alert { position: relative; padding: 1rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 0.375rem; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }

/* --- COMPONENTE: LIST GROUPS --- */
.list-group { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; border-radius: 0.375rem; }
.list-group-item { position: relative; display: block; padding: 0.5rem 1rem; color: #212529; text-decoration: none; background-color: #fff; border: 1px solid rgba(0,0,0,.125); }
.list-group-flush .list-group-item { border-right: 0; border-left: 0; border-radius: 0; }
.list-group-flush .list-group-item:last-child { border-bottom: 0; }

/* --- ESPAÇAMENTOS (MARGINS & PADDINGS) --- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.px-0 { padding-right: 0 !important; padding-left: 0 !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }

/* --- TIPOGRAFIA & AUXILIARES --- */
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.text-uppercase { text-transform: uppercase !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.rounded-3 { border-radius: 0.5rem !important; }
.d-block { display: block !important; }

/* --- DATA-BS-THEME="DARK" (Compatibilidade com Modo Escuro) --- */
[data-bs-theme=dark] {
  color-scheme: dark;
  --bs-body-color: #dee2e6;
  --bs-body-bg: #212529;
  --bs-card-bg: #2b3035;
  --bs-card-border-color: rgba(255, 255, 255, 0.15);
  
  /* Inputs adaptados para modo escuro interno */
  --bs-form-control-bg: #1a1e1a;
  --bs-form-control-border: rgba(255, 255, 255, 0.15);
}

[data-bs-theme=dark] .form-control {
  background-color: var(--bs-form-control-bg) !important;
  border-color: var(--bs-form-control-border) !important;
  color: #fff !important;
}