.dashboard-icon-button,
.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
}

.dashboard-icon-button:hover,
.btn-search:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 246px;
  min-width: 0;
  flex: 0 0 246px;
}

.search-wrap input {
  width: 200px;
  min-width: 200px;
  min-height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text-primary);
  font: inherit;
}

.search-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 111, 120, 0.12);
  outline: 0;
}

.dashboard-finance-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
}

.dashboard-finance-context > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-finance-context strong {
  color: var(--text-primary);
  text-transform: capitalize;
}

.dashboard-finance-context a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: var(--brand-strong);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-status-badge[data-status="revisado"] {
  background: #fff7df;
  color: #8a5a12;
}

.dashboard-status-badge[data-status="pago"] {
  background: #edf8e7;
  color: #326811;
}

.dashboard-status-badge[data-status="fechado"] {
  background: #f1efff;
  color: #473b8f;
}

.dashboard-status-badge[data-status="erro"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-metrics .tile {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-left: 4px solid #8a9aa5;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.dashboard-metrics .tile:nth-child(1),
.dashboard-metrics .tile:nth-child(4) {
  border-left-color: var(--brand);
}

.dashboard-metrics .tile:nth-child(2),
.dashboard-metrics .tile:nth-child(5) {
  border-left-color: #7aa834;
}

.dashboard-metrics .tile:nth-child(3),
.dashboard-metrics .tile:nth-child(6) {
  border-left-color: #6554c0;
}

.dashboard-metrics .tile:hover {
  transform: none;
  box-shadow: 0 8px 22px rgba(31, 55, 68, 0.06);
}

.dashboard-metrics .tile-title {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-metrics .tile-value {
  margin-top: 10px;
  color: var(--text-primary);
  font-size: 1.55rem;
}

.dashboard-metrics .tile-value.negative {
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-grid .panel-right {
  grid-column: 1 / -1;
}

.dashboard-grid .dashboard-chart-card {
  grid-column: auto;
  max-height: none;
}

.dashboard-grid .card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.dashboard-grid h2,
.dashboard-grid h3 {
  margin: 0 0 12px;
  color: var(--text-primary);
}

.dashboard-grid h2 {
  font-size: 1rem;
}

.dashboard-grid h3 {
  margin-top: 18px;
  font-size: 0.9rem;
}

#chartCadastros,
#chartAtendimentos,
#chartModalidades,
#chartProfissionais {
  width: 100% !important;
  height: 290px !important;
}

.lista-alunos li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fbfdfd;
}

.lista-alunos li > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lista-alunos li strong {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.lista-alunos li small {
  color: var(--text-muted);
}

.dashboard-row-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
}

.dashboard-empty {
  display: block !important;
  color: var(--text-secondary);
  text-align: center;
}

.dashboard-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-quick-actions .botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
}

@media (max-width: 1120px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .dashboard-finance-context,
  .search-wrap {
    align-items: stretch;
  }

  .dashboard-finance-context {
    flex-direction: column;
  }

  .search-wrap,
  .search-wrap input {
    width: 100%;
  }

  .search-wrap {
    flex-basis: 100%;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}
