:root {
  --mn-primary: #07513a;
  --mn-primary-dark: #043524;
  --mn-primary-soft: #e8f1ec;
  --mn-navy: #071f35;
  --mn-navy-soft: #e9eef2;
  --mn-gold: #b68a3e;
  --mn-gold-dark: #8c6728;
  --mn-gold-soft: #f7f0e2;
  --mn-ink: #172824;
  --mn-muted: #687871;
  --mn-border: #dfe5df;
  --mn-border-gold: #dfcfad;
  --mn-bg: #f4f6f2;
  --mn-ivory: #fbfaf5;
  --mn-white: #fff;
  --mn-shadow-sm: 0 5px 18px rgba(14, 42, 32, .055);
  --mn-shadow: 0 16px 45px rgba(14, 42, 32, .08);
  --mn-shadow-lg: 0 28px 70px rgba(7, 31, 53, .14);
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--mn-bg);
  color: var(--mn-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: .18em; }

/* Cabeçalho e identidade */
.app-navbar {
  min-height: 74px;
  padding-block: .55rem;
  background:
    linear-gradient(90deg, rgba(182, 138, 62, .14), transparent 24%),
    linear-gradient(110deg, #042f22, var(--mn-primary) 62%, #063f31);
  border-bottom: 1px solid rgba(224, 200, 148, .28);
  box-shadow: 0 8px 28px rgba(4, 43, 31, .14);
}
.navbar-brand { color: #fff; letter-spacing: -.02em; }
.navbar-brand:hover { color: #fff; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(224, 200, 148, .72);
  border-radius: 14px;
  background: var(--mn-ivory);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .13);
}
.brand-mark img { width: 46px; height: 46px; object-fit: cover; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.08; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; letter-spacing: .015em; }
.brand-copy small { margin-top: .25rem; color: #d9c28e; font-size: .62rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.app-navbar .nav-link {
  position: relative;
  margin-inline: .08rem;
  padding: .7rem .75rem !important;
  border-radius: .65rem;
  color: rgba(255, 255, 255, .74);
  font-size: .89rem;
  font-weight: 600;
  transition: color .18s, background-color .18s;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .09); }
