/* Estilos globais ? cores em brand.generated.css (a partir de branding/branding.toml) */

html {
  background: #eef2f7;
  overscroll-behavior: none;
}

html:has(.app-body) {
  height: 100%;
  overflow: hidden;
}

body.app-body {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background: #eef2f7;
}

/* Admin shell */
:root {
  --sidebar-width: 260px;
}

.app-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: var(--app-vh, 100dvh);
  min-height: var(--app-vh, 100dvh);
  overflow: hidden;
}

.app-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #eef2f7;
  overflow: hidden;
}

@media (min-width: 992px) {
  .app-content {
    left: var(--sidebar-width);
  }
}

.app-main {
  flex: 1 1 0%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #eef2f7;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Bootstrap overrides */
.btn-primary,
.bg-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-primary-dark) !important;
  border-color: var(--brand-primary-dark) !important;
}
.text-primary { color: var(--brand-primary) !important; }
.btn-success, .bg-success {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
.border-primary { border-color: var(--brand-primary) !important; }

.btn-brand-primary {
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0.625rem;
  padding: 0.5rem 1.25rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-brand-primary:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-brand {
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
  border-radius: 0.625rem;
  background: transparent;
}
.btn-outline-brand:hover {
  background: var(--brand-primary);
  color: #fff;
}

.link-brand {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}
.link-brand:hover { color: var(--brand-primary-dark); }

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--brand-text, #1f2937);
  background: #eef2f7;
  overscroll-behavior: none;
}

/* Scroll fino ? s? aparece quando h? conte?do a scrollar */
.app-main,
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 40, 68, 0.22) transparent;
}

.app-main::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.app-main::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.app-main::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(15, 40, 68, 0.15);
  border-radius: 999px;
}

.app-main::-webkit-scrollbar-thumb:hover,
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(15, 40, 68, 0.28);
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

.app-main-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

@media (min-width: 992px) {
  .app-main-inner { padding: 2rem 2.5rem 2.5rem; }
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  z-index: 1020;
}

.app-toolbar {
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.55rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  z-index: 1015;
}

.app-toolbar-context,
.app-navbar-context {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-muted, #64748b);
  white-space: nowrap;
}

.app-toolbar-end {
  flex-shrink: 0;
}

.app-topbar .app-navbar-context {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 400px) {
  .app-topbar .app-navbar-context {
    max-width: none;
  }
}

.app-toolbar-spacer {
  flex: 1;
}

@media (min-width: 992px) {
  .app-topbar { display: none; }
}

.btn-sidebar-toggle {
  border: 1px solid var(--brand-border);
  background: #fff;
  color: var(--brand-primary);
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
}

.topbar-logo {
  height: 28px;
  max-width: 140px;
  object-fit: contain;
}

.app-sidebar {
  width: var(--sidebar-width);
  max-width: 85vw;
  background: linear-gradient(165deg, #0f2844 0%, var(--brand-primary) 45%, #163a5c 100%);
  color: #fff;
  border: none;
  box-shadow: 4px 0 24px rgba(15, 40, 68, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .app-sidebar.offcanvas {
    top: 0 !important;
    left: 0;
    z-index: 1045;
    width: min(85vw, 280px);
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--sidebar-width) !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column;
    z-index: 1030;
  }
}

.sidebar-head {
  display: flex;
  align-items: center;
  padding: 1rem 1rem 0.85rem;
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-brand { display: block; flex: 1; }

.sidebar-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  padding: 0 !important;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.85rem 1.25rem 0.35rem;
}

.sidebar-section:first-child .sidebar-section-label {
  padding-top: 0.65rem;
}

.sidebar-section + .sidebar-section {
  margin-top: 0.15rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.75rem;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.sidebar-icon {
  grid-column: 1;
  grid-row: 1;
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.sidebar-link-text {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-link-badge {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  min-width: 1.25rem;
  text-align: right;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-link.active {
  background: rgba(0, 184, 230, 0.18);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--brand-accent);
  box-shadow: inset 0 0 0 1px rgba(0, 184, 230, 0.25);
}

.sidebar-link.active .sidebar-icon {
  color: var(--brand-accent);
  opacity: 1;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.85rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 40, 68, 0.35);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sidebar-user-meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.sidebar-user {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 184, 230, 0.25);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-sidebar-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.45rem;
  border-radius: 0.5rem;
}

.btn-sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-sidebar-action {
  background: rgba(0, 184, 230, 0.15);
  border: 1px solid rgba(0, 184, 230, 0.35);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.45rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: block;
  text-align: center;
}

.btn-sidebar-action:hover {
  background: rgba(0, 184, 230, 0.28);
  color: #fff;
  border-color: rgba(0, 184, 230, 0.5);
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-sidebar-icon:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-heading {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-primary);
  margin: 0;
}

.page-subtitle {
  color: var(--brand-muted);
  font-size: 0.92rem;
  margin: 0.25rem 0 0;
}

.app-alert {
  border-radius: 0.65rem;
  margin-bottom: 1.25rem;
}

/* KPI cards */
.kpi-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--brand-border);
  box-shadow: 0 1px 3px rgba(15, 40, 68, 0.04);
  height: 100%;
  transition: box-shadow 0.2s, transform 0.15s;
}

.kpi-card:hover {
  box-shadow: 0 8px 24px rgba(15, 40, 68, 0.08);
  transform: translateY(-1px);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-primary .kpi-icon { background: rgba(26, 65, 105, 0.1); color: var(--brand-primary); }
.kpi-secondary .kpi-icon { background: rgba(46, 117, 182, 0.12); color: var(--brand-secondary); }
.kpi-danger .kpi-icon { background: rgba(220, 38, 38, 0.1); color: var(--brand-danger); }
.kpi-warning .kpi-icon { background: rgba(245, 158, 11, 0.12); color: var(--brand-warning); }

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
  line-height: 1.2;
}

.kpi-secondary .kpi-value { color: var(--brand-secondary); }
.kpi-danger .kpi-value { color: var(--brand-danger); }
.kpi-warning .kpi-value { color: var(--brand-warning); }

/* Panels & tables */
.app-panel {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--brand-border);
  box-shadow: 0 1px 3px rgba(15, 40, 68, 0.04);
  overflow: visible;
}

.app-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--brand-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.app-panel-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--brand-primary);
}

.app-panel-body {
  padding: 1rem 1.25rem;
}

.app-panel-footer {
  padding: 1rem 1.25rem;
  background: #fff;
}

.app-table thead th {
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-muted);
  border-bottom: 1px solid var(--brand-border);
  padding: 0.85rem 1rem;
}

.app-table tbody td {
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid #f1f5f9;
}

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

.app-table tbody tr:last-child td {
  border-bottom: 0;
}

.table.app-table.table-sm thead th,
.table.app-table.table-sm tbody td {
  padding: 0.65rem 1rem;
}

.card {
  border-radius: 1rem;
  border: 1px solid var(--brand-border);
  box-shadow: 0 1px 3px rgba(15, 40, 68, 0.04);
}

.table td, .table th { vertical-align: middle; }

.error-page-card .error-code {
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1;
}

.error-details-wrap {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.65rem;
  background: #f8fafc;
  overflow: hidden;
}

.error-details-toggle {
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-muted, #64748b);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.error-details-toggle::-webkit-details-marker {
  display: none;
}

.error-details-chevron {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.error-details-wrap[open] .error-details-chevron {
  transform: rotate(90deg);
}

.error-details-wrap[open] .error-details-toggle {
  border-bottom: 1px solid var(--brand-border, #e2e8f0);
  background: #fff;
}

.error-details-panel {
  max-height: 12rem;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  background: #fff;
}

.error-details-pre {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Legacy navbar removida */
.app-navbar { display: none; }

/* Public pages */
html:has(.public-body) {
  background: var(--brand-bg);
  margin: 0;
  padding: 0;
}

.public-body {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: var(--brand-bg);
  overscroll-behavior: none;
  overflow-x: hidden;
}

.public-main {
  flex: 1 0 auto;
}

.public-header {
  background: var(--brand-surface);
  border-bottom: 1px solid var(--brand-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0);
  box-shadow: 0 1px 0 var(--brand-border);
  flex-shrink: 0;
}

.public-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  height: env(safe-area-inset-top, 0px);
  background: var(--brand-surface);
}

.logged-in-banner {
  background: linear-gradient(90deg, rgba(26, 65, 105, 0.12), rgba(0, 184, 230, 0.1));
  border-bottom: 1px solid var(--brand-border);
  color: var(--brand-primary-dark);
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  width: 100%;
}

.logged-in-banner a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.logged-in-banner a:hover {
  text-decoration: underline;
}

.config-tabs {
  border-bottom: 1px solid var(--brand-border);
  gap: 0.25rem;
}

.config-tabs .nav-link {
  color: var(--brand-muted);
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.65rem 1rem;
}

.config-tabs .nav-link.active {
  color: var(--brand-primary);
  background: transparent;
  border-bottom-color: var(--brand-primary);
}

.public-logo { height: 52px; width: auto; }
.public-logo-wide { height: 44px; max-width: 220px; object-fit: contain; }
.footer-logo { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 3px; }
.footer-logo-wide { height: 36px; max-width: 180px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px 8px; }

.public-brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-accent);
  line-height: 1.2;
}
.public-brand-tagline {
  font-size: 0.8rem;
  color: var(--brand-muted);
}

.hero-section {
  background: linear-gradient(160deg, #fff 0%, var(--brand-bg) 55%, rgba(0, 184, 230, 0.06) 100%);
}
.hero-section-compact { padding-top: 0; }

.hero-badge {
  display: inline-block;
  background: rgba(26, 65, 105, 0.1);
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.hero-badge-muted {
  background: rgba(46, 117, 182, 0.12);
  color: var(--brand-secondary);
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-primary);
  line-height: 1.15;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--brand-muted);
  max-width: 36rem;
}

.hero-logo-wrap {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  display: inline-block;
}
.hero-logo { max-width: 220px; height: auto; }
.hero-logo-wide { max-width: 320px; width: 100%; height: auto; }

.section-muted { background: var(--brand-surface); }
.section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-accent);
}
.section-subtitle { color: var(--brand-muted); }
.section-label {
  color: var(--brand-primary);
  font-weight: 700;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fff;
}
.feature-icon-primary { background: var(--brand-primary); }
.feature-icon-secondary { background: var(--brand-secondary); }
.feature-icon-accent { background: var(--brand-accent); }
.feature-icon i { font-size: 1.1rem; }

