/* Alt/Finance Data Portal Styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root { 
  --sidebar-width: 260px; 
  --sidebar-collapsed-width: 72px; 
  --header-height: 64px; 
  --transition-speed: 0.2s; 
}

/* Dark Theme */
[data-theme="dark"] { 
  --bg-primary: #0a0b0d; 
  --bg-secondary: #12141a; 
  --bg-tertiary: #1a1d26; 
  --bg-card: #15171e; 
  --border: #2a2d38; 
  --border-light: #3a3d48; 
  --text-primary: #f4f4f5; 
  --text-secondary: #a1a1aa; 
  --text-muted: #71717a; 
  --accent: #0049ff; 
  --accent-hover: #2563eb; 
  --accent-muted: rgba(0, 73, 255, 0.15); 
  --success: #22c55e; 
  --warning: #f59e0b; 
  --error: #ef4444; 
  --gold: #d4a853; 
  --gold-muted: rgba(212, 168, 83, 0.15); 
}

/* Light Theme */
[data-theme="light"] { 
  --bg-primary: #ffffff; 
  --bg-secondary: #f8f9fa; 
  --bg-tertiary: #f1f3f4; 
  --bg-card: #ffffff; 
  --border: #e2e4e9; 
  --border-light: #d1d5db; 
  --text-primary: #111827; 
  --text-secondary: #4b5563; 
  --text-muted: #6b7280; 
  --accent: #0049ff; 
  --accent-hover: #2563eb; 
  --accent-muted: rgba(0, 73, 255, 0.1); 
  --success: #16a34a; 
  --warning: #d97706; 
  --error: #dc2626; 
  --gold: #b8860b; 
  --gold-muted: rgba(184, 134, 11, 0.1); 
}

/* Base Styles */
body { 
  font-family: 'Inter', -apple-system, sans-serif; 
  background: var(--bg-primary); 
  color: var(--text-primary); 
  line-height: 1.6; 
  min-height: 100vh; 
  transition: background var(--transition-speed), color var(--transition-speed); 
}

/* Auth Page */
.auth-page { 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 2rem; 
  position: relative; 
  overflow: hidden; 
  background: var(--bg-primary);
}
.auth-page.hidden { display: none; }
.auth-container { position: relative; width: 100%; max-width: 480px; }
.auth-header { text-align: center; margin-bottom: 2.5rem; }
.auth-logo { height: 48px; margin-bottom: 1rem; }
.auth-tagline { color: var(--text-muted); font-size: 0.9rem; }
.auth-card { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 2.5rem; 
  text-align: center;
}
.auth-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary); }
.auth-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.6; }
.auth-btn { 
  width: 100%; 
  padding: 0.875rem 1.5rem; 
  background: #0049FF; 
  color: white; 
  border: none; 
  border-radius: 8px; 
  font-size: 0.95rem; 
  font-weight: 600; 
  font-family: inherit; 
  cursor: pointer; 
  transition: background 0.2s, transform 0.1s; 
}
.auth-btn:hover { background: #0039cc; }
.auth-btn:active { transform: scale(0.98); }
.auth-footer { 
  text-align: center; 
  margin-top: 1.5rem; 
  padding-top: 1.5rem; 
  border-top: 1px solid var(--border); 
  color: var(--text-muted); 
  font-size: 0.9rem; 
}
.auth-footer .invitation-only {
  font-weight: 500;
  color: var(--text-muted);
}
.auth-footer button { 
  background: none; 
  border: none; 
  color: var(--accent); 
  font-weight: 600; 
  cursor: pointer; 
  font-family: inherit; 
  font-size: inherit; 
}
.auth-footer button:hover { text-decoration: underline; }

/* Portal Layout */
.portal { display: none; min-height: 100vh; }
.portal.active { display: flex; }

/* Sidebar */
.sidebar { 
  width: var(--sidebar-width); 
  height: 100vh; 
  position: fixed; 
  left: 0; 
  top: 0; 
  background: var(--bg-secondary); 
  border-right: 1px solid var(--border); 
  display: flex; 
  flex-direction: column; 
  transition: width var(--transition-speed); 
  z-index: 100; 
  overflow: hidden; 
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar-header { 
  padding: 1.25rem; 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  min-height: var(--header-height); 
}
.sidebar-logo { height: 32px; transition: opacity var(--transition-speed); }
.sidebar.collapsed .sidebar-logo { opacity: 0; width: 0; }
.sidebar-toggle { 
  padding: 0.5rem; 
  background: none; 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: all 0.2s; 
  flex-shrink: 0; 
}
.sidebar-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-toggle svg { width: 18px; height: 18px; display: block; transition: transform var(--transition-speed); }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }

/* Navigation */
.nav-section { margin-bottom: 1.5rem; }
.nav-section-title { 
  font-size: 0.7rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  color: var(--text-muted); 
  padding: 0 0.75rem; 
  margin-bottom: 0.5rem; 
  white-space: nowrap; 
  overflow: hidden; 
  transition: opacity var(--transition-speed); 
}
.sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  padding: 0.625rem 0.75rem; 
  background: none; 
  border: none; 
  border-radius: 8px; 
  color: var(--text-secondary); 
  font-size: 0.9rem; 
  font-weight: 500; 
  font-family: inherit; 
  cursor: pointer; 
  width: 100%; 
  text-align: left; 
  transition: all 0.15s; 
  white-space: nowrap; 
  overflow: hidden; 
}
.nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-item.active { background: var(--accent-muted); color: var(--accent); }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item span { transition: opacity var(--transition-speed); }
.sidebar.collapsed .nav-item span { opacity: 0; }

