html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --brand: #0bb4aa;
  --brand-dark: #076c65;
  --brand-soft: #e9fbf9;
  --brand-border: #9de5df;
  --green: #94d11f;
  --amber: #c27a18;
  --red: #b42318;
  --surface: #fff;
  --surface-muted: #f7f8fa;
  --line: #dee3e7;
  --text-muted: #666;
  --ink: #222;
  --ink-soft: #444;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, .08);
}

body {
  background: #f7f8fa;
  color: var(--ink);
  margin-bottom: 60px;
  overflow-x: hidden;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-dark);
}

.navbar {
  border-bottom-color: var(--line) !important;
  box-shadow: 0 10px 26px rgba(34, 34, 34, .06);
}

.navbar > .container-fluid {
  align-items: center;
  gap: .75rem;
}

.brand-logo {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: .7rem;
  min-height: 50px;
  text-decoration: none;
}

.brand-logo:hover {
  color: var(--ink);
}

.brand-logo img {
  background: #101010;
  border-radius: 6px;
  display: block;
  height: 42px;
  object-fit: contain;
  padding: .25rem .45rem;
  width: 118px;
}

.app-navbar-content {
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.app-nav {
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: .25rem;
  min-width: 0;
  padding-left: .35rem;
}

.app-nav-end-group {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: .25rem;
  margin-left: 0;
}

.app-nav-link {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  color: var(--ink-soft) !important;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.1;
  min-height: 30px;
  padding: .34rem .5rem !important;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link:focus {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand-dark) !important;
}

.app-nav-link.active {
  background: #101010;
  border-color: #101010;
  color: #fff !important;
}

.user-menu {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: .24rem;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 320px;
  white-space: nowrap;
}

.user-access-meta {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  flex-wrap: nowrap;
  font-size: .74rem;
  font-weight: 700;
  gap: .35rem;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.user-access-meta strong {
  color: var(--ink-soft);
  font-weight: 800;
}

.user-access-label {
  color: #6b7280;
}

.user-access-divider {
  color: #c2c8d0;
}

.user-name {
  color: var(--ink);
  font-weight: 700;
}

.user-session-row {
  align-items: center;
  display: flex;
  gap: .45rem;
  justify-content: flex-end;
}

.app-shell {
  max-width: 1600px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.footer-content {
  align-items: center;
  display: flex;
  font-size: .82rem;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: .65rem;
  padding-top: .65rem;
}

.page-heading {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-dark);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.15rem;
}

.page-heading h1 {
  color: var(--ink);
  font-size: 1.68rem;
  font-weight: 800;
  margin: 0;
}

.page-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.cashflow-month-form {
  align-items: center;
  display: inline-flex;
  gap: .5rem;
}

.cashflow-month-form .form-control {
  min-height: 36px;
  width: 160px;
}

.cashflow-manual-section {
  margin-top: -.25rem;
}

.cashflow-manual-grid {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(130px, .8fr) minmax(280px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.cashflow-manual-submit {
  display: flex;
  justify-content: flex-end;
}

.cashflow-manual-table {
  border: 1px solid var(--line);
}

.eyebrow {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 800;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  margin-bottom: 1rem;
}

.metric,
.content-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.metric {
  border-left: 4px solid var(--brand);
  padding: 1rem;
}

.metric-green {
  border-left-color: var(--green);
}

.metric-amber {
  border-left-color: var(--amber);
}

.metric-red {
  border-left-color: var(--red);
}

.metric span {
  color: var(--text-muted);
  display: block;
  font-size: .82rem;
  margin-bottom: .35rem;
}

.metric strong {
  color: var(--ink);
  display: block;
  font-size: 1.25rem;
  line-height: 1.2;
}

.content-section {
  margin-bottom: 1rem;
  overflow: hidden;
}

.section-title {
  align-items: center;
  background: var(--surface-muted);
  border-bottom: 1px solid #e5eaf0;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .85rem 1rem;
}

.section-title h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.inventory-section-title {
  align-items: flex-start;
}

.inventory-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.inventory-table tbody tr.inventory-row {
  cursor: pointer;
}

.inventory-table tbody tr.inventory-selected > * {
  background: #e7f7f6;
  box-shadow: inset 3px 0 0 var(--brand);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: var(--brand-soft);
  border-bottom-color: var(--brand-border);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
}

.table tbody td {
  border-bottom-color: #e7eef5;
  font-size: .85rem;
  vertical-align: middle;
}

.table tbody tr:nth-child(even) td {
  background: #f7fbfb;
}

.table tbody tr:hover td {
  background: var(--brand-soft);
}

.money {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.cashflow-table {
  table-layout: fixed;
  min-width: 900px;
}

.cashflow-table th,
.cashflow-table td {
  padding-left: .5rem;
  padding-right: .5rem;
}

.cashflow-col-day {
  width: 15%;
}

.cashflow-col-weekday {
  width: 19%;
}

.cashflow-col-value {
  width: 16%;
}

.cashflow-col-balance {
  width: 18%;
}

.cashflow-day-cell {
  padding-bottom: .35rem;
  padding-top: .35rem;
}

.cashflow-day-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--brand-dark);
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: .45rem;
  justify-content: space-between;
  line-height: 1.2;
  padding: .25rem .35rem;
  text-align: left;
  width: 100%;
}

.cashflow-day-button:hover,
.cashflow-day-button:focus {
  background: #fff;
  border-color: var(--brand-border);
  color: var(--brand-dark);
  outline: none;
}

.cashflow-day-button:focus-visible {
  box-shadow: 0 0 0 .2rem rgba(17, 176, 168, .18);
}

.cashflow-day-button.text-muted {
  color: #64748b !important;
}

.cashflow-day-indicator {
  align-items: center;
  background: #eef6f5;
  border: 1px solid #c8e4e1;
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-flex;
  flex: 0 0 1.25rem;
  font-size: .78rem;
  font-weight: 900;
  height: 1.25rem;
  justify-content: center;
  line-height: 1;
  width: 1.25rem;
}

.cashflow-row-open td {
  background: var(--brand-soft) !important;
}

.cashflow-detail-row > td {
  background: #fff !important;
  border-top: 0;
  padding: 0 .75rem .85rem;
}

.cashflow-detail-panel {
  background: #f8fbfc;
  border: 1px solid #dce9ed;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  padding: .9rem;
}

.cashflow-detail-header {
  align-items: flex-start;
  border-bottom: 1px solid #dce9ed;
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: space-between;
  margin-bottom: .75rem;
  padding-bottom: .75rem;
}

.cashflow-detail-header strong,
.cashflow-detail-header span {
  display: block;
}

.cashflow-detail-header > div:first-child span {
  color: var(--text-muted);
  font-size: .78rem;
  margin-top: .15rem;
}

.cashflow-detail-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  justify-content: flex-end;
}

.cashflow-detail-kpis span {
  color: var(--text-muted);
  font-size: .78rem;
}

.cashflow-detail-kpis strong {
  color: var(--ink);
  font-size: .9rem;
  margin-top: .1rem;
}

.cashflow-empty-detail {
  margin: 0;
}

.cashflow-detail-table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.cashflow-detail-table th,
.cashflow-detail-table td {
  font-size: .82rem;
}

.cashflow-detail-description {
  min-width: 300px;
}

.cost-center-metrics {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.cost-center-form {
  max-width: 980px;
}

.cost-center-form-grid {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: 120px minmax(280px, 1fr) 140px;
}

.cost-center-code-input {
  font-weight: 800;
  text-align: center;
}

.cost-center-new-row td {
  background: #f8fbfc !important;
  border-bottom-color: #dce9ed;
}

.cost-center-new-row .form-control,
.cost-center-new-row .form-check-input {
  border-color: #bddbd8;
}

.cost-center-active-field {
  padding-bottom: .45rem;
}

.cost-center-table th:first-child,
.cost-center-table td:first-child {
  width: 96px;
}

.cost-center-table th:nth-child(3),
.cost-center-table td:nth-child(3) {
  width: 150px;
}

.cost-center-table th:last-child,
.cost-center-table td:last-child {
  width: 110px;
}

.cost-center-code {
  align-items: center;
  background: #eef6f5;
  border: 1px solid #c8e4e1;
  border-radius: 4px;
  color: var(--brand-dark);
  display: inline-flex;
  font-size: .9rem;
  font-weight: 900;
  height: 2rem;
  justify-content: center;
  min-width: 2rem;
}

.cost-center-row-form {
  margin: 0;
}

.cost-center-name {
  color: var(--ink);
  display: inline-block;
  font-weight: 700;
  padding: .25rem 0;
}

.cost-center-status-switch {
  align-items: center;
  display: flex;
  gap: .45rem;
  min-height: 31px;
}

.cost-center-status-switch .form-check-input {
  margin-left: 0;
  margin-top: 0;
}

.cost-center-status-switch .form-check-label {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
}

.bank-upload-table th,
.bank-upload-table td {
  white-space: nowrap;
}

.bank-upload-table th:first-child,
.bank-upload-table td:first-child {
  width: 11%;
}

.bank-upload-table th:nth-child(2),
.bank-upload-table td:nth-child(2) {
  width: 13%;
}

.bank-upload-table th:nth-child(3),
.bank-upload-table td:nth-child(3) {
  width: 13%;
}

.bank-upload-table th:nth-child(4),
.bank-upload-table td:nth-child(4) {
  width: 18%;
}

.bank-upload-table th:nth-child(5),
.bank-upload-table td:nth-child(5) {
  width: 11%;
}

.bank-upload-table th:nth-child(6),
.bank-upload-table td:nth-child(6) {
  width: 19%;
}

.bank-upload-form {
  max-width: 760px;
}

.bank-upload-grid {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(320px, 1fr) auto;
}

.bank-upload-action .btn {
  min-width: 120px;
}

.bank-statement-metrics {
  margin-bottom: 1rem;
}

.bank-statement-table {
  min-width: 1180px;
}

.bank-statement-description {
  min-width: 260px;
}

.bank-statement-line {
  color: var(--text-muted);
  max-width: 420px;
  white-space: normal;
}

.current-account-form {
  padding: 1rem;
}

.current-account-grid {
  align-items: end;
  display: grid;
  gap: .85rem;
  grid-template-columns: minmax(280px, 1.5fr) minmax(150px, .6fr) minmax(120px, .45fr) minmax(130px, .45fr) minmax(260px, 1fr) auto;
}

.current-account-file {
  min-width: 0;
}

.current-account-action .btn {
  min-width: 138px;
}

.erp-conciliation-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  padding: 1rem;
}

.erp-conciliation-grid > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 116px;
  padding: .85rem;
}

.erp-conciliation-grid span {
  align-items: center;
  background: var(--brand);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  margin-bottom: .65rem;
  width: 26px;
}

.erp-conciliation-grid strong {
  color: var(--ink);
  display: block;
  font-size: .9rem;
  margin-bottom: .35rem;
}

.erp-conciliation-grid p {
  color: var(--text-muted);
  font-size: .82rem;
  margin: 0;
}

.current-account-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
}