/* Landing institucional (/plataforma) */
.platform-landing .platform-nav-link {
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.platform-landing .platform-nav-link:hover {
  color: var(--brand-primary);
  background: rgba(26, 65, 105, 0.06);
}
.platform-stat {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 0.875rem;
  padding: 0.85rem 1rem;
  text-align: center;
}
.platform-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--brand-primary);
  line-height: 1.1;
}
.platform-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--brand-muted);
  margin-top: 0.15rem;
}
.platform-mockup {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}
.platform-mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--brand-bg);
  border-bottom: 1px solid var(--brand-border);
}
.platform-mockup-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand-border);
}
.platform-mockup-bar span:first-child { background: #fca5a5; }
.platform-mockup-bar span:nth-child(2) { background: #fcd34d; }
.platform-mockup-bar span:nth-child(3) { background: #86efac; }
.platform-mockup-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-mockup-body {
  display: flex;
  min-height: 280px;
}
.platform-mockup-sidebar {
  width: 4.5rem;
  background: var(--brand-primary-dark);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.platform-mockup-sidebar div {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}
.platform-mockup-sidebar div.active {
  background: var(--brand-accent);
  width: 80%;
}
.platform-mockup-content {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(180deg, #fff 0%, var(--brand-bg) 100%);
}
.platform-mockup-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.platform-mockup-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  padding: 0.65rem;
}
.platform-mockup-card small {
  display: block;
  font-size: 0.62rem;
  color: var(--brand-muted);
  margin-bottom: 0.15rem;
}
.platform-mockup-card strong {
  font-size: 0.85rem;
  color: var(--brand-primary);
}
.platform-mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 120px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 0.75rem;
}
.platform-mockup-chart div {
  flex: 1;
  border-radius: 0.35rem 0.35rem 0 0;
  background: linear-gradient(180deg, var(--brand-accent), var(--brand-secondary));
  opacity: 0.85;
}
.platform-cycle {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
@media (max-width: 991px) {
  .platform-cycle { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .platform-cycle { grid-template-columns: 1fr; }
}
.platform-cycle-step {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.platform-cycle-step span {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 184, 230, 0.12);
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}
.platform-cycle-step strong {
  display: block;
  color: var(--brand-accent);
  font-size: 0.95rem;
}
.platform-cycle-step small {
  display: block;
  color: var(--brand-muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
.platform-module {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.platform-module:hover {
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
}
.platform-module i {
  font-size: 1.5rem;
  color: var(--brand-secondary);
  margin-bottom: 0.75rem;
  display: block;
}
.platform-module h3 {
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 0.5rem;
}
.platform-module p {
  color: var(--brand-muted);
  font-size: 0.92rem;
  margin: 0;
}
.platform-contact a { color: rgba(255, 255, 255, 0.9); }

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps-list li {
  position: relative;
  padding: 1rem 0 1rem 3rem;
  border-bottom: 1px solid var(--brand-border);
  color: var(--brand-muted);
}
.steps-list li:last-child { border-bottom: 0; }
.steps-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand-secondary);
  opacity: 0.15;
}
.steps-list strong { color: var(--brand-accent); }

.cta-section {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 55%, var(--brand-accent) 100%);
}

.public-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: var(--brand-primary);
  color: #fff;
}

.form-card { border-radius: 1.25rem !important; }

.auth-body { min-height: 100vh; margin: 0; }
.auth-form-wrap {
  max-width: 420px;
  width: 100%;
  background: #fff;
  padding: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  border: 1px solid var(--brand-border);
}

/* Login simples (sem painel lateral) */
.auth-simple {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  background: var(--brand-bg);
}
.auth-back-simple {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.auth-back-simple:hover { color: var(--brand-primary); }
.auth-logo-sm {
  width: auto;
  max-width: 200px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 0.875rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.trust-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: 0.95rem;
}
.trust-list li:last-child { border-bottom: 0; }
.trust-list strong { color: var(--brand-accent); }

.step-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
}
.step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.step-number-secondary { background: var(--brand-secondary); }
.step-number-accent { background: var(--brand-accent); }

.service-pill {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-accent);
}

.footer-label {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.7);
}
.footer-link {
  color: #fff;
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.footer-link:hover { color: rgba(255,255,255,0.85); }

@media (max-width: 991px) {
  .auth-panel-brand { min-height: auto; padding-top: 4rem; padding-bottom: 2rem; }
  .auth-features { display: none; }
}

/* Icon buttons & payment modal */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 0.5rem;
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
}

a.btn,
a.btn-icon {
  text-decoration: none !important;
}

a.btn:hover,
a.btn-icon:hover {
  text-decoration: none !important;
}

.table-actions {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
  width: 1%;
}

.table-actions > .btn,
.table-actions > .btn-icon,
.table-actions > a,
.table-actions > form,
.table-actions > span {
  display: inline-flex;
  vertical-align: middle;
}

.table-actions > form {
  margin: 0;
}

.table-actions-group > form {
  margin: 0;
  display: inline-flex;
  flex-shrink: 0;
}

.table-actions-group {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  max-width: 100%;
}

.table-actions-group .btn,
.table-actions-group .btn-icon {
  flex-shrink: 0;
}

.table-actions-group .btn-icon.btn-brand-primary {
  padding: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.table-actions-group .btn {
  border-radius: 0.5rem;
  white-space: nowrap;
}

.monitoria-data-readonly {
  background-color: #f8fafc;
  cursor: default;
}

th.table-actions-col {
  width: 1%;
  min-width: 6.5rem;
  white-space: nowrap;
}

.table-responsive .app-table thead .table-actions-col,
.table-responsive .app-table tbody td.table-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--brand-surface, #fff);
  box-shadow: -6px 0 10px rgba(15, 23, 42, 0.05);
}

.table-responsive .app-table tbody td.table-actions {
  z-index: 1;
}

.table-responsive .app-table.table-hover tbody tr:hover td.table-actions {
  background: var(--bs-table-hover-bg, #f1f5f9);
}

.table-data-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.table-data-link:hover {
  text-decoration: underline;
}

.pedido-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pedido-toolbar .btn,
.pedido-toolbar form {
  margin: 0;
}

.pedido-toolbar form {
  display: inline-flex;
}

.pedido-toolbar .btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.5rem;
}

.pedido-toolbar .btn-brand-primary.btn-sm {
  transform: none;
}

.pedido-toolbar .btn-brand-primary.btn-sm:hover {
  transform: none;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin: 0;
}

.payment-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.payment-step {
  flex: 1 1 auto;
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6c757d;
  background: #f1f4f8;
  border-radius: 999px;
  padding: 0.35rem 0.5rem;
}

.payment-step.active {
  color: #fff;
  background: var(--brand-primary);
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.15rem;
}

.detail-value {
  font-weight: 600;
  color: var(--brand-primary-dark);
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.detail-value--long {
  font-weight: 500;
  font-size: 0.92rem;
}

.mini-stat {
  background: #f8fafc;
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  padding: 0.65rem 0.5rem;
}

.mini-stat span {
  display: block;
  font-size: 0.72rem;
  color: #6c757d;
  margin-bottom: 0.15rem;
}

.mini-stat strong {
  font-size: 0.9rem;
  color: var(--brand-primary-dark);
}

.mini-stat-accent {
  background: rgba(0, 184, 230, 0.08);
  border-color: rgba(0, 184, 230, 0.25);
}

.reprog-form-grid .form-label {
  margin-bottom: 0.35rem;
}

.reprog-juros-info {
  padding: 0.85rem 1rem;
  background: var(--brand-surface, #f8fafc);
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
}

.method-card {
  display: block;
  cursor: pointer;
  margin: 0;
}

.method-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-card span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.method-card input:checked + span {
  border-color: var(--brand-primary);
  background: rgba(29, 78, 137, 0.08);
  color: var(--brand-primary);
}

.allocation-preview,
.confirm-box {
  background: #f8fafc;
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  padding: 0.85rem;
}

.payment-confirm-meta {
  margin-bottom: 0.5rem;
}

.payment-confirm-kv {
  background: #f8fafc;
  border: 1px solid var(--brand-border);
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  height: 100%;
}

.payment-confirm-kv span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.15rem;
}

.payment-confirm-kv strong {
  display: block;
  font-size: 0.92rem;
  color: var(--brand-primary-dark);
  word-break: break-word;
}

.payment-confirm-table-wrap {
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.payment-confirm-table {
  width: 100%;
  margin-bottom: 0;
}

.payment-confirm-table thead th {
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  padding: 0.55rem 0.65rem;
  white-space: nowrap;
}

.payment-confirm-table tbody td {
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  vertical-align: middle;
  border-color: var(--brand-border);
}

.payment-confirm-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.9);
}

.payment-confirm-badge {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  font-weight: 700;
  color: var(--brand-primary);
}

.payment-confirm-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px dashed var(--brand-border);
  border-radius: 0.55rem;
  font-size: 0.88rem;
}

.payment-confirm-extra--info {
  background: rgba(29, 78, 137, 0.06);
  border-style: solid;
  border-color: rgba(29, 78, 137, 0.18);
}

.payment-confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(29, 78, 137, 0.08);
  border: 1px solid rgba(29, 78, 137, 0.2);
  border-radius: 0.65rem;
}

.payment-confirm-total span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary-dark);
}

.payment-confirm-total strong {
  font-size: 1.15rem;
  color: var(--brand-primary);
}

.risco-escala-ind .risco-escala-input {
  display: inline-block;
  width: 5.5rem;
  vertical-align: middle;
}

.risco-config-dim .risco-escala-ind:last-child {
  margin-bottom: 0;
}

/* Payment modal ? mobile */
@media (max-width: 575.98px) {
  .payment-modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
  }
  .payment-modal-content {
    min-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }
  .payment-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }
  .payment-modal-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--brand-border);
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
  .payment-step {
    font-size: 0.7rem;
    min-width: 0;
    padding: 0.3rem 0.35rem;
  }
  .mini-stat {
    padding: 0.5rem 0.35rem;
  }
  .mini-stat strong {
    font-size: 0.82rem;
    word-break: break-word;
  }
}

.mini-stat-debt {
  background: rgba(26, 65, 105, 0.08);
  border: 1px solid rgba(26, 65, 105, 0.2);
  border-radius: 0.65rem;
  padding: 0.75rem;
}

