/*
 * Topsheet — Dashboard Styles
 * Bloomberg meets Linear. Dense, flat, precise.
 */

/* === Typography System === */

/* Default: IBM Plex Sans for UI clarity */
body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  font-size: 14px;
  line-height: 1.5;
}

/* Utility: Explicit sans for UI elements */
.font-ui {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

/* Utility: Serif for editorial emphasis */
.font-serif {
  font-family: 'IBM Plex Serif', Georgia, Cambria, 'Times New Roman', Times, serif;
}

/* Headings: IBM Plex Serif — authoritative, editorial */
h1, h2, h3, h4, h5, h6 {
  font-family: 'IBM Plex Serif', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Greeting Hero */
.greeting-hero {
  font-family: 'IBM Plex Serif', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}

@media (max-width: 768px) {
  .greeting-hero {
    font-size: 1.75rem;
  }
}

/* Navigation: IBM Plex Sans */
nav, .nav-item {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
}

/* === Stat Cards === */
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  border: 1px solid transparent;
}

/* Stat number typography — monospaced, dense */
.stat-value {
  font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Trend indicators — text color only, no pill */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.trend-up {
  color: #2D6A4F;
}

.trend-down {
  color: #C43D3D;
}

.dark .trend-up {
  color: #52A07A;
}

.dark .trend-down {
  color: #E06060;
}

/* === Horizontal Bar Fills === */
.bar-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  opacity: 0.08;
}

.dark .bar-fill {
  opacity: 0.12;
}

.bar-fill.fill-forest { background: #2D6A4F; }
.bar-fill.fill-forest-light { background: #52A07A; }
.bar-fill.fill-gold { background: #D4A843; }
.bar-fill.fill-cream { background: #A89A80; }

/* === Table Refinements === */
.premium-table tbody tr {
  transition: background-color 0.1s ease;
}

.premium-table tbody tr:hover {
  background-color: rgba(45, 106, 79, 0.04);
}

.dark .premium-table tbody tr:hover {
  background-color: rgba(45, 106, 79, 0.08);
}

/* === Active Nav Indicator === */
.nav-item-active {
  position: relative;
}

.nav-item-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 2px;
  background: #52A07A;
}

/* === Greeting Typography === */
.greeting-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* === URL break === */
.url-break-aggressive {
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
}

/* === Pill Selector === */
.pill-selector {
  display: flex;
  gap: 0.125rem;
  padding: 0.1875rem;
  border-radius: 2px;
}

.pill-option {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 2px;
  transition: background-color 0.1s ease;
  cursor: pointer;
}

.pill-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pill-option.active {
  background: rgba(45, 106, 79, 0.15);
}

/* === Data Display === */
.data-mono {
  font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
