* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #eef2f7; font-family: Arial, sans-serif; padding: 20px; }
.container { max-width: 1400px; margin: 0 auto; }
.header { background: linear-gradient(135deg, #0f2b3d, #1a5d7a); color: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; }

.config-selector { margin-top: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.config-selector select { padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.9); font-size: 13px; min-width: 200px; }
.btn-save-config, .btn-delete-config { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-save-config { background: #4CAF50; color: white; }
.btn-delete-config { background: #f44336; color: white; }

.stage-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.stage-btn { padding: 10px 20px; border: none; border-radius: 25px; cursor: pointer; background: white; }
.stage-btn.active { background: #1e3a8a; color: white; }

.two-columns { display: flex; gap: 20px; }
.left-panel { flex: 1; min-width: 400px; }
.right-panel { flex: 2; }

.card { background: white; border-radius: 10px; padding: 15px; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 15px; border-left: 3px solid #2563eb; padding-left: 10px; }

.form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 100px; }
.form-group label { display: block; font-size: 11px; font-weight: bold; color: #64748b; }
.form-group input, .form-group select { width: 100%; padding: 6px; border: 1px solid #cbd5e1; border-radius: 8px; }

.btn-calculate { background: #1e3a8a; color: white; padding: 12px; border: none; border-radius: 25px; width: 100%; cursor: pointer; font-weight: bold; margin-top: 10px; }
.btn-calculate:hover { background: #2563eb; }

.irr-results { display: flex; gap: 15px; margin-bottom: 20px; }
.irr-card { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: white; padding: 15px; border-radius: 10px; flex: 1; text-align: center; }
.irr-card .value { font-size: 28px; font-weight: bold; }
.irr-card .label { font-size: 12px; opacity: 0.8; }

.tab-buttons { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.tab-btn { background: #f1f5f9; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; }
.tab-btn.active { background: #1e3a8a; color: white; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.financial-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.financial-table th, .financial-table td { border: 1px solid #e2e8f0; padding: 6px; text-align: right; }
.financial-table td:first-child { text-align: left; background: #f1f5f9; font-weight: bold; position: sticky; left: 0; }
.financial-table th:first-child { position: sticky; left: 0; background: #1e3a8a; }
.financial-table th { background: #1e3a8a; color: white; position: sticky; top: 0; }

.scrollable { overflow-x: auto; max-height: 500px; overflow-y: auto; position: relative; }

.investment-schedule-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.investment-schedule-table th, .investment-schedule-table td { border: 1px solid #cbd5e1; padding: 5px; text-align: center; font-size: 12px; }
.investment-schedule-table th { background: #e2e8f0; }

.count-input { width: 60px; text-align: center; }

.negative-cash { background: #ffebee; color: #c62828; }
.positive-cash { background: #e8f5e9; color: #2e7d32; }
.investment-row { background: #fff3e0; }

.note { font-size: 11px; color: #64748b; margin-top: 8px; }

.print-btn { background: #4caf50; color: white; border: none; padding: 5px 10px; border-radius: 15px; cursor: pointer; margin-right: 5px; }

.charts-page { display: none; }
.charts-page.active { display: block; }

.back-button { background: #64748b; color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; margin-bottom: 15px; }

.chart-container { height: 400px; margin-bottom: 30px; }

.explanation-text { background: #f0fdf4; border-left: 4px solid #22c55e; padding: 12px; margin-bottom: 16px; font-size: 12px; border-radius: 8px; }

footer { text-align: center; margin-top: 20px; font-size: 11px; color: #64748b; }

.grant-note { background: #fef3c7; border-left: 4px solid #f59e0b; padding: 10px 15px; margin-top: 20px; border-radius: 8px; font-size: 12px; }

.summary-box { background: linear-gradient(135deg, #f8fafc, #e2e8f0); border-radius: 12px; padding: 15px; margin-bottom: 20px; border-left: 4px solid #10b981; }
.summary-box h4 { color: #1e3a8a; margin-bottom: 12px; font-size: 14px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.summary-item { background: white; padding: 10px; border-radius: 8px; text-align: center; }
.summary-item .label { font-size: 11px; color: #64748b; }
.summary-item .value { font-size: 18px; font-weight: bold; color: #1e3a8a; }

.asset-summary-card { background: white; border-radius: 10px; padding: 15px; border: 1px solid #e2e8f0; margin-bottom: 15px; }
.asset-summary-card .title { font-weight: bold; color: #1e3a8a; margin-bottom: 10px; font-size: 16px; text-align: center; }
.asset-summary-card .row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.asset-summary-card .row .label { color: #64748b; }
.asset-summary-card .row .value { font-weight: bold; }

.financing-summary .fin-card .label { font-size: 11px; color: #64748b; }
.financing-summary .fin-card .value { font-size: 20px; font-weight: bold; color: #1e3a8a; }

@media print { .stage-buttons, .tab-buttons, .btn-calculate, .print-btn, .back-button { display: none; } }