.mini-stat-debt strong {
  display: block;
  font-size: 1.1rem;
  color: var(--brand-primary-dark);
  margin-top: 0.15rem;
}

/* Credit line cards */
.credit-line-card {
  background: #fff;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.85rem;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.credit-line-card:hover {
  box-shadow: 0 10px 28px rgba(26, 65, 105, 0.1);
  transform: translateY(-2px);
}

.credit-line-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.credit-line-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin: 0;
}

.credit-line-desc {
  font-size: 0.88rem;
  color: #6c757d;
  margin-bottom: 1rem;
  min-height: 2.5rem;
}

.credit-line-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.credit-line-stat {
  background: #f8fafc;
  border-radius: 0.55rem;
  padding: 0.5rem 0.65rem;
}

.credit-line-stat span {
  display: block;
  font-size: 0.72rem;
  color: #6c757d;
  margin-bottom: 0.1rem;
}

.credit-line-stat strong {
  font-size: 0.88rem;
  color: var(--brand-primary-dark);
}

.credit-line-meta {
  font-size: 0.82rem;
  color: #6c757d;
}

.credit-line-actions {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--brand-border, #e2e8f0);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Client search (pedido wizard) */
.cliente-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.cliente-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cliente-search-item:hover,
.cliente-search-item:focus {
  border-color: var(--brand-primary);
  background: rgba(29, 78, 137, 0.05);
  outline: none;
}

.cliente-search-item span {
  font-size: 0.82rem;
  color: #6c757d;
}

.cliente-selected-card {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  background: #fff;
}

.cliente-resumo-box {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--brand-border, #e2e8f0);
}

.cliente-resumo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .cliente-resumo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cliente-resumo-contratos {
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.garantias-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pedido-picker-host {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pedido-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.pedido-picker-tag {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.85rem;
}

.pedido-picker-tag-body {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.pedido-picker-tag-remove {
  flex-shrink: 0;
  padding: 0 0.15rem;
  line-height: 1;
  color: #64748b;
  text-decoration: none;
}

.pedido-picker-tag-remove:hover {
  color: #dc3545;
}

.pedido-picker-actions {
  margin-top: 0.15rem;
}

.picker-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

.picker-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
}

.picker-result-body {
  min-width: 0;
  flex: 1;
  font-size: 0.9rem;
  word-break: break-word;
}

.picker-result-add {
  flex-shrink: 0;
}

.garantia-item {
  padding: 0.75rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.65rem;
  background: #f8fafc;
}

.anexos-dinamicos-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* An?lise de pedido */
.pedido-breadcrumb .breadcrumb-item a {
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.85rem;
}

.pedido-decisao-panel {
  border-top: 3px solid var(--brand-primary, #1a4169);
}

.reprog-gestao-panel .pedido-decisao-panel {
  border-top: none;
}

.reprog-gestao-panel .app-panel-body {
  padding-top: 0.25rem;
}

.reprog-analisar-bar {
  margin-top: 0.15rem;
}

.reprog-gestao-panel .pedido-decisao-action {
  padding: 1.25rem 1.35rem;
}

.reprog-gestao-panel .pedido-decisao-form {
  gap: 0;
}

.reprog-gestao-panel .pedido-decisao-form .pedido-decisao-textarea {
  flex: 0 0 auto;
  min-height: 6.5rem;
}

.reprog-gestao-panel .pedido-decisao-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.25rem;
}

.reprog-gestao-panel .pedido-decisao-submit {
  margin-top: 0;
  min-width: 14rem;
}

.reprog-gestao-panel .pedido-decisao-grid {
  margin-top: 0.15rem;
}

.pedido-decisao-grid {
  align-items: stretch;
}

.pedido-decisao-grid > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.pedido-decisao-action {
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.pedido-decisao-grid .pedido-decisao-action {
  min-height: 100%;
}

.pedido-decisao-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.pedido-decisao-form .pedido-decisao-textarea {
  flex: 1;
  min-height: 8rem;
}

.pedido-decisao-form .pedido-decisao-submit {
  margin-top: auto;
}

.pedido-condicoes-finais {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.75rem;
  row-gap: 0.85rem;
}

.pedido-condicao-campo--full,
.pedido-condicao-campo:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.pedido-condicao-campo .form-label {
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.pedido-condicao-campo .form-control {
  width: 100%;
}

.desembolso-pendente-panel {
  border-left: 4px solid var(--brand-primary, #1e3a5f);
  overflow: hidden;
}

.desembolso-pendente-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.desembolso-pendente-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: rgba(30, 58, 95, 0.08);
  color: var(--brand-primary, #1e3a5f);
  font-size: 1.25rem;
}

.desembolso-pendente-checklist li {
  margin-bottom: 0.15rem;
}

.desembolso-pendente-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  background: #f8fafc;
  border-top: 1px solid var(--brand-border, #e2e8f0);
  border-bottom: 1px solid var(--brand-border, #e2e8f0);
}

.desembolso-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.desembolso-metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.desembolso-metric-value {
  font-size: 1rem;
  color: #0f172a;
}

.desembolso-metric--highlight .desembolso-metric-value {
  color: var(--brand-primary, #1e3a5f);
  font-size: 1.1rem;
}

.desembolso-pendente-action {
  padding: 0 1.25rem 1.25rem;
}

.desembolso-modal-resumo {
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.65rem;
  padding: 1rem;
}

.desembolso-modal-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.desembolso-modal-kpi-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.desembolso-modal-kpi-value {
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-word;
}

.desembolso-modal-kpi--accent .desembolso-modal-kpi-value {
  color: var(--brand-primary, #1e3a5f);
  font-size: 1rem;
}

.desembolso-modal-upload .app-file-upload-box {
  min-height: 2.75rem;
}

@media (max-width: 767.98px) {
  .desembolso-pendente-metrics {
    grid-template-columns: 1fr;
  }
}

.desembolso-pendente-action .btn {
  min-width: 12rem;
}

.fecho-job-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1080;
  background: linear-gradient(90deg, #1e3a5f 0%, #2d4a73 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

body.fecho-job-banner-active {
  padding-top: 3.25rem;
}

body.fecho-job-banner-active .fecho-job-banner {
  position: fixed;
  top: 0;
}

.fecho-job-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.55rem 1rem;
  max-width: 100%;
  flex-wrap: wrap;
}

.fecho-job-banner-icon {
  font-size: 1.25rem;
  opacity: 0.9;
}

.fecho-job-banner-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.fecho-job-banner-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 4.5rem;
  text-align: center;
}

.fecho-job-countdown-wrap {
  padding: 1rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
}

.fecho-job-countdown-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.fecho-job-countdown {
  font-size: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-primary, #1e3a5f);
  line-height: 1.1;
}

.fecho-job-modal-content {
  border-top: 4px solid var(--brand-primary, #1e3a5f);
}

.kpi-box {
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  height: 100%;
}

.kpi-label {
  font-size: 0.7rem;
  color: var(--brand-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text, #1e293b);
}

.garantia-tag {
  background: rgba(29, 78, 137, 0.1);
  color: var(--brand-primary);
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
}

.ratio-bar-wrap {
  position: relative;
}

.ratio-bar-bg {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.ratio-limit-marker {
  position: absolute;
  top: -0.35rem;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: #d97706;
  white-space: nowrap;
  pointer-events: none;
}

.ratio-limit-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 0.65rem;
  background: #f59e0b;
  transform: translateX(-50%);
  border-radius: 1px;
}

.risco-pedido-resumo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ratio-bar-fill {
  background: linear-gradient(90deg, #22c55e, #86efac);
  height: 8px;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.ratio-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fcd34d);
}

.ratio-bar-fill.danger {
  background: linear-gradient(90deg, #ef4444, #fca5a5);
}

.ratio-scale {
  font-size: 0.7rem;
  color: #94a3b8;
}

.score-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.score-baixo { background: #dcfce7; color: #16a34a; }
.score-medio { background: #fef9c3; color: #ca8a04; }
.score-alto { background: #fee2e2; color: #dc2626; }

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 0.85rem;
  border-left: 2px solid #e2e8f0;
  margin-left: 0.35rem;
}

.timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 4px;
}

.timeline-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
}

.timeline-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

.timeline-observacao {
  font-size: 0.85rem;
  color: #475569;
  background: #f8fafc;
  border-left: 3px solid #f59e0b;
  padding: 0.45rem 0.65rem;
  border-radius: 0 0.35rem 0.35rem 0;
}

.timeline-detalhes {
  font-size: 0.8rem;
  line-height: 1.4;
}

.field-readonly {
  background: #f1f5f9 !important;
  color: var(--brand-primary-dark, #1a4169);
  font-weight: 600;
  cursor: not-allowed;
  user-select: none;
}

/* Responsive stacked tables (mobile) */
@media (max-width: 767.98px) {
  .table-stack thead {
    display: none;
  }

  .table-stack tbody tr {
    display: block;
    margin-bottom: 0.85rem;
    border: 1px solid var(--brand-border, #e2e8f0);
    border-radius: 0.65rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
  }

  .table-stack tbody tr.table-danger {
    border-color: rgba(220, 53, 69, 0.35);
    background: rgba(220, 53, 69, 0.04);
  }

  .table-stack tbody tr.table-success {
    border-color: rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.04);
  }

  .table-stack tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: none;
    padding: 0.4rem 0;
    text-align: right !important;
  }

  .table-stack tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.78rem;
    color: #6c757d;
    text-align: left;
    flex-shrink: 0;
  }

  .table-stack tbody td[data-label="A??es"],
  .table-stack tbody td.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
  }

  .table-stack tbody td[data-label="A??es"]::before,
  .table-stack tbody td.table-actions::before {
    display: block;
  }

  .table-stack tbody td[data-label="A??es"],
  .table-stack tbody td.table-actions {
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--brand-border, #e2e8f0);
  }

  .table-stack tbody td.table-actions .table-actions-group {
    margin-left: auto;
    justify-content: flex-end;
  }

  .table-stack tbody td.acompanhamento-chk {
    width: 100%;
    max-width: 100%;
  }

  .table-stack tbody td.d-none {
    display: none !important;
  }

  .credit-line-stats {
    grid-template-columns: 1fr;
  }
}

/* Modais ? header e footer fixos, scroll s? no corpo */
.app-modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2rem);
}

.app-modal-content > .app-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  flex-shrink: 0;
}

.app-modal-content .modal-body,
.payment-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-footer,
.payment-modal-footer {
  flex-shrink: 0;
}

.app-modal-content .modal-footer .btn {
  border-radius: 0.625rem;
}

@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down {
    padding: 0 !important;
  }

  .modal-fullscreen-sm-down .modal-dialog {
    margin: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
  }

  .modal-fullscreen-sm-down .modal-content,
  .app-modal-content {
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }

  .modal-footer,
  .payment-modal-footer {
    border-top: 1px solid var(--brand-border);
    background: #fff;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .modal-header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}

/* Date pickers (Flatpickr) */
.flatpickr-input.form-control,
input.flatpickr-input {
  background-color: #fff;
}

.flatpickr-calendar {
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(26, 65, 105, 0.15);
  border: 1px solid var(--brand-border, #dee2e6);
  z-index: 1070;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--brand-primary, #1a4169);
  border-color: var(--brand-primary, #1a4169);
}

.flatpickr-day.today {
  border-color: var(--brand-accent, #c9a227);
}

.monitoria-observacoes {
  white-space: pre-wrap;
  line-height: 1.6;
}

/* File upload */
.app-file-upload {
  display: block;
  position: relative;
  cursor: pointer;
  margin-bottom: 0;
}

.app-file-input-native {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.app-file-upload-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px dashed var(--brand-border, #cbd5e1);
  border-radius: 0.75rem;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s;
}

.app-file-upload:hover .app-file-upload-box,
.app-file-upload:focus-within .app-file-upload-box {
  border-color: var(--brand-primary, #1a4169);
  background: #f1f5f9;
}

.app-file-upload.has-file .app-file-upload-box {
  border-style: solid;
  border-color: rgba(26, 65, 105, 0.35);
  background: #fff;
}

.app-file-upload-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: rgba(26, 65, 105, 0.08);
  color: var(--brand-primary, #1a4169);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.app-file-upload-text {
  font-weight: 600;
  color: var(--brand-primary, #1a4169);
  font-size: 0.9rem;
}

.app-file-upload-name {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.1rem;
  word-break: break-all;
}

.app-file-upload-name.has-file {
  color: #0f172a;
  font-weight: 500;
}

.app-file-upload-sm .app-file-upload-box {
  padding: 0.55rem 0.75rem;
}

.app-file-upload-sm .app-file-upload-icon {
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
}

.app-file-upload-block {
  width: 100%;
}

.app-file-upload-block .app-file-upload-box {
  width: 100%;
}

.anexo-pedido-field .app-file-upload {
  width: 100%;
}

.anexos-pedido-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.anexo-pedido-item {
  padding: 0.75rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.75rem;
  background: #fafbfc;
}

.anexo-pedido-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.anexo-pedido-item .app-file-upload {
  width: 100%;
}

.anexo-add-bar {
  padding-top: 0.25rem;
}

.cliente-resumo-pedidos {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--brand-border, #e2e8f0);
}

.cliente-ficha-stack .app-panel {
  width: 100%;
}

.form-label-required {
  color: #dc3545;
  font-weight: 700;
}

#clienteForm .form-label {
  margin-bottom: 0.45rem;
}

#clienteForm .cliente-form-section {
  margin-top: 0.75rem;
  padding-top: 0.35rem;
}

#clienteForm .cliente-form-panel,
#formSolicitarCredito .cliente-form-panel,
#pedidoForm .cliente-form-panel,
#pedidoEditForm .cliente-form-panel {
  margin-bottom: 1rem;
}

#clienteForm .cliente-form-panel-body,
#formSolicitarCredito .cliente-form-panel-body,
#pedidoForm .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel-body {
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#clienteForm .cliente-form-panel--tipo .cliente-form-panel-body,
#formSolicitarCredito .cliente-form-panel--tipo .cliente-form-panel-body {
  background: linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
}

#clienteForm .cliente-form-panel--identificacao .cliente-form-panel-body {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

#clienteForm .cliente-form-panel--pessoais .cliente-form-panel-body {
  background: linear-gradient(180deg, #fff8ef 0%, #fffdf9 100%);
}

#clienteForm .cliente-form-panel--contacto .cliente-form-panel-body,
#formSolicitarCredito .cliente-form-panel--identificacao .cliente-form-panel-body {
  background: linear-gradient(180deg, #f3fbf6 0%, #fbfffc 100%);
}

#clienteForm .cliente-form-panel--actividade .cliente-form-panel-body {
  background: linear-gradient(180deg, #f5f3ff 0%, #fdfcff 100%);
}

#clienteForm .cliente-form-panel--contas .cliente-form-panel-body {
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fcff 100%);
}

#clienteForm .cliente-form-panel--documentos .cliente-form-panel-body {
  background: linear-gradient(180deg, #faf5ff 0%, #fefcff 100%);
}

#clienteForm .cliente-doc-grupo {
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(15, 23, 42, 0.1);
}

#clienteForm .cliente-doc-grupo--comum {
  background: rgba(255, 255, 255, 0.65);
}

#clienteForm .cliente-doc-grupo--singular {
  background: rgba(238, 244, 251, 0.85);
}

#clienteForm .cliente-doc-grupo--colectivo {
  background: rgba(243, 251, 246, 0.9);
}

#formSolicitarCredito .cliente-form-panel--pedido .cliente-form-panel-body {
  background: linear-gradient(180deg, #f5f3ff 0%, #fdfcff 100%);
}

#pedidoForm .cliente-form-panel--cliente .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel--cliente .cliente-form-panel-body {
  background: linear-gradient(180deg, #eef4fb 0%, #f8fafc 100%);
}

#pedidoForm .cliente-form-panel--linha .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel--linha .cliente-form-panel-body {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

#pedidoForm .cliente-form-panel--finalidade .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel--finalidade .cliente-form-panel-body {
  background: linear-gradient(180deg, #f5f3ff 0%, #fdfcff 100%);
}

#pedidoForm .cliente-form-panel--garantias .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel--garantias .cliente-form-panel-body {
  background: linear-gradient(180deg, #f3fbf6 0%, #fbfffc 100%);
}

#pedidoForm .cliente-form-panel--documentos .cliente-form-panel-body,
#pedidoEditForm .cliente-form-panel--documentos .cliente-form-panel-body {
  background: linear-gradient(180deg, #faf5ff 0%, #fefcff 100%);
}

#clienteForm .cliente-form-panel-title,
#formSolicitarCredito .cliente-form-panel-title,
#pedidoForm .cliente-form-panel-title,
#pedidoEditForm .cliente-form-panel-title {
  color: var(--brand-primary, #1e3a5f);
  font-weight: 700;
  letter-spacing: 0.01em;
}

#clienteForm .conta-cliente-row {
  margin-bottom: 1rem !important;
}

#clienteForm .form-control,
#clienteForm .form-select {
  min-height: 2.5rem;
}

@media (min-width: 992px) {
  .cliente-ficha-stack .border-lg-start {
    border-left: 1px solid var(--brand-border, #e2e8f0);
  }
}

.cliente-doc-panel {
  min-width: 0;
  overflow: hidden;
}

.cliente-doc-list {
  margin-bottom: 0;
  overflow: hidden;
}

.cliente-doc-item {
  min-width: 0;
  overflow: hidden;
}

.cliente-doc-info {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cliente-doc-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cliente-doc-actions {
  flex: 0 0 auto;
  align-items: center;
}

.cliente-doc-actions .btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.cliente-resumo-pedidos ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

/* ?? Notifica??es e badges de aten??o ?? */
.nav-attention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #1e293b;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(15, 40, 68, 0.35);
}

.app-toolbar .btn-notif-bell {
  border-color: var(--brand-border);
  background: #fff;
  color: var(--brand-primary);
}

.app-toolbar .btn-notif-bell:hover,
.app-toolbar .btn-notif-bell:focus {
  background: #f8fafc;
  color: var(--brand-primary-dark, #1a4169);
}

.app-toolbar .btn-notif-bell .nav-attention-badge {
  box-shadow: 0 0 0 2px #fff;
}

.app-toolbar .notif-menu {
  z-index: 1055;
}

.btn-notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background 0.15s ease;
}

.btn-notif-bell:hover,
.btn-notif-bell:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.btn-notif-bell-sm {
  width: 2rem;
  height: 2rem;
  border-color: var(--brand-border);
  background: #fff;
  color: var(--brand-primary);
}

.btn-notif-bell .nav-attention-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  font-size: 0.62rem;
  box-shadow: 0 0 0 2px #fff;
}

.notif-menu {
  min-width: 300px;
  max-width: min(360px, 92vw);
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--brand-border);
  border-radius: 0.65rem;
  padding: 0.35rem 0;
}

