:root{font-family:'IBM Plex Sans Thai','IBM Plex Sans','Segoe UI',Arial,sans-serif;--bg:#f1f4f8;--ink:#16223a;--navy:#16223a;--blue:#0e7c86;--shadow:0 2px 10px #16223a08}
[hidden]{display:none!important}
html{scroll-padding-top:20px}body{font-family:inherit;font-weight:400;line-height:1.7;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit;font-size:14px;line-height:1.5}button{font-weight:500!important}
h1,h2,h3,h4{font-weight:500;line-height:1.45;letter-spacing:0!important}
.topbar{position:relative;height:auto;min-height:82px;padding:14px 24px;gap:14px;display:grid;grid-template-columns:auto 1fr;align-items:center}
.brand{grid-column:1;grid-row:1;padding:0}.brand-logo{height:48px}.brand-sub{font-size:10px;line-height:1.5}
.topnav{grid-row:1;grid-column:2;justify-self:end;display:flex;flex-wrap:wrap;margin:0;gap:4px}
.topnav button{white-space:nowrap;word-break:keep-all;padding:10px 14px;font-size:15px;border-radius:6px}
.topnav button.current{background:#16223a;color:white}.topnav button:focus-visible{outline:2px solid #0e7c86;outline-offset:2px}
.top-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px;padding-top:10px;border-top:1px solid #e5eaf0;min-width:0}
.top-actions button{white-space:nowrap;font-size:14px;padding:8px 12px}.top-actions .user-chip{width:36px;height:36px;padding:0;margin-left:auto}
.account-selector{width:330px;max-width:100%;font-size:14px!important;font-weight:500!important;min-width:0!important}
.top-actions #saveState{font-size:13px;white-space:nowrap;margin-right:auto}
.readonly-mode #accountSelector{pointer-events:auto;opacity:1}.readonly-mode #saveState{display:inline}
.home{padding:48px 24px;max-width:1320px}.home h1{font-size:34px;line-height:1.4}.home-copy>p:last-child{font-size:17px}
.path-card{border-radius:10px;box-shadow:none}.path-card h2{font-size:24px}.path-card p,.path-card li{font-size:16px;font-weight:400}
.learning-flow{font-size:14px;flex-wrap:wrap;gap:14px}.kicker{font-weight:600;letter-spacing:.09em}
.with-reference.active{display:block}.with-reference>.sidebar,.with-reference>.workspace{display:none}
.reference-toolbar{max-width:1440px;margin:0 auto;padding:18px 24px;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.reference-modes{display:flex;border:1px solid #d5dce6;border-radius:7px;background:white;padding:3px;gap:3px}
.reference-modes button{background:none;border:none;padding:8px 14px;color:#526078;white-space:nowrap;border-radius:5px}
.reference-modes button.active{background:#16223a;color:white}
.reference-toolbar label{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:14px;color:#536175}
.reference-name{width:260px;max-width:100%;border:1px solid #b7cee7;background:#f0f6ff;border-radius:5px;padding:8px 10px;font-weight:400}
.reference-content{width:100%}.reference-notice{max-width:1392px;margin:0 auto 14px;padding:12px 16px;border:1px solid #c8d9e9;background:#eaf2fa;border-radius:6px;font-size:14px;display:flex;align-items:center;gap:16px;justify-content:space-between}
.reference-notice[hidden]{display:none}.reference-notice button{flex-shrink:0}
.reference-frame{display:block;width:100%;min-height:800px;border:0;background:#f1f4f8}
.legacy-visible .reference-content{display:none}.with-reference.legacy-visible>.sidebar{display:block;position:relative;top:0;min-height:0;height:auto;padding:18px 24px;background:#16223a}
.legacy-visible .sidebar>.back,.legacy-visible .sidebar>.side-label,.legacy-visible .sidebar>h2,.legacy-visible .side-note{display:none}
.legacy-visible .stepnav{display:flex;gap:8px;overflow-x:auto}.legacy-visible .stepnav button{white-space:nowrap}
.with-reference.legacy-visible>.workspace{display:block;max-width:1440px;padding:24px}
.model-head h1{font-size:25px}.field label{font-weight:500}.input-card h3{font-size:17px}.input-wrap input{font-weight:400;text-align:right;padding:8px 60px 8px 10px}
.notes-view,.overview{max-width:1440px;margin:auto}.notes-head h1,.ov-head h1{font-size:28px}.note-form label,.note-item h4{font-weight:500}.note-form input,.note-form select{font-weight:400}
.login-card h1{font-size:27px}.login-card label{font-weight:500}.login-card input{font-weight:400;font-size:16px}
th,td{font-size:14px}.ov-table th{font-weight:500}.ov-table td{font-weight:400}.ov-tablewrap{max-width:100%;overflow:auto}
@media(min-width:2000px){.topbar{grid-template-columns:auto 1fr auto}.top-actions{grid-column:3;grid-row:1;border:0;padding:0}.topnav{justify-self:center}.account-selector{width:250px}.top-actions #saveState{max-width:120px}}
@media(max-width:760px){.topbar{padding:12px;gap:10px}.topnav{grid-column:1/-1;grid-row:2;justify-self:stretch;flex-wrap:nowrap;overflow-x:auto}.topnav button{font-size:14px;padding:8px 12px}.top-actions{padding-top:10px}.account-selector{width:100%}.reference-toolbar{padding:14px 12px;gap:12px}.reference-toolbar label{margin-left:0;width:100%}.reference-name{flex:1;width:auto}.reference-notice{margin:0 12px 12px;align-items:start;flex-direction:column}.reference-modes button{padding:8px 10px}.home{padding:30px 16px}.home h1{font-size:28px}.path-grid{grid-template-columns:1fr}.with-reference.legacy-visible>.workspace{padding:16px}.input-grid{grid-template-columns:1fr}.model-head{flex-wrap:wrap}.section-title{align-items:start;flex-direction:column}.section-title p{text-align:left}.funding-layout{grid-template-columns:1fr}}
@media print{.topbar,.reference-toolbar,.reference-notice{display:none!important}}
/* Compact workspace: keep assumptions visible above the fold. */
.topbar{max-width:1240px;margin:auto;min-height:0;padding:8px 16px;gap:6px 14px}
.brand-logo{height:36px}.topnav button{padding:6px 10px;font-size:14px}
.top-actions{padding-top:6px;gap:8px}.top-actions button{padding:5px 10px;font-size:13px}
.account-selector{width:310px;padding:5px 10px!important}.top-actions .user-chip{width:30px;height:30px}
.with-reference{max-width:1240px;margin:0 auto}
.reference-toolbar{padding:10px 16px;gap:10px}
.reference-modes{padding:2px}.reference-modes button{padding:5px 10px;font-size:13px}
.reference-toolbar label{font-size:13px;gap:8px}.reference-name{width:220px;padding:5px 8px}
.reference-toolbar>button{padding:6px 10px;font-size:13px}
.reference-notice{margin:0 16px 6px;padding:6px 10px;font-size:12px;gap:10px}
.reference-notice button{padding:4px 9px;font-size:12px}
@media(max-width:760px){.topbar{padding:8px 12px}.topnav{gap:2px}.topnav button{padding:5px 8px;font-size:13px}.reference-toolbar{padding:8px 12px}.reference-toolbar label{width:auto;flex:1;min-width:220px}.reference-name{min-width:0;width:180px}.reference-notice{margin:0 12px 6px;flex-direction:row;align-items:center}.account-selector{width:100%}.brand-logo{height:32px}}

.home .learning-flow{margin:20px 0 24px}
/* Home uses a compact reading width, including at desktop zoom levels. */
.home{width:100%;max-width:1080px;min-width:0;padding:20px 20px 24px;margin:0 auto;box-sizing:border-box}
.home-copy{max-width:none;margin:0 0 14px}.home .kicker{font-size:11px;margin:0 0 6px}
.home h1{font-size:26px;line-height:1.4;margin:0 0 7px;overflow-wrap:anywhere}
.home-copy>p:last-child{font-size:14px;line-height:1.6;max-width:none;margin:0}
.home .learning-flow{margin:14px 0 16px;padding:9px 14px;border-radius:8px;font-size:13px;gap:12px;flex-direction:row;flex-wrap:wrap;align-items:center}
.home .path-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.home .path-card{min-width:0;padding:18px 20px;border-radius:9px;line-height:1.55}
.home .path-icon{width:34px;height:34px;font-size:20px;border-radius:8px}
.home .path-no{font-size:27px;top:14px;right:18px}
.home .path-card h2{font-size:20px;margin:10px 0 6px}
.home .path-card p,.home .path-card li{font-size:14px}
.home .path-card ul{margin:10px 0;padding-left:19px}.home .path-card li{margin:3px 0}
.home .path-cta{padding-top:9px;font-size:14px}.home .path-cta b{font-size:18px}
@media(max-width:640px){.home{padding:16px 12px}.home h1{font-size:22px}.home .path-grid{grid-template-columns:1fr}.home .path-card{padding:15px 16px}.home .learning-flow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;font-size:12px;justify-items:start}.home .learning-flow i{display:none}}

/* All five-year input and result tables share identical column tracks. */
.detailed-plan table.plan-table{width:100%;table-layout:fixed;min-width:820px;border-collapse:collapse}
.detailed-plan .plan-label-col{width:26%}
.detailed-plan .plan-five-years .plan-year-col{width:14.8%}
.detailed-plan .plan-six-years .plan-year-col{width:12.333333%}
.detailed-plan table.plan-table th:first-child,.detailed-plan table.plan-table td:first-child{width:auto;min-width:0;white-space:normal;overflow-wrap:anywhere}
.detailed-plan table.plan-table th,.detailed-plan table.plan-table td{box-sizing:border-box;padding:8px 10px;text-align:right}
.detailed-plan table.plan-table th:first-child,.detailed-plan table.plan-table td:first-child{text-align:left}
.detailed-plan table.plan-table input{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.sku-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px}
.sku-actions button{padding:7px 14px;white-space:nowrap}

.asset-life-summary{width:100%;border-collapse:collapse;margin-bottom:20px}.asset-life-summary th,.asset-life-summary td{padding:7px 10px;text-align:right;border-bottom:1px solid #e5eaf0;font-size:13px}.asset-life-summary th:first-child,.asset-life-summary td:first-child{text-align:left}.asset-life-summary thead{background:#f6f8fb}
/* Keep the model controls compact so data begins near the top. */
.with-reference.legacy-visible>.sidebar{padding:6px 16px}
.legacy-visible .stepnav{gap:4px}
.legacy-visible .stepnav button{padding:6px 10px;font-size:13px;border-radius:5px}
.with-reference.legacy-visible>.workspace{padding:12px 16px 28px}
.model-view .model-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.model-view .model-head .kicker{display:none}
.model-view .model-head h1{font-size:20px;margin:0;line-height:1.4}
.model-view .model-head p:last-child{font-size:12px;line-height:1.5}
.model-view .business-name{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:12px;white-space:nowrap;min-width:0}
.model-view .business-name input{width:220px;max-width:100%;padding:5px 9px;font-size:13px;margin:0}
.model-view .section-title{display:flex;align-items:center;gap:12px;margin-bottom:9px}
.model-view .section-title>div{display:flex;align-items:center;gap:8px}
.model-view .section-title span{font-size:10px;white-space:nowrap}
.model-view .section-title h2{font-size:17px;margin:0;line-height:1.4}
.model-view .section-title p{font-size:12px;line-height:1.5;max-width:560px}
.model-view .assumption-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:3px;padding:4px;margin-bottom:8px;border-radius:7px}
.model-view .assumption-nav button{padding:6px 10px;font-size:13px;white-space:nowrap;border-radius:5px}
.model-view .plan-intro{flex-direction:row;align-items:center;gap:8px;font-size:12px;margin-bottom:10px}
.model-view .plan-intro button{padding:5px 10px;font-size:12px}
.detailed-plan .panel{padding:14px 16px;margin-bottom:12px}
.detailed-plan .panel>h3{font-size:16px;margin:0 0 8px}
.detailed-plan .panel>p{font-size:13px;margin:0 0 10px;line-height:1.5}
@media(max-width:760px){.model-view .model-head{flex-wrap:wrap;gap:6px}.model-view .business-name{width:100%}.model-view .business-name input{flex:1;width:auto}.model-view .section-title{align-items:flex-start;flex-direction:column;gap:4px}.model-view .section-title p{text-align:left}.model-view .assumption-nav button{font-size:12px;padding:6px 8px}.model-view .plan-intro{flex-wrap:wrap}.with-reference.legacy-visible>.workspace{padding:10px 12px}.detailed-plan .panel{padding:12px}}
@media print{.model-view .assumption-nav,.model-view .plan-intro button{display:none}}

/* Compact product header and report actions */
#product .model-head{justify-content:flex-end;margin-bottom:12px;gap:12px}
#product .model-head .business-name{margin:0}
#productSaveSlot{display:inline-flex;align-items:center;font-size:12px;white-space:nowrap;color:#008a83}
.product-report-actions{display:flex;gap:12px;flex-wrap:wrap;padding:12px 0}
.product-report-actions button{font:inherit;padding:10px 18px;border-radius:8px;cursor:pointer}
body.product-active .topbar{grid-template-columns:auto 1fr auto;align-items:center}
body.product-active .top-actions{grid-column:3;grid-row:1;border:0;padding:0;gap:8px}
body.product-active .top-actions .user-chip{margin-left:0}
@media(max-width:760px){body.product-active .topbar{grid-template-columns:auto 1fr}body.product-active .top-actions{grid-column:2;justify-content:flex-end}body.product-active .topnav{grid-column:1/-1;grid-row:2}#product .model-head{justify-content:flex-start}#product .model-head .business-name{width:auto;flex:1}#productSaveSlot{font-size:11px}}
@media print{#productReportActions,#productSaveSlot{display:none!important}}
@media print{#product .assumption-panel[data-assumption-panel="4"]{display:none!important}}

/* Compact SKU entry rows; retain the existing text size. */
#productInputs [data-assumption-panel="1"] .sku-actions{margin-bottom:6px}
#productInputs [data-assumption-panel="1"]>.panel{padding:8px 12px;margin-bottom:8px}
#productInputs [data-assumption-panel="1"]>.panel>h3{margin-bottom:4px}
#productInputs [data-assumption-panel="1"] h3 input{height:30px;padding:3px 8px;line-height:1.4}
#productInputs [data-assumption-panel="1"] .plan-table th,
#productInputs [data-assumption-panel="1"] .plan-table td{padding:3px 8px;vertical-align:middle}
#productInputs [data-assumption-panel="1"] .plan-table thead th{padding-top:4px;padding-bottom:4px}
#productInputs [data-assumption-panel="1"] .plan-table input{height:30px;padding:3px 8px;line-height:1.4}

/* Keep the company and saving status beside the platform brand. */
#productCompanyHeader{display:none}
body.product-active .topbar{grid-template-columns:auto auto 1fr auto}
body.product-active #productCompanyHeader{display:flex;align-items:center;gap:10px;grid-column:2;grid-row:1;min-width:0}
#productCompanyHeader .business-name{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;white-space:nowrap;min-width:0}
#productCompanyHeader .business-name input{width:170px;min-width:0;padding:5px 9px;font-size:13px;margin:0}
body.product-active .topnav{grid-column:3;grid-row:1}
body.product-active .top-actions{grid-column:4;grid-row:1}
#product .model-head:empty{display:none}
@media(max-width:1050px){body.product-active .topbar{grid-template-columns:auto 1fr auto}body.product-active .topnav{grid-column:1/-1;grid-row:2;justify-self:end}body.product-active .top-actions{grid-column:3}}
@media(max-width:600px){body.product-active .topbar{grid-template-columns:auto 1fr}body.product-active #productCompanyHeader{flex-wrap:wrap;gap:3px 8px}#productCompanyHeader .business-name{flex-wrap:wrap;gap:3px}#productCompanyHeader .business-name input{width:140px}body.product-active .top-actions{grid-column:2;grid-row:2}body.product-active .topnav{grid-row:3;justify-self:stretch}}

#pRevenueSummary .sku-revenue-label{display:inline-block;padding-left:18px;color:var(--muted,#62748b);font-size:12px}

/* Align header, navigation and model panels to the same outer edges. */
@media screen{
 .topbar,.with-reference{width:calc(100% - 24px);max-width:1240px;box-sizing:border-box;margin-left:auto;margin-right:auto}
 .with-reference.legacy-visible>.workspace{width:100%;max-width:none;box-sizing:border-box;padding-left:0;padding-right:0}
 .with-reference.legacy-visible>.sidebar{width:100%;box-sizing:border-box}
}

.selling-percent-input{position:relative}.selling-percent-input input{padding-right:28px!important}.selling-percent-input>span{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#62748b;pointer-events:none}

/* Compact working-capital inputs and results. */
#productInputs [data-assumption-panel="3"]>.panel:first-child{padding:10px 16px}
#productInputs [data-assumption-panel="3"]>.panel:first-child>h3{margin-bottom:5px}
#productInputs [data-assumption-panel="3"]>.panel:first-child .plan-table th,
#productInputs [data-assumption-panel="3"]>.panel:first-child .plan-table td{padding:3px 10px;vertical-align:middle}
#productInputs [data-assumption-panel="3"]>.panel:first-child .plan-table input{height:30px;min-height:0;padding:3px 8px;line-height:1.4}
#productInputs #pWcSummary{margin-top:6px}

/* Give each SKU row identical tracks and prevent input overflow. */
#productInputs .sku-panel .plan-table{display:block;width:100%}
#productInputs .sku-panel .plan-table colgroup{display:none}
#productInputs .sku-panel .plan-table thead,#productInputs .sku-panel .plan-table tbody{display:block;width:100%}
#productInputs .sku-panel .plan-table tr{display:grid;grid-template-columns:26% repeat(5,minmax(0,1fr));width:100%}
#productInputs .sku-panel .plan-table th,#productInputs .sku-panel .plan-table td{display:block;min-width:0;width:auto}
#productInputs .sku-panel .plan-table input{display:block;width:100%;max-width:100%;min-width:0;margin:0;box-sizing:border-box}
#productInputs .sku-panel>h3{width:26%;padding-right:8px}
#productInputs .sku-panel>h3 input{display:block;width:100%;max-width:none;margin:0}
.sku-add-bottom{display:flex;justify-content:flex-end;padding:6px 8px 0}
.sku-panel .sku-add-bottom{justify-content:flex-start}
.sku-add-bottom button{padding:5px 12px;font-size:13px}
@media print{.sku-add-bottom{display:none}}

/* Shared compact spacing across model tabs. */
@media screen{
 :root{--model-control-height:30px;--model-row-height:36px;--model-panel-gap:8px}
 :is(#product,#restaurant) .panel,
 #product #productInputs .assumption-panel>.panel{padding:8px 12px;margin-bottom:var(--model-panel-gap)}
 :is(#product,#restaurant) .panel>h3,
 #product #productInputs .assumption-panel>.panel>h3{margin-top:0;margin-bottom:4px}
 :is(#product,#restaurant) table th,:is(#product,#restaurant) table td,
 #product #productInputs table th,#product #productInputs table td{height:var(--model-row-height);padding:3px 8px;line-height:1.5;vertical-align:middle}
 :is(#product,#restaurant) input:not([type=checkbox]),:is(#product,#restaurant) select,
 #product #productInputs input,#product #productInputs select{height:var(--model-control-height);min-height:0;box-sizing:border-box;padding:3px 8px;line-height:1.4}
 #product #productInputs .selling-percent-input input{padding-right:28px}
 :is(#product,#restaurant) .input-wrap input{padding-right:60px}
 :is(#product,#restaurant) .field{margin-bottom:8px}
 :is(#product,#restaurant) .input-grid,:is(#product,#restaurant) .funding-layout{gap:var(--model-panel-gap)}
 :is(#product,#restaurant) .input-card{padding:8px 12px}
 :is(#product,#restaurant) .section-title{margin-bottom:8px}
 :is(#product,#restaurant) .asset-life-summary{margin-bottom:8px}
 #product #productInputs #pWcSummary{margin-top:6px}
}

/* Compact tax explanations, carry-forward fields and annual status. */
@media screen{
 #product #productInputs [data-assumption-panel="3"]>.panel:nth-child(2)>p{margin:4px 0 6px;line-height:1.5}
 #product #productInputs .timing-label{gap:8px;margin:6px 0;font-size:13px}
 #product #productInputs .loss-inputs{gap:8px;margin:8px 0}
 #product #productInputs .loss-inputs label{line-height:1.4}
 #product #productInputs .loss-inputs input{margin-top:4px}
 #product #productInputs .retained-label{display:flex;align-items:center;gap:8px;max-width:none;margin:8px 0;font-size:13px;flex-wrap:wrap}
 #product #productInputs .retained-label input{width:220px;max-width:100%;margin:0}
 #product #productInputs .tax-year-status{gap:6px;margin:8px 0 6px}
 #product #productInputs .tax-year-status span{padding:3px 8px;line-height:1.5}
}

/* Replace KPI cards with the detailed reports; readable labelled charts. */
:is(#product,#restaurant) .kpis{display:none!important}
:is(#product,#restaurant) .chart{display:block;height:auto;min-height:0;padding:10px 0 0;border:0;overflow:visible}
.financial-chart-scroll{width:100%;overflow-x:auto}
.financial-chart-scroll svg{display:block;width:100%;min-width:1000px;height:auto;max-height:none;font-family:inherit}
.financial-chart-legend{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;padding:0 12px 6px;font-size:13px}
.financial-chart-legend span{display:inline-flex;align-items:center;gap:6px}
.financial-chart-legend i{display:inline-block;width:14px;height:14px;border-radius:3px}
.financial-chart-legend small{color:#62748b;margin-left:auto}
@media print{.financial-chart-scroll svg{min-width:0}.financial-chart-scroll{overflow:visible}}

#pReturnRateInputs{max-width:340px;margin:6px 0 8px}
#pInvestmentReturns{width:100%;min-width:0;table-layout:fixed}
#pInvestmentReturns th:first-child,#pInvestmentReturns td:first-child{width:60%;text-align:left}
#pInvestmentReturns th:last-child,#pInvestmentReturns td:last-child{text-align:right}

.cashflow-section th{background:#edf3f8;text-align:left!important;color:#17364a;font-weight:600;padding:8px!important;}

.detailed-plan .investment-table{table-layout:fixed;min-width:1120px;width:100%}
.detailed-plan .investment-table th:first-child{width:22%}
.detailed-plan .investment-table td,.detailed-plan .investment-table th{vertical-align:middle}

/* Separate platform navigation from the current business controls. */
body.product-active .topbar{grid-template-columns:minmax(0,1fr) auto;gap:10px 20px;padding:12px 16px}
body.product-active .brand{grid-column:1;grid-row:1;justify-self:start}
body.product-active .topnav{grid-column:2;grid-row:1;flex-wrap:nowrap;justify-self:end}
body.product-active #productCompanyHeader{grid-column:1;grid-row:2;flex-wrap:wrap;gap:8px 16px}
body.product-active #productCompanyHeader .business-name input{width:240px;max-width:100%}
body.product-active .top-actions{grid-column:2;grid-row:2;border:0;padding:0;align-items:center;justify-content:flex-end}
body.product-active .account-selector{width:310px}
body.product-active .top-actions .user-chip{margin-left:0}
.stepnav #notesNav{border-left:1px solid #ffffff30;border-radius:0;padding-left:16px}
@media(max-width:760px){
 body.product-active .topbar{grid-template-columns:minmax(0,1fr);gap:10px}
 body.product-active .brand{grid-column:1;grid-row:1}
 body.product-active .topnav{grid-column:1;grid-row:2;justify-self:stretch;overflow-x:auto}
 body.product-active #productCompanyHeader{grid-column:1;grid-row:3}
 body.product-active .top-actions{grid-column:1;grid-row:4;justify-content:flex-start}
 body.product-active .account-selector{width:310px;max-width:calc(100% - 46px)}
 body.product-active #productCompanyHeader .business-name{flex-wrap:wrap}
}

/* ===== แหล่งเงินทุน: ทุน vs เงินกู้ (MOR / MLR) ===== */
.fund-split{display:grid;grid-template-columns:1fr 1.6fr;gap:16px;margin-top:14px}
.fund-col{border:1px solid var(--line);border-radius:12px;padding:16px;background:#fbfcfe}
.fund-equity{border-top:4px solid var(--good)}
.fund-loan{border-top:4px solid var(--orange)}
.fund-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px}
.fund-head strong{font-size:16px;color:var(--navy)}
.fund-pct{font-size:22px;font-weight:800;color:var(--navy);font-variant-numeric:tabular-nums}
.fund-equity .fund-pct{color:var(--good)}
.fund-loan .fund-pct{color:var(--orange)}
.fund-total{font-size:13px;color:var(--muted);margin:-4px 0 12px}
.fund-total b{color:var(--navy);font-size:15px}
.loan-block{border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fff;margin-bottom:10px}
.loan-block:last-child{margin-bottom:0}
.loan-title{display:flex;flex-direction:column;gap:2px;margin-bottom:9px}
.loan-title strong{color:var(--navy);font-size:14.5px}
.loan-title small{color:var(--muted);font-size:12px}
.loan-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:10px}
.loan-grid label{display:block;font-size:12.5px;font-weight:700;color:var(--navy)}
.loan-grid input,.loan-years input{width:100%;margin-top:4px;border:1px solid #a9c9ed;background:var(--blueSoft);padding:8px 10px;border-radius:8px;color:var(--navy);font-weight:600;text-align:right}
.loan-years{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:12.5px;font-weight:700;color:var(--navy);flex-wrap:wrap}
.loan-years select{border:1px solid #a9c9ed;background:var(--blueSoft);padding:7px 10px;border-radius:8px;color:var(--navy);font-weight:700}
.loan-years-custom{display:flex;align-items:center;gap:6px}
.loan-years-custom input{width:80px;margin:0}
.loan-years-custom.hidden{display:none}
.loan-sched{margin-top:14px;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fff}
.loan-sched-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px;font-size:13px}
.loan-sched-head strong{color:var(--navy)}
.loan-sched-head em{font-style:normal;color:var(--bad);font-weight:600}
.loan-sched-head span{color:var(--muted)}
.loan-sched .plan-table{min-width:560px}
@media(max-width:900px){.fund-split,.loan-grid{grid-template-columns:1fr}}

.loan-auto-btn{padding:4px 10px;font-size:12px;margin-left:8px;vertical-align:middle}
.fund-need{border:1px dashed #b9c7d8;border-radius:10px;padding:8px 14px;margin:6px 0 4px;background:#f7f9fc}
.need-line{display:flex;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--muted);padding:4px 0}
.need-line b{color:var(--navy);font-variant-numeric:tabular-nums}
.need-total{border-top:1px solid var(--line);margin-top:2px;padding-top:7px;color:var(--navy);font-weight:700}
.need-round{color:var(--navy);font-weight:800}.need-round b{font-size:15px;color:var(--blue)}
input.computed{background:#eef2f7!important;border-color:#c9d3e0!important;color:var(--navy)!important;cursor:default}
.need-warn{color:var(--bad)}.need-warn b{color:var(--bad)}
.need-line small{display:block;font-size:11px;color:#8a97ab;font-weight:400}
#pFundingResult{margin-bottom:17px}#pFundingInputs .field{margin-bottom:0}#pFundingInputs label{font-size:12.5px}

.fund-split-3{grid-template-columns:1fr 1fr 1.35fr}
.fund-need-col{border-top:4px solid var(--blue)}
.fund-need-col .field{margin-bottom:6px}
.fund-need-col .fund-need{margin-top:6px}
.fund-pct-sm{font-size:13px;color:var(--muted);font-weight:700}
.equity-total{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--line);font-size:13px;color:var(--navy);font-weight:700}
.equity-total small{display:block;font-weight:400;color:var(--muted);font-size:11px}
.equity-total b{font-size:17px;color:var(--good);font-variant-numeric:tabular-nums}
@media(max-width:1100px){.fund-split-3{grid-template-columns:1fr 1fr}.fund-need-col{grid-column:1/-1}}
@media(max-width:700px){.fund-split-3{grid-template-columns:1fr}}

.loan-edit-row th small{font-weight:600;color:var(--blue);font-size:10.5px;margin-left:4px}
.loan-rep{width:100%;border:1px solid #a9c9ed;background:var(--blueSoft);padding:6px 8px;border-radius:7px;color:var(--navy);font-weight:600;text-align:right;font-size:12.5px}
.loan-rep:disabled{opacity:.7}
.val-inputs-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.val-inputs-row .field{margin:0}
.funding-layout.single{grid-template-columns:1fr}
@media(max-width:800px){.val-inputs-row{grid-template-columns:1fr}}

/* ===== หัวเว็บแถวเดียว: โลโก้ → บริษัท → ส่งออก/พิมพ์ → เมนู → S ===== */
.topbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:70px;padding:10px 24px;grid-template-columns:none}
.top-left{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.top-left .account-selector{max-width:320px}
.top-left button{white-space:nowrap;font-size:14px;padding:8px 12px}
.top-left #saveState{font-size:12.5px;color:var(--good);white-space:nowrap;margin:0 4px}
.top-left .business-name{margin:0}
.top-left .business-name input{width:230px;margin:0}
.topnav{margin-left:auto;justify-self:auto;grid-row:auto;grid-column:auto}
.top-actions{grid-column:auto;grid-row:auto;border:0;padding:0;margin:0;display:flex;align-items:center}
.top-actions .user-chip{margin-left:0}
@media(max-width:1100px){.topnav{margin-left:0;width:100%;order:5}}
.topbar{flex-wrap:nowrap}.top-left,.topnav{flex-shrink:1;min-width:0}.topnav{margin:0 0 0 auto}.top-actions{flex-shrink:0}
@media(max-width:1100px){.topbar{flex-wrap:wrap}}
.topnav{flex-wrap:nowrap}.top-left{flex-wrap:nowrap}.top-left .account-selector{max-width:260px;text-overflow:ellipsis}.topnav button{padding:9px 11px;font-size:14.5px}
@media(max-width:1100px){.topnav,.top-left{flex-wrap:wrap}}
#saveState,#productSaveSlot{display:none!important}
.need-ok{color:var(--good)}.need-ok b{color:var(--good)}
.plan-table.no-head{margin-top:-1px}.computed-row td{color:var(--muted);font-variant-numeric:tabular-nums}
.financial-chart-legend.below{margin:10px 0 0;justify-content:center}

.val-method{margin:6px 0 22px;padding-top:6px}
.val-method-head{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding-bottom:8px;border-bottom:2px solid var(--navy)}
.val-method-head h3{margin:0;font-size:18px;color:var(--navy)}
.val-no{font-size:11px;letter-spacing:.14em;font-weight:800;color:#fff;background:var(--navy);padding:4px 9px;border-radius:6px}
.loan-rep.prepay{background:#e5f6ee;border-color:#8fd3b3}
.need-sep{margin:8px 0 2px;font-size:11px;letter-spacing:.06em;font-weight:800;color:var(--navy);border-top:1px solid var(--line);padding-top:8px}

.val-summary{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;background:var(--navy);color:#fff;border-radius:12px;padding:14px 20px;margin:-6px 0 18px}
.val-summary-label{font-size:13px;color:#b8c7dc;font-weight:700}
.val-summary strong{font-size:24px;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.val-summary small{color:#b8c7dc;font-size:12px;margin-left:auto}

.asset-cat{text-align:left!important;white-space:normal!important}
.detailed-plan .investment-table td.asset-cat select{margin:0;height:30px;padding:3px 8px;line-height:1.4;font:inherit;border:1px solid #a8c8ed;background:#eaf3ff;color:#123558;border-radius:7px;width:100%}
.detailed-plan .investment-table tr.asset-add-row td{text-align:left;padding:6px 10px}
.detailed-plan .investment-table tr.asset-add-row button{padding:5px 12px;font-size:13px}
@media print{.asset-add-row{display:none}}

/* ===== แผนขยายสาขา ===== */
.exp-table{min-width:760px;font-size:12.5px}
.exp-table th.ind{padding-left:24px;font-weight:500;color:var(--muted)}
.exp-table tr.sub td,.exp-table tr.sub th{color:var(--muted);font-size:12px}
.exp-table .exp-in{width:100%;border:1px solid #efc3a5;background:var(--orangeSoft);padding:6px 8px;border-radius:7px;color:var(--navy);font-weight:600;text-align:right;font-size:12.5px}
.exp-table .exp-in.sm{max-width:80px}
.exp-kpis{margin-bottom:12px}
.exp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:6px}
.exp-grid h4{margin:0 0 8px;font-size:14px;color:var(--navy)}
.exp-grid .exp-table{min-width:0}
.exp-field{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12.5px;font-weight:700;color:var(--navy);margin:8px 0}
.exp-field .exp-wrap{position:relative;flex:0 0 190px}
.exp-field .exp-in{width:100%;border:1px solid #efc3a5;background:var(--orangeSoft);padding:7px 52px 7px 9px;border-radius:7px;color:var(--navy);font-weight:600;text-align:right}
.exp-field i{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-style:normal;font-size:10.5px;color:var(--muted);white-space:nowrap}
@media(max-width:1000px){.exp-grid{grid-template-columns:1fr}}

.valuation-share-price strong small{display:inline-block;font-size:13px;font-weight:400;white-space:nowrap;color:#cbd8e8}.valuation-share-price{gap:12px;flex-wrap:wrap}.valuation-share-price strong{font-variant-numeric:tabular-nums}

#restaurantInputs.prototype-inputs{display:block}.prototype-nav{display:flex;gap:5px;margin:0 0 12px;flex-wrap:wrap}.prototype-nav button{border:1px solid #d5dce6;border-radius:6px;padding:7px 12px;background:white;color:#334155;cursor:pointer}.prototype-nav button.active{background:#17354d;color:white}.prototype-summary{margin-top:14px;padding:14px 16px}.prototype-summary h3{font-size:16px}.prototype-summary table{width:100%;border-collapse:collapse}.prototype-summary td,.prototype-summary th{padding:6px 10px;text-align:right;border-bottom:1px solid #e5eaf0;font-size:13px}.prototype-summary td:first-child,.prototype-summary th:first-child{text-align:left}#rPrototypeExpansion{margin-top:12px}

.retail-financial-detail{margin:12px 0;border:1px solid #d8e0eb;border-radius:7px;padding:10px 14px;background:white}.retail-financial-detail>summary{cursor:pointer;font-weight:500}.retail-financial-detail[open]>summary{margin-bottom:12px}#restaurant .stepnav{overflow-x:auto}#restaurant .stepnav button{white-space:nowrap}#retail-slot-hq .panel{margin-bottom:14px}
/* Place Prototype subtabs directly below the main navigation. */
#restaurant>.workspace>.model-head,
#restaurant [data-model-tab="restaurant-inputs"]>.section-title{display:none}

.prototype-return-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 16px}.prototype-return-kpis .kpi-card{min-width:0}.prototype-return-kpis strong{font-size:24px}@media(max-width:760px){.prototype-return-kpis{grid-template-columns:1fr}}
.retail-annual-inputs .retail-annual-table{table-layout:fixed;width:100%;min-width:880px}.retail-annual-table th:first-child{width:25%}.retail-annual-table input{width:100%;min-width:0;box-sizing:border-box;text-align:right;background:#fff1e6;border:1px solid #f3bc94;border-radius:5px;padding:7px 8px;font:inherit;color:#17354d}.retail-annual-inputs .panel{margin-top:12px}.retail-annual-inputs .hint-line{margin:6px 0 12px}.retail-annual-inputs [hidden]{display:none!important}.retail-initial-cash{display:flex;gap:12px;align-items:center;margin-top:14px}.retail-initial-cash input{max-width:180px;padding:7px;border:1px solid #f3bc94;border-radius:5px}

.franchise-package-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}.fc-package-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fc-package-kpis .kpi-card{min-width:0;padding:12px}.fc-package-kpis strong{font-size:23px}.franchise-package-grid .exp-field{display:grid;grid-template-columns:minmax(0,1fr) 220px;align-items:center;gap:12px;margin:8px 0}.franchise-package-grid .exp-wrap{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px;align-items:center;margin-top:0;min-width:0}.franchise-package-grid .exp-field i{position:static;transform:none;white-space:normal;max-width:130px}.franchise-package-grid .exp-field .exp-in{padding:7px 10px}.franchise-package-grid .panel{margin-bottom:14px}@media(max-width:850px){.franchise-package-grid{grid-template-columns:1fr}}

@media(max-width:480px){.franchise-package-grid .exp-field{grid-template-columns:minmax(0,1fr) 160px;gap:8px}.franchise-package-grid .exp-wrap{grid-template-columns:90px minmax(0,1fr);gap:6px}}

.hq-detail-table{table-layout:fixed;width:100%;min-width:900px}.hq-detail-table th:first-child{width:28%}.hq-detail-table input{width:100%;min-width:0;box-sizing:border-box;font:inherit;padding:7px 8px;border:1px solid #efc3a5;background:var(--orangeSoft);border-radius:5px;text-align:right;color:var(--navy)}.hq-detail-table .hq-item-name{text-align:left}.hq-detail-table td{text-align:right}#retail-slot-hq [data-hq-add]{margin-top:10px}