.current-account-action-btn:disabled {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff !important;
  filter: none;
  opacity: 1 !important;
}

.current-account-table {
  min-width: 1120px;
}

.reembolso-table {
  min-width: 1180px;
}

.reembolso-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
  max-width: 520px;
}

.reembolso-inline-form {
  align-items: center;
  display: inline-flex;
  gap: .25rem;
}

.reembolso-inline-form .form-control {
  width: 96px;
}

.reembolso-inline-form .reembolso-reason {
  width: 150px;
}

.reembolso-inline-form .reembolso-date {
  width: 132px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: .74rem;
  font-weight: 800;
  justify-content: center;
  min-width: 84px;
  padding: .2rem .55rem;
}

.status-ok {
  background: #ecf8d3;
  color: #4d7500;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-danger {
  background: #fee2e2;
  color: #991b1b;
}

.status-muted {
  background: #f1f5f9;
  color: #64748b;
}

.form-body {
  padding: 1rem;
}

.form-actions {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}

.receber-textarea {
  min-height: 112px;
  resize: vertical;
}

.receber-xml-title {
  align-items: center;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  margin-bottom: .25rem;
}

.receber-xml-title .form-label {
  margin-bottom: 0;
}

.receber-xml-textarea {
  min-height: 36px;
  resize: vertical;
}