/* Expandable Nav Groups */
.nav-group { margin-bottom: 0.25rem; }
.nav-group-header { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  padding: 0.625rem 0.75rem; 
  background: none; 
  border: none; 
  border-radius: 8px; 
  color: var(--text-secondary); 
  font-size: 0.9rem; 
  font-weight: 500; 
  font-family: inherit; 
  cursor: pointer; 
  width: 100%; 
  text-align: left; 
  transition: all 0.15s; 
  white-space: nowrap; 
  overflow: hidden; 
}
.nav-group-header:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-group-header.active { color: var(--accent); }
.nav-group-header svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-group-header span { flex: 1; transition: opacity var(--transition-speed); }
.sidebar.collapsed .nav-group-header span { opacity: 0; }
.nav-group-arrow { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s; }
.nav-group.expanded .nav-group-arrow { transform: rotate(90deg); }
.sidebar.collapsed .nav-group-arrow { opacity: 0; }
.nav-group-items { display: none; padding-left: 2rem; }
.nav-group.expanded .nav-group-items { display: block; }
.sidebar.collapsed .nav-group-items { display: none !important; }

.nav-subitem { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 0.5rem 0.75rem; 
  background: none; 
  border: none; 
  border-radius: 6px; 
  color: var(--text-muted); 
  font-size: 0.8rem; 
  font-weight: 500; 
  font-family: inherit; 
  cursor: pointer; 
  width: 100%; 
  text-align: left; 
  transition: all 0.15s; 
  white-space: nowrap; 
  overflow: hidden; 
}
.nav-subitem:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-subitem.active { background: var(--accent-muted); color: var(--accent); }
.nav-subitem svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }

/* User Card */
.user-card { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  padding: 0.5rem; 
  border-radius: 8px; 
  overflow: hidden; 
}
.user-avatar { 
  width: 36px; 
  height: 36px; 
  background: var(--accent-muted); 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: var(--accent); 
  font-weight: 600; 
  flex-shrink: 0; 
}
.user-details { flex: 1; min-width: 0; transition: opacity var(--transition-speed); }
.sidebar.collapsed .user-details { opacity: 0; }
.user-name { font-weight: 600; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main Wrapper */
.main-wrapper { 
  flex: 1; 
  margin-left: var(--sidebar-width); 
  transition: margin-left var(--transition-speed); 
  display: flex; 
  flex-direction: column; 
  min-height: 100vh; 
}
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-collapsed-width); }

