/*
 * Topsheet — Dashboard Styles
 * Custom component styles that extend Tailwind utility classes.
 */

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

/* Default: Modern serif for warmth and humanity */
body {
  font-family: 'Lora', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.65;
}

/* Utility: Sans-serif for UI elements, navigation, data tables */
.font-ui {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Utility: Explicit serif for emphasis */
.font-serif {
  font-family: 'Lora', Georgia, Cambria, 'Times New Roman', Times, serif;
}

/* Headings get serif with adjusted weights */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* AI Greeting Hero - Large, centered, contemplative */
.greeting-hero {
  font-family: 'Lora', 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 stays with Inter for clarity */
nav, .nav-item {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* === Stat Cards === */
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

/* Accent colors - Muted paper-like palette */
.stat-card.accent-navy::before { background: #4751e7; }
.stat-card.accent-blue::before { background: #6172f3; }
.stat-card.accent-violet::before { background: #8b5cf6; }
.stat-card.accent-charcoal::before { background: #667085; }
.stat-card.accent-cream::before { background: #b8a489; }
.stat-card.accent-emerald::before { background: #10b981; }

/* Stat number typography */
.stat-value {
  font-family: 'Lora', Georgia, Cambria, 'Times New Roman', Times, serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

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

/* Trend badges */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
}

.trend-up {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.trend-down {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
}

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

.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 0.5rem;
  opacity: 0.08;
  transition: width 0.4s ease;
}

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

.bar-fill.fill-navy { background: #4751e7; }
.bar-fill.fill-blue { background: #6172f3; }
.bar-fill.fill-violet { background: #8b5cf6; }
.bar-fill.fill-charcoal { background: #667085; }
.bar-fill.fill-cream { background: #b8a489; }
.bar-fill.fill-emerald { background: #10b981; }

/* === 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.06);
}



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

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

/* === 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: 0.5rem;
}

.pill-option {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

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

.pill-option.active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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