/* Premium dashboard responsive adapters.
   Keep this file scoped to the dashboard; shared primitives live in autoportofolio-ui.css. */

.premium-dashboard .metric-card,
.premium-dashboard .analysis-card,
.premium-dashboard .chart-card,
.premium-dashboard .heatmap-card,
.premium-dashboard .hero-card {
  min-width: 0;
}

.premium-dashboard .metric-card__value,
.premium-dashboard .premium-hero .stat-value,
.premium-dashboard .analysis-card .fw-semibold {
  overflow-wrap: anywhere;
}

.premium-dashboard .chart-toolbar {
  min-width: 0;
}

.premium-dashboard .chart-toolbar .btn,
.premium-dashboard .heatmap-card .btn,
.premium-dashboard .analysis-card .btn,
.premium-dashboard .premium-hero .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: var(--ap-tap-target-min, 44px);
}

.premium-dashboard .premium-hero h1,
.premium-dashboard .premium-hero h2,
.premium-dashboard .premium-hero .lead {
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .premium-dashboard {
    overflow-x: hidden;
  }

  .premium-dashboard .premium-hero {
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
  }

  .premium-dashboard .premium-hero .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .premium-dashboard .premium-hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.2rem);
    line-height: 1.08;
  }

  .premium-dashboard .premium-hero .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .premium-dashboard .premium-hero .btn {
    width: 100%;
  }

  .premium-dashboard .premium-hero .hero-card {
    border-radius: 1rem;
    padding: 1rem !important;
    backdrop-filter: none;
  }

  .premium-dashboard .premium-hero .hero-summary-grid {
    gap: 1rem;
  }

  .premium-dashboard .premium-hero .d-flex.flex-column.flex-sm-row.gap-4 {
    gap: 0.75rem !important;
  }

  .premium-dashboard .section {
    padding-bottom: 2rem !important;
    padding-top: 2rem !important;
  }

  .premium-dashboard .section-heading {
    margin-bottom: 1.25rem !important;
    text-align: left !important;
  }

  .premium-dashboard .section-heading h2 {
    font-size: 1.35rem;
    line-height: 1.22;
  }

  .premium-dashboard .metric-card {
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    padding: 1rem;
  }

  .premium-dashboard .metric-card:hover,
  .premium-dashboard .analysis-card:hover {
    transform: none;
  }

  .premium-dashboard .metric-card__value {
    font-size: clamp(1.35rem, 8vw, 1.7rem);
    line-height: 1.12;
  }

  .premium-dashboard .chart-card .card-body,
  .premium-dashboard .heatmap-card .card-body {
    padding: 1rem !important;
  }

  .premium-dashboard .chart-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .premium-dashboard .chart-toolbar > * {
    flex: 0 0 auto;
  }

  .premium-dashboard .chart-toolbar .input-group {
    flex-basis: 180px;
    width: 180px !important;
  }

  .premium-dashboard #equityPerformanceChart {
    height: 260px !important;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .premium-dashboard #allocationChart {
    height: 220px !important;
  }

  .premium-dashboard .heatmap-board {
    border-radius: 0.75rem;
    height: 320px;
    margin-top: 1rem;
  }

  .premium-dashboard .heatmap-legend {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .premium-dashboard .heatmap-legend-bar {
    width: 100%;
  }

  .premium-dashboard .heatmap-tooltip-custom {
    left: 1rem !important;
    max-width: calc(100vw - 2rem);
    min-width: 0;
    right: 1rem;
  }

  .premium-dashboard .analysis-card {
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    padding: 1rem;
  }

  .premium-dashboard .analysis-card__icon {
    border-radius: 0.8rem;
    font-size: 1.15rem;
    height: 2.65rem;
    width: 2.65rem;
  }

  .premium-dashboard .analysis-card .btn {
    width: 100%;
  }
}
