@font-face{font-family:score;src:url(assets/SCDream4.otf);font-weight:400}@font-face{font-family:score;src:url(assets/SCDream5.otf);font-weight:500}@font-face{font-family:score;src:url(assets/SCDream6.otf);font-weight:700}*{box-sizing:border-box}body{margin:0;background:#f0f3f6;color:#17354b;font-family:score,sans-serif;font-size:13px}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #cedae2;background:white;color:#17354b;border-radius:7px;padding:9px 13px}button:hover{background:#e8f1f6}button.primary,nav button.active{background:#123d59;color:white;border-color:#123d59}button.danger{color:#b43f3f}input,select,textarea{width:100%;border:1px solid #cfdae2;border-radius:5px;padding:8px;background:white;color:#17354b}input:focus,textarea:focus{outline:2px solid #8abbd4}textarea{resize:vertical}.appbar{height:76px;display:flex;align-items:center;gap:40px;padding:0 28px;background:white;border-bottom:1px solid #dce5eb}.brand{font-size:22px;font-weight:700;display:flex;align-items:center;gap:10px}.brand img{width:35px;height:40px}.brand span{font-size:13px;color:#718492;font-weight:500;white-space:nowrap}nav{display:flex;gap:8px}nav button{border:0}.appbar small{margin-left:auto;color:#718492}main{padding:24px}h1{font-size:23px;margin:0 0 8px}h2{font-size:15px;margin:0 0 15px}.sub{color:#718492;font-size:12px;margin:8px 0 20px;line-height:1.7}.layout{display:grid;grid-template-columns:minmax(490px,1fr) minmax(500px,1fr);gap:24px;align-items:start}.panel{padding:22px;background:white;border:1px solid #dfe6ec;border-radius:12px;margin-bottom:16px}.toolbar{display:flex;gap:8px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field span{display:block;font-size:11px;color:#627a8b;margin-bottom:6px}.full{grid-column:1/-1}.rowcard{border:1px solid #dfE6ec;border-radius:8px;padding:12px;margin:10px 0}.rowhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.rowfields{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.rowfields .field span{font-size:10px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metric{background:#f2f6f9;border-radius:8px;padding:15px}.metric strong{display:block;font-size:20px;margin-top:10px}.metric small{color:#678}.negative{color:#bf4848}.preview-shell{position:sticky;top:12px;overflow:auto;background:#e1e7ec;border-radius:12px;padding:18px}.preview-label{display:flex;justify-content:space-between;margin-bottom:14px;font-size:12px}.preview-scale{width:100%;overflow:auto}.sheet{position:relative;background:white;color:#092c51;width:210mm;height:297mm;margin:0 auto;font-size:9pt;overflow:hidden;flex-shrink:0}.sheet *{border-radius:0}.sheet .mast{position:absolute;left:7mm;right:7mm;top:7mm;height:22mm;border-bottom:.3mm solid #237bbd;display:flex;align-items:flex-start}.mast img{width:22mm;height:20mm}.company{padding-left:2mm;line-height:1.2}.company b{display:block;width:57mm;font-size:22pt;letter-spacing:-1px;white-space:nowrap}.company b.eng{font-size:19pt;letter-spacing:0}.slogan{margin-left:auto;width:51mm;font-size:19pt;line-height:1.15;font-weight:500;letter-spacing:-1px}.slogan span{display:block;white-space:nowrap;transform:scaleX(.78);transform-origin:right;width:128%;margin-left:-28%}.sheet .title{position:absolute;top:32mm;width:100%;text-align:center;font-size:28pt;font-weight:500}.title small{display:block;font-size:10.5pt;font-weight:400;margin-top:1mm}.recipient{position:absolute;left:8mm;top:54mm;width:88mm;line-height:1.5}.recipient .large{font-size:13pt;font-weight:500}.recipient .email{font-size:9pt;font-weight:400}.recipient p{margin:0 0 4mm}.supplier{position:absolute;left:99.6mm;top:60mm;width:103.4mm;height:34.5mm;border-collapse:collapse;font-size:6.8pt;table-layout:fixed}.sheet td,.sheet th{border:.15mm solid #b5c8d8;padding:1mm;font-weight:400;overflow-wrap:anywhere}.sheet th{background:#e9f3fa;font-weight:500}.supplier td{font-size:6.5pt}.supplier th{width:16%}.supplier .supplier-side{width:6%;text-align:center}.section-line{position:absolute;top:96mm;left:7mm;width:196mm;border-top:.3mm solid #237bbd}.amount{position:absolute;left:7mm;top:100mm;width:196mm;height:10mm;background:#e9f3fa;border:.15mm solid #b5c8d8;display:flex;align-items:center;gap:8mm;padding:0 4mm}.amount b:last-child{margin-left:auto}.quote-table{position:absolute;left:7mm;width:196mm;border-collapse:collapse;table-layout:fixed;z-index:2}.quote-table th{height:9mm;font-size:9pt}.quote-table td{font-size:7pt;text-align:center}.quote-table .desc{text-align:left;font-size:6.7pt}.watermark{position:absolute;left:85mm;top:169mm;width:40mm;height:46mm;opacity:.055}.remarks{position:absolute;left:7mm;width:196mm;display:flex;border:.15mm solid #b5c8d8;border-bottom:.3mm solid #237bbd}.remarks>strong{width:25mm;flex-shrink:0;background:#e9f3fa;display:flex;align-items:center;justify-content:center;font-weight:500}.remarks>div{padding:3mm;font-size:7.2pt;line-height:1.5;white-space:pre-wrap}.valid{font-size:8pt;margin-bottom:2mm}.sheet footer{position:absolute;top:289mm;left:7mm;width:196mm;display:flex;align-items:center;gap:8mm;font-size:8pt;white-space:nowrap}.sheet footer:before,.sheet footer:after{content:'';height:.2mm;background:#237bbd;flex:1}.sheet .sum{position:absolute;left:7mm;top:251mm;width:196mm;height:9mm;background:#e9f3fa;padding:2mm;border:.15mm solid #b5c8d8}.list-table{width:100%;border-collapse:collapse}.list-table th,.list-table td{text-align:left;padding:12px 8px;border-bottom:1px solid #e2e9ee}.list-table th{font-size:11px;color:#678}#notice{position:fixed;right:24px;bottom:22px;z-index:10;background:#163d56;color:white;border-radius:8px;padding:13px 20px;display:none}#printArea{display:none}.tag{font-size:11px;background:#eaf2f5;padding:4px 8px;border-radius:4px}.empty{padding:28px;color:#789;text-align:center}@media(max-width:1100px){.layout{grid-template-columns:1fr}.preview-shell{position:static}.appbar{gap:12px;padding:12px;height:auto;flex-wrap:wrap}.metrics{grid-template-columns:1fr 1fr}}@media print{@page{size:A4;margin:0}body{background:white}body>*{display:none!important}#printArea{display:block!important}.sheet{margin:0;page-break-after:always;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

.sheet .quote-number{position:absolute;right:7mm;top:31mm;font-size:8pt;white-space:nowrap}

.supplier .signed-name{position:relative;text-align:left;padding-right:12mm}.corporate-seal{position:absolute;right:-.5mm;top:50%;transform:translateY(-50%);width:17.6mm;height:14.16mm;mix-blend-mode:multiply;pointer-events:none}

.product-table td:nth-child(3){white-space:nowrap;overflow-wrap:normal;font-size:7.5pt}.product-table th{height:11mm}#itemProfits{margin-top:16px;overflow:auto}#metrics{grid-template-columns:repeat(2,minmax(0,1fr))}

.button-link{display:inline-block;padding:10px 14px;background:#123d59;color:white;border-radius:7px;text-decoration:none}button:disabled{opacity:.45;cursor:default}

.product-photo{width:88px;height:88px;object-fit:contain;background:white;border:1px solid #dbe5ed;border-radius:6px;margin:8px 0}.photo-empty{display:inline-block;font-size:11px;color:#788c99;margin:8px 0}

.quote-nav{position:relative}.quote-menu{position:absolute;top:calc(100% + 7px);left:0;min-width:150px;padding:6px;background:#fff;border:1px solid #dce5eb;border-radius:8px;box-shadow:0 7px 20px #17354b20;z-index:30}.quote-menu button{display:block;width:100%;text-align:left;font-weight:500}.quote-menu[hidden]{display:none}#quoteMenuButton{white-space:nowrap;font-weight:500}

button.save-final{transition:background-color .15s,color .15s,border-color .15s}button.save-final:hover{background:#123d59;color:#fff;border-color:#123d59}button.save-final:focus-visible{outline:2px solid #8abbd4;outline-offset:2px}

#saveFinal{background:#fff;color:#17354b;border:1px solid #cedae2}#saveFinal:hover{background:#123d59;color:#fff;border-color:#123d59}

.supplier{top:58mm;height:35mm}.sheet .supplier td,.sheet .supplier th{padding:.55mm .7mm;line-height:1.15}#exitDialog{max-width:460px;width:calc(100% - 40px);border:1px solid #cedae2;border-radius:12px;padding:25px;color:#17354b;font-family:score,sans-serif}#exitDialog::backdrop{background:#17354b66}#exitDialog h2{font-weight:500;line-height:1.6}#exitDialog p{font-size:13px;line-height:1.7}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.dialog-actions button{min-width:78px}.dialog-actions button:hover{background:#123d59;color:white}#exitError{color:#b43f3f}

/* Independent editor and preview scrolling on two-column displays. */
@media screen and (min-width:1101px){
 body.quote-view{height:100vh;overflow:hidden;display:flex;flex-direction:column}
 body.quote-view .appbar{flex:0 0 76px}
 body.quote-view #app{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 body.quote-view #app>.toolbar{flex:0 0 auto}
 body.quote-view .layout{flex:1;min-height:0;align-items:stretch;overflow:hidden}
 body.quote-view .layout>section,body.quote-view .layout>.preview-shell{height:100%;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
 body.quote-view .layout>section{padding-right:10px}
 body.quote-view .layout>.preview-shell{position:relative;top:auto}
}

.brand{white-space:nowrap;flex-shrink:0}

#quotePicker{width:min(1000px,90vw);max-height:85vh;overflow:auto}#historyEditor{margin-top:28px;border-top:2px solid #d8e5ed;padding-top:24px}#historyEditor .layout{align-items:start}

#historyEditor{max-width:850px;margin:28px auto 0}#historyEditor .toolbar{justify-content:space-between}.history-paper{width:100%;overflow:hidden}.history-paper .sheet{margin:0 auto}

.quote-status{min-width:100px;font-weight:500}.quote-status.status-ongoing{color:#174b79;background:#edf5fc}.quote-status.status-success{color:#226246;background:#edf7f1}.quote-status.status-drop{color:#666;background:#f1f2f4}#statusFilter{width:150px;flex:none}#search{flex:1;min-width:180px}

.history-summary-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.history-stat{background:#fff;border:1px solid #dfe6ec;border-radius:10px;padding:18px 22px;min-height:122px;border-top:3px solid #90b6cf}.history-stat>span{font-size:13px;font-weight:500}.history-stat strong{display:block;font-size:28px;font-weight:500;margin-top:8px;font-variant-numeric:tabular-nums}.history-stat strong small{font-size:13px;font-weight:400;margin-left:6px}.history-stat p{margin:6px 0 0;font-size:12px;color:#627a8b}.history-stat.success{border-top-color:#77a78b}.history-stat.success strong{color:#226246}.history-stat.drop{border-top-color:#a9b0b7}.history-stat.rate{border-top-color:#315974}.history-summary-note{margin:8px 0 18px}@media(max-width:700px){.history-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ledger-heading{justify-content:space-between}.ledger-heading .sub{margin-bottom:0}.ledger-month{display:flex;gap:8px;align-items:center;margin-left:auto}.ledger-month input{width:160px}.ledger-main .metric{background:white;border:1px solid #dfe6ec}.ledger-main .metric:last-child{background:#eaf3f8}.ledger-main .metric em,.ledger-cash .metric em{font-style:normal;font-size:11px;margin-left:5px;font-weight:400}.ledger-main .metric p{font-size:11px;margin-bottom:0;color:#627a8b}.ledger-cash{grid-template-columns:repeat(5,minmax(0,1fr))}.ledger-cash .metric strong{font-size:18px}.ledger-note{margin:12px 0 0}.ledger-table-scroll{overflow-x:auto}.ledger-table{min-width:980px}.ledger-table small{color:#718492}.ledger-table td:nth-child(n+4):nth-child(-n+8){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.ledger-table td:last-child{min-width:180px}.ledger-table td:nth-child(2){max-width:250px;overflow-wrap:anywhere}#ledgerSearch{width:300px;margin-left:auto}#ledgerFilter{width:140px}#ledgerDialog{width:min(740px,95vw);max-height:90vh;overflow:auto;border:1px solid #cfdae2;border-radius:12px;padding:25px}#ledgerDialog::backdrop{background:#17354b66}.ledger-settlement{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin:10px 0}.ledger-form-total{margin-top:12px;justify-content:space-between}.ledger-memo{display:block;margin-top:18px}#ledgerSubmit:hover{background:#123d59;color:white}#ledgerDialog h2{margin-top:12px}@media(max-width:800px){.ledger-main,.ledger-cash{grid-template-columns:repeat(2,minmax(0,1fr))}.ledger-month{margin-left:0}.ledger-heading{align-items:flex-start}#ledgerSearch{margin-left:0;width:100%}}
#hometaxDialog{width:min(1050px,95vw);max-height:90vh;overflow:auto;border:1px solid #cfdae2;border-radius:12px;padding:25px}#hometaxDialog::backdrop{background:#17354b66}.ht-options{margin-top:18px;align-items:end}.ht-options .field{flex:1}.ht-fields{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:16px}.ht-scroll{overflow:auto;max-height:330px;margin:12px 0}.ht-scroll table{min-width:680px}#htCheck,#htCommit{margin:16px 0 4px}#htPreview h2{margin-top:20px}@media(max-width:700px){.ht-fields{grid-template-columns:1fr 1fr}}

.ledger-kind-cell{text-align:center;min-width:110px}.ledger-kind{display:inline-block;font-size:16px;padding:5px 16px;border-radius:6px;background:#eef2f6;color:#243b53;white-space:nowrap}.ledger-kind-sales{background:#e6f0fc;color:#164b86}.ledger-kind-purchase{background:#f8eee1;color:#785022}.ledger-manual-actions{display:flex;gap:6px;justify-content:center;margin-top:8px;white-space:nowrap}

.ledger-main{grid-template-columns:repeat(5,minmax(0,1fr))}#fundingTypeField[hidden]{display:none}@media(max-width:1000px){.ledger-main{grid-template-columns:repeat(2,minmax(0,1fr))}}

.ledger-profit-main,.ledger-funds-main{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.ledger-profit-main .metric,.ledger-funds-main .metric{background:white}.ledger-profit-main em,.ledger-funds-main em{font-size:12px;font-style:normal;margin-left:4px}@media(max-width:900px){.ledger-profit-main,.ledger-funds-main{grid-template-columns:repeat(2,minmax(0,1fr))}}

.ledger-funds-section{margin-top:30px;padding-top:22px;border-top:1px solid #cfdae2}.ledger-funds-section>h1{margin-bottom:8px}

/* v0.96 compact transaction controls */
.ledger-table td.ledger-kind-cell{white-space:nowrap;min-width:210px;text-align:center}.ledger-kind-cell .ledger-kind{font-size:12px;padding:4px 8px;line-height:1.4;vertical-align:middle}.ledger-kind-cell .ledger-manual-actions{display:inline-flex;vertical-align:middle;margin:0 0 0 6px;gap:4px}.ledger-manual-actions button{font-size:12px;padding:4px 7px;line-height:1.4;min-height:0;border-radius:6px}

.ledger-registered-main{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:12px}.ledger-registered-main .metric{background:white}.ledger-registered-main em{font-size:12px;font-style:normal;margin-left:4px}.ledger-registered-main .metric p{font-size:12px}@media(max-width:1000px){.ledger-registered-main{grid-template-columns:repeat(2,minmax(0,1fr))}}

.ledger-cumulative-profit{margin-top:26px;padding-top:18px;border-top:1px solid #cfdae2}.ledger-funds-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin:26px 0 18px}.ledger-funds-half{min-width:0;margin:0}.funds-summary td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.funds-summary .funds-total{background:#eaf3f8;font-weight:bold}.funds-summary th{text-align:left}.ledger-funds-half h2{margin-top:24px}@media(max-width:700px){.ledger-funds-columns{grid-template-columns:1fr}}

/* Match transaction headings to their column values. */
.ledger-table th:nth-child(n+4):nth-child(-n+8){text-align:right;white-space:nowrap}.ledger-table th:last-child{text-align:center}.ledger-table th,.ledger-table td{vertical-align:middle}.ledger-funds-half .funds-summary{table-layout:fixed;width:100%}.ledger-funds-half .funds-summary th,.ledger-funds-half .funds-summary td{height:44px;box-sizing:border-box}

/* v1.00 monthly and cumulative profit cards use identical dimensions */
.ledger-profit-main .metric{height:132px;padding:15px;overflow:auto}.ledger-profit-main .metric small{font-size:11px}.ledger-profit-main .metric strong{font-size:20px;margin-top:10px}.ledger-profit-main .metric p{font-size:11px;line-height:1.5;margin:10px 0 0}

/* v1.01 financial dashboard */
.profit-section{border:1px solid #b8cbd9;background:#f8fafc;padding:22px;margin-bottom:22px}.profit-section .ledger-profit-main .metric{border:1px solid #dfe7ed;background:white}.ledger-funds-columns{align-items:stretch}.funds-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;flex-wrap:wrap}.funds-title-row h1{margin:0}.funds-month{display:flex;align-items:center;gap:5px}.funds-month input{width:145px}.funds-month button{padding:7px 9px}.funds-period{color:#627a8b}.ledger-balance-cards{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:16px}.ledger-balance-cards em{font-size:12px;font-style:normal;margin-left:5px}.ledger-chart{margin-top:20px;padding:14px;border:1px solid #dce5ed;border-radius:8px;background:white}.ledger-chart svg{width:100%;height:auto;display:block;max-height:275px}.ledger-chart svg text{font-family:score,sans-serif;font-size:11px;fill:#627a8b}.chart-heading{display:flex;justify-content:space-between;gap:8px;font-size:12px}.chart-heading span{color:#718492}.chart-legend{display:flex;gap:16px;font-size:11px;margin:10px 0}.chart-legend span{display:flex;align-items:center;gap:5px}.chart-legend i{width:10px;height:10px;display:inline-block;border-radius:2px}.ledger-chart details{font-size:11px;overflow:auto}.ledger-chart .list-table{font-size:11px}.settle-cell{text-align:center!important;white-space:nowrap}.settle-button{padding:5px 8px;font-size:12px}.settle-done{background:#e6f2eb;color:#216342}.settle-hint{display:block;margin-top:5px}.ledger-table th,.ledger-table td{text-align:left}.ledger-table th:nth-child(n+5):nth-child(-n+9),.ledger-table td:nth-child(n+5):nth-child(-n+9){text-align:right;white-space:nowrap}.ledger-table th:nth-child(4),.ledger-table td:nth-child(4){text-align:left;white-space:normal}.ledger-table th:first-child,.ledger-table th:last-child{text-align:center}.ledger-table td.ledger-kind-cell{text-align:center}.ledger-table td:nth-child(2){white-space:nowrap}.ledger-table td:nth-child(3){max-width:240px;overflow-wrap:anywhere}#settlementDialog{width:min(640px,95vw);max-height:90vh;overflow:auto;padding:24px;border:1px solid #b8cbd9;border-radius:12px}#settlementDialog::backdrop{background:#17354b66}.settle-history>div{display:flex;justify-content:space-between;align-items:center;padding:8px;border-bottom:1px solid #e2e9ef}.settle-history{margin:14px 0}#settleAmountField[hidden]{display:none}@media(max-width:1000px){.funds-title-row{min-height:92px;align-content:start}.funds-title-row h1{width:100%}}

/* v1.02 profit charts side by side below numeric summaries */
.profit-chart-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-bottom:22px}.profit-chart-panel{min-width:0;margin:0;border:1px solid #b8cbd9}.profit-chart-panel .ledger-chart{margin-top:0}.profit-chart-panel h2{font-size:18px;margin-bottom:14px}@media(max-width:700px){.profit-chart-columns{grid-template-columns:1fr}}

/* v1.03 reference-aligned profit summaries */
.profit-summary-stack{display:grid;gap:2px;margin-bottom:22px}.profit-summary-stack .profit-section{margin:0;padding:24px 22px 16px;border:1px solid #b8cbd9;border-radius:12px;background:#f7f9fb;display:grid;grid-template-rows:minmax(64px,auto) auto 32px;row-gap:16px}.profit-summary-heading{display:flex;align-items:center;min-height:64px;margin:0}.profit-summary-heading h1{font-size:26px;margin:0 0 8px}.profit-summary-heading .sub{margin:0;font-size:12px}.profit-summary-stack .ledger-profit-main{margin:0;gap:14px}.profit-summary-stack .metric{height:138px;padding:18px;background:#fff;border:1px solid #d7e2eb}.profit-summary-stack .metric small{font-size:12px}.profit-summary-stack .metric strong{font-size:24px;margin-top:14px}.profit-summary-stack .profit-summary-note{margin:0;min-height:32px;align-self:center;font-size:12px}.profit-summary-stack .ledger-heading{gap:8px}@media(max-width:1100px){.profit-summary-stack .profit-section{grid-template-rows:auto auto auto}.profit-summary-heading{flex-wrap:wrap}.profit-summary-stack .metric strong{font-size:21px}}

/* v1.04: left labels attached to four amount cards */
.profit-summary-stack{gap:8px;margin-bottom:12px}
.profit-summary-stack .profit-section{display:grid;grid-template-columns:minmax(150px,24%) minmax(0,1fr);grid-template-rows:auto;gap:0;padding:0;border-radius:8px;overflow:hidden}
.profit-side-label{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;margin:0;padding:18px 10px;border-right:1px solid #aabfcc;font-size:clamp(30px,3.7vw,58px);line-height:1.2;color:#102e46;background:#f3f7fa}
.profit-summary-stack .ledger-profit-main{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:10px;padding:18px;min-width:0}
.profit-summary-stack .metric{height:144px;min-width:0;padding:16px 12px}
.profit-summary-stack .metric strong{font-size:clamp(16px,1.65vw,24px);white-space:nowrap}
@media(max-width:900px){.profit-summary-stack .profit-section{grid-template-columns:120px minmax(0,1fr)}.profit-summary-stack .ledger-profit-main{padding:12px;gap:6px}.profit-summary-stack .metric{padding:12px 8px}.profit-side-label{font-size:32px}}
@media(max-width:650px){.profit-summary-stack{overflow-x:auto}.profit-summary-stack .profit-section{min-width:760px}}

/* v1.06: balanced dashboard typography */
.profit-summary-stack{gap:10px}
.profit-summary-stack .profit-section{grid-template-columns:150px minmax(0,1fr);border-color:#c8d7e2}
.profit-summary-stack .profit-side-label{font-family:score,sans-serif;font-weight:500;font-size:22px;line-height:1.45;gap:0;padding:16px;border-right-color:#c8d7e2}
.profit-summary-stack .ledger-profit-main{padding:14px;gap:12px}
.profit-summary-stack .metric{height:108px;padding:16px;display:flex;flex-direction:column;justify-content:center;overflow:auto}
.profit-summary-stack .metric small{font-size:13px;font-weight:400;line-height:1.4}
.profit-summary-stack .metric strong{font-family:score,sans-serif;font-size:24px;font-weight:500;line-height:1.35;margin-top:12px;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.profit-summary-stack .metric em{font-size:12px;font-weight:400;margin-left:5px}
@media(max-width:1200px){.profit-summary-stack .profit-section{grid-template-columns:120px minmax(0,1fr)}.profit-summary-stack .metric{padding:12px}.profit-summary-stack .metric strong{font-size:20px}.profit-summary-stack .profit-side-label{font-size:20px}}
@media(max-width:900px){.profit-summary-stack{overflow-x:auto}.profit-summary-stack .profit-section{min-width:820px}.profit-summary-stack .ledger-profit-main{gap:8px;padding:12px}.profit-summary-stack .metric small{font-size:12px}.profit-summary-stack .metric strong{font-size:18px}}
/* v1.07: aligned monthly and cumulative summary columns */
.profit-summary-stack{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;overflow:visible;margin-bottom:12px}
.profit-summary-stack .profit-section{display:block;min-width:0;padding:20px;background:#f8fafc;border:1px solid #b8cbd9;border-radius:12px}
.profit-summary-stack .profit-side-label{flex-direction:row;justify-content:flex-start;gap:6px;padding:0;margin:0 0 16px;border:0;background:transparent;font-size:22px;line-height:1.4}
.profit-summary-stack .ledger-profit-main{grid-template-columns:repeat(2,minmax(0,1fr));padding:0;gap:12px}
.profit-summary-stack .metric{height:108px;padding:16px}
.profit-summary-stack .metric strong{font-size:24px}
@media(max-width:1100px){.profit-summary-stack .profit-section{padding:16px}.profit-summary-stack .metric{padding:12px}.profit-summary-stack .metric strong{font-size:20px}}
@media(max-width:700px){.profit-summary-stack{grid-template-columns:1fr}.profit-summary-stack .profit-section{min-width:0}.profit-summary-stack .metric strong{font-size:20px}}

/* v1.08: report date in cumulative heading, actions at left */
.toolbar.ledger-heading.profit-actions{justify-content:flex-start;align-items:center}
.profit-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px;margin-bottom:16px;flex-wrap:wrap}
.profit-summary-stack .profit-title-row .profit-side-label{margin:0}
.profit-title-row .ledger-month{margin:0;display:flex;align-items:center;gap:6px}
.profit-title-row .ledger-month input{width:154px}
.profit-title-row .ledger-month button{padding:7px 10px}
.profit-summary-stack #monthlyProfitSection>.profit-side-label{min-height:38px}
.ht-drop{display:flex;flex-direction:column;align-items:center;gap:12px;padding:28px;border:2px dashed #9bb8ce;border-radius:10px;background:#f5f9fc;cursor:pointer;margin:20px 0}.ht-drop.dragging{background:#e0eff8;border-color:#205e83}.ht-drop span{font-size:12px;color:#637e91}.ht-drop input{max-width:450px;background:white}.ht-file{border:1px solid #d7e2eb;border-radius:8px;padding:14px;margin:10px 0}.ht-file .toolbar{margin-bottom:8px}.ht-file select{width:150px}
#reportRangeDialog{width:min(520px,95vw);border:1px solid #b8cbd9;border-radius:12px;padding:24px}#reportRangeDialog::backdrop{background:#17354b66}#reportRangeDialog .field{margin-bottom:14px}.profit-title-row .ledger-month,.funds-month{flex-wrap:wrap}.profit-summary-stack .profit-section{display:flex;flex-direction:column}.profit-summary-stack .ledger-profit-main{margin-top:auto}.profit-title-row{min-height:44px}.ledger-funds-columns .funds-title-row{min-height:92px;align-content:start}

.profit-summary-stack .metric p{font-size:11px;line-height:1.4;margin:5px 0 0;color:#637b8e}.profit-summary-stack .metric{height:120px}

#ledgerDetails[hidden]{display:none!important}#ledgerTransactions>.toolbar{justify-content:space-between;margin-bottom:0}#ledgerDetails{margin-top:18px}#ledgerDetailsToggle{flex-shrink:0}
/* v1.15: consistent transaction type alignment with optional actions */
.ledger-table td.ledger-kind-cell,.ledger-table th:last-child{text-align:left}
.ledger-table td.ledger-kind-cell{white-space:nowrap;padding-left:14px;padding-right:14px}
.ledger-kind-cell .ledger-kind{vertical-align:middle}
.ledger-kind-cell .ledger-manual-actions{display:inline-flex;vertical-align:middle;flex-wrap:nowrap;margin:0 0 0 8px}

/* v1.16 compact profit overview and direct settlement */
.profit-summary-stack{gap:16px;margin-bottom:8px}.profit-summary-stack .profit-section{padding:12px 14px}.profit-summary-stack .profit-side-label{font-size:20px;margin-bottom:10px}.profit-title-row{min-height:34px;margin-bottom:10px}.profit-summary-stack #monthlyProfitSection>.profit-side-label{min-height:34px}.profit-summary-stack .ledger-profit-main{gap:8px}.profit-summary-stack .metric{height:82px;padding:9px 12px}.profit-summary-stack .metric strong{font-size:22px;margin-top:5px;line-height:1.2}.profit-summary-stack .metric p{margin-top:3px;font-size:10px}.profit-summary-stack .metric small{font-size:12px}.profit-chart-columns{gap:16px;margin-bottom:14px}.profit-chart-panel{padding:12px 14px}.profit-chart-panel h2{font-size:16px;margin:0 0 8px}.profit-chart-panel .ledger-chart{padding:8px 10px}.profit-chart-panel .ledger-chart svg{height:clamp(140px,23vh,190px);max-height:190px}.profit-chart-panel .chart-legend{margin:6px 0;gap:12px}.profit-actions{margin-bottom:10px}.settle-actions{display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap}.settle-detail{font-size:11px;padding:4px 6px}.settle-hint{margin-top:3px}
/* v1.17: compact funds overview */
.ledger-funds-columns{gap:16px;margin:12px 0 8px}
.ledger-funds-half{padding:12px 14px}
.ledger-funds-columns .funds-title-row{min-height:36px;align-content:center;margin-bottom:6px}
.funds-title-row h1{font-size:20px}
.ledger-funds-half>p.sub{margin:6px 0;font-size:11px;line-height:1.35}
.ledger-funds-half .funds-summary th,.ledger-funds-half .funds-summary td{height:29px;padding:5px 8px;font-size:12px;line-height:1.4}
.ledger-funds-half .ledger-chart{margin-top:8px;padding:8px 10px}
.ledger-funds-half .chart-legend{margin:5px 0}
.ledger-funds-half .ledger-chart svg{height:clamp(130px,20vh,165px);max-height:165px}
#fundsBalanceArea .ledger-balance-cards{margin-top:8px;gap:16px}
#fundsBalanceArea .metric{padding:8px 12px}
#fundsBalanceArea .metric strong{font-size:18px;margin-top:4px}
#fundsBalanceArea>p.sub{margin:6px 0 10px;font-size:11px}
#fundsBalanceArea+details.panel{padding:10px 14px;margin-bottom:8px}
#fundsBalanceArea+details.panel+.panel{padding:10px 14px;margin-bottom:8px}
#fundsBalanceArea+details.panel+.panel h2{font-size:16px;margin:0 0 6px}
#fundsBalanceArea+details.panel+.panel p{margin:5px 0}
@media(max-width:1000px){.ledger-funds-columns .funds-title-row{min-height:72px}}
/* v1.18: additional vertical room for VAT summary */
.ledger-funds-half{padding:10px 12px}
.ledger-funds-columns .funds-title-row{min-height:32px;margin-bottom:3px}
.ledger-funds-half>p.sub{margin:4px 0}
.ledger-funds-half .funds-summary th,.ledger-funds-half .funds-summary td{height:25px;padding:3px 8px}
.ledger-funds-half .ledger-chart{margin-top:6px;padding:6px 8px}
.ledger-funds-half .ledger-chart svg{height:clamp(115px,17vh,140px);max-height:140px}
#fundsBalanceArea .metric{padding:6px 12px}
#fundsBalanceArea>p.sub{margin:4px 0 6px}
#fundsBalanceArea+details.panel{padding:7px 12px;margin-bottom:6px}
#fundsBalanceArea+details.panel+.panel{padding:8px 12px;margin-bottom:6px}
#fundsBalanceArea+details.panel+.panel p{margin:3px 0}

/* v1.19: readable axes at actual display size, fixed 만원 units. */
.ledger-chart .chart-scroll{overflow-x:auto;padding:2px 0;}
.profit-chart-panel .ledger-chart svg,.ledger-funds-half .ledger-chart svg{height:200px;max-height:none;width:100%;}
.ledger-chart svg text{fill:#173b59;font-size:15px;font-weight:500;}
.ledger-chart svg .chart-x-year{font-size:13px;fill:#3b5368;}
.ledger-chart .chart-heading{font-size:13px;color:#173b59;}
.ledger-chart .chart-heading>span{font-weight:700;}

/* v1.21 annual comparison selector */
#ledgerAnnualYear{font-family:score,sans-serif;font-size:inherit;color:inherit;padding:3px 28px 3px 8px;min-width:105px;width:auto;vertical-align:middle;}

/* v1.22 transaction disclosure */
#ledgerTransactions>.ledger-transactions-summary{font-size:18px;font-weight:500;color:#173b59;cursor:pointer;}
#ledgerTransactions[open]>.ledger-transactions-summary{margin-bottom:12px;}

/* v1.25: equal compact disclosure headings, monthly comparison first. */
#ledgerAnnualPanel,#ledgerTransactions{padding:7px 12px;margin-bottom:6px;}
#ledgerAnnualPanel>summary,#ledgerTransactions>.ledger-transactions-summary{font-size:13px;font-weight:400;color:#17354b;line-height:30px;min-height:30px;cursor:pointer;}
#ledgerAnnualPanel[open]>summary,#ledgerTransactions[open]>.ledger-transactions-summary{margin-bottom:10px;}
#ledgerAnnualYear{height:26px;padding-top:2px;padding-bottom:2px;vertical-align:baseline;}

#ledgerAnnual tfoot th,#ledgerAnnual tfoot td{background:#e8f1f6;border-top:2px solid #9bb6cb;font-weight:500;}
/* v1.27 local account gate and permissions */
body.locked>.appbar,body.locked>main,body.locked>#printArea{display:none!important}
#loginPanel{max-width:430px;margin:10vh auto;padding:28px}#loginPanel .field{margin:14px 0}#loginError,#accountError{color:#a32c37}
.account-tools{display:flex;gap:5px;align-items:center;flex-wrap:wrap;font-size:11px}.account-tools button{padding:5px 7px}.appbar{height:auto;min-height:76px;flex-wrap:wrap;gap:12px;padding-top:10px;padding-bottom:10px}
#accountDialog{width:min(900px,95vw);max-height:85vh;overflow:auto}.account-row{display:flex;align-items:center;gap:10px;padding:10px 0}.account-row>b{min-width:110px}.account-row>select{width:150px}.account-row>input{width:220px}.account-row input[type=checkbox]{width:auto}#auditRows{max-height:55vh;overflow:auto}
.ledger-month-caption{font-size:12px;color:#627a8b;font-weight:400}.ledger-kind small{display:block;font-weight:400;font-size:11px}

/* v1.28: align financial columns on their last digit. */
#ledgerAnnual .list-table tr>:not(:first-child),
#ledgerRows .ledger-table tr>:nth-child(n+5):nth-child(-n+9),
.ledger-chart .list-table tr>:not(:first-child),
.funds-summary td:last-child{
 text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;
}

#ledgerAnnual .list-table{min-width:1250px;}
#ledgerAnnual tr>:nth-last-child(-n+2){background:#f4f8fb;}

#ledgerAnnual .annual-unit{text-align:right;font-size:12px;color:#627a8b;margin:5px 0 8px;}

/* v1.33 outstanding balances */
#ledgerAnnual .list-table td.outstanding-amount{color:#c62828;}
/* v1.34 personal finances */
.personal-panel .toolbar h1{margin:0 auto 0 0;font-size:20px;}
.personal-metrics{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin:16px 0;}
.personal-metrics .metric strong{text-align:right;font-variant-numeric:tabular-nums;font-size:22px;}
.personal-metrics .metric em{font-size:12px;margin-left:4px;font-style:normal;}
.personal-table-scroll{overflow-x:auto;}.personal-table{min-width:1000px;}
.personal-table td.personal-amount{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.personal-table td small{display:block;margin-top:5px;}
#personalDialog{width:min(680px,90vw);max-height:90vh;overflow:auto;}
@media(max-width:850px){.personal-metrics{grid-template-columns:repeat(2,minmax(120px,1fr));}}
.personal-panel .toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.personal-panel .toolbar input[type="month"]{width:160px;flex:0 0 160px;margin:0;}
/* v1.35 menu permission checkboxes */
#accountDialog{width:min(1100px,94vw);max-width:94vw;max-height:90vh;overflow:auto;}
.account-permission-row{padding:14px 0;border-bottom:1px solid #dbe4eb;}
.account-user-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.account-user-line>b{min-width:130px;}.account-user-line>input[type=password]{width:260px;}
.permission-checks{display:flex;flex-wrap:nowrap;align-items:center;gap:22px;overflow-x:auto;padding:14px 0;}
.permission-checks label,.account-user-line>label{display:flex;align-items:center;gap:7px;white-space:nowrap;}
.permission-checks input[type=checkbox],.account-active{width:18px;height:18px;flex:0 0 18px;accent-color:#125580;margin:0;}
.account-credentials{display:grid;grid-template-columns:1fr 1fr;gap:16px;}

.account-user-line>.account-organization{width:150px;}
.account-credentials{grid-template-columns:1fr 1fr 1fr;}
/* v1.36 monthly entry / cumulative personal finances */
.personal-heading{display:flex;align-items:center;gap:8px;}.personal-heading h1{margin-right:auto;font-size:22px;}
.personal-heading input[type=month]{width:160px;flex:0 0 160px;}
.personal-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start;}
.personal-columns .panel{margin:0;min-width:0;}.personal-columns h2{font-size:21px;margin:0;}
.personal-columns .toolbar{min-height:38px;}.personal-columns .toolbar h2{margin-right:auto;}
.personal-summary{width:100%;border-collapse:collapse;margin:8px 0;}
.personal-summary td{padding:8px;border-bottom:1px solid #dbe5ec;}
.personal-summary td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
.personal-summary tr:last-child{background:#eaf3f8;font-weight:600;}
.personal-month-table{width:100%;min-width:520px;}.personal-month-table td{padding:10px 6px;vertical-align:top;overflow-wrap:anywhere;}
.personal-month-table td:first-child{width:30%;}.personal-month-table td:nth-child(2){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}
.personal-month-table small{display:block;margin:4px 0;font-size:12px;}.personal-month-table button{padding:5px 7px;white-space:nowrap;}
.personal-row-actions{display:flex;gap:4px;margin-top:6px;}
.personal-breakdown td:not(:first-child),.personal-breakdown th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;}
@media(max-width:1000px){.personal-columns{grid-template-columns:1fr;}}
#loanDialog{width:min(1000px,94vw);max-height:92vh;overflow:auto;}
.loan-plan-scroll{max-height:280px;overflow:auto;}.loan-plan{min-width:670px;}
.loan-plan th,.loan-plan td{white-space:nowrap;}.loan-plan td:nth-child(n+2):nth-child(-n+5){text-align:right;font-variant-numeric:tabular-nums;}
.personal-columns .toolbar{flex-wrap:wrap;}.personal-columns .toolbar button{padding:6px 8px;}
#planDialog{width:min(900px,94vw);max-height:90vh;overflow:auto;}
.register-types{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:14px;margin:20px 0;}
.register-types button{min-height:70px;font-size:16px;}
#personalForm input[type=checkbox]{width:18px;height:18px;}
.loan-options{border:1px solid #dce4ed;border-radius:6px;padding:10px 12px;margin:10px 0}.loan-options summary{cursor:pointer;font-weight:500}.loan-options[open] summary{margin-bottom:10px}#loanBalanceFields[hidden],#loanFirstOverride[hidden]{display:none}

.personal-category-scroll{overflow-x:auto}.personal-category-table{width:100%;font-variant-numeric:tabular-nums}.personal-category-table th,.personal-category-table td{padding:9px 8px;white-space:nowrap}.personal-category-table th:not(:first-child),.personal-category-table td:not(:first-child){text-align:right}.personal-category-table tfoot{background:#e9f3f8;font-weight:700;border-top:2px solid #cadcea}.personal-income-summary{margin-top:10px}.personal-details>summary{cursor:pointer;font-weight:500;padding:12px 0}.personal-details{margin-top:8px}

.loan-interest-periods{display:block;color:#677f91;font-size:11px;line-height:1.5;margin-top:3px}

.loan-plan th:nth-child(n+2):nth-child(-n+5){text-align:right}.loan-plan th,.loan-plan td{vertical-align:top}.loan-plan th:nth-child(7),.loan-plan td:nth-child(7){text-align:center}input[data-money-input]{text-align:right;font-variant-numeric:tabular-nums}#loanForm .grid{align-items:end}#loanForm .grid>.field,#loanForm .grid>div>.field{display:flex;flex-direction:column;gap:4px;min-width:0}


/* Login layout v1.47 */



#loginPanel{font-family:score,sans-serif;color:#092c51;color-scheme:light}
#loginPanel *{box-sizing:border-box}

#loginPanel{max-width:650px;margin:auto;background:#fff;border:1px solid #dfe6ec;border-radius:18px;overflow:hidden}
#loginPanel .login-brand-header{position:relative;padding:40px 40px 30px}
#loginPanel .login-brand{display:flex;align-items:center;gap:26px;min-height:104px}
#loginPanel .login-brand-text{min-width:0;animation:nl-reveal 2.2s 2.4s ease-in-out both}
#loginPanel h1{font:500 34px/1.35 score,sans-serif;margin:0 0 10px;letter-spacing:-.8px}
#loginPanel h2{font:500 22px/1.4 score,sans-serif;margin:0}
#loginPanel .login-line-track{position:absolute;bottom:0;left:40px;right:40px;height:2px;background:#e2e9ef}
#loginPanel .login-connecting-line{height:100%;background:#092c51;transform-origin:left;animation:nl-line 2.2s 2.4s ease-in-out both}
#loginPanel .login-main{padding:24px 40px 38px}
#loginPanel p{font:400 17px/1.6 score,sans-serif;margin:0 0 24px}
#loginPanel label{display:block;font:400 18px/1.5 score,sans-serif;margin-bottom:18px}
#loginPanel input{display:block;width:100%;height:54px;border:1px solid #cfdae2;border-radius:7px;background:#fff;color:#092c51;font:400 18px score,sans-serif;margin-top:6px;padding:10px 14px}
#loginPanel #loginForm button{font:400 18px score,sans-serif;background:#fff;color:#092c51;border:1px solid #cedae2;border-radius:8px;padding:13px 24px;min-height:48px}
#loginPanel #loginForm button:hover{background:#e8f1f6}
#loginPanel .login-symbol{position:relative;flex:0 0 104px;width:104px;height:100px;background:#fff;display:block}
#loginPanel .login-symbol img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
#loginPanel .login-symbol-body{position:absolute;inset:0;transform-origin:45% 60%;animation:nl-hex 1.1s ease-in-out both}
#loginPanel .login-symbol-hex{visibility:hidden;animation:nl-cover 2.4s steps(1,end) both}
#loginPanel .login-symbol-reveal{position:absolute;inset:0;display:block;background:#fff;animation:nl-reveal 1.2s 1.1s cubic-bezier(.35,0,.2,1) both}
#loginPanel .login-symbol-star{animation:nl-star 2.2s 2.4s ease-in-out both}
#loginPanel .login-symbol-final{background:#fff;visibility:hidden;animation:nl-final 4.6s steps(1,end) forwards}
@keyframes nl-hex{0%{transform:scale(1)}38%{transform:scale(1.32)}100%{transform:scale(1)}}
@keyframes nl-cover{0%{visibility:visible}100%{visibility:hidden}}
@keyframes nl-reveal{0%{clip-path:inset(0 100% 0 0)}100%{clip-path:inset(0 0 0 0)}}
@keyframes nl-star{0%{opacity:0}16%{opacity:1}32%{opacity:.2}48%{opacity:1}64%{opacity:.3}80%,100%{opacity:1}}
@keyframes nl-final{0%{visibility:hidden}100%{visibility:visible}}
@keyframes nl-line{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(max-width:520px){#loginPanel .login-brand-header{padding:30px 22px 24px}#loginPanel .login-main{padding:22px}#loginPanel .login-brand{gap:16px;min-height:74px}#loginPanel .login-symbol{flex-basis:68px;width:68px;height:66px}#loginPanel h1{font-size:25px}#loginPanel h2{font-size:16px}#loginPanel p{font-size:15px}#loginPanel .login-line-track{left:22px;right:22px}}
@media(max-width:360px){#loginPanel h1{font-size:22px}#loginPanel .login-brand{gap:12px}#loginPanel .login-symbol{flex-basis:56px;width:56px;height:54px}#loginPanel h2{font-size:14px}}
@media(prefers-reduced-motion:reduce){#loginPanel *{animation:none!important}#loginPanel .login-symbol-hex{visibility:hidden}#loginPanel .login-symbol-final{visibility:visible}}

#loginPanel .login-brand-text .login-english{font:400 16px/1.5 score,sans-serif;letter-spacing:1px;margin:0;white-space:nowrap}
#loginPanel .login-main h2{font:500 27px/1.4 score,sans-serif;margin:0 0 14px}
#loginPanel .login-main{padding-top:28px}
#loginPanel input{height:60px}
#loginPanel #loginForm button{width:100%;height:60px;background:#092c51;color:#fff;border-color:#092c51;font-weight:500;margin-top:4px}
#loginPanel #loginForm button:hover{background:#092c51}
#loginPanel .login-staff-note{font-size:14px;text-align:center;margin:18px 0 0}
#loginPanel input::placeholder{color:#092c51;opacity:1}
@media(max-width:520px){#loginPanel .login-brand-text .login-english{font-size:10px;letter-spacing:.3px}#loginPanel .login-main h2{font-size:23px}}
@media(max-width:360px){#loginPanel .login-brand-text .login-english{font-size:9px;letter-spacing:0}#loginPanel .login-main h2{font-size:21px}}

#loginPanel .login-brand{position:relative;justify-content:center;min-height:110px;padding:0 90px}
#loginPanel .login-brand .login-symbol{position:absolute;left:0;top:5px;width:90px;height:86px}
#loginPanel .login-brand-text{text-align:center;flex:1}
#loginPanel h1{font-size:32px;white-space:nowrap}
#loginPanel .login-brand-text .login-english{font-size:14px;letter-spacing:.5px}
#loginPanel .login-main{background:#f0f3f6;color:#092c51;padding-top:30px}
#loginPanel .login-main h2,#loginPanel .login-main>p{text-align:center;color:#092c51}
#loginPanel .login-main label{color:#092c51}
#loginPanel .login-main input{background:#fff;color:#092c51;border-color:#cfdae2}
#loginPanel .login-main input::placeholder{color:#092c51;opacity:.65}
#loginPanel .login-main #loginForm button{background:#fff;color:#092c51;border-color:#cfdae2}
#loginPanel .login-main #loginForm button:hover{background:#e8f1f6}
#loginPanel .login-line-track{left:0;right:0;bottom:0}
#loginPanel .login-connecting-line{background:#092c51}
@media(max-width:620px){#loginPanel .login-brand{padding:0;flex-direction:column;gap:18px}#loginPanel .login-brand .login-symbol{position:relative;left:auto;top:auto;flex-basis:auto;width:82px;height:79px}#loginPanel h1{font-size:29px}#loginPanel .login-brand-text .login-english{font-size:13px}}
@media(max-width:360px){#loginPanel h1{font-size:26px}#loginPanel .login-brand-text .login-english{font-size:11px}}

#loginPanel .login-brand{position:relative;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0;gap:18px;min-height:110px}
#loginPanel .login-brand .login-symbol{position:relative;left:auto;top:auto;flex:0 0 104px;width:104px;height:100px}
#loginPanel .login-brand-text{flex:0 1 auto;text-align:left;min-width:0;color:#092c51}
#loginPanel .login-brand-text h1{color:#092c51!important;opacity:1;font:500 34px/1.35 score,sans-serif;margin:0 0 10px;letter-spacing:-.8px}
#loginPanel .login-brand-text .login-english{color:#092c51!important;opacity:1;font:400 15px/1.5 score,sans-serif;letter-spacing:.5px;margin:0}
#loginPanel .login-main .login-main h2{color:#092c51!important}
@media(max-width:520px){#loginPanel .login-brand{gap:14px;min-height:80px}#loginPanel .login-brand .login-symbol{flex-basis:70px;width:70px;height:68px}#loginPanel .login-brand-text h1{font-size:26px}#loginPanel .login-brand-text .login-english{font-size:11px;letter-spacing:0}}
@media(max-width:360px){#loginPanel .login-brand{gap:12px}#loginPanel .login-brand .login-symbol{flex-basis:56px;width:56px;height:54px}#loginPanel .login-brand-text h1{font-size:23px}#loginPanel .login-brand-text .login-english{font-size:9px}}

#loginPanel .login-brand{justify-content:center}

#loginPanel{width:calc(100% - 32px);max-width:650px;margin:32px auto;padding:0;font-family:score,sans-serif;font-size:18px;color:#092c51;overflow:hidden}
#loginPanel .login-main h2{font:500 27px/1.4 score,sans-serif;text-align:center;margin:0 0 14px;color:#092c51}
#loginPanel .login-brand-text .login-english{color:#092c51!important}
#loginPanel #loginError{color:#b43f3f;margin:0 0 12px;white-space:normal}
#loginPanel #loginError:empty{display:none}
#loginPanel #loginForm button{margin-top:4px}
#loginPanel .login-main .field{margin-bottom:18px}
#loginPanel .login-brand{justify-content:center}
@media(max-width:520px){#loginPanel{margin:18px auto}#loginPanel .login-main h2{font-size:23px}}
/* Filled is presence of a value, not validation or payment completion. */
:root{--filled-input-background:#e8f1f6}
input.has-value,textarea.has-value,select.has-value{background-color:var(--filled-input-background)!important}
#loginPanel #loginForm button:hover{background-color:var(--filled-input-background)}
@media print{input.has-value,textarea.has-value,select.has-value{background-color:transparent!important}}

/* Approved navy login frame v1.48 */
#loginPanel{border:2px solid #092c51;box-shadow:none;border-radius:18px}
#loginPanel .login-main input{border:1.5px solid #708ba5;border-radius:6px;box-shadow:none;transition:border-color .18s,background-color .18s}
#loginPanel .login-main input:hover{border-color:#092c51}
#loginPanel .login-main input:focus{border-color:#092c51;outline:2px solid rgba(9,44,81,.14);outline-offset:2px}
#loginPanel .login-main #loginForm button{border:2px solid #092c51;border-radius:6px;background:#fff;color:#092c51}
#loginPanel .login-main #loginForm button:hover{background:#e8f1f6}

#loanForm [hidden]{display:none!important}#loanMethodFields>div:only-child{grid-column:1/-1}

#loanRegularField,#loanPrincipalField{grid-column:1/-1}

/* Personal monthly overview is full width; cumulative follows below. */
.personal-columns{grid-template-columns:minmax(0,1fr)}
.personal-category-parent{font-weight:500;background:#f4f7fa}
.personal-category-child td:first-child{padding-left:28px;white-space:normal}
.personal-child-number{color:#627a8b;display:inline-block;min-width:22px}
.personal-category-table th:first-child{width:46%}
.personal-category-table td:not(:first-child){width:18%}
#recurringForm .repeat-check{display:flex;align-items:center;gap:8px;margin:18px 0}
#recurringForm input[type=checkbox]{width:18px;height:18px}
#recurringForm [hidden]{display:none!important}

/* v1.54: personal payment details, one record per line; existing colors retained. */
.personal-month-table{min-width:1360px;}
.personal-month-table th,.personal-month-table td{white-space:nowrap;vertical-align:middle;padding:7px 8px;overflow-wrap:normal;}
.personal-month-table td:first-child{width:auto;}
.personal-month-table td:nth-child(2){text-align:left;}
.personal-month-table th:nth-child(4),.personal-month-table td.personal-amount{text-align:right;font-variant-numeric:tabular-nums;}
.personal-inline-name{display:block;max-width:250px;overflow:hidden;text-overflow:ellipsis;}
.personal-inline-note{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;}
.personal-inline-note:focus{max-width:none;}
.personal-inline-breakdown{font-size:12px;font-variant-numeric:tabular-nums;}
.personal-inline-actions{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;}
.personal-inline-actions button{margin:0;}

.personal-chart-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin:12px 0;}.personal-chart-legend span{display:inline-flex;align-items:center;gap:7px;font-size:13px;}.personal-chart-legend i{width:12px;height:12px;border-radius:3px;}.personal-chart-scroll{overflow-x:auto;}.personal-stacked-chart{display:block;width:100%;min-width:1000px;max-height:410px;}.personal-stacked-chart text{fill:var(--navy,#163b58);font-family:inherit;font-size:14px;}.personal-year-table{min-width:1050px;width:100%;}.personal-year-table th,.personal-year-table td{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;}.personal-year-table th:first-child,.personal-year-table td:first-child{text-align:left;}

/* v1.56: center explanatory columns; keep payment amounts right aligned. */
.personal-month-table th:nth-child(5),.personal-month-table td:nth-child(5),.personal-month-table th:nth-child(7),.personal-month-table td:nth-child(7){text-align:center;}
.personal-month-table .personal-inline-note{margin-inline:auto;text-align:center;}

.personal-calculation{cursor:help;border-bottom:1px dotted currentColor;}.personal-calculation:focus{outline:2px solid #7e9db7;outline-offset:2px;}#personalCalculationMemo{position:fixed;z-index:10020;background:white;color:#163b58;border:1px solid #a7bccd;border-radius:9px;box-shadow:0 6px 22px #17364c29;padding:14px;width:min(480px,calc(100vw - 24px));font-size:13px;}#personalCalculationMemo[hidden]{display:none;}.calculation-lines{max-height:240px;overflow:auto;margin:10px 0;}.calculation-lines>div,.calculation-total{display:flex;justify-content:space-between;gap:20px;padding:5px 0;}.calculation-lines b,.calculation-total b{white-space:nowrap;font-variant-numeric:tabular-nums;}.calculation-total{border-top:1px solid #cad6e0;}#personalReviewDialog{width:min(590px,calc(100vw - 32px));}.review-totals{padding:10px 0;}.review-totals>div{display:flex;justify-content:space-between;padding:7px 0;}.review-totals b{font-variant-numeric:tabular-nums;}#personalShortfall{padding:12px 0;font-size:19px;}#personalReviewForm [name=available]{text-align:right;font-variant-numeric:tabular-nums;}

#personalReviewDialog{font-family:inherit;color:#163b58;border:1px solid #a7bccd;border-radius:12px;padding:24px;max-height:90vh;overflow:auto;}#personalReviewDialog h2{font-size:21px;margin:0 0 14px;}#personalReviewDialog::backdrop{background:#14304733;}

.personal-cash-panel{margin-bottom:16px;}.personal-cash-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}.personal-cash-cards>div{padding:14px;background:#f3f7fa;border:1px solid #d9e3ec;border-radius:8px;}.personal-cash-cards span{display:block;margin-bottom:8px;}.personal-cash-cards strong{display:block;text-align:right;font-size:24px;font-variant-numeric:tabular-nums;}#personalCashDialog{font-family:inherit;color:#163b58;border:1px solid #a7bccd;border-radius:12px;padding:24px;width:min(550px,calc(100vw - 32px));}#personalCashDialog [name=available]{text-align:right;}@media(max-width:700px){.personal-cash-cards{grid-template-columns:1fr;}}

.personal-month-controls{justify-content:flex-end;margin:8px 0 12px;gap:10px;}.personal-month-controls input{width:auto;}
/* Three personal cash summary cards */
.personal-cash-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.personal-cash-cards>div{position:relative;min-width:0}
.personal-cash-cards strong{font-size:clamp(20px,2vw,32px)!important;white-space:nowrap}
.personal-cash-cards small{display:block;margin-top:8px;color:#60768a;font-size:12px}
@media(max-width:800px){.personal-cash-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

#logoutConfirmDialog{font-family:inherit;color:#163b58;border:1px solid #a7bccd;border-radius:12px;padding:24px;width:min(440px,calc(100vw - 32px));}#logoutConfirmDialog::backdrop{background:rgba(9,44,81,.28)}#logoutConfirmDialog h2{font-size:20px;margin-top:0}#logoutConfirmDialog .dialog-actions{justify-content:flex-end}

.load-type-count{display:block;font-size:14px;color:#60768a;margin-top:8px}#registeredChoice{width:100%;min-height:210px}#registeredChoice option{padding:8px 10px}#registeredSearch{width:100%}

/* v1.70: full-width upload panels; conceal cost amounts only. */
.cost-upload-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.cost-upload-layout>.panel{min-width:0;margin-bottom:0}
.cost-upload-layout>aside{max-height:none;overflow:visible}
#costUploadList{max-height:460px;overflow:auto}
.cost-file{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(200px,2fr) minmax(180px,1fr) auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid #d9e3ec;overflow-wrap:anywhere}
.cost-file small{display:block;margin:0}
.cost-file button{margin:0;white-space:nowrap}
body.cost-hidden .cost-private,body.cost-hidden [data-key="cost"],body.cost-hidden #priceForm [name="cost"]{visibility:hidden}
@media(max-width:850px){.cost-file{grid-template-columns:minmax(0,1fr)}.cost-file button{justify-self:start}}

/* v1.71 upload / stored-file split */
.cost-upload-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-bottom:20px}
.cost-file{grid-template-columns:minmax(0,1fr) auto;gap:8px 14px}
.cost-file>b,.cost-file>div,.cost-file>small{grid-column:1}.cost-file>button{grid-column:2;grid-row:1 / span 3}
.cost-drop-zone{border:2px dashed #729bb4;border-radius:12px;background:#f1f7fb;padding:30px 18px;text-align:center;cursor:pointer;display:grid;gap:12px;min-height:150px;align-content:center}
.cost-drop-zone.dragging,.cost-drop-zone:hover,.cost-drop-zone:focus-visible{border-color:#143f58;background:#e2eff7;outline:none}
.cost-drop-zone.busy{opacity:.65;cursor:wait}#costUploadStatus{overflow-wrap:anywhere;max-height:220px;overflow:auto}
@media(max-width:900px){.cost-upload-layout{grid-template-columns:minmax(0,1fr)}}

.column-filter{padding:3px 7px;min-width:28px;font-size:12px;margin-left:4px}.cost-filter-dialog{width:min(520px,90vw);border:1px solid #c4d5e0;border-radius:14px;padding:24px;color:#143f58}.cost-filter-dialog::backdrop{background:#10283866}.cost-filter-values{max-height:320px;overflow:auto;margin:12px 0}.cost-filter-values label{display:flex;align-items:center;gap:8px;padding:8px}.cost-filter-values label[hidden]{display:none}.cost-filter-values input{width:auto}.cost-filter-dialog>input{width:100%}

.cost-data-table{min-width:1900px}.cost-data-table th{white-space:nowrap}.cost-data-table td{vertical-align:middle}.cost-data-table td:nth-child(3){min-width:130px}.cost-data-table td:nth-child(6){min-width:220px}.cost-data-table .cost-amount{text-align:right;white-space:nowrap}

/* v1.75 consistent cost-table alignment */
.cost-data-table{width:100%;min-width:1811px;table-layout:fixed;border-collapse:collapse}
.cost-data-table th,.cost-data-table td{text-align:center;vertical-align:middle;padding:10px 8px;font-size:12px;line-height:1.55}
.cost-data-table th{height:58px;background:#f2f6f9;color:#60798b;font-weight:500;border-bottom:1px solid #cddce6}
.cost-data-table .cost-col-heading{display:flex;justify-content:center;align-items:center;gap:6px;min-height:32px}
.cost-data-table .cost-col-heading>span{white-space:normal;word-break:keep-all}
.cost-data-table .column-filter{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;min-width:24px;height:26px;padding:0;margin:0;border-radius:6px;font-size:11px}
.cost-data-table td{height:96px;border-bottom:1px solid #e1e9ef;overflow-wrap:anywhere}
.cost-data-table td:nth-child(2),.cost-data-table td:nth-child(7),.cost-data-table td:nth-child(12){white-space:nowrap}
.cost-data-table td:nth-child(3),.cost-data-table td:nth-child(6){min-width:0}
.cost-data-table td:nth-child(11){text-align:right;padding-right:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cost-data-table td:last-child{text-align:left}
.cost-data-table .product-photo{display:block;width:76px;height:76px;max-width:76px;max-height:76px;object-fit:contain;margin:0 auto;border:1px solid #dce6ee;border-radius:7px;background:#fff}
.cost-data-table td:first-child>a{display:block;width:76px;margin:0 auto}
.cost-data-table tbody tr:hover{background:#f8fbfd}

/* v1.76 separate resume action and new-quote arrow */
.quote-nav{display:flex;align-items:center;gap:0}.quote-nav[hidden]{display:none}
#quoteReturnButton{white-space:nowrap;border-radius:7px 0 0 7px;padding-right:8px;font-weight:500}
#quoteMenuButton{border-radius:0 7px 7px 0;padding:9px 8px;min-width:28px}
#quoteMenuButton:hover{background:#dbeaf3}.quote-menu{min-width:165px}

/* Match the approval entry to the existing navigation buttons. */
nav .mobile-approval-link,nav .mobile-approval-link:visited{display:inline-flex;align-items:center;justify-content:center;align-self:stretch;box-sizing:border-box;font:inherit;line-height:normal;color:#17354b;background:white;border:0;border-radius:7px;padding:9px 13px;text-decoration:none;white-space:nowrap;cursor:pointer}
nav .mobile-approval-link:hover{color:#17354b;background:#e8f1f6;text-decoration:none}
nav .mobile-approval-link:focus-visible{outline:2px solid #8abbd4;outline-offset:2px}

/* Selected-month personal payment overview: preserve existing visual style. */
.personal-cash-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.personal-cash-cards strong{color:#17354b}
.personal-cash-cards strong.negative{color:#bf4848}
@media(max-width:1100px){.personal-cash-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:540px){.personal-cash-cards{grid-template-columns:1fr!important}}

.sheet .remarks>div{min-width:0;flex:1;overflow-wrap:anywhere}

.product-table th{font-size:10pt}.product-table td{font-size:8pt}.product-table td:nth-child(3){font-size:8.5pt;white-space:normal;overflow-wrap:anywhere}

.product-table td:nth-child(2),.product-table td:nth-child(8){white-space:pre-line;word-break:keep-all;overflow-wrap:normal}

.logistics-table td{font-size:8pt}.logistics-table .desc{font-size:7.7pt}

.logistics-table td{padding:.2mm 1mm;line-height:1.2}

/* Keep A4 typography independent of mobile text autosizing and zoom. */
.sheet{-webkit-text-size-adjust:none;text-size-adjust:none}
.sheet .supplier{height:34.5mm;line-height:1.1}
.sheet .supplier th,.sheet .supplier td{font-size:6.3pt;padding:.35mm .4mm;vertical-align:middle;overflow-wrap:anywhere}
.sheet .supplier th{width:auto;white-space:nowrap}
.sheet .supplier .supplier-side{white-space:normal;line-height:1.2}
.sheet .supplier .signed-name{padding-right:7mm}
.sheet .supplier .corporate-seal{right:0;width:5mm;height:4mm}
.sheet .remarks>div{font-size:calc(7.2pt * var(--note-scale,1));line-height:1.5}
.sheet .remarks .valid{font-size:calc(8pt * var(--note-scale,1))}

.logistics-table td{font-size:calc(8pt * var(--logistics-font-scale,1));padding:calc(.2mm * var(--logistics-font-scale,1)) 1mm}.logistics-table .desc{font-size:calc(7.7pt * var(--logistics-font-scale,1))}
