/* 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;
  min-height: 100%;
}

@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-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-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;
}

.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); }

.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;
}

.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 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;
}

.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: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--brand-border, #e2e8f0);
}

/* 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);
}

.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;
  gap: 0.5rem 0.75rem;
}

.pedido-condicao-campo--full {
  grid-column: 1 / -1;
}

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

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

.desembolso-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
}

.desembolso-form-label {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.15rem;
}

.desembolso-data-input {
  width: 10.5rem;
  min-width: 9.5rem;
}

.desembolso-btn {
  white-space: nowrap;
}

.desembolso-alert {
  border-left: 4px solid #f59e0b;
}

.desembolso-alert-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.desembolso-alert-text {
  flex: 1 1 16rem;
}

.desembolso-alert-action {
  flex: 0 1 auto;
}

.desembolso-action-cell {
  min-width: 15rem;
}

.desembolso-form-compact {
  justify-content: flex-end;
}

.desembolso-form-compact .desembolso-form-label {
  width: auto;
  margin-bottom: 0;
  align-self: center;
}

.desembolso-form-compact .desembolso-data-input {
  width: 9.5rem;
}

.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-bg {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.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"] {
    justify-content: flex-end;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--brand-border, #e2e8f0);
  }

  .table-stack tbody td[data-label="Ações"]::before {
    display: none;
  }

  .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;
}

@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 .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;
}

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

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

.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;
}

.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);
}

.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-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-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 — sliders */
.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-range {
  --bs-form-range-thumb-bg: var(--brand-primary, #1a4169);
}

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

.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;
}

/* 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 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-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-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;
}
