/**
 * Dashboard CSS
 * Estilos específicos da página Dashboard
 */

/* ==========================
   Cards de Métricas
   ========================== */
.dashboard-metrica-col {
  flex: 0 0 25%;
  max-width: 20%;
}

@media (min-width: 1200px) {
  .dashboard-metrica-col {
    flex: 0 0 25% !important;
    max-width: 20% !important;
  }
}

.dashboard-card-metrica {
  border-radius: 10px;
  background: #FFF;
  box-shadow: 0 2.4px 28px 0 rgba(58, 59, 69, 0.10);
  border-left: 4px solid #41B9A3;
}

.dashboard-card-metrica--alerta {
  border-left-color: #BF5340;
}

.dashboard-metrica-content {
  align-self: stretch;
}

.dashboard-card-title {
  color: #73726F;
  font-family: Nunito, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 16.8px;
  text-transform: uppercase;
}

.dashboard-card-value {
  color: #73726F;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 24px;
}

/* ==========================
   Cabeçalhos dos Cards de Gráficos
   ========================== */
.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-card-title-large {
  display: flex;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  flex: 1 0 0;
  color: var(--color-text-gray-primary, #121212);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.dashboard-link-detalhes {
  color: var(--color-text-brand-primary-primary, #0E8670);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
}

.dashboard-card-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ==========================
   Containers de Gráficos
   ========================== */
.dashboard-grafico-container {
  position: relative;
}

.dashboard-grafico-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  margin-bottom: 20px;
}

.dashboard-grafico-faturamento {
  height: 400px;
  min-width: 100%;
}

.dashboard-grafico-line {
  height: 300px;
  min-width: 100%;
}

.dashboard-legenda-container {
  padding-top: 8px;
}

.dashboard-grafico-donut-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.dashboard-grafico-donut {
  height: 300px;
  width: 100%;
  max-width: 375px;
}

/* ==========================
   Filtros e Campos
   ========================== */
.dashboard-field-hidden,
.col-xl-3.dashboard-field-hidden,
.col-md-4.dashboard-field-hidden {
  display: none !important;
}

.dashboard-btn-icon {
  margin-right: 6px;
  color: #FFFFFF;
}

.dashboard-select-wrapper-inline {
  width: auto;
  min-width: 150px;
}

.dashboard-select-inline {
  display: flex !important;
  padding: 6px 16px !important;
  padding-right: 38px !important;
  align-items: center !important;
  gap: 10px !important;
  border-radius: 10px !important;
  border: 1px solid #D1D3E2 !important;
  background: var(--color-gray-0, #FFF) !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  width: 100% !important;
  font-size: 0.875rem !important;
}

/* ==========================
   Labels e Formulários
   ========================== */
.filter-label {
  align-self: stretch;
  color: var(--color-text-gray-secundary, #73726F);
  font-size: var(--fontSize-xs, 16px);
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
}

.button-alignment {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.button-alignment .row {
  width: 100%;
  margin: 0;
}

.button-alignment .col-xl-12 {
  padding: 0;
}

#form-filtros-dashboard .row {
  display: flex;
  align-items: stretch;
}

#form-filtros-dashboard .row > div {
  display: flex;
  flex-direction: column;
}

#form-filtros-dashboard .form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-bottom: 0;
}

#form-filtros-dashboard .row > div:last-child .button-alignment {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.button-alignment .btn {
  width: 138px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px !important;
  font-size: 0.875rem;
  gap: 6px;
}

#card-filtro-dashboard {
  background-color: #FFFFFF !important;
}

#card-filtro-dashboard .card-header {
  background-color: #FFFFFF !important;
  border-bottom: 1px solid #e3e6f0 !important;
}

#card-filtro-dashboard .card-body {
  background-color: #FFFFFF !important;
}

#card-filtro-notificacoes {
  background-color: #FFFFFF !important;
}

#card-filtro-notificacoes .card-header {
  background-color: #FFFFFF !important;
  border-bottom: 1px solid #e3e6f0 !important;
}

#card-filtro-notificacoes .card-body {
  background-color: #FFFFFF !important;
}

#status.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

#tipo_periodo.form-control {
  display: flex !important;
  padding: 6px 16px !important;
  padding-right: 38px !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 0 0 !important;
  border-radius: 10px !important;
  border: 1px solid #D1D3E2 !important;
  background: var(--color-gray-0, #FFF) !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  width: 100% !important;
}

.select-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #858796;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
}

.mat-date-range-input {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 0 0 !important;
  width: 100% !important;
}

.form-control.date-range-picker {
  display: flex !important;
  padding: 6px 16px !important;
  padding-right: 38px !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 0 0 !important;
  border-radius: 10px !important;
  border: 1px solid #D1D3E2 !important;
  background: var(--color-gray-0, #FFF) !important;
  height: 37px !important;
  min-height: 37px !important;
  max-height: 37px !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  color: #6e707e !important;
  transition: all 0.15s ease-in-out;
  width: 100% !important;
}

.form-control.date-range-picker:hover {
  border-color: #5a5c69 !important;
}

.form-control.date-range-picker:focus {
  border-color: #5a5c69 !important;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25) !important;
  outline: none !important;
}

.date-range-picker::placeholder {
  color: #858796 !important;
  font-size: 0.875rem;
}

.date-range-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #858796;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
}

.date-range-picker.has-value {
  color: #5a5c69 !important;
  font-weight: 500;
}

.date-range-modal {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d1d3e2;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 16px;
  margin-top: 4px;
  display: none;
}

.date-range-modal.show {
  display: block;
}

.date-inputs-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5a5c69;
  margin: 0;
}

.date-inputs-column input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #d1d3e2;
  border-radius: 4px;
  font-size: 0.875rem;
  width: 100%;
}

.modal-buttons {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ==========================
   Estilos dos Gráficos
   ========================== */
#grafico-faturamento svg g text {
  text-anchor: middle;
}

#grafico-faturamento svg g[clip-path] text {
  text-anchor: end;
}

#grafico-faturamento-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

#grafico-faturamento-wrapper::-webkit-scrollbar {
  height: 8px;
}

#grafico-faturamento-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#grafico-faturamento-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#grafico-faturamento-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#filtro-status-consultas-periodo {
  cursor: pointer;
}

#grafico-consultas-periodo-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

#grafico-consultas-periodo-wrapper::-webkit-scrollbar {
  height: 8px;
}

#grafico-consultas-periodo-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#grafico-consultas-periodo-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#grafico-consultas-periodo-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#grafico-faturamento .google-visualization-tooltip {
  max-width: none !important;
  white-space: nowrap;
}

