/* CSS Design System for Bio-Predictor Dashboard */

:root {
  /* Colors */
  --bg-base: #0a0d14;
  --bg-panel: rgba(18, 22, 33, 0.75);
  --bg-panel-hover: rgba(26, 32, 48, 0.85);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(16, 185, 129, 0.4);
  
  --text-main: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-dark: #4b5563;

  /* Accent Colors */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.15);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.15);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.15);
  --amber: #f59e0b;
  
  /* Fonts */
  --font-family-base: 'Noto Sans KR', sans-serif;
  --font-family-outfit: 'Outfit', sans-serif;
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-family-base);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
}

.font-outfit {
  font-family: var(--font-family-outfit);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.5rem;
  max-width: 1800px;
  margin: 0 auto;
}

/* Glassmorphism Panel style */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 2rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-area h1 {
  font-family: var(--font-family-outfit);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pulse-icon {
  width: 28px;
  height: 28px;
  animation: pulse 2s infinite alternate;
}

.version-tag {
  font-size: 0.75rem;
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

/* Search bar & Controls */
.search-and-control {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-grow: 1;
  max-width: 800px;
}

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

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

#stockSearchInput {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: all 0.3s;
}

#stockSearchInput:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.autocomplete-list {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: #0f131f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: none;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s;
}

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

.autocomplete-item .item-name {
  font-weight: 500;
}

.autocomplete-item .item-code {
  color: var(--text-secondary);
  font-family: var(--font-family-outfit);
  font-size: 0.8rem;
}

.filter-controls {
  display: flex;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.control-group label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.filter-controls select {
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.system-time {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Panel Header */
.panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.panel-header.flex-between {
  justify-content: space-between;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title i {
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-secondary);
}

.badge-accent {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Stock Selector Grid */
.stock-quick-picker {
  display: flex;
  flex-direction: column;
}

.status-filters {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.status-btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.status-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.status-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem;
  max-height: 240px;
  overflow-y: auto;
}

.stock-card {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}

.stock-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.stock-card.active {
  background: var(--cyan-glow);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

.stock-card.active::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background-color: var(--cyan);
  border-radius: 50%;
}

.stock-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
}

.stock-card-code {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-family-outfit);
}

.stock-card-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.6rem;
  padding: 0.05rem 0.2rem;
  border-radius: 4px;
}

.stock-card-badge.delisted, .stock-card-badge.suspended {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
}

/* Main Chart Panel */
.selected-stock-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stock-title-main {
  font-size: 1.4rem;
  font-weight: 800;
}

.stock-code-main {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.stock-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-badge.suspended, .stock-badge.delisted {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.live-price-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-family-outfit);
  font-size: 0.72rem;
  font-weight: 600;
}

.live-price-status.loading {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.08);
}

.live-price-status.live {
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
}

.live-price-status.cached {
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.08);
}

.live-price-status.muted {
  color: var(--text-secondary);
}

.chart-toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.chart-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chart-toggle-btn.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.chart-toggle-btn i {
  width: 14px;
  height: 14px;
}

.stock-description-box {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.1);
}

.chart-container {
  padding: 1.5rem;
  position: relative;
  width: 100%;
}

.chart-container canvas {
  cursor: grab;
  touch-action: none;
}

.chart-container canvas.is-panning {
  cursor: grabbing;
}

.main-chart-panel .chart-container {
  height: 480px;
}

.prediction-chart-panel .chart-container {
  height: 280px;
}

.chart-footer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chart-footer-info i {
  width: 16px;
  height: 16px;
}

