:root {
  --vh-bg: #fbf7f8;
  --vh-surface: rgba(255, 255, 255, 0.92);
  --vh-surface-soft: #f4ecef;
  --vh-text: #3f3338;
  --vh-text-soft: #837077;
  --vh-primary: #5b3050;
  --vh-primary-strong: #43213c;
  --vh-accent: #b58a98;
  --vh-accent-soft: rgba(181, 138, 152, 0.18);
  --vh-border: rgba(91, 48, 80, 0.11);
  --vh-shadow: 0 20px 48px rgba(67, 33, 60, 0.07);
  --vh-shadow-soft: 0 10px 26px rgba(67, 33, 60, 0.05);
  --vh-radius-lg: 30px;
  --vh-radius-md: 24px;
  --vh-radius-sm: 18px;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--vh-text);
  background:
    radial-gradient(circle at top left, rgba(181, 138, 152, 0.12), transparent 30%),
    linear-gradient(180deg, #fdfbfb 0%, #f6eff2 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-heading,
.header-title,
.card-header-title,
.navbar-brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.03em;
}

a {
  color: var(--vh-primary);
}

a:hover {
  color: var(--vh-primary-strong);
}

.main-content,
.container-fluid {
  background: transparent;
}

.main-content > .container-fluid {
  padding-left: 0.35rem;
  padding-right: 2rem;
  padding-bottom: 2rem;
}

.navbar-vertical {
  background: linear-gradient(180deg, #5b3050 0%, #43213c 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 10px 0 28px rgba(67, 33, 60, 0.12);
  padding: 1rem 0.9rem 0;
}

@media (min-width: 768px) {
  .navbar-vertical.fixed-left {
    width: 15rem;
    max-width: 15rem;
  }

  .main-content {
    margin-left: 15rem;
  }
}

.navbar-vertical .navbar-brand {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.navbar-brand {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  padding: 0.9rem 1rem;
  box-shadow: 0 10px 24px rgba(67, 33, 60, 0.18);
  margin: 0 0.4rem 0.6rem;
}

.navbar-brand-img,
.vh-logo {
  width: 100%;
  max-width: 170px;
  max-height: none;
}

.navbar-light .navbar-nav .nav-link,
.navbar-heading,
.navbar-user-link,
#topnav .navbar-nav .nav-link {
  color: rgba(255, 248, 250, 0.92) !important;
}

.navbar-nav .nav-item {
  margin-bottom: 0.38rem;
}

.navbar-light .navbar-nav .nav-link {
  border-radius: 18px;
  padding: 1rem 1.05rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active,
#topnav .navbar-nav .nav-link:hover {
  color: #fff8fa !important;
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.navbar-divider {
  border-top-color: rgba(255, 255, 255, 0.20);
  margin: 1.2rem 0.35rem;
}

.vh-top-user {
  position: fixed !important;
  top: 1rem !important;
  right: 1rem !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  background: rgba(91, 48, 80, 0.94);
  box-shadow: 0 12px 28px rgba(67, 33, 60, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.vh-top-user .dropdown-toggle,
.vh-top-user .navbar-user-link {
  display: inline-flex !important;
}

.vh-top-user .dropdown-toggle,
.vh-top-user .navbar-user-link {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(67, 33, 60, 0.13);
  border: 1px solid rgba(91, 48, 80, 0.11);
}

.vh-top-user .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--vh-primary-strong);
}

.vh-top-user .dropdown-toggle {
  width: auto;
  padding: 0 0.9rem 0 0.25rem;
  gap: 0.7rem;
}

.vh-top-user-bell-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.vh-top-user-avatar,
.vh-top-user-avatar .avatar-img {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  display: block !important;
  object-fit: cover;
  overflow: hidden;
}

.vh-top-user-text {
  display: inline-flex;
  align-items: center;
  color: #fff8fa;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .vh-top-user {
    display: none;
  }
}

#topnav {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(67, 33, 60, 0.09);
}

.header {
  background: linear-gradient(135deg, #5b3050 0%, #704557 50%, #43213c 100%);
  margin-bottom: 1.8rem;
  border-top-left-radius: 40px;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  overflow: hidden;
}

.header-body {
  border-bottom: 0;
  padding: 2rem 2rem;
  position: relative;
}

.vh-top-user {
  display: none !important;
}

.header-user-quick {
  display: flex !important;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
  margin: 1.15rem 0 0.9rem;
  padding-right: 0.2rem;
}

.header-user-quick-bell,
.header-user-quick-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--vh-primary-strong) !important;
  box-shadow: 0 10px 24px rgba(67, 33, 60, 0.13);
  border: 1px solid rgba(91, 48, 80, 0.11);
}

