:root {
  --sapl-bg: #f6f8fb;
  --sapl-surface: #ffffff;
  --sapl-surface-soft: #fafcff;
  --sapl-border: #dbe3ee;
  --sapl-border-strong: #c7d2e3;
  --sapl-divider: #e8eef5;
  --sapl-text: #0f172a;
  --sapl-text-soft: #475569;
  --sapl-primary: #155eef;
  --sapl-primary-hover: #0047cc;
  --sapl-success: #0f9f62;
  --sapl-danger: #dc2626;
  --sapl-warning: #b7791f;
  --sapl-radius-sm: 10px;
  --sapl-radius-md: 14px;
  --sapl-radius-lg: 18px;
  --sapl-shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.06);
  --sapl-page-max: 1600px;
  --sapl-reading-max: 1500px;
  --sapl-form-max: 1480px;
  --sapl-content-gutter: 24px;
}

html,
body {
  min-height: 100vh;
  background: var(--sapl-bg);
  color: var(--sapl-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
canvas,
iframe,
video,
embed,
object {
  max-width: 100%;
  height: auto;
}

.page,
.content,
main#content,
.container,
.container-fluid,
.row,
[class*="col-"] {
  min-width: 0;
}

.page,
.content,
main#content {
  background: transparent;
}

.page {
  min-height: 100vh;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}

main#content.content.page__row {
  flex: 1 0 auto;
}

main#content > .container,
.footer > .container {
  width: min(100%, var(--sapl-page-max));
  max-width: var(--sapl-page-max);
  padding-left: var(--sapl-content-gutter);
  padding-right: var(--sapl-content-gutter);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
small,
strong,
label,
legend,
td,
th,
li,
dd,
dt {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.page-header,
h1.page-header {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--sapl-divider);
  font-weight: 800;
  color: var(--sapl-text);
}

/* =========================
   SEÇÕES / BLOCOS
   ========================= */

fieldset,
.panel,
.card,
.well,
form > fieldset,
.form-horizontal fieldset,
.tab-content,
.modal-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--sapl-surface);
  border: 1px solid var(--sapl-border) !important;
  border-radius: var(--sapl-radius-lg);
  box-shadow: none !important;
  overflow: visible;
}

fieldset {
  padding: 1.25rem 1.25rem 1.1rem;
  margin-bottom: 1.35rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

legend {
  width: auto;
  max-width: calc(100% - 1rem);
  padding: 0 .25rem;
  margin: 0 0 1rem 0;
  border: 0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--sapl-text);
}

.panel-heading,
.card-header,
.modal-header {
  padding: .95rem 1.2rem;
  border-bottom: 1px solid var(--sapl-divider) !important;
  background: #fbfcfe;
  border-top-left-radius: var(--sapl-radius-lg);
  border-top-right-radius: var(--sapl-radius-lg);
}

.panel-title,
.card-title {
  margin: 0;
  font-weight: 800;
  color: var(--sapl-text);
}

.panel-body,
.card-body,
.well,
.modal-body,
.tab-pane {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1rem 1.2rem;
  overflow: visible;
}

.panel-footer,
.card-footer,
.modal-footer {
  padding: .95rem 1.2rem;
  border-top: 1px solid var(--sapl-divider) !important;
  background: #fcfdff;
  border-bottom-left-radius: var(--sapl-radius-lg);
  border-bottom-right-radius: var(--sapl-radius-lg);
}

fieldset > *,
.panel > *,
.card > *,
.well > *,
.modal-content > *,
.tab-content > * {
  min-width: 0;
  max-width: 100%;
}

fieldset .row,
.panel .row,
.card .row,
.well .row,
.modal-body .row {
  margin-left: -10px;
  margin-right: -10px;
}

fieldset .row > [class*="col-"],
.panel .row > [class*="col-"],
.card .row > [class*="col-"],
.well .row > [class*="col-"],
.modal-body .row > [class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
  min-width: 0;
}

fieldset .row > [class*="col-"],
.panel .row > [class*="col-"],
.card .row > [class*="col-"],
.well .row > [class*="col-"] {
  margin-bottom: .75rem;
}

/* melhora leitura de blocos repetidos sem virar card */
fieldset + fieldset,
.panel + .panel,
.well + .well,
.table + .table,
.alert + .alert {
  margin-top: .9rem;
}

/* =========================
   FORMULÁRIOS
   ========================= */

form {
  min-width: 0;
}

.form-group,
.controls,
.control-group {
  margin-bottom: 1rem;
  min-width: 0;
}

.form-horizontal .control-label,
.control-label,
.form-group label,
label {
  display: inline-block;
  color: var(--sapl-text);
  font-weight: 700;
  margin-bottom: .45rem;
  line-height: 1.35;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="time"],
input[type="search"],
input[type="url"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border-radius: var(--sapl-radius-md) !important;
  border: 1px solid var(--sapl-border-strong) !important;
  background: #fff !important;
  color: var(--sapl-text) !important;
  box-shadow: none !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input[type="file"] {
  min-height: auto;
  padding: .45rem .7rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

select[multiple] {
  min-height: 120px;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(21, 94, 239, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.10) !important;
  outline: 0;
}

.help-block,
.form-text,
small,
.text-muted {
  color: #64748b !important;
  line-height: 1.5;
}

.has-error .form-control,
.has-error input,
.has-error select,
.has-error textarea {
  border-color: rgba(220, 38, 38, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08) !important;
}

.checkbox,
.radio {
  margin-top: .35rem;
  margin-bottom: .35rem;
}

.checkbox label,
.radio label {
  font-weight: 500;
}

.input-group {
  width: 100%;
  max-width: 100%;
}

.input-group .form-control {
  z-index: 1;
}

.input-group-addon,
.input-group-btn > .btn {
  border-radius: var(--sapl-radius-md);
}

/* deixa formulários respirarem melhor */
.form-horizontal .form-group,
.form-group,
.control-group {
  padding-bottom: .1rem;
}

/* ações de formulário */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sapl-divider);
}

