/* Define o tema azul, listagens e modais responsivos. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  background: #f5f7fb;
  color: #24324b;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  transition: 0.15s;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  background: #eaf0fa;
  color: #23436c;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: #2563eb;
  color: white;
}
.danger {
  color: #b91c1c;
  background: #fff1f2;
}
.hidden {
  display: none !important;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 256px;
  background: #163c80;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  z-index: 30;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px 34px;
}
.brand b {
  font-size: 23px;
}
.brand small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #b3c8eb;
  display: block;
  margin-top: 5px;
}
.brand-icon {
  background: #3973cf;
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 22px;
  font-weight: 700;
}
.nav-label {
  font-size: 10px;
  color: #a9bfe4;
  letter-spacing: 1.7px;
  padding: 0 15px;
}
nav a {
  display: flex;
  gap: 13px;
  color: #d4e1f8;
  text-decoration: none;
  padding: 14px 15px;
  border-radius: 9px;
  margin: 5px 0;
  font-size: 14px;
}
nav a.active,
nav a:hover {
  background: #2e5bac;
  color: white;
}
nav a span {
  width: 20px;
  font-size: 18px;
}
.profile {
  margin-top: auto;
  display: flex;
  gap: 11px;
  padding: 22px 9px 12px;
  border-top: 1px solid #416198;
  font-size: 12px;
}
.profile small {
  display: block;
  margin-top: 6px;
  color: #b8ceef;
}
.avatar {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  background: #3d67ad;
  display: grid;
  place-items: center;
}
.side-button {
  color: #cedcf4;
  background: transparent;
  text-align: left;
  font-size: 12px;
}
.mobile {
  display: none;
}
main {
  margin-left: 256px;
  min-height: 100vh;
  padding: 32px;
  max-width: 1800px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 11px;
  color: #6480a3;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 7px 0;
}
h2 {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
}
p.subtitle {
  color: #77879d;
  font-size: 13px;
  margin: 0;
}
.card {
  background: white;
  border: 1px solid #e2e8f2;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 5px #203c6610;
  margin-bottom: 20px;
}
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
.filters label {
  font-size: 11px;
  color: #64748b;
  display: grid;
  gap: 7px;
}
.filters input,
.filters select {
  min-width: 140px;
}
.filters .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat small {
  font-size: 11px;
  letter-spacing: 1px;
  color: #6b7d95;
}
.stat strong {
  font-size: 27px;
  display: block;
  margin: 13px 0 8px;
  font-weight: 700;
}
.stat p {
  font-size: 11px;
  color: #8b99ad;
  margin: 0;
}
.stat.green strong {
  color: #16a077;
}
.stat.red strong {
  color: #dc5269;
}
.stat.blue strong {
  color: #2563eb;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.chart {
  height: 285px;
  position: relative;
}
.chart.bar {
  height: 400px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}
th {
  color: #788aa2;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e7edf5;
  padding: 13px 12px;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid #edf1f7;
}
td:first-child {
  font-weight: 550;
}
td.money {
  text-align: right;
}
.badge {
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  background: #fff0d9;
  color: #9b690c;
}
.badge.paid {
  background: #dff6ed;
  color: #157b58;
}
.badge.overdue {
  background: #ffe4e8;
  color: #b83450;
}
.conta-paga {
  background: #f3fcf8;
}
.conta-vencida {
  background: #fff4f5;
}
.row-actions {
  display: flex;
  gap: 5px;
}
.row-actions button {
  padding: 6px 9px;
  font-size: 10px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 12px;
  color: #75859b;
}
.pagination div {
  display: flex;
  gap: 4px;
}
.pagination button {
  padding: 7px 11px;
}
.empty {
  text-align: center;
  color: #8291a6;
  padding: 35px !important;
}
.modal {
  position: fixed;
  inset: 0;
  background: #10244288;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal section {
  background: white;
  border-radius: 14px;
  width: 680px;
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  box-shadow: 0 25px 80px #13295050;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-head button {
  font-size: 22px;
  background: transparent;
  padding: 0 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
label.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #4c607a;
}
.full {
  grid-column: 1/-1;
}
input,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7dfed;
  border-radius: 7px;
  background: white;
  color: #24324b;
  outline: none;
}
input:focus,
select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #dbeafe;
}
form .footer {
  display: flex;
  justify-content: end;
  gap: 10px;
  margin-top: 22px;
}
.help {
  font-size: 11px;
  color: #76889e;
  margin-top: 5px;
}
.error {
  font-size: 12px;
  color: #b91c1c;
  background: #fff1f2;
  border-radius: 7px;
  padding: 12px;
  margin-top: 12px;
}
.tree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f7;
  padding: 14px 8px;
  font-size: 13px;
}
.tree-row span {
  display: flex;
  gap: 9px;
}
#notice {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 90;
  border-radius: 9px;
  color: white;
  background: #174579;
  padding: 14px 20px;
  display: none;
  max-width: 420px;
  font-size: 13px;
}
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at top left, #dbeafe, #f2f6fc 65%);
}
.login-card {
  width: 420px;
  max-width: 90vw;
  padding: 38px;
  background: white;
  border: 1px solid #dce6f5;
  border-radius: 18px;
  box-shadow: 0 20px 70px #15418012;
}
.login-logo {
  display: inline-block;
  background: #2563eb;
  color: white;
  font-size: 25px;
  font-weight: 700;
  border-radius: 13px;
  padding: 9px 16px;
  margin-bottom: 19px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card .subtitle {
  margin-bottom: 25px;
}
.login-card .field {
  margin: 15px 0;
}
.login-card .primary {
  width: 100%;
  margin-top: 14px;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #10244266;
  z-index: 25;
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-thumb {
  background: #bcc9dc;
  border-radius: 6px;
}
@media (max-width: 1050px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat strong {
    font-size: 22px;
  }
}
@media (max-width: 800px) {
  aside {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  aside.open {
    transform: translateX(0);
  }
  .mobile {
    height: 48px;
    background: white;
    border-bottom: 1px solid #e2e8f2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 20;
    font-size: 14px;
  }
  .mobile button {
    background: transparent;
    padding: 5px;
  }
  main {
    margin: 0;
    padding: 70px 16px 25px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat strong {
    font-size: 26px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .page-head {
    flex-wrap: wrap;
  }
  h1 {
    font-size: 24px;
  }
  .card {
    padding: 17px;
  }
  .filters {
    align-items: stretch;
  }
  .filters label {
    flex: 1;
  }
  .filters .actions {
    margin-left: 0;
    flex-wrap: wrap;
  }
  .pagination {
    flex-wrap: wrap;
  }
}

.card {
  min-width: 0;
}
.card-head {
  flex-wrap: wrap;
  gap: 12px;
}
.grid-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 1050px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.company-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
}
.company-footer {
  margin-left: 256px;
  padding: 18px 30px;
  text-align: center;
  color: #718096;
  font-size: 12px;
  border-top: 1px solid #e2e8f0;
  background: white;
}
.logo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.logo-preview img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid #d7dfed;
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 800px) {
  .company-footer {
    margin-left: 0;
    padding: 16px;
  }
  .company-logo {
    width: 39px;
    height: 39px;
  }
}