.xml-upload-section {
  margin-bottom: 1rem;
}

.xml-upload-body {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(260px, 520px);
}

.xml-upload-field {
  min-width: 0;
}

.nf-entrada-upload-body {
  grid-template-columns: minmax(260px, 520px) auto;
}

.nf-entrada-upload-action .btn {
  min-width: 120px;
}

.nf-entrada-form .form-label {
  min-height: 2.15rem;
}

.nf-entrada-textarea {
  min-height: 96px;
  resize: vertical;
}

.nf-registro-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0;
}

.nf-registro-grid {
  min-width: 980px;
}

.clientes-page-split {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1rem;
}

.clientes-editor-section,
.clientes-consulta-section {
  margin-bottom: 1rem;
  margin-top: 0;
}

.clientes-editor-section .section-title,
.clientes-consulta-section .section-title {
  padding: .85rem 1rem;
}

.clientes-editor-section .form-body,
.clientes-consulta-section .form-body {
  padding: 1rem;
}

.clientes-editor-section .row,
.clientes-consulta-section .row {
  --bs-gutter-x: .75rem;
  --bs-gutter-y: .45rem;
}

.clientes-form-grid {
  display: grid;
  gap: .75rem 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.fornecedor-nf-import {
  align-items: center;
  background: #f4f9ff;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  display: grid;
  gap: .75rem 1rem;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, .9fr) auto;
  margin-bottom: 1rem;
  padding: .85rem;
}

