/* ==========================================================================
   FAERSIndex Design System - Premium Dark Glassmorphism CSS
   ========================================================================== */

/* Design Tokens & Variables */
:root {
  --bg-app: #07090e;
  --bg-sidebar: #0a0d14;
  --bg-card: rgba(15, 23, 42, 0.45);
  --bg-card-hover: rgba(15, 23, 42, 0.65);
  --bg-input: rgba(15, 23, 42, 0.6);
  --bg-modal: rgba(7, 9, 14, 0.85);
  
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-active: rgba(0, 242, 254, 0.3);
  
  /* Color Palette */
  --cyan: #00f2fe;
  --purple: #9b51e0;
  --emerald: #00f5a0;
  --rose: #ff3860;
  --yellow: #ffdd57;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 15px rgba(0, 242, 254, 0.45);
  
  --font-family: 'Inter', sans-serif;
  --font-logo: 'Outfit', sans-serif;
  
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-logo);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.weight-light { font-weight: 300; }
.text-yellow { color: var(--yellow); }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-emerald { color: var(--emerald); }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* App Grid Layout */
.app-layout {
  display: grid;
  grid-template-rows: 70px 1fr;
  height: 100vh;
  width: 100vw;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(155, 81, 224, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.08) 0%, transparent 40%);
}

/* Top Navigation Bar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background-color: rgba(10, 13, 20, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo .icon {
  width: 28px;
  height: 28px;
}

.header-logo .logo-text {
  font-family: var(--font-logo);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #07090e;
  letter-spacing: 0.05em;
  margin-left: 6px;
}

.badge-lock {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--rose);
  color: var(--rose);
  margin-left: auto;
  letter-spacing: 0.02em;
}

/* Top Header Search */
.header-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 45%;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-family);
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Autocomplete Suggestion Dropdown */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: #0d1322;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-card);
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--cyan);
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* App Body Structure */
.app-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100%;
  overflow: hidden;
}

/* Navigation Sidebar */
.app-sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.1) 0%, rgba(155, 81, 224, 0.05) 100%);
  color: var(--cyan);
  border-left: 3px solid var(--cyan);
  padding-left: 13px;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
}

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green {
  background-color: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.status-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Content Viewport */
.dashboard-viewport {
  overflow-y: auto;
  padding: 32px;
  position: relative;
  background-color: #07090e;
}

.viewport-section {
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Search Landing View */
.hero-landing {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
}

.hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.12) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.6;
  z-index: 1;
}

.suggested-queries {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.suggest-label {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-suggest {
  padding: 6px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 13px;
  font-weight: 500;
}

.btn-suggest:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background-color: rgba(0, 242, 254, 0.05);
}

/* Dashboard View Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.drug-profile-title h2 {
  font-size: 32px;
  background: linear-gradient(90deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.drug-profile-title p {
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 4px;
}

/* Grid System */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* Premium Glass Cards */
.glass-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  margin-top: -12px;
}

/* Metrics Displays */
.metrics-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.metric-box {
  flex: 1;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  text-align: center;
}

.metric-value {
  display: block;
  font-family: var(--font-logo);
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Severity & Progress Bars */
.severity-breakdown h4 {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.bar-progress-container {
  margin-bottom: 14px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.bar-track {
  height: 6px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill.cyan { background-color: var(--cyan); }
.bar-fill.purple { background-color: var(--purple); }
.bar-fill.emerald { background-color: var(--emerald); }

/* Reactions List */
.reactions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reactions-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 13px;
  transition: var(--transition-fast);
}

.reactions-list li:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--cyan);
}

.reaction-name {
  color: var(--text-primary);
  font-weight: 500;
  text-transform: capitalize;
}

.reaction-count {
  color: var(--text-muted);
  font-size: 12px;
}

/* Chart Canvas Sizing */
.chart-container {
  position: relative;
  height: 220px;
  width: 100%;
}

.chart-container-large {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Risk Score Gauge */
.risk-score-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0;
}

.gauge-value {
  font-size: 48px;
  font-weight: 800;
  font-family: var(--font-logo);
  color: var(--rose);
}

.gauge-indicator {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--emerald) 0%, var(--yellow) 50%, var(--rose) 100%);
  border-radius: 4px;
  position: relative;
  margin: 16px 0;
}

#gauge-pin {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  background-color: var(--text-primary);
  border: 2px solid var(--bg-app);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.risk-note {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.risk-note p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: #07090e;
}
.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-glass-active);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.btn-icon:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

/* Table Toolbar Filters */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.filter-group select {
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 6px;
  font-family: var(--font-family);
  cursor: pointer;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--cyan);
}

.trials-count-badge {
  font-size: 13px;
  color: var(--text-muted);
}

.trials-count-badge span {
  color: var(--cyan);
  font-weight: 700;
}

/* Data Tables */
.table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.trials-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.trials-table th, .trials-table td {
  padding: 16px 24px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-glass);
}

