:root {
  --accent: #2563eb;
  --bg-dark: #1e293b;
  --bg-lite: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-lite); color: var(--text-main); }

.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR - Fixed on Desktop, Scrollable on Mobile */
.sidebar { width: 340px; background: white; border-right: 1px solid #e2e8f0; padding: 40px 30px; display: flex; flex-direction: column; gap: 40px; flex-shrink: 0; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo { 
  width: 40px; 
  height: 40px; 
  background: var(--accent); 
  color: white; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border-radius: 10px; 
}

.brand-text { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.brand-text span { color: var(--accent); }

.brand-subtitle {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-left: 2px;
}

.brand-subtitle b {
  color: var(--text-main);
  font-weight: 700;
}

.developer-credit {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding-left: 2px;
  opacity: 0.8;
}

.control-panel { display: flex; flex-direction: column; gap: 28px; }
.group .header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.group b { color: var(--accent); background: #eff6ff; padding: 2px 8px; border-radius: 6px; }

.slider { width: 100%; -webkit-appearance: none; height: 6px; background: #e2e8f0; border-radius: 10px; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: white; border: 2px solid var(--accent); border-radius: 50%; cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.risk-accent { background: linear-gradient(90deg, #22c55e, #eab308, #ef4444); }

.primary-btn { background: var(--bg-dark); color: white; border: none; padding: 18px; border-radius: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.3s; }
.primary-btn:hover { background: var(--accent); transform: translateY(-2px); }

/* CONTENT */
.content { flex: 1; padding: 40px 60px; overflow-y: auto; scroll-behavior: smooth; }
.hidden { display: none; }

.hero { height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-icon { width: 80px; height: 80px; color: #cbd5e1; margin-bottom: 20px; }

.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.dash-header h2 { font-size: 2.4rem; margin: 5px 0; }
.badge { background: #dbeafe; color: #1e40af; font-weight: 800; font-size: 0.75rem; padding: 6px 12px; border-radius: 6px; }

/* PROJECTION */
.projection-section { display: grid; grid-template-columns: 1fr 300px; gap: 25px; margin-bottom: 50px; }
.chart-box, .values-box { background: white; padding: 30px; border-radius: 24px; border: 1px solid #e2e8f0; }
.canvas-wrap { height: 300px; }

.yoy-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-weight: 600; }
.yoy-item b { color: #15803d; }

/* FUND GRID - 2x4 Layout on Desktop */
.fund-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 25px; }

.fund-card { background: white; border-radius: 24px; padding: 30px; border: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 22px; transition: 0.3s; }
.fund-card:hover { border-color: var(--accent); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); }

.f-head .f-cat { font-weight: 800; color: var(--accent); font-size: 0.7rem; text-transform: uppercase; }
.f-head .f-name { font-size: 1.2rem; font-weight: 700; height: 3rem; margin-top: 5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.f-analytics { display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.mini-chart-wrap { height: 140px; }

.f-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-item { background: #f1f5f9; padding: 10px; border-radius: 12px; }
.m-item label { font-size: 0.65rem; color: var(--text-muted); display: block; }
.m-item div { font-weight: 700; font-size: 0.9rem; }

.f-insight { background: #f0fdf4; border-left: 4px solid #22c55e; padding: 15px; border-radius: 8px; font-size: 0.85rem; line-height: 1.5; color: #166534; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
  .app-shell { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid #e2e8f0; padding: 30px; }
  .content { padding: 30px; }
  .projection-section { grid-template-columns: 1fr; }
  .fund-grid { grid-template-columns: 1fr; }
}