.notif-menu-head {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.notif-item {
  white-space: normal;
  padding: 0.65rem 1rem;
  border-left: 3px solid transparent;
}

.notif-item-alta {
  border-left-color: #dc2626;
}

.notif-item-media {
  border-left-color: #f59e0b;
}

.notif-item-baixa {
  border-left-color: #94a3b8;
}

.notif-item-title {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-text, #1e293b);
}

.notif-item-msg {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.section-attention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.75rem;
  vertical-align: middle;
  animation: attention-pulse 2s ease-in-out infinite;
}

.panel-needs-attention {
  border: 1px solid #fcd34d;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

/* Centro de pagamentos unificado */
.pagamento-centro-panel .app-panel-header {
  border-bottom: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.pagamento-centro-list {
  display: flex;
  flex-direction: column;
}

.pagamento-centro-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color, #e2e8f0);
}

.pagamento-centro-item:last-child {
  border-bottom: none;
}

.pagamento-centro-item-icon {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.pagamento-centro-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.pagamento-centro-item-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.pagamento-centro-item-meta {
  font-size: 0.82rem;
  color: #64748b;
}

.pagamento-centro-item-desc {
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.pagamento-centro-item-action {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.pagamento-centro-item-valor {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.pagamento-modal .pagamento-step-dot {
  font-size: 0.75rem;
  color: #94a3b8;
}

.pagamento-modal .pagamento-step-dot.active {
  color: #2563eb;
  font-weight: 700;
}

.pagamento-modal .pagamento-step-dot.done {
  color: #16a34a;
}

.pagamento-modal .pagamento-step-sep {
  margin: 0 0.35rem;
  color: #cbd5e1;
  font-size: 0.7rem;
}

.pagamento-resumo-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f8fafc;
}

.pagamento-resumo-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.pagamento-resumo-row:last-child {
  border-bottom: none;
}

.pagamento-resumo-row span {
  color: #64748b;
}

.pagamento-resumo-valor strong {
  color: #2563eb;
  font-size: 1.1rem;
}

.pagamento-metodo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}

.pagamento-metodo-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  transition: border-color 0.15s, background 0.15s;
}

.pagamento-metodo-card i {
  font-size: 1.35rem;
  color: #64748b;
}

.pagamento-metodo-card.selected,
.pagamento-metodo-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.pagamento-metodo-card.selected i {
  color: #2563eb;
}

.pagamento-sucesso-icon {
  font-size: 3rem;
  color: #16a34a;
  line-height: 1;
}

@media (max-width: 575.98px) {
  .pagamento-centro-item {
    flex-wrap: wrap;
  }

  .pagamento-centro-item-action {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.encaminhamento-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.encaminhamento-bar--attention {
  border-color: #fcd34d;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.encaminhamento-bar-meta {
  line-height: 1.4;
}

.pedido-filter-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: #475569;
}

.pedido-filter-tabs .nav-link.active {
  background: var(--brand-primary);
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
}

.pedido-filter-tabs .nav-link.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.tab-count-attention {
  background: #f59e0b;
  color: #1e293b;
}

.pedido-filter-tabs .nav-link.active .tab-count-attention {
  background: #fff;
  color: #b45309;
}

@keyframes attention-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

/* ??? Configura??es ??? */
.config-panel .config-tabs {
  border-bottom: 1px solid #e2e8f0;
  gap: 0.25rem;
}

.config-panel .config-tabs .nav-link {
  border: none;
  border-radius: 0.5rem 0.5rem 0 0;
  color: #64748b;
  font-weight: 500;
  padding: 0.55rem 1rem;
}

.config-panel .config-tabs .nav-link.active {
  color: var(--brand-primary);
  background: #f8fafc;
  border-bottom: 2px solid var(--brand-primary);
}

.config-section-save-bar {
  margin-top: 0.25rem;
}

.config-section-form .form-control.font-monospace {
  font-size: 0.8125rem;
}

#configSectionsNav .config-section-search input {
  border-radius: 999px;
}

.config-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.65rem;
}

.config-section-desc {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 0.85rem;
  line-height: 1.45;
  max-width: 52rem;
}

.config-operacional-sections {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.config-section-block {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.config-section-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.config-section-block--grouped {
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.config-section-block--grouped .config-section-title {
  margin-bottom: 0.35rem;
}

.config-section-block--grouped .config-check-card {
  background: #fff;
}

.config-fields-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 991.98px) {
  .config-fields-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .config-fields-grid--3 {
    grid-template-columns: 1fr;
  }
}

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

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

.config-fields-grid > [class*="col-"] {
  max-width: 100%;
  padding: 0;
}

.config-check-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  cursor: pointer;
  min-height: 3rem;
  transition: border-color 0.15s, background 0.15s;
}

.config-check-card:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.config-check-card input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--brand-primary);
}

.config-check-label {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.35;
}

/* ??? Permiss?es (fun??es) ??? */
.permissoes-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1rem;
  min-height: 420px;
}