.trials-table th {
  font-family: var(--font-logo);
  color: var(--text-secondary);
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.2);
}

.trials-table tr:last-child td {
  border-bottom: none;
}

.trials-table tbody tr {
  transition: var(--transition-fast);
}

.trials-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.nct-link {
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-logo);
  font-weight: 600;
}
.nct-link:hover {
  text-decoration: underline;
}

.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-tag.recruiting { background-color: rgba(0, 245, 160, 0.15); color: var(--emerald); }
.status-tag.completed { background-color: rgba(155, 81, 224, 0.15); color: #b185e8; }
.status-tag.active { background-color: rgba(0, 242, 254, 0.15); color: var(--cyan); }
.status-tag.other { background-color: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

/* Comparative Intel Layouts */
.intel-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(155, 81, 224, 0.03) 100%);
  border: 1px solid var(--border-glass-active);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.intel-alert-box .icon {
  width: 24px;
  height: 24px;
  color: var(--cyan);
  flex-shrink: 0;
}

.intel-alert-box h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.intel-alert-box p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.intel-matches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intel-match-card {
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 13px;
}

.intel-match-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-logo);
  font-weight: 600;
  margin-bottom: 6px;
}

.intel-match-body {
  color: var(--text-secondary);
  line-height: 1.4;
}

.intel-match-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(255, 56, 96, 0.1);
  color: var(--rose);
}

/* Tab Switching Control */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-modal);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 90%;
  max-width: 500px;
  background-color: #0c111e;
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: flex-end;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: 6px;
  font-family: var(--font-family);
}

.form-group input:focus {
  outline: none;
  border-color: var(--cyan);
}

.help-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.help-text a {
  color: var(--cyan);
  text-decoration: none;
}

/* Loader Screen Overlay */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(7, 9, 14, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-glass);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Subscription Gating & Lock Overlays Styles
   ========================================================================== */

/* Locked Container */
.pro-locked {
  position: relative;
}

/* Visual blur overlay for individual cards */
.pro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 30, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  animation: fadeIn 0.3s ease-out;
  border: 1px dashed var(--border-glass-active);
}

.lock-icon {
  width: 36px;
  height: 36px;
  color: var(--rose);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px rgba(255, 56, 96, 0.4));
}

.lock-icon-lg {
  width: 48px;
  height: 48px;
  color: var(--rose);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(255, 56, 96, 0.5));
}

.pro-overlay h4 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.pro-overlay p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 200px;
}

/* Overlay for Clinical Trials Table bottom */
.pro-overlay-table {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 14, 0.95) 40%, #07090e 100%);
  backdrop-filter: blur(2px);
  z-index: 15;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
}

.table-overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  padding: 24px;
}

.table-overlay-content h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 6px;
}

.table-overlay-content p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Locked full tabs (Comparative Intel & Dossiers) */
.pro-locked-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.pro-panel-overlay {
  text-align: center;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--border-glass);
  background-color: rgba(15, 23, 42, 0.4);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.pro-panel-overlay h2 {
  font-size: 24px;
  color: #fff;
  margin-bottom: 8px;
}

.pro-panel-overlay p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ==========================================================================
   Multi-Tier Subscription Classes Gating
   ========================================================================== */

/* Tier 1: Investor Catalyst unlocks demographics & full tables */
.user-is-investor .pro-overlay,
.user-is-investor .pro-overlay-table {
  display: none !important;
}

.user-is-investor .pro-locked {
  pointer-events: auto !important;
}

/* Tier 2: Pro unlocks EVERYTHING (including side-panel overlay tabs & badges) */
.user-is-pro .pro-overlay,
.user-is-pro .pro-overlay-table,
.user-is-pro .pro-locked-panel,
.user-is-pro .badge-lock {
  display: none !important;
}

.user-is-pro .pro-locked {
  pointer-events: auto !important;
}

/* Utility Helpers */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px !important; }
.font-bold { font-weight: 700 !important; }

