/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #020617, #020617, #020617);
  border-right: 1px solid rgba(148, 163, 255, 0.15);
  padding: 24px 20px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5e7eb;
  margin-bottom: 32px;
}

.logo span {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.18s ease-out;
}

.nav-link.active,
.nav-link:hover {
  background: var(--accent-soft);
  color: #e5edff;
}

/* Main */
.main {
  padding: 24px 26px 32px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 1.6rem;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.header-meta {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--accent-soft);
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.badge-soft {
  background: rgba(15, 23, 42, 0.7);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.kpi-card {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), #020617 52%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.kpi-card h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.kpi-value {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.chart-card {
  background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), #020617 60%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 255, 0.35);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
}

.chart-header h2 {
  font-size: 1rem;
}

.chart-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-placeholder {
  margin-top: 12px;
  font-size: 0.8rem
}

.chart-container {
  margin-top: 12px;
  border-radius: var(--radius-md);
  padding: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 255, 0.35);
  height: 260px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}



/* Scenario controls */
.scenario-controls {
  margin-bottom: 20px;
}

.control-card {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), #020617 60%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 255, 0.4);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-subtle);
}

.control-header h2 {
  font-size: 1rem;
}

.control-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.control-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.control-item {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 255, 0.25);
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.control-label-row label {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.control-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.control-hint {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.control-item input[type="range"] {
  width: 100%;
  margin-top: 4px;
}

.control-item-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn-reset {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 255, 0.6);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.85), rgba(129, 140, 248, 0.9));
  color: #f9fafb;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s ease-out;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.75);
}

.btn-reset:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-reset:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.9);
}


/* ============================= */
/*   Visual polish & micro-UX    */
/* ============================= */

/* Generic "glass" surface feel */
.kpi-card,
.chart-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* KPI cards: subtle lift + soft glow on hover */
.kpi-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
  background: radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.12),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.98),
      rgba(15, 23, 42, 0.9)
    );
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at top left,
    rgba(129, 140, 248, 0.28),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(148, 163, 255, 0.6);
  border-color: rgba(148, 163, 255, 0.6);
  background: radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.16),
      transparent 55%
    ),
    linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.98),
      rgba(15, 23, 42, 0.9)
    );
}

.kpi-card:hover::before {
  opacity: 1;
}

/* KPI main value: cleaner gradient text (subtle) */
.kpi-value {
  background: linear-gradient(135deg, #ffffff, #bfdbfe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* KPI subtitle text a bit softer */
.kpi-label {
  color: #9ca3af;
}

/* Chart cards: refined border + inner glow */
.chart-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg, 22px);
  border: 1px solid rgba(148, 163, 255, 0.3);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%),
    linear-gradient(145deg, #020617, #020617);
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.chart-card::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.16),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(129, 140, 248, 0.7);
  border-color: rgba(129, 140, 248, 0.8);
}

.chart-card:hover::after {
  opacity: 1;
}

/* Chart header typography tweak */
.chart-header h2 {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.chart-header .chart-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Slightly more breathing room inside chart container */
.chart-container {
  padding: 0.5rem 0.25rem 0.75rem;
  min-height: 220px;
}

/* Tabs: clean pill style + override inline styles */
.tab-btn {
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  background: rgba(15, 23, 42, 0.6) !important;
  color: #9ca3af !important;
  font-size: 0.85rem !important;
  padding: 8px 14px !important;
  cursor: pointer !important;
  transition:
    background 0.18s ease-out,
    color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out;
}

.tab-btn.active {
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.28),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98) !important;
  color: #e5e7eb !important;
  border-color: rgba(129, 140, 248, 0.7) !important;
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.7),
    0 10px 26px rgba(15, 23, 42, 0.9);
}

/* Sidebar logo slight glow */
.sidebar .logo {
  text-shadow: 0 0 12px rgba(37, 99, 235, 0.55);
}

/* Badges a bit more "tag" style */
.badge {
  border-radius: 999px;
  padding-inline: 0.75rem;
  padding-block: 0.25rem;
}

.badge-soft {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 255, 0.4);
  color: #c7d2fe;
}



/* ============================= */
/*   AI-style Insights panel     */
/* ============================= */

.insights-card {
  margin-top: 1.75rem;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius-lg, 22px);
  border: 1px solid rgba(148, 163, 255, 0.35);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 55%),
    linear-gradient(145deg, #020617, #020617);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.insights-header h2 {
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e5e7eb;
  margin-bottom: 0.25rem;
}

.insights-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.insights-body ul li strong {
  color: #e5e7eb;
}



/* ============================= */
/*   Investor summary strip      */
/* ============================= */

.investor-strip {
  margin-top: 1.2rem;
  margin-bottom: 1.6rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg, 22px);
  border: 1px solid rgba(148, 163, 255, 0.4);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 55%),
    linear-gradient(135deg, #020617, #020617);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1024px) {
  .investor-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .investor-strip {
    grid-template-columns: 1fr;
  }
}

.investor-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.investor-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.investor-value {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
}

.investor-help {
  font-size: 0.78rem;
  color: #9ca3af;
}


/* ============================= */
/*   Dashboard footer disclaimer */
/* ============================= */

.dashboard-footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}