@media (max-width: 991.98px) {
  .permissoes-layout {
    grid-template-columns: 1fr;
  }
}

.permissoes-roles {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.permissoes-roles-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.permissoes-roles-head .h6 {
  color: #fff;
}

.permissoes-roles-list {
  max-height: 520px;
  overflow-y: auto;
}

.role-list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.85rem 1rem;
  transition: background 0.15s;
}

.role-list-item:hover {
  background: #f8fafc;
}

.role-list-item.active {
  background: #2563eb;
  color: #fff;
}

.role-list-item.active .role-list-code,
.role-list-item.active .role-list-meta {
  color: rgba(255, 255, 255, 0.85);
}

.role-list-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.role-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}

.role-badge-system {
  background: #dbeafe;
  color: #1d4ed8;
}

.role-list-item.active .role-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.role-list-code {
  display: block;
  font-size: 0.72rem;
  color: #dc2626;
  margin-bottom: 0.2rem;
}

.role-list-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

.permissoes-editor {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}

.permissoes-editor-head {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.permissoes-editor-head .h6,
.permissoes-editor-head code,
.permissoes-editor-head .text-muted {
  color: rgba(255, 255, 255, 0.92) !important;
}

.permissoes-editor form[data-funcao-edit-form] {
  padding: 1rem 1rem 0;
}

.permissoes-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.permissoes-editor-toolbar .form-control {
  flex: 1;
  min-width: 180px;
}

.perm-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
  white-space: nowrap;
}

.permissoes-checks {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.perm-section {
  margin-bottom: 1rem;
}

.perm-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #f1f5f9;
}

.perm-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0.35rem;
  border-radius: 0.35rem;
  cursor: pointer;
  margin: 0;
}

.perm-check-row:hover {
  background: #f8fafc;
}

.perm-check-row input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: #2563eb;
}

.perm-check-title {
  display: block;
  font-size: 0.88rem;
  color: #1e293b;
}

.perm-check-code {
  display: block;
  font-size: 0.72rem;
  color: #dc2626;
  margin-top: 0.1rem;
}

.kpi-card.kpi-outline {
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: none;
}

.kpi-value-sm {
  font-size: 1.35rem;
}

.kpi-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.relatorio-detalhe-wrap {
  margin-bottom: 1.5rem;
}

.relatorio-table tfoot th {
  background: #f1f5f9;
  font-weight: 600;
  border-top: 2px solid #cbd5e1;
}

.relatorio-table {
  font-size: 0.85rem;
  width: max-content;
  min-width: 100%;
}

.relatorio-panel {
  border-radius: 0.85rem;
}

.relatorio-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.relatorio-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.relatorio-table .rel-col-num {
  text-align: right;
  white-space: nowrap;
}

.relatorio-table .rel-col-pct {
  text-align: center;
  white-space: nowrap;
}

.relatorio-table .rel-col-nowrap {
  white-space: nowrap;
}

.relatorio-table .rel-col-text {
  min-width: 8rem;
  max-width: 14rem;
}

.relatorio-table .rel-moeda {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.relatorio-table tbody td {
  vertical-align: middle;
}

.relatorio-totais-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 2px solid #cbd5e1;
}

.rel-total-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 9rem;
}

.rel-total-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.rel-total-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary-dark, #1a4169);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Relat?rio hub cards */
.relatorio-search-panel .input-group-text {
  border-right: 0;
}

.relatorio-search-panel .form-control {
  border-left: 0;
}

.relatorio-search-panel .form-control:focus {
  box-shadow: none;
}

.relatorio-search-meta {
  padding-top: 1.65rem;
}

@media (max-width: 991.98px) {
  .relatorio-search-meta {
    padding-top: 0.25rem;
  }
}

.linha-periodicidades-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.linha-periodicidades-grid .config-check-card {
  flex: 1 1 160px;
  margin: 0;
}

.dash-chart-wrap {
  position: relative;
  width: 100%;
}

.dash-chart-wrap-lg {
  height: 280px;
  min-height: 220px;
}

.dash-chart-wrap-sm {
  height: 260px;
  min-height: 200px;
}

@media (max-width: 991.98px) {
  .dash-chart-wrap-lg {
    height: 240px;
  }

  .dash-chart-wrap-sm {
    height: 220px;
  }
}

.relatorio-card-link {
  display: block;
  text-decoration: none;
  height: 100%;
}

.relatorio-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  height: 100%;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 1rem;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s;
}

.relatorio-card:hover {
  box-shadow: 0 12px 32px rgba(26, 65, 105, 0.12);
  transform: translateY(-3px);
  border-color: transparent;
}

.relatorio-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.relatorio-card-body {
  flex: 1;
  min-width: 0;
}

.relatorio-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-primary-dark, #1a4169);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.relatorio-card-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.relatorio-card-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 1.1rem;
  margin-top: 0.15rem;
  transition: transform 0.2s, color 0.2s;
}