.header-user-quick-bell {
  width: 48px;
  min-width: 48px;
  font-size: 1.25rem;
}

.header-user-quick-account {
  gap: 0.7rem;
  padding: 0.25rem 0.95rem 0.25rem 0.3rem;
  font-weight: 600;
  white-space: nowrap;
}

.header-user-quick-avatar {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  overflow: hidden;
}

.header-pretitle {
  color: rgba(255, 248, 250, 0.76);
  letter-spacing: 0.22em;
  font-size: 0.82rem;
}

.header-title {
  color: #fff8fa;
  font-size: 2.35rem;
  line-height: 1.06;
  margin-bottom: 0.25rem;
}

.row {
  margin-bottom: 0.45rem;
}

.card,
.modal-content,
.dropdown-menu {
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  box-shadow: var(--vh-shadow);
  border-radius: var(--vh-radius-md);
}

.card-header,
.dropdown-divider {
  border-color: rgba(91, 48, 80, 0.08);
}

.card-header {
  background: rgba(253, 250, 255, 0.84);
  border-top-left-radius: var(--vh-radius-md) !important;
  border-top-right-radius: var(--vh-radius-md) !important;
  padding: 1.45rem 1.8rem;
}

.card-body {
  padding: 1.45rem 1.4rem;
}

.card .row.align-items-center {
  row-gap: 0.85rem;
}

.card-title,
.text-muted,
.form-text,
.table thead th {
  color: var(--vh-text-soft) !important;
}

.h2,
.h3,
.h4,
.h5,
.h6,
.card-header-title,
.table-nowrap td,
.table-nowrap th {
  color: var(--vh-text);
}

.badge-soft-primary,
.badge-soft-secondary {
  background: var(--vh-accent-soft);
  color: var(--vh-primary-strong);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
}

.badge-soft-success {
  background: rgba(52, 168, 83, 0.14);
  color: #23753a;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
}

.badge {
  margin-left: 0.6rem;
}

.btn {
  min-height: 48px;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--vh-primary);
  border-color: var(--vh-primary);
  color: #fff8fa;
  box-shadow: none;
  border-radius: 999px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.btn-white,
.btn-outline-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(91, 48, 80, 0.14);
  color: var(--vh-primary-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  line-height: 1.1;
  text-align: center;
}

.btn-white:hover,
.btn-outline-primary:hover {
  background: var(--vh-surface-soft);
  color: var(--vh-primary-strong);
}

.nav-tabs {
  gap: 0.5rem;
  border-bottom: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-tabs .nav-link {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.75rem 1.2rem;
  line-height: 1.2;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--vh-primary-strong);
  border-bottom-color: transparent;
  background: rgba(181, 138, 152, 0.18);
}

.nav-tabs .nav-link:hover {
  color: var(--vh-primary-strong);
  background: rgba(181, 138, 152, 0.14);
}

.card-header-tabs {
  margin-top: 0.25rem;
  margin-bottom: 0.15rem;
}

.form-control,
.custom-select,
.select2-container--default .select2-selection--single,
.input-group-text {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(91, 48, 80, 0.14);
  color: var(--vh-text);
  border-radius: 18px;
  min-height: 58px;
}