.ad-slot-panel {
  min-height: 96px;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.07), rgba(168, 85, 247, 0.05)),
    rgba(15, 23, 42, 0.42);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.ad-slot-label {
  color: var(--cyan);
  font-family: var(--font-family-outfit);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ad-slot-copy {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.service-disclaimer {
  margin: 0.8rem 1.25rem 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(245, 158, 11, 0.06);
  font-size: 0.78rem;
  line-height: 1.55;
}

.policy-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.25rem 0 1rem;
  font-size: 0.78rem;
}

.policy-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.policy-links a:hover {
  color: var(--cyan);
}

.policy-page {
  width: min(860px, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 2rem;
  color: var(--text-main);
}

.policy-page h1 {
  margin: 1rem 0 1.5rem;
  font-size: 1.8rem;
  font-weight: 900;
}

.policy-page h2 {
  margin: 1.5rem 0 0.5rem;
  color: var(--cyan);
  font-size: 1rem;
}

.policy-page p {
  color: var(--text-secondary);
  line-height: 1.75;
}

.policy-back-link {
  color: var(--emerald);
  font-size: 0.85rem;
  text-decoration: none;
}

.policy-updated {
  margin-top: 2rem;
  font-family: var(--font-family-outfit);
  font-size: 0.78rem;
}

/* Probability Panel */
.probability-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
}

.prob-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.prob-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.prob-value {
  font-size: 2.2rem;
  font-weight: 800;
}

.prob-box.up .prob-value {
  color: var(--emerald);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.prob-box.down .prob-value {
  color: var(--rose);
  text-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}

.prob-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}

.prob-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.bg-emerald { background-color: var(--emerald); }
.bg-rose { background-color: var(--rose); }

.prob-center {
  padding: 0 1.5rem;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  text-align: center;
}

.gauge-center {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.gauge-center.bullish { color: var(--emerald); }
.gauge-center.bearish { color: var(--rose); }

.expected-return-banner {
  padding: 0.75rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 16px 16px;
  font-size: 0.85rem;
}

.expected-return-banner strong {
  font-size: 1rem;
}

.expected-return-banner strong.positive { color: var(--emerald); }
.expected-return-banner strong.negative { color: var(--rose); }

/* TOP Matches list */
.top-matches-panel {
  display: flex;
  flex-direction: column;
}

.matches-list {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 250px;
  overflow-y: auto;
}

.match-item {
  display: grid;
  grid-template-columns: 3.5rem 1.2fr 0.8fr 1fr;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.match-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.match-rank {
  font-family: var(--font-family-outfit);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--cyan);
}

.match-stock-info {
  display: flex;
  flex-direction: column;
}

.match-stock-name {
  font-weight: 600;
}

.match-period {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.match-similarity {
  text-align: right;
  padding-right: 1rem;
}

.match-score {
  font-family: var(--font-family-outfit);
  font-weight: 700;
  color: var(--emerald);
}

.match-trend {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: right;
}

.trend-up { color: var(--emerald); }
.trend-down { color: var(--rose); }

.recommendations-panel {
  display: flex;
  flex-direction: column;
}

.recommendations-list {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recommendation-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.recommendation-item:hover,
.recommendation-item.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.recommendation-rank {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald);
}

.recommendation-main,
.recommendation-metrics {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recommendation-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-main small,
.recommendation-metrics small {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.recommendation-metrics {
  align-items: flex-end;
}

.no-match-placeholder {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 2rem 0;
}

.prediction-info-text {
  padding: 0.75rem 1.5rem 0 1.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Timeline */
.timeline-panel {
  display: flex;
  flex-direction: column;
}

.timeline-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.bg-blue { background-color: var(--cyan); }
.bg-purple { background-color: var(--purple); }
.bg-green { background-color: var(--emerald); }
.bg-red { background-color: var(--rose); }

.timeline-scroller-container {
  overflow-x: auto;
  padding: 1.5rem;
  width: 100%;
}

.timeline-track {
  display: flex;
  gap: 1.25rem;
  min-width: max-content;
  padding-bottom: 0.5rem;
}

.timeline-card {
  width: 260px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.timeline-card.highlight {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.05);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.timeline-date {
  font-family: var(--font-family-outfit);
  font-weight: 700;
  color: var(--cyan);
}

.timeline-stock-badge {
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.7rem;
}

.timeline-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0.1rem 0;
}

.timeline-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event Types Color Borders for Timeline */
.timeline-card.type-clinical { border-left: 3px solid var(--cyan); }
.timeline-card.type-approval { border-left: 3px solid var(--purple); }
.timeline-card.type-licensing { border-left: 3px solid var(--emerald); }
.timeline-card.type-issue { border-left: 3px solid var(--rose); }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
  padding-right: 1.5rem;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.close-modal-btn:hover {
  color: #fff;
}

.modal-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-item i {
  width: 14px;
  height: 14px;
}

.modal-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.modal-impact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.85rem;
}

.modal-impact.impact-positive {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.modal-impact.impact-negative {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.15);
}

.modal-impact.impact-neutral {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.3)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7)); }
}

/* Responsive Grid adaptation */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
  .search-and-control {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }
  .filter-controls {
    flex-wrap: wrap;
  }
  .control-group {
    flex: 1;
  }
  .timeline-legend {
    display: none;
  }
}

/* Algorithm Details Panel Custom Styles */
.algo-details-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.algo-details-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cyan);
}

.algo-vars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.algo-var-chip {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.algo-var-label {
  color: var(--text-secondary);
}

.algo-var-value {
  font-family: var(--font-family-outfit);
  font-weight: 700;
  color: var(--cyan);
}

.future-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.future-event-tile {
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 3px solid var(--purple);
}

.future-event-tile.type-licensing { border-left-color: var(--emerald); }
.future-event-tile.type-issue { border-left-color: var(--rose); }
.future-event-tile.type-approval { border-left-color: var(--purple); }
.future-event-tile.type-clinical { border-left-color: var(--cyan); }

.future-event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.future-event-date {
  font-family: var(--font-family-outfit);
  font-weight: 700;
  color: var(--cyan);
}

.future-event-prob {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple);
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}
.future-event-tile.type-licensing .future-event-prob {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}
.future-event-tile.type-clinical .future-event-prob {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
}
.future-event-tile.type-issue .future-event-prob {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
}

.future-event-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