/* =========================
   BOTÕES
   ========================= */

.btn {
  min-height: 42px;
  max-width: 100%;
  border-radius: 12px !important;
  font-weight: 700 !important;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
  box-shadow: none;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.btn:hover,
.btn:focus {
  transform: translateY(-1px);
}

.btn-primary,
.btn-info,
.btn-success {
  background: linear-gradient(135deg, var(--sapl-primary), #2563eb) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(21, 94, 239, 0.16);
}

.btn-primary:hover,
.btn-info:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-info:focus,
.btn-success:focus {
  background: linear-gradient(135deg, var(--sapl-primary-hover), #1d4ed8) !important;
  color: #fff !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--sapl-danger), #b91c1c) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.15);
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, var(--sapl-warning)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.btn-default,
.btn-secondary,
.btn-outline-dark {
  background: #fff !important;
  border: 1px solid var(--sapl-border-strong) !important;
  color: var(--sapl-text) !important;
}

.btn-group,
.btn-toolbar {
  max-width: 100%;
}

.btn-group > .btn,
.btn-toolbar > .btn,
.input-group-btn > .btn {
  min-width: 0;
}

/* =========================
   TABELAS
   ========================= */

.table {
  width: 100%;
  background: var(--sapl-surface);
  border: 1px solid var(--sapl-border);
  border-radius: var(--sapl-radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: none;
}

.table > thead > tr > th,
.table thead th {
  background: #f8fafc;
  color: var(--sapl-text);
  border-bottom: 1px solid var(--sapl-divider) !important;
  font-weight: 800;
  vertical-align: middle !important;
  white-space: normal;
}

.table > tbody > tr > td,
.table tbody td {
  border-top: 1px solid rgba(219, 227, 238, 0.75) !important;
  vertical-align: middle !important;
  white-space: normal;
}

.table-hover > tbody > tr:hover {
  background: rgba(21, 94, 239, 0.03);
}

.table td,
.table th {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.table-responsive {
  border: 0;
  overflow-x: auto;
  width: 100%;
}

/* =========================
   LINKS
   ========================= */

a {
  color: var(--sapl-primary);
  transition: color .18s ease, opacity .18s ease;
}

a:hover,
a:focus {
  color: var(--sapl-primary-hover);
  text-decoration: none;
}

/* =========================
   ALERTAS
   ========================= */

.alert {
  border: 1px solid transparent !important;
  border-radius: var(--sapl-radius-md) !important;
  box-shadow: none !important;
  padding: 1rem;
}

.alert-success {
  background: #ecfdf3 !important;
  border-color: #c7f0d6 !important;
  color: #166534 !important;
}

.alert-danger,
.alert-error {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #991b1b !important;
}

.alert-warning {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
  color: #9a3412 !important;
}

.alert-info {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

/* =========================
   DROPDOWN / MENUS
   ========================= */

.dropdown-menu {
  max-width: min(92vw, 380px);
  min-width: 220px;
  width: max-content;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  border: 1px solid var(--sapl-border) !important;
  border-radius: var(--sapl-radius-md) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
  padding: .4rem;
  overflow: hidden;
}

.dropdown-item,
.dropdown-menu > li > a {
  display: block;
  max-width: 100%;
  border-radius: 10px;
  color: var(--sapl-text) !important;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  padding: .58rem .75rem;
}

.dropdown-item:hover,
.dropdown-menu > li > a:hover {
  background: rgba(21, 94, 239, 0.08) !important;
  color: var(--sapl-primary) !important;
}

/* =========================
   PAGINAÇÃO / TABS / BREADCRUMB
   ========================= */

.pagination {
  max-width: 100%;
}

.pagination > li > a,
.pagination > li > span {
  border-radius: 10px !important;
  margin: 0 3px;
  border: 1px solid var(--sapl-border) !important;
  color: var(--sapl-text-soft) !important;
}

.pagination > .active > a,
.pagination > .active > span {
  background: var(--sapl-primary) !important;
  border-color: var(--sapl-primary) !important;
  color: #fff !important;
}


.breadcrumb {
  background: #fff;
  border: 1px solid var(--sapl-border);
  border-radius: 12px;
  box-shadow: none;
}

/* =========================
   PRE / CODE / MODAL / FOOTER
   ========================= */

pre,
code,
kbd {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

pre {
  border-radius: 12px;
  border: 1px solid var(--sapl-border);
  background: #f8fafc;
  padding: 1rem;
  overflow: auto;
}

.modal-content {
  border: 1px solid var(--sapl-border) !important;
  border-radius: var(--sapl-radius-lg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.modal-header,
.modal-body,
.modal-footer {
  min-width: 0;
}

.footer {
  margin-top: 2rem;
  background: #fff;
  border-top: 1px solid var(--sapl-border);
  color: var(--sapl-text-soft);
}

/* =========================
   GARGALOS GERAIS
   ========================= */

.panel,
.card,
.well,
fieldset,
.modal-content,
.alert,
.breadcrumb,
.table,
.dropdown-menu,
.list-group,
.pagination,


.panel-heading a,
.panel-body a,
.card-body a,
.well a,
fieldset a,
td a,
th a {
  overflow-wrap: anywhere;
  word-break: normal;
}

.form-horizontal .form-group::before,
.form-horizontal .form-group::after,
.row::before,
.row::after {
  display: table;
  content: " ";
}

.form-horizontal .form-group::after,
.row::after {
  clear: both;
}

/* =========================
   RESPONSIVO
   ========================= */

@media (max-width: 991.98px) {
  :root {
    --sapl-content-gutter: 18px;
  }

  .table {
    display: table;
    overflow-x: visible;
    white-space: normal;
  }

  fieldset,
  .panel-body,
  .card-body,
  .well,
  .modal-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dropdown-menu {
    max-width: 100%;
    width: 100%;
  }

  .context-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
  }

  .context-actions .actions,
  .context-actions .btn-group,
  .context-actions .editons {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .container,
  .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }

  fieldset {
    padding: 1rem .95rem;
  }

  .panel-heading,
  .card-header,
  .modal-header,
  .panel-footer,
  .card-footer,
  .modal-footer,
  .panel-body,
  .card-body,
  .well,
  .modal-body {
    padding-left: .95rem;
    padding-right: .95rem;
  }

  legend {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }

  .btn-group,
  .btn-toolbar,
  .input-group,
  .input-group-btn,
  .input-group-btn > .btn,
  .form-inline .btn,
  .form-inline input,
  .form-inline select {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .context-actions > .editons,
  .sapl-toolbar-actions > .editons {
    margin-left: 0;
  }

  .sapl-form-actions,
  .form-group.row.justify-content-between {
    justify-content: stretch;
  }

  .sapl-form-actions .form-check,
  .form-group.row.justify-content-between .form-check,
  .row > .sapl-col--action {
    width: 100%;
    max-width: 100%;
  }

  .row > .sapl-col--action .btn,
  .row > .sapl-col--action button,
  .row > .sapl-col--action input {
    width: 100%;
    min-width: 0;
  }

  .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
  }

  .pagination > li {
    display: inline-flex;
  }
}












/* =========================================
   CRUD/CRISPY FORMS — CAMADA PROFUNDA
   ========================================= */

.sapl-form-shell {
  width: 100%;
  max-width: var(--sapl-form-max);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.sapl-form-page {
  display: grid;
  gap: 1rem;
}

.sapl-form-page__head {
  display: grid;
  gap: .35rem;
}

.sapl-form-page__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--sapl-text);
}

.sapl-form-page__subtitle {
  margin: 0;
  color: var(--sapl-text-soft);
  font-size: .96rem;
  line-height: 1.55;
}

.sapl-form-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--sapl-surface);
  border: 1px solid var(--sapl-border);
  border-radius: 24px;
  box-shadow: var(--sapl-shadow-sm);
  overflow: visible;
}

.sapl-form-card__body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1.35rem 1.35rem 1.15rem;
}

/* fieldsets do crispy */
.sapl-form-card fieldset,
.sapl-form-card .panel,
.sapl-form-card .well,
.sapl-form-card .card {
  border-radius: 20px !important;
  border: 1px solid rgba(15, 23, 42, .08) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  background: #fff;
  margin-bottom: 1rem;
}

/* títulos de seções */
.sapl-form-card legend,
.sapl-form-card .panel-title,
.sapl-form-card .card-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--sapl-text);
}

/* grupos de campo */
.sapl-form-card .form-group,
.sapl-form-card .control-group,
.sapl-form-card .controls {
  min-width: 0;
}

.sapl-form-card .form-group {
  margin-bottom: 1rem;
}

.sapl-form-card .control-label,
.sapl-form-card label {
  display: inline-block;
  margin-bottom: .45rem;
  font-size: .94rem;
  font-weight: 800;
  color: var(--sapl-text);
  line-height: 1.35;
}

/* asterisco required */
.sapl-form-card .asteriskField {
  color: var(--sapl-danger);
  margin-left: .15rem;
  font-weight: 900;
}

/* inputs */
.sapl-form-card .form-control,
.sapl-form-card input[type="text"],
.sapl-form-card input[type="number"],
.sapl-form-card input[type="email"],
.sapl-form-card input[type="password"],
.sapl-form-card input[type="date"],
.sapl-form-card input[type="datetime"],
.sapl-form-card input[type="datetime-local"],
.sapl-form-card input[type="time"],
.sapl-form-card input[type="search"],
.sapl-form-card input[type="url"],
.sapl-form-card input[type="file"],
.sapl-form-card select,
.sapl-form-card textarea {
  min-height: 46px;
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, .42) !important;
  background: #fff !important;
  color: var(--sapl-text) !important;
  padding: .7rem .85rem;
  box-shadow: none !important;
}

.sapl-form-card textarea {
  min-height: 128px;
}

.sapl-form-card .form-control:focus,
.sapl-form-card input:focus,
.sapl-form-card select:focus,
.sapl-form-card textarea:focus {
  border-color: rgba(21, 94, 239, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.10) !important;
}

/* help e erro */
.sapl-form-card .help-block,
.sapl-form-card .text-muted,
.sapl-form-card small {
  margin-top: .4rem;
  color: #64748b !important;
  font-size: .86rem;
  line-height: 1.5;
}

.sapl-form-card .errorlist,
.sapl-form-card .invalid-feedback {
  list-style: none;
  padding: 0;
  margin: .45rem 0 0;
  color: #b91c1c;
  font-size: .86rem;
  font-weight: 700;
}

.sapl-form-card .has-error .form-control,
.sapl-form-card .has-error input,
.sapl-form-card .has-error select,
.sapl-form-card .has-error textarea {
  border-color: rgba(220, 38, 38, .55) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .08) !important;
}

/* radios/checkboxes */
.sapl-form-card .radio,
.sapl-form-card .checkbox {
  margin-top: .35rem;
  margin-bottom: .35rem;
}

.sapl-form-card .radio label,
.sapl-form-card .checkbox label {
  font-weight: 600;
}

/* ações finais */
.sapl-form-card .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.sapl-form-card .form-actions .btn,
.sapl-form-card .form-actions button,
.sapl-form-card .form-actions input[type="submit"] {
  min-width: 170px;
  min-height: 46px;
  border-radius: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .10);
}

