:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  color: #233348;
  background: #f3f5f8;
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
aside {
  position: fixed;
  width: 236px;
  inset: 0 auto 0 0;
  background: #132c35;
  color: #d4e1e5;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.brand {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 4px;
  color: white;
  text-decoration: none;
}
.brand span {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  color: #8abeb8;
}
nav {
  display: grid;
  gap: 5px;
  margin-top: 38px;
}
nav a {
  color: inherit;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}
nav a:hover,
nav a:focus {
  background: #28454e;
  color: white;
}
.profile {
  margin-top: auto;
  padding-top: 30px;
}
.profile small,
td small,
.timeline small {
  display: block;
  color: #657787;
}
.profile small {
  color: #9cb5bc;
  margin-bottom: 10px;
}
main {
  margin-left: 236px;
  padding: 34px 38px;
  max-width: 1800px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
header small {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #657787;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.6px;
  margin: 7px 0;
}
.page-hint {
  margin: 0;
  color: #657787;
  font-size: 13px;
  font-style: italic;
}
h2 {
  font-size: 18px;
}
section,
.filters,
.table-scroll {
  background: white;
  border: 1px solid #dce3e9;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
a {
  color: #08736b;
}
button,
.button {
  border: 0;
  border-radius: 6px;
  background: #08736b;
  color: white;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover {
  background: #075d56;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: #e8eff1;
  color: #234753;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #bac7d2;
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: #233348;
  font: inherit;
  min-width: 0;
}
textarea {
  min-height: 82px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #85bfb9;
  outline-offset: 1px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.table-scroll {
  overflow: auto;
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid #e5eaf0;
}
th {
  background: #fafbfc;
  color: #526274;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
td a {
  text-decoration: none;
  font-weight: 600;
}
td small {
  font-size: 12px;
  margin-top: 3px;
}
.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.badge {
  background: #eef2f5;
  color: #40536b;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.badge.paid {
  background: #def2e9;
  color: #22624b;
}
.badge.late {
  background: #ffeded;
  color: #a33737;
}
.overdue {
  display: block;
  font-size: 11px;
  color: #a33737;
  margin-top: 5px;
}
.empty {
  text-align: center;
  padding: 48px;
  color: #657787;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: white;
  border: 1px solid #dce3e9;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}
.card span {
  font-size: 12px;
  color: #526274;
}
.card strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-top: 8px;
}
.card.alert {
  border-left: 3px solid #bc5353;
}
.notice {
  padding: 15px 20px;
  background: #e0f2ec;
  border: 1px solid #9bcdbb;
  border-radius: 8px;
  margin-bottom: 20px;
}
.summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.summary > strong {
  font-size: 30px;
}
.pagination {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.pagination span {
  margin-right: auto;
}
dt {
  color: #657787;
  font-size: 12px;
}
dd {
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.timeline {
  list-style: none;
  padding: 0;
}
.timeline li {
  padding: 14px;
  border-left: 2px solid #bed6d2;
  border-bottom: 1px solid #eef2f5;
}
.inline {
  display: inline;
}
pre {
  overflow: auto;
  max-height: 260px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
footer {
  color: #657787;
  font-size: 11px;
  margin-top: 40px;
}
.login {
  margin: 0 auto;
  max-width: 520px;
  min-height: 100vh;
  padding: 9vh 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-brand {
  text-align: center;
  margin-bottom: 22px;
}
.login-brand span,
.login-brand strong {
  display: block;
  letter-spacing: .16em;
  line-height: 1;
}
.login-brand span { color: #173042; font-size: 18px; font-weight: 700; }
.login-brand strong { color: #08736b; font-size: 42px; font-weight: 800; }
.login-brand p { color: #657787; margin: 13px 0 0; font-size: 15px; }
.login > header { justify-content: center; margin: 0 0 12px; }
.login > header h1 { font-size: 18px; color: #173042; }
.login > section { width: 100%; }
.login > footer { text-align: center; }
@media (max-width: 700px) {
  .login { padding: 30px 16px; }
  .login-brand strong { font-size: 34px; }
}
.login label {
  margin-bottom: 16px;
}
.catalog-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.catalog-links a {
  padding: 20px;
  background: white;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  text-decoration: none;
}
.catalog-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
.catalog-card {display:flex;align-items:center;gap:15px;min-height:132px;padding:22px;background:#fff;border:1px solid #dce3e9;border-radius:10px;color:#173042;text-decoration:none;box-shadow:0 1px 2px #102a4310;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;}
.catalog-card:hover,.catalog-card:focus-visible {transform:translateY(-2px);border-color:#199f92;box-shadow:0 8px 22px #075d5620;outline:none;}
.catalog-card>span:nth-child(2){display:grid;gap:7px;flex:1;}.catalog-card strong{font-size:17px;color:#075d56;}.catalog-card small{color:#657787;line-height:1.45;}.catalog-card b{font-size:24px;color:#199f92;font-weight:500;}.catalog-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:9px;background:#e8f5f3;color:#075d56;font-size:22px;font-weight:700;}
.inactive-row td{color:#748392;background:#f7f8f9;}.toggle{display:flex;align-items:center;gap:8px;white-space:nowrap;}.payment-fields{margin-top:20px;padding-top:18px;border-top:1px solid #dce3e9;}.payment-fields h2{font-size:16px;margin:0 0 4px;}.payment-fields p{margin-top:0;color:#657787;}
@media (max-width: 1050px) {
  .cards,
  .form-grid,
  .filters,
  .catalog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main {
    padding: 25px;
  }
  aside {
    width: 205px;
  }
  main {
    margin-left: 205px;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: auto;
    padding: 18px;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 16px;
  }
  nav a {
    white-space: nowrap;
  }
  .profile {
    display: none;
  }
  main {
    margin: 0;
    padding: 18px;
  }
  .form-grid,
  .filters,
  .catalog-links,
  .catalog-cards {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .card {
    padding: 15px;
  }
  .card strong {
    font-size: 20px;
  }
  header {
    align-items: start;
  }
  header > span {
    display: none;
  }
  .summary {
    flex-direction: column;
  }
  section {
    padding: 18px;
  }
}
@media print {
  aside,
  form,
  .actions,
  footer,
  .pagination {
    display: none !important;
  }
  main {
    margin: 0;
    padding: 0;
  }
  body {
    background: white;
  }
  .table-scroll {
    overflow: visible;
  }
  table {
    white-space: normal;
    font-size: 10px;
  }
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .report-periods,.report-actions,.report-shortcuts,.period-custom,.dashboard-filters,.filters,.advanced-filters,.agenda-actions,.details-actions {display:none !important;}
  .report-print-meta {display:block !important;border-bottom:2px solid #173042;margin-bottom:18px;padding-bottom:10px;}
  .report-print-meta h2 {margin:6px 0;font-size:20px;}
  .report-print-meta p {margin:4px 0;font-size:11px;}
  .table-scroll {overflow:visible !important;}
  table {width:100%;table-layout:auto;}
  section {
    break-inside: avoid;
  }
}
.report-print-meta {display:none;}
.agenda-print-meta {display:none;}
.details-print-meta {display:none;}
@media print { .agenda-print-meta {display:block !important;border-bottom:2px solid #173042;margin-bottom:18px;padding-bottom:10px;} .agenda-print-meta h2{margin:6px 0;font-size:20px;} .agenda-print-meta p{font-size:11px;} }
@media print { .details-print-meta {display:block !important;border-bottom:2px solid #173042;margin-bottom:18px;padding-bottom:10px;} .details-print-meta h2{margin:6px 0;font-size:20px;} .details-print-meta p{font-size:11px;} }
.environment {background:#fff6dd;color:#725316;border:1px solid #e7d7a4;border-radius:6px;padding:8px 14px;margin-bottom:20px;font-size:12px;font-weight:600;letter-spacing:.4px}
nav a[aria-current="page"] {background:#28454e;color:#fff;border-left:3px solid #7fc7b6}
.badge {white-space:normal;display:inline-block;max-width:160px}
@media(max-width:700px){.profile{display:block;padding-top:12px}.profile form{display:inline;margin-left:16px}.profile small{display:none}header h1{font-size:25px}}

.dashboard-filters { margin-bottom: 20px; }
.dashboard-filters > summary { cursor: pointer; color: #08736b; font-weight: 600; padding: 10px 0; }

/* Mission 3: reuse the current design, clarify the operational hierarchy. */
.summary-card,.approval-card {background:#fff;border:1px solid #dce3e9;border-radius:10px;padding:24px;margin-bottom:20px;}
.summary-card {display:flex;flex-wrap:wrap;align-items:center;gap:14px 28px;}
.summary-card strong {font-size:28px;font-variant-numeric:tabular-nums;color:#075d56;}
.summary-card span:last-child {margin-left:auto;}
.additional-fields {margin-top:24px;padding-top:18px;border-top:1px solid #e5eaf0;}
.additional-fields summary,.rejection summary {cursor:pointer;font-weight:600;padding:10px 0;}
.additional-fields .form-grid {margin-top:16px;}
.document-step {margin-top:24px;background:#f5f8fa;border-radius:8px;padding:16px;}
.document-step h2 {margin-top:0;}
.approval-card h2 a {text-decoration:none;}
.approval-decision {border-left:4px solid #08736b;}
.approval-decision .actions {align-items:flex-start;gap:28px;}
.rejection {color:#a33737;max-width:460px;}
.rejection button {background:#a33737;}
.report-shortcuts {display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px;}
.report-shortcuts a {padding:10px 14px;background:#e8eff1;border-radius:6px;text-decoration:none;}
.period-actions {margin:12px 0 20px;}
.badge.aprovado {background:#e0f2ec;color:#22624b;}
.badge.programado {background:#e4edff;color:#315684;}
.badge.aguardando_aprovacao {background:#fff1d3;color:#785b17;}
.badge.rejeitado {background:#ffeded;color:#a33737;}
[data-money] {font-variant-numeric:tabular-nums;}
#documentos {scroll-margin-top:20px;}
#documentos li {margin-bottom:12px;overflow-wrap:anywhere;}
#documentos form[data-upload] {display:grid;gap:12px;}
.actions {margin-bottom:16px;}
@media(max-width:700px){.summary-card {display:block;padding:18px;}.summary-card strong,.summary-card span{display:block;margin-bottom:6px;}.approval-card{padding:18px;}.report-shortcuts a{flex:1 1 140px;}.approval-card .summary > strong{font-size:26px;}}

.recurrences-table { white-space:normal; min-width:900px; font-size:13px; }
.recurrences-table th,.recurrences-table td { padding:14px 12px; }
.recurrences-table td:nth-child(1),.recurrences-table td:nth-child(2) { max-width:230px; }
