/* Application components only. Printed sheets have independent templates and styles. */
main>h1,.page-heading h1{font-size:26px;margin-bottom:8px}.page-heading{gap:16px;flex-wrap:wrap;margin-bottom:8px}main>h1+p,.page-heading+p{color:var(--muted);margin-top:0;margin-bottom:22px}
.filter-grid{align-items:end}.filter-grid>button,.filter-grid>.button{justify-self:start;align-self:end;min-height:44px}.filter-grid label{display:block;font-size:13px;font-weight:600;margin-bottom:6px}.filter-grid .errorlist{grid-column:1/-1}
.filter-grid.import-upload-grid{align-items:start}.import-upload-grid .field>select,.import-upload-grid .field>input[type=file]{height:44px;box-sizing:border-box}.import-upload-grid .field>small{display:block;margin-top:5px}
.filters button,.filters .button,.form-footer button,.form-footer .button{min-height:44px}.danger{background:var(--danger);border-color:var(--danger);color:white}
.panel{margin:20px 0}.table-wrap{max-width:100%}main table:not(.sheet-grid):not(.statement-sheet) tbody tr:hover{background:#f8f9fd}.number{font-variant-numeric:tabular-nums;text-align:right}
.erp-choice-list{border:1px solid var(--border);box-shadow:0 6px 20px #20283922;border-radius:6px;background:white;z-index:90;overflow:auto;padding:4px}.erp-choice-list button{display:block;width:100%;text-align:left;border:0;background:white;color:var(--text);border-radius:3px;min-height:40px;padding:8px 10px;white-space:normal}.erp-choice-list button:hover,.erp-choice-list button.selected{background:#eceefb;color:var(--brand-blue-dark)}.choice-empty{display:block;padding:12px;color:var(--muted);font-size:13px}
.iso-picker{min-width:40px!important;min-height:40px!important;border-color:var(--border)!important;color:var(--brand-blue)!important}.iso-date{min-width:0}.erp-calendar .selected{background:var(--brand-blue)!important;color:white!important}.sheet-grid input:focus{outline-color:var(--brand-blue)}.sheet-grid th{background:#eef0f8}.grid-savebar{border-color:var(--border)}
.workflow-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:20px 0}.workflow-tabs button{background:transparent;color:var(--muted);border:0;border-radius:5px 5px 0 0;border-bottom:3px solid transparent;min-height:46px;padding:10px 20px}.workflow-tabs button[aria-selected=true]{color:var(--brand-blue);border-bottom-color:var(--brand-orange);background:#eef0fb;font-weight:700}.workflow-panel[hidden]{display:none!important}
.workflow-tabs .tab-edit-toggle{margin-left:auto;flex:none;font-size:13px;color:var(--muted);min-height:36px;align-self:center;border:1px solid var(--border);border-radius:6px;padding:6px 14px}.workflow-tabs .tab-edit-toggle[aria-pressed=true]{color:var(--brand-blue);border-color:var(--brand-blue)}
.workflow-tabs .drag-handle{display:none;margin-right:4px;color:var(--muted)}.workflow-tabs.editing [role=tab]{cursor:grab;background:#f5f6fb}.workflow-tabs.editing [role=tab] .drag-handle{display:inline}.workflow-tabs.editing [role=tab]:active{cursor:grabbing}
.page-tabs{display:flex;gap:8px;margin:14px 0}
.quick-entry-layout{display:block;min-width:0}.quick-entry-layout [id$=grid-workspace]{width:100%;min-width:0}
.work-tabs{display:flex;gap:4px;align-items:center;overflow-x:auto;margin:0;padding:7px 18px 0;background:#f5f8fa;border-bottom:1px solid #d8e1e8}.work-tab{display:flex;min-width:max-content;border:1px solid #cbd8e1;border-bottom:0;border-radius:7px 7px 0 0;background:#e8eff4}.work-tab.active{background:#fff}.work-tab button{border:0;background:transparent;padding:7px 9px;color:#243746}.work-tab-open{cursor:pointer}.work-tab-close{cursor:pointer;font-size:18px;line-height:1}
.price-panel{width:100%;border:1px solid var(--border);border-radius:9px;padding:16px;background:#fff;color:var(--ink);position:static;margin:12px 0}.price-panel h3{margin:0 0 12px;font-size:15px}
.price-panel-body{max-height:70vh;overflow:auto}
.price-panel-item{display:flex;justify-content:space-between;gap:8px;width:100%;text-align:left;font:inherit;padding:9px 6px;border:0;border-bottom:1px solid #dce5eb;background:#fff;cursor:pointer;color:#172b38!important}.price-panel-item span{color:#172b38!important}.price-panel-item:hover,.price-panel-item:focus-visible{background:#e9f2f7;color:#102a43!important}.price-panel-item:active{background:#d6e8f2}.price-panel-item:focus-visible{outline:3px solid #167c80;outline-offset:2px}.price-panel-item .value{font-variant-numeric:tabular-nums;color:#075b65!important;font-weight:700}
.week-range-selector{display:flex;align-items:center;gap:5px;position:relative}.week-range-selector output{font-variant-numeric:tabular-nums;font-weight:700;color:inherit}.week-range-selector>button{min-width:38px;padding:8px 10px;line-height:1}.week-range-selector .week-range-value{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:220px;background:#fff;color:var(--ink);font-size:14px}.week-range-selector [data-week-date]{position:absolute;width:1px!important;height:1px!important;opacity:0;pointer-events:none;right:42px;bottom:0;padding:0!important}.week-range-field{margin:0}#transport-period{grid-template-columns:minmax(145px,.8fr) minmax(300px,1.5fr) minmax(135px,.8fr) auto auto}#transport-period [data-period-field=week]{display:none!important}
@media(max-width:1000px){.quick-entry-layout{flex-direction:column}.price-panel{width:100%;position:static}#transport-period{grid-template-columns:1fr 1fr}}
.balance-cards{display:flex;gap:18px;flex-wrap:wrap;align-items:center}.balance-cards strong{display:block;font-size:22px}.balance-cards>div{padding:10px 18px;border-left:3px solid var(--brand-blue)}
.payment-status-toggle{display:inline-flex;border:1px solid var(--border);border-radius:6px;overflow:hidden;margin-right:8px}.payment-status-toggle .status-btn{border:0;border-radius:0;background:white;color:var(--muted);min-height:36px;padding:6px 14px}.payment-status-toggle .status-btn[aria-pressed=true]{background:var(--brand-blue);color:white;font-weight:700}.payment-status-toggle .status-btn[data-status=paid][aria-pressed=true]{background:var(--brand-orange)}
@media(max-width:650px){.workflow-tabs{flex-wrap:wrap}.filter-grid>button{width:100%}.workflow-tabs button{flex:1;padding:10px 12px}.erp-choice-list button{min-height:44px}.iso-picker{min-width:44px!important;min-height:44px!important}.sheet-grid .iso-picker{min-height:40px!important}.form-footer{gap:12px}.balance-cards{display:block}.balance-cards>div{margin:10px 0}main>h1,.page-heading h1{font-size:23px}#transport-period{grid-template-columns:1fr}.week-range-selector .week-range-value{min-width:0;flex:1}}
@media print{.workflow-tabs{display:none}}

/* Shared screen polish: presentation only.  Grid, tabs and form behaviour stay
   with their existing page-specific scripts. */
:root{--component-tint:#eef4f5;--control-height:44px}
.page-heading{margin-bottom:10px}.page-heading .eyebrow{margin-bottom:4px}
.filter-grid,.filters{gap:14px}.filter-grid label,.field>label{margin-bottom:6px}
.filter-grid>button,.filter-grid>.button,.filters button,.filters .button,.form-footer button,.form-footer .button{min-height:var(--control-height)}
.panel .help,.panel .muted,.grid-help{font-size:13px;line-height:1.55}.panel .help{margin-top:6px}
.errorlist{margin:6px 0 0;line-height:1.45}.filter-grid .errorlist{margin-top:0}
main table:not(.sheet-grid):not(.statement-sheet) thead th{background:var(--component-tint);color:#405764;font-weight:700}
main table:not(.sheet-grid):not(.statement-sheet) td.number,main table:not(.sheet-grid):not(.statement-sheet) td.num{font-variant-numeric:tabular-nums;text-align:right}
button:disabled,.button[aria-disabled=true],input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.58}
.page-tabs .button{min-height:40px}.page-tabs .button:focus-visible,.workflow-tabs button:focus-visible{outline:3px solid #7983cf;outline-offset:2px}
.statement-delete{min-height:34px;padding:6px 10px;font-size:12px}

.home-summary .card strong{font-size:clamp(20px,2vw,28px);overflow-wrap:anywhere}.home-recent{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.home-recent .panel{min-width:0;margin:0}.order-toolbar{max-width:800px}.order-list{max-width:1000px}.order-list li[hidden]{display:none}.order-position{display:flex;align-items:center;gap:5px;font-size:12px}.order-position input{width:75px!important;padding:6px!important}.order-list button{min-height:40px}.sheet-grid [data-output=transfer],.transfer-total{color:var(--brand-blue)}@media(max-width:650px){.home-recent{grid-template-columns:1fr}.order-list li{flex-wrap:wrap}.order-list span{flex-basis:100%}.order-list button{min-height:44px}.quick-heading{max-width:100%}.quick-heading label{max-width:100%}.quick-heading input{min-width:0;width:100%}}

.login-logo{max-width:100%;height:auto;margin-bottom:16px}.sheet-grid .iso-date>input:first-child{width:calc(100% - 40px)}.erp-calendar button:hover,.erp-calendar button:focus-visible{background:#eef0fb;outline-color:var(--brand-blue)}

.memo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.memo-card{padding:16px;background:#fff9c9;border:1px solid #eadf9e;border-radius:8px;white-space:normal}.memo-card small{display:block;margin-top:14px}@media(max-width:650px){.memo-grid{grid-template-columns:1fr}.memo-panel textarea{min-height:110px}.dashboard-cards{grid-template-columns:repeat(2,1fr)}}

.memo-edit textarea{margin:12px 0}.memo-card form{margin:6px 0}.memo-card .link{min-height:40px}
.dashboard-period-toolbar{display:flex;align-items:end;justify-content:flex-start;gap:8px;max-width:850px;margin:6px 0 0}.dashboard-period-toolbar>select{flex:0 0 120px;width:120px}.dashboard-period-toolbar .week-range-selector{flex:0 1 auto}.dashboard-period-toolbar .week-range-selector[hidden]{display:none}.dashboard-period-toolbar .week-range-value{min-width:160px}.dashboard-period-toolbar [data-week-selector] .week-range-value{min-width:220px}.dashboard-calendar-host{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.period-static{display:flex;align-items:center;justify-content:center;padding:8px 12px;border:1px solid var(--border);border-radius:6px}
.dashboard-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'heading memo' 'today memo' 'kpi kpi';gap:14px 18px;align-items:start}.dashboard-heading{grid-area:heading;min-width:0}.dashboard-heading>.eyebrow{margin-top:0}.dashboard-heading h1{margin-bottom:8px}.today-summary{grid-area:today;min-width:0;margin:0;padding:18px 20px}.today-summary .cards{grid-template-columns:repeat(2,minmax(140px,1fr));gap:12px;margin:10px 0 0}.today-summary .card{padding:14px 18px}.today-summary .card strong{font-size:24px;margin:6px 0 0}.dashboard-layout>.dashboard-cards{grid-area:kpi;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:1fr;margin:0}.daily-memo{grid-area:memo;min-width:0;margin:0;background:#fffdf2;padding:18px 20px}.daily-memo h3{margin:0;font-size:18px}.memo-heading-actions{display:flex;align-items:center;gap:8px}.memo-collapse-toggle{display:none}.memo-collapsed-summary{margin:8px 0 0;color:var(--muted);font-size:13px}.daily-memo textarea{width:100%;min-height:112px;resize:vertical;margin-top:10px}.memo-date-nav{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:10px 0}.memo-date-nav button{position:relative;background:#fff;color:var(--ink);border-color:var(--line);padding:7px 3px;min-height:40px}.memo-date-nav button[aria-current=date]{background:var(--accent);color:#fff}.memo-date-nav i{display:inline-block;width:6px;height:6px;margin-left:3px;border-radius:50%;background:var(--brand-orange)}.memo-meta{min-height:22px;color:var(--muted);font-size:12px}.memo-calendar-open{min-width:42px;padding:7px}.daily-memo .section-heading{margin:0}.erp-calendar [data-date]{position:relative}.erp-calendar [data-date].memo-present:after{content:'';position:absolute;right:4px;bottom:3px;width:5px;height:5px;border-radius:50%;background:var(--brand-orange);box-shadow:0 0 0 1px #fff}.erp-calendar [data-date].selected.memo-present:after{background:#fff;box-shadow:0 0 0 1px var(--brand-orange)}
@media(max-width:1400px){.dashboard-layout{grid-template-columns:1fr;grid-template-areas:'memo' 'heading' 'today' 'kpi'}.memo-collapse-toggle{display:inline-block;min-width:62px;padding:7px 10px}.daily-memo textarea{min-height:140px}.memo-date-nav button{min-width:0;min-height:44px}.today-summary .cards{width:100%;grid-template-columns:1fr 1fr}.dashboard-layout>.dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.dashboard-period-toolbar{align-items:stretch}.dashboard-period-toolbar>select{flex-basis:100%;width:100%}.dashboard-period-toolbar .week-range-selector{width:100%}.today-summary .card{padding:12px}.dashboard-layout{gap:14px}.daily-memo{padding:14px}.memo-date-nav{gap:2px}.memo-date-nav button{padding:7px 0;font-size:14px}.memo-date-nav i{position:absolute;right:2px;bottom:3px;margin:0}}
@media(max-width:360px){.memo-date-nav button{font-size:12px}}

@media(min-width:1401px){.dashboard-layout>.daily-memo{align-self:stretch;display:flex;flex-direction:column;box-sizing:border-box}.daily-memo-body{flex:1;display:flex;flex-direction:column;min-height:0}.daily-memo-body textarea{flex:1}}

.dashboard-period-caption{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin-top:12px;font-size:12px;color:var(--muted)}.dashboard-applied-period{margin:0;font-size:12px;color:var(--muted)}.dashboard-period-toolbar>select,.dashboard-period-toolbar>button,.dashboard-period-toolbar .week-range-selector>button,.dashboard-period-toolbar .period-static{height:44px;box-sizing:border-box;margin-top:0}.period-pending{margin:6px 0 0;font-size:12px;color:var(--brand-blue)}.dashboard-cards>.card{padding:15px 20px 17px;min-height:120px;display:flex;flex-direction:column;justify-content:center;gap:8px}.dashboard-cards .card strong{margin:0;font-size:29px;line-height:1.2}.kpi-main-link{display:block;color:inherit}.kpi-main-link>span{display:block}.dashboard-cards>.card>span,.dashboard-cards .kpi-main-link>span{line-height:1.6}.card-breakdown{display:block;font-style:normal;font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}.card-breakdown a{color:inherit;text-decoration:underline}.kpi-unknown{font-size:12px;text-decoration:underline}.daily-memo h3 .memo-selected-date{display:block;font-size:12px;font-weight:400;color:var(--muted)}.memo-meta{display:flex;flex-wrap:wrap;gap:3px 12px;align-items:baseline}.memo-meta [role=status]{font-weight:600}.memo-meta [data-state=error]{color:var(--danger)}.memo-meta [data-state=conflict]{color:#8a4b00}.memo-meta [data-state=saved]{color:var(--accent)}.memo-updated{font-size:11px}.dashboard-cards a:focus-visible{outline:3px solid #7983cf;outline-offset:3px}
.site-quotation-form{display:grid;grid-template-columns:minmax(130px,180px) minmax(180px,1fr) minmax(220px,1.4fr) auto;gap:12px;align-items:end;margin:16px 0 20px}.site-quotation-form .field{min-width:0}.site-quotation-form input{width:100%}.site-quotation-panel .actions{gap:8px;flex-wrap:wrap}.site-quotation-panel .actions form{margin:0}@media(max-width:780px){.site-quotation-form{grid-template-columns:1fr}.site-quotation-form button{justify-self:start}}

.erp-calendar .calendar-title{font-weight:700;flex:1;min-width:0;margin:0 8px}
/* Invalid pasted currency stays unchanged and is explained before submission. */
.money-format-error{display:block;font-size:12px;color:#a33b25;line-height:1.4;margin-top:4px;white-space:normal}
.money-format-error[hidden]{display:none}
input.money-invalid{border-color:#a33b25;outline-color:#a33b25}
select[data-key="category"],select[name$="-statement_category"]{appearance:none;-webkit-appearance:none;background-image:none;cursor:pointer}
.dashboard-heading{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px 18px}.dashboard-heading-main{flex:0 1 auto;min-width:0}.dashboard-heading>.expiry-notice{flex:1 1 150px;min-width:0;max-width:300px;margin:0 0 0 auto;padding:8px 14px;display:flex;flex-direction:column;justify-content:space-between;gap:0;color:var(--ink)}.expiry-notice>span{font-size:13px}.dashboard-heading>.expiry-notice strong{margin:0;font-size:24px;line-height:1.3}.expiry-notice em{font-style:normal;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.expiry-notice em b{font-weight:700;color:var(--brand-orange)}.expiry-notice em b.expired{color:var(--danger)}.expiry-notice:focus-visible{outline:3px solid #7983cf;outline-offset:3px}
@media(max-width:650px){.dashboard-heading>.expiry-notice{flex-basis:100%;max-width:none;margin:0}}
/* 업무 홈: 상단 탭 아래 여백은 main 기본값만 두고, 넓은 화면에서는 제목·공용 메모 윗선과, 월간 현황·공용 메모 아랫선을 맞춘다(메모가 더 길면 월간 현황 칸을 늘림). */
.dashboard-layout>.daily-memo.panel{margin-top:0}@media(min-width:1401px){.dashboard-layout>.today-summary.panel{margin-top:0;align-self:stretch}}

.dashboard-profit-warning{grid-column:1/-1;margin:0;font-size:13px}

/* 글자 아래 쉼표 획까지 보이는 영역을 기준으로 내용 중심을 1px 올려 맞춤. */
@media(max-width:650px){.dashboard-layout>.dashboard-cards>.card{padding:13px 12px 15px}}
/* OCR suggestions stay editable; uncertainty is a gentle, non-blocking hint. */
.ocr-check-input{border-color:#d4a45f!important;background-color:#fffcf6!important}
.ocr-check-note{color:#815719;font-size:12px;margin-top:4px}
.ocr-check-row{color:#815719;background:#fffcf6}