/* tabelas dentro de form */
.sapl-form-card table {
  width: 100%;
}

.sapl-form-card .table {
  margin-top: .35rem;
}

.context-actions,
.container-detail,
.container-table,
.container-home,
.container-tabaux {
  width: 100%;
  max-width: var(--sapl-reading-max);
  margin-left: auto;
  margin-right: auto;
}

.context-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background:
    radial-gradient(circle at top left, rgba(21, 94, 239, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 252, 255, 0.96) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(10px);
}

.context-actions .actions.search {
  min-width: 0;
}

.context-actions .btn-group {
  flex-wrap: wrap;
  gap: .5rem;
}

.context-actions .float-left,
.context-actions .float-right,
.context-actions .editons,
.sapl-toolbar-actions .float-left,
.sapl-toolbar-actions .float-right,
.sapl-toolbar-actions .editons {
  float: none !important;
}

.context-actions .btn-group,
.context-actions .editons,
.sapl-toolbar-actions .btn-group,
.sapl-toolbar-actions .editons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.context-actions > .editons,
.sapl-toolbar-actions > .editons {
  margin-left: auto;
}

.sapl-form-actions,
.form-group.row.justify-content-between {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: .75rem;
  margin-left: 0;
  margin-right: 0;
}

.sapl-form-actions > .clearfix,
.form-group.row.justify-content-between > .clearfix {
  display: none;
}