.fornecedor-nf-import-copy {
  display: grid;
  gap: .2rem;
}

.fornecedor-nf-import-copy strong {
  color: var(--ink);
  font-size: .9rem;
}

.fornecedor-nf-import-copy span {
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.35;
}

.fornecedor-nf-import-file .form-control {
  background: #fff;
}

.fornecedor-nf-import-action {
  white-space: nowrap;
}

.cliente-field {
  min-width: 0;
}

.cliente-span-2 {
  grid-column: span 2;
}

.cliente-span-3 {
  grid-column: span 3;
}

.cliente-span-4 {
  grid-column: span 4;
}

.clientes-form-actions {
  align-items: end;
  grid-column: span 3;
  margin-top: 0;
  min-height: 56px;
}

.clientes-editor-section .form-label,
.clientes-consulta-section .form-label {
  font-size: .84rem;
  margin-bottom: .25rem;
}

.clientes-editor-section .form-control,
.clientes-editor-section .form-select,
.clientes-consulta-section .form-control,
.clientes-consulta-section .form-select {
  font-size: .92rem;
  min-height: 36px;
  padding: .35rem .55rem;
}

.clientes-consulta-section .form-control[readonly] {
  background: #f9fafb;
  border-color: #e3e8ef;
  color: var(--ink-soft);
}

.clientes-editor-section .input-group .btn,
.clientes-consulta-section .input-group .btn {
  font-size: .84rem;
  padding: .25rem .55rem;
}

.clientes-editor-section hr,
.clientes-consulta-section hr {
  margin: .6rem 0;
}

.clientes-editor-section .form-actions,
.clientes-consulta-section .form-actions {
  margin-top: .65rem;
}

.clientes-editor-section .clientes-form-actions {
  margin-top: 0;
}

.clientes-consulta-actions {
  justify-content: flex-start;
  margin-top: 1rem;
}

.fornecedor-comprovantes-section {
  margin-top: 1rem;
}

.fornecedor-upload-grid {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(150px, 220px) minmax(320px, 1fr) auto;
}

.fornecedor-upload-picker {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: .6rem;
  min-height: 38px;
  padding: .35rem;
}

.fornecedor-file-input {
  display: none;
}

.fornecedor-file-name {
  color: var(--ink-soft);
  flex: 1 1 auto;
  font-size: .84rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fornecedor-upload-actions {
  display: flex;
  justify-content: flex-end;
}

.fornecedor-comprovantes-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 1rem;
}

.fornecedor-comprovantes-table {
  min-width: 760px;
}

.certidoes-section {
  margin-top: 0;
}

.certidoes-table {
  min-width: 1260px;
  table-layout: fixed;
  width: 100%;
}

.certidoes-table th,
.certidoes-table td {
  border: 1px solid #cfd8e3;
  padding: .35rem .4rem;
  text-align: left;
}

.certidoes-table thead th {
  background: #fff;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: uppercase;
}

.certidoes-table tbody tr:nth-child(even) td {
  background: #fff;
}

.certidoes-table tbody tr:hover td {
  background: #eefdfc;
}

.certidao-col-certidao {
  width: 24%;
}

.certidao-col-prazo {
  width: 16%;
}

.certidao-col-data {
  width: 17%;
}

.certidao-col-pdf {
  width: 43%;
}

.certidao-compact-cell {
  text-align: left;
  white-space: nowrap;
}

.certidao-prazo-form,
.certidao-validade-form {
  align-items: center;
  display: flex;
  gap: .35rem;
  min-width: 0;
}

.certidao-prazo-input {
  flex: 0 0 76px;
  min-height: 32px;
}

.certidao-prazo-sufixo {
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
}

.certidao-validade-input {
  flex: 0 0 138px;
  min-height: 32px;
}

.certidao-pendente-row td {
  color: #475569;
}

.certidao-pdf-cell {
  min-width: 0;
}

.certidao-delete-form {
  display: none;
}

.certidao-upload-form {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  min-width: 0;
}

.certidao-pdf-input {
  display: none;
}

