/* Editores de curvas: um período por linha e rolagem vertical. */
.curve-dialog {width:min(650px,96vw);padding:16px 18px;}
.curve-dialog .footer {margin-top:12px;padding-top:12px;}
.curve-matrix {width:100%;max-height:52vh;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;}
.curve-matrix .tablewrap {margin:0;overflow:visible;}
.curve-matrix table {width:100%;min-width:0;table-layout:auto;}
.curve-matrix th,.curve-matrix td {white-space:nowrap;padding:3px 4px;}
.curve-matrix th:not(:first-child),.curve-matrix td:not(:first-child) {min-width:82px;}
.curve-matrix td:first-child,.curve-matrix th:first-child {min-width:80px;max-width:150px;white-space:normal;background:#f3f7f9;}
.curve-matrix thead th {position:sticky;top:0;z-index:2;text-align:right;}
.curve-matrix thead th:first-child {z-index:3;text-align:left;}
.curve-matrix td:not(:first-child) {text-align:right;}
.curve-matrix input:not([type=checkbox]) {min-width:74px;width:120px;max-width:100%;height:27px;min-height:27px;}
.curve-matrix .error,.curve-toolbar .error {color:#a42332;}
.curve-toolbar {display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:9px 0;font-size:12px;}
.curve-toolbar label {display:flex;align-items:center;gap:6px;margin:0;}
.curve-toolbar input[type=number] {width:80px;min-height:28px;height:28px;padding:3px 6px;margin:0;text-align:right;}
.curve-toolbar button,.curve-actions button,.curve-components button {padding:4px 7px;min-height:28px;font-size:12px;}
.curve-toolbar [role=status] {margin-right:auto;font-weight:600;}
.curve-toolbar small {color:#526d7b;font-size:12px;}
.curve-heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:7px;}
.curve-heading h2 {font-size:16px;margin:0;}
.curve-actions {display:flex;flex-wrap:wrap;gap:5px;}
.curve-month-cell {display:flex;align-items:center;gap:3px;}
.curve-matrix .curve-month-cell input {width:76px;min-width:70px;}
.curve-matrix .remove-point {padding:0;width:20px;min-height:22px;height:22px;border:0;background:transparent;color:#617681;font-size:17px;}
.curve-matrix .remove-point:hover {background:#fce8eb;color:#a42332;}
.ramp-toolbar {margin:8px 0;}
.ramp-toolbar input[type=number] {width:70px;}
.curve-schedule-detail>summary {cursor:pointer;font-size:12px;font-weight:600;padding:5px 0;}
.curve-summary {margin-top:5px;max-height:none;}
.curve-summary th,.curve-summary td {min-width:70px!important;}
.curve-summary th:first-child,.curve-summary td:first-child {min-width:180px!important;}
.curve-components td:last-child {display:flex;gap:5px;flex-wrap:wrap;}
.viability-row-label{display:flex;align-items:center;gap:5px;min-height:25px;}
.viability-depth-1{padding-left:18px}.viability-depth-2{padding-left:40px}
.viability-group-toggle{width:22px;height:22px;min-height:22px;padding:0;border:1px solid #bdcfd6;border-radius:3px;font-size:17px;line-height:18px;flex:none;background:#fff;color:#10364a;}
.financial-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0;}
.financial-charts .cash-panel{margin:0;min-width:0;padding:10px;}
.cash-panel-metrics{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:11px;}
.cash-panel .cash-chart{width:100%;margin:5px 0;}
.cash-panel .hint{margin:5px 0;}
.expense-months h3{margin:0 0 5px;font-size:15px;}
.expense-months .tablewrap{max-height:60vh;overflow:auto;overscroll-behavior:contain;}
.expense-months table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:11px;}
.expense-months th,.expense-months td{padding:4px 6px;white-space:nowrap;text-align:right;min-width:105px;}
.expense-months tbody th:first-child,.expense-months thead th:first-child{position:sticky;left:0;z-index:2;background:#f1f6f8;text-align:left;min-width:240px;max-width:300px;white-space:normal;}
.expense-months thead th{position:sticky;top:0;z-index:3;background:#eaf2f5;}
.expense-months thead th:first-child{z-index:4;}
.expense-months .formula-help{margin-left:5px;vertical-align:middle;min-height:20px;height:20px;width:20px;padding:0;line-height:18px;font-size:11px;}
.expense-months tbody th:first-child{font-size:11px;font-weight:400;text-transform:none;letter-spacing:0;color:inherit;}
.expense-months tbody .worksheet-subtotal th:first-child{font-weight:600;}
.cash-panel .cash-chart text{font-size:17px;}
.viability-worksheet .compact-grid th:nth-child(n+3),.viability-worksheet .compact-grid td:nth-child(n+3),.viability-worksheet .compact-grid td:nth-child(n+3) input{text-align:center;}
.viability-worksheet .compact-grid td:first-child{width:20%;min-width:175px;}
.viability-worksheet .compact-grid td:nth-child(3),.viability-worksheet .compact-grid td:nth-child(6),.viability-worksheet .compact-grid td:nth-child(9){min-width:60px;width:auto;}
.viability-worksheet .compact-grid td:nth-child(4),.viability-worksheet .compact-grid td:nth-child(7),.viability-worksheet .compact-grid td:nth-child(10){min-width:75px;}
.viability-worksheet .compact-grid td:nth-child(5),.viability-worksheet .compact-grid td:nth-child(8),.viability-worksheet .compact-grid td:nth-child(11){min-width:95px;}
.viability-worksheet .compact-grid input{font-size:11px;}
.viability-worksheet .compact-grid td:nth-child(5){min-width:115px;}
.standalone-viability th:nth-child(n+2),.standalone-viability td:nth-child(n+2){text-align:center;}
.viability-worksheet .viability-column-groups th{text-align:center;background:#e7f0f3;border-bottom:1px solid #c2d3da;}
.viability-worksheet .viability-column-groups th:last-child{background:#e8f2ee;}
.conventional-note{margin:6px 0 12px;font-size:11px;line-height:1.5;}
.conventional-note .formula-help{display:inline-block;vertical-align:middle;min-height:20px;height:20px;width:20px;padding:0;}
.financial-comparison-inputs .premise-cells{grid-template-columns:repeat(9,minmax(85px,1fr));}
@media(max-width:1400px){.financial-comparison-inputs .premise-cells{grid-template-columns:repeat(6,minmax(85px,1fr));}}
@media(max-width:1050px){.financial-comparison-inputs .premise-cells{grid-template-columns:repeat(3,minmax(85px,1fr));}}
@media(max-width:1100px){.financial-charts{grid-template-columns:1fr}.expense-months tbody th:first-child,.expense-months thead th:first-child{min-width:195px;max-width:230px;}}
@media(max-width:700px){.curve-dialog{padding:13px}.curve-heading{align-items:flex-start}.curve-matrix td:first-child,.curve-matrix th:first-child{min-width:125px;max-width:160px}.curve-toolbar [role=status]{flex-basis:100%}}