.sapl-form-actions .form-check,
.form-group.row.justify-content-between .form-check {
  margin-right: auto;
  margin-bottom: 0;
  padding-top: .35rem;
}

.sapl-form-actions .btn,
.sapl-form-actions button,
.sapl-form-actions input[type="submit"],
.form-group.row.justify-content-between .btn,
.form-group.row.justify-content-between button,
.form-group.row.justify-content-between input[type="submit"] {
  float: none !important;
  margin-left: 0 !important;
}

.row > .sapl-col--hidden {
  display: none;
}

.row > .sapl-col--action {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  display: flex;
  align-items: flex-end;
}

.row > .sapl-col--action .btn,
.row > .sapl-col--action button,
.row > .sapl-col--action input {
  width: auto;
  min-width: 136px;
}

.row > .sapl-col--action + .sapl-col--action {
  padding-left: 0;
}

.container-detail .row,
.container-tabaux.row {
  margin-left: -12px;
  margin-right: -12px;
}

.container-detail .row > [class*="col-"],
.container-tabaux.row > [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
}

.container-detail .legend {
  margin: 1.2rem 0 .85rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--sapl-text);
  letter-spacing: .01em;
}

.container-detail .form-control-static,
.dont-break-out {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.container-detail .form-group {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(219, 227, 238, 0.8);
  border-radius: 16px;
  padding: .95rem 1rem;
}

.container-detail .control-label {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: .55rem;
}

.container-detail .form-control-static {
  color: var(--sapl-text);
  line-height: 1.65;
}

.norma-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.norma-detail-main,
.norma-texto-original,
.norma-detail-complementar {
  min-width: 0;
  border: 1px solid rgba(219, 227, 238, 0.88);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.norma-detail-main,
.norma-detail-complementar {
  padding: 1rem 1rem .25rem;
}

.norma-detail-main .legend,
.norma-detail-complementar .legend {
  margin-top: 0;
}

.norma-texto-original {
  overflow: hidden;
}

.norma-texto-original__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(219, 227, 238, 0.88);
  background: #f8fbff;
}

.norma-texto-original__head .control-label {
  margin: 0 0 .35rem;
}

.norma-texto-original__head strong {
  display: block;
  font-size: .95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.norma-texto-original__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.norma-texto-original__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.norma-texto-original__preview {
  display: block;
  width: 100%;
  height: min(72vh, 720px);
  min-height: 520px;
  border: 0;
  background: #eef3f8;
}

.norma-texto-original__empty {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .75rem;
  padding: 2rem;
  color: var(--sapl-text-soft);
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    #f8fafc,
    #f8fafc 10px,
    #f1f5f9 10px,
    #f1f5f9 20px
  );
}

.norma-texto-original__empty i {
  font-size: 2.2rem;
  color: #94a3b8;
}

.norma-detail-complementar {
  margin-bottom: 1rem;
}

.norma-ementa-ai-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin-bottom: .45rem;
}

.norma-ementa-ai-label-row label,
.norma-ementa-ai-label-row .control-label {
  margin-bottom: 0 !important;
}

.norma-ementa-ai-label-row .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.norma-ementa-ai-status {
  min-height: 1.2rem;
  font-size: .86rem;
  font-weight: 700;
  color: var(--sapl-text-soft);
}

.norma-ementa-ai-status.is-loading {
  color: var(--sapl-primary);
}

.norma-ementa-ai-status.is-ok {
  color: var(--sapl-success);
}

.norma-ementa-ai-status.is-error {
  color: var(--sapl-danger);
}

.container-table {
  overflow: visible;
  padding: 1rem 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 253, 255, 0.98) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.container-table > .table-responsive {
  width: 100%;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(219, 227, 238, 0.85);
  overflow-x: auto;
  overflow-y: hidden;
}

.container-table .table {
  margin-bottom: 0;
  min-width: 860px;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.result-count {
  margin-bottom: .75rem;
  color: var(--sapl-text-soft);
  font-size: .94rem;
  line-height: 1.5;
  font-weight: 700;
}

/* layout responsivo */
@media (max-width: 991.98px) {
  .norma-detail-hero {
    grid-template-columns: 1fr;
  }

  .norma-texto-original__preview {
    height: 60vh;
    min-height: 420px;
  }

  .sapl-form-shell {
    padding-top: 1rem;
  }

  .sapl-form-card__body {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .sapl-form-shell {
    padding-top: .75rem;
  }

  .sapl-form-card {
    border-radius: 20px;
  }

  .sapl-form-card__body {
    padding: .9rem;
  }

  .sapl-form-card .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sapl-form-card .form-actions .btn,
  .sapl-form-card .form-actions button,
  .sapl-form-card .form-actions input[type="submit"] {
    width: 100%;
    min-width: 0;
  }
}



/* =========================================
   VISUALIZAÇÃO / DETAILS / LEITURA
   melhora painéis e blocos não-form
   sem mexer no header e sem estragar forms
   ========================================= */

/* painéis e wells de visualização ganham mais presença */
.panel:not(.sapl-form-card .panel),
.well:not(.sapl-form-card .well),
.card:not(.sapl-form-card .card) {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15, 23, 42, .08) !important;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  overflow: hidden;
}

/* fieldsets genéricos fora da casca premium do form */
body fieldset:not(.sapl-form-card fieldset) {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15, 23, 42, .08) !important;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

/* cabeçalhos de visualização mais bonitos */
.panel:not(.sapl-form-card .panel) > .panel-heading,
.card:not(.sapl-form-card .card) > .card-header,
.well > .panel-heading {
  padding: 1rem 1.15rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border-bottom: 1px solid rgba(15, 23, 42, .07) !important;
}

.panel:not(.sapl-form-card .panel) > .panel-heading .panel-title,
.card:not(.sapl-form-card .card) > .card-header .card-title,
.panel-title,
.card-title {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--sapl-text);
}