/* Header */
.main-header { 
  height: var(--header-height); 
  background: var(--bg-secondary); 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0 1.5rem; 
  position: sticky; 
  top: 0; 
  z-index: 50; 
}
.header-title { font-size: 1.125rem; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Theme Dropdown */
.theme-dropdown { position: relative; }
.theme-btn { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 0.5rem 0.875rem; 
  background: var(--bg-tertiary); 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  color: var(--text-secondary); 
  font-size: 0.85rem; 
  font-family: inherit; 
  cursor: pointer; 
  transition: all 0.2s; 
}
.theme-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-menu { 
  position: absolute; 
  top: calc(100% + 4px); 
  right: 0; 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 0.375rem; 
  min-width: 140px; 
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3); 
  display: none; 
  z-index: 100; 
}
.theme-menu.open { display: block; }
.theme-option { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 0.5rem 0.75rem; 
  background: none; 
  border: none; 
  border-radius: 6px; 
  color: var(--text-secondary); 
  font-size: 0.85rem; 
  font-family: inherit; 
  cursor: pointer; 
  width: 100%; 
  text-align: left; 
  transition: all 0.15s; 
}
.theme-option:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.theme-option.active { background: var(--accent-muted); color: var(--accent); }
.theme-option svg { width: 16px; height: 16px; }

/* Logout Button */
.logout-btn { 
  padding: 0.5rem; 
  background: none; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: all 0.2s; 
}
.logout-btn:hover { background: var(--bg-tertiary); color: var(--error); border-color: var(--error); }
.logout-btn svg { width: 18px; height: 18px; display: block; }

/* Main Content */
.main-content { flex: 1; padding: 2rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.main-footer { padding: 1.5rem 2rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* Views */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Page Header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-secondary); }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: var(--accent); }

