.hab {
  color: #162941;
  font: 16px/1.6 system-ui, sans-serif;
  min-width: 0;
  scroll-margin-top: 1rem;
}
#habilitacao { padding: 0 24px 24px; }
.hab-cartao {
  padding: 24px;
  background: #fff;
  border: 1px solid #ccd9e6;
  border-radius: 15px;
  overflow-wrap: anywhere;
}
.hab h2 { margin: 5px 0 12px; font-size: clamp(23px, 4vw, 33px); line-height: 1.22; }
.hab h3, .hab h4 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.35; }
.hab p { margin: 10px 0; line-height: 1.6; }
.hab small { color: #345e86; font-weight: 700; }
.hab-acoes, .hab-filtros, .hab-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.hab-btn {
  display: inline-block;
  padding: 10px 13px;
  min-height: 44px;
  border: 1px solid #91a9c1;
  border-radius: 8px;
  background: #fff;
  color: #1d4a76;
  font: inherit;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.hab-btn.hab-primario { background: #174a79; color: #fff; }
.hab-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 1px currentColor; }
.hab-btn:disabled { opacity: .6; cursor: not-allowed; }
.hab :focus-visible, #hab-entrada-agente:focus-visible { outline: 2px solid #24638f; outline-offset: 3px; }
.hab p.hab-status, .hab-feedback:not(:empty) {
  padding: 11px 13px;
  border-radius: 8px;
  background: #e9f2fc;
  font-weight: 650;
}
.hab-feedback:empty { margin: 0; }
.hab-feedback[data-erro="sim"] { background: #fff0ed; color: #89251b; }
.hab-linha { margin-top: 12px; border: 1px solid #ccd9e6; border-radius: 8px; padding: 12px; }
.hab-filtros, .hab-expansivel, .hab-form { margin-top: 12px; }
.hab-expansivel summary { cursor: pointer; font-weight: 650; color: #1d4a76; padding: 6px 0; }
.hab-form { align-items: stretch; flex-direction: column; max-width: 42rem; }
.hab-form > .hab-btn { align-self: flex-start; }
.hab-campo { display: grid; gap: 4px; font-weight: 650; min-width: 0; }
.hab-campo :is(input, textarea, select) {
  border: 1px solid #91a9c1;
  border-radius: 7px;
  background: #fff;
  color: #162941;
  padding: 8px;
  font: inherit;
  font-weight: 400;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
}
.hab-campo textarea { resize: vertical; min-height: 80px; }
.hab-motivo { white-space: pre-wrap; }
#hab-entrada-agente { margin: 16px 24px 8px; }
#hab-entrada-agente[hidden] { display: none; }
:root[data-tema="escuro"] .hab { color: #e4eef8; }
:root[data-tema="escuro"] .hab :is(.hab-cartao, .hab-btn:not(.hab-primario), input, textarea, select) {
  background: #14263a;
  color: #e4eef8;
  border-color: #5f748b;
}
:root[data-tema="escuro"] .hab :is(small, summary) { color: #b8d4ee; }
:root[data-tema="escuro"] .hab :is(.hab-status, .hab-feedback:not(:empty)) { background: #223c56; }
:root[data-tema="escuro"] .hab-feedback[data-erro="sim"] { background: #482d30; color: #ffdcd7; }
@media (max-width: 710px) {
  #habilitacao { padding: 0 12px 16px; }
  #hab-entrada-agente { margin: 12px 12px 8px; }
  .hab-cartao { padding: 17px; }
}