/* corpo de leitura */
.panel:not(.sapl-form-card .panel) > .panel-body,
.card:not(.sapl-form-card .card) > .card-body,
.well:not(.sapl-form-card .well),
body fieldset:not(.sapl-form-card fieldset) {
  padding: 1.1rem 1.15rem;
}

/* rodapés mais organizados */
.panel:not(.sapl-form-card .panel) > .panel-footer,
.card:not(.sapl-form-card .card) > .card-footer {
  background: #fcfdff;
  border-top: 1px solid rgba(15, 23, 42, .07) !important;
  padding: .9rem 1.15rem;
}

/* listas de detalhe (dl/dt/dd) */
dl {
  margin-bottom: 0;
}

dt {
  color: var(--sapl-text);
  font-weight: 800;
  line-height: 1.4;
}

dd {
  color: var(--sapl-text-soft);
  line-height: 1.6;
  margin-bottom: .85rem;
}

/* tabelas de visualização ficam mais premium */
.table:not(.sapl-form-card .table) {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.table:not(.sapl-form-card .table) > thead > tr > th,
.table:not(.sapl-form-card .table) thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f2f6fa 100%);
  color: var(--sapl-text);
  font-weight: 800;
  border-bottom: 1px solid rgba(15, 23, 42, .08) !important;
  position: sticky;
  top: 0;
  z-index: 2;
}

.table:not(.sapl-form-card .table) > tbody > tr > td,
.table:not(.sapl-form-card .table) tbody td {
  color: var(--sapl-text-soft);
  line-height: 1.55;
}

.table td,
.table th {
  padding: .9rem 1rem !important;
}

.table td a,
.table th a {
  color: inherit;
}

.table tbody tr {
  transition: background .18s ease, transform .18s ease;
}

.table.table-hover:not(.sapl-form-card .table):hover,
.table-hover:not(.sapl-form-card .table) > tbody > tr:hover {
  background: rgba(21, 94, 239, .028);
}

/* links dentro de telas de leitura */
.panel a,
.well a,
.card a,
fieldset a {
  font-weight: 600;
}

.sapl-ata-section p {
  margin-bottom: 0;
}

.sapl-ata-heading {
  margin-top: 0;
  margin-bottom: .9rem !important;
  color: var(--sapl-text);
}

.sapl-ata-inline-list {
  display: grid;
  gap: .7rem;
}

.sapl-ata-inline-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  padding: .85rem .95rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(219, 227, 238, 0.8);
  border-radius: 14px;
  line-height: 1.6;
}

.sapl-ata-inline-list__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .55rem;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.08);
  color: var(--sapl-primary);
  font-weight: 800;
  line-height: 1;
}

/* breadcrumbs e caixas auxiliares mais limpas */
.breadcrumb {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: .8rem 1rem;
}