/* Dataset Cards Grid */
.datasets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.dataset-card { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 1.5rem; 
  cursor: pointer; 
  transition: all 0.2s; 
}
.dataset-card:hover { 
  border-color: var(--border-light); 
  transform: translateY(-2px); 
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2); 
}
.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.card-icon { 
  width: 32px; 
  height: 32px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: var(--accent-muted); 
  border-radius: 8px; 
  color: var(--accent); 
  flex-shrink: 0;
}
.card-icon svg { width: 18px; height: 18px; }
.card-category { 
  font-size: 0.75rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.05em; 
  color: var(--gold); 
  background: var(--gold-muted); 
  padding: 0.25rem 0.75rem; 
  border-radius: 4px; 
}
.card-records { font-size: 0.8rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-left: auto; }
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-description { 
  color: var(--text-secondary); 
  font-size: 0.875rem; 
  margin-bottom: 1rem; 
  line-height: 1.5; 
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
}
.card-meta { display: flex; gap: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.meta-item { display: flex; flex-direction: column; gap: 0.125rem; }
.meta-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.meta-value { font-size: 0.875rem; font-weight: 500; }

/* Dataset Detail Layout */
.dataset-detail { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.dataset-main, .dataset-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

/* Detail Cards */
.detail-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.detail-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; }
.detail-card-body { padding: 1.25rem; }

/* Stats Grid */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-box { text-align: center; padding: 1rem; background: var(--bg-tertiary); border-radius: 8px; }
.stat-value { font-size: 1.25rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.25rem; }

/* Sources */
.description-text { color: var(--text-secondary); line-height: 1.7; }
.sources-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.source-tag { padding: 0.375rem 0.75rem; background: var(--bg-tertiary); border-radius: 6px; font-size: 0.85rem; color: var(--text-secondary); }

/* Files List */
.files-list { display: flex; flex-direction: column; gap: 0.75rem; }
.file-item { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0.875rem 1rem; 
  background: var(--bg-tertiary); 
  border-radius: 8px; 
  gap: 1rem; 
}
.file-info { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.file-icon { 
  width: 36px; 
  height: 36px; 
  background: var(--bg-secondary); 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}
.file-icon.sample { color: var(--success); }
.file-icon.dictionary { color: var(--accent); }
.file-icon.guide { color: var(--warning); }
.file-icon svg { width: 18px; height: 18px; }
.file-details { min-width: 0; }
.file-name { font-weight: 500; font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Buttons */
.download-btn { 
  padding: 0.5rem 0.875rem; 
  background: var(--accent); 
  color: white; 
  border: none; 
  border-radius: 6px; 
  font-size: 0.8rem; 
  font-weight: 600; 
  font-family: inherit; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 0.375rem; 
  transition: all 0.2s; 
  flex-shrink: 0; 
}
.download-btn:hover { background: var(--accent-hover); }
.download-btn svg { width: 14px; height: 14px; }

.secondary-btn {
  padding: 0.5rem 0.875rem; 
  background: var(--bg-tertiary); 
  color: var(--text-secondary); 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  font-size: 0.8rem; 
  font-weight: 600; 
  font-family: inherit; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 0.375rem; 
  transition: all 0.2s; 
  flex-shrink: 0; 
}
.secondary-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.secondary-btn svg { width: 14px; height: 14px; }

/* Overview Grid */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.overview-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.overview-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.overview-card h3 svg { width: 20px; height: 20px; color: var(--accent); }
.overview-card p, .overview-card li { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.overview-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.overview-card li::before { content: "→"; color: var(--gold); margin-right: 0.5rem; }
.contact-info { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.contact-info a { color: var(--accent); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

/* Admin Section */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.admin-stat-value { font-size: 1.75rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.admin-stat-value.users { color: var(--accent); }
.admin-stat-value.downloads { color: var(--success); }
.admin-stat-value.logins { color: var(--warning); }
.admin-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.admin-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.5rem; overflow: hidden; }
.admin-section-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.admin-section-title { font-size: 0.95rem; font-weight: 600; }
.export-btn { 
  padding: 0.4rem 0.75rem; 
  background: var(--bg-tertiary); 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  color: var(--text-secondary); 
  font-size: 0.8rem; 
  font-family: inherit; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 0.375rem; 
  transition: all 0.2s; 
}
.export-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.export-btn svg { width: 14px; height: 14px; }

/* Admin Table */
.admin-table-wrapper { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.75rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--bg-tertiary); }
.admin-table td { font-size: 0.85rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-tertiary); }
.activity-type { display: inline-flex; align-items: center; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.activity-type.login { background: var(--accent-muted); color: var(--accent); }
.activity-type.download { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.activity-type.logout { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }
.empty-state { padding: 2rem; text-align: center; color: var(--text-muted); }

/* Dictionary Table */
.dictionary-loading { padding: 3rem; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dictionary-table-wrapper { overflow-x: auto; }
.dictionary-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dictionary-table th, .dictionary-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.dictionary-table th { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--bg-tertiary); position: sticky; top: 0; }
.dictionary-table td { vertical-align: top; }
.dictionary-table tr:last-child td { border-bottom: none; }
.dictionary-table tbody tr:hover { background: var(--bg-tertiary); }
.dictionary-table .field-name { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 500; }
.dictionary-table .field-type { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); background: var(--bg-tertiary); padding: 0.125rem 0.375rem; border-radius: 3px; }
.dictionary-table .field-nullable { font-size: 0.8rem; color: var(--text-muted); }
.dictionary-table .field-example { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--text-secondary); background: var(--bg-tertiary); padding: 0.125rem 0.375rem; border-radius: 3px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.dictionary-table .field-desc { color: var(--text-secondary); line-height: 1.5; }

/* Mobile Menu Button */
.mobile-menu-btn { display: none; padding: 0.5rem; background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); cursor: pointer; }
.mobile-menu-btn svg { width: 20px; height: 20px; display: block; }

/* SQL Explorer */
.sql-explorer { display: flex; flex-direction: column; }

/* SQL Main Layout - Sidebar + Editor */
.sql-main-layout {
  display: flex;
  border-bottom: 1px solid var(--border);
}

/* Schema Sidebar */
.schema-sidebar {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  max-height: 300px;
}
.schema-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-tertiary);
  overflow: hidden;
}
.schema-sidebar-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schema-sidebar-header svg {
  flex-shrink: 0;
}
.schema-sidebar-columns {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}
.schema-column {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.schema-column:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
}
.schema-column .col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schema-column .col-type {
  color: var(--text-muted);
  font-size: 0.65rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Editor Area */
.sql-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Table Selector */
.table-selector-loading { display: flex; align-items: center; color: var(--text-muted); }
.table-selector select { 
  width: 100%; 
  max-width: 400px; 
  padding: 0.625rem 1rem; 
  background: var(--bg-tertiary); 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  color: var(--text-primary); 
  font-size: 0.9rem; 
  font-family: inherit; 
  cursor: pointer; 
}
.table-selector select:focus { outline: none; border-color: var(--accent); }
.table-description { 
  margin-top: 0.75rem; 
  color: var(--text-secondary); 
  font-size: 0.875rem; 
  line-height: 1.5; 
}

.sql-toolbar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 0.75rem 1rem; 
  border-bottom: 1px solid var(--border); 
  gap: 1rem; 
  flex-wrap: wrap; 
}
.sql-toolbar-left { display: flex; align-items: center; gap: 1rem; flex: 1; flex-wrap: wrap; }
.example-queries { display: flex; align-items: center; gap: 0.5rem; min-width: 200px; }
.example-queries label { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.example-queries select { 
  flex: 1; 
  padding: 0.4rem 0.75rem; 
  background: var(--bg-tertiary); 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  color: var(--text-primary); 
  font-size: 0.85rem; 
  font-family: inherit; 
  cursor: pointer; 
  max-width: 300px; 
}
.example-queries select:focus { outline: none; border-color: var(--accent); }
.sql-toolbar-right { display: flex; align-items: center; gap: 0.5rem; }
.run-btn { 
  display: flex; 
  align-items: center; 
  gap: 0.375rem; 
  padding: 0.5rem 1rem; 
  background: var(--success); 
  color: white; 
  border: none; 
  border-radius: 6px; 
  font-size: 0.85rem; 
  font-weight: 600; 
  font-family: inherit; 
  cursor: pointer; 
  transition: all 0.2s; 
}
.run-btn:hover:not(:disabled) { background: #16a34a; }
.run-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.run-btn svg { width: 14px; height: 14px; }
.sql-editor-container { border-bottom: 1px solid var(--border); }
#sqlEditor, #signalSqlEditor { 
  width: 100%; 
  min-height: 120px; 
  padding: 1rem; 
  background: var(--bg-tertiary); 
  border: none; 
  color: var(--text-primary); 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 0.875rem; 
  line-height: 1.5; 
  resize: vertical;
  white-space: pre;
  overflow-x: auto;
}
#sqlEditor:focus, #signalSqlEditor:focus { outline: none; background: var(--bg-secondary); }
#sqlEditor::placeholder, #signalSqlEditor::placeholder { color: var(--text-muted); }
.sql-results { min-height: 200px; max-height: 400px; overflow: auto; }
.results-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; color: var(--text-muted); gap: 0.75rem; }
.results-placeholder svg { width: 40px; height: 40px; opacity: 0.5; }
.results-placeholder p { font-size: 0.9rem; }
.sql-results table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.sql-results th, .sql-results td { 
  padding: 0.5rem 0.75rem; 
  text-align: left; 
  border-bottom: 1px solid var(--border); 
  white-space: nowrap; 
  max-width: 300px; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}
.sql-results th { 
  background: var(--bg-tertiary); 
  font-weight: 600; 
  font-size: 0.7rem; 
  text-transform: uppercase; 
  letter-spacing: 0.03em; 
  color: var(--text-muted); 
  position: sticky; 
  top: 0; 
}
.sql-results td { font-family: 'JetBrains Mono', monospace; }
.sql-results tbody tr:hover { background: var(--bg-tertiary); }
.sql-results .null-value { color: var(--text-muted); font-style: italic; }
.sql-footer { 
  display: flex; 
  justify-content: space-between; 
  padding: 0.5rem 1rem; 
  border-top: 1px solid var(--border); 
  font-size: 0.75rem; 
  color: var(--text-muted); 
  background: var(--bg-tertiary); 
}
.sql-error { padding: 1rem; background: rgba(239, 68, 68, 0.1); border-left: 3px solid var(--error); margin: 1rem; border-radius: 0 6px 6px 0; }
.sql-error-title { color: var(--error); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.25rem; }
.sql-error-message { color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.sql-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.loading { background: var(--warning); animation: pulse 1.5s infinite; }
.status-dot.ready { background: var(--success); }
.status-dot.error { background: var(--error); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Use Cases */
.use-cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.use-case-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.use-case-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.75rem; }
.use-case-card h3 svg { width: 24px; height: 24px; color: var(--accent); }
.use-case-card p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.use-case-card ul { list-style: none; }
.use-case-card li { padding: 0.375rem 0; color: var(--text-secondary); padding-left: 1.25rem; position: relative; }
.use-case-card li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* Quality List */
.quality-list { list-style: none; }
.quality-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.quality-list li:last-child { border-bottom: none; }
.quality-list strong { color: var(--text-primary); }

/* Mobile Overlay */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.mobile-overlay.active { display: block; }

/* Responsive */
@media (max-width: 900px) { 
  .dataset-detail { grid-template-columns: 1fr; } 
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { width: var(--sidebar-width); transform: translateX(-100%); }
  .main-wrapper { margin-left: 0 !important; }
  .main-content { padding: 1rem; }
  .datasets-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .mobile-menu-btn { display: flex !important; }
}

/* Schema View Styles */
.schema-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

.schema-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
}

.schema-code {
  margin: 0;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 600px;
  overflow-y: auto;
}

.schema-code code {
  color: var(--text-primary);
}

/* JSON Syntax Highlighting */
.json-key {
  color: #0049ff;
}

.json-string {
  color: #16a34a;
}

.json-number {
  color: #d97706;
}

.json-boolean {
  color: #9333ea;
}

.json-null {
  color: #6b7280;
}

[data-theme="dark"] .json-key {
  color: #60a5fa;
}

[data-theme="dark"] .json-string {
  color: #4ade80;
}

[data-theme="dark"] .json-number {
  color: #fbbf24;
}

[data-theme="dark"] .json-boolean {
  color: #c084fc;
}

[data-theme="dark"] .json-null {
  color: #9ca3af;
}

/* Companies Page Styles */
.companies-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.company-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 120px;
}

.company-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.company-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.companies-filters {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.companies-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 160px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  min-width: 180px;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-group-btn {
  min-width: auto;
}

.filter-group-btn label {
  visibility: hidden;
}

.filter-reset-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  height: 38px;
}

.filter-reset-btn:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.companies-table-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.companies-loading,
.companies-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--text-muted);
}

