/* Responsive Styles */

/* Mobile First Approach */
@media (max-width: 767px) {
  .dashboard {
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
    margin-top: 54px;
  }
  .stats-grid {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
  }
  .summary-card {
    width: 100%;
    order: 0;
  }

  .stat-card {
    padding: var(--space-md) var(--space-lg);
    min-height: auto;
    min-width: 100%;
    gap: var(--space-xs);
  }

  .stat-value {
    margin: var(--space-xs) 0;
  }

  .main-number {
    font-size: 32px;
  }

  .unit {
    font-size: 24px;
  }

  .stat-change {
    flex-direction: row;
    gap: var(--space-xs);
  }

  .summary-intro,
  .summary-investment,
  .summary-profit {
    font-size: var(--font-size-md);
  }

  .investment-summary {
    padding: var(--space-lg);
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .dashboard {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    width: 100%;
    max-width: 800px;
  }

  .summary-card {
    width: 100%;
    max-width: 500px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .stats-grid {
    flex: 1;
    max-width: 300px;
  }

  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease-in-out;
  }
}

/* Large Desktop */
@media (min-width: 1280px) {
  .dashboard {
    gap: var(--space-2xl);
  }

  .stats-grid {
    max-width: 100%;
  }

  .summary-card {
    width: 100%;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .stat-icon img,
  .change-indicator img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .stat-card:hover {
    transform: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #b0b0b0;
    --color-background: #1a1a1a;
    --color-surface: #2d2d2d;
    --color-border: #404040;
  }
}

/* Print Styles */
@media print {
  .dashboard {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .summary-actions {
    display: none;
  }

  .stat-card,
  .investment-summary {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--color-border);
  }
}