.certidao-pdf-name {
  color: var(--ink-soft);
  display: block;
  flex: 1 1 auto;
  font-size: .8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .fornecedor-nf-import {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .fornecedor-nf-import-copy {
    grid-column: 1 / -1;
  }

  .cliente-span-2,
  .cliente-span-3,
  .cliente-span-4,
  .clientes-form-actions {
    grid-column: span 6;
  }
}

@media (max-width: 767px) {
  .clientes-form-grid {
    grid-template-columns: 1fr;
  }

  .fornecedor-nf-import {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .fornecedor-nf-import-action {
    justify-self: start;
  }

  .cliente-span-2,
  .cliente-span-3,
  .cliente-span-4,
  .clientes-form-actions {
    grid-column: 1;
  }

  .fornecedor-upload-grid {
    grid-template-columns: 1fr;
  }

  .fornecedor-upload-actions {
    justify-content: flex-start;
  }
}

.filter-actions,
.audit-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.audit-filter {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
}

.audit-table th,
.audit-table td {
  white-space: nowrap;
}

.audit-table {
  table-layout: fixed;
  min-width: 1040px;
}

.audit-col-when {
  width: 165px;
}

.audit-col-user {
  width: 220px;
}

.audit-col-origin {
  width: 160px;
}

.audit-col-ip {
  width: 135px;
}

.audit-col-client {
  width: 260px;
}

.audit-col-nf {
  width: 100px;
}

.audit-cell-truncate,
.audit-table td:nth-child(2),
.audit-table td:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tributos-table {
  background: #fff;
  border: 1px solid #dfe7ef;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1450px;
  table-layout: fixed;
}

.tributos-table th,
.tributos-table td {
  white-space: nowrap;
}

.tributos-table thead th {
  background: #f3f7f9;
  border-bottom: 1px solid #ccd8e3;
  border-right: 1px solid #dfe7ef;
  color: #29434f;
  font-size: .76rem;
  padding: .48rem .55rem;
}

.tributos-table tbody td {
  background: #fff;
  border-bottom: 1px solid #e8eef4;
  border-right: 1px solid #e8eef4;
  color: #263238;
  padding: .38rem .55rem;
}

.tributos-table thead th:last-child,
.tributos-table tbody td:last-child {
  border-right: 0;
}

.tributos-table tbody tr:last-child td {
  border-bottom: 0;
}

.tributos-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.tributos-table tbody tr:hover td {
  background: #f2fbfa;
}

.tributos-col-esfera {
  width: 90px;
}

.tributos-col-grupo {
  width: 125px;
}

.tributos-col-sigla {
  width: 90px;
}

.tributos-col-nome {
  width: 280px;
}

.tributos-col-tipo {
  width: 120px;
}

.tributos-col-aliquota {
  width: 150px;
}

.tributos-col-retido {
  width: 220px;
}

.tributos-col-valor {
  width: 140px;
}

.tributos-col-observacao {
  width: 235px;
}

.tributos-cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tributo-rate-input,
.tributo-value-input,
.tributo-note-input {
  font-size: .8rem;
  min-height: 28px;
  min-width: 0;
  padding: .2rem .35rem;
  width: 100%;
}

.tributos-table .parameter-value-input[readonly] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding-left: .35rem;
}

.parameters-editing .tributos-table .parameter-value-input {
  background: #fff;
  border-color: #b7c6d4;
  box-shadow: inset 0 0 0 1px rgba(11, 180, 170, .08);
  padding-left: .35rem;
}

.tributo-rate-input[readonly],
.tributo-value-input[readonly],
.tributo-note-input[readonly] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.municipios-filter {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr) minmax(260px, auto) auto;
}

.municipios-iss-check {
  align-items: center;
  display: flex;
  gap: .45rem;
  min-height: 38px;
  white-space: nowrap;
}

.municipio-edit-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(180px, 1.1fr) 80px minmax(220px, 1.4fr) 120px minmax(130px, .8fr) minmax(220px, 1.4fr);
}

.municipios-table {
  border: 1px solid #dfe7ef;
  min-width: 1160px;
  table-layout: fixed;
}

.municipios-table th,
.municipios-table td {
  white-space: nowrap;
}

.municipios-table thead th {
  background: #f3f7f9;
  border-bottom: 1px solid #ccd8e3;
  border-right: 1px solid #dfe7ef;
  color: #29434f;
  font-size: .76rem;
  padding: .48rem .55rem;
}

.municipios-table tbody td {
  background: #fff;
  border-bottom: 1px solid #e8eef4;
  border-right: 1px solid #e8eef4;
  color: #263238;
  padding: .38rem .55rem;
}

.municipios-table thead th:last-child,
.municipios-table tbody td:last-child {
  border-right: 0;
}

.municipios-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.municipios-table tbody tr:hover td {
  background: #f2fbfa;
}

.municipios-col-estado {
  width: 170px;
}

.municipios-col-uf {
  width: 55px;
}

.municipios-col-nome {
  width: 250px;
}

.municipios-col-codigo {
  width: 110px;
}

.municipios-col-iss {
  width: 90px;
}

.municipios-col-observacao {
  width: 220px;
}

.municipios-col-atualizado {
  width: 145px;
}

.municipios-col-acao {
  width: 95px;
}

.municipios-cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-form {
  min-height: calc(100vh - 235px);
  overflow: visible;
  width: 100%;
}

