.expense-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.expense-monthbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:22px}.expense-monthbar input{max-width:180px}.expense-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}.expense-kpis article{background:white;border:1px solid #e1e8dd;border-radius:12px;padding:19px}.expense-kpis strong{display:block;font-size:22px;margin-top:8px}.expense-kpis small{color:#6d7c6c}.expense-settlement{background:#edf3e9;border:1px solid #d8e4d0;border-radius:12px;padding:20px;margin-bottom:22px;display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap}.expense-settlement p{margin:7px 0 0;color:#677b60}.expense-calendar-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr);gap:20px}.expense-week,.expense-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.expense-week span{text-align:center;padding:15px 0;font-size:12px;color:#7a8773}.expense-calendar{overflow:hidden;align-self:start}.expense-day{min-height:110px;padding:10px 7px;text-align:left;border-top:1px solid #e5eadf;border-right:1px solid #e5eadf;display:flex;flex-direction:column;gap:8px;background:#fff;min-width:0}.expense-day strong{font-size:12px;overflow-wrap:anywhere}.expense-day small{font-size:10px;color:#79896f}.expense-day.today>span{color:#207047;font-weight:bold}.expense-day.selected{background:#e5f0df;box-shadow:inset 0 0 0 2px #4e7b43}.expense-day.blank{background:#f7f9f5}.expense-day .expense-add{opacity:0}.expense-day:hover .expense-add{opacity:1}.expense-row{width:100%;display:flex;text-align:left;gap:14px;align-items:center;padding:18px;border-bottom:1px solid #e3e9df}.expense-row>span:nth-child(2){flex:1;min-width:0}.expense-row strong,.expense-row small{display:block;overflow-wrap:anywhere}.expense-row small{color:#7b8872;margin-top:5px;font-size:11px}.expense-row>span:last-child{text-align:right}.expense-icon{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:9px;background:#edf2e7;color:#4f7050}.expense-empty{padding:30px;color:#7b8872}.expense-project{margin:24px 0}.expense-evidence-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:22px 0 10px;flex-wrap:wrap}.expense-evidence-head p{font-size:12px;color:#708166}.expense-files{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.expense-files article{padding:12px;background:#f5f7f1;border-radius:10px;min-width:0}.expense-files img{width:100%;height:140px;object-fit:contain;background:white}.expense-files article>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.expense-files .btn{font-size:11px;padding:8px}.expense-files a{font-size:11px}dialog:has(#expense-editor){width:900px}#expense-editor [hidden]{display:none}#expense-editor label{min-width:0}#expense-editor input,#expense-editor select{min-width:0;width:100%}#expense-editor .expense-actions label{color:#365531}#expense-scan-modal{width:940px}#expense-crop-canvas{display:block;max-width:100%;margin:auto;touch-action:none}#expense-corner-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}#expense-corner-controls input{width:65px;padding:6px;min-width:0}#expense-corner-controls span{display:flex;gap:4px;align-items:center;flex-wrap:wrap}#expense-scan-modal[aria-busy=true] canvas{pointer-events:none}
@media(max-width:1000px){.expense-calendar-layout{grid-template-columns:1fr}.expense-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.expense-kpis{grid-template-columns:1fr 1fr}.expense-kpis article{padding:13px}.expense-kpis strong{font-size:19px}.expense-day{min-height:88px;padding:8px 3px;gap:6px}.expense-day strong{font-size:10px}.expense-day small{font-size:9px}.expense-day>span{font-size:12px}.expense-row{gap:9px;padding:13px}.expense-icon{display:none}.expense-files{grid-template-columns:1fr 1fr}.expense-row>span:last-child{max-width:100px;flex-shrink:0}.expense-settlement{padding:15px}.expense-monthbar{gap:8px}.expense-monthbar .btn{padding:10px}.expense-files img{height:110px}#expense-corner-controls{grid-template-columns:1fr 1fr}dialog:has(#expense-editor){padding:18px}.expense-actions .btn{font-size:12px}}

#expense-camera-modal{width:720px;max-width:94vw}#expense-camera-modal [hidden]{display:none}.expense-camera-stage{position:relative;background:#17201c;border-radius:12px;overflow:hidden;line-height:0;text-align:center}.expense-camera-stage video,.expense-camera-stage canvas{display:block;width:100%;max-height:58vh;object-fit:contain}.expense-camera-stage:has(video:not([hidden])){width:fit-content;max-width:100%;margin:auto}.expense-camera-stage video{width:auto;max-width:100%}.expense-camera-stage:has(canvas:not([hidden])){width:fit-content;max-width:100%;margin:auto}.expense-camera-stage canvas{width:auto;max-width:100%}.expense-camera-stage svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.expense-camera-stage polygon{fill:#38bd6430;stroke:#4aeb82;stroke-width:.6;vector-effect:non-scaling-stroke}.expense-camera-status{min-height:3em;line-height:1.5}#expense-camera-modal .expense-actions{position:sticky;bottom:0;background:white;padding:12px 0}@media(max-width:650px){#expense-camera-modal{padding:18px}}

.expense-project-picker{min-width:0;display:grid;gap:8px}.expense-project-picker small{color:#66775e;font-size:12px}.expense-project-picker select[size]:not([size="1"]){min-height:110px}.expense-project-picker option{padding:7px}

.expense-files article>small{display:block;overflow-wrap:anywhere;margin-top:8px}
.expense-camera-device{display:grid;gap:6px;margin:12px 0;font-size:13px;font-weight:600}
.expense-camera-device select{width:100%;min-width:0;min-height:44px;font-size:16px}

/* Monthly overview, browsing and selection have distinct, compact regions. */
.expense-monthbar.panel{padding:14px 18px;margin-bottom:14px;align-items:center;gap:10px}.expense-monthbar label{display:flex;align-items:center;gap:10px}.expense-monthbar>.expense-actions{margin-left:auto}
.expense-kpis{gap:0;margin:14px 0;border:1px solid #dfe7dc;border-radius:12px;overflow:hidden;background:#fff}.expense-kpis article{border:0;border-radius:0;padding:15px;border-right:1px solid #e6ece3}.expense-kpis article:first-child{background:#eaf3e6}.expense-kpis strong{font-size:20px;margin-top:5px}.expense-settlement{padding:16px;margin-bottom:18px}.expense-settlement p,.expense-settlement small{font-size:12px;line-height:1.6}.expense-browser{padding:16px;margin-bottom:16px}.expense-browser-head{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.expense-browser-head+.expense-browser-head{margin-top:14px;padding-top:14px;border-top:1px solid #e4eadf}.expense-browser-head label{display:flex;align-items:center;gap:8px;min-width:0}.expense-browser-head select{max-width:320px;min-width:0}.expense-scope-note{font-size:12px;color:#65745f;margin:12px 0 0}.expense-selection-tools{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:14px}.expense-selection-tools label{display:flex;align-items:center;gap:8px}.expense-selection-tools small{color:#687660}.expense-selection-tools input,.expense-select-row>input{width:20px;height:20px;accent-color:#326644;flex-shrink:0}.expense-select-row{display:flex;align-items:center;gap:6px;padding-left:14px;border-bottom:1px solid #e3e9df;cursor:pointer}.expense-select-row.selected{background:#eef6e9}.expense-select-row .expense-row{border:0;min-width:0}.expense-trash-row{display:flex;align-items:center;gap:6px;padding-right:14px;border-bottom:1px solid #e3e9df}.expense-trash-row .expense-row{border:0;min-width:0}.expense-selection-bar{position:fixed;left:50%;transform:translateX(-50%);width:min(560px,calc(100% - 32px));bottom:90px;z-index:20;display:flex;justify-content:center;align-items:center;gap:12px;padding:12px;background:#fff;border:1px solid #a3b899;box-shadow:0 4px 20px #18371522;border-radius:12px;margin-top:16px}.expense-records.selecting{padding-bottom:10px}.expense-batch-summary{display:grid;grid-template-columns:1fr auto;gap:14px;padding:16px;background:#f1f5ee;border-radius:10px}.expense-batch-summary dd{margin:0;font-weight:700}
@media(max-width:650px){.expense-monthbar.panel{padding:12px;gap:8px}.expense-monthbar label{display:grid;gap:4px}.expense-monthbar input{max-width:155px}.expense-monthbar>.expense-actions{width:100%;justify-content:flex-end}.expense-kpis{grid-template-columns:1fr 1fr}.expense-kpis article:first-child{grid-column:1/-1}.expense-kpis article{padding:11px 13px}.expense-kpis strong{font-size:18px}.expense-browser{padding:12px}.expense-browser-head label{width:100%}.expense-browser-head select{flex:1;width:0}.expense-settlement .expense-actions{width:100%;gap:8px}.expense-selection-bar{bottom:calc(82px + env(safe-area-inset-bottom));gap:8px}.expense-select-row{padding-left:10px}.expense-select-row .expense-row{padding-left:5px}.expense-trash-row{padding-right:8px}.expense-trash-row .btn{padding:9px}.expense-selection-tools small{font-size:11px}}
.expense-browser-head label,.expense-selection-tools label,.expense-select-row{flex-direction:row}.expense-browser-head label{flex:1;justify-content:flex-end}.expense-browser-head select{width:100%;flex:1}.expense-records.selecting{padding-bottom:84px}
@media(max-width:650px){.expense-browser-head label{flex-basis:100%;justify-content:flex-start}.expense-browser-head select{width:100%;max-width:none}}
.expense-list-actions{margin:14px 0 10px}.expense-list-actions-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.expense-list-actions-head strong{font-size:13px;color:#53664c}.expense-list-actions-head .btn{margin-left:auto;flex-shrink:0}.expense-list-actions .expense-selection-tools{padding:12px;background:#eef3e9;border-radius:9px;margin-top:10px}
.expense-filter-project{display:grid;gap:8px;flex:1;min-width:220px;max-width:480px}.expense-browser-head .expense-filter-project label{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:8px}.expense-filter-project input,.expense-filter-project select{width:100%;max-width:none;min-width:0}.expense-filter-project small{font-size:12px;color:#64765c}.expense-filter-project small:empty{display:none}.expense-filter-project option{padding:7px}.expense-filter-project select[size]:not([size="1"]){min-height:100px}@media(max-width:650px){.expense-filter-project{flex-basis:100%;min-width:0;max-width:none}.expense-browser-head .expense-filter-project label{grid-template-columns:80px minmax(0,1fr)}}

/* Entry form: core details, project context, evidence, then one clear save area. */
#expense-editor .expense-editor-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;align-items:start}
#expense-editor .expense-entry-main{display:grid;gap:18px;min-width:0}
#expense-editor .expense-entry-section{min-width:0;border:1px solid #dfe7dc;border-radius:12px;padding:18px;background:#fff}
#expense-editor .expense-entry-section h3{margin:0 0 16px;font-size:15px;color:#294b35}
#expense-editor .form-grid{margin:0;gap:14px}
#expense-editor label{display:flex;flex-direction:column;gap:7px;font-size:13px}
#expense-editor input,#expense-editor select{min-height:44px;font-size:16px}
#expense-editor input[name=amount]{font-size:22px;font-weight:650;color:#205b3a}
#expense-editor .expense-project-fields,#expense-editor .expense-project-picker{display:grid;gap:12px}
#expense-editor .expense-project-search-status:empty{display:none}
#expense-editor .expense-evidence-head{margin:0 0 14px;display:block}
#expense-editor .expense-evidence-head p{margin:0 0 14px;line-height:1.6}
#expense-editor .expense-evidence-head .expense-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#expense-editor .expense-evidence-head .btn{min-height:44px;padding:10px;white-space:normal}
#expense-editor .expense-files{grid-template-columns:repeat(2,minmax(0,1fr))}
#expense-editor .expense-entry-evidence>.muted{font-size:12px;line-height:1.6}
#expense-editor .expense-editor-footer{margin-top:18px;padding-top:16px;border-top:1px solid #dfe7dc}
#expense-editor .expense-editor-footer>p{margin:0 0 12px;font-size:12px;line-height:1.6}
#expense-editor .expense-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin:0}
#expense-editor .expense-editor-actions .btn{min-height:44px;min-width:90px;white-space:normal}
#expense-editor .expense-editor-actions button[type=submit]{order:2;min-width:130px}
@media(max-width:700px){#expense-editor .expense-editor-layout{grid-template-columns:minmax(0,1fr);gap:14px}#expense-editor .expense-entry-main{gap:14px}#expense-editor .expense-entry-section{padding:14px}#expense-editor .expense-editor-actions{flex-wrap:wrap}#expense-editor .expense-editor-actions button[type=submit]{flex:1}#expense-editor .form-grid{grid-template-columns:minmax(0,1fr)}}

.expense-project-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.expense-project-list article{padding:16px 0;border-bottom:1px solid #dfe7dc;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}.expense-project-list article>div:first-child{flex:1;min-width:180px}.expense-project-list strong,.expense-project-list small{display:block;overflow-wrap:anywhere}.expense-project-list small{margin-top:6px;color:#6a7b6d}.expense-project-list p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}#expense-project-editor{display:grid;gap:16px}#expense-project-editor label{display:grid;gap:8px}#expense-project-editor input,#expense-project-editor select,#expense-project-editor textarea{width:100%;min-width:0;font-size:16px}#expense-project-editor p{font-size:13px;line-height:1.6;margin:0}.expense-project-list .btn,#expense-project-editor .btn{min-height:44px}

.trip-map-panel{padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid var(--line,#dce5dd)}
.trip-map-panel h3{margin-top:0}.trip-map-preview img{display:block;width:100%;height:auto;margin:10px 0;border-radius:8px}
.trip-map-options{display:flex;flex-direction:column;gap:4px;max-height:200px;overflow:auto;margin-top:5px}
.trip-map-options[hidden]{display:none}.trip-map-options .btn{height:auto;white-space:normal;text-align:left;overflow-wrap:anywhere}
.trip-address-search{margin-top:5px;align-self:flex-start}.trip-map-status{overflow-wrap:anywhere}
.expense-editor-layout .trip-address-field{grid-column:1/-1}
.trip-address-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.trip-address-entry input{min-width:0}.trip-address-entry .trip-address-search{margin:0;align-self:center}
@media(max-width:400px){.trip-address-entry{grid-template-columns:minmax(0,1fr)}.trip-address-entry .trip-address-search{justify-self:end}}

.trip-address-field{display:grid;gap:7px;min-width:0}.trip-address-status{margin:0;overflow-wrap:anywhere}.trip-address-status:empty{display:none}.trip-address-field>small{line-height:1.5}

#expense-route-modal{width:min(1040px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;overflow:auto}#expense-route-editor{padding:20px}.trip-route-layout{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1.5fr);gap:20px}.trip-route-addresses{display:flex;flex-direction:column;gap:20px}#expense-route-editor label{display:grid;gap:7px}#expense-route-editor input{width:100%;min-width:0;font-size:16px;min-height:44px}#expense-route-editor button{min-height:44px}#expense-route-editor .trip-map-panel{border:0;margin:0;padding:0}#expense-route-editor [data-map-apply]{width:100%;margin-top:12px;background:#174b3c;color:white}#expense-editor [data-map-open]{margin-bottom:16px}@media(max-width:700px){.trip-route-layout{grid-template-columns:minmax(0,1fr)}#expense-route-editor{padding:16px}}
#expense-route-modal>.modal-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:white;border-bottom:1px solid #dce5dd}#expense-route-modal>.modal-head h2{margin:0;font-size:20px}#expense-route-modal [data-map-close]{width:44px;height:44px;border:0;border-radius:8px;background:#f1f5ef;flex-shrink:0}#expense-route-modal .trip-map-preview img{max-height:55dvh;object-fit:contain}
/* Inline interactive map: shared form remains usable during route lookup. */
.trip-map-live{display:block;width:100%;height:380px;border:1px solid var(--line,#dce5dd);border-radius:8px;margin:12px 0;background:#eef3ef}
.trip-map-panel .expense-actions{flex-wrap:wrap}.trip-map-connection:empty{display:none}
#expense-editor .form-grid>.trip-map-options,#expense-editor .form-grid>.trip-address-status{grid-column:1/-1;margin-top:-8px}
.trip-map-options button:focus{outline:2px solid #287a5a;outline-offset:2px}
@media(max-width:700px){.trip-map-live{height:320px}}
/* Match the shared expense entry: information and project left, evidence right. */
#expense-editor.expense-trip-editor .expense-editor-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px}
#expense-editor.expense-trip-editor .expense-project-fields{grid-template-columns:minmax(0,1fr)}
#expense-editor.expense-trip-editor .expense-project-fields>label:not(:first-child){grid-column:auto}
#expense-editor.expense-trip-editor .trip-addresses{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px}
#expense-editor.expense-trip-editor .trip-map-panel .expense-actions{justify-content:flex-end;margin-top:14px}
#expense-editor.expense-trip-editor .trip-route-section>p{margin-top:14px}
#expense-editor.expense-trip-editor .expense-files{grid-template-columns:minmax(0,1fr)}
#expense-editor.expense-trip-editor .expense-files img{height:auto;max-height:420px}
@media(max-width:700px){#expense-editor.expense-trip-editor .expense-editor-layout{grid-template-columns:minmax(0,1fr);gap:14px}}

#expense-editor.expense-trip-editor .trip-map-panel{margin:14px 0 0;padding:0;border:0}
#expense-editor.expense-trip-editor .trip-distance{margin-top:18px;padding-top:18px;border-top:1px solid #dfe7dc}
.trip-place{min-width:0}.trip-place .trip-address-status{margin-top:6px}.trip-capture-preview p{font-size:13px;color:#294b35;overflow-wrap:anywhere}

#expense-editor.expense-trip-editor .trip-route-section>.form-grid:not(.trip-distance){grid-template-columns:minmax(0,1fr)}
/* Wrap Korean guidance at word boundaries, without clipping translated text. */
#expense-editor.expense-trip-editor label,#expense-editor.expense-trip-editor p,#expense-editor.expense-trip-editor .btn{word-break:keep-all;overflow-wrap:anywhere}
#expense-editor.expense-trip-editor .trip-distance{align-items:start}
#expense-editor.expense-trip-editor .trip-distance-hint{font-size:12px;line-height:1.6;margin:8px 0 0}
.trip-capture-summary{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline}
.trip-capture-summary span{max-width:100%}
/* Suggestions overlay the form so closing them cannot move the pressed action. */
#expense-editor .trip-place{position:relative}
#expense-editor .trip-place .trip-map-options{position:absolute;top:100%;left:0;right:0;z-index:12;margin-top:4px;padding:6px;background:#fff;border:1px solid #dfe7dc;border-radius:8px;box-shadow:0 6px 18px #173b2520}
#expense-editor .trip-place .trip-address-status{font-size:12px}
#expense-editor [data-map-capture]:disabled{background:#e7ebe7;color:#8a948b;border-color:#dce2dc;cursor:not-allowed;opacity:1}
#expense-editor [data-map-capture]:enabled{background:#174b3c;color:#fff;border-color:#174b3c}
