/* Breeze Analytics Template CSS
   Shared styling for hosted analysis reports
   ============================================ */

/* === Brand Colors === */
:root {
  --primary: #1F74DF;
  --primary-dark: #1557A0;
  --accent: #FF527B;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --error: #DC2626;
  --error-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info-light: #DBEAFE;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;

  /* Chart colors */
  --chart-blue: #1F74DF;
  --chart-pink: #FF527B;
  --chart-green: #16A34A;
  --chart-orange: #F59E0B;
  --chart-purple: #8B5CF6;
  --chart-teal: #14B8A6;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
}
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* === Navigation === */
.report-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.report-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--gray-900); background: var(--gray-100); }
.nav-link.active { color: var(--primary); background: var(--info-light); }

/* === Header === */
.report-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3.5rem 2rem 3rem;
}
.report-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.header-logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}
.header-label {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.report-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.report-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}
.date-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-weight: 500;
}

/* === Main Content === */
.report-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

/* === Cards === */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}
.card-header h2 {
  font-size: 1.1rem;
  color: var(--gray-900);
}
.card-body {
  padding: 1.5rem;
}

/* === Metric Cards === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.metric-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.metric-value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}
.metric-change {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.metric-change.positive { color: var(--success); }
.metric-change.negative { color: var(--error); }
.metric-change.neutral { color: var(--gray-500); }

/* === Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.data-table tr:hover {
  background: var(--gray-50);
}
.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* === Charts === */
.chart-container {
  position: relative;
  height: 300px;
  margin: 1rem 0;
}
.chart-container.tall {
  height: 400px;
}

/* === Callouts === */
.callout {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}
.callout.success {
  background: var(--success-light);
  border-color: var(--success);
}
.callout.warning {
  background: var(--warning-light);
  border-color: var(--warning);
}
.callout.error {
  background: var(--error-light);
  border-color: var(--error);
}
.callout.info {
  background: var(--info-light);
  border-color: var(--primary);
}
.callout-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* === Images === */
.figure {
  margin: 1.5rem 0;
}
.figure img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.figure-caption {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
  text-align: center;
}

/* === Utility Classes === */
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* === Responsive === */
@media (max-width: 768px) {
  .report-header { padding: 2rem 1rem; }
  .report-header h1 { font-size: 1.75rem; }
  .report-main { padding: 1rem; }
  .report-nav-inner { padding: 0 1rem; }
  .nav-links { display: none; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}

/* === Print Styles === */
@media print {
  .report-nav { display: none; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid var(--gray-200); }
  body { background: white; }
}