.support-form .form-body {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 305px);
}

.support-fields-row {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-bottom: 1rem;
}

.support-requester {
  background: var(--surface-muted);
  border: 1px solid #e5eaf0;
  border-radius: 6px;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin-bottom: 1rem;
  padding: .85rem 1rem;
}

.support-requester span,
.support-requester strong {
  display: block;
}

.support-requester span {
  color: var(--ink);
  font-weight: 700;
}

.support-requester strong {
  color: var(--text-muted);
  font-size: .75rem;
  margin-bottom: .15rem;
  text-transform: uppercase;
}

.support-textarea {
  flex: 1 1 auto;
  min-height: 330px;
  resize: vertical;
}

.support-success {
  display: inline-block;
  line-height: 1.35;
  margin-bottom: 1rem;
  max-width: 520px;
  padding: .75rem 1rem;
}

.support-form .mb-3:has(.support-textarea) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.tax-simulation {
  background: #f7fafc;
  border: 1px solid #d9e3ea;
  border-radius: 8px;
  padding: 1rem;
}

.tax-simulation-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.tax-simulation-header > strong {
  color: var(--brand);
  font-size: 1.25rem;
  white-space: nowrap;
}

.tax-simulation-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tax-simulation-card {
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  min-width: 0;
  padding: .75rem;
}

.tax-simulation-card span,
.tax-simulation-card small {
  color: var(--ink-soft);
  display: block;
}

.tax-simulation-card strong {
  color: var(--ink);
  display: block;
  font-size: 1.05rem;
  margin: .2rem 0;
}

.tax-simulation-card-total {
  border-color: rgba(11, 180, 170, .35);
}

.tax-simulation-total-row {
  align-items: baseline;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.tax-simulation-total-row + .tax-simulation-total-row {
  border-top: 1px solid #dfe7ee;
  margin-top: .55rem;
  padding-top: .55rem;
}

.tax-simulation-total-row strong {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .tax-simulation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .tax-simulation-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .tax-simulation-grid {
    grid-template-columns: 1fr;
  }
}

.inline-edit {
  align-items: center;
  display: grid;
  gap: .4rem;
  grid-template-columns: minmax(120px, 1fr) auto;
  max-width: 260px;
}

.parameter-save-button {
  display: none;
}

.parameters-editing .parameter-save-button {
  display: inline-flex;
}

.calculation-parameters-table {
  table-layout: fixed;
}

.calculation-parameters-group-col {
  width: 30%;
}

.calculation-parameters-name-col {
  width: 44%;
}

.calculation-parameters-value-col {
  width: 120px;
}

.calculation-parameters-unit-col {
  width: 56px;
}

.calculation-parameters-table .calculation-parameter-input {
  display: inline-block;
  max-width: 96px;
}

.parameter-value-input[readonly] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--ink);
  padding-left: 0;
}

.parameters-editing .parameter-value-input {
  background: #fff;
  border-color: #cfcfcf;
  padding-left: .5rem;
}

.form-label {
  color: var(--ink-soft);
  font-weight: 700;
}

.form-control,
.form-select {
  border-color: #cfcfcf;
  border-radius: 6px;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
}

.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.login-body {
  background:
    linear-gradient(135deg, rgba(11, 180, 170, .12) 0%, rgba(148, 209, 31, .10) 37%, rgba(247, 248, 250, 1) 37%),
    #f7f8fa;
}

.login-shell {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 166px);
  padding: 2.5rem 1.25rem;
}

.login-panel {
  background: #fff;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(360px, .72fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: 600px;
  overflow: hidden;
  width: 100%;
}

.login-brand {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(233, 251, 249, .92));
  border-right: 1px solid #d4e5f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.25rem 3.4rem;
  position: relative;
}

.login-brand > div {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  text-align: center;
}

.login-brand > span {
  bottom: 2.1rem;
  left: 3.4rem;
  position: absolute;
}

.login-brand h1 {
  color: var(--ink);
  font-size: 4.35rem;
  font-weight: 800;
  line-height: .98;
  margin: 0;
  max-width: 620px;
}

.login-card {
  align-self: center;
  padding: 3rem;
}

.login-logo {
  background: #101010;
  border-radius: 10px;
  display: block;
  margin: 0 auto 2.6rem;
  max-width: 430px;
  padding: .75rem .95rem;
  width: 88%;
}

.login-card .form-control {
  min-height: 48px;
}