.list-group {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.list-group-item {
  border-color: rgba(15, 23, 42, .06);
  padding: .95rem 1rem;
}

/* blocos de texto puro e readonly ganham leitura */
pre,
code,
kbd {
  font-size: .93em;
}

pre {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
}



.tab-content {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(15, 23, 42, .08) !important;
  border-radius: 0 16px 16px 16px;
  padding: 1rem 1.1rem;
}

/* alerts menos crus nas páginas de leitura */
.alert {
  box-shadow: 0 6px 16px rgba(15, 23, 42, .04) !important;
}

/* espaçamento vertical melhor em páginas de detalhes */
.panel + .panel,
.well + .well,
fieldset + .panel,
.panel + fieldset,
.table + .panel,
.panel + .table,
.alert + .panel,
.panel + .alert {
  margin-top: 1rem;
}

/* evita componentes esmagados em conteúdo de leitura */
.panel-body > .row,
.card-body > .row,
fieldset > .row,
.well > .row {
  margin-bottom: 0;
}

.panel-body > .row:last-child,
.card-body > .row:last-child,
fieldset > .row:last-child,
.well > .row:last-child {
  margin-bottom: 0;
}

/* responsivo para as telas de visualização */
@media (max-width: 991.98px) {
  .panel:not(.sapl-form-card .panel) > .panel-body,
  .card:not(.sapl-form-card .card) > .card-body,
  .well:not(.sapl-form-card .well),
  body fieldset:not(.sapl-form-card fieldset) {
    padding: 1rem;
  }

  .tab-content {
    padding: .95rem;
  }

  .container-table {
    padding: .85rem;
  }
}

@media (max-width: 767.98px) {
  .panel:not(.sapl-form-card .panel),
  .well:not(.sapl-form-card .well),
  .card:not(.sapl-form-card .card),
  body fieldset:not(.sapl-form-card fieldset) {
    border-radius: 16px;
  }

  .panel:not(.sapl-form-card .panel) > .panel-heading,
  .card:not(.sapl-form-card .card) > .card-header,
  .panel:not(.sapl-form-card .panel) > .panel-body,
  .card:not(.sapl-form-card .card) > .card-body,
  .panel:not(.sapl-form-card .panel) > .panel-footer,
  .card:not(.sapl-form-card .card) > .card-footer,
  .tab-content {
    padding-left: .95rem;
    padding-right: .95rem;
  }

  .breadcrumb {
    padding: .75rem .85rem;
  }

  .list-group-item {
    padding: .85rem .9rem;
  }

  .context-actions {
    padding: .9rem;
    border-radius: 18px;
  }

  .container-table {
    padding: .75rem;
    border-radius: 18px;
  }

  .container-table .table {
    min-width: 720px;
  }

  .sapl-ata-inline-list__item {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .sapl-ata-inline-list__index {
    width: fit-content;
  }
}

.container-detail > fieldset p[style*="text-align: justify"],
.container-detail fieldset p[style*="text-align: justify"] {
  text-align: left !important;
  word-spacing: normal !important;
  letter-spacing: normal !important;
  line-height: 1.75 !important;
}

.container-detail > fieldset p[style*="text-align: justify"] strong,
.container-detail fieldset p[style*="text-align: justify"] strong {
  display: block;
  margin-bottom: .55rem;
  color: #0f2940;
}

:root {
  --sapl-shell-max: 1540px;
  --sapl-shell-pad: 24px;
  --sapl-navbar-height: 74px;
  --sapl-masthead-height: 118px;
}

.sapl-shell-container {
  width: 100%;
  max-width: var(--sapl-shell-max) !important;
  padding-left: var(--sapl-shell-pad);
  padding-right: var(--sapl-shell-pad);
}

.navbar {
  position: relative;
  top: auto;
  z-index: 1200;
  min-height: var(--sapl-navbar-height);
}

.navbar > .sapl-shell-container {
  align-items: center;
  min-height: var(--sapl-navbar-height);
}

.navbar .dropdown-menu {
  z-index: 1300;
}

.masthead {
  position: relative;
  top: auto;
  z-index: 1000;
  overflow: visible;
  margin-bottom: .45rem;
}

.masthead > .sapl-shell-container {
  min-height: var(--sapl-masthead-height);
  align-items: center;
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.masthead .navbar-header,
.masthead .hidden-print {
  position: relative;
  z-index: 2;
}

.masthead .dropdown-menu {
  z-index: 1350;
}

.masthead .nav {
  flex-wrap: wrap;
  gap: .3rem;
}

.masthead .nav-pills .nav-link,
.masthead .nav-pills > li > a {
  border-radius: 999px;
  padding: .55rem .9rem;
  background: rgba(17, 110, 154, .07);
  border: 1px solid rgba(17, 110, 154, .10);
  color: #30506f;
  font-weight: 700;
  transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.masthead .nav-pills .nav-link:hover,
.masthead .nav-pills > li > a:hover,
.masthead .nav-pills .nav-link:focus,
.masthead .nav-pills > li > a:focus {
  background: rgba(17, 110, 154, .14);
  color: #116e9a;
  transform: translateY(-1px);
  text-decoration: none;
}

.masthead .nav-pills .active > a,
.masthead .nav-pills .active > a:hover,
.masthead .nav-pills .active > a:focus,
.masthead .nav-link.active {
  background: rgba(17, 110, 154, .18);
  border-color: rgba(17, 110, 154, .18);
  color: #116e9a;
  box-shadow: 0 12px 26px rgba(17, 110, 154, .12);
}

.content.page__row {
  padding-top: .35rem;
}

.sapl-page-container {
  width: 100%;
}

.sapl-home-hero,
.sapl-home-sectionhead {
  display: none !important;
}

@media (max-width: 991.98px) {
  :root {
    --sapl-shell-pad: 16px;
    --sapl-navbar-height: 68px;
    --sapl-masthead-height: auto;
  }

  .masthead > .sapl-shell-container {
    min-height: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --sapl-shell-pad: 12px;
  }

  .navbar {
    min-height: auto;
  }

  .masthead {
    position: relative;
  }
}

/* Design institucional Varzelandia - header, subheader e home */
body {
  margin-bottom: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: #f5f8fc;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

.site-navbar {
  min-height: 48px;
  max-width: 100%;
  padding: 0;
  background: linear-gradient(180deg, #063877 0%, #002b68 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  z-index: 30;
}

.site-navbar .sapl-shell-container {
  min-height: 48px;
  max-width: 100%;
  min-width: 0;
}

.site-navbar .navbar-collapse {
  min-width: 0;
  justify-content: center;
}

.site-navbar .navbar-nav {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
}

.site-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  color: #fff;
  border-radius: 6px;
  font-size: .92rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, .10);
  text-decoration: none;
}

.site-navbar .dropdown-toggle::after {
  display: none;
}

.site-navbar .dropdown-menu {
  min-width: 230px;
  margin-top: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0, 28, 68, .20);
}

.site-navbar .dropdown-item {
  padding: 0;
  border-radius: 6px;
}

.site-navbar .dropdown-item a {
  display: block;
  padding: 9px 10px;
  color: #22304a;
  font-size: .9rem;
  font-weight: 700;
}

.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus-within {
  background: #eef5ff;
}

.site-navbar .dropdown-item a:hover,
.site-navbar .dropdown-item a:focus {
  color: #063877;
  text-decoration: none;
}

.site-navbar #autenticacao {
  flex: 0 0 auto;
  margin-left: auto;
}

.site-navbar .nav-link--restricted {
  min-height: 36px;
  margin-left: 10px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .04);
}

.site-navbar .navbar-toggler {
  margin: 6px 0;
  border-color: rgba(255, 255, 255, .25);
}

.site-navbar .navbar-toggler-icon {
  background-image: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
  background-position: center 9px, center 15px, center 21px;
  background-repeat: no-repeat;
  background-size: 22px 2px;
}

.masthead {
  position: relative;
  z-index: 5;
  overflow: visible;
  min-height: 196px;
  padding: 34px 0 42px;
  background-color: #e8f4ff;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .92) 34%, rgba(218, 238, 255, .78) 54%, rgba(60, 148, 224, .44) 100%),
    linear-gradient(180deg, rgba(230, 244, 255, .36) 0%, rgba(230, 244, 255, .86) 100%),
    var(--sapl-subheader-bg, none);
  background-size: cover;
  background-position: center right;
  border-bottom: 1px solid #cddced;
}

.masthead::before,
.masthead::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: .34;
}