.app-navbar .nav-link.active::after {
  position: absolute;
  right: .75rem;
  bottom: .34rem;
  left: .75rem;
  height: 2px;
  border-radius: 99px;
  background: var(--mn-gold);
  content: "";
}
.btn-brand-light { border-color: #e3c77e; color: var(--mn-primary-dark); background: #fffdf7; font-weight: 700; }
.btn-brand-light:hover { border-color: var(--mn-gold); color: #fff; background: var(--mn-gold-dark); }
.account-menu { position: relative; color: var(--mn-ink); }
.account-menu > summary { list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(224, 200, 148, .7);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .13);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.account-menu[open] > .account-avatar { background: rgba(255, 255, 255, .24); }
.account-popover {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 12px);
  right: 0;
  width: min(340px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--mn-border);
  border-radius: 14px;
  color: var(--mn-ink);
  background: #fff;
  box-shadow: 0 24px 65px rgba(5, 35, 26, .24);
}
.account-heading { display: flex; align-items: center; gap: 14px; padding: 20px; border-bottom: 1px solid var(--mn-border); }
.account-heading .account-avatar-large { flex: 0 0 auto; width: 58px; height: 58px; color: #fff; background: var(--mn-primary); font-size: 1rem; }
.account-heading div { display: flex; min-width: 0; flex-direction: column; }
.account-heading strong { overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; text-overflow: ellipsis; white-space: nowrap; }
.account-heading span:not(.account-avatar) { overflow: hidden; margin-top: 4px; color: var(--mn-muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-details { margin: 0; padding: 7px 20px; }
.account-details div { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1ee; }
.account-details div:last-child { border-bottom: 0; }
.account-details dt { color: var(--mn-muted); font-size: .72rem; font-weight: 700; }
.account-details dd { margin: 0; overflow-wrap: anywhere; font-size: .8rem; font-weight: 650; }
.account-logout { padding: 12px 20px 17px; border-top: 1px solid var(--mn-border); }
.account-logout button { width: 100%; padding: 9px 12px; border: 1px solid #cbd8d0; border-radius: 8px; color: var(--mn-primary); background: #fff; font-weight: 750; }
.account-logout button:hover { color: #fff; background: var(--mn-primary); }

/* Estrutura principal e menu lateral */
.app-shell > .row { min-height: calc(100vh - 74px); }
.app-sidebar { background: #fff; border-right: 1px solid var(--mn-border); }
.sidebar { position: sticky; top: 74px; }
.sidebar-identity {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.6rem;
  padding: .7rem;
  border: 1px solid var(--mn-border-gold);
  border-radius: .9rem;
  color: var(--mn-ink);
  background: linear-gradient(145deg, #fff, var(--mn-ivory));
  text-decoration: none;
  box-shadow: var(--mn-shadow-sm);
}
.sidebar-identity:hover { color: var(--mn-primary); border-color: #cdb57c; }
.sidebar-identity img { width: 44px; height: 44px; object-fit: cover; border-radius: .55rem; }
.sidebar-identity span { display: flex; min-width: 0; flex-direction: column; }
.sidebar-identity strong { font-family: Georgia, "Times New Roman", serif; font-size: .92rem; }
.sidebar-identity small { margin-top: .16rem; color: var(--mn-gold-dark); font-size: .58rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.sidebar-label { margin: 0 0 .6rem .75rem; color: #8a968f; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidebar .nav-link {
  position: relative;
  margin-bottom: .18rem;
  padding: .68rem .8rem .68rem 1rem;
  border-radius: .7rem;
  color: #485d55;
  font-size: .89rem;
  font-weight: 550;
  transition: background-color .18s, color .18s, transform .18s;
}
.sidebar .nav-link:hover { color: var(--mn-primary); background: #edf4ef; transform: translateX(2px); }
.sidebar .nav-link.active { color: var(--mn-primary-dark); background: var(--mn-primary-soft); font-weight: 700; }
.sidebar .nav-link.active::before { position: absolute; top: .6rem; bottom: .6rem; left: .36rem; width: 3px; border-radius: 99px; background: var(--mn-gold); content: ""; }
.app-content { max-width: 1600px; }

/* Tipografia e componentes compartilhados */
.eyebrow { color: var(--mn-gold-dark); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-title { margin: 0 0 .35rem; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.75rem, 2.4vw, 2.3rem); font-weight: 700; letter-spacing: -.025em; }
.page-description { color: var(--mn-muted); }
.demo-badge { padding: .48rem .75rem; border: 1px solid #cbded1; border-radius: 999px; color: var(--mn-primary); background: var(--mn-primary-soft); font-size: .73rem; font-weight: 750; }

.metric-card, .panel, .feature-card, .placeholder-card, .card {
  border-color: var(--mn-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--mn-shadow-sm);
}
.metric-card { position: relative; overflow: hidden; padding: 1.25rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.metric-card::after { position: absolute; right: 0; bottom: 0; width: 44px; height: 3px; background: var(--mn-gold); content: ""; opacity: .68; }
.metric-card:hover { transform: translateY(-2px); border-color: #d4ddd5; box-shadow: var(--mn-shadow); }
.metric-label { margin: 0; color: var(--mn-muted); font-size: .75rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.metric-value { margin: .8rem 0 .35rem; color: var(--mn-navy); font-size: clamp(1.4rem, 2vw, 1.8rem); font-weight: 750; letter-spacing: -.035em; }
.metric-trend { color: var(--mn-muted); font-size: .78rem; }
.metric-icon { display: grid; min-width: 2.35rem; height: 2.35rem; padding: 0 .45rem; place-items: center; border-radius: .72rem; color: var(--mn-primary); background: var(--mn-primary-soft); font-size: .7rem; font-weight: 800; }
.metric-icon-success { color: #237358; background: #e8f6f0; }
.metric-icon-danger { color: #a7443d; background: #fff0ef; }
.metric-icon-info { color: #395f83; background: var(--mn-navy-soft); }
.metric-icon-warning { color: var(--mn-gold-dark); background: var(--mn-gold-soft); }
.metric-icon-secondary { color: #626879; background: #f0f1f2; }
.metric-icon-dark { color: var(--mn-navy); background: #e9edef; }

.panel { padding: 1.4rem; }
.panel-header h2 { margin: 0 0 .25rem; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; font-weight: 700; }
.panel-header p { margin: 0; color: var(--mn-muted); font-size: .82rem; }
.chart-container { position: relative; height: 290px; margin-top: 1.25rem; }
.chart-container-wide { height: 320px; }

.btn { border-radius: .66rem; font-weight: 650; }
.btn-primary {
  --bs-btn-bg: var(--mn-primary);
  --bs-btn-border-color: var(--mn-primary);
  --bs-btn-hover-bg: var(--mn-primary-dark);
  --bs-btn-hover-border-color: var(--mn-primary-dark);
  --bs-btn-active-bg: var(--mn-primary-dark);
  --bs-btn-active-border-color: var(--mn-primary-dark);
  --bs-btn-focus-shadow-rgb: 7, 81, 58;
  box-shadow: 0 5px 14px rgba(7, 81, 58, .14);
}
.btn-outline-primary { --bs-btn-color: var(--mn-primary); --bs-btn-border-color: var(--mn-primary); --bs-btn-hover-bg: var(--mn-primary); --bs-btn-hover-border-color: var(--mn-primary); }
.placeholder-icon { display: inline-grid; width: 2.75rem; height: 2.75rem; place-items: center; border-radius: .8rem; color: var(--mn-primary); background: var(--mn-primary-soft); font-weight: 800; }
.placeholder-note { border-left: 4px solid var(--mn-gold); }
.form-label { color: #3e544b; font-size: .82rem; font-weight: 700; }
.form-control, .form-select { min-height: 42px; border-color: #d8e0da; border-radius: .7rem; color: var(--mn-ink); background-color: #fff; }
.form-control::placeholder { color: #9aa69f; }
.form-control:focus, .form-select:focus { border-color: #73a18d; box-shadow: 0 0 0 .2rem rgba(7, 81, 58, .11); }
.cliente-documento-bloqueado:disabled { border-color: #b8d8c7; color: #1d5f47; background: #e8f4ed; opacity: 1; font-weight: 700; }
.form-check-input:checked { border-color: var(--mn-primary); background-color: var(--mn-primary); }
.table-responsive { border-radius: .8rem; }
.table { --bs-table-hover-bg: #f6f8f5; }
.table thead th { padding-top: .88rem; padding-bottom: .88rem; border-bottom-color: #dfe5df; color: var(--mn-muted); background: #fafbf8; font-size: .69rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.table tbody td { padding-top: .92rem; padding-bottom: .92rem; border-color: #edf0ed; color: #334b42; vertical-align: middle; }
.badge { padding: .44em .7em; border-radius: 999px; font-weight: 700; }
.alert { border-radius: .85rem; }
.pagination { --bs-pagination-color: var(--mn-primary); --bs-pagination-active-bg: var(--mn-primary); --bs-pagination-active-border-color: var(--mn-primary); }
.detail-list > div { display: grid; grid-template-columns: minmax(105px, 32%) 1fr; gap: 1rem; padding: .74rem 0; border-bottom: 1px solid #edf1ee; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--mn-muted); font-size: .77rem; font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.text-pre-wrap { white-space: pre-wrap; }
.parcela-row-a-vencer > * { color: #146c43; }
.parcela-row-vencida > * { color: #b02a37; }
.parcela-row-liquidada > * { color: #0a58ca; }
.pix-column { width: 34px; min-width: 34px; }
.pix-copy-button {
  position: relative;
  display: inline-grid;
  width: 25px;
  height: 25px;
  padding: 3px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: rgba(50, 188, 173, .72);
  background: transparent;
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}
.pix-copy-button svg { width: 18px; height: 18px; fill: currentColor; }
.pix-copy-button:hover,
.pix-copy-button:focus-visible { color: #32bcad; background: rgba(50, 188, 173, .10); outline: none; }
.pix-copy-button:active { transform: scale(.92); }
.pix-copy-button.is-copied { color: #087f5b; background: rgba(8, 127, 91, .13); }
.pix-copy-button.is-copy-error { color: #b02a37; background: rgba(176, 42, 55, .10); }
.pix-copy-button:disabled,
.pix-copy-button.is-disabled {
  color: #a6ada9;
  background: transparent;
  cursor: not-allowed;
  opacity: .72;
  transform: none;
}
.parcelas-compactas article { margin-bottom: .2rem !important; }
.parcelas-compactas article header {
  min-height: 0;
  padding-top: .6rem !important;
  padding-bottom: .6rem !important;
  line-height: 1;
}
.parcelas-compactas article header .small { font-size: .78rem; line-height: 1.1; }
.contrato-cabecalho-dados { display: flex; flex-direction: column; gap: .3rem; }
.contrato-totais { color: var(--mn-ink); }
.gap-x-2 { column-gap: .9rem; }
.gap-y-1 { row-gap: .25rem; }
.parcelas-compactas .table tbody { font-size: 90%; }
.parcelas-compactas .table > :not(caption) > * > * {
  height: auto;
  padding: 7.5px 4px !important;
  line-height: 1 !important;
  vertical-align: middle;
}
.parcelas-compactas .table thead th {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  text-align: center !important;
}
.parcelas-compactas .table .badge { padding: .2em .42em; line-height: 1; }
.parcelas-compactas .table .btn-sm {
  min-height: 0;
  padding: 1px 5px !important;
  font-size: .72rem;
  line-height: 1.1;
}
.client-search-results { position: absolute; z-index: 1080; right: .75rem; left: .75rem; max-height: 22rem; overflow-y: auto; border: 1px solid var(--mn-border); border-radius: .75rem; background: #fff; box-shadow: var(--mn-shadow); }
.client-search-option { display: flex; width: 100%; flex-direction: column; gap: .15rem; padding: .75rem .9rem; border: 0; border-bottom: 1px solid #edf1ee; color: var(--mn-ink); background: #fff; text-align: left; }
.client-search-option:last-child { border-bottom: 0; }
.client-search-option:hover, .client-search-option:focus { background: var(--mn-primary-soft); outline: 0; }
.client-search-option span { color: var(--mn-muted); font-size: .78rem; }

/* Página pública */
.public-content { background: var(--mn-ivory); }
.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--mn-border-gold);
  background:
    radial-gradient(circle at 86% 18%, rgba(182, 138, 62, .14), transparent 25%),
    radial-gradient(circle at 78% 80%, rgba(7, 81, 58, .09), transparent 30%),
    linear-gradient(135deg, #fff 0%, #fbfaf4 54%, #f4f5ed 100%);
}
.home-hero::before { position: absolute; top: 0; bottom: 0; left: 4vw; width: 1px; background: linear-gradient(transparent, rgba(182, 138, 62, .32), transparent); content: ""; }
.hero-kicker { display: inline-flex; align-items: center; gap: .65rem; color: var(--mn-primary); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-kicker > span { display: inline-block; width: 28px; height: 1px; background: var(--mn-gold); }
.hero-title { max-width: 760px; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.65rem, 5vw, 4.8rem); line-height: 1.02; font-weight: 700; letter-spacing: -.045em; }
.hero-title em { color: var(--mn-primary); font-weight: inherit; }
.hero-copy { max-width: 680px; margin-top: 1.35rem; color: #5f7169; font-size: 1.08rem; line-height: 1.75; }
.hero-trust { display: inline-flex; align-items: center; gap: .45rem; color: var(--mn-muted); font-size: .8rem; font-weight: 600; }
.hero-trust::before { width: 7px; height: 7px; border-radius: 50%; background: var(--mn-gold); content: ""; box-shadow: 0 0 0 4px var(--mn-gold-soft); }
.hero-brand-card { position: relative; max-width: 420px; margin-inline: auto; padding: 2rem; border: 1px solid var(--mn-border-gold); border-radius: 1.6rem; background: rgba(255, 255, 255, .72); box-shadow: var(--mn-shadow-lg); backdrop-filter: blur(7px); }
.hero-brand-card::before, .hero-brand-card::after { position: absolute; width: 56px; height: 56px; content: ""; }
.hero-brand-card::before { top: 14px; left: 14px; border-top: 2px solid var(--mn-gold); border-left: 2px solid var(--mn-gold); border-radius: 12px 0 0; }
.hero-brand-card::after { right: 14px; bottom: 14px; border-right: 2px solid var(--mn-gold); border-bottom: 2px solid var(--mn-gold); border-radius: 0 0 12px; }
.hero-brand-card img { position: relative; z-index: 1; display: block; width: min(100%, 310px); aspect-ratio: 1; margin-inline: auto; border-radius: 1rem; object-fit: cover; mix-blend-mode: multiply; }
.hero-brand-glow { position: absolute; inset: 18% 12%; border-radius: 50%; background: rgba(197, 167, 99, .15); filter: blur(30px); }
.hero-brand-caption { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; padding-top: .7rem; text-align: center; }
.hero-brand-caption::before { width: 70px; height: 1px; margin-bottom: .75rem; background: var(--mn-gold); content: ""; }
.hero-brand-caption strong { color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; }
.hero-brand-caption span { margin-top: .26rem; color: var(--mn-primary); font-size: .67rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.section-heading { max-width: 700px; }
.section-heading h2 { margin: .7rem 0 .65rem; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3vw, 2.55rem); }
.section-heading p { color: var(--mn-muted); line-height: 1.7; }
.home-features { background: var(--mn-ivory); }
.feature-card { position: relative; overflow: hidden; padding: 1.7rem; border-top: 3px solid var(--mn-primary); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--mn-shadow); }
.feature-number { display: inline-grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; color: var(--mn-gold-dark); background: var(--mn-gold-soft); font-size: .7rem; font-weight: 800; }
.feature-card h3 { margin: 1rem 0 .65rem; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.18rem; font-weight: 700; }
.feature-card p { margin: 0; color: var(--mn-muted); font-size: .91rem; line-height: 1.7; }

/* Login */
.login-shell { min-height: calc(100vh - 74px); display: grid; place-items: center; background: radial-gradient(circle at 15% 20%, rgba(182, 138, 62, .11), transparent 26%), linear-gradient(135deg, #f8f8f3, #eef2ed); }
.login-card { max-width: 980px; overflow: hidden; border: 1px solid var(--mn-border-gold); border-radius: 1.4rem; background: #fff; box-shadow: var(--mn-shadow-lg); }
.login-brand-panel { position: relative; display: flex; overflow: hidden; align-items: center; color: #fff; background: radial-gradient(circle at 50% 10%, rgba(203, 167, 92, .25), transparent 34%), linear-gradient(145deg, #063c2c, #032b20); }
.login-brand-panel::after { position: absolute; right: -90px; bottom: -90px; width: 250px; height: 250px; border: 1px solid rgba(215, 186, 124, .22); border-radius: 50%; content: ""; }
.phone-recovery-trigger {
  position: absolute;
  z-index: 2;
  bottom: 15px;
  left: 15px;
  display: grid;
  width: 30px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  color: rgba(58, 116, 91, .46);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.phone-recovery-trigger svg { width: 15px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.phone-recovery-trigger:hover,
.phone-recovery-trigger:focus-visible { color: rgba(100, 157, 130, .74); background: rgba(255, 255, 255, .025); outline: none; }
.login-brand-content { position: relative; z-index: 1; padding: 3rem; }
.login-brand-content img { display: block; width: 170px; height: 170px; margin-bottom: 1.8rem; border: 1px solid rgba(223, 201, 151, .56); border-radius: 1.1rem; object-fit: cover; box-shadow: 0 15px 35px rgba(0, 0, 0, .2); }
.login-brand-content .hero-kicker { color: #dec382; }
.login-brand-content h1 { margin: 1rem 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; }
.login-brand-content p { max-width: 430px; margin: 0; color: rgba(255, 255, 255, .72); line-height: 1.7; }
.login-form-panel { display: flex; align-items: center; }
.login-form-content { width: 100%; padding: clamp(2rem, 5vw, 4rem); }
.login-form-content h2 { margin: .65rem 0 .35rem; color: var(--mn-navy); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.login-form-content .form-control-lg { min-height: 50px; font-size: .95rem; }
.login-security-note { position: relative; margin-top: 1.3rem; padding-top: 1rem; color: var(--mn-muted); font-size: .75rem; text-align: center; }
.login-security-note::before { position: absolute; top: 0; right: 25%; left: 25%; height: 1px; background: var(--mn-border); content: ""; }
.otp-code {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .55rem;
  cursor: text;
}
.otp-code-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  border: 0;
  opacity: 0;
  color: transparent;
  background: transparent;
  caret-color: transparent;
}
.otp-code-input:focus { outline: 0; }
.otp-digit {
  display: grid;
  min-width: 0;
  height: 3.35rem;
  place-items: center;
  border: 1px solid #cad5cf;
  border-radius: .7rem;
  color: var(--mn-navy);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(7, 31, 53, .035);
  font-size: 1.35rem;
  font-weight: 800;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.otp-digit.is-active { border-color: var(--mn-primary); box-shadow: 0 0 0 .2rem rgba(7, 81, 58, .12); }
.otp-digit.is-filled { border-color: #91b5a7; background: #f7fbf8; }

/* Detalhes completos do boleto em janela sobre a tela atual. */
.boleto-details-link {
  color: var(--mn-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(18, 95, 70, .35);
  text-underline-offset: .2rem;
}
.boleto-details-link:hover { color: var(--mn-gold-dark); }
.boleto-details-modal-content { overflow: hidden; border: 1px solid var(--mn-border-gold); border-radius: 1rem; }
.boleto-details-heading {
  display: grid;
  grid-template-columns: 2fr 1fr .7fr 1fr;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--mn-border);
  border-radius: .75rem;
  background: #f7faf8;
}
.boleto-details-heading > div,
.boleto-details-grid > div {
  min-width: 0;
  padding: .75rem .9rem;
  border-right: 1px solid var(--mn-border);
}
.boleto-details-heading > div:last-child { border-right: 0; }
.boleto-details-heading span,
.boleto-details-grid dt,
.boleto-details-notes dt {
  display: block;
  margin-bottom: .25rem;
  color: var(--mn-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.boleto-details-heading strong { color: var(--mn-navy); }
.boleto-details-section { margin-top: 1rem; }
.boleto-details-section h3 {
  margin-bottom: .55rem;
  color: var(--mn-navy);
  font-size: 1rem;
  font-weight: 800;
}
.boleto-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--mn-border);
  border-radius: .75rem;
  background: #fff;
}
.boleto-details-grid > div {
  border-bottom: 1px solid var(--mn-border);
}
.boleto-details-grid > div:nth-child(4n) { border-right: 0; }
.boleto-details-grid dd,
.boleto-details-notes dd { margin: 0; overflow-wrap: anywhere; color: var(--mn-navy); font-weight: 650; }
.boleto-details-wide { grid-column: span 2; }
.boleto-details-notes dl { display: grid; gap: .7rem; margin: 0; }
.boleto-details-notes dl > div {
  padding: .85rem .95rem;
  border: 1px solid var(--mn-border);
  border-radius: .75rem;
  background: #fbfcfb;
}

@media (max-width: 991.98px) {
  .app-sidebar { border-right: 0; border-bottom: 1px solid var(--mn-border); }
  .sidebar { position: static; }
  .sidebar-identity { max-width: 280px; }
  .sidebar nav { flex-direction: row !important; flex-wrap: wrap; gap: .25rem; }
  .sidebar .nav-link { margin: 0; }
  .home-hero { text-align: center; }
  .hero-copy { margin-inline: auto; }
  .home-hero .d-flex { justify-content: center; }
  .hero-kicker { justify-content: center; }
  .login-brand-content { display: grid; justify-items: center; padding: 2.25rem; text-align: center; }
  .login-brand-content img { width: 130px; height: 130px; margin-bottom: 1.2rem; }
  .login-brand-content p { display: none; }
  .chart-container, .chart-container-wide { height: 280px; }
  .boleto-details-heading,
  .boleto-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boleto-details-heading > div:nth-child(2n),
  .boleto-details-grid > div:nth-child(2n) { border-right: 0; }
}

@media (max-width: 575.98px) {
  .app-navbar { min-height: 68px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-mark img { width: 40px; height: 40px; }
  .app-shell > .row { min-height: calc(100vh - 68px); }
  .metric-card, .panel { border-radius: .85rem; }
  .hero-title { font-size: 2.55rem; }
  .hero-brand-card { padding: 1.3rem; }
  .hero-brand-card img { width: 240px; }
  .login-shell { min-height: calc(100vh - 68px); align-items: start; }
  .login-card { border-radius: 1rem; }
  .login-brand-content h1 { font-size: 1.8rem; }
  .login-form-content { padding: 1.65rem; }
  .chart-container, .chart-container-wide { height: 245px; }
  .detail-list > div { grid-template-columns: 1fr; gap: .25rem; }
  .boleto-details-heading,
  .boleto-details-grid { grid-template-columns: 1fr; }
  .boleto-details-heading > div,
  .boleto-details-grid > div { grid-column: auto; border-right: 0; }
  .otp-code { gap: .32rem; }
  .otp-digit { height: 3rem; border-radius: .55rem; font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
/* Aviso de bloqueio contratual do Portal do Fazendeiro(a). */
.contract-blocked-card {
  max-width: 720px;
  margin-top: clamp(2rem, 8vh, 6rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(176, 132, 47, .26);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1.25rem 3rem rgba(18, 58, 43, .10);
  text-align: center;
}
.contract-blocked-card h1 { color: #173f32; font-family: Georgia, serif; }
.contract-blocked-icon {
  display: inline-grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 50%;
  color: #735514;
  background: #f5e7bc;
  font-size: 1.6rem;
  font-weight: 800;
}
.contract-blocked-message { margin: 1rem auto 1.5rem; color: #53665f; font-size: 1.05rem; }
.collection-api-card { display: flex; min-width: 310px; padding: .85rem 1rem; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #d9e5de; border-radius: .9rem; background: #fff; box-shadow: 0 .4rem 1.2rem rgba(17,74,53,.06); }
.collection-api-card small, .collection-summary span { display: block; color: #718078; font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.collection-api-card strong { display: block; color: #173f32; }
.collection-api-card .status-conectada { color: #087546; }
.collection-api-card .status-erro { color: #a32d2d; }
.collection-summary { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: #e5ebe7; }
.collection-summary > div { padding: 1rem 1.2rem; background: #fff; }
.collection-summary > p { grid-column: 1 / -1; margin: 0; padding: .75rem 1.2rem; color: #52665c; background: #f8faf8; }
.panel-heading { display: flex; padding: 1rem 1.25rem; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e6ece8; }
.collection-table th { color: #65766d; background: #f7faf8; font-size: .7rem; text-transform: uppercase; white-space: nowrap; }
.collection-table td { padding: .9rem .75rem; }
.collection-table td small { display: block; color: #728079; }
.collection-receipt { display: flex; padding: .75rem 0; align-items: center; gap: .5rem; border-bottom: 1px solid #e7ece9; }
.collection-receipt > div { margin-right: auto; }
.collection-receipt small { display: block; color: #6d7b74; }
@media (max-width: 900px) { .collection-summary { grid-template-columns: repeat(2, 1fr); } .collection-api-card { min-width: 100%; } }
@media (max-width: 600px) { .collection-summary { grid-template-columns: 1fr; } .collection-receipt { align-items: flex-start; flex-wrap: wrap; } }