@media (max-width: 1000px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .cashflow-manual-grid {
    grid-template-columns: 1fr 1fr;
  }

  .current-account-grid,
  .erp-conciliation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .current-account-action {
    justify-self: start;
  }

  .cashflow-manual-submit {
    justify-content: flex-start;
  }

  .nf-entrada-upload-body {
    grid-template-columns: 1fr;
  }

  .audit-filter {
    grid-template-columns: 1fr;
  }

  .audit-filter-actions {
    justify-content: flex-start;
  }

  .support-fields-row,
  .support-requester {
    grid-template-columns: 1fr;
  }

  .login-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-brand {
    border-bottom: 1px solid #d4e5f0;
    border-right: 0;
    gap: 1.5rem;
    padding: 1.5rem;
    position: static;
  }

  .login-brand > div {
    min-height: auto;
  }

  .login-brand > span {
    position: static;
  }

  .login-brand h1 {
    font-size: 2.55rem;
    max-width: 100%;
  }

  .login-logo {
    margin-bottom: 1.25rem;
    max-width: 300px;
    width: 82%;
  }

  .login-card {
    padding: 1.5rem;
  }
}

/* Corporate visual alignment with the GEO application */
.app-header {
  background: var(--brand-dark);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .14);
}

.app-header .navbar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
  margin-bottom: 0 !important;
  padding-bottom: .7rem;
  padding-top: .7rem;
}

.app-header .brand-logo {
  color: #fff;
  gap: .75rem;
}

.app-header .brand-logo:hover,
.app-header .brand-logo:focus {
  color: #fff;
}

.app-header .brand-logo img {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .18);
}

.app-header .brand-logo span {
  color: #fff;
  font-size: .96rem;
  letter-spacing: 0;
}

.app-header .app-navbar-content {
  justify-content: flex-start;
  margin-left: -11rem;
}

.app-header .app-nav {
  justify-content: flex-start;
  padding-left: 0;
}

.app-header .app-nav-link {
  background: transparent;
  border-color: rgba(255, 255, 255, .12);
  border-radius: 4px;
  color: rgba(255, 255, 255, .84) !important;
  font-size: .72rem;
  min-height: 32px;
  padding: .38rem .5rem !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.app-header .app-nav-link:hover,
.app-header .app-nav-link:focus {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .26);
  color: #fff !important;
  text-decoration: none;
}

.app-header .app-nav-link.active {
  background: #fff;
  border-color: #fff;
  box-shadow: none;
  color: var(--brand-dark) !important;
}

.app-header .app-nav-link.nav-alert,
.app-header .app-nav-link.nav-alert.active {
  background: var(--red);
  border-color: #fda29b;
  box-shadow: 0 0 0 .12rem rgba(180, 35, 24, .24);
  color: #fff !important;
}

.app-header .app-nav-link.nav-alert:hover,
.app-header .app-nav-link.nav-alert:focus {
  background: #d92d20;
  border-color: #fecaca;
  color: #fff !important;
}

.app-header .user-menu,
.app-header .user-name,
.app-header .user-access-meta,
.app-header .user-access-meta strong {
  color: #fff;
}

.app-header .user-menu {
  min-width: 260px;
}

.app-header .user-access-meta {
  color: rgba(255, 255, 255, .78);
}

.app-header .user-access-label {
  color: rgba(255, 255, 255, .7);
  font-size: .68rem;
  text-transform: uppercase;
}

.app-header .btn-outline-secondary {
  border-color: rgba(255, 255, 255, .42);
  color: #fff;
}

.app-header .btn-outline-secondary:hover,
.app-header .btn-outline-secondary:focus {
  background: #fff;
  border-color: #fff;
  color: var(--brand-dark);
}

.app-shell {
  padding-top: 1rem;
}