.companies-table {
  width: 100%;
  border-collapse: collapse;
}

.companies-table thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
}

.companies-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.companies-table th:hover {
  color: var(--text-primary);
}

.companies-table .sort-icon {
  margin-left: 0.25rem;
  font-size: 0.75rem;
}

.companies-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.companies-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.companies-table td code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  background: var(--accent-muted);
  color: var(--accent);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

.companies-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .companies-stats {
    flex-wrap: wrap;
  }
  
  .company-stat {
    flex: 1;
    min-width: 100px;
  }
  
  .companies-filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-group select,
  .filter-group input {
    width: 100%;
    min-width: unset;
  }
  
  .filter-group-btn {
    width: 100%;
  }
  
  .filter-group-btn label {
    display: none;
  }
  
  .filter-reset-btn {
    width: 100%;
    justify-content: center;
  }
  
  .companies-table-wrapper {
    overflow-x: auto;
  }
  
  .companies-table {
    min-width: 700px;
  }
}

/* Research Section Styles */
.research-loading,
.research-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  text-align: center;
}

.research-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.research-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.research-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.research-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.research-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.research-year {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.research-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.research-authors {
  color: var(--text-secondary);
  font-weight: 500;
}

.research-institution {
  color: var(--text-muted);
}

.research-institution::before {
  content: "•";
  margin-right: 0.5rem;
  color: var(--border-default);
}

.research-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.research-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .research-card {
    padding: 1rem;
  }
  
  .research-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .research-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .research-institution::before {
    display: none;
  }
}


