* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; color: #333; }

/* Dashboard - mobile first (iPhone 14: 390x844) */
body.dashboard { padding: 12px; }
body.dashboard h1 { font-size: 17px; margin-bottom: 8px; }
.cards { display: none; }
.chart-container { background: white; border-radius: 8px; padding: 8px 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 8px; }
.metrics-card { background: white; border-radius: 8px; padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.metrics-table { width: 100%; border-collapse: collapse; }
.metrics-table tr + tr { border-top: 1px solid #f0f0f0; }
.metric-label { font-size: 13px; color: #666; padding: 8px 0; }
.metric-value { font-size: 15px; font-weight: 700; text-align: right; padding: 8px 0; }
.footer { margin-top: 10px; font-size: 12px; color: #999; text-align: center; }
.footer a { color: #666; }

/* Desktop - restore original layout */
@media (min-width: 640px) {
  body.dashboard { padding: 24px; }
  body.dashboard h1 { font-size: 24px; margin-bottom: 20px; }
  .cards { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
  .card { background: white; border-radius: 8px; padding: 20px; flex: 1; min-width: 160px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align: center; }
  .card .label { font-size: 13px; color: #666; margin-bottom: 4px; }
  .card .value { font-size: 4em; font-weight: 700; padding: 0.75em 0; }
  .chart-container { padding: 16px; margin-bottom: 0; }
  .metrics-card { display: none; }
  .footer { margin-top: 20px; font-size: 13px; }
}

/* Connect */
body.connect { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
body.connect h1 { margin-bottom: 16px; font-size: 2em; }
.container { text-align: center; background: white; padding: 48px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
p { color: #666; margin-bottom: 24px; }
a.btn { display: inline-block; background: #FC4C02; color: white; text-decoration: none; padding: 12px 32px; border-radius: 6px; font-weight: 600; }
a.btn:hover { background: #e04400; }