/* ==========================================================================
   Print Layout Stylesheets (@media print)
   ========================================================================== */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .app-layout {
    display: block !important;
    background-image: none !important;
  }

  .app-header,
  .app-sidebar,
  .dashboard-actions,
  .filter-toolbar,
  #view-landing,
  .api-status,
  .dossier-builder-form {
    display: none !important;
  }

  .dashboard-viewport {
    padding: 0 !important;
    overflow-y: visible !important;
  }

  #view-dashboard {
    display: block !important;
  }

  .tab-panel {
    display: block !important; /* Force all tabs to display for print */
    page-break-after: always;
  }

  .glass-card {
    background-color: transparent !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    color: #000000 !important;
    page-break-inside: avoid;
    margin-bottom: 20px;
  }

  .card-title {
    color: #000000 !important;
    border-bottom: 2px solid #000000;
    padding-bottom: 4px;
  }

  .metric-box {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
  }

  .metric-value {
    color: #000000 !important;
    text-shadow: none !important;
  }

  .nct-link {
    color: #1e293b !important;
    text-decoration: underline !important;
  }

  .status-tag {
    border: 1px solid #cbd5e1 !important;
    background-color: transparent !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   Mobile Responsive Layouts (@media max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Layout shifts */
  .app-layout {
    grid-template-rows: auto 1fr;
    height: 100vh;
    overflow: hidden;
  }

  .app-header {
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 12px;
    align-items: stretch;
  }

  .header-logo {
    justify-content: center;
  }

  .header-search {
    width: 100%;
    max-width: none;
  }

  .header-actions {
    position: absolute;
    right: 16px;
    top: 16px;
  }

  .app-body {
    grid-template-columns: 1fr;
    height: calc(100vh - 120px); /* Height minus header height */
  }

  /* Navigation Sidebar becomes Bottom Bar */
  .app-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    flex-direction: row;
    padding: 0 12px;
    border-right: none;
    border-top: 1px solid var(--border-glass);
    background-color: rgba(10, 13, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 500;
  }

  .sidebar-nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    gap: 0;
  }

  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    font-size: 10px;
    border-left: none !important;
    text-align: center;
  }

  .nav-item.active {
    background: transparent;
    color: var(--cyan);
    border-top: 3px solid var(--cyan);
    padding-top: 1px;
    border-radius: 0;
  }

  .nav-item .icon {
    width: 18px;
    height: 18px;
  }

  .sidebar-footer, .badge-lock {
    display: none !important;
  }

  /* Viewport Adjustments */
  .dashboard-viewport {
    padding: 16px;
    padding-bottom: 80px; /* Space for bottom nav bar */
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .dashboard-actions {
    width: 100%;
  }

  .dashboard-actions .btn {
    width: 100%;
  }

  /* Grid layouts collapse to single column */
  .col-4, .col-6, .col-8, .col-12 {
    grid-column: span 12 !important;
  }

  .metrics-row {
    flex-direction: column;
  }

  /* Filters toolbar wrap */
  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .filter-group {
    justify-content: space-between;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trials-table th, .trials-table td {
    padding: 12px 14px;
    font-size: 12px;
  }

  /* Hero adjustments */
  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .suggested-queries {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Gated screens */
  .pro-panel-overlay {
    width: 90%;
    padding: 20px;
  }

  .pro-panel-overlay h2 {
    font-size: 20px;
  }

  .pro-overlay h4 {
    font-size: 14px;
  }

  .pro-overlay p {
    font-size: 11px;
  }
}

/* ==========================================================================
   Landing Page Overview Grid Styles
   ========================================================================== */
.landing-overview-grid {
  margin-top: 50px;
  width: 100%;
  max-width: 900px;
  text-align: left;
  z-index: 1;
}

.landing-intro-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}

.landing-intro-box p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.landing-grid-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.landing-feature-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon-wrapper.cyan-glow {
  background-color: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.feature-icon-wrapper.purple-glow {
  background-color: rgba(155, 81, 224, 0.1);
  border: 1px solid rgba(155, 81, 224, 0.2);
  color: var(--purple);
  box-shadow: 0 0 15px rgba(155, 81, 224, 0.15);
}

.landing-feature-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
  color: #fff;
}

.feature-tagline {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.landing-feature-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-feature-card ul li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  position: relative;
  padding-left: 18px;
}

.landing-feature-card ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--cyan);
  font-weight: bold;
}

.landing-feature-card:nth-child(2) ul li::before {
  color: var(--purple);
}

/* Mobile responsive collapse for landing overview */
@media (max-width: 768px) {
  .landing-grid-cols {
    grid-template-columns: 1fr;
  }
  .landing-overview-grid {
    margin-top: 30px;
    padding: 0 8px;
  }
}

/* ==========================================================================
   Data Accuracy & Disclaimer Footer Styles
   ========================================================================== */
.data-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(0, 245, 160, 0.05);
  border: 1px solid rgba(0, 245, 160, 0.15);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 6px;
}

.data-sync-badge .status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

.data-sync-badge #data-sync-timestamp {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 500;
  font-family: var(--font-logo);
}

.api-warning-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 56, 96, 0.1);
  border: 1px solid rgba(255, 56, 96, 0.3);
  color: #ff3860;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 500;
  animation: fadeIn 0.3s ease-out;
}

.api-warning-banner .icon-sm {
  width: 16px;
  height: 16px;
  color: var(--rose);
  flex-shrink: 0;
}

.dashboard-disclaimer-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  padding-bottom: 8px;
}

.dashboard-disclaimer-footer p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: justify;
}

@media print {
  .dashboard-disclaimer-footer {
    border-top: 1px solid #cbd5e1 !important;
    margin-top: 30px !important;
    page-break-inside: avoid;
  }
  .dashboard-disclaimer-footer p {
    color: #444444 !important;
  }
  .footer-policy-links {
    display: none !important;
  }
}

.footer-policy-links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}

.footer-policy-links a {
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-policy-links a:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.bullet-separator {
  color: var(--text-muted);
  font-size: 10px;
}


