/* ═══════════════════════════════════════════════════════════════════════
   RollForge Premium Dashboard — Structural quality overhaul
   Loaded AFTER inline <style> blocks to override --forge-* variables
   and cheap component patterns with premium alternatives.
   Aesthetic target: Carta meets Bloomberg Terminal.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. PREMIUM COLOR & SPACING VARIABLES ───────────────────────────── */
:root {
  /* Override forge variables for premium warmth */
  --forge-dark: #faf9f7;
  --forge-charcoal: #ffffff;
  --forge-steel: #f5f4f1;
  --forge-border: #e8e6e1;
  --forge-light: #1a1a1a;
  --forge-muted: #6b7280;
  --forge-orange: #6D8196;
  --forge-accent: #6D8196;
  --forge-teal: #6D8196;
  --forge-teal-dim: rgba(109,129,150,0.08);

  /* Premium overrides */
  --rf-bg: #f7f6f3;
  --rf-surface: #ffffff;
  --rf-surface-alt: #f5f4f1;
  --rf-border: #e8e6e1;
  --rf-border-hover: #d4d2cd;

  /* Premium shadows */
  --premium-shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  --premium-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --premium-shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --premium-shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --premium-shadow-hover: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --premium-shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --premium-shadow-card-hover: 0 6px 20px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);

  /* Premium radius */
  --premium-radius: 12px;
  --premium-radius-sm: 8px;
  --premium-radius-lg: 16px;

  /* Premium spacing */
  --premium-card-padding: 1.75rem;
  --premium-card-padding-lg: 2rem;
  --premium-section-gap: 1.75rem;
  --premium-page-padding: 2.5rem;
}

/* ── 2. BODY & PAGE LAYOUT ──────────────────────────────────────────── */
body {
  background: var(--forge-dark) !important;
  color: var(--forge-light) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body .page {
  padding: var(--premium-page-padding) 2.5rem 4rem !important;
  max-width: 1440px;
}

/* ── 3. PAGE HEADER — clear hierarchy ───────────────────────────────── */
body .page-header {
  margin-bottom: var(--premium-section-gap) !important;
  padding-bottom: 0;
}

body .page-header h1 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  color: var(--forge-light) !important;
}

body .page-header p,
body .page-header .page-subtitle {
  color: var(--forge-muted) !important;
  font-size: 0.9375rem !important;
  margin-top: 0.35rem !important;
  line-height: 1.5 !important;
}

/* ── 4. SECTION HEADERS ─────────────────────────────────────────────── */
body .section-header {
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.5rem;
}

body .section-title {
  font-size: 0.6875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-weight: 700 !important;
  color: var(--forge-muted) !important;
}

/* Section headers with h2/h3 */
body .section-header h2,
body .section-header h3 {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* ── 5. CARDS — No borders, shadow elevation ────────────────────────── */

/* KPI Cards — the hero row */
body .kpi-grid {
  gap: 1.125rem !important;
  margin-bottom: var(--premium-section-gap) !important;
}

body .kpi-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  padding: var(--premium-card-padding) !important;
  box-shadow: var(--premium-shadow-card) !important;
  transition: box-shadow 0.25s ease, transform 0.25s ease !important;
  position: relative;
  overflow: hidden;
}

body .kpi-card:hover {
  box-shadow: var(--premium-shadow-card-hover) !important;
  transform: translateY(-1px);
}

/* Subtle top accent line on KPI cards */
body .kpi-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, rgba(13,148,136,0.3), rgba(13,148,136,0.08)) !important;
}

body .kpi-label {
  font-size: 0.6875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--forge-muted) !important;
  font-weight: 600 !important;
  margin-bottom: 0.75rem !important;
}

body .kpi-value {
  font-size: 2.125rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  margin-bottom: 0.625rem !important;
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

body .kpi-delta {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}

/* Stat cards */
body .stat-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  padding: 1.375rem 1.5rem !important;
  box-shadow: var(--premium-shadow-card) !important;
  transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

body .stat-card:hover {
  box-shadow: var(--premium-shadow-card-hover) !important;
  transform: translateY(-1px);
}

body .stats-row {
  gap: 1.125rem !important;
  margin-bottom: var(--premium-section-gap) !important;
}

body .stat-label {
  font-size: 0.6875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--forge-muted) !important;
  font-weight: 600 !important;
  margin-bottom: 0.375rem !important;
}