.masthead::before {
  left: 0;
  bottom: -78px;
  width: 360px;
  height: 190px;
  border-top: 1px solid rgba(38, 137, 219, .36);
  border-radius: 50%;
  transform: translateX(-38%) rotate(17deg);
  box-shadow: 0 -14px 0 -13px rgba(38, 137, 219, .36), 0 -28px 0 -27px rgba(38, 137, 219, .36), 0 -42px 0 -41px rgba(38, 137, 219, .36), 0 -56px 0 -55px rgba(38, 137, 219, .36);
}

.masthead::after {
  right: 0;
  top: -76px;
  width: 420px;
  height: 220px;
  border-bottom: 1px solid rgba(38, 137, 219, .32);
  border-radius: 50%;
  transform: translateX(34%) rotate(-18deg);
  box-shadow: 0 14px 0 -13px rgba(38, 137, 219, .32), 0 28px 0 -27px rgba(38, 137, 219, .32), 0 42px 0 -41px rgba(38, 137, 219, .32), 0 56px 0 -55px rgba(38, 137, 219, .32);
}

.masthead .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  max-width: 900px;
  padding: 0;
  margin: 0;
  color: #062b65;
  text-decoration: none;
  white-space: normal;
}

.masthead .navbar-brand img.img-responsive {
  width: 120px;
  max-width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(9, 36, 83, .18));
}

.masthead .vcenter {
  display: block;
  padding: 0;
  color: #062b65;
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 900;
}

.masthead .vcenter small {
  display: block;
  margin-top: 8px;
  color: #526078;
  font-size: 1.18rem;
  line-height: 1.25;
  font-weight: 500;
}

.masthead .vcenter em {
  display: block;
  margin-top: 16px;
  color: #06489a;
  font-size: .98rem;
  line-height: 1.35;
  font-style: normal;
  font-weight: 800;
}

.site-subnav:empty {
  display: none;
}

.site-subnav {
  align-self: flex-end;
  max-width: 52%;
  overflow: visible;
}

.site-subnav > .nav,
.site-subnav > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-subnav .nav-link,
.site-subnav a,
.site-subnav span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: #294760;
  background: rgba(255, 255, 255, .56);
  border: 1px solid rgba(6, 72, 154, .12);
  font-size: .82rem;
  font-weight: 800;
}

.site-subnav .nav-link.active,
.site-subnav .nav-item.active > .nav-link,
.site-subnav .active > a {
  color: #fff;
  background: #08aeea;
  border-color: #08aeea;
  box-shadow: 0 10px 22px rgba(8, 116, 216, .16);
}

.site-subnav .nav-link:hover,
.site-subnav a:hover,
.site-subnav .nav-link:focus,
.site-subnav a:focus {
  color: #032e70;
  text-decoration: none;
  background: #fff;
}

.site-subnav .nav-link.active:hover,
.site-subnav .nav-link.active:focus,
.site-subnav .nav-item.active > .nav-link:hover,
.site-subnav .nav-item.active > .nav-link:focus {
  color: #fff;
  background: #08aeea;
}

.site-subnav .dropdown {
  position: relative;
}

.site-subnav .dropdown-menu {
  display: none;
  z-index: 2200;
  margin-top: 4px;
  overflow: visible !important;
}

.site-subnav .show > .dropdown-menu {
  display: block;
}

.container-home {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 22px 18px 10px;
}

.homeSearch {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.homeSearch__form {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 94px;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 5px 6px 5px 18px;
  background: #fff;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(14, 42, 79, .08);
}

.homeSearch__form i {
  color: #5d6d84;
  font-size: 20px;
}

.homeSearch__form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #1f2a44;
  font-size: .98rem;
  background: transparent;
}

.homeSearch__form button,
.homeAction--primary {
  background: linear-gradient(180deg, #06489a 0%, #003174 100%);
  color: #fff;
  border-color: #0a4a95;
  box-shadow: 0 7px 15px rgba(0, 55, 128, .22);
}

.homeSearch__form button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.homeSearch__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.homeAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  min-width: 170px;
  padding: 0 18px;
  color: #06489a;
  background: #fff;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(14, 42, 79, .05);
}

.homeAction:hover,
.homeAction:focus {
  color: #06336f;
  text-decoration: none;
}

.homeAction--primary:hover,
.homeAction--primary:focus {
  color: #fff;
}

.homeCards {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px 18px;
}

