:root {
  color-scheme: light;
  --fundo: #f3f5f1;
  --papel: #fff;
  --tinta: #1b2b28;
  --secundario: #4f625c;
  --borda: #d8e1da;
  --verde: #17564c;
  --verde-escuro: #15423c;
  --menta: #dcece2;
  --erro: #963223;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fundo); color: var(--tinta); }
h1, h2, p, ul, dl, dd { margin: 0; }
h1, h2 { letter-spacing: -.035em; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); }
h2 { font-size: 1.28rem; }
small { display: block; }
a { color: var(--verde); text-underline-offset: .2em; }
button { cursor: pointer; }
a, button, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid #4c8774; outline-offset: 3px; }
.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { display: block; padding: .5rem 1rem; background: white; }
.wrap { width: min(1260px, calc(100% - 4rem)); margin-inline: auto; }
.content { padding-block: 2.4rem 4rem; }
.shell-head { background: var(--papel); border-bottom: 1px solid var(--borda); }
.topbar, .nav, .identity, .page-head, .section-head, .actions {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
}
.topbar, .page-head, .section-head { justify-content: space-between; }
.topbar { min-height: 4.7rem; gap: 1.3rem; }
.identity { gap: 1.25rem; }
.identity small { color: var(--secundario); }
.identity a, .identity button { font-size: .9rem; }
.identity div { overflow-wrap: anywhere; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--verde-escuro); font-size: 2rem; font-weight: 780; letter-spacing: -.095em; line-height: 1; text-decoration: none; }
.brand-mark { display: inline-block; position: relative; width: 1.02em; height: 1.02em; border-radius: 35% 35% 35% 12%; background: #b7dcac; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 57%; height: 15%; left: 22%; top: 34%; border-radius: 5px; background: var(--verde-escuro); transform: rotate(-32deg); }
.brand-mark::after { top: 52%; width: 44%; }
.nav { gap: .35rem 1.45rem; }
.nav a { display: inline-block; padding: .65rem 0 .7rem; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 600; color: var(--secundario); }
.nav a[aria-current], .nav a:hover { color: var(--verde); border-color: var(--verde); }
.page-head { margin-bottom: 1.45rem; }
.page-head p, .section-head p { margin-top: .45rem; color: var(--secundario); }
.panel { padding: 1.25rem; background: var(--papel); border: 1px solid var(--borda); border-radius: 14px; }
.panel > h2:not(:last-child) { margin-bottom: 1rem; }
.panel > h2 { overflow-wrap: anywhere; }
.panel.stack > h2 { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.filters .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters .actions { margin-top: 1rem; }
.field { display: grid; min-width: 0; align-content: start; gap: .35rem; }
.field label { font-weight: 650; font-size: .94rem; }
input:not([type="hidden"]):not([type="checkbox"]), select {
  font: inherit; min-height: 2.65rem; width: 100%; min-width: 0; padding: .4rem .65rem;
  color: var(--tinta); background: white; border: 1px solid #aabcb1; border-radius: 8px;
}
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--verde); }
[aria-invalid="true"] { border-color: var(--erro) !important; }
.help { font-size: .9rem; color: var(--secundario); }
.help ul { padding-left: 1.2rem; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--erro); font-size: .92rem; }
.errorlist.nonfield { grid-column: 1 / -1; }
#erro-parcelas { color: var(--erro); }
#erro-parcelas:empty, #resumo-parcelas:empty, .parcelas:empty { display: none; }
.stack { display: grid; gap: 1rem; }
.narrow { width: min(100%, 520px); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.section-space { margin-top: 1rem; }
.button, button:not(.quiet) {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.65rem; padding: .45rem .9rem; background: #fff; color: var(--verde-escuro);
  border: 1px solid #abbfb4; border-radius: 8px; font: inherit; font-weight: 650; text-decoration: none;
}
.button:hover, button:not(.quiet):hover { background: #edf3ef; }
.button.primary, button.primary { background: var(--verde); color: #fff; border-color: var(--verde); }
.button.primary:hover, button.primary:hover { background: var(--verde-escuro); }
.quiet { background: none; border: 0; font: inherit; color: var(--verde); text-decoration: underline; padding: .4rem 0; }
.notice { background: var(--menta); color: var(--verde-escuro); border: 1px solid #b8d6c5; border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.report { margin-top: 1rem; padding: 0; overflow: hidden; }
.report-head, .empty, .pagination { padding: 1rem 1.25rem; }
.table-scroll { width: 100%; overflow: auto; }
.table-scroll:focus-visible { outline-offset: -4px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; text-align: left; }
thead { background: #edf3ee; color: #38534a; }
th, td { padding: .78rem .85rem; vertical-align: top; border-bottom: 1px solid #e4eae5; overflow-wrap: anywhere; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 650; }
tbody small { color: var(--secundario); font-weight: 400; }
.date, .money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money { text-align: right; }
.overdue { color: var(--erro); }
.status { display: inline-block; padding: .14rem .55rem; border-radius: 6px; background: #edf2ef; color: #344e46; }
.status.parcial { background: #f8edd5; color: #674c1d; }
.status.baixado { background: var(--menta); color: var(--verde-escuro); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1rem; }
.details dt { color: var(--secundario); font-size: .9rem; }
.details dd { font-weight: 650; overflow-wrap: anywhere; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; border-bottom: 1px solid var(--borda); padding: .65rem 0; overflow-wrap: anywhere; }
.plain-list li:last-child { border: 0; }
.parcelas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: .75rem; }
fieldset { min-width: 0; border: 1px solid var(--borda); border-radius: 8px; padding: .6rem .8rem .85rem; margin: 0; }
legend { padding-inline: .35rem; font-weight: 650; }
.parcela-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: .65rem; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 44%) 1fr; }
.login-brand {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between; background: var(--verde-escuro); color: #e9f4e9;
  padding: clamp(1.5rem, 6vw, 6rem);
}
.login-brand .brand { color: white; }
.login-brand p { font-size: clamp(2.3rem, 4vw, 4.5rem); line-height: 1.04; font-weight: 630; letter-spacing: -.06em; }
.login-lines { position: absolute; z-index: -1; top: 18%; left: 25%; width: 76%; height: 60%; transform: rotate(-26deg); }
.login-lines i { display: block; width: 100%; height: 19%; margin-block: 12%; border: 1px solid #458070; border-radius: 100px; }
.login-lines i:nth-child(2) { width: 80%; }
.login-lines i:nth-child(3) { width: 65%; }
.login-body { display: grid; place-items: center; background: #f7f9f5; padding: 2rem; }
.login-card { width: min(100%, 430px); background: white; border-radius: 16px; padding: clamp(1.3rem, 4vw, 2.7rem); border: 1px solid var(--borda); }
.login-card h1 { margin-bottom: 1.6rem; }
.login-card button { width: 100%; margin-top: .35rem; }
@media (max-width: 820px) {
  .wrap { width: calc(100% - 2rem); }
  .filters .form-grid, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { gap: 2rem; }
  .login-lines { top: -50%; left: 50%; }
}
@media (max-width: 520px) {
  .content { padding-top: 1.35rem; }
  .split, .form-grid { grid-template-columns: 1fr; }
  .identity { gap: .4rem .7rem; }
  .topbar { padding-block: .8rem; }
  .panel { padding: 1rem; }
  .report { padding: 0; }
  .section-head { align-items: flex-start; }
  .login-body { padding: 1rem; }
}