body .stat-value {
  font-size: 1.625rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

body .stat-sub {
  font-size: 0.8125rem !important;
  color: var(--forge-muted) !important;
  margin-top: 0.375rem !important;
}

/* Generic card pattern */
body .card,
body .analytics-card,
body .chart-card,
body .detail-card,
body .info-card,
body .summary-card,
body .report-card,
body .data-card,
body .panel {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  padding: var(--premium-card-padding) !important;
  box-shadow: var(--premium-shadow-card) !important;
  transition: box-shadow 0.25s ease !important;
}

body .card:hover,
body .analytics-card:hover,
body .chart-card:hover {
  box-shadow: var(--premium-shadow-md) !important;
}

/* Score header card */
body .score-header {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius-lg) !important;
  padding: 2rem 2.25rem !important;
  box-shadow: var(--premium-shadow) !important;
  margin-bottom: var(--premium-section-gap) !important;
}

/* Stat chips */
body .stat-chip {
  background: #f5f4f1 !important;
  border: 1px solid #e8e6e1 !important;
  border-radius: var(--premium-radius-sm) !important;
  padding: 0.625rem 1rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body .stat-chip:hover {
  border-color: rgba(13,148,136,0.4) !important;
  box-shadow: 0 2px 8px rgba(13,148,136,0.08) !important;
}

body .stat-chip.active {
  border-color: rgba(13,148,136,0.5) !important;
  background: rgba(13,148,136,0.06) !important;
  box-shadow: 0 2px 8px rgba(13,148,136,0.1) !important;
}

/* ── 6. TABLES — Premium data density ───────────────────────────────── */
body .company-table-wrap,
body .table-wrap,
body .list-table,
body table[class*="table"] {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  box-shadow: var(--premium-shadow-card) !important;
  overflow: hidden !important;
}

body table thead th,
body .company-table thead th,
body .list-table thead th {
  padding: 0.875rem 1.25rem !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #8a8a8a !important;
  background: #f9f8f6 !important;
  border-bottom: 1px solid #e8e6e1 !important;
  white-space: nowrap !important;
}

body table tbody td,
body .company-table tbody td,
body .list-table tbody td {
  padding: 1rem 1.25rem !important;
  font-size: 0.875rem !important;
  border-bottom: 1px solid #f0eee9 !important;
  vertical-align: middle !important;
  color: var(--forge-light) !important;
}

body table tbody tr:last-child td,
body .company-table tbody tr:last-child td,
body .list-table tbody tr:last-child td {
  border-bottom: none !important;
}

body table tbody tr,
body .company-table tbody tr,
body .list-table tbody tr {
  transition: background 0.15s ease !important;
}

body table tbody tr:hover,
body .company-table tbody tr:hover,
body .list-table tbody tr:hover {
  background: #f9f8f6 !important;
}

/* Right-align numeric columns */
body table tbody td:not(:first-child),
body .company-table tbody td:not(:first-child) {
  font-feature-settings: 'tnum' on, 'lnum' on;
}

/* Metric cells in tables */
body .metric-val {
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

body .metric-delta {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* ── 7. NAVIGATION — Refined topbar ─────────────────────────────────── */
body .nav,
body nav.nav {
  background: rgba(250,249,247,0.95) !important;
  border-bottom: 1px solid #e8e6e1 !important;
  backdrop-filter: blur(4px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(4px) saturate(120%) !important;
  padding: 0 2rem !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
}

/* Breadcrumb styling */
body .nav-breadcrumb {
  font-size: 0.8125rem !important;
  color: var(--forge-muted) !important;
}

body .nav-breadcrumb strong {
  color: var(--forge-light) !important;
  font-weight: 600 !important;
}

/* Nav pill */
body .nav-pill {
  font-size: 0.6875rem !important;
  padding: 0.25rem 0.625rem !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

/* ── 8. BUTTONS — Precise, confident ────────────────────────────────── */
body .btn,
body .btn-primary,
body .btn-ghost,
body .btn-secondary,
body .btn-danger,
body .nav-btn {
  border-radius: var(--premium-radius-sm) !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-size: 0.8125rem !important;
  letter-spacing: -0.01em !important;
}

body .btn-primary {
  background: #5A7A9B !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(13,148,136,0.25) !important;
}

body .btn-primary:hover {
  background: #0F766E !important;
  box-shadow: 0 2px 8px rgba(13,148,136,0.3) !important;
  transform: translateY(-0.5px);
}

body .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(13,148,136,0.2) !important;
}

body .btn-ghost,
body .btn-secondary,
body .nav-btn {
  background: transparent !important;
  color: var(--forge-muted) !important;
  border: 1px solid #e0ded9 !important;
}

body .btn-ghost:hover,
body .btn-secondary:hover,
body .nav-btn:hover {
  color: var(--forge-light) !important;
  border-color: #cccac5 !important;
  background: rgba(0,0,0,0.015) !important;
}

/* ── 9. BADGES & PILLS ──────────────────────────────────────────────── */
body .badge,
body .acquisition-badge,
body .stage-badge,
body .status-pill {
  border-radius: 100px !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.625rem !important;
  letter-spacing: 0.01em !important;
}

/* ── 10. KANBAN BOARD — Premium drag cards ──────────────────────────── */
body .kanban {
  gap: 1rem !important;
}

body .kanban-col {
  background: #f9f8f6 !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  box-shadow: var(--premium-shadow-sm) !important;
}

body .kanban-col-header {
  padding: 1rem 1.125rem !important;
  border-bottom: 1px solid #eae8e3 !important;
}

body .kanban-col-title {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
}

body .kanban-col-count {
  font-size: 0.6875rem !important;
  background: rgba(0,0,0,0.04) !important;
  border-radius: 100px !important;
  padding: 0.15rem 0.5rem !important;
  font-weight: 600 !important;
  color: var(--forge-muted) !important;
}

body .kanban-col-body {
  padding: 0.625rem !important;
}

body .kanban-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius-sm) !important;
  padding: 0.875rem 1rem !important;
  box-shadow: var(--premium-shadow-sm) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
  margin-bottom: 0.5rem !important;
}

body .kanban-card:hover {
  box-shadow: var(--premium-shadow) !important;
  transform: translateY(-1px);
}

body .kanban-card-name {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

body .kanban-card-meta {
  font-size: 0.75rem !important;
}

body .kanban-card-meta .tag {
  background: rgba(0,0,0,0.04) !important;
  border-radius: 4px !important;
  padding: 0.125rem 0.375rem !important;
}

/* ── 11. TABS — Clean underline style ───────────────────────────────── */
body .view-tabs,
body .tabs {
  border-bottom: 1px solid #e8e6e1 !important;
  gap: 0 !important;
  margin-bottom: 1.5rem !important;
}

body .view-tab,
body .tab {
  padding: 0.75rem 1.25rem !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: var(--forge-muted) !important;
  border-bottom: 2px solid transparent !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
  margin-bottom: -1px !important;
}

body .view-tab:hover,
body .tab:hover {
  color: var(--forge-light) !important;
}

body .view-tab.active,
body .tab.active {
  color: #0D9488 !important;
  border-bottom-color: #0D9488 !important;
  font-weight: 600 !important;
}

/* ── 12. FILTER BAR ─────────────────────────────────────────────────── */
body .filter-bar {
  gap: 0.75rem !important;
  margin-bottom: 1.25rem !important;
}

body .filter-bar select,
body .filter-bar input {
  background: #ffffff !important;
  border: 1px solid #e0ded9 !important;
  border-radius: var(--premium-radius-sm) !important;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  color: var(--forge-light) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body .filter-bar select:focus,
body .filter-bar input:focus {
  border-color: #0D9488 !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08) !important;
  outline: none !important;
}

/* Period select in header */
body .period-select,
body .header-controls select {
  background: #ffffff !important;
  border: 1px solid #e0ded9 !important;
  border-radius: var(--premium-radius-sm) !important;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  color: var(--forge-light) !important;
  transition: border-color 0.2s ease !important;
}

body .period-select:hover,
body .header-controls select:hover {
  border-color: #cccac5 !important;
}

/* ── 13. PROGRESS BARS & UTILIZATION ────────────────────────────────── */
body .util-bar,
body .bar-bg,
body .progress-bar-bg,
body .funnel-track {
  background: #eae8e3 !important;
  border-radius: 100px !important;
  overflow: hidden !important;
}

body .util-fill,
body .bar-fill,
body .progress-bar-fill,
body .funnel-fill {
  border-radius: 100px !important;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── 14. CHART CONTAINERS ───────────────────────────────────────────── */
body .analytics-grid {
  gap: 1.25rem !important;
}

body .analytics-card h3,
body .chart-card h3 {
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 1.25rem !important;
  color: var(--forge-light) !important;
}

/* ── 15. FORMS — Premium inputs ─────────────────────────────────────── */
body .form-group label,
body .form-label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #4b5563 !important;
  margin-bottom: 0.375rem !important;
  letter-spacing: -0.01em !important;
}

body .form-group input,
body .form-group select,
body .form-group textarea,
body input[type="text"],
body input[type="email"],
body input[type="number"],
body input[type="password"],
body select,
body textarea {
  background: #ffffff !important;
  border: 1px solid #e0ded9 !important;
  border-radius: var(--premium-radius-sm) !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.875rem !important;
  color: var(--forge-light) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body input:focus,
body select:focus,
body textarea:focus {
  border-color: #0D9488 !important;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08) !important;
  outline: none !important;
}

/* ── 16. MODALS & OVERLAYS ──────────────────────────────────────────── */
body .modal-content,
body .modal-body,
body .dialog,
body [class*="modal"] > div {
  border-radius: var(--premium-radius-lg) !important;
  box-shadow: var(--premium-shadow-lg) !important;
}

/* ── 17. EMPTY STATES ───────────────────────────────────────────────── */
body .empty-state,
body .no-data,
body .empty-message {
  text-align: center !important;
  padding: 3rem 2rem !important;
  color: var(--forge-muted) !important;
}

body .empty-state h3,
body .empty-state .empty-title {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  color: var(--forge-light) !important;
  margin-bottom: 0.5rem !important;
}

body .empty-state p,
body .empty-state .empty-subtitle {
  font-size: 0.875rem !important;
  color: var(--forge-muted) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
}

/* ── 18. SKELETON LOADERS ───────────────────────────────────────────── */
@keyframes rf-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.rf-skeleton {
  background: linear-gradient(90deg, #f0eee9 25%, #e8e6e1 50%, #f0eee9 75%) !important;
  background-size: 200% 100% !important;
  animation: rf-shimmer 1.8s ease-in-out infinite !important;
  border-radius: var(--premium-radius-sm) !important;
  border: none !important;
}

.rf-skeleton-text {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.rf-skeleton-heading {
  height: 24px;
  width: 60%;
  border-radius: 6px;
  margin-bottom: 12px;
}

.rf-skeleton-card {
  height: 120px;
  border-radius: var(--premium-radius) !important;
}

/* ── 19. SCROLLBAR REFINEMENT ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.18);
}

/* ── 20. SELECTION ──────────────────────────────────────────────────── */
::selection {
  background: rgba(13,148,136,0.12);
  color: var(--forge-light);
}

/* ── 21. LINKS & COMPANY NAMES ──────────────────────────────────────── */
body .company-name {
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
}

body a.company-report-link:hover {
  color: #0D9488 !important;
}

body .view-report-link {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  opacity: 0.65 !important;
  transition: opacity 0.15s ease !important;
}

body .view-report-link:hover {
  opacity: 1 !important;
}

/* ── 22. TOOLTIPS ───────────────────────────────────────────────────── */
body .tooltip,
body [class*="tooltip"] {
  border-radius: var(--premium-radius-sm) !important;
  box-shadow: var(--premium-shadow-md) !important;
  font-size: 0.8125rem !important;
}

/* ── 23. PRIORITY STRIP REFINEMENT ──────────────────────────────────── */
body #rf-priority-strip {
  background: rgba(13,148,136,0.02) !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  box-shadow: var(--premium-shadow-sm) !important;
  margin-bottom: var(--premium-section-gap) !important;
}

body #rf-priority-strip .pa-header {
  border-bottom: 1px solid rgba(13,148,136,0.06) !important;
  padding: 0.875rem 1.25rem 0.625rem !important;
}

body #rf-priority-strip .pa-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius-sm) !important;
  box-shadow: var(--premium-shadow-sm) !important;
  padding: 0.75rem 1rem !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

body #rf-priority-strip .pa-card:hover {
  box-shadow: var(--premium-shadow) !important;
  transform: translateY(-1px);
}

body #rf-priority-strip .pa-card.severity-critical {
  border-left: 3px solid #DC2626 !important;
}

body #rf-priority-strip .pa-card.severity-warning {
  border-left: 3px solid #D97706 !important;
}

body #rf-priority-strip .pa-card.severity-info {
  border-left: 3px solid #2563EB !important;
}

/* ── 24. GRID LAYOUTS — Consistent gaps ─────────────────────────────── */
body .two-col,
body .three-col,
body .bottom-grid,
body .form-grid {
  gap: 1.25rem !important;
}

/* ── 25. DIVIDERS ───────────────────────────────────────────────────── */
body hr,
body .divider {
  border: none !important;
  border-top: 1px solid #eae8e3 !important;
  margin: 1.5rem 0 !important;
}

/* ── 26. ANIMATIONS — Subtle entrance ───────────────────────────────── */
@keyframes rf-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

body .page {
  animation: rf-fadeIn 0.3s ease-out;
}

/* ── 27. ADDITIONAL TABLE CELL PATTERNS ─────────────────────────────── */
/* Dark header backgrounds that leak through from old theme */
body table thead th[style*="background: rgba(10"],
body .company-table thead th {
  background: #f9f8f6 !important;
}

/* Make sure no inline-set dark backgrounds show through */
body .company-table-wrap,
body .list-table {
  background: #ffffff !important;
}

/* ── 28. COMPLIANCE & GAUGE SPECIFIC ────────────────────────────────── */
body .score-number {
  font-size: 2.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

body .score-label {
  font-size: 0.6875rem !important;
  color: var(--forge-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-weight: 600 !important;
}

body .score-meta h1 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

/* ── 29. BOARD PACK / REPORT CARDS ──────────────────────────────────── */
body .board-section,
body .report-section {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  box-shadow: var(--premium-shadow-card) !important;
  padding: var(--premium-card-padding-lg) !important;
  margin-bottom: var(--premium-section-gap) !important;
}

/* ── 30. CHART STYLING OVERRIDES ────────────────────────────────────── */
body canvas {
  border-radius: var(--premium-radius-sm) !important;
}

/* ── 31. NOTIFICATION/ALERT CARDS ───────────────────────────────────── */
body .alert-card,
body .notification-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: var(--premium-radius) !important;
  box-shadow: var(--premium-shadow-card) !important;
  padding: 1.125rem 1.25rem !important;
  transition: box-shadow 0.2s ease !important;
}

body .alert-card:hover,
body .notification-card:hover {
  box-shadow: var(--premium-shadow-md) !important;
}

/* ── 32. MISC CLEANUP ───────────────────────────────────────────────── */

/* Remove any gradient backgrounds that scream AI */
body [style*="linear-gradient(135deg"] {
  background: #ffffff !important;
}

/* Ensure monospace for all financial figures */
body [class*="revenue"],
body [class*="ebitda"],
body [class*="amount"],
body [class*="price"],
body [class*="cost"],
body .metric-val,
body .kpi-value,
body .stat-value {
  font-feature-settings: 'tnum' on, 'lnum' on !important;
}

/* ── 33. MOBILE PREMIUM ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  body .page {
    padding: 1.5rem 1.125rem 3rem !important;
  }

  body .page-header h1 {
    font-size: 1.375rem !important;
  }

  body .kpi-grid {
    gap: 0.75rem !important;
  }

  body .kpi-card {
    padding: 1.25rem !important;
  }

  body .kpi-value {
    font-size: 1.625rem !important;
  }

  body .stat-card {
    padding: 1.125rem 1.25rem !important;
  }

  body table tbody td,
  body .company-table tbody td,
  body .list-table tbody td {
    padding: 0.75rem 0.875rem !important;
    font-size: 0.8125rem !important;
  }

  body table thead th,
  body .company-table thead th,
  body .list-table thead th {
    padding: 0.625rem 0.875rem !important;
  }

  body .kanban-card {
    padding: 0.75rem !important;
  }

  body .nav,
  body nav.nav {
    height: 52px !important;
    padding: 0 1rem !important;
  }

  body .score-header {
    padding: 1.5rem !important;
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  body .score-gauge {
    margin: 0 auto !important;
  }

  body .score-stats {
    justify-content: center !important;
  }

  body .filter-bar {
    gap: 0.5rem !important;
  }

  body .filter-bar select,
  body .filter-bar input {
    font-size: 0.8125rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Tablet tweaks */
@media (min-width: 769px) and (max-width: 1024px) {
  body .page {
    padding: 2rem 1.5rem 3rem !important;
  }

  body .kpi-grid {
    gap: 0.875rem !important;
  }
}

/* ── 34. PRINT STYLES ───────────────────────────────────────────────── */
@media print {
  body .nav,
  body nav.nav,
  body #rf-sidebar,
  body .rf-nav-hamburger {
    display: none !important;
  }

  body .page {
    padding: 0 !important;
    max-width: 100% !important;
  }

  body .kpi-card,
  body .stat-card,
  body .card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    break-inside: avoid;
  }
}
