:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --sidebar-w: 340px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg-main); color: var(--text-main); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* Top Navbar */
.navbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem; cursor: pointer; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); }

/* Main Layout Shell */
.app-shell { display: flex; flex: 1; height: calc(100vh - 60px); overflow: hidden; position: relative; }

/* Collapsible Left Sidebar */
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: transform 0.3s ease, margin-left 0.3s ease; }
.sidebar.collapsed { margin-left: calc(-1 * var(--sidebar-w)); }
.sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.idea-list { overflow-y: auto; flex: 1; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }

/* Horizontal Idea Cards */
.idea-card { display: flex; gap: 0.75rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: 0.2s border, 0.2s transform; }
.idea-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.idea-card.active { border-color: var(--primary); background: #eff6ff; }
.card-thumb { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
.card-content { flex: 1; min-width: 0; }
.card-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0.4rem; font-size: 0.75rem; color: var(--text-muted); }

/* Badges */
.badge-free { background: #dcfce7; color: #15803d; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.badge-locked { background: #fee2e2; color: #b91c1c; padding: 2px 6px; border-radius: 4px; }

/* Content Workspace */
.workspace { flex: 1; overflow-y: auto; padding: 1.5rem; position: relative; }
.view-panel { display: none; }
.view-panel.active { display: block; }

/* Financial Visualizer Grid */
.interactive-calc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat-card { background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
.stat-val { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-top: 0.25rem; }

/* 28 Details Grid */
.details-accordion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.detail-box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
.detail-box h4 { font-size: 0.9rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; color: var(--text-main); }
.detail-content { font-size: 0.85rem; color: #334155; line-height: 1.4; white-space: pre-line; }

/* Modal Styles */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 12px; width: 90%; max-width: 480px; padding: 1.5rem; }

/* Hero Banner */
.biz-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; background: var(--surface); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 1.25rem; }
.biz-hero-info { flex: 1; }
.biz-pill { display: inline-block; background: #e0f2fe; color: #0369a1; font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; margin-bottom: 0.5rem; }
.biz-lead { font-size: 0.95rem; color: var(--text-muted); margin: 0.4rem 0 0.8rem; line-height: 1.4; }
.biz-core-idea { background: var(--bg-main); padding: 0.75rem; border-left: 4px solid var(--primary); border-radius: 4px; font-size: 0.85rem; line-height: 1.4; }
.biz-hero-img { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }

/* KPI Ribbon */
.kpi-ribbon { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.kpi-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; display: flex; align-items: center; gap: 0.75rem; }
.kpi-icon { font-size: 1.6rem; }
.kpi-chip small { color: var(--text-muted); font-size: 0.75rem; display: block; }

/* Interactive Calculator */
.interactive-calc-panel { background: var(--surface); border: 2px solid #bfdbfe; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; }
.service-selector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.service-option-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; cursor: pointer; transition: 0.2s all; }
.service-option-card:hover { border-color: var(--primary); }
.service-option-card.active { border-color: var(--primary); background: #eff6ff; }
.svc-name { font-weight: 700; font-size: 0.9rem; }
.svc-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin: 0.25rem 0; }
.svc-unit { font-size: 0.75rem; font-weight: normal; color: var(--text-muted); }

/* Slider */
.slider-wrapper { margin: 1rem 0; }
.slider-labels { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.badge-volume { background: #e2e8f0; padding: 2px 8px; border-radius: 12px; font-weight: bold; font-size: 0.8rem; }
#monthlyJobsSlider { width: 100%; height: 6px; border-radius: 3px; accent-color: var(--primary); cursor: pointer; }

/* Financial Output Row */
.fin-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.stat-box { background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; text-align: center; }
.stat-number { font-size: 1.35rem; font-weight: 800; margin-top: 0.25rem; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Alert Box */
.interconnected-alert { margin-top: 1rem; background: #fffbeb; border-left: 4px solid #f59e0b; padding: 0.75rem; border-radius: 4px; font-size: 0.85rem; color: #92400e; }

/* Sub Tabs */
.workspace-tabs-nav { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.sub-tab-btn { background: none; border: none; padding: 0.6rem 1rem; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.sub-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; }

/* Grids & Cards */
.split-col-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.card-section { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.card-section h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }
.section-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

/* Process Timeline */
.process-timeline { display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-item { display: flex; gap: 0.75rem; border-left: 2px solid var(--border); padding-left: 0.75rem; position: relative; }
.step-badge { font-size: 0.75rem; font-weight: 700; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; height: fit-content; }
.timeline-body h4 { font-size: 0.85rem; margin-bottom: 0.25rem; }
.time-tag { font-size: 0.75rem; color: var(--text-muted); font-weight: normal; }
.timeline-body p { font-size: 0.8rem; color: #475569; margin-bottom: 0.3rem; }
.step-meta { font-size: 0.75rem; background: var(--bg-main); padding: 0.4rem; border-radius: 4px; }

/* Data Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th, .data-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-muted); font-weight: 600; }

/* Risk Cards */
.risk-card { padding: 0.75rem; border-radius: 6px; border: 1px solid var(--border); margin-bottom: 0.6rem; font-size: 0.8rem; }
.risk-high { border-left: 4px solid var(--danger); background: #fef2f2; }
.risk-medium { border-left: 4px solid #f59e0b; background: #fffbeb; }
.risk-header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 0.3rem; }
.badge-risk { font-size: 0.7rem; color: var(--text-muted); }

/* Utilities */
.mt-1 { margin-top: 1rem; }
ul { padding-left: 1.2rem; font-size: 0.85rem; line-height: 1.5; color: #334155; }

/* Pricing Grid */
.pricing-grid { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: 270px; text-align: center; position: relative; }
.pricing-card.popular { border-color: var(--primary); box-shadow: 0 10px 25px -5px rgba(37,99,235,0.15); }
.badge-popular { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; }
.pricing-amount { font-size: 2.2rem; font-weight: 800; margin: 1rem 0 0.5rem; color: var(--text-main); }
.pricing-sub { font-size: 0.85rem; color: var(--text-muted); min-height: 40px; margin-bottom: 1.5rem; }

/* Buttons */
.btn-buy { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-buy:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary) !important; color: white !important; border: none !important; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { padding: 8px 16px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; }
.btn-danger { background: var(--danger); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }

/* Locked Modal Layout */
.locked-modal-box { max-width: 520px; padding: 0; overflow: hidden; }
.locked-modal-img-wrap { position: relative; height: 160px; background: #0f172a; }
.locked-modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.locked-badge-float { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.75); color: #f59e0b; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.locked-modal-body { padding: 1.5rem; }
.locked-cat-tag { color: var(--primary); font-size: 0.8rem; font-weight: 700; margin-bottom: 0.4rem; }
.locked-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 1rem; }
.locked-stat-box { display: flex; justify-content: space-between; align-items: center; background: var(--bg-main); padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.locked-features-list { font-size: 0.8rem; color: #475569; display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }
.modal-actions-row { display: flex; gap: 0.5rem; }

/* Gateway Options */
.gateway-options-list { display: flex; flex-direction: column; gap: 0.75rem; }
.gateway-option { border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.gateway-option:hover { border-color: var(--primary); background: #eff6ff; }

/* Profile Card */
.profile-card { max-width: 600px; margin: 2rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; }