.relatorio-card:hover .relatorio-card-arrow {
  transform: translateX(4px);
  color: var(--brand-primary, #1a4169);
}

.relatorio-card-blue .relatorio-card-icon { background: #dbeafe; color: #1d4ed8; }
.relatorio-card-amber .relatorio-card-icon { background: #fef3c7; color: #d97706; }
.relatorio-card-green .relatorio-card-icon { background: #dcfce7; color: #16a34a; }
.relatorio-card-teal .relatorio-card-icon { background: #ccfbf1; color: #0d9488; }
.relatorio-card-indigo .relatorio-card-icon { background: #e0e7ff; color: #4f46e5; }
.relatorio-card-purple .relatorio-card-icon { background: #f3e8ff; color: #9333ea; }
.relatorio-card-red .relatorio-card-icon { background: #fee2e2; color: #dc2626; }
.relatorio-card-cyan .relatorio-card-icon { background: #cffafe; color: #0891b2; }
.relatorio-card-lime .relatorio-card-icon { background: #ecfccb; color: #65a30d; }
.relatorio-card-orange .relatorio-card-icon { background: #ffedd5; color: #ea580c; }
.relatorio-card-slate .relatorio-card-icon { background: #f1f5f9; color: #475569; }

.relatorio-card-blue:hover { border-color: #93c5fd; }
.relatorio-card-amber:hover { border-color: #fcd34d; }
.relatorio-card-green:hover { border-color: #86efac; }
.relatorio-card-teal:hover { border-color: #5eead4; }
.relatorio-card-indigo:hover { border-color: #a5b4fc; }
.relatorio-card-purple:hover { border-color: #d8b4fe; }
.relatorio-card-red:hover { border-color: #fca5a5; }
.relatorio-card-cyan:hover { border-color: #67e8f9; }
.relatorio-card-lime:hover { border-color: #bef264; }
.relatorio-card-orange:hover { border-color: #fdba74; }
.relatorio-card-slate:hover { border-color: #cbd5e1; }

/* Simulador ? campos com slider + valor manual */
.sim-field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem 0.85rem;
  height: 100%;
}

.sim-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.sim-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.sim-field-value {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.2rem 0.55rem 0.2rem 0.65rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sim-field-input {
  border: 0;
  background: transparent;
  width: 5.5rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-primary-dark, #1a4169);
  padding: 0.15rem 0;
  -moz-appearance: textfield;
}

.sim-field-input:focus {
  outline: none;
  box-shadow: none;
}

.sim-field-input::-webkit-outer-spin-button,
.sim-field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sim-field-suffix {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sim-field[data-sim-field="Valor"] .sim-field-input {
  width: 6.5rem;
}

.sim-range {
  --bs-form-range-thumb-bg: var(--brand-primary, #1a4169);
  margin: 0.15rem 0 0.35rem;
}

.sim-range::-webkit-slider-thumb {
  background: var(--brand-primary, #1a4169);
}

.sim-field-limits {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
}

.sim-field-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0.35rem 0 0;
  line-height: 1.35;
}

/* legado ? manter compatibilidade se restarem classes antigas */
.sim-slider-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
}

.sim-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.sim-slider-output {
  font-weight: 700;
  color: var(--brand-primary-dark, #1a4169);
  font-size: 0.95rem;
}

.sim-slider-limits {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.sim-amort-table .sim-row-dif {
  background: #fffbeb;
}

.sim-amort-table .sim-row-dif td {
  color: #92400e;
}

.sim-plano-toggle {
  cursor: pointer;
  color: inherit;
}

.sim-plano-toggle:hover .h6,
.sim-plano-toggle:focus-visible .h6 {
  color: var(--brand-primary, #1a4169);
}

.sim-plano-toggle:focus-visible {
  outline: 2px solid var(--brand-primary, #1a4169);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.sim-plano-chevron {
  color: #64748b;
  transition: transform 0.15s ease;
}

/* Manual / documenta??o (/ajuda) */
.doc-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.doc-card:hover {
  border-color: var(--brand-primary, #1a4169);
  box-shadow: 0 2px 8px rgba(26, 65, 105, 0.08);
  color: inherit;
}

.doc-sidebar {
  top: 1rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.doc-page-row {
  min-width: 0;
  max-width: 100%;
}

.doc-page-sidebar,
.doc-page-content {
  min-width: 0;
  max-width: 100%;
}

.doc-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-nav-group {
  min-width: 0;
}

.doc-nav-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
  padding: 0 0.15rem;
}

.doc-nav-item {
  display: block;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.15rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--brand-text, #1e293b);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.doc-nav-item:hover {
  background: #f1f5f9;
  color: var(--brand-primary-dark, #1a4169);
}

.doc-nav-item.active {
  background: rgba(26, 65, 105, 0.08);
  border-color: rgba(26, 65, 105, 0.15);
  color: var(--brand-primary-dark, #1a4169);
  font-weight: 600;
}

.doc-article {
  min-width: 0;
  max-width: 100%;
}

.doc-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--brand-text, #1e293b);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.doc-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.375rem;
  background: #fff;
}

.doc-table-wrap table {
  width: max-content;
  min-width: 100%;
  margin-bottom: 0;
  font-size: 0.8125rem;
}

.doc-table-wrap th,
.doc-table-wrap td {
  vertical-align: top;
  max-width: 16rem;
  white-space: normal;
  word-break: break-word;
}

.doc-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--brand-border, #e2e8f0);
}

.doc-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.doc-content p,
.doc-content ul,
.doc-content ol {
  margin-bottom: 0.85rem;
}

.doc-content ul,
.doc-content ol {
  padding-left: 1.35rem;
}

.doc-content ul.doc-task-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.doc-task-item {
  list-style: none;
  margin-bottom: 0.35rem;
}

.doc-task-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0;
  cursor: default;
  font-weight: normal;
}

.doc-task-check {
  margin-top: 0.15rem;
  flex-shrink: 0;
  pointer-events: none;
}

.doc-task-label span {
  flex: 1;
  min-width: 0;
}

.doc-content table {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-collapse: collapse;
}

.doc-content th,
.doc-content td {
  border: 1px solid var(--brand-border, #e2e8f0);
  padding: 0.45rem 0.65rem;
}

.doc-content th {
  background: #f8fafc;
  font-weight: 600;
}

.doc-placeholders .doc-placeholder-table code {
  font-size: 0.85em;
  white-space: nowrap;
}

details.app-panel > summary {
  cursor: pointer;
  list-style: none;
}

details.app-panel > summary::-webkit-details-marker {
  display: none;
}

.app-tabs .nav-link {
  font-size: 0.9rem;
}

.doc-content code {
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.doc-content pre {
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.doc-content pre code {
  background: none;
  padding: 0;
}

.doc-mermaid-wrap {
  margin: 1.25rem 0;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  overflow-x: auto;
}

.doc-content pre.mermaid,
.doc-mermaid-wrap pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  white-space: pre-wrap;
}

.doc-mermaid-wrap svg {
  max-width: 100%;
  height: auto;
}

.doc-figure {
  margin: 1.25rem 0;
}

.doc-figure img.doc-image,
.doc-video-native {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  border: 1px solid var(--brand-border, #e2e8f0);
}

.doc-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

.doc-video-wrap {
  margin: 1.25rem 0;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid var(--brand-border, #e2e8f0);
  background: #000;
}

.doc-video-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.help-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-primary, #1a4169);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(26, 65, 105, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.help-fab:hover {
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(26, 65, 105, 0.45);
}

.manual-editor {
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 28rem;
}

.min-h-preview {
  min-height: 20rem;
}

.doc-editor-sidebar {
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.doc-syntax-hint {
  background: #f8fafc;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.375rem;
  padding: 0.75rem;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-x: auto;
}

.manual-media-list .table {
  font-size: 0.85rem;
}

/* ?? Gest?o de risco ?? */
.risco-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

@media (max-width: 991.98px) {
  .risco-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.risco-dashboard-panel {
  padding: 1.15rem 1.25rem;
  min-width: 0;
}

.risco-dashboard-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.risco-dashboard-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.risco-dashboard-table {
  width: 100%;
  margin-bottom: 0;
}

.risco-table-versoes col.risco-col-num { width: 2.25rem; }
.risco-table-versoes col.risco-col-estado { width: 6.5rem; }
.risco-table-versoes col.risco-col-data-pub { width: 6.5rem; }
.risco-table-versoes col.risco-col-acoes { width: 5.5rem; }

.risco-table-versoes .risco-ver-nome {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.risco-table-recentes {
  table-layout: fixed;
}

.risco-table-recentes col.risco-col-data { width: 5.5rem; }
.risco-table-recentes col.risco-col-score { width: 3.25rem; }
.risco-table-recentes col.risco-col-classe { width: 3rem; }
.risco-table-recentes col.risco-col-origem { width: 4.5rem; }

.risco-recente-data {
  line-height: 1.25;
  vertical-align: middle;
}

.risco-recente-cliente {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risco-recente-cliente a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risco-recente-score {
  text-align: end;
  white-space: nowrap;
}

.risco-badge-compact {
  min-width: 1.75rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.risco-recente-trigger {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
}

.risco-ver-acoes {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.risco-kpi-card {
  position: relative;
  padding-left: 3.25rem !important;
}

.risco-kpi-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(var(--brand-primary-rgb, 37, 99, 235), 0.1);
  color: var(--brand-primary, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Provis?es ? cards meta (config / snapshot / ac??o) */
.provisao-meta-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.provisao-meta-card {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}

.provisao-meta-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
}

.provisao-meta-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.provisao-meta-icon-config {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.provisao-meta-icon-snapshot {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.provisao-meta-icon-generate {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.provisao-meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-muted, #64748b);
  line-height: 1.2;
}

.provisao-meta-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary, #1a4169);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.provisao-meta-sub {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.fecho-inicio-panel {
  padding: 0;
}

.fecho-inicio-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.fecho-inicio-summary::-webkit-details-marker {
  display: none;
}

.fecho-inicio-summary-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-primary, #1a4169);
}

.fecho-inicio-chevron {
  margin-left: auto;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.fecho-inicio-panel[open] .fecho-inicio-chevron {
  transform: rotate(180deg);
}

.fecho-inicio-body {
  padding: 0 1.15rem 1rem;
  border-top: 1px solid var(--brand-border, #e2e8f0);
}

.fechos-meta-row .fechos-meta-card {
  min-height: 0;
}

.fechos-meta-card-action .fechos-card-accoes {
  margin-top: auto;
  padding-top: 0.5rem;
}

.fechos-meta-card:not(.fechos-meta-card-action) .provisao-meta-sub {
  margin-top: auto;
}

.fechos-ref-form {
  margin-top: 0;
}

.fechos-meta-card .provisao-meta-head,
.fechos-meta-card .provisao-meta-value,
.fechos-meta-card .provisao-meta-sub {
  flex: 0 0 auto;
}

.provisao-meta-card-action {
  justify-content: flex-start;
}

.provisao-snapshot-form {
  margin-top: 0.15rem;
}

.provisao-snapshot-fields {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.provisao-snapshot-field {
  flex: 1 1 auto;
  min-width: 0;
}

.provisao-snapshot-action {
  flex: 0 0 auto;
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  padding-bottom: 0.1rem;
}

@media (max-width: 575.98px) {
  .provisao-snapshot-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .provisao-snapshot-action {
    flex: 1 1 auto;
  }
}

.risco-score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
}

.risco-score-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.risco-score-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.risco-score-hero.score-baixo { background: #dcfce7; color: #15803d; }
.risco-score-hero.score-medio { background: #fef9c3; color: #a16207; }
.risco-score-hero.score-alto { background: #fee2e2; color: #b91c1c; }

.risco-bar-track {
  height: 0.45rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.risco-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-primary, #2563eb), #60a5fa);
  transition: width 0.3s ease;
}

.risco-bar-fill.score-baixo { background: linear-gradient(90deg, #16a34a, #86efac); }
.risco-bar-fill.score-medio { background: linear-gradient(90deg, #ca8a04, #fde047); }
.risco-bar-fill.score-alto { background: linear-gradient(90deg, #dc2626, #fca5a5); }

.risco-dim-bloco {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.625rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fafbfc;
}

.risco-dim-bloco.risco-dim-manual {
  background: #fffbeb;
  border-color: #fde68a;
}

.risco-dim-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--brand-border, #e2e8f0);
}

.risco-dim-titulo {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  color: var(--brand-text, #1e293b);
}

.risco-dim-peso {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.risco-indicadores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.risco-indicador-card {
  background: #fff;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
}

.risco-indicador-sistema {
  background: #f8fafc;
}

.risco-indicador-manual {
  border-color: #fde68a;
}

.risco-indicador-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.risco-indicador-nome {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
  line-height: 1.3;
}

.risco-indicador-valor {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-text, #1e293b);
  margin-bottom: 0.25rem;
}

.risco-badge-sistema {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 0;
  font-size: 0.65rem;
  font-weight: 600;
}

.risco-badge-manual {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 0;
  font-size: 0.65rem;
  font-weight: 600;
}

.risco-empty-state {
  border: 1px dashed var(--brand-border, #cbd5e1);
  border-radius: 0.5rem;
  background: #f8fafc;
}

.risco-cliente-panel {
  border-left: 4px solid var(--brand-primary, #2563eb);
}

.risco-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.risco-panel-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.risco-panel-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--brand-primary, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.risco-panel-head-text {
  min-width: 0;
}

.risco-panel-head-text h2 {
  color: var(--brand-text, #1e293b);
}

.risco-panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.risco-sim-row {
  align-items: stretch;
}

.risco-sim-panel {
  padding: 1.25rem;
  height: 100%;
}

.risco-cliente-sel-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #f8fafc;
}

.risco-indicador-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.risco-peso-input {
  min-width: 7rem;
  width: 7rem;
  max-width: 100%;
}

.risco-breakdown-table th,
.risco-breakdown-table td {
  padding: 0.65rem 1rem !important;
}

.risco-breakdown-dim {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.risco-breakdown-dim:last-child {
  border-bottom: 0;
}

.risco-cliente-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: stretch;
}

.risco-cliente-dims {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: min(100%, 280px);
}

.risco-cliente-dim .risco-bar-track {
  margin-top: 0.15rem;
}

.risco-resultado-panel {
  padding: 1.25rem;
}

.risco-resultado-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brand-border, #e2e8f0);
}

.risco-result-dims {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.risco-result-ind-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.risco-result-ind {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  font-size: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.risco-result-ind:last-child {
  border-bottom: 0;
}

.risco-decisoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.risco-decisao-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--brand-border, #e2e8f0);
}

.risco-decisao-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.risco-decisao-block {
  background: #fef2f2;
  border-color: #fecaca;
}

.risco-breakdown-table {
  font-size: 0.78rem;
}

.risco-breakdown-table th {
  font-weight: 600;
  color: #64748b;
  border-bottom-width: 1px;
}

.risco-config-dim-titulo {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--brand-text, #1e293b);
}

.risco-classe-badge {
  min-width: 1.75rem;
  text-align: center;
}

/* Monitoria ? checklist de visita */
.monitoria-checklist-wrap {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.625rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
}

.monitoria-checklist-heading {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--brand-text, #1e293b);
}

.monitoria-check-bloco + .monitoria-check-bloco {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--brand-border, #e2e8f0);
}

.monitoria-check-titulo {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-primary, #2563eb);
  margin: 0 0 0.75rem;
}

.monitoria-check-item + .monitoria-check-item {
  margin-top: 0.85rem;
}

.monitoria-check-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
  margin-bottom: 0.45rem;
}

.monitoria-yesno-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.monitoria-yesno-opt {
  display: block;
  margin: 0;
  cursor: pointer;
  flex: 1 1 calc(50% - 0.35rem);
  min-width: 7.5rem;
}

.monitoria-yesno-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.monitoria-yesno-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--brand-border, #e2e8f0);
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.monitoria-yesno-opt--sim input:checked + span {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
}

.monitoria-yesno-opt--nao input:checked + span {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
}

.monitoria-yesno-opt:hover span {
  border-color: #94a3b8;
}

.monitoria-escala-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.monitoria-escala-opt {
  display: block;
  margin: 0;
  cursor: pointer;
}

.monitoria-escala-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.monitoria-escala-opt span {
  display: block;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--brand-border, #e2e8f0);
  border-radius: 0.625rem;
  font-size: 0.84rem;
  font-weight: 600;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.monitoria-escala-opt--baixo input:checked + span {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
}

.monitoria-escala-opt--medio input:checked + span {
  border-color: #ca8a04;
  background: #fefce8;
  color: #a16207;
}

.monitoria-escala-opt--alto input:checked + span {
  border-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
}

.monitoria-escala-opt:hover span {
  border-color: #94a3b8;
}

.monitoria-check-item--conflict {
  padding: 0.65rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.monitoria-check-row-conflict td {
  background: #fff5f5;
}

.monitoria-check-table-wrap {
  width: 100%;
}

.monitoria-check-table {
  width: 100%;
  table-layout: fixed;
}

.monitoria-check-table td:first-child {
  width: 58%;
  word-wrap: break-word;
}

.risco-cliente-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
}

@media (max-width: 767.98px) {
  .risco-kpi-card {
    padding-left: 1rem !important;
    padding-top: 2.75rem !important;
  }

  .risco-kpi-icon {
    top: 1rem;
    transform: none;
  }

  .risco-cliente-score-row {
    flex-direction: column;
  }
}

/* Acompanhamento / monitoria */
.acompanhamento-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.acompanhamento-subnav-pills .nav-link {
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--bs-body-color);
}

.acompanhamento-subnav-pills .nav-link.active {
  background: var(--brand-primary, #1a4169);
}

.acompanhamento-subnav-contrato {
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border-radius: 999px;
}

.acompanhamento-panel {
  overflow: hidden;
}

.acompanhamento-toolbar {
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  padding: 0.65rem 1rem;
}

.acompanhamento-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.acompanhamento-toolbar-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.acompanhamento-toolbar-count {
  font-size: 0.875rem;
  color: #64748b;
}

.acompanhamento-chk {
  width: 2.5rem;
  vertical-align: middle;
}

.provisao-memoria-steps {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.provisao-memoria-steps li {
  margin-bottom: 0.85rem;
}

.provisao-memoria-steps li:last-child {
  margin-bottom: 0;
}

.acompanhamento-stat-card .acompanhamento-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-primary, #1a4169);
}

.contrato-nav-tabs {
  border-bottom: 1px solid #dee2e6;
  gap: 0.25rem;
}

.contrato-nav-tabs .nav-link {
  white-space: nowrap;
  font-size: 0.875rem;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
}

.contrato-nav-tabs .nav-link.active {
  color: var(--brand-primary, #1a4169);
  font-weight: 600;
  border-bottom-color: var(--brand-primary, #1a4169);
  background: transparent;
}

.juridico-timeline {
  position: relative;
  padding-left: 0.25rem;
}

.juridico-timeline-wrap {
  max-height: 28rem;
  overflow-y: auto;
}

.juridico-timeline-item {
  position: relative;
  padding: 0 0 1.1rem 1rem;
  border-left: 2px solid var(--brand-border, #e2e8f0);
}

.juridico-timeline-item:last-child {
  padding-bottom: 0;
}

.juridico-timeline-date {
  font-size: 0.75rem;
  color: var(--brand-muted, #64748b);
  margin-bottom: 0.15rem;
}

.juridico-timeline-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brand-primary-dark, #0f2844);
}

.juridico-timeline-desc {
  color: var(--brand-muted, #64748b);
  margin-top: 0.2rem;
}

.juridico-meta .detail-value {
  font-size: 0.92rem;
}

.juridico-fluxo-panel,
.juridico-guide-panel {
  border: 1px solid rgba(26, 65, 105, 0.12);
  background: linear-gradient(135deg, rgba(26, 65, 105, 0.03) 0%, #fff 60%);
  box-shadow: none;
}

.juridico-guide-panel .app-panel-body {
  padding: 1rem 1.15rem;
}

.juridico-resumo {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Modal emitir documento jur?dico */
.juridico-gerar-doc-modal .modal-body {
  overflow-y: auto;
}

.juridico-gerar-doc-context {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, rgba(26, 65, 105, 0.06) 0%, rgba(26, 65, 105, 0.02) 100%);
  border-bottom: 1px solid rgba(26, 65, 105, 0.12);
}

.juridico-doc-context-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.55rem;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.juridico-doc-context-info {
  flex: 1;
  min-width: 0;
}

.juridico-doc-context-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
  margin-bottom: 0.35rem;
}

.juridico-doc-context-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.juridico-doc-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.juridico-doc-badge--ok {
  background: #d1fae5;
  color: #065f46;
}

.juridico-doc-badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.juridico-doc-badge--muted {
  background: #f1f5f9;
  color: #475569;
}

.juridico-doc-badge--dark {
  background: #e2e8f0;
  color: #1e293b;
}

.juridico-doc-badge--info {
  background: #dbeafe;
  color: #1e40af;
}

.juridico-doc-context-saldo {
  text-align: right;
  flex-shrink: 0;
}

.juridico-doc-context-saldo-label {
  font-size: 0.68rem;
  color: var(--brand-muted, #64748b);
}

.juridico-doc-context-saldo-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-text, #1e293b);
}

.juridico-doc-context-saldo--zero {
  color: #059669;
}

.juridico-gerar-doc-body {
  padding: 1rem 1.25rem 1.15rem;
}

.juridico-doc-section {
  margin-bottom: 1rem;
}

.juridico-doc-section-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.65rem;
}

.juridico-doc-count {
  background: var(--brand-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.62rem;
  padding: 0.05rem 0.45rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.juridico-doc-cards .col-sm-6,
.juridico-doc-cards .col-xl-4 {
  display: flex;
}

.juridico-doc-card {
  width: 100%;
  border: 1.5px solid var(--brand-border, #e2e8f0);
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

button.juridico-doc-card {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}

button.juridico-doc-card:hover {
  border-color: rgba(26, 65, 105, 0.35);
  background: rgba(26, 65, 105, 0.02);
}

button.juridico-doc-card.is-selected {
  border-color: var(--brand-primary);
  background: rgba(26, 65, 105, 0.05);
  box-shadow: 0 0 0 1px rgba(26, 65, 105, 0.08);
}

.juridico-doc-card--blocked {
  cursor: default;
  background: #fafafa;
  border-style: dashed;
  border-color: #e2e8f0;
  opacity: 0.92;
}

.juridico-doc-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.juridico-doc-icon--contrato { background: #eef2ff; color: #3730a3; }
.juridico-doc-icon--reestruturacao { background: #f5f3ff; color: #6d28d9; }
.juridico-doc-icon--cobranca { background: #fff7ed; color: #c2410c; }
.juridico-doc-icon--judicial { background: #fef2f2; color: #b91c1c; }
.juridico-doc-icon--garantia { background: #ecfdf5; color: #047857; }
.juridico-doc-icon--encerramento { background: #f0fdf4; color: #15803d; }
.juridico-doc-icon--declaracao { background: #eff6ff; color: #1d4ed8; }
.juridico-doc-icon--outro { background: #f8fafc; color: #475569; }

.juridico-doc-card-body {
  flex: 1;
  min-width: 0;
}

.juridico-doc-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
  line-height: 1.3;
}

.juridico-doc-card-desc {
  font-size: 0.72rem;
  color: var(--brand-muted, #64748b);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.juridico-doc-card-reason {
  font-size: 0.7rem;
  color: #b45309;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.juridico-doc-card-check {
  color: var(--brand-primary);
  font-size: 1rem;
  opacity: 0;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

button.juridico-doc-card.is-selected .juridico-doc-card-check {
  opacity: 1;
}

.juridico-doc-card-tag {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.juridico-doc-guide {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.03) 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 0.65rem;
  padding: 0.85rem 0.95rem;
  margin-bottom: 1rem;
}

.juridico-doc-guide-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 0.35rem;
}

.juridico-doc-guide-desc {
  font-size: 0.78rem;
  color: #0c4a6e;
  line-height: 1.45;
}

.juridico-doc-guide-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.juridico-doc-guide-step {
  background: #fff;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: #0369a1;
}

.juridico-doc-guide-arrow {
  color: rgba(14, 165, 233, 0.55);
  font-size: 0.75rem;
}

.juridico-doc-guide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.juridico-doc-guide-badge {
  font-size: 0.66rem;
  background: #e0f2fe;
  color: #075985;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-weight: 500;
}

.juridico-doc-guide-badge--ok {
  background: #d1fae5;
  color: #065f46;
}

.juridico-doc-blocked {
  margin-top: 0.25rem;
}

.juridico-doc-blocked summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-muted, #64748b);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  user-select: none;
}

.juridico-doc-blocked summary::-webkit-details-marker {
  display: none;
}

.juridico-doc-blocked[open] summary {
  margin-bottom: 0.15rem;
}

.juridico-gerar-doc-footer {
  background: #fafbfc;
}

.juridico-registo-inline {
  padding-top: 1rem;
  padding-bottom: 1.15rem;
}

.juridico-registo-inline .form-label {
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .juridico-gerar-doc-context {
    flex-wrap: wrap;
  }

  .juridico-doc-context-saldo {
    width: 100%;
    text-align: left;
    padding-top: 0.35rem;
    border-top: 1px dashed rgba(26, 65, 105, 0.12);
  }
}

.fecho-sim-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.fecho-sim-overlay[hidden] {
  display: none !important;
}

.fecho-sim-card {
  width: min(100%, 22rem);
  padding: 1.5rem 1.25rem;
  text-align: center;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.fecho-sim-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  border: 3px solid rgba(245, 158, 11, 0.25);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: fecho-sim-spin 0.75s linear infinite;
}

@keyframes fecho-sim-spin {
  to { transform: rotate(360deg); }
}

body.fecho-sim-busy .app-content {
  pointer-events: none;
  user-select: none;
}

body.fecho-sim-busy .fecho-sim-overlay {
  pointer-events: auto;
}

.fecho-sequencia-panel {
  border: 1px solid rgba(37, 99, 235, 0.15);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, #fff 55%);
}

.fecho-sequencia-body {
  padding: 0 1.25rem 1.25rem;
}

.fecho-sequencia-list {
  padding-left: 1.15rem;
  margin-bottom: 0;
}

.fecho-sequencia-list li + li {
  margin-top: 0.35rem;
}

.fecho-sequencia-badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fecho-sequencia-form .form-control {
  min-width: 0;
}

.fecho-sim-progress {
  height: 8px;
  background: rgba(37, 99, 235, 0.12);
}

.fecho-sim-progress .progress-bar {
  background-color: var(--brand-primary, #2563eb);
}

.fecho-sim-spinner {
  border-color: rgba(37, 99, 235, 0.2);
  border-top-color: var(--brand-primary, #2563eb);
}

.delegacao-banner {
  border-left: 4px solid var(--brand-primary, #2563eb);
}

.deleg-permissoes-scroll {
  max-height: 12rem;
  overflow-y: auto;
}

.funcoes-check-grid {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}

.funcao-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  margin: 0;
  border-radius: 0.35rem;
  cursor: pointer;
}

.funcao-check-row:hover {
  background: rgba(37, 99, 235, 0.05);
}

.funcao-check-body {
  flex: 1;
  min-width: 0;
}

label.perm-readonly {
  opacity: 0.85;
  cursor: not-allowed;
}

label.perm-readonly input {
  cursor: not-allowed;
}

.deleg-perm-base-resumo {
  padding: 0.5rem 0.65rem;
  background: rgba(37, 99, 235, 0.04);
  border-radius: 0.35rem;
  border: 1px solid rgba(37, 99, 235, 0.12);
}

label.perm-from-funcao:not(.text-muted) {
  background: rgba(37, 99, 235, 0.03);
}

/* Modal configurar tipo documental jur?dico */
.juridico-tipo-config-modal .modal-body {
  max-height: min(72vh, 680px);
  overflow-y: auto;
}

.juridico-tipo-config-codigo {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--brand-accent, #c026d3);
  background: rgba(192, 38, 211, 0.06);
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
}

.juridico-tipo-panel {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  background: #fafbfc;
}

.juridico-tipo-panel-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-text, #1e293b);
  margin-bottom: 0.35rem;
}

.juridico-tipo-panel-lead {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.juridico-tipo-field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.juridico-tipo-cond-grid {
  display: grid;
  gap: 0.35rem;
}

.juridico-tipo-cond-grid .form-check-label {
  font-size: 0.78rem;
}

.juridico-tipo-manual-check {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
}

.juridico-tag-input {
  position: relative;
}

.juridico-tag-input-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--brand-border, #cbd5e1);
  border-radius: 0.5rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.juridico-tag-input-box:focus-within {
  border-color: var(--brand-primary, #1a4169);
  box-shadow: 0 0 0 0.15rem rgba(26, 65, 105, 0.12);
}

.juridico-tag-input-tags {
  display: contents;
}

.juridico-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem 0.15rem 0.35rem;
  border-radius: 999px;
  background: rgba(26, 65, 105, 0.08);
  color: var(--brand-primary, #1a4169);
  font-size: 0.72rem;
  font-weight: 500;
}

.juridico-tag-chip-remove {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  cursor: pointer;
}

.juridico-tag-chip-remove:hover {
  opacity: 1;
}

.juridico-tag-input-field {
  flex: 1;
  min-width: 8rem;
  border: none;
  outline: none;
  font-size: 0.82rem;
  padding: 0.15rem 0.25rem;
  background: transparent;
}

.juridico-tag-input-suggestions {
  position: absolute;
  z-index: 1060;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  max-height: 11rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.juridico-tag-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.8rem;
  cursor: pointer;
}

.juridico-tag-suggestion-item:hover {
  background: rgba(26, 65, 105, 0.05);
}

.juridico-tag-suggestion-item code {
  background: #f1f5f9;
  color: #475569;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.juridico-tipo-impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

.juridico-tipo-impact-card {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.juridico-tipo-impact-card:hover {
  background: #f8fafc;
}

.juridico-tipo-impact-card.is-active {
  border-color: rgba(26, 65, 105, 0.35);
  background: rgba(26, 65, 105, 0.04);
}

.juridico-tipo-impact-card input {
  margin: 0;
  flex-shrink: 0;
}

.juridico-tipo-resumo {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
}

.juridico-tipo-resumo > .bi {
  color: #2563eb;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* ----- Migra??o de carteira ----- */
.mig-hero-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--brand-primary, #1d4ed8);
  background: rgba(37, 99, 235, 0.1);
  flex-shrink: 0;
}

.mig-step-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-primary, #1d4ed8);
  flex-shrink: 0;
}

.mig-flow {
  position: relative;
}

.mig-flow li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  color: #475569;
}

.mig-flow-dot {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary, #1d4ed8);
  background: rgba(37, 99, 235, 0.12);
  flex-shrink: 0;
}

.mig-import-card {
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.mig-zip-name {
  font-weight: 600;
  word-break: break-all;
}

.mig-stat {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--brand-border, #e2e8f0);
  border-radius: 0.7rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  min-width: 0;
}

.mig-stat .mig-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0f2844;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mig-stat .mig-stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

/* Analise financeira (recolha) */
.fin-analise-layout {
  max-width: 920px;
}

.fin-analise-perfil {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.fin-analise-perfil .alert {
  margin-top: 1rem;
}

.fin-analise-form {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.fin-analise-form-head {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.fin-analise-form-hint {
  color: #64748b;
}

.fin-secoes {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.fin-secao {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem 1.15rem;
}

.fin-secao-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-primary, #1e3a5f);
  margin: 0 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(30, 58, 95, 0.15);
}

.fin-campo .form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.fin-campo .form-control,
.fin-campo .form-select {
  border-radius: 0.5rem;
  border-color: #cbd5e1;
}

.fin-campo .form-control:focus,
.fin-campo .form-select:focus {
  border-color: var(--brand-primary, #1e3a5f);
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.12);
}

.fin-campo-money .input-group-text {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  font-size: 0.8rem;
  border-color: #cbd5e1;
}

.fin-analise-empty {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: 0.75rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.fin-analise-empty .bi {
  font-size: 1.25rem;
  margin-top: 0.1rem;
}

.fin-analise-pendente {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

/* Resumo da analise financeira no detalhe do pedido */
.fin-analise-resumo {
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.fin-analise-meta-item {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  height: 100%;
}

.fin-analise-meta-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.fin-analise-meta-val {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.fin-analise-bloco {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem 1.15rem;
  height: 100%;
}

.fin-analise-bloco--indicadores {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.fin-analise-bloco-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand-primary, #1e3a5f);
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(30, 58, 95, 0.12);
}

.fin-analise-secao-resumo {
  margin-bottom: 0.85rem;
}

.fin-analise-secao-resumo:last-child {
  margin-bottom: 0;
}

.fin-analise-secao-resumo-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 0.45rem;
}

.fin-analise-dl {
  margin: 0;
}

.fin-analise-dl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.fin-analise-dl-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fin-analise-dl-row dt {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.fin-analise-dl-row dd {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.fin-analise-kpis {
  margin-bottom: 0.85rem;
}

.fin-analise-kpi {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
  height: 100%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.fin-analise-kpi-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.fin-analise-kpi-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-primary, #1e3a5f);
  line-height: 1.2;
}