.homeBlock {
  position: relative;
  min-height: 132px;
  padding: 16px 16px 12px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  background: #fff;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  box-shadow: 0 7px 20px rgba(14, 42, 79, .08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.homeBlock:hover,
.homeBlock:focus-within {
  transform: translateY(-2px);
  border-color: #b7cde9;
  box-shadow: 0 12px 28px rgba(14, 42, 79, .12);
}

.homeBlock > a {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 8px;
}

.homeFront {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.homeFront i {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0874d8;
  font-size: 26px;
  background: linear-gradient(180deg, #eef7ff 0%, #e5f1ff 100%);
}

.homeBlock--teal .homeFront i {
  color: #058a96;
  background: linear-gradient(180deg, #eefcfc 0%, #e0f5f5 100%);
}

.homeBlock--purple .homeFront i {
  color: #6530b5;
  background: linear-gradient(180deg, #f4efff 0%, #ece4ff 100%);
}

.homeFront h2 {
  margin: 0 0 6px;
  color: #062b65;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
}

.homeContent {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.homeContent p {
  margin: -48px 0 0 74px;
  color: #3d4960;
  font-size: .84rem;
  line-height: 1.45;
  order: 1;
}

.homeContent::before {
  content: "";
  display: block;
  height: 1px;
  margin-top: 2px;
  background: #dce4ef;
  order: 2;
}

.homeContent span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0269ca;
  font-size: .82rem;
  font-weight: 800;
  order: 3;
}

.homeContent span::after {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.homePanels {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.homePanel {
  min-width: 0;
  padding: 16px 18px 14px;
  background: #fff;
  border: 1px solid #d9e2ee;
  border-top: 3px solid #0e9874;
  border-radius: 8px;
  box-shadow: 0 7px 20px rgba(14, 42, 79, .08);
}

.homePanel--matters {
  border-top-color: #1976df;
}

.homePanel--rules {
  border-top-color: #7a3db8;
}

.homePanel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.homePanel__head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #0b8d64;
  font-size: .86rem;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.homePanel--matters .homePanel__head h2 {
  color: #1267ce;
}

.homePanel--rules .homePanel__head h2 {
  color: #6733aa;
}

.homePanel__head > a,
.homePanel__head > span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid currentColor;
  font-size: .72rem;
  line-height: 1.2;
  font-weight: 800;
}

.homePanel h3 {
  margin: 0 0 16px 36px;
  color: #10203b;
  font-size: 1.08rem;
  font-weight: 900;
}

.homeSessionInfo {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}

.homeSessionInfo div,
.homeCompactItem {
  display: grid;
  gap: 10px;
}

.homeSessionInfo div {
  grid-template-columns: 26px minmax(0, 1fr);
}

.homeSessionInfo dt {
  grid-column: 1;
  color: #5d6a81;
  font-size: 0;
}

.homeSessionInfo dt i {
  font-size: 17px;
}

.homeSessionInfo dd {
  grid-column: 2;
  margin: 0;
  color: #2f3b52;
  font-size: .88rem;
}

.homePanel__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 14px;
  color: #06489a;
  border: 1px solid #bac9dc;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 800;
}

.homePanel__button:hover,
.homePanel__button:focus {
  color: #032e70;
  text-decoration: none;
  background: #f5f9ff;
}

.homeCompactList {
  display: grid;
  gap: 9px;
}

.homeCompactItem {
  grid-template-columns: 66px minmax(0, 1fr) 18px;
  align-items: center;
  color: #26334c;
}

.homeCompactItem:hover,
.homeCompactItem:focus {
  color: #0b438e;
  text-decoration: none;
}

.homeCompactItem > strong {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 5px;
  color: #0957b4;
  background: #f1f6ff;
  border: 1px solid #c6d9f2;
  border-radius: 6px;
  font-size: .72rem;
  line-height: 1.15;
  text-align: center;
}

.homePanel--rules .homeCompactItem > strong {
  color: #6733aa;
  background: #f7f1ff;
  border-color: #dcc8f1;
}

.homeCompactItem span {
  min-width: 0;
}

.homeCompactItem b {
  display: block;
  color: #0b438e;
  font-size: .84rem;
  line-height: 1.25;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homeCompactItem small {
  margin-top: 3px;
  color: #3d4960;
  font-size: .78rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.homeEmpty {
  margin: 0;
  padding: 14px;
  color: #536176;
  background: #f6f8fb;
  border: 1px dashed #cfd9e7;
  border-radius: 8px;
  font-size: .86rem;
}

.sapl-success-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 0 0 2.5rem;
}

.sapl-success-card {
  background: var(--sapl-surface);
  border: 1px solid var(--sapl-border);
  border-radius: var(--sapl-radius-lg);
  box-shadow: var(--sapl-shadow-sm);
  padding: 1.5rem;
}

.sapl-success-card__header {
  margin-bottom: 1.25rem;
}

.sapl-success-card__title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 900;
}

.sapl-success-card__subtitle {
  margin: .45rem 0 0;
  color: var(--sapl-text-soft);
}

.sapl-success-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sapl-success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
}

.footer {
  position: relative;
  width: 100%;
  margin-top: auto;
  padding: 22px 0;
  color: #fff;
  background: linear-gradient(180deg, #06489a 0%, #003174 100%);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.footer .container,
.footer .row {
  margin: 0;
}

.footer .container {
  display: grid;
  place-items: center;
}

.footer .row {
  width: auto;
  display: flex;
  justify-content: center;
}

.footer .col-md-4 {
  width: auto;
  max-width: 760px;
  flex: 0 1 auto;
  text-align: center;
  margin: 0 auto;
  padding: 0;
}

.footer small,
.footer a,
.footer strong,
.footer .org {
  color: #fff;
}

@media (max-width: 1280px) {
  .homeSearch,
  .homePanels {
    grid-template-columns: 1fr;
  }

  .homeSearch__actions {
    justify-content: stretch;
  }

  .homeAction {
    flex: 1 1 0;
  }

  .homeCards {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .sapl-success-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .site-navbar .navbar-collapse {
    padding: 10px 0 14px;
  }

  .site-navbar .nav-link,
  .site-navbar .nav-link--restricted {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .site-navbar #autenticacao {
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 900px) {
  .container-home {
    padding: 18px 12px 8px;
  }

  .homeCards {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .homeSearch__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .masthead {
    min-height: 0;
    padding: 22px 0;
    background-position: center;
  }

  .masthead .container {
    display: block;
  }

  .masthead .navbar-brand {
    gap: 14px;
  }

  .masthead .navbar-brand img.img-responsive {
    width: 76px;
    height: 76px;
  }

  .masthead .vcenter {
    font-size: 1.18rem;
  }

  .masthead .vcenter small {
    margin-top: 5px;
    font-size: .88rem;
  }

  .masthead .vcenter em {
    margin-top: 8px;
    font-size: .82rem;
  }
}

@media (max-width: 576px) {
  .homeSearch__form {
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .homeSearch__form button {
    grid-column: 1 / -1;
  }

  .homeAction {
    min-width: 100%;
  }

  .homeCards {
    grid-template-columns: 1fr;
  }

  .homeContent p {
    margin-left: 0;
    margin-top: 0;
  }
}
