/* Mobile-first responsive layer for Dash Comercial */

html {
  -webkit-text-size-adjust: 100%;
}

body.mobile-scroll {
  overflow: auto;
}

.tv-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.tv-main {
  overflow: hidden;
}

.page {
  padding: 1rem;
  min-height: 0;
}

.page-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.page-title-wrap h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.1;
}

.page-title-wrap p {
  font-size: 0.875rem;
}

.page-badge,
.page-filters {
  align-self: flex-start;
}

.indicator-value {
  font-size: clamp(1.5rem, 6vw, 2.25rem);
}

.card {
  padding: 1rem;
  border-radius: 1rem;
}

.chart-wrap {
  min-height: 220px;
}

.chart-wrap-sm {
  min-height: 180px;
}

.dashboard-grid .chart-wrap,
.dashboard-grid .chart-wrap-sm,
.widget-body .chart-wrap,
.widget-body .chart-wrap-sm {
  min-height: 0;
}

.funnel-wrap {
  padding-left: 0;
  padding-right: 0;
}

.conv-badge {
  position: static;
  margin-left: 0.5rem;
  display: inline-flex;
}

.funnel-step-master {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  height: auto;
  min-height: 44px;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tv-header {
  padding: 0;
  gap: 0;
}

.tv-header-inner,
.tv-footer-inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.tv-header-inner,
.tv-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tv-header-actions,
.tv-footer-controls,
.tv-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tv-footer {
  padding: 0;
}

.tv-chrome-handle span {
  display: none;
}

@media (min-width: 640px) {
  .tv-chrome-handle span {
    display: inline;
  }
}

.tv-footer-title {
  min-width: 0;
}

.tv-footer-title p:last-child {
  display: none;
}

#tv-dots {
  justify-content: center;
  flex-wrap: wrap;
}

.tv-control-btn {
  width: 2.5rem;
  height: 2.5rem;
}

.ranking-item {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 0.75rem;
}

.ranking-item > span:last-child {
  align-self: flex-end;
}

.login-shell {
  overflow: auto;
}

@media (min-width: 640px) {
  .page {
    padding: 1.25rem 1.5rem 1rem;
  }

  .page-title-wrap {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .tv-header-inner,
  .tv-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tv-footer-title p:last-child {
    display: block;
  }

  .ranking-item {
    flex-direction: row;
    align-items: center !important;
  }

  .ranking-item > span:last-child {
    align-self: auto;
  }
}

@media (min-width: 768px) {
  .page {
    padding: 1.5rem 2rem 1rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 1.5rem;
  }

  .chart-wrap {
    min-height: 280px;
  }

  .dashboard-grid .chart-wrap,
  .dashboard-grid .chart-wrap-sm {
    min-height: 0;
  }

  .conv-badge {
    position: absolute;
    right: -75px;
    margin-left: 0;
  }

  .funnel-wrap {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  body:not(.mobile-scroll) {
    overflow: hidden;
  }

  .tv-main {
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .admin-table-desktop {
    display: none;
  }
}

@media (min-width: 768px) {
  .admin-table-mobile {
    display: none;
  }
}