.btn {
  align-items: center;
  border-radius: 4px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 36px;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn:hover,
.btn:focus {
  box-shadow: 0 0 0 .16rem rgba(11, 180, 170, .12);
}

.btn:disabled,
.btn.disabled {
  box-shadow: none;
}

.btn-primary {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: none;
  color: #fff;
}

.btn-outline-primary {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.content-section,
.metric {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.section-title {
  background: #f8fafc;
}

.login-body {
  background:
    linear-gradient(135deg, rgba(11, 180, 170, .12) 0%, rgba(148, 209, 31, .10) 37%, rgba(247, 248, 250, 1) 37%),
    #f7f8fa;
  margin-bottom: 0;
}

.login-shell {
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.login-panel {
  grid-template-columns: minmax(430px, .95fr) minmax(360px, .78fr);
  max-width: 1120px;
  min-height: 560px;
}

.login-brand {
  padding: 3rem 3.25rem;
}

.login-brand h1 {
  font-size: 3.35rem;
  line-height: 1;
}

.login-logo {
  margin-bottom: 2rem;
  max-width: 360px;
}

.login-card h2 {
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 800;
}

.login-card .btn-primary {
  min-height: 48px;
}

/* Desktop header: access details above, navigation below, logo kept on the lower row. */
@media (min-width: 1001px) {
  .app-header .navbar > .container-fluid {
    align-items: flex-end;
  }

  .app-header .brand-logo {
    align-self: center;
    flex-direction: column;
    gap: .3rem;
    min-width: 148px;
    text-align: center;
  }

  .app-header .brand-logo span {
    line-height: 1.1;
    white-space: nowrap;
  }

  .app-header .app-navbar-content {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .55rem;
    margin-left: 0;
  }

  .app-header .user-menu {
    align-self: flex-end;
    margin-left: 0;
    order: 1;
  }

  .app-header .app-nav {
    flex: 0 0 auto;
    gap: .18rem;
    order: 2;
    width: 100%;
  }

  .app-header .app-nav-link {
    font-size: .68rem;
    min-height: 30px;
    padding: .3rem .38rem !important;
  }
}

@media (max-width: 1000px) {
  .app-header .navbar-collapse {
    padding-top: .75rem;
  }

  .app-header .app-nav {
    align-items: stretch;
    padding-left: 0;
  }

  .app-header .app-nav-end-group {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
    width: 100%;
  }

  .app-header .app-nav-link {
    width: 100%;
  }

  .app-header .user-menu {
    align-items: flex-start;
    flex-direction: column;
    margin-top: .75rem;
  }

  .app-header .user-access-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
  }

  .app-header .user-session-row {
    justify-content: flex-start;
  }

  .cost-center-form-grid {
    grid-template-columns: 1fr;
  }

  .cost-center-active-field {
    padding-bottom: 0;
  }

  .login-shell {
    min-height: 100vh;
    padding: 1rem;
  }

  .login-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-brand h1 {
    font-size: 2.2rem;
  }
}

/* VPN compact login identity */
body.login-body {
  background:
    linear-gradient(135deg, rgba(11, 180, 170, .12) 0%, rgba(148, 209, 31, .10) 37%, rgba(247, 248, 250, 1) 37%),
    #f7f8fa;
  margin-bottom: 0;
  min-height: 100vh;
}

.login-body .login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-body .login-panel {
  background: #fff;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .12);
  display: block;
  margin: 0;
  max-width: 460px;
  min-height: 0;
  overflow: hidden;
  width: min(460px, calc(100vw - 32px));
}

.login-body .login-brand {
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(233, 251, 249, .92));
  border-bottom: 1px solid #d4e5f0;
  border-right: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0;
  padding: 1.75rem 2rem;
  position: static;
  text-align: center;
}

.login-body .login-brand > div {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  text-align: center;
}

.login-body .login-logo {
  background: #101010;
  border-radius: 10px;
  display: block;
  height: auto;
  margin: 0 auto 1.2rem;
  max-width: 300px;
  padding: .5rem .65rem;
  width: 82%;
}

.login-body .login-brand h1 {
  color: var(--ink);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.08;
  margin: 0;
  max-width: 360px;
}

.login-body .login-card {
  background: #fff;
  padding: 2rem;
}

.login-body .login-card h2 {
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 800;
}

.login-body .login-card .form-control {
  border-color: #cbd5e1;
  min-height: 48px;
}

.login-body .login-card .btn-primary {
  background: #126c74;
  border-color: #126c74;
  border-radius: 8px;
  min-height: 48px;
}

@media (max-width: 520px) {
  .login-body .login-brand {
    padding: 1.5rem;
  }

  .login-body .login-brand h1 {
    font-size: 1.75rem;
  }

  .login-body .login-card {
    padding: 1.5rem;
  }
}

/* Contas a pagar/receber: padrão visual comum 0.3. */
.financial-accounts .form-actions {
  flex-wrap: wrap;
}

.financial-accounts .btn {
  border-radius: .65rem;
  min-height: 44px;
}

.financial-accounts .btn-primary {
  background: #126c74;
  border-color: #126c74;
  color: #fff;
}

.financial-accounts .btn-outline-primary {
  background: transparent;
  border-color: #126c74;
  color: #126c74;
}

.financial-accounts .btn-primary:hover,
.financial-accounts .btn-primary:focus,
.financial-accounts .btn-primary:active,
.financial-accounts .btn-outline-primary:hover,
.financial-accounts .btn-outline-primary:focus,
.financial-accounts .btn-outline-primary:active {
  background: #0f5960;
  border-color: #0f5960;
  color: #fff;
}

.financial-accounts .btn:focus-visible {
  box-shadow: 0 0 0 2px #fff;
  outline: 2px solid #126c74;
  outline-offset: 2px;
}