/* What's New Popup Styles */
.whats-new-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.whats-new-overlay.active {
  opacity: 1;
  visibility: visible;
}

.whats-new-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s;
}

.whats-new-overlay.active .whats-new-popup {
  transform: translateY(0) scale(1);
}

.whats-new-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.whats-new-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.whats-new-title svg {
  color: var(--accent);
}

.whats-new-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.whats-new-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.whats-new-close svg {
  width: 20px;
  height: 20px;
}

.whats-new-version {
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.whats-new-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.whats-new-section {
  margin-bottom: 1.5rem;
}

.whats-new-section:last-child {
  margin-bottom: 0;
}

.whats-new-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.whats-new-section-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.whats-new-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.whats-new-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.whats-new-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.whats-new-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.whats-new-btn {
  padding: 0.625rem 2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.whats-new-btn:hover {
  background: var(--accent-hover);
}

/* What's New Link in Header */
.whats-new-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s;
  border-radius: var(--radius-md);
}

.whats-new-link:hover {
  color: var(--accent);
  background: var(--bg-tertiary);
}

.whats-new-link svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 480px) {
  .whats-new-popup {
    width: 95%;
    max-height: 90vh;
  }
  
  .whats-new-link span {
    display: none;
  }
  
  .whats-new-link {
    padding: 0.5rem;
  }
}