.form-control,
.custom-select {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.form-control:focus,
.custom-select:focus {
  border-color: rgba(91, 48, 80, 0.34);
  box-shadow: 0 0 0 0.2rem rgba(91, 48, 80, 0.11);
}

.input-group > .form-control:not(:last-child) {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.input-group-append .input-group-text,
.input-group-prepend .input-group-text {
  border-radius: 18px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.table {
  border-collapse: separate;
  border-spacing: 0 0.6rem;
}

.table-responsive {
  padding: 0.95rem 1rem 1rem;
}

.table thead th {
  background: #f5edf0;
  border-top: 0;
  padding: 1.12rem 1.15rem;
}

.table td,
.table th {
  border-top-color: rgba(91, 48, 80, 0.06);
}

.table tbody td {
  background: rgba(255, 255, 255, 0.78);
  padding: 1.18rem 1.15rem;
}

.table thead th:first-child,
.table tbody td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.table thead th:last-child,
.table tbody td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.usuarios-table {
  table-layout: auto;
}

.usuarios-table th,
.usuarios-table td {
  white-space: normal;
  vertical-align: middle;
}

.usuarios-col-nome,
.usuarios-col-email {
  min-width: 180px;
}

.usuarios-col-perfil {
  min-width: 140px;
}

.usuarios-col-status {
  min-width: 110px;
}

.usuarios-col-permissoes {
  min-width: 180px;
  max-width: 220px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.usuarios-col-ultimo-login {
  min-width: 130px;
  white-space: nowrap;
}

.usuarios-col-acoes {
  min-width: 120px;
  white-space: nowrap;
}

.usuarios-col-acoes .btn {
  min-width: 64px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.usuarios-col-email,
.usuarios-col-permissoes {
  overflow-wrap: anywhere;
}

@media (max-width: 1400px) {
  .usuarios-col-nome,
  .usuarios-col-email,
  .usuarios-col-permissoes {
    min-width: 150px;
  }

  .usuarios-col-perfil {
    min-width: 120px;
  }

  .usuarios-col-ultimo-login {
    min-width: 118px;
    font-size: 0.92rem;
  }

  .usuarios-col-acoes {
    min-width: 108px;
  }

  .usuarios-col-acoes .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    font-size: 0.9rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}

@media (max-width: 1200px) {
  .usuarios-col-acoes .btn {
    display: block;
    width: 100%;
  }

  .usuarios-col-acoes .btn + .btn {
    margin-top: 0.45rem;
    margin-left: 0 !important;
  }
}

.chart {
  padding: 0.4rem 0.55rem 0.15rem;
}

canvas.chart-canvas {
  border-radius: 20px;
}

.dropdown-menu {
  padding: 0.7rem;
}

.dropdown-item {
  border-radius: 12px;
}

.dropdown-item:hover {
  background: rgba(181, 138, 152, 0.16);
  color: var(--vh-primary-strong);
}

.header-pretitle,
.card-title,
.navbar-heading {
  font-size: 0.88rem;
}

.card-header .col-auto {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.card-header .text-muted {
  margin-right: 0.65rem;
}

.custom-checkbox-toggle .custom-control-label::before,
.custom-switch .custom-control-label::before {
  background-color: #e8edf4;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--vh-primary) !important;
  border-color: var(--vh-primary) !important;
}

.bg-auth {
  background:
    linear-gradient(rgba(67, 33, 60, 0.78), rgba(67, 33, 60, 0.72)),
    radial-gradient(circle at top, rgba(181, 138, 152, 0.22), transparent 40%),
    #f6eff2 !important;
}

.border-top.border-top-2.border-primary {
  border-top-color: var(--vh-accent) !important;
}

.auth-card,
.vh-auth-brand {
  text-align: center;
}

.vh-auth-brand {
  margin-bottom: 1.5rem;
}

.vh-auth-brand img {
  width: min(100%, 260px);
  height: auto;
}

.vh-auth-subtitle {
  color: rgba(255, 248, 250, 0.84) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.col-12.col-md-5.col-xl-4.my-5 {
  max-width: 520px;
}

.col-12.col-md-5.col-xl-4.my-5 > *:not(.alert) {
  background: rgba(253, 250, 255, 0.96);
  border: 1px solid rgba(181, 138, 152, 0.24);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(67, 33, 60, 0.18);
}

.col-12.col-md-5.col-xl-4.my-5 > h1,
.col-12.col-md-5.col-xl-4.my-5 > p,
.col-12.col-md-5.col-xl-4.my-5 > form,
.col-12.col-md-5.col-xl-4.my-5 > .text-center {
  margin-bottom: 0 !important;
}

.col-12.col-md-5.col-xl-4.my-5 > h1 {
  padding: 2rem 2.5rem 0.75rem;
  border-radius: 22px 22px 0 0;
  border-bottom: 0;
}

.col-12.col-md-5.col-xl-4.my-5 > p {
  padding: 0 2.5rem 1.5rem;
  border-top: 0;
  border-bottom: 0;
}

.col-12.col-md-5.col-xl-4.my-5 > p.vh-auth-subtitle {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.35rem 0 1.35rem;
}

.col-12.col-md-5.col-xl-4.my-5 > form {
  padding: 1.2rem 3.2rem 2rem;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.col-12.col-md-5.col-xl-4.my-5 > .text-center:last-child,
.col-12.col-md-5.col-xl-4.my-5 > form + .text-center {
  padding: 0 3.2rem 2rem;
  border-top: 0;
  border-radius: 0 0 22px 22px;
}

.avatar,
.avatar img,
.custom-control-label::before,
.custom-control-label::after {
  border-radius: 999px !important;
}

.custom-switch .custom-control-label::before,
.custom-checkbox-toggle .custom-control-label::before {
  border-radius: 999px !important;
}

.container-fluid > .row > [class*="col-"] > .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.container-fluid > .row > [class*="col-"] > .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(67, 33, 60, 0.09);
}

@media (max-width: 767.98px) {
  .navbar-brand-img,
  .vh-logo {
    max-width: 180px;
  }

  .navbar-vertical {
    padding-left: 0;
    padding-right: 0;
  }

  .main-content > .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }

  .col-12.col-md-5.col-xl-4.my-5 > h1,
  .col-12.col-md-5.col-xl-4.my-5 > p,
  .col-12.col-md-5.col-xl-4.my-5 > form,
  .col-12.col-md-5.col-xl-4.my-5 > .text-center:last-child,
  .col-12.col-md-5.col-xl-4.my-5 > form + .text-center {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.dashboard-hero-text {
  max-width: 560px;
  color: rgba(255, 248, 250, 0.88);
  font-size: 0.95rem;
  line-height: 1.55;
}

.dashboard-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff8fa;
  font-size: 0.9rem;
}

.dashboard-year-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 220px;
  background: rgba(253, 250, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 0.85rem;
  backdrop-filter: blur(6px);
}

.dashboard-year-card .header-pretitle {
  margin-bottom: 0 !important;
  text-align: left !important;
  color: rgba(255, 248, 250, 0.82);
}

.dashboard-year-card label {
  display: block;
  margin: 0;
}

.dashboard-year-select {
  width: 100%;
  min-width: 0;
  padding-right: 3rem;
  font-weight: 600;
}

.dashboard-year-select,
.dashboard-year-select:focus {
  background-color: rgba(255, 255, 255, 0.98);
}

.dashboard-kpi-card,
.dashboard-chart-card,
.dashboard-priority-card,
.dashboard-list-card {
  height: 100%;
}

.dashboard-kpi-label,
.dashboard-alert-label {
  display: block;
  color: var(--vh-text-soft);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-kpi-value,
.dashboard-alert-value {
  display: block;
  margin-top: 0.5rem;
  color: var(--vh-text);
  font-size: 1.15rem;
  line-height: 1.15;
}

.dashboard-kpi-foot {
  display: block;
  margin-top: 0.55rem;
  color: var(--vh-text-soft);
  font-size: 0.84rem;
}

.dashboard-priority-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1rem;
}

.dashboard-priority-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(91, 48, 80, 0.08);
}

.dashboard-priority-item:last-child {
  border-bottom: 0;
}

.dashboard-priority-title {
  display: block;
  font-size: 0.98rem;
  color: var(--vh-text);
}

.dashboard-priority-meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--vh-text-soft);
  font-size: 0.84rem;
}

.dashboard-priority-value {
  display: block;
  margin-top: 0.35rem;
  color: var(--vh-text);
  font-weight: 700;
  font-size: 0.95rem;
}

.dashboard-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-status-badge.is-warning {
  background: rgba(181, 138, 152, 0.18);
  color: var(--vh-primary-strong);
}

.dashboard-status-badge.is-danger {
  background: rgba(201, 96, 96, 0.14);
  color: #9a4951;
}

.dashboard-empty-state {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem 0 0.5rem;
}

.dashboard-inline-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-inline-stat {
  border: 1px solid rgba(91, 48, 80, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  padding: 0.8rem 0.9rem;
}

.dashboard-inline-stat-label {
  display: block;
  color: var(--vh-text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  word-break: keep-all;
}

.dashboard-inline-stat-value {
  display: block;
  margin-top: 0.35rem;
  color: var(--vh-text);
  font-size: 1.15rem;
  line-height: 1.1;
}

.dashboard-priority-card .card-header .row {
  row-gap: 0.9rem;
}

.dashboard-priority-card .btn {
  white-space: nowrap;
  min-width: 13rem;
}

.dashboard-chart-card .chart,
.card .chart {
  min-height: 320px;
}

.consulta-toolbar {
  gap: 0.9rem;
}

.consulta-toolbar-action {
  white-space: nowrap;
}

.consulta-card {
  min-height: 100%;
}

.consulta-header {
  margin-bottom: 1.5rem;
}

.consulta-header-row {
  row-gap: 1rem;
}

.consulta-header .header-body {
  padding-bottom: 1.6rem;
}

.consulta-header .header-title {
  margin-bottom: 0.65rem;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.consulta-header-text {
  max-width: 40rem;
}

.consulta-faturamento-card .card-header {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.consulta-cliente-card .card-header {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.consulta-faturamento-table {
  table-layout: auto;
  width: 100%;
}

.consulta-cliente-table {
  table-layout: fixed;
}

.consulta-faturamento-table th,
.consulta-faturamento-table td {
  white-space: normal;
  vertical-align: middle;
}

.consulta-cliente-table th,
.consulta-cliente-table td {
  white-space: normal;
  vertical-align: middle;
}

.consulta-faturamento-table th:nth-child(1),
.consulta-faturamento-table td:nth-child(1) {
  min-width: 9rem;
}

.consulta-faturamento-table th:nth-child(2),
.consulta-faturamento-table td:nth-child(2) {
  width: 30%;
  min-width: 18rem;
}

.consulta-faturamento-table th:nth-child(3),
.consulta-faturamento-table td:nth-child(3) {
  min-width: 8.5rem;
}

.consulta-faturamento-table th:nth-child(4),
.consulta-faturamento-table td:nth-child(4) {
  min-width: 8.5rem;
}

.consulta-faturamento-table th:nth-child(5),
.consulta-faturamento-table td:nth-child(5),
.consulta-faturamento-table th:nth-child(6),
.consulta-faturamento-table td:nth-child(6) {
  min-width: 8rem;
}

.consulta-faturamento-table th:nth-child(7),
.consulta-faturamento-table td:nth-child(7) {
  min-width: 6rem;
  width: 6rem;
}

.consulta-faturamento-cliente {
  line-height: 1.45;
  word-break: break-word;
}

.consulta-faturamento-valor,
.consulta-faturamento-data,
.consulta-faturamento-parcela,
.consulta-faturamento-acoes {
  white-space: nowrap !important;
}

.consulta-faturamento-boleto {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-size: 0.95rem;
}

.consulta-faturamento-parcela {
  white-space: nowrap !important;
}

.consulta-cliente-table th:nth-child(1),
.consulta-cliente-table td:nth-child(1) {
  width: 9.5rem;
}

.consulta-cliente-table th:nth-child(2),
.consulta-cliente-table td:nth-child(2) {
  width: 11rem;
}

.consulta-cliente-table th:nth-child(3),
.consulta-cliente-table td:nth-child(3) {
  width: 19%;
}

.consulta-cliente-table th:nth-child(4),
.consulta-cliente-table td:nth-child(4),
.consulta-cliente-table th:nth-child(5),
.consulta-cliente-table td:nth-child(5) {
  width: 9.5rem;
}

.consulta-cliente-table th:nth-child(6),
.consulta-cliente-table td:nth-child(6) {
  width: 18%;
}

.consulta-cliente-table th:nth-child(7),
.consulta-cliente-table td:nth-child(7) {
  width: 22%;
}

.consulta-cliente-table th:nth-child(8),
.consulta-cliente-table td:nth-child(8) {
  width: 4rem;
}

.consulta-cliente-documento,
.consulta-cliente-contato,
.consulta-cliente-acoes {
  white-space: nowrap !important;
}

.consulta-cliente-nome,
.consulta-cliente-email,
.consulta-cliente-endereco {
  line-height: 1.4;
  word-break: break-word;
}

.consulta-cliente-email,
.consulta-cliente-endereco {
  font-size: 0.96rem;
}

.clientes-previdenciarios-table {
  table-layout: fixed;
}

.clientes-previdenciarios-table th:nth-child(1),
.clientes-previdenciarios-table td:nth-child(1) {
  width: 8.5rem;
}

.clientes-previdenciarios-table th:nth-child(2),
.clientes-previdenciarios-table td:nth-child(2) {
  width: 10rem;
}

.clientes-previdenciarios-table th:nth-child(3),
.clientes-previdenciarios-table td:nth-child(3) {
  width: 28%;
}

.clientes-previdenciarios-table th:nth-child(4),
.clientes-previdenciarios-table td:nth-child(4) {
  width: 24%;
}

.clientes-previdenciarios-table th:nth-child(5),
.clientes-previdenciarios-table td:nth-child(5) {
  width: 14rem;
}

.clientes-previdenciarios-table th:nth-child(6),
.clientes-previdenciarios-table td:nth-child(6) {
  width: 4.5rem;
}

.clientes-previdenciarios-table .orders-beneficio,
.clientes-previdenciarios-table .consulta-cliente-contato {
  line-height: 1.35;
}

.clientes-previdenciarios-table .orders-beneficio,
.clientes-previdenciarios-table .consulta-cliente-nome {
  overflow-wrap: anywhere;
}

.consulta-faturamento-acoes {
  width: 6rem;
  min-width: 6rem;
  text-align: right;
}

.consulta-faturamento-table th:last-child,
.consulta-faturamento-table td:last-child {
  min-width: 6rem;
}

.consulta-faturamento-acoes-head {
  white-space: nowrap !important;
  word-break: keep-all;
}

.consulta-status-badge {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.25rem;
  padding: 0.42rem 0.8rem;
}

.consulta-faturamento-table.boletos-inter-table {
  table-layout: fixed;
}

.boletos-inter-table th,
.boletos-inter-table td {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.boletos-inter-table th:nth-child(1),
.boletos-inter-table td:nth-child(1) {
  width: 3rem;
  min-width: 3rem;
}

.boletos-inter-table th:nth-child(2),
.boletos-inter-table td:nth-child(2) {
  width: 8.5rem;
  min-width: 8.5rem;
}

.boletos-inter-table th:nth-child(3),
.boletos-inter-table td:nth-child(3) {
  width: 20%;
  min-width: 11rem;
}

.boletos-inter-table th:nth-child(4),
.boletos-inter-table td:nth-child(4) {
  width: 7rem;
  min-width: 7rem;
}

.boletos-inter-table th:nth-child(5),
.boletos-inter-table td:nth-child(5) {
  width: 7.5rem;
  min-width: 7.5rem;
}

.boletos-inter-table th:nth-child(6),
.boletos-inter-table td:nth-child(6) {
  width: 5.75rem;
  min-width: 5.75rem;
}

.boletos-inter-table th:nth-child(7),
.boletos-inter-table td:nth-child(7) {
  width: 8rem;
  min-width: 8rem;
}

.boletos-inter-table th:nth-child(8),
.boletos-inter-table td:nth-child(8) {
  width: 8rem;
  min-width: 8rem;
}

.boletos-inter-table th:nth-child(9),
.boletos-inter-table td:nth-child(9) {
  width: 4.25rem;
  min-width: 4.25rem;
}

.boletos-inter-table .consulta-status-badge {
  min-width: 6.9rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.boletos-inter-table .boleto-cliente,
.boletos-inter-table .boleto-numero,
.boletos-inter-table .boleto-codigo {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.boletos-inter-table .boleto-valor,
.boletos-inter-table .boleto-vencimento,
.boletos-inter-table .boleto-parcela,
.boletos-inter-table .boleto-acoes {
  white-space: nowrap !important;
}

.boletos-inter-table .boleto-codigo span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boletos-inter-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.boletos-inter-loading {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1080;
  display: none;
}

.boletos-inter-loading.is-visible {
  display: block;
}

.boletos-inter-loading-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(91, 48, 80, 0.18);
  border-radius: 999px;
  color: var(--vh-primary-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(48, 26, 43, 0.16);
  font-weight: 700;
}

.boletos-inter-loading-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(91, 48, 80, 0.2);
  border-top-color: var(--vh-primary-strong);
  border-radius: 50%;
  animation: boletosInterSpin 0.8s linear infinite;
}

@keyframes boletosInterSpin {
  to {
    transform: rotate(360deg);
  }
}

.badge-soft-warning,
.badge-soft-danger,
.badge-soft-info,
.badge-soft-dark {
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
}

.badge-soft-warning {
  background: rgba(244, 180, 0, 0.16);
  color: #9c6a00;
}

.badge-soft-danger {
  background: rgba(217, 48, 37, 0.14);
  color: #b3261e;
}

.badge-soft-info {
  background: rgba(121, 115, 161, 0.12);
  color: #6f6798;
}

.badge-soft-secondary {
  background: rgba(93, 110, 130, 0.12);
  color: #4f5e70;
}

.badge-soft-dark {
  background: rgba(86, 72, 72, 0.12);
  color: #5c4b4b;
}

.consulta-recebimento-table td {
  vertical-align: middle;
}

.consulta-recebimento-forma {
  min-width: 8.5rem;
}

.consulta-recebimento-month-card .table td,
.consulta-recebimento-month-card .table th {
  white-space: nowrap;
}

.consulta-recebimento-month-card tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}

.consulta-recebimento-month-card tbody tr:hover {
  background: rgba(91, 48, 80, 0.08);
}

.consulta-planilha-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.consulta-planilha-row-link:hover,
.consulta-planilha-row-link:focus {
  color: inherit;
  text-decoration: none;
}

.consulta-planilha-card .card-body {
  padding-top: 1.1rem;
}

.consulta-planilha-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 0.75rem;
}

.consulta-planilha-tab {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(253, 250, 255, 0.9);
  border: 1px solid rgba(91, 48, 80, 0.12);
  box-shadow: var(--vh-shadow-soft);
  text-decoration: none;
  min-height: 104px;
}

.consulta-planilha-tab strong {
  color: var(--vh-text);
  font-size: 1rem;
}

.consulta-planilha-tab span,
.consulta-planilha-tab small {
  color: var(--vh-text-soft);
}

.consulta-planilha-tab.is-active {
  background: linear-gradient(135deg, rgba(91, 48, 80, 0.14), rgba(181, 138, 152, 0.20));
  border-color: rgba(91, 48, 80, 0.28);
  transform: translateY(-1px);
}

.consulta-planilha-summary-card .card-body {
  padding: 1.2rem;
}

.consulta-planilha-kpi-card {
  height: auto;
}

.consulta-planilha-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.consulta-planilha-summary-item {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(253, 250, 255, 0.92);
  border: 1px solid rgba(91, 48, 80, 0.10);
}

.consulta-planilha-summary-item span {
  display: block;
  color: var(--vh-text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.consulta-planilha-summary-item strong {
  color: var(--vh-text);
  font-size: 1.22rem;
  line-height: 1.2;
}

.consulta-planilha-summary-item.is-highlight {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(91, 48, 80, 0.14), rgba(181, 138, 152, 0.22));
}

.consulta-planilha-dizimo-card .card-body {
  padding: 1.15rem;
}

.consulta-dizimo-grid {
  display: grid;
  gap: 0.55rem;
}

.consulta-dizimo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(253, 250, 255, 0.9);
  border: 1px solid rgba(91, 48, 80, 0.10);
}

.consulta-dizimo-row span {
  color: var(--vh-text);
  font-weight: 600;
}

.consulta-dizimo-row strong {
  font-size: 1.15rem;
}

.consulta-dizimo-row.is-blue {
  background: rgba(168, 194, 245, 0.38);
}

.consulta-dizimo-row.is-strong {
  background: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.consulta-dizimo-row.is-purple {
  background: rgba(170, 94, 135, 0.12);
}

.consulta-dizimo-input {
  max-width: 11rem;
  min-height: 48px;
  text-align: right;
}

.consulta-planilha-row-active td {
  background: rgba(91, 48, 80, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(91, 48, 80, 0.18),
    inset 0 -1px 0 rgba(91, 48, 80, 0.18);
}

.consulta-planilha-row-active .consulta-planilha-row-link {
  font-weight: 700;
}

.consulta-planilha-row-active .consulta-planilha-row-link strong {
  color: var(--vh-primary-strong);
}

@media (max-width: 1199.98px) {
  .dashboard-year-card {
    margin-top: 1rem;
  }

  .consulta-faturamento-table {
    table-layout: auto;
  }

  .consulta-cliente-table {
    table-layout: auto;
  }
}

@media (max-width: 767.98px) {
  .dashboard-inline-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-priority-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-title {
    font-size: 1.95rem;
  }

  .card-body {
    padding: 1.2rem 1.1rem;
  }

  .dashboard-chart-card .chart,
  .card .chart {
    min-height: 240px;
  }

  .consulta-header .header-title {
    font-size: 2rem;
  }

  .consulta-header .btn {
    width: 100%;
  }

  .consulta-planilha-summary-grid {
    grid-template-columns: 1fr;
  }

  .consulta-planilha-summary-item.is-highlight {
    grid-column: auto;
  }
}
