:root {
  --portal-primary: #155eef;
  --portal-primary-dark: #1849a9;
  --portal-secondary: #0e9384;
  --portal-sidebar: #101828;
  --portal-sidebar-soft: #1d2939;
  --portal-canvas: #f5f7fa;
  --portal-surface: #ffffff;
  --portal-border: #e4e7ec;
  --portal-text: #101828;
  --portal-muted: #667085;
  --portal-radius-sm: 0.5rem;
  --portal-radius: 0.75rem;
  --portal-radius-lg: 1rem;
  --portal-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --portal-shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.10);
}

html {
  font-size: 16px;
}

body {
  color: var(--portal-text);
  background: var(--portal-canvas);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--portal-primary);
}

a:hover {
  color: var(--portal-primary-dark);
  text-decoration: none;
}

/* Estrutura principal */
.content-wrapper {
  background: var(--portal-canvas);
}

.content-header {
  padding: 1.5rem 0.5rem 0.75rem;
}

.content-header h1 {
  color: var(--portal-text);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

.content {
  padding: 0 0.5rem 2rem;
}

.breadcrumb {
  background: transparent;
  color: var(--portal-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.portal-page-header {
  padding-bottom: 1rem;
}

.portal-page-heading {
  align-items: center;
  display: flex;
  gap: 0.9rem;
}

.portal-page-heading__icon {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #d1e0ff;
  border-radius: var(--portal-radius);
  color: var(--portal-primary);
  display: inline-flex;
  flex: 0 0 46px;
  font-size: 1.05rem;
  height: 46px;
  justify-content: center;
}

.portal-page-heading p {
  color: var(--portal-muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.main-header {
  min-height: 64px;
  border-bottom: 1px solid var(--portal-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.main-header .nav-link {
  align-items: center;
  color: #344054 !important;
  display: flex;
  min-height: 48px;
}

.main-footer {
  border-top: 1px solid var(--portal-border);
  color: var(--portal-muted);
  font-size: 0.875rem;
  padding: 1rem 1.5rem;
}

/* Menu lateral */
.main-sidebar {
  background: linear-gradient(180deg, var(--portal-sidebar) 0%, #182230 100%);
  box-shadow: 8px 0 24px rgba(16, 24, 40, 0.10) !important;
  height: 100vh;
  overflow: hidden;
}

.brand-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  min-height: 106px;
}

.brand-link .brand-text {
  color: #f9fafb;
  font-size: 1rem;
  font-weight: 650 !important;
  letter-spacing: -0.01em;
}

.brand-link .brand-image {
  float: none;
  margin: 0.75rem 0 0 !important;
  max-height: 70px;
  opacity: 1 !important;
}

/* A marca ocupa mais espaço que o cabeçalho padrão do AdminLTE. A altura
   explícita impede que o final do menu fique escondido abaixo da viewport. */
.layout-fixed .main-sidebar .sidebar {
  height: calc(100vh - 156px) !important;
  overflow-x: hidden;
  overflow-y: auto;

  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.layout-fixed .main-sidebar .sidebar::-webkit-scrollbar {
  width: 1px;
}

.layout-fixed .main-sidebar .sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.layout-fixed .main-sidebar .sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.nav-sidebar {
  gap: 0.15rem;
}

.nav-sidebar > .nav-item > .nav-link {
  border-radius: var(--portal-radius-sm);
  color: #d0d5dd;
  margin: 0 0.5rem;
  padding: 0.7rem 0.85rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-sidebar > .nav-item > .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-sidebar > .nav-item > .nav-link.active,
.nav-sidebar > .nav-item.menu-open > .nav-link {
  background: var(--portal-primary);
  box-shadow: 0 6px 14px rgba(21, 94, 239, 0.22);
  color: #ffffff;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link {
  border-radius: var(--portal-radius-sm);
  color: #b9c0cc;
  margin: 0.1rem 0.5rem 0.1rem 1rem;
  padding: 0.55rem 0.75rem;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

.nav-header {
  color: #98a2b3 !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1.25rem 1.35rem 0.45rem !important;
}

.portal-version {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #98a2b3;
  display: flex;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.5rem;
  letter-spacing: 0.04em;
  margin: 1rem 0.75rem 0;
  padding: 1rem 0.65rem 1.5rem;
  text-transform: uppercase;
}

.portal-version__dot {
  background: #12b76a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.12);
  height: 0.5rem;
  width: 0.5rem;
}

.portal-upload-zone {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #98a2b3;
  border-radius: var(--portal-radius-lg);
  display: flex;
  gap: 1.25rem;
  min-height: 180px;
  padding: 1.5rem;
}

.portal-upload-zone > div {
  flex: 1;
}

.portal-upload-zone__icon {
  align-items: center;
  background: #eaf2ff;
  border-radius: 50%;
  color: var(--portal-primary);
  display: inline-flex;
  flex: 0 0 64px;
  font-size: 1.5rem;
  height: 64px;
  justify-content: center;
}

.portal-guidance-list {
  display: grid;
  gap: 1.1rem;
}

.portal-guidance-list > div {
  align-items: flex-start;
  display: flex;
  gap: 0.8rem;
}

.portal-guidance-list i {
  margin-top: 0.2rem;
  width: 1.25rem;
}

.portal-guidance-list strong,
.portal-guidance-list small {
  display: block;
}

.portal-guidance-list small {
  color: var(--portal-muted);
  margin-top: 0.15rem;
}

.portal-metric-grid .small-box {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow);
  color: var(--portal-text);
  min-height: 112px;
  overflow: hidden;
}

.portal-metric-grid .small-box .inner p {
  color: inherit;
  font-weight: 650;
  margin-bottom: 0.2rem;
}

.portal-metric-grid .small-box .inner h3 {
  font-size: 1.55rem;
  margin: 0;
}

.portal-metric-grid .small-box .icon {
  color: currentColor;
  opacity: 0.14;
}

/* Cartões de dados e formulários */
.card {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  align-items: center;
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  min-height: 58px;
  padding: 0.9rem 1.25rem;
}

.card-title {
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  background: #fcfcfd;
  border-top: 1px solid var(--portal-border);
  padding: 1rem 1.25rem;
}

.card[class*="card-outline"] {
  border-top-width: 3px;
}

.portal-list-card > .card-header {
  justify-content: space-between;
}

.portal-record-count {
  background: #f2f4f7;
  border-radius: 999px;
  color: #475467;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
}

/* Barras de busca e filtros das listagens */
.portal-filter-bar {
  align-items: flex-end;
  background: #f9fafb;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
}

.portal-filter-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
}

.portal-filter-bar .form-control,
.portal-filter-bar .custom-select {
  min-width: 150px;
}

.portal-filter-bar__fields {
  align-items: flex-end;
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portal-filter-bar__actions {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.portal-filter-count {
  color: var(--portal-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.25rem;
}

.portal-table-responsive {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
}

.portal-table-responsive > .table {
  min-width: 720px;
}

.portal-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  white-space: nowrap;
}

.portal-actions .btn {
  align-items: center;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0.3rem 0.55rem;
}

.portal-actions form {
  display: inline-flex !important;
  margin: 0;
}

.portal-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
}

.portal-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 0.4rem;
  opacity: 0.75;
  width: 0.4rem;
}

.portal-status--success { background: #ecfdf3; color: #027a48; }
.portal-status--warning { background: #fffaeb; color: #b54708; }
.portal-status--danger { background: #fef3f2; color: #b42318; }
.portal-status--neutral { background: #f2f4f7; color: #475467; }
.portal-status--info { background: #eff8ff; color: #175cd3; }

.portal-empty-row:hover,
.portal-empty-row td {
  background: #ffffff !important;
}

.portal-empty-state {
  align-items: center;
  color: var(--portal-muted);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1rem;
  text-align: center;
}

.portal-empty-state__icon {
  align-items: center;
  background: #f2f4f7;
  border-radius: 50%;
  color: #667085;
  display: inline-flex;
  font-size: 1rem;
  height: 44px;
  justify-content: center;
  margin-bottom: 0.75rem;
  width: 44px;
}

.portal-empty-state strong {
  color: #344054;
  font-size: 0.95rem;
}

.portal-empty-state span:not(.portal-empty-state__icon) {
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* Formulários da etapa 3 */
.portal-form-shell {
  margin: 0 auto;
  max-width: 1120px;
}

.portal-form-card {
  overflow: visible;
}

.portal-form-card > .card-header {
  border-radius: var(--portal-radius-lg) var(--portal-radius-lg) 0 0;
}

.portal-form-intro {
  color: var(--portal-muted);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.portal-form-required-note {
  color: var(--portal-muted);
  font-size: 0.78rem;
  margin-left: auto;
}

.portal-required-marker {
  color: #d92d20;
  margin-left: 0.2rem;
}

.portal-form-section {
  border-bottom: 1px solid var(--portal-border);
  margin-bottom: 1.35rem;
  padding-bottom: 0.35rem;
}

.portal-form-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.portal-form-section__header {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portal-form-section__icon {
  align-items: center;
  background: #eff4ff;
  border-radius: var(--portal-radius-sm);
  color: var(--portal-primary);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
}

.portal-form-section__header h3 {
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.portal-form-section__header p {
  color: var(--portal-muted);
  font-size: 0.8rem;
  margin: 0.15rem 0 0;
}

.portal-form-actions {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.portal-form-actions .btn-primary {
  min-width: 120px;
}

.portal-validation-summary {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: var(--portal-radius);
  color: #912018;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
}

.portal-validation-summary strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.portal-validation-summary ul {
  margin: 0;
  padding-left: 1.15rem;
}

.portal-validation-summary a {
  color: #912018;
  font-size: 0.82rem;
  text-decoration: underline;
}

.form-control.is-invalid,
.custom-select.is-invalid {
  background-image: none;
  border-color: #f04438;
  box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.08);
}

.portal-generated-error {
  color: #d92d20;
  display: block;
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.portal-upload-zone {
  background: #fcfcfd;
  border: 1px dashed #98a2b3;
  border-radius: var(--portal-radius);
  padding: 1rem;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.portal-upload-zone:focus-within {
  background: #f8faff;
  border-color: var(--portal-primary);
}

.portal-upload-zone .form-control-file {
  cursor: pointer;
  width: 100%;
}

.portal-file-preview {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin-top: 0.75rem;
}

.portal-file-preview__item {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  display: flex;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.55rem;
}

.portal-file-preview__item img,
.portal-file-preview__icon {
  align-items: center;
  background: #eff4ff;
  border-radius: 0.4rem;
  color: var(--portal-primary);
  display: inline-flex;
  flex: 0 0 42px;
  height: 42px;
  justify-content: center;
  object-fit: cover;
  width: 42px;
}

.portal-file-preview__item span {
  min-width: 0;
}

.portal-file-preview__item strong,
.portal-file-preview__item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-file-preview__item strong {
  color: #344054;
  font-size: 0.78rem;
}

.portal-file-preview__item small {
  color: var(--portal-muted);
  font-size: 0.7rem;
}

.portal-current-files {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.portal-current-file {
  background: #f9fafb;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  overflow: hidden;
  padding: 0.65rem;
}

.portal-current-file img {
  aspect-ratio: 4 / 3;
  border-radius: var(--portal-radius-sm);
  object-fit: cover;
  width: 100%;
}

/* Formulários */
label {
  color: #344054;
  font-size: 0.875rem;
  font-weight: 600 !important;
  margin-bottom: 0.4rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-control,
.custom-select,
.input-group-text {
  border-color: #d0d5dd;
  border-radius: var(--portal-radius-sm);
  min-height: 42px;
}

.form-control {
  color: var(--portal-text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-control::placeholder {
  color: #98a2b3;
}

.form-control:focus,
.custom-select:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.input-group-text {
  background: #f9fafb;
  color: #475467;
}

.form-text,
.text-muted {
  color: var(--portal-muted) !important;
}

/* Botões e ações */
.btn {
  border-radius: var(--portal-radius-sm);
  font-weight: 600;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  transition: box-shadow 150ms ease, transform 150ms ease, background-color 150ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:focus {
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.14) !important;
}

.btn-primary {
  background: var(--portal-primary);
  border-color: var(--portal-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--portal-primary-dark);
  border-color: var(--portal-primary-dark);
}

.btn-default,
.btn-secondary {
  background: #ffffff;
  border-color: #d0d5dd;
  color: #344054;
}

.btn-danger {
  background: #d92d20;
  border-color: #d92d20;
}

/* Listagens e visualização de dados */
.table {
  color: #344054;
  margin-bottom: 0;
}

.table thead th {
  background: #f9fafb;
  border-bottom: 1px solid var(--portal-border);
  border-top: 0;
  color: #475467;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.8rem 0.9rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.table td {
  border-top-color: #eaecf0;
  padding: 0.85rem 0.9rem;
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: background-color 120ms ease;
}

.table-hover tbody tr:hover {
  background: #f8faff;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: #fcfcfd;
}

.badge {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.35rem 0.6rem;
}

.pagination .page-link {
  border-color: var(--portal-border);
  color: #344054;
  margin: 0 0.15rem;
}

.page-item.active .page-link {
  background: var(--portal-primary);
  border-color: var(--portal-primary);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #d0d5dd;
  border-radius: var(--portal-radius-sm);
  min-height: 38px;
  padding: 0.35rem 0.6rem;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
  align-items: center;
  padding: 0.75rem 0;
}

/* Feedback, modais e estados */
.alert {
  border: 0;
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
}

.modal-content {
  border: 0;
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow-lg);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  border-color: var(--portal-border);
  padding: 1rem 1.25rem;
}

.dropdown-menu {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow-lg);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 0.4rem;
  padding: 0.65rem 0.75rem;
}

/* Visualização pública de registros */
.portal-public-page {
  background: var(--portal-canvas);
  min-height: 100vh;
}

.portal-public-header {
  background: var(--portal-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.portal-public-header__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 74px;
  padding: 0.75rem 1.25rem;
}

.portal-public-brand {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  gap: 0.75rem;
}

.portal-public-brand:hover {
  color: #ffffff;
}

.portal-public-brand img {
  height: 46px;
  object-fit: contain;
  width: 46px;
}

.portal-public-brand span,
.portal-public-brand small {
  display: block;
}

.portal-public-brand small {
  color: #98a2b3;
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.portal-public-version {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d0d5dd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  text-transform: uppercase;
}

.portal-detail-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 1.5rem 1.25rem 3rem;
}

.portal-detail-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.portal-detail-hero {
  align-items: flex-end;
  background: linear-gradient(135deg, #1849a9 0%, #0e9384 100%);
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow-lg);
  color: #ffffff;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  overflow: hidden;
  padding: 1.75rem;
}

.portal-detail-eyebrow {
  color: #d1e9ff;
  display: block;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.portal-detail-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0;
}

.portal-detail-hero p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0.45rem 0 0;
}

.portal-detail-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--portal-radius);
  flex: 0 0 auto;
  min-width: 180px;
  padding: 0.75rem 1rem;
}

.portal-detail-tag small,
.portal-detail-tag strong {
  display: block;
}

.portal-detail-tag small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
}

.portal-detail-tag strong {
  font-size: 1.2rem;
}

.portal-detail-summary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.portal-summary-tile {
  background: #ffffff;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  padding: 1rem;
}

.portal-summary-tile > span,
.portal-summary-tile > strong {
  display: block;
}

.portal-summary-tile > span {
  color: var(--portal-muted);
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.portal-summary-tile > strong {
  color: var(--portal-text);
  font-size: 0.95rem;
}

.portal-detail-card .card-title i {
  color: var(--portal-primary);
}

.portal-description-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.portal-description-grid > div {
  border-left: 3px solid #d1e0ff;
  padding-left: 0.8rem;
}

.portal-description-grid dt {
  color: var(--portal-muted);
  font-size: 0.75rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.portal-description-grid dd {
  color: var(--portal-text);
  margin: 0;
}

.portal-image-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.portal-image-grid a {
  background: #f2f4f7;
  border-radius: var(--portal-radius);
  display: block;
  overflow: hidden;
}

.portal-image-grid img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.portal-image-grid a:hover img {
  transform: scale(1.025);
}

.portal-public-footer {
  color: var(--portal-muted);
  font-size: 0.8rem;
  padding: 0 1rem 2rem;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.35);
  outline-offset: 2px;
}

@media (max-width: 767.98px) {
  .content-header {
    padding-top: 1rem;
  }

  .content-header .row > [class*="col-"] {
    margin-bottom: 0.5rem;
  }

  .breadcrumb {
    float: none !important;
    padding-left: 0;
  }

  .card-body {
    padding: 1rem;
  }

  .table-responsive {
    border: 0;
  }

  .main-header .navbar-nav .nav-link .portal-user-name {
    display: none;
  }

  .portal-page-heading {
    align-items: flex-start;
  }

  .portal-page-heading__icon {
    flex-basis: 40px;
    height: 40px;
  }

  .portal-filter-bar,
  .portal-filter-bar__fields {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-filter-bar .form-group,
  .portal-filter-bar .form-control,
  .portal-filter-bar .custom-select {
    min-width: 100%;
    width: 100%;
  }

  .portal-filter-bar__actions {
    border-top: 1px solid var(--portal-border);
    justify-content: stretch;
    margin-left: 0;
    padding-top: 0.75rem;
    width: 100%;
  }

  .portal-filter-bar__actions .btn {
    flex: 1 1 auto;
  }

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

  .portal-form-actions .btn {
    width: 100%;
  }

  .portal-public-header__inner,
  .portal-detail-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .portal-detail-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 1.25rem;
  }

  .portal-detail-tag {
    min-width: 0;
  }

  .portal-detail-summary,
  .portal-description-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479.98px) {
  .portal-public-version {
    display: none;
  }

  .portal-detail-summary,
  .portal-description-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .portal-public-header,
  .portal-detail-toolbar,
  .portal-public-footer {
    display: none !important;
  }

  .portal-detail-shell {
    max-width: none;
    padding: 0;
  }

  .portal-detail-hero,
  .card,
  .portal-summary-tile {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