/* Market Coverage Page Styles */
.coverage-summary {
  background-color: #e5ecff;
  padding: 1em;
  border-radius: var(--radius-xl);
  margin-bottom: 10px;
  margin-top: -20px;
}

.coverage-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.coverage-summary-header .filter-group {
  margin: 0;
}

.coverage-summary-header .filter-group label {
  color: #4a5568;
}

.coverage-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.coverage-total-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.coverage-total-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #1a1a2e;
  margin-bottom: 0.125rem;
}

.coverage-total-label {
  font-size: 0.8rem;
  color: #4a5568;
}

.coverage-year-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #3b5bdb;
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.coverage-filters {
  margin-bottom: 1.5rem;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.coverage-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--text-muted);
}

.coverage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.coverage-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.coverage-card-error {
  opacity: 0.6;
  cursor: default;
}

.coverage-card-error:hover {
  transform: none;
  border-color: var(--border);
}

.coverage-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.coverage-card-icon {
  color: var(--accent);
}

.coverage-card-icon svg {
  width: 24px;
  height: 24px;
}

.coverage-card-title {
  font-weight: 600;
  color: var(--text-primary);
}

.coverage-card-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.coverage-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.coverage-card-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.coverage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #10b981 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.coverage-card-percent {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.coverage-card-error-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.coverage-chart-section {
  margin-bottom: 2rem;
}

.coverage-table-wrapper {
  overflow-x: auto;
}

.coverage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.coverage-table th,
.coverage-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.coverage-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.coverage-table tbody tr:hover {
  background: var(--bg-secondary);
}

.coverage-percent-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.coverage-mini-bar {
  width: 60px;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.coverage-mini-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.coverage-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .coverage-summary-grid {
    grid-template-columns: 1fr;
  }
  
  .coverage-total-value {
    font-size: 1.75rem;
  }
  
  .coverage-card-value {
    font-size: 1.5rem;
  }
  
  .coverage-grid {
    grid-template-columns: 1fr;
  }
}

.coverage-table-year-label {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}