/* Staff workspace. Customer wine-list pages keep their own styles. */
body.staff-workspace{--rail:174px;--navy:#1e3556;--beige:#e3d4b9;--text:#283544;--line:#e5e3dc;background:#f7f6f2;font-size:14px;line-height:1.5}
.staff-workspace .topbar{height:68px;position:sticky;top:0;z-index:30;background:#fff}
.staff-workspace .header-inner{max-width:none;padding:0 28px}.staff-workspace .app-title small{display:none}.staff-workspace .app-title strong{font-size:17px;letter-spacing:-.04em}
.staff-workspace .work-nav{position:fixed;top:68px;bottom:0;left:0;width:var(--rail);margin:0;padding:28px 14px;display:flex;flex-direction:column;gap:7px;background:#eee9df;border-right:1px solid #e3dccf;z-index:20}
.staff-workspace .work-nav .btn{text-align:left;background:transparent;border-color:transparent;padding:13px 17px;border-radius:8px;font-size:14px;color:#586171}
.staff-workspace .work-nav .btn[aria-current=page]{background:var(--navy);color:white;font-weight:700}.staff-workspace .work-nav .btn:hover{background:#e2d8c6}.staff-workspace .work-nav .btn[aria-current=page]:hover{background:var(--navy)}
.staff-workspace .shell,.workspace-heading{margin-left:var(--rail);max-width:1330px;padding:0 32px 28px}.workspace-heading{padding-top:26px;padding-bottom:18px}.workspace-heading .page-title{margin:0 0 17px}.workspace-heading h1{font-size:25px;letter-spacing:-.05em}
.workspace-tabs,.sales-tabs{display:flex;gap:20px;border-bottom:1px solid #ddd9d0}.workspace-tab,.sales-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:10px 2px 12px;font-size:14px;color:#747b83;font-weight:500;min-height:43px}.workspace-tab[aria-pressed=true],.sales-tabs button[aria-pressed=true]{border-bottom-color:var(--navy);color:var(--navy);font-weight:700}
.staff-workspace .page-title>.header-actions{align-items:center}.staff-workspace .btn{border-color:#deded7;box-shadow:none;min-height:40px;padding:8px 13px}.staff-workspace .btn.primary{border-color:var(--navy)}.staff-workspace .btn.small{min-height:34px;padding:6px 10px}
.staff-workspace .card{border-radius:10px;box-shadow:none}.staff-workspace .section-head{padding:17px 20px}.staff-workspace .card-padding{padding:18px 20px}.staff-workspace h2{font-size:15px}.staff-workspace h3{font-size:17px}.staff-workspace .history{margin-top:0}
.staff-workspace .card+.card{margin-top:16px}.work-region>section+section{margin-top:16px}.work-region input:not([type=checkbox]):not([type=radio]),.work-region select{max-width:100%;min-height:40px;padding:8px 11px;border:1px solid #d7d9d9;border-radius:6px;font:inherit;color:var(--navy);background:white}.work-region label{font-size:13px}.work-region p{overflow-wrap:anywhere}.work-region .card-padding>p{margin:10px 0}.work-region summary{cursor:pointer;color:var(--navy);font-weight:600;min-height:40px;padding:8px 0}.work-region select{min-width:180px}
.staff-workspace [role=status]:empty,.staff-workspace [role=alert]:empty{display:none!important}.staff-workspace #admin-message{min-height:0;margin:0 0 12px}.staff-workspace #admin-message:empty{display:none}
.staff-workspace th{padding:11px 18px;background:#f6f4ee;font-size:12px}.staff-workspace td{padding:13px 18px;font-size:13px;vertical-align:middle}.staff-workspace .table-scroll{overflow-x:auto}.staff-workspace .wine-admin-table{max-height:none;overflow:visible}.staff-workspace .wine-admin-table table{table-layout:fixed;white-space:normal}.wine-admin-table th:first-child{width:44%}.wine-admin-table th:nth-child(2){width:19%}.wine-admin-table th:nth-child(3){width:21%}.wine-admin-table th:last-child{width:16%}.wine-admin-table td:first-child{font-weight:600}.wine-row-section{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:3px}.wine-row-price{display:block;font-variant-numeric:tabular-nums;white-space:nowrap}.wine-row-price.secondary{font-size:11px;color:var(--muted)}.wine-status{font-size:12px;color:#66705f}.wine-pos-detail{font-size:11px;margin-top:3px}.wine-pos-detail summary{font-size:11px;min-height:0;padding:4px 0}.wine-pos-detail.review summary{color:#975b32}.wine-pos-detail p{font-weight:400;margin:5px 0}.wine-pos-done{font-size:11px;color:var(--muted);margin-top:4px}
.wine-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) 190px auto;gap:12px;align-items:end}.wine-toolbar label{display:block;margin-bottom:6px;font-size:12px;color:#616b75}.staff-workspace #wine-admin-search,.staff-workspace #wine-sales-filter{margin:0;max-width:none;width:100%;min-height:40px}.wine-toolbar .actions{margin:0}.staff-workspace #wine-menu-status{margin:12px 0 0;min-height:0;font-size:12px;color:var(--muted)}.wine-toolbar-note{font-size:12px;color:var(--muted);margin:0 0 16px}
.list-pager{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 18px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.list-pager .pager-buttons{display:flex;align-items:center;gap:12px}.list-empty{padding:30px 20px;text-align:center;color:var(--muted)}
.staff-workspace #intake-work>.page-title{justify-content:flex-end;margin:0 0 12px}.staff-workspace #intake-work>.page-title .header-actions{gap:7px}.staff-workspace .workspace{display:block}.staff-workspace #intake-form{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(300px,1.5fr);gap:28px;padding:22px}.intake-uploads{min-width:0}.intake-values{min-width:0}.staff-workspace .photo-grid{display:grid;grid-template-columns:1fr;gap:12px;margin:0}.staff-workspace .attachment-field{margin:0 0 12px;padding:16px;border:1px solid #dfd9cd;border-radius:8px;background:#fbfaf7}.staff-workspace .photo-grid .attachment-field{margin:0}.staff-workspace .photo-grid img{height:90px;background:#f0ede5;margin:10px 0 0}.staff-workspace .photo-grid .muted{max-height:36px;overflow:hidden;font-size:11px}.staff-workspace .photo-actions .btn{font-size:12px;min-height:38px}.staff-workspace .receipt-fields{gap:12px}.staff-workspace .receipt-fields input{min-height:40px;font-size:14px}.staff-workspace #intake-stock-card{margin:14px 0 0;border:0;background:#eee9df;border-radius:8px}.staff-workspace #intake-stock-card .section-head{display:none}.staff-workspace #intake-stock-card .card-padding{padding:14px 16px}.staff-workspace #stock-name{font-size:12px}.staff-workspace .stock{display:inline-flex;gap:6px;margin:4px 0 8px}.staff-workspace .stock strong{font-size:30px}.staff-workspace .stock span{font-size:13px}.staff-workspace .stock-details{padding-top:8px;font-size:11px}.intake-values>.actions{justify-content:flex-start;margin:14px 0}.intake-values>.intake-save-actions{position:sticky;bottom:0;z-index:4;background:white;padding:10px 0;margin-bottom:0;flex-wrap:wrap}.intake-values>.intake-save-actions .primary{flex:1}.staff-workspace #product-select{font-size:14px}.staff-workspace #ocr-panel{margin-top:14px;background:#f3f5f7;border-color:#dfe4e9}.staff-workspace #ocr-panel p{font-size:12px;margin-top:6px}.staff-workspace #ocr-panel .check-label{display:flex;gap:7px;align-items:center;margin:10px 0 0}.staff-workspace #message{min-height:0;margin-top:8px}.staff-workspace .intake-completion{font-size:12px}.staff-workspace #intake-page footer{margin:16px 0 0;padding:0;border:0;font-size:11px}.history-search{padding:16px 18px}.history-search input{width:100%;max-width:440px;padding:9px 11px;border:1px solid #d7d9d9;border-radius:6px;font:inherit}
.account-menu{position:relative}.account-menu>summary{cursor:pointer;list-style:none;font-size:12px;color:#596573;padding:8px 12px;border:1px solid var(--line);border-radius:6px}.account-menu>summary::-webkit-details-marker{display:none}.account-menu>summary::after{content:'⌄';margin-left:9px}.account-actions{position:absolute;right:0;top:44px;padding:8px;min-width:165px;border:1px solid var(--line);background:#fff;border-radius:8px;box-shadow:0 8px 26px #1e35561a;display:grid;gap:5px;z-index:40}.account-menu .demo-pill{padding:0;border:0;background:none}
.archive-block{margin-bottom:14px;border:1px solid var(--line);border-radius:8px;background:white;padding:8px 18px}.archive-block>summary{padding:10px 0}.archive-block>.card,.archive-block>.card-padding{margin-top:8px!important;border:0}.archive-block .table-scroll{max-height:420px}.inline-details{margin-top:14px;border-top:1px solid var(--line);padding-top:6px}.settings-hq{padding:12px 20px}.staff-workspace #backup-card>button,.staff-workspace #backup-card>p,.staff-workspace #backup-card>a{margin:12px 20px;max-width:calc(100% - 40px)}.staff-workspace #backup-card>#backup-status{padding:0}.staff-workspace #pos-batch-panel,.staff-workspace #pos-preparation{padding:15px 20px;border:1px solid var(--line);border-radius:10px;background:#fff;margin-bottom:16px}.staff-workspace #pos-batch-panel>summary{font-size:15px}.staff-workspace #pos-preparation>summary{font-size:14px}.staff-workspace #pos-batch-panel p,.staff-workspace #pos-preparation p{font-size:13px;margin:9px 0}.staff-workspace #pos-batch-rows:empty{display:none}
.staff-workspace #count-start{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.staff-workspace #count-start label{margin:0}.staff-workspace #count-start button{width:auto;margin:0}.staff-workspace #count-content>select{max-width:520px}.staff-workspace #count-content>.actions{justify-content:flex-start}.staff-workspace .count-line{padding:12px 0}.staff-workspace #count-review{background:#faf9f5}.staff-workspace #report-content>p{font-size:12px;color:var(--muted)}.staff-workspace #report-content label{margin-right:9px}.staff-workspace #report-content>input{margin-right:9px}.staff-workspace #report-close-review>p{font-size:13px;margin:9px 0}.staff-workspace #report-revenue{margin-top:22px}.staff-workspace #report-files{border-top:1px solid var(--line);padding-top:15px;margin-top:24px}.staff-workspace #report-files>p{margin:10px 0}
.staff-workspace dialog{max-height:calc(var(--app-height,100vh) * 0.9);overflow:auto;border:1px solid #dbd8d0;box-shadow:0 18px 80px #172c4925}
@media(min-width:1500px){.staff-workspace .shell,.workspace-heading{margin-right:auto;padding-left:42px;padding-right:42px}}
@media(max-width:1000px){body.staff-workspace{--rail:145px}.staff-workspace .shell,.workspace-heading{padding-left:22px;padding-right:22px}.staff-workspace #intake-form{gap:18px;grid-template-columns:minmax(190px,.8fr) minmax(260px,1.2fr)}.wine-toolbar{grid-template-columns:1fr 170px}.wine-toolbar .actions{grid-column:1/-1;justify-content:flex-end}.wine-admin-table th:first-child{width:40%}.wine-admin-table th:nth-child(2){width:21%}.wine-admin-table th:nth-child(3){width:21%}.wine-admin-table th:last-child{width:18%}}
@media(max-width:700px){body.staff-workspace{--rail:0px}.staff-workspace .topbar{height:58px}.staff-workspace .header-inner{padding:0 16px}.staff-workspace .app-title strong{font-size:16px}.staff-workspace .work-nav{position:sticky;top:58px;bottom:auto;width:100%;padding:5px 8px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;border-right:0;border-bottom:1px solid #e1d8c9}.staff-workspace .work-nav .btn{font-size:11px;letter-spacing:-.05em;text-align:center;padding:9px 2px;min-height:40px;border-radius:6px;white-space:nowrap}.staff-workspace .shell,.workspace-heading{padding-left:14px;padding-right:14px}.workspace-heading{padding-top:18px;padding-bottom:15px}.workspace-heading h1{font-size:22px}.workspace-heading .page-title{margin-bottom:10px}.workspace-tabs{gap:20px}.workspace-tab{font-size:13px;padding-bottom:10px}.staff-workspace #intake-form{display:block;padding:16px}.staff-workspace .photo-grid{grid-template-columns:1fr 1fr;gap:9px}.staff-workspace .attachment-field{padding:12px}.staff-workspace .photo-actions{flex-direction:column;gap:6px;margin-top:8px}.staff-workspace .photo-actions .btn{font-size:12px;padding:6px;min-height:40px}.staff-workspace #intake-stock-card{margin:10px 0 16px}.staff-workspace #intake-stock-card .card-padding{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:11px 12px}.staff-workspace #stock-name{flex:1;min-width:45%;max-width:75%}.staff-workspace .stock{margin:0}.staff-workspace .stock strong{font-size:25px}.staff-workspace .stock-details{display:none}.staff-workspace .receipt-fields input,.staff-workspace #product-select,.work-region input:not([type=checkbox]),.work-region select{font-size:16px;min-height:44px}.staff-workspace .section-head{padding:14px 16px}.staff-workspace .card-padding{padding:16px}.wine-toolbar{grid-template-columns:1fr;gap:10px}.wine-toolbar .actions{grid-column:auto}.wine-toolbar-note{margin-bottom:12px}.staff-workspace .wine-admin-table thead{display:none}.staff-workspace .wine-admin-table table,.staff-workspace .wine-admin-table tbody{display:block}.staff-workspace .wine-admin-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:14px 16px;gap:5px 12px;border-bottom:1px solid var(--line)}.staff-workspace .wine-admin-table td{border:0;padding:0}.staff-workspace .wine-admin-table td:first-child{grid-column:1;grid-row:1;font-size:13px}.staff-workspace .wine-admin-table td:nth-child(2){grid-column:1;grid-row:2;display:flex;gap:9px;align-items:center}.staff-workspace .wine-admin-table td:nth-child(3){grid-column:1;grid-row:3;font-size:11px;color:#697264}.staff-workspace .wine-admin-table td:last-child{grid-column:2;grid-row:1/4;align-self:center;max-width:100px;text-align:right}.wine-row-section{font-size:10px}.wine-pos-detail[open]{max-width:100px;text-align:left}.staff-workspace .list-pager{padding:12px 14px;gap:8px}.staff-workspace .list-pager>span{font-size:11px}.staff-workspace .list-pager .btn{min-height:40px}.account-menu>summary{padding:7px 9px;max-width:185px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.staff-workspace .demo-pill{font-size:11px}.staff-workspace #count-start{display:block}.staff-workspace #count-start label{margin-top:10px}.staff-workspace #count-start button{width:100%;margin-top:12px}.staff-workspace #count-content>.actions{flex-wrap:wrap}.staff-workspace #report-content>.actions{flex-wrap:wrap}.staff-workspace #report-content>.actions button{width:100%}.staff-workspace #report-content>input{margin-bottom:12px}.staff-workspace #pos-batch-panel,.staff-workspace #pos-preparation{padding:12px 16px}.staff-workspace .pos-prep-fields{grid-template-columns:5rem 1fr}.staff-workspace .archive-block{padding:7px 12px}.staff-workspace .intake-values>.intake-save-actions{padding-bottom:env(safe-area-inset-bottom,8px)}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.staff-workspace .workspace-heading{padding-top:20px;padding-bottom:16px}.staff-workspace .workspace-heading .page-title{margin-bottom:10px}.staff-workspace #wine-management-card .list-pager{position:sticky;bottom:0;background:white;z-index:3}.staff-workspace .wine-toolbar{grid-template-columns:minmax(180px,1fr) 160px auto}.staff-workspace .wine-toolbar .actions{flex-wrap:nowrap}.staff-workspace #wine-management-card{overflow:clip}
@media(max-width:1000px){.staff-workspace .wine-toolbar{grid-template-columns:1fr 170px}.staff-workspace .wine-toolbar .actions{grid-column:1/-1}}
@media(max-width:700px){.staff-workspace .wine-toolbar{grid-template-columns:1fr}.staff-workspace .workspace-heading{padding-top:16px;padding-bottom:13px}.staff-workspace .wine-toolbar .actions{justify-content:space-between}.staff-workspace .wine-toolbar .btn{min-height:40px}}

.staff-workspace .wine-toolbar>div{min-width:0}.staff-workspace #wine-sales-filter{min-width:0}.staff-workspace .shell{padding-bottom:20px}

.staff-workspace .count-controls{display:grid;grid-template-columns:1fr 1.5fr;gap:14px}.staff-workspace #count-setup{margin-top:0;border-top:0}.staff-workspace #count-work select{width:100%;min-width:0}.staff-workspace #count-work>.actions{justify-content:flex-start}.staff-workspace #count-work label:has(#count-compare){display:flex;align-items:center;gap:8px}.staff-workspace #count-work .list-pager{padding-left:0;padding-right:0}.staff-workspace #count-heading{scroll-margin-top:125px}
@media(max-width:700px){.staff-workspace .count-controls{grid-template-columns:1fr;gap:2px}}
.staff-workspace .intake-product{margin:14px 0}.staff-workspace #intake-product-label{display:block;font-size:12px;margin-bottom:7px}.staff-workspace .intake-product-choice{border:1px solid #d7d9d9;border-radius:7px;padding:12px;display:flex;gap:12px;align-items:center;justify-content:space-between;background:#fff}.staff-workspace #selected-product-name{font-size:14px;overflow-wrap:anywhere}.staff-workspace .intake-product-choice .actions{margin:0;flex-shrink:0;gap:6px}.staff-workspace #preview:empty{display:none}.staff-workspace .intake-product-choice .btn{white-space:nowrap}
@media(max-width:1000px){.staff-workspace .intake-product-choice{align-items:stretch;flex-direction:column}.staff-workspace .intake-product-choice .actions{justify-content:flex-end}}

/* Shared progress indicators: visible only while a real request is pending. */
.loading-indicator{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;flex-shrink:0;min-width:28px;min-height:28px;margin-inline:6px}
.loading-ring{display:block;width:22px;height:22px;box-sizing:border-box;border:3px solid #e3d4b9;border-top-color:#1e3556;border-radius:50%;animation:customeat-spin .8s linear infinite}
.loading-area{display:flex;margin:18px 0;min-height:52px}
.loading-area .loading-ring{width:30px;height:30px}
@keyframes customeat-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.loading-ring{animation:none;border-style:dashed;border-top-style:solid}}

/* Month history, customer-style wine pages, and a single POS queue. */
.staff-workspace .history-search{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.history-search>div{min-width:0}.history-search>div:nth-child(2){flex:1}.history-search label{display:block;font-size:12px;margin-bottom:6px;color:#616b75}.history-search input{height:42px;max-width:none}.history-search input[type=month]{width:180px}.staff-workspace #history-status{margin:0 18px;color:#8b3434}
.staff-workspace #ocr-panel{background:transparent;border:0;padding:0;margin:0 0 14px}.staff-workspace #ocr-panel select{width:100%;min-width:0;min-height:42px;border:1px solid #d7d9d9;border-radius:6px;padding:9px;font:inherit;margin-bottom:10px}.staff-workspace #ocr-panel #ocr-item{display:none}
.wine-book{display:grid;grid-template-columns:144px minmax(0,1fr);height:calc(var(--app-height,100vh) - 365px);min-height:420px;max-height:950px;background:#f1e7d5;border-top:1px solid var(--line)}
#wine-page-nav{overflow:auto;background:#eee9df;padding:14px 10px;overscroll-behavior:contain;border-right:1px solid #ddd3c1}.wine-nav-group{font-size:12px;font-weight:700;color:var(--navy);margin:20px 8px 6px}.wine-nav-group:first-child{margin-top:0}.wine-nav-item{display:block;width:100%;min-height:40px;text-align:left;padding:9px 10px;border:0;border-radius:5px;font:inherit;font-size:12px;line-height:1.5;color:var(--navy);background:transparent;cursor:pointer}.wine-nav-item[aria-current=page]{background:var(--navy);color:var(--beige)}.wine-nav-item:hover{background:#e3d4b9}.wine-nav-item[aria-current=page]:hover{background:var(--navy)}
.wine-paper{overflow:auto;overscroll-behavior:contain;padding:24px 30px;min-width:0}.wine-page-heading{border-bottom:2px solid var(--navy);padding-bottom:17px;margin-bottom:5px}.wine-page-heading>span{font-size:9px;letter-spacing:.18em;color:#68717a}.staff-workspace .wine-page-heading h2{font:normal 30px/1.25 Georgia,'Times New Roman',serif;color:var(--navy);margin:10px 0 4px}.wine-page-heading p{font-size:12px;color:#69717a;margin:0}
.wine-page-row{border-bottom:1px solid #e3d4b9}.wine-page-edit{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,100px) 44px 92px;gap:13px;align-items:start;width:100%;padding:19px 0;margin:0;background:transparent;border:0;border-radius:0;cursor:pointer;text-align:left;color:var(--navy);font:inherit}.wine-page-edit:hover{background:#f2eadc}.wine-page-edit:focus-visible,.wine-nav-item:focus-visible{outline:2px solid #68242c;outline-offset:2px}.wine-page-main>span{display:block}.wine-page-english{font:normal 17px/1.45 Georgia,'Times New Roman',serif}.wine-page-korean{font-size:12px;color:#38393c;margin-top:5px}.wine-page-grapes{font-size:14px;font-weight:600;color:#68242c;margin-top:8px}.wine-page-note{font-size:12px;font-weight:600;color:#68242c;text-align:center;overflow-wrap:anywhere;word-break:keep-all}.wine-page-vintage{font-size:13px;color:#5f5c56;text-align:center;font-variant-numeric:tabular-nums}.wine-page-price{font-size:15px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}.wine-page-serving{display:block;margin-bottom:8px}.wine-page-serving:last-child{margin:0}.wine-page-serving small,.wine-page-serving strong{display:block}.wine-page-serving small{font-size:10px;font-weight:400;color:#5f5c56}.wine-page-job{display:flex;gap:10px;align-items:center;justify-content:flex-end;font-size:12px;color:#975b32;padding-bottom:10px}
.staff-workspace #pos-batch-panel>label{display:inline-flex;align-items:center;gap:6px;margin-left:14px;font-size:13px}.staff-workspace #pos-batch-rows{margin-top:14px}.staff-workspace .pos-batch-row{padding:18px 0}.staff-workspace .pos-batch-choice{display:flex;align-items:center;gap:8px;font-size:14px;margin:0 0 10px}.staff-workspace .pos-batch-choice strong{font-weight:600}.staff-workspace .pos-batch-row .pos-batch-field{display:inline-flex;flex-direction:column;gap:6px;vertical-align:top;width:calc(50% - 14px);max-width:360px;margin:8px 14px 8px 0;font-size:12px;color:#616b75}.staff-workspace .pos-batch-field select{width:100%;min-width:0;height:42px;border-radius:6px;font-size:14px}.staff-workspace #pos-batch-panel .btn{font-size:13px;min-height:40px;padding:8px 13px;border-radius:6px}.staff-workspace #pos-batch-panel>button:last-of-type{margin-top:18px;background:var(--navy);color:white;border-color:var(--navy)}.staff-workspace #pos-hq-form label{display:block;margin:12px 0}.staff-workspace #pos-hq-form input{display:block;width:100%;max-width:360px;margin-top:6px}
@media(min-width:1450px){.wine-book{height:calc(var(--app-height,100vh) - 345px);grid-template-columns:190px minmax(0,1fr)}.wine-paper{padding:28px 42px}.wine-page-edit{grid-template-columns:minmax(0,1fr) 130px 50px 110px;gap:20px}}
@media(max-width:1000px){.wine-paper{padding:20px}.wine-book{grid-template-columns:140px minmax(0,1fr)}.wine-page-edit{grid-template-columns:minmax(0,1fr) 52px 80px;gap:8px}.wine-page-main{grid-row:1/3}.wine-page-note{grid-column:1;grid-row:3;text-align:left}.wine-page-vintage{grid-column:2}.wine-page-price{grid-column:3}.wine-page-note:empty{display:none}}
@media(max-width:700px){.history-search>div:first-child{width:100%}.history-search input[type=month]{width:100%}.history-search input{font-size:16px}.wine-book{grid-template-columns:104px minmax(0,1fr);height:calc(var(--app-height,100vh) * 0.65);min-height:420px}#wine-page-nav{padding:12px 5px}.wine-nav-group{font-size:10px;margin:16px 4px 6px}.wine-nav-item{font-size:11px;padding:9px 6px;min-height:44px}.wine-paper{padding:16px 12px}.staff-workspace .wine-page-heading h2{font-size:23px}.wine-page-edit{grid-template-columns:minmax(0,1fr) auto;padding:16px 0}.wine-page-main{grid-column:1/3;grid-row:1}.wine-page-note{grid-column:1/3;grid-row:2;font-size:11px}.wine-page-vintage{grid-column:1;grid-row:3;text-align:left}.wine-page-price{grid-column:2;grid-row:3;font-size:14px}.wine-page-english{font-size:16px}.wine-page-korean{font-size:11px}.wine-page-grapes{font-size:13px}.staff-workspace .pos-batch-row .pos-batch-field{display:flex;width:100%;max-width:none;margin:12px 0}.staff-workspace .pos-batch-field select{height:44px;font-size:16px}.staff-workspace #pos-batch-panel>label{display:flex;margin:10px 0}.staff-workspace #pos-batch-panel .btn{min-height:42px}}
.staff-workspace[data-work-view=wine][data-work-section=list] .workspace-heading{padding-top:14px;padding-bottom:12px}.staff-workspace[data-work-view=wine][data-work-section=list] .workspace-heading .page-title{margin-bottom:3px}.staff-workspace #wine-management-card>.card-padding{padding:12px 20px}.staff-workspace .wine-toolbar label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.staff-workspace #wine-menu-status{margin-top:6px;line-height:1.4}.wine-book{height:calc(var(--app-height,100vh) - 304px);min-height:300px}.wine-page-heading{padding-bottom:12px}.staff-workspace .wine-page-heading h2{margin-top:6px;font-size:28px}.wine-page-edit{padding:15px 0}
@media(max-width:1000px){.wine-book{height:calc(var(--app-height,100vh) - 352px)}}
@media(max-width:700px){.wine-book{height:calc(var(--app-height,100vh) * 0.62);min-height:380px}.staff-workspace #wine-management-card>.card-padding{padding:12px 14px}.staff-workspace .wine-page-heading h2{font-size:23px}}
/* Compact POS cards: at most six wines are mounted per page. */
.staff-workspace #pos-batch-panel{padding:14px 18px}.staff-workspace #pos-batch-panel>summary{min-height:32px;margin-bottom:10px;padding:4px 0}
.pos-list-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.staff-workspace .pos-list-toolbar input[type=search]{flex:1;min-width:200px;max-width:440px;height:36px;min-height:36px;font-size:13px}.pos-list-toolbar>label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}.staff-workspace #pos-batch-panel input[type=checkbox]{width:15px;min-width:15px;height:15px;margin:0;accent-color:var(--navy)}
.staff-workspace #pos-batch-panel .btn{min-height:34px;height:34px;font-size:12px;padding:5px 11px;line-height:1.4}.staff-workspace #pos-batch-rows{display:grid;gap:8px;margin-top:12px}.staff-workspace #pos-batch-panel .pos-batch-row{padding:11px 13px;border:1px solid #d8d4ca;border-radius:7px;background:#fff;margin:0;min-width:0}.staff-workspace #pos-batch-panel .pos-batch-done{background:#faf9f5}
.pos-batch-header{display:flex;gap:12px;align-items:start;justify-content:space-between}.staff-workspace .pos-batch-header .pos-batch-choice{display:flex;align-items:start;gap:8px;margin:0;min-width:0;font-size:13px;line-height:1.5}.pos-batch-choice input{margin-top:3px!important}.pos-batch-status{font-size:11px;line-height:1.4;color:#6a7165;white-space:nowrap;padding-top:2px}.staff-workspace #pos-batch-panel .pos-batch-meta{font-size:12px;color:#6b7176;margin:5px 0 0}.staff-workspace #pos-batch-panel .pos-batch-reason{font-size:12px;color:#8a5839;margin:5px 0 0}
.pos-batch-fields{display:flex;flex-wrap:wrap;gap:10px;margin-top:9px}.staff-workspace #pos-batch-panel .pos-batch-field{display:flex;flex-direction:column;gap:4px;width:220px;max-width:100%;margin:0;font-size:11px;color:#6b7176}.staff-workspace #pos-batch-panel .pos-batch-field select,.staff-workspace #pos-batch-panel .pos-batch-field input[type=text]{height:34px;min-height:34px;width:100%;min-width:0;padding:5px 9px;font-size:13px;line-height:1.4}.pos-batch-actions{display:flex;gap:7px;margin-top:9px;flex-wrap:wrap}.staff-workspace .pos-batch-actions button{margin:0}.pos-batch-review{display:flex;gap:7px;align-items:center;margin-top:8px}
.pos-list-pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:12px;color:#6b7176}.pos-list-pager>div{display:flex;align-items:center;gap:12px}.pos-list-footer{display:flex;gap:10px;align-items:center;border-top:1px solid #e4dfd4;margin-top:12px;padding-top:12px;font-size:12px}.pos-list-footer #pos-batch-run{margin-left:auto}.staff-workspace #pos-batch-panel .pos-class-status{font-size:11px;color:#8a5839;margin:5px 0}.pos-class-status:empty{display:none}.pos-list-empty{padding:22px 0;text-align:center}.pos-list-toolbar .loading-ring{width:18px;height:18px}
@media(max-width:700px){.staff-workspace #pos-batch-panel{padding:12px}.staff-workspace .pos-list-toolbar input[type=search]{width:100%;max-width:none;flex-basis:100%;height:40px;min-height:40px;font-size:16px}.staff-workspace #pos-batch-panel .pos-batch-field{width:calc(50% - 5px)}.staff-workspace #pos-batch-panel .pos-batch-field select,.staff-workspace #pos-batch-panel .pos-batch-field input[type=text]{height:40px;min-height:40px;font-size:16px}.staff-workspace #pos-batch-panel .btn{height:auto;min-height:40px;font-size:12px;padding:8px}.staff-workspace .pos-batch-header .pos-batch-choice{font-size:13px}.pos-batch-header{gap:6px}.pos-batch-status{font-size:10px}.staff-workspace #pos-batch-panel .pos-batch-meta{font-size:11px}.pos-list-footer{flex-wrap:wrap}.pos-list-toolbar{gap:8px}}
@media(min-width:701px){.staff-workspace #pos-batch-panel .pos-batch-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px}.pos-batch-header,.pos-batch-meta,.pos-batch-reason,.pos-batch-review{grid-column:1/-1}.pos-batch-fields{grid-column:1;grid-row:auto}.pos-batch-actions{grid-column:2;align-self:end;justify-content:flex-end}.pos-batch-done .pos-batch-meta{grid-column:1/-1}}
.staff-workspace #pos-batch-panel{scroll-margin-top:82px}@media(max-width:700px){.staff-workspace #pos-batch-panel{scroll-margin-top:118px}}

.stock-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,300px);gap:12px}.stock-toolbar>div{min-width:0}.staff-workspace .stock-toolbar label{font-size:12px;margin:0 0 5px}.staff-workspace .stock-toolbar input,.staff-workspace .stock-toolbar select{height:40px;min-height:40px;width:100%;min-width:0;margin:0}.staff-workspace #staff-stock-card .section-head .muted{font-size:12px}.staff-workspace #stock-basis,.staff-workspace .stock-warning,.staff-workspace #stock-error{font-size:12px;margin:10px 0}.stock-warning,.stock-unknown{color:#965833}#stock-error:empty{display:none}.staff-stock-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 14px;padding:13px 0;border-bottom:1px solid #e5e0d5}.staff-stock-row:last-child{border-bottom:0}.staff-stock-name{min-width:0}.staff-stock-name strong{font-size:14px}.staff-stock-name small{display:block;font-size:12px;color:#68727b;margin-top:4px;overflow-wrap:anywhere}.staff-stock-amount{align-self:center;font-size:19px;white-space:nowrap;text-align:right;min-width:76px}.staff-stock-amount.stock-unknown{font-size:14px}.staff-stock-detail{grid-column:1/-1;font-size:11px;color:#777}.staff-workspace #staff-stock-card .list-pager{padding:12px 0 0;margin-top:8px}#staff-stock-card{scroll-margin-top:82px}
@media(max-width:700px){.stock-toolbar{grid-template-columns:1fr}.staff-workspace .stock-toolbar input,.staff-workspace .stock-toolbar select{font-size:16px}.staff-workspace #staff-stock-card .section-head{gap:8px}.staff-stock-name strong{font-size:13px}.staff-stock-amount{font-size:18px}#staff-stock-card{scroll-margin-top:118px}}
.stock-toolbar{grid-template-columns:minmax(160px,1fr) minmax(150px,300px) 100px}@media(max-width:700px){.stock-toolbar{grid-template-columns:minmax(0,1fr) 90px}.stock-toolbar>div:first-child{grid-column:1/-1}}

/* Count from the wine list; keep navigation separate from the scrolling wines. */
.staff-workspace .count-top{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}.count-top>div{flex:1;min-width:0}.staff-workspace .count-top h2{font-size:17px;margin:0}.staff-workspace #count-progress{font-size:12px;font-weight:400;color:var(--muted);margin:4px 0 0}.count-book{display:grid;grid-template-columns:180px minmax(0,1fr);height:calc(var(--app-height,100vh) - 325px);min-height:350px;max-height:950px;background:#fcfaf6}.count-sheet{display:flex;flex-direction:column;min-height:0;min-width:0}.count-sheet-head{display:flex;align-items:center;gap:12px;padding:15px 22px;border-bottom:1px solid var(--line);background:#fcfaf6;flex-shrink:0}.staff-workspace #count-heading{margin:0;font-size:16px;flex:1;line-height:1.5}.staff-workspace #count-nav-open{display:none}#count-nav{overflow-y:auto;overscroll-behavior:contain;background:#eee9df;border-right:1px solid #ddd3c1;padding:10px}.count-nav-group{margin-bottom:4px}.count-category,.count-section-link{display:block;border:0;background:transparent;color:var(--navy);font:inherit;text-align:left;width:100%;cursor:pointer;border-radius:5px}.count-category{font-size:13px;font-weight:600;padding:11px 8px;min-height:40px}.count-category::after{content:'＋';float:right;color:#7c807c}.count-category[aria-expanded=true]::after{content:'−'}.count-section-link{font-size:12px;padding:10px 12px;min-height:40px;line-height:1.5}.count-section-link[aria-current=page]{background:var(--navy);color:var(--beige)}.count-section-link:hover{background:#e3d4b9}.count-section-link[aria-current=page]:hover{background:var(--navy)}.staff-workspace #count-list{overflow-y:auto;overscroll-behavior:contain;margin:0;padding:0 22px 16px;flex:1;min-height:0}.staff-workspace .count-line{grid-template-columns:minmax(0,1fr) 145px;padding:16px 0;gap:6px 16px}.count-wine-name strong{display:block;font-size:14px;font-weight:600;line-height:1.6}.staff-workspace .count-line small{font-size:12px;margin-top:4px}.staff-workspace #stocktake-card .count-line input{width:74px;height:40px;min-height:40px;padding:7px 8px;text-align:center}.staff-workspace .count-line form{align-self:center;justify-content:end;gap:6px}.staff-workspace .count-line .btn{height:40px;min-height:40px;min-width:62px;padding:7px 9px;font-size:12px}.count-unlinked{grid-column:1/-1}.staff-workspace #count-message{margin:0;padding:10px 20px;font-size:12px;border-top:1px solid var(--line)}#count-message:empty{display:none}#count-empty{padding:28px 20px}.count-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.count-dialog-head h2{font-size:19px;margin:0}.staff-workspace #count-settings{width:min(540px,calc(100% - 28px));padding:22px}.staff-workspace #count-new{margin-top:22px;border-top:1px solid var(--line);padding-top:16px}#count-new>summary{cursor:pointer;font-weight:600}.staff-workspace #count-start{grid-template-columns:1fr 1fr;padding:0;margin:16px 0;background:none}.staff-workspace #count-start button{grid-column:1/-1;justify-self:end}.staff-workspace #count-settings .muted,.staff-workspace #count-settings-message{font-size:12px}.staff-workspace #count-nav-dialog{width:min(430px,calc(100% - 28px));max-height:calc(var(--app-height,100vh) * 0.8);padding:18px}.staff-workspace #count-mobile-links{max-height:calc(var(--app-height,100vh) * 0.62);overflow-y:auto}.staff-workspace #count-mobile-links .count-category{font-size:15px;padding:12px}.staff-workspace #count-mobile-links .count-section-link{font-size:14px;padding:12px 18px}.staff-workspace #count-mobile-links .count-nav-group{border-bottom:1px solid var(--line);padding-bottom:4px}
@media(max-width:1000px){.count-book{grid-template-columns:150px minmax(0,1fr)}.staff-workspace .count-line{grid-template-columns:1fr}.staff-workspace #count-list{padding:0 16px 16px}}
@media(max-width:700px){.count-book{display:block;height:calc(var(--app-height,100vh) * 0.65);min-height:350px}.count-sheet{height:100%}#count-nav{display:none}.staff-workspace #count-nav-open{display:block;white-space:nowrap;min-height:40px}.staff-workspace .count-top{padding:13px 14px;gap:8px}.staff-workspace .count-top h2{font-size:14px}.staff-workspace .count-top .btn{min-height:40px;white-space:nowrap}.count-sheet-head{padding:10px 14px;gap:6px}.staff-workspace #count-heading{font-size:13px}.staff-workspace .count-line{padding:14px 0}.count-wine-name strong{font-size:14px}.staff-workspace #count-message{padding:10px 14px}.staff-workspace #count-start{display:grid}.staff-workspace #count-start label{margin-top:0}.staff-workspace #count-start button{width:auto;margin-top:0}.staff-workspace #count-content{padding:0}}
.count-category.count-direct::after{content:none}.count-category.count-direct[aria-current=page]{background:var(--navy);color:var(--beige)}
.count-save-error{grid-column:1/-1;color:#8a3434;font-size:12px;line-height:1.5}.count-save-error>span{display:block;margin:4px 0}.count-save-error .btn{margin-top:6px}.count-line button[aria-busy=true] .loading-ring{display:inline-block;vertical-align:middle;width:16px;height:16px}
.count-batch-bar{flex-shrink:0;padding:10px 22px;border-top:1px solid var(--line);background:#fcfaf6;text-align:right}.staff-workspace #count-save-all{min-height:44px;min-width:230px;font-size:14px}.count-batch-bar .loading-ring{display:inline-block;vertical-align:middle;width:18px;height:18px}@media(max-width:700px){.count-batch-bar{padding:10px 14px}.staff-workspace #count-save-all{width:100%;min-width:0}}
/* One-bottle adjustments beside direct quantity entry. */
.staff-workspace .count-line{grid-template-columns:minmax(0,1fr) 242px}.count-stepper{display:flex;align-items:center;gap:0}.staff-workspace .count-line form{gap:10px}.staff-workspace .count-line .btn{height:44px;min-height:44px}.staff-workspace .count-line .count-step{width:44px;min-width:44px;padding:0;font-size:22px;font-weight:500;line-height:1;border-radius:6px 0 0 6px}.staff-workspace .count-line .count-step:last-child{border-radius:0 6px 6px 0}.staff-workspace #stocktake-card .count-stepper input{width:70px;height:44px;min-height:44px;font-size:16px;font-variant-numeric:tabular-nums;border-radius:0;border-left:0;border-right:0;appearance:textfield;-moz-appearance:textfield}.count-stepper input::-webkit-inner-spin-button,.count-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.staff-workspace .count-stepper .count-step:disabled{opacity:.4;cursor:default}.count-stepper button:focus-visible{outline:2px solid var(--navy);outline-offset:2px;z-index:1}
/* Count in the page itself, with category and save controls kept within reach. */
.staff-workspace #stocktake-card{overflow:visible;--count-top:68px}
.staff-workspace[data-work-section=count] .workspace-heading{padding-top:12px;padding-bottom:10px}
.staff-workspace[data-work-section=count] .workspace-heading .page-title{margin-bottom:4px}
.staff-workspace .count-top{padding:10px 16px}
.count-book{display:block;height:auto;min-height:0;max-height:none}
.count-sheet{display:block;height:auto}
.count-sheet-head{position:-webkit-sticky;position:sticky;top:var(--count-top);z-index:10;padding:8px;gap:0}
#count-toc{display:flex;flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;white-space:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none}
#count-toc::-webkit-scrollbar{display:none}
.count-toc-link{flex:0 0 auto;min-height:44px;border:0;border-radius:6px;padding:10px 14px;background:transparent;color:var(--navy);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.count-toc-link+.count-toc-link{margin-left:4px}
.count-toc-link:hover{background:#eee9df}.count-toc-link[aria-current=page]{background:var(--navy);color:var(--beige);font-weight:700}
.count-toc-arrow{flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--navy);font-size:28px;line-height:1;cursor:pointer}
.count-toc-arrow:disabled{opacity:.25;cursor:default}.count-toc-link:focus,.count-toc-arrow:focus{outline:2px solid var(--navy);outline-offset:-2px}
.staff-workspace #count-list{overflow:visible;overscroll-behavior:auto;flex:none;padding:0 16px}
.staff-workspace .count-line{padding:10px 0;gap:0 12px}
.count-batch-bar{position:-webkit-sticky;position:sticky;bottom:0;z-index:11;padding:10px 16px;padding-bottom:max(10px,env(safe-area-inset-bottom));border-radius:0 0 10px 10px}
@media(max-width:1180px){.staff-workspace .count-top h2{font-size:15px}}
@media(max-width:700px){.staff-workspace #stocktake-card{--count-top:109px}.staff-workspace .count-top{padding:10px 14px}.count-sheet-head{padding:6px 4px}.count-toc-link{font-size:13px;padding:10px 12px}}
@media(max-width:599px){.staff-workspace .count-line{grid-template-columns:1fr;gap:6px}.staff-workspace #count-list{padding:0 14px}}
.stock-list-actions{grid-column:1/-1;text-align:right}
.staff-workspace #inventory-list-dialog{width:calc(100% - 28px);max-width:640px;padding:22px}
#inventory-list-dialog input:not([type=checkbox]),#inventory-list-dialog select{width:100%;min-width:0;min-height:44px;font:inherit;padding:9px;border:1px solid #d7d9d9;border-radius:6px}
#inventory-list-dialog label{display:block;margin:12px 0 5px}#inventory-list-dialog label.check-label{display:flex;align-items:center;gap:8px}
#inventory-list-dialog .receipt-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#listing-details{margin:14px 0;border-top:1px solid var(--line)}#listing-details summary{padding:12px 0;cursor:pointer}
#listing-error{color:#8b3434}#inventory-list-dialog .actions{position:sticky;bottom:-22px;background:white;padding:12px 0;margin-bottom:0;border-top:1px solid var(--line)}

@media(max-width:600px){#inventory-list-dialog input:not([type=checkbox]),#inventory-list-dialog select{font-size:16px}#inventory-list-dialog .receipt-fields{grid-template-columns:1fr;gap:0}}

/* Explicit edit actions replace tiny native disclosure triangles. */
#sales-vintage-toggle,#listing-info-toggle{min-height:44px;margin:4px 0 10px;padding:10px 16px;}
.edit-info-panel{padding:12px 0;margin:0 0 12px;border-top:1px solid #ded8cc;border-bottom:1px solid #ded8cc;}
.edit-info-panel[hidden]{display:none!important;}
#sales-vintage-panel input{max-width:160px;margin-right:8px;}

/* ==========================================================================
   입고 화면 UI — 시안 v3 · 토스형(여백·단순) (2026-10-06)
   범위: 입고 화면이 열려 있을 때만 적용
     (body.staff-workspace[data-work-view=intake], 등록 탭은 [data-work-section=new])
   다른 화면, HTML, JS, 서버, DB, 재고 계산, POS 연결은 변경 없음.
   배치는 CSS(order, grid, sticky)로만 재구성하므로 버튼 동작은 그대로임.
   iPadOS 12: flex gap·:is()·clamp()·aspect-ratio·이미지 URL 미사용,
   flex/order/sticky/transform은 -webkit- 병기, 입력 글자 16px 이상.
   아이콘: 서버 CSP(img-src 'self')로 data URI가 막혀 CSS 그라디언트로 그림.
   ========================================================================== */

/* ---- 틀: 입고 화면에서만 흰 배경, 가벼운 메뉴, 큰 제목 대신 세그먼트 탭 ---- */
body.staff-workspace[data-work-view=intake]{background:#fff}
body.staff-workspace[data-work-view=intake] .topbar{border-bottom:1px solid #F2F4F6;box-shadow:none}
body.staff-workspace[data-work-view=intake] .work-nav{background:#fff;border-color:#F2F4F6}
body.staff-workspace[data-work-view=intake] .work-nav .btn{color:#8B95A1;font-weight:600}
body.staff-workspace[data-work-view=intake] .work-nav .btn:hover{background:#F7F8FA}
body.staff-workspace[data-work-view=intake] .work-nav .btn[aria-current=page],body.staff-workspace[data-work-view=intake] .work-nav .btn[aria-current=page]:hover{background:#EEF1F5;color:#1E3556;font-weight:800}
body.staff-workspace[data-work-view=intake] .workspace-heading .page-title h1{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}
body.staff-workspace[data-work-view=intake] .workspace-heading .page-title{margin:0;min-height:0}
body.staff-workspace[data-work-view=intake] .workspace-heading{padding-top:20px;padding-bottom:4px}
body.staff-workspace[data-work-view=intake] .workspace-tabs{display:-webkit-box;display:-webkit-flex;display:flex;max-width:560px;margin:0 auto;padding:4px;border:0;border-radius:14px;background:#F2F4F6}
body.staff-workspace[data-work-view=intake] .workspace-tabs>.workspace-tab,.no-flex-gap body.staff-workspace[data-work-view=intake] .workspace-tabs>*+*{-webkit-box-flex:1;-webkit-flex:1 1 0%;flex:1 1 0%;margin:0;min-height:42px;padding:0 12px;border:0;border-radius:10px;background:transparent;font-size:15px;font-weight:600;color:#8B95A1}
body.staff-workspace[data-work-view=intake] .workspace-tabs>.workspace-tab[aria-pressed=true]{background:#fff;color:#1E3556;font-weight:800;box-shadow:0 1px 3px rgba(0,0,0,.08)}

/* ---- 입고 등록 본문: 가운데 한 열 ---- */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page [hidden]{display:none!important}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-work{max-width:560px;margin:0 auto}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-work>.page-title{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;margin:6px 0 0;min-height:0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .header-actions .btn{min-height:36px;margin:0 0 0 4px;padding:0 10px;border:0;background:transparent;box-shadow:none;font-size:14px;font-weight:600;color:#8B95A1}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .workspace>.card{overflow:visible;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-work .section-head{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form{display:block;padding:0 0 8px;font-size:16px;color:#333D4B;word-break:keep-all;overflow-wrap:break-word}

/* 단계 질문형 제목 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-uploads:before,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product:before,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .product-fields:before,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.receipt-fields:not(.product-fields):before{display:block;margin:0 0 16px;font-size:22px;font-weight:800;line-height:1.35;letter-spacing:-.02em;color:#191F28}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-uploads:before{content:"명세표와 와인을 찍어주세요"}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product:before{content:"어떤 와인이 들어왔나요?"}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .product-fields:before{content:"수량과 단가를 확인해 주세요";grid-column:1/-1;margin-bottom:4px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.receipt-fields:not(.product-fields):before{content:"명세표 정보";grid-column:1/-1;margin-bottom:0;font-size:17px;color:#4E5968}

/* 1. 사진: 큰 타일 2개 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-uploads{padding-top:24px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .photo-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-gap:12px;gap:12px;margin:0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .attachment-field{margin:0;padding:0;border:0;border-radius:0;background:transparent;text-align:center}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .photo-grid>.attachment-field>strong{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .photo-actions,.no-flex-gap body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .photo-actions>*+*{display:block;margin:0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn{display:block;width:100%;margin:0;box-shadow:none}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]{position:relative;height:128px;min-height:128px;padding:62px 8px 0;border:0;border-radius:18px;background:#F2F4F6;font-size:16px;font-weight:700;color:#1E3556;white-space:nowrap}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]:active{background:#E8EBEF}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]:before{content:"";position:absolute;top:24px;left:50%;width:36px;height:36px;margin-left:-18px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick="invoice-camera"]:before{background:linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 10px/12px 2px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 16px/12px 2px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 13px 22px/7px 2px no-repeat,linear-gradient(var(--capture-paper,#fff),var(--capture-paper,#fff)) 50% 50%/18px 26px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 50%/22px 30px no-repeat}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick="bottle-camera"]:before{background:linear-gradient(var(--capture-paper,#fff),var(--capture-paper,#fff)) 50% 21px/10px 6px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 100%/14px 21px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 11px/12px 4px no-repeat,linear-gradient(var(--capture-ink,#1E3556),var(--capture-ink,#1E3556)) 50% 0/5px 13px no-repeat}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn:not([data-pick$="-camera"]){min-height:40px;padding:0;border:0;background:transparent;font-size:14px;font-weight:600;color:#6B7684}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #invoice-preview,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #bottle-preview{display:block;width:100%;height:96px;margin:4px 0 0;object-fit:cover;object-position:top;border-radius:14px;background:#F2F4F6}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form #remove-invoice,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form #remove-bottle{min-height:36px;margin:2px auto 0;padding:0 10px;border:0;background:transparent;box-shadow:none;font-size:14px;font-weight:600;color:#68242C}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .attachment-field p[role=status]{margin:4px 0 0;font-size:13px;color:#6B7684}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-stock-card{margin:12px 0 0;padding:4px 0;border:0;border-radius:14px;background:#F9FAFB}

/* 2~4. 값: 질문 순서로 재배치 (DOM은 그대로, 보이는 순서만 변경) */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-flex-direction:column;flex-direction:column}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>*{-webkit-box-ordinal-group:8;-webkit-order:7;order:7}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>#ocr-panel{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.intake-product{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.product-fields{-webkit-box-ordinal-group:4;-webkit-order:3;order:3}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.amount-line{-webkit-box-ordinal-group:5;-webkit-order:4;order:4}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.receipt-fields:not(.product-fields){-webkit-box-ordinal-group:6;-webkit-order:5;order:5}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>#importer-field{-webkit-box-ordinal-group:6;-webkit-order:5;order:5;margin:16px 0 0;padding:0;border:0;border-radius:0;background:transparent}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #importer{width:100%;margin-bottom:6px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.intake-publish-option{-webkit-box-ordinal-group:7;-webkit-order:6;order:6}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.intake-save-actions{-webkit-box-ordinal-group:10;-webkit-order:9;order:9}

/* 인식 안내 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #ocr-panel{margin:16px 0 0;padding:14px 16px;border:0;border-radius:14px;background:#F2F4F6;text-align:left}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #ocr-panel p{margin:0;font-size:15px;line-height:1.5;color:#4E5968}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form #ocr-panel .btn{min-height:36px;margin:6px 12px 0 0;padding:0;border:0;background:transparent;box-shadow:none;font-size:15px;font-weight:700;color:#1E3556}

/* 상품 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product{margin:44px 0 0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-product-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product-choice{display:block;padding:0;border:0;background:transparent}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #selected-product-name{display:block;min-height:30px;font-size:20px;font-weight:700;line-height:1.4;color:#191F28}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #selected-product-name.muted{font-weight:600;color:#B0B8C1}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product-choice .actions{display:-webkit-box;display:-webkit-flex;display:flex;margin:14px 0 0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .intake-product-choice .actions>.btn{-webkit-box-flex:1;-webkit-flex:1 1 0%;flex:1 1 0%;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:12px;background:#F2F4F6;box-shadow:none;font-size:15px;font-weight:700;color:#4E5968}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .intake-product-choice .actions>.btn+.btn{margin-left:8px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form #find-wine{background:#EEF1F5;color:#1E3556}

/* 입력칸: 밑줄형, 큰 글씨 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .receipt-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-gap:20px 20px;gap:20px 20px;margin:0}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.product-fields{margin-top:44px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>.receipt-fields:not(.product-fields){margin-top:36px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page label{display:block;margin:0 0 4px;font-size:14px;font-weight:500;color:#6B7684}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page input:not([type=checkbox]):not([type=radio]):not([type=file]){height:48px;min-height:48px;padding:0 2px;border:0;border-bottom:2px solid #E5E8EB;border-radius:0;background:transparent;box-shadow:none;font-size:20px;font-weight:600;line-height:normal;color:#191F28;-webkit-appearance:none;appearance:none}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page input[type=date]{font-size:18px}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page input:focus{outline:none;border-bottom-color:#1E3556;box-shadow:none}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page input[disabled]{color:#C5CBD3;border-bottom-color:#F2F4F6}

/* 금액 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .amount-line{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline;margin:24px 0 0;padding:18px 0 0;border-top:1px solid #F2F4F6;border-radius:0;background:transparent;color:#191F28}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .amount-line span{font-size:15px;color:#6B7684}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .amount-line strong{font-size:26px;font-weight:800;letter-spacing:-.02em;color:#1E3556}

/* 게시 토글: 글자 왼쪽, 스위치 오른쪽 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-publish-option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:28px 0 0;padding:16px 0;border-top:1px solid #F2F4F6;border-bottom:1px solid #F2F4F6;font-size:16px;font-weight:500;color:#333D4B}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-publish-option input{position:relative;-webkit-flex:none;flex:none;width:50px;height:30px;margin:0 0 0 16px;border:0;border-radius:15px;background:#E5E8EB;-webkit-appearance:none;appearance:none;-webkit-transition:background .2s;transition:background .2s}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-publish-option input:after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);-webkit-transition:-webkit-transform .2s;transition:transform .2s}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-publish-option input:checked{background:#1E3556}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-publish-option input:checked:after{-webkit-transform:translateX(20px);transform:translateX(20px)}

/* 안내문 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form p:empty{display:none}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-values>p[role=status]{margin:12px 0 0;font-size:14px;line-height:1.5;color:#6B7684}

/* 저장: 하단 고정 큰 버튼 */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-save-actions{position:-webkit-sticky;position:sticky;bottom:0;z-index:5;margin:20px 0 0;padding:16px 0;padding-bottom:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));background:-webkit-linear-gradient(top,rgba(255,255,255,0),#fff 20px);background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 20px)}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .intake-save-actions>.btn{display:block;width:100%;min-height:56px;margin:0;border:0;border-radius:16px;box-shadow:none;font-size:17px;font-weight:700}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .intake-save-actions>.btn.primary{background:#1E3556;color:#fff}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .intake-save-actions>.btn.primary[disabled]{opacity:1;background:#E5E8EB;color:#B0B8C1}
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-save-actions>.btn+.btn{margin-top:8px}

@media (max-width:700px){
 body.staff-workspace[data-work-view=intake] .workspace-heading{padding-top:14px}
 body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-work{padding:0 6px}
 body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-uploads:before,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .intake-product:before,body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page .product-fields:before{font-size:21px}
 body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]{height:116px;min-height:116px;padding-top:56px}
 body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]:before{top:18px}
}

/* ==========================================================================
   전체 화면 공통 — 토스형 정리 v1 (2026-10-06)
   범위: 직원용 화면 전체(body.staff-workspace). 고객용 리스트·아이패드 화면은 제외.
   입고 등록 화면은 위의 전용 규칙이 우선 적용됨.
   HTML·JS·서버 변경 없음. iPadOS 12: flex gap·:is()·clamp()·이미지 URL 미사용.
   ========================================================================== */
/* 틀: 연회색 바탕 + 흰 카드, 가벼운 메뉴, 큰 제목 숨김, 세그먼트 탭 */
body.staff-workspace{background:#F2F4F6}
body.staff-workspace .topbar{background:#fff;border-bottom:1px solid #E5E8EB;box-shadow:none}
body.staff-workspace .work-nav{background:#fff;border-color:#E5E8EB}
body.staff-workspace .work-nav .btn{color:#8B95A1;font-weight:600}
body.staff-workspace .work-nav .btn:hover{background:#F7F8FA}
body.staff-workspace .work-nav .btn[aria-current=page],body.staff-workspace .work-nav .btn[aria-current=page]:hover{background:#EEF1F5;color:#1E3556;font-weight:800}
body.staff-workspace .workspace-heading .page-title h1{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0)}
body.staff-workspace .workspace-heading .page-title{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;margin:0;min-height:0}
body.staff-workspace .workspace-heading{padding-top:18px;padding-bottom:6px}
body.staff-workspace #workspace-refresh{min-height:34px;margin:0 0 8px;padding:0 10px;border:0;background:transparent;box-shadow:none;font-size:14px;font-weight:600;color:#8B95A1}
body.staff-workspace .workspace-tabs{display:-webkit-box;display:-webkit-flex;display:flex;max-width:560px;margin:0 auto;padding:4px;border:0;border-radius:14px;background:#E5E8EB}
body.staff-workspace .workspace-tabs>.workspace-tab,.no-flex-gap body.staff-workspace .workspace-tabs>*+*{-webkit-box-flex:1;-webkit-flex:1 1 0%;flex:1 1 0%;margin:0;min-height:42px;padding:0 10px;border:0;border-radius:10px;background:transparent;font-size:15px;font-weight:600;color:#6B7684;white-space:nowrap}
body.staff-workspace .workspace-tabs>.workspace-tab[aria-pressed=true]{background:#fff;color:#1E3556;font-weight:800;box-shadow:0 1px 3px rgba(0,0,0,.08)}
body.staff-workspace[data-work-view=intake] .workspace-tabs{background:#F2F4F6}

/* 카드 */
body.staff-workspace .shell .card{border:0;border-radius:20px;background:#fff;box-shadow:none}
body.staff-workspace .shell .section-head{padding:22px 22px 6px;border-bottom:0;background:transparent}
body.staff-workspace .shell .section-head h2{font-size:19px;font-weight:800;letter-spacing:-.02em;color:#191F28}
body.staff-workspace .shell .section-head .muted,body.staff-workspace .shell .section-head>span{font-size:13px;color:#8B95A1}
body.staff-workspace .shell .card-padding{padding:14px 22px 22px}
body.staff-workspace .shell p,body.staff-workspace .shell li{line-height:1.55}
body.staff-workspace .shell .muted,body.staff-workspace .shell p.muted{color:#8B95A1}

/* 라벨·입력·선택: 채움형 */
body.staff-workspace .shell label,body.staff-workspace dialog label{font-size:14px;font-weight:500;color:#6B7684}
body.staff-workspace .shell input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),body.staff-workspace .shell select,body.staff-workspace .shell textarea,body.staff-workspace dialog input:not([type=checkbox]):not([type=radio]):not([type=file]),body.staff-workspace dialog select,body.staff-workspace dialog textarea{min-height:48px;padding:0 14px;border:1.5px solid transparent;border-radius:12px;background-color:#F2F4F6;box-shadow:none;font-size:16px;color:#191F28;-webkit-appearance:none;appearance:none}
body.staff-workspace .shell textarea,body.staff-workspace dialog textarea{padding:12px 14px;line-height:1.5}
body.staff-workspace .shell select,body.staff-workspace dialog select{padding-right:38px;background-image:linear-gradient(45deg,transparent 50%,#8B95A1 50%),linear-gradient(135deg,#8B95A1 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
body.staff-workspace .shell input:focus,body.staff-workspace .shell select:focus,body.staff-workspace .shell textarea:focus,body.staff-workspace dialog input:focus,body.staff-workspace dialog select:focus,body.staff-workspace dialog textarea:focus{outline:none;background-color:#fff;border-color:#1E3556;box-shadow:0 0 0 4px rgba(30,53,86,.10)}
body.staff-workspace .shell input::-webkit-input-placeholder,body.staff-workspace .shell textarea::-webkit-input-placeholder{color:#B0B8C1}

/* 버튼 */
body.staff-workspace .shell .btn,body.staff-workspace dialog .btn{min-height:44px;padding:0 16px;border:0;border-radius:12px;background:#F2F4F6;box-shadow:none;font-size:15px;font-weight:700;color:#333D4B}
body.staff-workspace .shell .btn:hover,body.staff-workspace dialog .btn:hover{background:#E8EBEF}
body.staff-workspace .shell .btn.small,body.staff-workspace dialog .btn.small{min-height:38px;padding:0 12px;border-radius:10px;font-size:14px}
body.staff-workspace .shell .btn.primary,body.staff-workspace dialog .btn.primary{background:#1E3556;color:#fff}
body.staff-workspace .shell .btn.primary:hover,body.staff-workspace dialog .btn.primary:hover{background:#16294A}
body.staff-workspace .shell .btn[disabled],body.staff-workspace dialog .btn[disabled]{opacity:.5}
body.staff-workspace .shell .btn.primary[disabled],body.staff-workspace dialog .btn.primary[disabled]{opacity:1;background:#E5E8EB;color:#B0B8C1}
body.staff-workspace .shell a.btn{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none}

/* 표·목록 */
body.staff-workspace .shell table{border-collapse:collapse}
body.staff-workspace .shell th{padding:10px;border-bottom:1px solid #F2F4F6;background:transparent;font-size:13px;font-weight:600;color:#8B95A1}
body.staff-workspace .shell td{padding:14px 10px;border-bottom:1px solid #F2F4F6;font-size:15px;color:#333D4B}
body.staff-workspace .shell .list-pager,body.staff-workspace .shell .pos-list-pager{border-top:0}
body.staff-workspace .shell details>summary{font-size:15px;font-weight:700;color:#333D4B}
body.staff-workspace .shell a{color:#1E3556}

/* 대화상자 */
body.staff-workspace dialog{border:0;border-radius:20px;padding:24px;box-shadow:0 20px 60px rgba(17,24,39,.22)}
body.staff-workspace dialog h2{font-size:20px;font-weight:800;letter-spacing:-.02em;color:#191F28}

/* 재고 조회: 목록형 */
body.staff-workspace .shell #staff-stock-card .stock-toolbar{grid-gap:12px;gap:12px}
body.staff-workspace .shell .staff-stock-row{padding:16px 0;border:0;border-bottom:1px solid #F2F4F6;background:transparent}
body.staff-workspace .shell .staff-stock-row:last-child{border-bottom:0}
body.staff-workspace .shell .staff-stock-name strong{font-size:16px;font-weight:700;color:#191F28}
body.staff-workspace .shell .staff-stock-name small,body.staff-workspace .shell .staff-stock-detail{font-size:13px;color:#8B95A1}
body.staff-workspace .shell .staff-stock-amount strong{font-size:19px;font-weight:800;letter-spacing:-.01em;color:#1E3556}
body.staff-workspace .shell .staff-stock-amount.stock-unknown strong{color:#B4232F}
body.staff-workspace .shell #stock-basis{margin:12px 0 0;font-size:13px;color:#8B95A1}
body.staff-workspace .shell .stock-warning{margin:10px 0 0;padding:10px 12px;border:0;border-radius:10px;background:#FFF4E5;font-size:14px;color:#8A5300}

/* 와인리스트 실사: 분류 칩, 큰 수량 조절, 하단 일괄 저장 */
body.staff-workspace .shell .count-top h2{font-size:19px;font-weight:800;letter-spacing:-.02em;color:#191F28}
body.staff-workspace .shell #count-progress{margin:2px 0 0;font-size:14px;color:#1E3556;font-weight:700}
body.staff-workspace .shell .count-sheet-head{padding:10px 0;border:0;background:#fff}
body.staff-workspace .shell .count-toc-link{min-height:38px;margin:0 6px 0 0;padding:0 14px;border:0;border-radius:19px;background:#F2F4F6;font-size:14px;font-weight:700;color:#6B7684;white-space:nowrap}
body.staff-workspace .shell .count-toc-link[aria-current=page]{background:#1E3556;color:#fff}
body.staff-workspace .shell .count-toc-arrow{min-width:36px;min-height:38px;border:0;border-radius:19px;background:transparent;font-size:22px;color:#8B95A1}
body.staff-workspace .shell .count-line{padding:16px 0;border-bottom:1px solid #F2F4F6}
body.staff-workspace .shell .count-wine-name strong{font-size:16px;font-weight:700;color:#191F28}
body.staff-workspace .shell .count-stepper{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:4px;border-radius:14px;background:#F2F4F6}
body.staff-workspace .shell .count-stepper .btn.count-step{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);font-size:22px;font-weight:600;color:#333D4B}
body.staff-workspace .shell .count-stepper input{width:64px;min-height:44px;height:44px;margin:0 4px;padding:0;border:0;background:transparent;text-align:center;font-size:20px;font-weight:800;color:#191F28;-moz-appearance:textfield}
body.staff-workspace .shell .count-stepper input:focus{background:#fff;box-shadow:none;border-radius:10px}
body.staff-workspace .shell .count-line form>.btn.small{min-width:64px;background:transparent;color:#1E3556}
body.staff-workspace .shell .count-line form>.btn.small[disabled]{opacity:1;color:#B0B8C1}
body.staff-workspace .shell .count-batch-bar{border:0;background:-webkit-linear-gradient(top,rgba(255,255,255,0),#fff 18px);background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 18px)}
body.staff-workspace .shell .count-batch-bar .btn.primary{min-height:54px;border-radius:16px;font-size:17px}

/* 월결산·설정: 안내문 정리 */
body.staff-workspace .shell #admin-page h3{font-size:17px;font-weight:800;color:#191F28}
body.staff-workspace .shell .display-row{padding:14px 0;border-bottom:1px solid #F2F4F6}

/* 설정의 계정 입력 폼: 라벨 위·입력 아래로 한 줄씩 */
body.staff-workspace .shell #easypos-form label,body.staff-workspace .shell #pos-hq-form label,body.staff-workspace .shell #ai-key-form label:not(.check-label){display:block;margin:14px 0 6px}
body.staff-workspace .shell #easypos-form input,body.staff-workspace .shell #pos-hq-form input,body.staff-workspace .shell #ai-key-form input[type=password]{display:block;width:100%;max-width:420px}
body.staff-workspace .shell #easypos-form .btn,body.staff-workspace .shell #pos-hq-form .btn,body.staff-workspace .shell #ai-key-form .btn{margin-top:14px}

/* 실사: 흰 바탕, 저장 글자 줄바꿈 방지 */
body.staff-workspace .shell .count-book{background:#fff}
body.staff-workspace .shell .count-line form>.btn.small{white-space:nowrap;padding:0 8px}
@media (min-width:701px){
 body.staff-workspace .shell .count-line{grid-template-columns:minmax(0,1fr) auto}
}

body.staff-workspace .shell .count-line{-webkit-box-align:center;-webkit-align-items:center;align-items:center}

/* ==========================================================================
   v5 (2026-10-06) 설정 상태판 · 월결산 4단계
   workspace.js가 만든 새 요소(.status-board, .close-steps)와 옮긴 기존 요소용.
   iPadOS 12: flex gap·:is()·clamp()·이미지 URL 미사용.
   ========================================================================== */
/* 설정: 연결 상태판 */
body.staff-workspace .shell .status-board .section-head{padding-bottom:2px}
body.staff-workspace .shell .status-list{padding:4px 22px 12px}
body.staff-workspace .shell .status-row{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;padding:16px 0;border-bottom:1px solid #F2F4F6}
body.staff-workspace .shell .status-row:last-child{border-bottom:0}
body.staff-workspace .shell .status-dot{-webkit-flex:none;flex:none;width:10px;height:10px;margin:0 14px 0 2px;border-radius:50%;background:#C5CBD3}
body.staff-workspace .shell .status-dot.ok{background:#1FA35C}
body.staff-workspace .shell .status-dot.warn{background:#F08C00}
body.staff-workspace .shell .status-text{-webkit-box-flex:1;-webkit-flex:1 1 auto;flex:1 1 auto;min-width:0}
body.staff-workspace .shell .status-text strong{display:block;font-size:16px;font-weight:700;color:#191F28}
body.staff-workspace .shell .status-detail{display:block;margin-top:2px;font-size:13px;line-height:1.45;color:#8B95A1;word-break:keep-all;overflow-wrap:break-word}
body.staff-workspace .shell .settings-fold{border-radius:16px;background:#f9fafb;overflow:hidden;}
body.staff-workspace .shell .status-list>.settings-fold{margin:10px 0;}
body.staff-workspace .shell .settings-fold>.settings-fold-head{display:flex;align-items:center;min-height:64px;box-sizing:border-box;padding:16px;list-style:none;border:0;cursor:pointer;color:#191f28;}
body.staff-workspace .shell .settings-fold-head::-webkit-details-marker{display:none;}
body.staff-workspace .shell .settings-fold-head h2{flex:1;min-width:0;margin:0;font-size:16px;font-weight:700;}
body.staff-workspace .shell .settings-fold-body{padding:0 16px 16px;}
body.staff-workspace .shell .settings-fold-body>.card{margin:0;padding:0;border:0;box-shadow:none;border-radius:0;background:transparent!important;}
body.staff-workspace .shell .settings-fold-body .card-padding{padding:0;}
body.staff-workspace .shell .settings-fold-body .settings-inline-actions{justify-content:flex-end;padding:0 0 12px;border:0;}
body.staff-workspace .shell .settings-unwrapped>summary{display:none;}
body.staff-workspace .shell .settings-fold-body #backup-card>p,body.staff-workspace .shell .settings-fold-body #backup-card>button,body.staff-workspace .shell .settings-fold-body #backup-card>a{margin:8px 0;max-width:100%;}
body.staff-workspace .shell .settings-fold .status-detail{color:#667181;}
html[data-staff-theme=dark] .staff-workspace .shell .settings-fold{background:#203149!important;color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .shell .settings-fold-head,html[data-staff-theme=dark] .staff-workspace .shell .settings-fold-head h2,html[data-staff-theme=dark] .staff-workspace .shell .settings-fold-head strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .shell .settings-fold .status-detail{color:#b5c2d4!important;}
body.staff-workspace .shell .archive-all{margin:20px 4px 8px}
body.staff-workspace .shell .archive-all>summary{padding:10px 0;font-size:14px;font-weight:600;color:#8B95A1}
/* 월결산: 4단계 */
body.staff-workspace .shell #monthly-report-card #report-open{display:none}
body.staff-workspace .shell #monthly-report-card .section-head{padding-bottom:0}
body.staff-workspace .shell #monthly-report-card #report-content{padding-top:10px}
body.staff-workspace .shell .close-month{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0 0 14px}
body.staff-workspace .shell .close-month label{margin:0 12px 0 0;white-space:nowrap}
body.staff-workspace .shell .close-month input{width:auto;min-width:150px;font-weight:700}
body.staff-workspace .shell .close-steps{margin:0;padding:0;list-style:none;counter-reset:none}
body.staff-workspace .shell .close-step{margin:0 0 10px;border-radius:16px;background:#F9FAFB}
body.staff-workspace .shell .close-step.is-current{background:#fff;box-shadow:0 0 0 2px #1E3556 inset}
body.staff-workspace .shell .close-step-head{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;width:100%;min-height:64px;padding:12px 16px;border:0;background:transparent;text-align:left;cursor:pointer}
body.staff-workspace .shell .close-step-num{-webkit-flex:none;flex:none;width:30px;height:30px;margin-right:14px;border-radius:50%;background:#E5E8EB;font-size:14px;font-weight:800;line-height:30px;text-align:center;color:#6B7684}
body.staff-workspace .shell .close-step.is-current .close-step-num{background:#1E3556;color:#fff}
body.staff-workspace .shell .close-step.is-done .close-step-num{background:#E8F6EE;color:transparent;position:relative}
body.staff-workspace .shell .close-step.is-done .close-step-num:after{content:"";position:absolute;left:10px;top:7px;width:7px;height:12px;border:solid #1FA35C;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}
body.staff-workspace .shell .close-step-title{-webkit-box-flex:1;-webkit-flex:1 1 auto;flex:1 1 auto;min-width:0}
body.staff-workspace .shell .close-step-title strong{display:block;font-size:16px;font-weight:800;color:#191F28}
body.staff-workspace .shell .close-step-status{display:block;margin-top:2px;font-size:14px;color:#6B7684;word-break:keep-all;overflow-wrap:break-word}
body.staff-workspace .shell .close-step.is-done .close-step-status{color:#1FA35C}
body.staff-workspace .shell .close-step-body{display:none;padding:0 16px 16px 60px}
body.staff-workspace .shell .close-step.is-open .close-step-body{display:block}
body.staff-workspace .shell .close-step-body>.btn,body.staff-workspace .shell .close-step-body .actions .btn{margin:4px 8px 0 0}
body.staff-workspace .shell .close-step-body p{margin:6px 0;font-size:14px;color:#4E5968}
body.staff-workspace .shell .close-step-body h3{margin:4px 0 6px;font-size:15px}
body.staff-workspace .shell #report-files{margin-top:12px}
body.staff-workspace .shell #report-files a{font-weight:700}
body.staff-workspace .shell .report-month-file{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e5e3dc}
body.staff-workspace .shell .report-month-file:last-child{border-bottom:0}
body.staff-workspace .shell .report-file-info{min-width:0;margin-right:12px}
body.staff-workspace .shell .report-file-info strong{display:block;font-size:15px;color:#1E3556}
body.staff-workspace .shell .report-file-date{display:block;margin-top:4px;font-size:12px;color:#6d747c}
body.staff-workspace .shell .report-month-file .btn{flex:none;margin:0}
#retired-controls[hidden]{display:none!important}
body.staff-workspace .shell .sales-connection-summary{display:flex;max-width:560px;border:1px solid #e5e3dc;border-radius:8px}
body.staff-workspace .shell .sales-connection-summary>div{flex:1;padding:12px 14px;min-width:0}
body.staff-workspace .shell .sales-connection-summary>div+div{border-left:1px solid #e5e3dc}
body.staff-workspace .shell .sales-connection-summary span{display:block;font-size:12px;color:#6d747c;margin-bottom:4px}
body.staff-workspace .shell .sales-connection-summary strong{font-size:14px;color:#1E3556}
body.staff-workspace .shell #easypos-card .actions{justify-content:flex-start;margin:12px 0}
body.staff-workspace .shell #easypos-settings>summary{font-size:13px;min-height:30px;padding:4px 0}
body.staff-workspace .shell #easypos-message:empty{display:none}
body.staff-workspace .shell #report-revenue{margin-top:8px;max-width:520px}
body.staff-workspace .shell #report-revenue .revenue-compact{width:100%;min-width:0;font-size:13px;table-layout:fixed}
body.staff-workspace .shell #report-revenue .revenue-compact th,body.staff-workspace .shell #report-revenue .revenue-compact td{padding:7px 10px;line-height:1.4}
body.staff-workspace .shell #report-revenue .revenue-compact summary{min-height:22px;padding:1px 0;margin:0;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:break-word}
body.staff-workspace .shell #report-revenue .revenue-compact th:last-child,body.staff-workspace .shell #report-revenue .revenue-compact td:last-child{width:125px;text-align:right;white-space:nowrap}
body.staff-workspace .shell #report-revenue .revenue-items{max-height:180px;overflow-y:auto}
body.staff-workspace .shell #report-revenue .revenue-items p{font-size:12px;margin:5px 0;overflow-wrap:anywhere}
body.staff-workspace .shell #report-message:not(:empty){margin:10px 0 0;padding:12px 14px;border-radius:12px;background:#EEF1F5;font-size:14px;color:#1E3556}
@media (max-width:700px){
 body.staff-workspace .shell .status-list{padding:2px 16px 8px}
 body.staff-workspace .shell .close-step-body{padding:0 14px 14px 14px}
}
body.staff-workspace .shell .close-step-body .actions{display:block}
body.staff-workspace .shell .close-step-body .btn{white-space:nowrap}
@media (max-width:700px){
 body.staff-workspace .shell .close-step-body .actions .btn{display:block;width:100%;margin:8px 0 0}
}
/* Compact stock reflection dates; flex works on iPadOS 12. */
body.staff-workspace .shell .stock-status{display:flex;margin:16px 0 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper,#fff);overflow:hidden}
body.staff-workspace .shell .stock-status[hidden]{display:none}
body.staff-workspace .shell .stock-status-cell{flex:1;min-width:0;padding:12px 14px}
body.staff-workspace .shell .stock-status-cell+.stock-status-cell{border-left:1px solid #e5e3dc}
body.staff-workspace .shell .stock-status-cell span{display:block;font-size:12px;color:#6d747c;margin-bottom:4px}
body.staff-workspace .shell .stock-status-cell strong{display:block;font-size:15px;line-height:1.4;color:#1e3556;font-weight:600}
@media(max-width:480px){body.staff-workspace .shell .stock-status-cell{padding:10px 8px}body.staff-workspace .shell .stock-status-cell strong{font-size:13px}body.staff-workspace .shell .stock-status-cell span{font-size:11px}}

/* Compact inventory delete, alongside list action. */
#staff-stock-card .stock-list-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}
#staff-stock-card .stock-delete-icon{position:relative;display:inline-block;flex:0 0 28px;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;border:0;border-radius:50%;background:#bc3d43;cursor:pointer;box-shadow:none}
#staff-stock-card .stock-delete-icon::after{content:"";position:absolute;left:7px;right:7px;top:13px;height:2px;background:#fff;border-radius:1px}
#staff-stock-card .stock-delete-icon:hover{background:#a32d34}
#staff-stock-card .stock-delete-icon:focus-visible{outline:2px solid #1e3556;outline-offset:3px}
#staff-stock-card .stock-delete-icon:disabled{opacity:.45;cursor:wait}
#stock-delete-dialog{width:340px;max-width:calc(100% - 32px);padding:22px;border:1px solid #ded8cd;border-radius:12px}
#stock-delete-dialog h2{margin:0 0 12px;font-size:18px}
#stock-delete-dialog p{font-size:14px;line-height:1.5;margin:0 0 20px}
#stock-delete-dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin:0}

.grape-picker{margin:4px 0 12px;position:relative;min-width:0}
.grape-tokens{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:5px}
.grape-chip{display:inline-flex;align-items:center;background:#f0eee8;border:1px solid #ded9cb;border-radius:5px;padding:3px 7px;font-size:13px;max-width:100%;overflow-wrap:anywhere}
.grape-chip button{background:none;border:0;color:#71494b;margin:0 0 0 6px;padding:2px 4px;min-height:24px;font-size:18px;cursor:pointer}
.grape-picker .grape-query{width:100%;margin:0}
.grape-options{max-height:220px;overflow:auto;-webkit-overflow-scrolling:touch;border:1px solid #ddd6c7;border-radius:5px;margin-top:4px;background:white}
.grape-options button{display:block;width:100%;text-align:left;background:white;border:0;border-bottom:1px solid #eee9df;padding:10px;font:inherit;font-size:14px;color:#283642;cursor:pointer}
.grape-options button:hover,.grape-options button:focus{background:#f4f0e7}
.grape-error{display:block;font-size:12px;color:#923a3d}
.staff-workspace input.invoice-field-review{border:2px solid #a34848;background:#fff7f5}
.invoice-label-rows{margin:12px 0}
.invoice-label-row{padding:10px 0;border-bottom:1px solid #ddd6c7}
.invoice-label-row strong,.invoice-label-row span,.invoice-label-row small{display:block;margin-bottom:5px}
.invoice-label-row span,.invoice-label-row small{font-size:12px;color:#58616a}
.invoice-label-row .btn{margin:3px 6px 3px 0}
/* One invoice selector: rows occupy the original top position. */
body.staff-workspace[data-work-view=intake][data-work-section=new] #intake-page #ocr-panel{background:transparent;padding:0;border-radius:0}
#ocr-panel #invoice-row{display:none!important}
#ocr-panel #ocr-status:empty,.invoice-label-rows>p:empty{display:none}
#ocr-panel .invoice-label-rows{margin:0}
#ocr-panel .invoice-label-row{padding:12px;margin:0 0 8px;border:1px solid #dfd9cd;border-radius:8px;background:#fbfaf7}
#ocr-panel .invoice-label-row.selected{border-color:#1e3556;background:#f0f3f7;box-shadow:inset 3px 0 #1e3556}
#ocr-panel .invoice-label-row strong{font-size:14px;line-height:1.5;overflow-wrap:break-word}
#monthly-intake-body>div:first-child>strong{display:block;font-size:1.35rem;color:#1e3556;margin-bottom:12px}
#monthly-intake-body>details>input,#monthly-intake-body>details>select{margin:8px 8px 8px 0;max-width:100%;padding:9px}
#monthly-intake-body table{width:100%;min-width:740px;border-collapse:collapse}
#monthly-intake-body td,#monthly-intake-body th{padding:7px;text-align:left;border-bottom:1px solid #d8d3ca}
#monthly-intake-body td input,#monthly-intake-body td select{width:100%;box-sizing:border-box;min-width:78px}
#monthly-intake-body td:nth-child(2){min-width:170px}
#monthly-intake-body td:last-child{max-width:220px}
#monthly-intake-body>details>p{font-size:.9rem}
#monthly-intake-body .ledger-panel{margin-top:16px}
#monthly-intake-body .ledger-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;margin:16px 0}
#monthly-intake-body .ledger-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:12px;color:#667181}
#monthly-intake-body .ledger-field input,#monthly-intake-body .ledger-field select,#monthly-intake-body .ledger-field textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;margin:0;padding:10px;border:1px solid #d6dce4;border-radius:8px;background:#fff;color:#233650;font:inherit;font-size:15px}
#monthly-intake-body .ledger-field textarea{resize:vertical;line-height:1.5}
#monthly-intake-body .ledger-field input[type=file]{font-size:12px}
#monthly-intake-body .ledger-originals{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;overflow-wrap:anywhere;word-break:break-word}
#monthly-intake-body .ledger-status:empty{display:none}
#monthly-intake-body .ledger-result{padding:16px;margin:16px 0 24px;border:1px solid #d8dfe8;border-radius:12px;background:#f2f5f9;color:#233650}
#monthly-intake-body .ledger-result[hidden]{display:none}
#monthly-intake-body .ledger-result-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
#monthly-intake-body .ledger-result h4,#monthly-intake-body .ledger-editor h4{margin:0;font-size:16px;color:#233650}
#monthly-intake-body .ledger-result-heading>span{padding:4px 9px;border-radius:6px;font-size:12px;font-weight:600;background:#e9dfe2;color:#794853}
#monthly-intake-body .ledger-matched .ledger-result-heading>span{background:#dfece6;color:#376251}
#monthly-intake-body .ledger-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#monthly-intake-body .ledger-metrics>div{min-width:0;display:flex;flex-direction:column;gap:6px}
#monthly-intake-body .ledger-metrics span{font-size:12px;color:#667181}
#monthly-intake-body .ledger-metrics strong{font-size:17px;font-variant-numeric:tabular-nums;overflow-wrap:break-word}
#monthly-intake-body .ledger-difference .ledger-metrics>div:last-child strong{color:#794853}
#monthly-intake-body .ledger-issue{display:flex;flex-direction:column;gap:7px;padding:14px;margin-top:14px;border:1px solid #dce1e8;border-radius:8px;background:#fff;overflow-wrap:break-word}
#monthly-intake-body .ledger-issue>small{color:#794853;font-size:12px;font-weight:600}
#monthly-intake-body .ledger-issue>strong{font-size:15px;line-height:1.5}
#monthly-intake-body .ledger-issue-meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#526174}
#monthly-intake-body .ledger-issue p,#monthly-intake-body .ledger-result-note{margin:0;font-size:12px;color:#667181;line-height:1.5}
#monthly-intake-body .ledger-result-note{margin-top:12px}
#monthly-intake-body .ledger-editor{display:grid;gap:12px}
#monthly-intake-body .ledger-row{padding:16px;border:1px solid #dce1e8;border-radius:12px;background:#fff;display:grid;gap:12px;min-width:0}
#monthly-intake-body .ledger-row>small{font-weight:600;color:#738093}
#monthly-intake-body .ledger-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#monthly-intake-body .ledger-selected{margin:0;font-size:12px;line-height:1.5;color:#526174;overflow-wrap:break-word}
#monthly-intake-body .ledger-save{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:16px}
#monthly-intake-body .ledger-save .ledger-field{flex:1 1 180px}
#monthly-intake-body .ledger-pager{display:flex;align-items:center;justify-content:space-between;gap:10px}
#monthly-intake-body .ledger-row{padding:12px 0;border:0;border-bottom:1px solid #dce1e8;border-radius:0;background:transparent;gap:7px}
#monthly-intake-body .ledger-row>strong{font-size:14px;line-height:1.5}
#monthly-intake-body .ledger-row-meta{font-size:12px;line-height:1.5;color:#667181;margin:0}
#monthly-intake-body .ledger-row>select{box-sizing:border-box;max-width:100%;width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #d6dce4;border-radius:6px;background:#fff;font-size:14px;color:#233650}
#monthly-intake-body .ledger-edit>summary{font-size:12px;color:#667181;min-height:28px;padding:4px 0}
#monthly-intake-body .ledger-edit[open]>.ledger-field,#monthly-intake-body .ledger-edit[open]>.ledger-numbers{margin-top:10px}
#monthly-intake-body .ledger-simple{padding:12px 0;background:transparent;border:0;border-top:1px solid #dce1e8;border-bottom:1px solid #dce1e8;border-radius:0;margin:16px 0}
#monthly-intake-body .ledger-simple>strong{font-size:16px;color:#794853}
#monthly-intake-body .ledger-simple>p{font-size:13px;line-height:1.5;margin:7px 0 0}
@media(max-width:600px){
 #monthly-intake-body .ledger-tools{grid-template-columns:minmax(0,1fr)}
 #monthly-intake-body .ledger-result,#monthly-intake-body .ledger-row{padding:12px}
 #monthly-intake-body .ledger-numbers,#monthly-intake-body .ledger-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 #monthly-intake-body .ledger-date,#monthly-intake-body .ledger-metrics>div:last-child{grid-column:1/-1}
 #monthly-intake-body .ledger-metrics>div:last-child{border-top:1px solid #d8dfe8;padding-top:10px}
 #monthly-intake-body .ledger-field input,#monthly-intake-body .ledger-field select,#monthly-intake-body .ledger-field textarea{font-size:16px}
 #monthly-intake-body .ledger-save>*{width:100%}
}

/* Compact ledger typography; editing remains expandable. */
#monthly-intake-body .ledger-panel{font-size:13px;line-height:1.5}
#monthly-intake-body .ledger-tools{gap:8px 12px;margin:12px 0}
#monthly-intake-body .ledger-status,#monthly-intake-body .ledger-originals{font-size:12px;margin:6px 0;color:#75808e}
#monthly-intake-body .ledger-editor{gap:0}
#monthly-intake-body .ledger-editor h4{font-size:13px;font-weight:600;margin:0;padding:0 0 6px;color:#647184}
#monthly-intake-body .ledger-row{padding:10px 0;gap:3px;border-bottom:1px solid #e3e7ec}
#monthly-intake-body .ledger-row>strong{font-size:13px;font-weight:600;line-height:1.5;color:#293c53}
#monthly-intake-body .ledger-row-meta{font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
#monthly-intake-body .ledger-edit>summary{font-size:12px;line-height:1.5;min-height:28px;box-sizing:border-box;padding:5px 0;margin:0;border:0;background:transparent;color:#6d7b8c}
#monthly-intake-body .ledger-edit[open]{padding-bottom:4px}
#monthly-intake-body .ledger-simple{padding:10px 0;margin:12px 0 16px;border-top:0;border-bottom:1px solid #dce1e8}
#monthly-intake-body .ledger-simple>strong{font-size:14px;font-weight:600}
#monthly-intake-body .ledger-simple>p{font-size:12px;line-height:1.6;margin:4px 0 0}
#monthly-intake-body .ledger-field{font-size:11px;gap:4px}
#monthly-intake-body .ledger-save{margin-top:12px;gap:8px}
#monthly-intake-body .ledger-save button{font-size:13px}

/* Supplier intake totals use the same compact table as monthly revenue. */
body.staff-workspace .shell #monthly-intake-body .intake-summary{margin-top:8px;max-width:520px}
body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact{width:100%;min-width:0;font-size:13px;table-layout:fixed}
body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact th,body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact td{padding:7px 10px;line-height:1.4}
body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact summary{min-height:22px;padding:1px 0;margin:0;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:break-word}
body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact th:last-child,body.staff-workspace .shell #monthly-intake-body .intake-summary .revenue-compact td:last-child{width:125px;text-align:right;white-space:nowrap}

/* Wine placement controls share the existing tablet editor. */

/* Existing POS identity resolution, shared across staff screens. */
.pos-review-overlay{position:fixed;z-index:1200;inset:0;top:0;left:0;right:0;bottom:0;background:rgba(22,32,51,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.pos-review-dialog{background:#faf8f3;color:#243348;width:100%;max-width:560px;max-height:85vh;overflow:auto;-webkit-overflow-scrolling:touch;border-radius:12px;padding:20px;box-sizing:border-box;box-shadow:0 12px 40px rgba(0,0,0,.2)}
.pos-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.pos-review-head h3{margin:0;font-size:19px}
.pos-review-target{font-weight:600;margin:16px 0}.pos-review-candidate{padding:14px 0;border-top:1px solid #d9d9d2}.pos-review-candidate strong{display:block;overflow-wrap:break-word}
.pos-review-meta{color:#566273;font-size:13px;margin:6px 0 10px}.pos-review-reason{color:#657080;font-size:13px}.pos-review-error{color:#9d3636;font-size:14px;white-space:pre-line}.pos-review-error:empty{display:none}
.pos-review-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:14px;border-top:1px solid #d9d9d2}.pos-review-dialog button{min-height:40px}.pos-review-dialog[aria-busy="true"]{cursor:progress}

/* Login-only landing screen */

body.staff-workspace:not(.intake-practice)[data-login-gate]{background:#F6F5F2!important;padding:0!important;min-height:100vh}
body:not(.intake-practice)[data-login-gate]>:not(#login-dialog):not(script):not(style){display:none!important}
body:not(.intake-practice)[data-login-gate] #login-dialog::backdrop{background:#F6F5F2}
body.staff-workspace #login-dialog{width:calc(100% - 32px);max-width:400px;padding:32px;border:1px solid #E5E3DE;border-radius:18px;background:#fff;box-shadow:0 12px 36px rgba(30,53,86,.06)}
body.staff-workspace #login-dialog h2{margin:0 0 26px;color:#1E3556;font-size:23px;font-weight:700}
body.staff-workspace #login-dialog #login-note:empty,body.staff-workspace #login-dialog #login-error:empty{display:none}
body.staff-workspace #login-dialog label{margin-top:18px}
body.staff-workspace #login-dialog .actions{margin-top:24px}
body.staff-workspace #login-dialog #login-submit{width:100%;min-height:48px}
@media(max-width:480px){body.staff-workspace #login-dialog{padding:26px 22px}}
/* Staff editing pages follow the current customer wine-list presentation. */
#wine-page-nav{background:var(--navy);border-color:#465872}
#wine-page-nav .wine-nav-group,#wine-page-nav .wine-nav-item{color:var(--beige)}
#wine-page-nav .wine-nav-group,#wine-page-nav .wine-nav-major{font-weight:700}
#wine-page-nav .wine-nav-item:not(.wine-nav-major){font-weight:400}
#wine-page-nav .wine-nav-item:hover{background:#30496b}
#wine-page-nav .wine-nav-item[aria-current=page]{background:#405779;box-shadow:inset 3px 0 0 var(--beige)}
#wine-page-nav .wine-nav-item:focus-visible{outline-color:var(--beige)}
.wine-paper .wine-page-heading{border-bottom:1px solid #cbbda4;padding-bottom:13px;margin:0}
.staff-workspace .wine-paper .wine-page-heading h2{font-weight:700;color:#947238}
.wine-edit-section+.wine-edit-section{margin-top:28px}
.wine-page-heading .wine-page-detail{font:13px/1.5 Georgia,serif;margin-top:5px}
.wine-page-description{white-space:pre-line;font-size:13px;line-height:1.65;color:#30343a;margin:14px 0 0}
.wine-page-edit{grid-template-columns:minmax(0,1fr) auto 38px 66px;gap:8px;align-items:start;padding:20px 0}
.wine-page-edit .wine-page-main{grid-column:1;grid-row:1;min-width:0}
.wine-page-edit .wine-page-note{grid-column:2;grid-row:1;align-self:start;max-width:130px;white-space:nowrap;overflow-x:auto;text-align:center;font-size:11px;color:#68242c}
.wine-page-edit .wine-page-note:empty{display:none}
.wine-page-edit .wine-page-vintage{grid-column:3;grid-row:1;font-size:13px;letter-spacing:-.5px;font-variant-numeric:normal;line-height:1.4}
.wine-page-edit .wine-page-price{grid-column:4;grid-row:1;font-size:13px;line-height:1.4}
.wine-page-edit .wine-page-english{font:700 13px/1.4 Georgia,'Times New Roman',serif;color:#172d4b}
.wine-page-edit .wine-page-korean{font-size:12px;font-weight:400;line-height:1.4;color:#30343a;margin-top:2px}
.wine-page-edit .wine-page-grapes{font-size:8pt;font-weight:600;line-height:1.4;color:#355c43;margin-top:3px;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
.wine-page-grapes::-webkit-scrollbar{display:none}
.wine-page-edit .wine-page-note.wine-page-recommend{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:34px;height:34px;min-width:34px;max-width:34px;padding:0;margin:0 3px;border:1.5px solid #68242c;border-radius:50%;font-size:10.5px;font-weight:700;line-height:1;letter-spacing:-.04em;transform:rotate(-10deg);overflow:visible}
.wine-page-serving .wine-page-glass{color:#a62f40;font-weight:700;font-size:11.5px;white-space:normal}
.wine-paper{scrollbar-width:auto;scrollbar-color:#43546a #e2e4e7}
.wine-paper::-webkit-scrollbar{width:8px}
.wine-paper::-webkit-scrollbar-thumb{background:#43546a;border-radius:8px}
.wine-paper::-webkit-scrollbar-track{background:#e2e4e7}
@media(min-width:1450px){.wine-book{grid-template-columns:160px minmax(0,1fr)}}
@media(max-width:700px){
 .wine-book{grid-template-columns:98px minmax(0,1fr)}
 .wine-page-edit{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:18px 0}
 .wine-page-edit .wine-page-main{grid-column:1 / -1;grid-row:1}
 .wine-page-edit .wine-page-note{grid-column:1 / -1;grid-row:2;max-width:100%;justify-self:start}
 .wine-page-edit .wine-page-vintage{grid-column:1;grid-row:3;text-align:left;margin-top:4px;font-size:14px}
 .wine-page-edit .wine-page-price{grid-column:2;grid-row:3;margin-top:4px;font-size:14px}
 .wine-page-edit .wine-page-english{font-size:14px}
}
.wine-note-editor{min-width:0;margin:18px 0;padding:14px;border:1px solid #dedbd3;border-radius:8px;background:#faf8f3}
.wine-note-editor legend{padding:0 6px;color:#1e3556;font-size:13px;font-weight:700}
.wine-note-editor select,.wine-note-editor input:not([type=hidden]){box-sizing:border-box;width:100%;min-width:0;margin:0;min-height:42px;padding:8px 10px;border:1px solid #d7d9d9;border-radius:6px;background:white;color:#1e3556;font:inherit}
.wine-note-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-top:12px}
.wine-note-options label{margin:0;font-size:12px;color:#5b5d60}
.wine-note-options label select,.wine-note-options label input{margin-top:6px}
.wine-note-editor>input:not([type=hidden]){margin-top:12px}
.wine-note-preview-box{display:flex;align-items:center;gap:18px;margin-top:14px;padding-top:12px;border-top:1px solid #e5dfd4}
.wine-note-preview-label{font-size:11px;color:#74726b;white-space:nowrap}
.wine-note-preview{color:#8b2434;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.wine-note-preview.note-recommend,.wine-page-edit .wine-page-note.note-recommend{width:24px;min-width:24px;margin:0;color:#c49a3a;font:400 24px/1 Arial,sans-serif;text-align:center}
.wine-note-preview.note-rating,.wine-page-edit .wine-page-note.note-rating{display:inline-flex;flex-direction:column;align-items:center;min-width:66px;max-width:90px;color:#8b3446;line-height:1.15;white-space:nowrap;overflow:visible}
.wine-note-preview.note-rvf,.wine-page-edit .wine-page-note.note-rvf{color:#806000}
.note-rating-brand{display:block;font:700 10px/1.2 Arial,sans-serif;letter-spacing:.06em}
.note-rating-marks{display:flex;align-items:center;justify-content:center;margin-top:3px;font:600 16px/1.1 Arial,sans-serif;letter-spacing:1px}
.note-rating-marks svg{display:block;margin:0 1px;flex-shrink:0}
.note-rating-year{display:block;margin-top:3px;font:400 9px/1.2 Arial,sans-serif;letter-spacing:0;color:#75685f}
.wine-note-editor [hidden],.wine-note-editor[hidden]{display:none!important}

/* Wine editor: one shared form layout for price, display, glass and location. */
.staff-workspace #wine-edit-dialog{box-sizing:border-box;width:calc(100% - 40px);max-width:740px;height:660px;max-height:calc(var(--app-height,100vh) - 40px);padding:0;overflow:hidden;border:1px solid #d8dce0;border-radius:12px;background:#fff;color:#26384d}
#wine-edit-form{display:flex;flex-direction:column;height:100%;min-height:0;margin:0}
#wine-edit-dialog .wine-editor-head{flex:0 0 auto;padding:22px 26px 14px;background:#f7f6f2}
#wine-edit-dialog .wine-editor-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
#wine-edit-dialog #wine-edit-title{margin:0;font-size:12px;font-weight:500;color:#66717d}
#wine-edit-dialog #wine-edit-name{margin:0;font-size:18px;line-height:1.45;font-weight:700;color:#1e3556;overflow-wrap:break-word}
#wine-edit-dialog #wine-editor-vintage{display:flex;align-items:center}
#wine-edit-dialog #sales-vintage-toggle,#wine-edit-dialog #sales-name-toggle{background:transparent;font-size:12px;min-height:34px;padding:5px 10px}
#wine-edit-dialog #sales-name-toggle{margin-right:6px}
#wine-edit-dialog #sales-name-panel{margin-top:12px}
#wine-edit-dialog .wine-editor-vintage-fields{display:grid;grid-template-columns:100px auto;gap:8px;align-items:center;max-width:260px;margin:12px 0 0}
#wine-edit-dialog #sales-vintage{min-height:34px;padding:5px 9px}
#wine-edit-dialog .sales-tabs{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;padding:0 26px;background:#f7f6f2;border-bottom:1px solid #dee1e5}
#wine-edit-dialog .sales-tabs>button{margin:0;padding:12px 2px;min-height:48px;white-space:nowrap;font-size:13px}
#wine-edit-dialog #wine-editor-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding:24px 26px}
#wine-edit-dialog [data-sales-pane]{min-height:0}
#wine-edit-dialog .wine-editor-section{min-width:0;margin:0;padding:0}
#wine-edit-dialog .wine-editor-section+.wine-editor-section,#wine-edit-dialog .wine-editor-columns+.wine-editor-section{margin-top:22px;padding-top:20px;border-top:1px solid #e2e5e8}
#wine-edit-dialog h3{margin:0 0 14px;font-size:14px;font-weight:700;color:#1e3556}
#wine-edit-dialog label,#wine-edit-dialog .wine-editor-rate>span{display:block;margin:0 0 7px;font-size:12px;font-weight:500;color:#637080;line-height:1.5}
#wine-edit-dialog input:not([type=checkbox]):not([type=hidden]),#wine-edit-dialog select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:9px 11px;border:1px solid #cdd4db;border-radius:6px;background:#fff;color:#1e3556;font:inherit;font-size:14px;line-height:1.4}
#wine-edit-dialog input:disabled,#wine-edit-dialog select:disabled{background:#f2f4f5;color:#808992}
#wine-edit-dialog input:focus-visible,#wine-edit-dialog select:focus-visible,#wine-edit-dialog button:focus-visible{outline:2px solid #7e96ae;outline-offset:2px}
#wine-edit-dialog .check-label{display:flex;align-items:center;min-height:36px;margin:0;color:#26384d;font-size:13px;font-weight:500;cursor:pointer}
#wine-edit-dialog .check-label input{width:18px;height:18px;flex:0 0 18px;margin:0 8px 0 0;padding:0;accent-color:#1e3556}
#wine-edit-dialog .btn{margin:0;min-height:40px;padding:8px 13px;border:1px solid #cdd4db;border-radius:6px;background:#fff;color:#1e3556;font-size:12px;line-height:1.4;white-space:nowrap}
#wine-edit-dialog .btn.primary{background:#1e3556;border-color:#1e3556;color:#fff}
#wine-edit-dialog .btn:disabled{opacity:.5;cursor:default}
#wine-edit-dialog .wine-editor-price{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:24px;align-items:end}
#wine-edit-dialog #sales-bottle-price{font-size:24px;font-weight:650;min-height:56px;font-variant-numeric:tabular-nums}
#wine-edit-dialog .wine-editor-rate{padding-left:24px;border-left:1px solid #e2e5e8}
#wine-edit-dialog .wine-editor-rate output{display:flex;align-items:center;height:56px;font-size:27px;font-weight:650;color:#1e3556;font-variant-numeric:tabular-nums}
#wine-edit-dialog .wine-editor-discount{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:end;margin-top:12px}
#wine-edit-dialog .wine-editor-discount>label{margin:0}
#wine-edit-dialog .wine-editor-discount input[type=number]{margin-top:6px}
#wine-edit-dialog .wine-editor-facts{margin:0;border:1px solid #e2e5e8;border-radius:8px;overflow:hidden}
#wine-edit-dialog .wine-editor-fact,#wine-edit-dialog .wine-editor-facts>div{display:grid;grid-template-columns:minmax(100px,1fr) auto auto;gap:12px;align-items:center;padding:12px 15px;min-height:48px;font-size:13px}
#wine-edit-dialog .wine-editor-facts>div+div{border-top:1px solid #e2e5e8}
#wine-edit-dialog .wine-editor-facts>div:nth-child(odd){background:#f7f8f9}
#wine-edit-dialog .wine-editor-fact>span:first-child,#wine-edit-dialog .wine-editor-facts dt{color:#637080}
#wine-edit-dialog .wine-editor-fact strong{font-size:15px;font-weight:650;font-variant-numeric:tabular-nums}
#wine-edit-dialog .wine-editor-fact:not(#sales-midpoint-row)>:last-child,#wine-edit-dialog .wine-editor-facts dd{grid-column:2 / -1;text-align:right;margin:0;overflow-wrap:break-word}
#wine-edit-dialog .wine-editor-fact small{font-size:11px;margin-left:3px;white-space:nowrap}
#wine-edit-dialog .wine-editor-source{font-size:12px}
#wine-edit-dialog #sales-cost-source{margin:0;font-size:12px;color:#637080}
#wine-edit-dialog .wine-editor-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}
#wine-edit-dialog .wine-editor-columns>.wine-editor-section+.wine-editor-section{margin:0;padding:0 0 0 24px;border-top:0;border-left:1px solid #e2e5e8}
#wine-edit-dialog .wine-editor-field{margin:16px 0 0}
#wine-edit-dialog #sales-regular-note{margin:0}
#wine-edit-dialog .wine-note-editor{margin:16px 0 0;padding:0;border:0;border-radius:0;background:transparent;min-width:0}
#wine-edit-dialog .wine-note-editor legend{margin:0 0 7px;padding:0;font-size:12px;font-weight:500;color:#637080}
#wine-edit-dialog .wine-note-options{gap:10px;margin-top:12px}
#wine-edit-dialog .wine-note-options label{margin:0;font-size:11px}
#wine-edit-dialog .wine-note-options select,#wine-edit-dialog .wine-note-options input{margin-top:6px}
#wine-edit-dialog .wine-note-preview-box{margin-top:12px;padding:10px 12px;min-height:46px;border:0;border-radius:6px;background:#f7f8f9}
#wine-edit-dialog .wine-editor-status{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px}
#wine-edit-dialog .wine-editor-status h3{margin-bottom:4px}
#wine-edit-dialog .wine-editor-visibility{text-align:right}
#wine-edit-dialog #wine-visibility-toggle{margin-top:4px}
#wine-edit-dialog #wine-availability-status{margin:5px 0 0;font-size:11px;line-height:1.6;color:#637080}
#wine-edit-dialog .wine-editor-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
#wine-edit-dialog .wine-editor-volume{max-width:220px}
#wine-edit-dialog #sales-glass-fields{margin-top:20px}
#wine-edit-dialog .wine-editor-glass-rate{margin-top:16px;border-top:1px solid #e2e5e8;padding:14px 0 0}
#wine-edit-dialog .wine-editor-glass-rate output{font-size:22px;font-weight:650}
#wine-edit-dialog .wine-editor-pos-info summary{font-size:12px;color:#637080;cursor:pointer;padding:3px 0}
#wine-edit-dialog .wine-editor-pos-info dl{margin-top:12px}
#wine-edit-dialog .wine-editor-inline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
#wine-edit-dialog .wine-editor-location-fields{grid-template-columns:minmax(0,1fr) 90px;margin-top:16px}
#wine-edit-dialog .wine-editor-section-action{display:flex;justify-content:flex-end;margin-top:14px}
#wine-edit-dialog .wine-editor-hint,#wine-edit-dialog #location-message{font-size:12px;color:#637080;margin:10px 0 0}
#wine-edit-dialog .wine-editor-footer{flex:0 0 auto;border-top:1px solid #dee1e5;background:#fff;margin:0;padding:14px 26px}
#wine-edit-dialog .wine-editor-footer .actions{display:flex;justify-content:flex-end;gap:0;margin:0}
#wine-edit-dialog .wine-editor-footer .btn{min-height:44px;min-width:94px;margin:0 0 0 8px;font-size:14px}
#wine-edit-dialog #wine-edit-error{color:#8b3446;font-size:12px;line-height:1.5;margin:0 0 12px;max-height:80px;overflow:auto}
#wine-edit-dialog #wine-edit-error:empty{display:none}
@media(max-width:600px){
 .staff-workspace #wine-edit-dialog{width:calc(100% - 20px);height:720px;max-height:calc(var(--app-height,100vh) - 24px);border-radius:10px}
 #wine-edit-dialog .wine-editor-head{padding:18px 18px 12px}
 #wine-edit-dialog #wine-edit-name{font-size:16px}
 #wine-edit-dialog .sales-tabs{padding:0 14px}
 #wine-edit-dialog .sales-tabs>button{font-size:12px}
 #wine-edit-dialog #wine-editor-body{padding:20px 18px}
 #wine-edit-dialog .wine-editor-price{grid-template-columns:minmax(0,1fr) 112px;gap:14px}
 #wine-edit-dialog .wine-editor-rate{padding-left:14px}
 #wine-edit-dialog .wine-editor-rate>span{font-size:10px}
 #wine-edit-dialog .wine-editor-rate output{font-size:24px}
 #wine-edit-dialog #sales-bottle-price{font-size:22px}
 #wine-edit-dialog input:not([type=checkbox]):not([type=hidden]),#wine-edit-dialog select{font-size:16px}
 #wine-edit-dialog .wine-editor-columns{grid-template-columns:minmax(0,1fr);gap:20px}
 #wine-edit-dialog .wine-editor-columns>.wine-editor-section+.wine-editor-section{border-left:0;border-top:1px solid #e2e5e8;padding:20px 0 0}
 #wine-edit-dialog .wine-editor-fact,#wine-edit-dialog .wine-editor-facts>div{gap:8px;padding:12px 10px;font-size:12px}
 #wine-edit-dialog .wine-editor-fact strong{font-size:14px}
 #wine-edit-dialog .wine-editor-status{gap:12px}
 #wine-edit-dialog .wine-editor-footer{padding:12px 18px}
 #wine-edit-dialog .wine-editor-vintage-fields{grid-template-columns:90px auto;}
 #wine-edit-dialog .wine-editor-discount{gap:12px}
}
/* Focused POS inbox: compact work list, large per-product editor. */
.staff-workspace #pos-batch-panel .pos-list-footer{display:none}
.staff-workspace #pos-batch-panel #pos-batch-rows{display:block;margin-top:18px}
.staff-workspace #pos-batch-panel .pos-inbox-row{padding:19px 0;border-bottom:1px solid #e6ebf1;min-width:0}
.pos-inbox-name{display:block;color:#1e3556;font-size:16px;line-height:1.5;font-weight:600;overflow-wrap:break-word}
.staff-workspace #pos-batch-panel .pos-inbox-meta{font-size:12px;color:#748092;margin:3px 0 0}
.pos-inbox-row-action{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:12px}
.staff-workspace #pos-batch-panel .pos-inbox-task{font-size:13px;color:#975c32;margin:0;line-height:1.5}
.staff-workspace #pos-batch-panel [data-tone=ready] .pos-inbox-task,.staff-workspace #pos-batch-panel .pos-inbox-proof{color:#28745b;font-size:12px}
.staff-workspace #pos-batch-panel [data-tone=working] .pos-inbox-task,.staff-workspace #pos-batch-panel [data-tone=done] .pos-inbox-task{color:#66758a}
.staff-workspace #pos-batch-panel .pos-inbox-row-action>.btn{flex-shrink:0;min-height:44px;height:auto;padding:10px 14px;border:0;border-radius:11px;background:#f0f3f7;color:#1e3556;font-size:13px}
.staff-workspace #pos-batch-panel .pos-inbox-row-action>.primary{background:#1e3556;color:#fff}
.pos-inbox-finished{border-top:1px solid #e6ebf1;margin-top:22px}
.staff-workspace #pos-batch-panel .pos-inbox-finished-toggle{display:flex;width:100%;justify-content:space-between;align-items:center;text-align:left;background:transparent;border:0;color:#66758a;padding:14px 0;min-height:48px;height:auto;font-size:13px}
.pos-inbox-finished-toggle:after{content:'⌄'}.pos-inbox-finished-toggle[aria-expanded=true]:after{content:'⌃'}
.staff-workspace #pos-inbox-dialog{padding:0;border:0;border-radius:22px;width:600px;max-width:calc(100% - 40px);height:auto;max-height:calc(var(--app-height,100vh) - 60px);background:#fff;color:#263b58;overflow:hidden}
#pos-inbox-dialog[open]{display:flex;flex-direction:column}
#pos-inbox-dialog::backdrop{background:rgba(22,32,51,.45)}
.pos-inbox-detail-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 26px;border-bottom:1px solid #e6ebf1;flex-shrink:0}
#pos-inbox-title{margin:0;font-size:18px;color:#1e3556}
#pos-inbox-dialog .pos-inbox-close{background:transparent;border:0;color:#66758a;min-height:44px;padding:8px;font-size:14px}
.pos-inbox-detail-body{overflow:auto;min-height:0;padding:26px;-webkit-overflow-scrolling:touch}
.pos-inbox-detail-task{font-size:23px;line-height:1.45;letter-spacing:-.6px;font-weight:650;color:#1e3556;margin:0 0 22px}
.pos-inbox-detail-task[data-tone=done]{color:#28745b}
#pos-inbox-dialog .pos-batch-row{display:block;padding:0;border:0;background:transparent}
#pos-inbox-dialog .pos-batch-header{display:block}
#pos-inbox-dialog .pos-batch-header strong{font-size:20px;line-height:1.5;color:#1e3556}
#pos-inbox-dialog .pos-batch-choice{margin:0;display:block}
#pos-inbox-dialog .pos-batch-status{display:none}
#pos-inbox-dialog .pos-batch-meta{font-size:13px;color:#66758a;line-height:1.7;margin:9px 0 22px;overflow-wrap:break-word}
#pos-inbox-dialog .pos-batch-reason{margin:12px 0;padding:12px 14px;background:#fbf4ee;border-radius:11px;color:#8a5839;font-size:13px;line-height:1.65;overflow-wrap:break-word}
#pos-inbox-dialog .pos-batch-fields{display:block;margin-top:20px}
#pos-inbox-dialog .pos-batch-field{display:block;width:100%;max-width:none;margin:16px 0;font-size:13px;color:#66758a}
#pos-inbox-dialog .pos-batch-field select,#pos-inbox-dialog .pos-batch-field input{display:block;margin-top:8px;width:100%;min-width:0;min-height:48px;font-size:16px;padding:12px;border:1px solid #dce3ec;border-radius:11px;background:#fff;color:#263b58}
#pos-inbox-dialog .pos-batch-actions{display:flex;flex-direction:column;gap:10px;margin:20px 0 0}
#pos-inbox-dialog .btn{border-radius:11px;min-height:44px;height:auto;font-size:14px;white-space:normal}
#pos-inbox-dialog .pos-inbox-primary{display:block;width:100%;margin-top:26px;min-height:52px;background:#1e3556;color:white;font-size:16px;border:0}
#pos-inbox-dialog .pos-batch-review{font-size:13px;align-items:flex-start;line-height:1.6;margin:18px 0}
#pos-inbox-dialog .pos-batch-review input{flex-shrink:0;margin-top:5px;width:18px;height:18px}
.pos-inbox-more{border-top:1px solid #e6ebf1;margin-top:24px;padding-top:8px}
.pos-inbox-more>summary{padding:12px 0;font-size:13px;color:#748092}
.pos-inbox-error{color:#a44743;line-height:1.6;font-size:13px;overflow-wrap:break-word;margin:16px 0 0}
.pos-inbox-error:empty{display:none}
@media(max-width:700px){.staff-workspace #pos-inbox-dialog{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;transform:none;border-radius:0;width:100%;max-width:none;height:var(--app-height,100vh);max-height:var(--app-height,100vh)}.pos-inbox-detail-head{padding:calc(12px + env(safe-area-inset-top)) 22px 12px}.pos-inbox-detail-body{padding:24px 22px calc(28px + env(safe-area-inset-bottom))}.pos-inbox-detail-task{font-size:24px}.staff-workspace #pos-batch-panel .pos-inbox-row-action>.btn{padding:10px 12px}.pos-inbox-row-action{gap:10px}}
/* Searchable existing importers; free entry uses the same confirmed save. */
#pos-inbox-dialog .pos-importer-choices{grid-column:1/-1;max-height:220px;overflow-y:auto;border:1px solid var(--border,#dbe2ec);border-radius:12px;padding:4px;}
#pos-inbox-dialog .pos-importer-option{display:block;width:100%;min-height:44px;text-align:left;margin:0;border:0;border-radius:6px;background:transparent;color:inherit;font-size:14px;}
#pos-inbox-dialog .pos-importer-option:hover,#pos-inbox-dialog .pos-importer-option:focus{background:rgba(128,145,170,.14);}
#pos-inbox-dialog .pos-importer-choices p{font-size:13px;margin:10px;}
.pos-category-picker{min-width:0;position:relative}.pos-category-picker>label{margin:0;font:inherit;color:inherit}
.pos-category-options{position:absolute;top:100%;left:0;right:0;z-index:5;margin-top:6px;max-height:224px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #dce3ec;border-radius:11px;padding:4px;background:#fff;color:#263b58;box-shadow:0 6px 18px #172b4820}
#pos-inbox-dialog .pos-category-option{display:block;width:100%;min-height:44px;margin:0;padding:10px 12px;text-align:left;font-size:15px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;border:0;border-radius:7px;background:transparent;color:inherit}
#pos-inbox-dialog .pos-category-option:hover,#pos-inbox-dialog .pos-category-option:focus,#pos-inbox-dialog .pos-category-option[aria-selected=true]{background:rgba(128,145,170,.16)}
.pos-category-options p{margin:10px;font-size:13px;line-height:1.6}
html[data-staff-theme=dark] .pos-category-options{background:#18283e;color:#e5eaf2;border-color:#42536c}
html[data-staff-theme=dark] #pos-inbox-dialog .pos-category-option{background:transparent;color:#e5eaf2;border-color:transparent}
html[data-staff-theme=dark] #pos-inbox-dialog .pos-category-option:hover,html[data-staff-theme=dark] #pos-inbox-dialog .pos-category-option[aria-selected=true]{background:#30435f}
/* Wine management: use the available screen rather than a small embedded book. */
body.wine-fullscreen-open{overflow:hidden;}
.staff-workspace #wine-management-card.wine-fullscreen{position:fixed;z-index:1100;top:0;left:0;right:0;bottom:0;width:100%;height:var(--app-height,100vh);max-width:none;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;overflow:auto;background:var(--paper,#fff);}
.wine-fullscreen-head{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-bottom:1px solid var(--line,#dbe2ec);flex-shrink:0;}
.wine-fullscreen-head h2{font-size:20px;margin:0;}
.wine-fullscreen-head .btn{min-height:44px;}
#wine-management-card.wine-fullscreen>.card-padding{flex-shrink:0;}
#wine-management-card.wine-fullscreen .wine-book{flex:1;min-height:180px;height:auto;max-height:none;grid-template-columns:170px minmax(0,1fr);}
#wine-management-card.wine-fullscreen>.list-pager{flex-shrink:0;padding:8px 18px;padding-bottom:max(8px,env(safe-area-inset-bottom));}
#wine-management-card.wine-fullscreen .wine-paper{padding:24px 32px;}
@media(max-width:700px){
 .wine-fullscreen-head{padding:8px 14px;}
 #wine-management-card.wine-fullscreen .wine-toolbar{display:flex;flex-wrap:wrap;gap:8px;}
 #wine-management-card.wine-fullscreen .wine-toolbar>div{min-width:0;flex:1 1 130px;}
 #wine-management-card.wine-fullscreen .wine-toolbar .actions{flex:1 1 100%;margin:0;justify-content:flex-end;}
 #wine-management-card.wine-fullscreen .wine-toolbar input,#wine-management-card.wine-fullscreen .wine-toolbar select{width:100%;min-width:0;}
 #wine-management-card.wine-fullscreen .wine-book{display:flex;flex-direction:column;}
 #wine-management-card.wine-fullscreen #wine-page-nav{display:flex;flex:0 0 auto;gap:4px;padding:6px 8px;overflow-x:auto;white-space:nowrap;border:0;}
 #wine-management-card.wine-fullscreen .wine-nav-group{display:none;}
 #wine-management-card.wine-fullscreen .wine-nav-item{width:auto;flex-shrink:0;min-height:44px;padding:10px;font-size:12px;}
 #wine-management-card.wine-fullscreen .wine-paper{flex:1;min-height:0;padding:16px;}
}
/* Keep publishing accessible while showing the original wine-book layout. */
#wine-management-card.wine-fullscreen .wine-toolbar .actions{display:none;}
.wine-manage-publish{flex-shrink:0;border-top:1px solid var(--line,#dbe2ec);padding:8px 16px;padding-bottom:max(8px,env(safe-area-inset-bottom));background:var(--paper,#fff);}
.wine-manage-publish .btn{width:100%;min-height:44px;}
.wine-manage-publish #wine-menu-status{font-size:12px;margin:0 0 4px;max-height:36px;overflow:auto;}
html[data-staff-theme=dark]{color-scheme:dark;--bg:#101b2b;--paper:#18263a;--text:#e5eaf2;--muted:#a5b3c6;--line:#34445b;--navy:#d8e4f5;--beige:#e3d4b9;--beige-soft:#26354b;--navy-soft:#263b55;}
html[data-staff-theme=dark] body.staff-workspace{background:#101b2b!important;color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .topbar,
html[data-staff-theme=dark] .staff-workspace .card,
html[data-staff-theme=dark] .staff-workspace dialog,
html[data-staff-theme=dark] .staff-workspace .account-actions,
html[data-staff-theme=dark] .staff-workspace .work-nav,
html[data-staff-theme=dark] .staff-workspace .workspace-tabs,
html[data-staff-theme=dark] .staff-workspace .wine-fullscreen-head,
html[data-staff-theme=dark] .staff-workspace .wine-manage-publish,
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen,
html[data-staff-theme=dark] .staff-workspace #pos-inbox-dialog,
html[data-staff-theme=dark] .staff-workspace .pos-review-dialog,
html[data-staff-theme=dark] .staff-workspace .journey-header,
html[data-staff-theme=dark] .staff-workspace .journey-body,
html[data-staff-theme=dark] .staff-workspace .journey-footer,
html[data-staff-theme=dark] .staff-workspace .intake-immersive,
html[data-staff-theme=dark] .staff-workspace .journey-sheet,
html[data-staff-theme=dark] .staff-workspace .intake-values,
html[data-staff-theme=dark] .staff-workspace .count-sheet-head,
html[data-staff-theme=dark] .staff-workspace .count-batch-bar{background:#18263a!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace input,
html[data-staff-theme=dark] .staff-workspace select,
html[data-staff-theme=dark] .staff-workspace textarea,
html[data-staff-theme=dark] .staff-workspace .btn,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-row-action>.btn,
html[data-staff-theme=dark] .staff-workspace .pos-importer-option{background:#22334b!important;color:#e5eaf2!important;border-color:#42536c!important;}
html[data-staff-theme=dark] .staff-workspace input::placeholder,
html[data-staff-theme=dark] .staff-workspace textarea::placeholder{color:#a5b3c6!important;}
html[data-staff-theme=dark] .staff-workspace .btn.primary,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-row-action>.primary,
html[data-staff-theme=dark] .staff-workspace .workspace-tab[aria-pressed=true],
html[data-staff-theme=dark] .staff-workspace .count-toc-link[aria-current=page]{background:#3c587d!important;color:#fff!important;border-color:#577399!important;}
html[data-staff-theme=dark] .staff-workspace .btn:hover:enabled,
html[data-staff-theme=dark] .staff-workspace .wine-page-edit:hover,
html[data-staff-theme=dark] .staff-workspace .wine-nav-item:hover{background:#304764!important;color:#f0f4fa!important;}
html[data-staff-theme=dark] .staff-workspace .pos-inbox-name,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-detail-head,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-detail-task,
html[data-staff-theme=dark] .staff-workspace .wine-page-korean,
html[data-staff-theme=dark] .staff-workspace .wine-page-price,
html[data-staff-theme=dark] .staff-workspace .wine-page-vintage,
html[data-staff-theme=dark] .staff-workspace .app-title strong,
html[data-staff-theme=dark] .staff-workspace h1,
html[data-staff-theme=dark] .staff-workspace h2,
html[data-staff-theme=dark] .staff-workspace h3,
html[data-staff-theme=dark] .staff-workspace label,
html[data-staff-theme=dark] .staff-workspace summary{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .muted,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-meta,
html[data-staff-theme=dark] .staff-workspace .pos-batch-meta,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-finished-toggle,
html[data-staff-theme=dark] .staff-workspace .wine-page-english,
html[data-staff-theme=dark] .staff-workspace .wine-manage-flags,
html[data-staff-theme=dark] .staff-workspace .wine-page-grapes{color:#a5b3c6!important;}
html[data-staff-theme=dark] .staff-workspace .pos-inbox-task,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-detail-task[data-tone=attention]{color:#efbf84!important;}
html[data-staff-theme=dark] .staff-workspace [data-tone=ready] .pos-inbox-task,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-proof,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-detail-task[data-tone=ready]{color:#87d5ad!important;}
html[data-staff-theme=dark] .staff-workspace .pos-inbox-error,
html[data-staff-theme=dark] .staff-workspace .error,
html[data-staff-theme=dark] .staff-workspace .pos-batch-reason{color:#f0a2a8!important;}
html[data-staff-theme=dark] .staff-workspace .quantity,
html[data-staff-theme=dark] .staff-workspace .badge,
html[data-staff-theme=dark] .staff-workspace .demo-pill,
html[data-staff-theme=dark] .staff-workspace .attachment-field,
html[data-staff-theme=dark] .staff-workspace #intake-stock-card,
html[data-staff-theme=dark] .staff-workspace .intake-stage-summary,
html[data-staff-theme=dark] .staff-workspace .intake-final-total,
html[data-staff-theme=dark] .staff-workspace .journey-list-row,
html[data-staff-theme=dark] .staff-workspace .invoice-wine-candidate,
html[data-staff-theme=dark] .staff-workspace .status-row,
html[data-staff-theme=dark] .staff-workspace th,
html[data-staff-theme=dark] .staff-workspace .wine-paper,
html[data-staff-theme=dark] .staff-workspace .wine-book{background:#203149!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .wine-page-row,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-row,
html[data-staff-theme=dark] .staff-workspace td,
html[data-staff-theme=dark] .staff-workspace .section-head,
html[data-staff-theme=dark] .staff-workspace .wine-page-heading{border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-page-korean,
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-page-vintage,
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-page-price{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-page-english{color:#a5b3c6!important;}
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-paper,
html[data-staff-theme=dark] .staff-workspace #wine-management-card.wine-fullscreen .wine-book{background:#18263a!important;}
html[data-staff-theme=dark] .staff-workspace .pos-inbox-row-action>.btn,
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-inbox-row-action>.btn{background:#263d59!important;color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-inbox-task{color:#efbf84!important;}
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel [data-tone=ready] .pos-inbox-task,
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-inbox-proof{color:#87d5ad!important;}
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-inbox-meta{color:#a5b3c6!important;}
.staff-workspace .header-inner #staff-theme-toggle{margin-left:auto;margin-right:10px;min-height:40px;padding:8px 10px;font-size:12px;white-space:nowrap;}
/* Wine editor: clear groups and readable mobile controls. */
#wine-edit-dialog .wine-editor-head{padding:18px 20px 14px;}
#wine-edit-dialog #wine-edit-title{font-size:13px;color:var(--muted);font-weight:500;}
#wine-edit-dialog #wine-edit-name{font-size:19px;font-weight:650;line-height:1.5;margin-top:10px;color:var(--text);}
#wine-edit-dialog .sales-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:10px 16px;border-bottom:1px solid var(--line);}
#wine-edit-dialog .sales-tabs button{min-height:48px;margin:0;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);font-size:14px;font-weight:600;}
#wine-edit-dialog .sales-tabs button[aria-pressed=true]{background:#1e3556;color:#fff;border-color:#1e3556;}
#wine-edit-dialog #wine-editor-body{padding:16px;background:var(--bg);}
#wine-edit-dialog .wine-editor-section,#wine-edit-dialog .wine-editor-columns>.wine-editor-section+.wine-editor-section{background:var(--paper,#fff);border:1px solid var(--line);border-radius:12px;padding:16px;margin:0 0 14px;}
#wine-edit-dialog .wine-editor-columns{display:block;}
#wine-edit-dialog .wine-editor-section h3{font-size:15px;font-weight:650;margin-bottom:12px;}
#wine-edit-dialog .wine-price-reference>summary{font-size:14px;font-weight:600;cursor:pointer;min-height:36px;}
#wine-edit-dialog .wine-price-reference[open]>summary{margin-bottom:12px;}
#wine-edit-dialog .check-label{min-height:48px;display:flex;align-items:center;gap:10px;font-size:15px;}
#wine-edit-dialog input[type=checkbox]{width:22px;height:22px;flex-shrink:0;}
#wine-edit-dialog .wine-editor-footer{background:var(--paper,#fff);padding:12px 16px;}
#wine-edit-dialog .wine-editor-footer .actions{gap:10px;}
#wine-edit-dialog .wine-editor-footer .btn{margin:0;}
#wine-edit-dialog #wine-edit-save{flex:1;min-height:48px;}
@media(max-width:600px){
 .staff-workspace #wine-edit-dialog{width:100%;max-width:100%;height:var(--app-height,100vh);max-height:var(--app-height,100vh);margin:0;border:0;border-radius:0;}
 #wine-edit-dialog .sales-tabs{grid-template-columns:repeat(2,minmax(0,1fr));}
 #wine-edit-dialog .wine-editor-price{grid-template-columns:minmax(0,1fr) 90px;gap:10px;}
 #wine-edit-dialog .wine-editor-rate{padding-left:10px;}
 #wine-edit-dialog .wine-editor-status{display:block;}
 #wine-edit-dialog .wine-editor-visibility{text-align:left;border-top:1px solid var(--line);padding-top:14px;margin-top:14px;}
 #wine-edit-dialog .wine-editor-inline{grid-template-columns:1fr;}
 #wine-edit-dialog .wine-editor-fact,#wine-edit-dialog .wine-editor-facts>div{grid-template-columns:minmax(70px,1fr) auto;}
 #wine-edit-dialog #sales-midpoint-apply{grid-column:1/-1;width:100%;}
}
html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-head,html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-section,html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-footer{background:#18263a!important;color:#e5eaf2!important;border-color:#34445b;}
html[data-staff-theme=dark] #wine-edit-dialog .sales-tabs button{background:#22334b;color:#e5eaf2;border-color:#42536c;}
html[data-staff-theme=dark] #wine-edit-dialog .sales-tabs button[aria-pressed=true]{background:#45658e;color:#fff;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-facts>div,html[data-staff-theme=dark] #wine-edit-dialog .wine-note-preview-box{background:#203149;color:#e5eaf2;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-rate output,html[data-staff-theme=dark] #wine-edit-dialog .wine-editor-fact>span:first-child{color:#c8d6e8;}
.pos-inbox-screen-head{display:none;}
body.pos-inbox-fullscreen-open{overflow:hidden;}
.staff-workspace #pos-batch-panel.pos-inbox-fullscreen{position:fixed;z-index:1100;top:0;left:0;right:0;bottom:0;width:100%;height:var(--app-height,100vh);max-width:none;margin:0;border:0;border-radius:0;padding:0 16px 20px;overflow:auto;background:var(--paper,#fff);}
#pos-batch-panel.pos-inbox-fullscreen>.pos-inbox-screen-head{display:flex;position:sticky;top:0;z-index:2;background:var(--paper,#fff);margin:0 -16px 12px;}
#pos-batch-panel.pos-inbox-fullscreen>summary{display:none;}
.wine-management-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.wine-management-choice{min-height:100px;font-size:18px;border-radius:14px;}
.wine-management-choices[hidden]{display:none;}

/* Dark mode: receipt, intake, inventory and POS detail surfaces. */
html[data-staff-theme=dark] .staff-workspace #intake-history .receipt-history-open,
html[data-staff-theme=dark] .staff-workspace #detail-dialog,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-header,
html[data-staff-theme=dark] .staff-workspace #detail-photo-dialog,
html[data-staff-theme=dark] .staff-workspace #intake-form.intake-journey[data-open=true],
html[data-staff-theme=dark] .staff-workspace .intake-save-actions,
html[data-staff-theme=dark] .staff-workspace .journey-footer,
html[data-staff-theme=dark] .staff-workspace .archive-block,
html[data-staff-theme=dark] .staff-workspace .count-book,
html[data-staff-theme=dark] .staff-workspace #inventory-list-dialog .actions,
html[data-staff-theme=dark] .staff-workspace #ocr-panel,
html[data-staff-theme=dark] .staff-workspace .grape-options,
html[data-staff-theme=dark] .staff-workspace .wine-note-editor,
html[data-staff-theme=dark] .staff-workspace .wine-editor-head,
html[data-staff-theme=dark] .staff-workspace .wine-editor-footer,
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-batch-row,
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-batch-done{background:#18263a!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .receipt-detail-amounts,
html[data-staff-theme=dark] .staff-workspace #detail-photo-panel,
html[data-staff-theme=dark] .staff-workspace .journey-row-number,
html[data-staff-theme=dark] .staff-workspace .journey-messages,
html[data-staff-theme=dark] .staff-workspace .intake-product-choice,
html[data-staff-theme=dark] .staff-workspace #wine-photo-identity,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-result-details,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-result-notices,
html[data-staff-theme=dark] .staff-workspace .invoice-field-review,
html[data-staff-theme=dark] .staff-workspace #ocr-panel .invoice-label-row,
html[data-staff-theme=dark] .staff-workspace .count-stepper,
html[data-staff-theme=dark] .staff-workspace .count-stepper button,
html[data-staff-theme=dark] .staff-workspace .close-step,
html[data-staff-theme=dark] .staff-workspace .grape-chip,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-result,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-issue,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-row,
html[data-staff-theme=dark] .staff-workspace .wine-editor-facts>div,
html[data-staff-theme=dark] .staff-workspace .wine-note-preview-box{background:#203149!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace #detail-product,
html[data-staff-theme=dark] .staff-workspace #detail-dialog .receipt-detail-rows dd,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-metrics dd,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-total>strong,
html[data-staff-theme=dark] .staff-workspace #pos-inbox-dialog .pos-batch-header strong,
html[data-staff-theme=dark] .staff-workspace .intake-product-choice strong,
html[data-staff-theme=dark] .staff-workspace .invoice-wine-candidate strong,
html[data-staff-theme=dark] .staff-workspace .journey-list-row strong,
html[data-staff-theme=dark] .staff-workspace .journey-row-name,
html[data-staff-theme=dark] .staff-workspace .wine-result-identity>strong,
html[data-staff-theme=dark] .staff-workspace .wine-result-details dd,
html[data-staff-theme=dark] .staff-workspace .count-stepper input,
html[data-staff-theme=dark] .staff-workspace .count-stepper button,
html[data-staff-theme=dark] .staff-workspace .grape-chip button,
html[data-staff-theme=dark] .staff-workspace .grape-options button{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .receipt-history-date,
html[data-staff-theme=dark] .staff-workspace #detail-dialog .receipt-detail-rows dt,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-metrics dt,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-total>span,
html[data-staff-theme=dark] .staff-workspace #detail-completion,
html[data-staff-theme=dark] .staff-workspace .receipt-photo-expand,
html[data-staff-theme=dark] .staff-workspace #detail-photo-empty,
html[data-staff-theme=dark] .staff-workspace .receipt-photo-tabs button,
html[data-staff-theme=dark] .staff-workspace .pos-batch-status,
html[data-staff-theme=dark] .staff-workspace .journey-estimate-label,
html[data-staff-theme=dark] .staff-workspace .wine-result-details dt,
html[data-staff-theme=dark] .staff-workspace .wine-result-notices,
html[data-staff-theme=dark] .staff-workspace .wine-editor-facts span,
html[data-staff-theme=dark] .staff-workspace .wine-editor-status,
html[data-staff-theme=dark] .staff-workspace .wine-editor-rate output{color:#b5c2d4!important;}
html[data-staff-theme=dark] .staff-workspace #intake-history .receipt-history-open:hover,
html[data-staff-theme=dark] .staff-workspace .receipt-photo-tabs button[aria-selected=true],
html[data-staff-theme=dark] .staff-workspace #ocr-panel .invoice-label-row.is-selected,
html[data-staff-theme=dark] .staff-workspace .close-step.is-current,
html[data-staff-theme=dark] .staff-workspace .grape-options button:hover{background:#304764!important;color:#f0f4fa!important;border-color:#6584aa!important;}
html[data-staff-theme=dark] .staff-workspace .receipt-history-cancelled,
html[data-staff-theme=dark] .staff-workspace #detail-state,
html[data-staff-theme=dark] .staff-workspace #detail-attention,
html[data-staff-theme=dark] .staff-workspace #pos-inbox-dialog .pos-batch-reason,
html[data-staff-theme=dark] .staff-workspace .wine-identity-warning,
html[data-staff-theme=dark] .staff-workspace .stock-warning{background:#3c2937!important;color:#f5b4bb!important;border-color:#865461!important;}
html[data-staff-theme=dark] .staff-workspace #detail-cancel-note,
html[data-staff-theme=dark] .staff-workspace #detail-dialog #image-error,
html[data-staff-theme=dark] .staff-workspace #detail-photo-error,
html[data-staff-theme=dark] .staff-workspace .wine-identity-warning strong,
html[data-staff-theme=dark] .staff-workspace .wine-identity-warning p{color:#f5b4bb!important;}
html[data-staff-theme=dark] .staff-workspace #detail-completion a,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-header button,
html[data-staff-theme=dark] .staff-workspace .wine-result-details a{color:#b9d7ff!important;}
html[data-staff-theme=dark] .staff-workspace .receipt-detail-total,
html[data-staff-theme=dark] .staff-workspace #detail-extra,
html[data-staff-theme=dark] .staff-workspace #detail-completion,
html[data-staff-theme=dark] .staff-workspace .receipt-photo-tabs,
html[data-staff-theme=dark] .staff-workspace .receipt-detail-header,
html[data-staff-theme=dark] .staff-workspace .pos-batch-header,
html[data-staff-theme=dark] .staff-workspace .pos-inbox-more,
html[data-staff-theme=dark] .staff-workspace .count-stepper{border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace button:focus-visible{outline:2px solid #a6c8f3;outline-offset:2px;}

html[data-staff-theme=dark] .staff-workspace #wine-create-form>.actions,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-catalog-footer{background:#18263a!important;color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .intake-landing-icon,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-catalog-input,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-match,
html[data-staff-theme=dark] .staff-workspace .journey-success{background:#203149!important;color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .intake-journey #selected-product-name,
html[data-staff-theme=dark] .staff-workspace .wine-analysis-progress strong,
html[data-staff-theme=dark] .staff-workspace .journey-progress-label,
html[data-staff-theme=dark] .staff-workspace .journey-panel h2,
html[data-staff-theme=dark] .staff-workspace .wine-search-stage,
html[data-staff-theme=dark] .staff-workspace .journey-list-row .journey-row-name{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .invoice-wine-candidate span,
html[data-staff-theme=dark] .staff-workspace .invoice-wine-candidate small,
html[data-staff-theme=dark] .staff-workspace #invoice-wine-matches>p,
html[data-staff-theme=dark] .staff-workspace .wine-analysis-progress small,
html[data-staff-theme=dark] .staff-workspace #wine-photo-identity small,
html[data-staff-theme=dark] .staff-workspace #wine-find-status,
html[data-staff-theme=dark] .staff-workspace .journey-rotating,
html[data-staff-theme=dark] .staff-workspace .journey-header button{color:#b5c2d4!important;}
html[data-staff-theme=dark] body.intake-immersive dialog::backdrop{background:#101b2b!important;}

/* Tokens must be defined on body too: workspace defines its own light tokens. */
html[data-staff-theme=dark] body.staff-workspace{--bg:#101b2b;--paper:#18263a;--text:#e5eaf2;--muted:#b5c2d4;--line:#34445b;--navy:#d8e4f5;--beige:#e3d4b9;--beige-soft:#26354b;--navy-soft:#263b55;}
html[data-staff-theme=dark] .staff-workspace #wine-edit-dialog .sales-tabs{background:#18263a;border-color:#34445b;}
html[data-staff-theme=dark] .staff-workspace #wine-edit-name{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .wine-editor-rate label{color:#b5c2d4!important;}

html[data-staff-theme=dark] .staff-workspace .list-pager{background:#18263a!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .close-step-title strong,
html[data-staff-theme=dark] .staff-workspace .status-text strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .close-step-status{color:#b5c2d4!important;}

/* Populated stocktake rows and category controls (not just the empty page). */
html[data-staff-theme=dark] .staff-workspace .count-wine-name strong,
html[data-staff-theme=dark] .staff-workspace #count-progress{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .count-line small,
html[data-staff-theme=dark] .staff-workspace .count-toc-arrow{color:#b5c2d4!important;}
html[data-staff-theme=dark] .staff-workspace .count-toc-link,
html[data-staff-theme=dark] .staff-workspace #count-nav{background:#22334b!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .count-toc-link[aria-current=page],
html[data-staff-theme=dark] .staff-workspace .count-section-link[aria-current=page],
html[data-staff-theme=dark] .staff-workspace .count-category[aria-current=page]{background:#3c587d!important;color:#fff!important;}
html[data-staff-theme=dark] .staff-workspace .count-toc-link:hover,
html[data-staff-theme=dark] .staff-workspace .count-section-link:hover{background:#304764!important;color:#fff!important;}
html[data-staff-theme=dark] .staff-workspace .count-line{border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .count-save-error{color:#f5b4bb!important;}
html[data-staff-theme=dark] .staff-workspace #count-review{background:#203149!important;color:#e5eaf2!important;}

/* Stock lookup: populated rows and sales status. */
html[data-staff-theme=dark] .staff-workspace .staff-stock-name strong,
html[data-staff-theme=dark] .staff-workspace .staff-stock-amount strong,
html[data-staff-theme=dark] .staff-workspace .stock-status-cell strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .staff-stock-name small,
html[data-staff-theme=dark] .staff-workspace .staff-stock-detail,
html[data-staff-theme=dark] .staff-workspace .stock-status-cell span{color:#b5c2d4!important;}
html[data-staff-theme=dark] .staff-workspace .staff-stock-amount.stock-unknown strong,
html[data-staff-theme=dark] .staff-workspace #stock-error,
html[data-staff-theme=dark] .staff-workspace #listing-error,
html[data-staff-theme=dark] .staff-workspace #report-edit-error{color:#f5b4bb!important;}
html[data-staff-theme=dark] .staff-workspace .stock-status{background:#203149!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .staff-stock-row,
html[data-staff-theme=dark] .staff-workspace .stock-status-cell{border-color:#34445b!important;}

/* Phone navigation stays within thumb reach; immersive tasks remain above it. */
@media(max-width:700px){
 body.staff-workspace{--mobile-nav-height:calc(64px + env(safe-area-inset-bottom,0px));}
 body.staff-workspace .work-nav{position:fixed;top:auto;bottom:0;left:0;right:0;width:100%;height:var(--mobile-nav-height);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));margin:0;border:0;border-top:1px solid var(--line);box-shadow:0 -3px 16px rgba(0,0,0,.06);z-index:40;}
 body.staff-workspace .work-nav .btn{min-width:0;min-height:48px;height:48px;margin:0;padding:6px 2px;text-align:center;font-size:12px;line-height:1.4;white-space:nowrap;border-radius:10px;}
 body.staff-workspace .shell{padding-bottom:calc(var(--mobile-nav-height) + 28px);}
 body.staff-workspace #stocktake-card{--count-top:58px;}
 body.staff-workspace .count-batch-bar{bottom:var(--mobile-nav-height);}
 body.staff-workspace #staff-stock-card,body.staff-workspace #pos-batch-panel{scroll-margin-top:70px;}
 html[data-staff-theme=dark] body.staff-workspace .work-nav .btn[aria-current=page]{background:#3c587d!important;color:#fff!important;}
}

/* Shared typography in populated tables, links, and expanded management panels. */
html[data-staff-theme=dark] .staff-workspace .shell td{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .shell a:not(.btn),
html[data-staff-theme=dark] .staff-workspace dialog a:not(.btn){color:#b9d7ff!important;}
html[data-staff-theme=dark] .staff-workspace .display-row small,
html[data-staff-theme=dark] .staff-workspace .report-file-date,
html[data-staff-theme=dark] .staff-workspace .sales-connection-summary span,
html[data-staff-theme=dark] .staff-workspace .status-detail{color:#b5c2d4!important;}
html[data-staff-theme=dark] .staff-workspace .display-row{border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .close-step-body p,
html[data-staff-theme=dark] .staff-workspace .report-file-info strong,
html[data-staff-theme=dark] .staff-workspace .sales-connection-summary strong,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body>div:first-child>strong,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body h4{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .sales-connection-summary,
html[data-staff-theme=dark] .staff-workspace #report-message:not(:empty){background:#203149!important;color:#e5eaf2!important;border-color:#34445b!important;}
html[data-staff-theme=dark] .staff-workspace .ledger-row-meta,
html[data-staff-theme=dark] .staff-workspace .ledger-metrics span,
html[data-staff-theme=dark] .staff-workspace .ledger-issue-meta,
html[data-staff-theme=dark] .staff-workspace .ledger-selected,
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-issue p,
html[data-staff-theme=dark] .staff-workspace .ledger-result-note,
html[data-staff-theme=dark] .staff-workspace .ledger-row>small{color:#b5c2d4!important;}
html[data-staff-theme=dark] .staff-workspace .ledger-simple>strong,
html[data-staff-theme=dark] .staff-workspace .ledger-difference .ledger-metrics>div:last-child strong,
html[data-staff-theme=dark] .staff-workspace .ledger-issue>small{color:#f5b4bb!important;}
html[data-staff-theme=dark] .staff-workspace [role=alert],
html[data-staff-theme=dark] .staff-workspace #user-error,
html[data-staff-theme=dark] .staff-workspace #product-error,
html[data-staff-theme=dark] .staff-workspace #password-error{color:#f5b4bb!important;}

html[data-staff-theme=dark] .staff-workspace #sales-bottle-rate-label,
html[data-staff-theme=dark] .staff-workspace #wine-price-rate-label{color:#b5c2d4!important;}

html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-row>strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #monthly-intake-body .ledger-status{color:#b5c2d4!important;}

/* Receiving stages: loading, invoice name, item rows and final totals. */
html[data-staff-theme=dark] .staff-workspace .journey-processing,
html[data-staff-theme=dark] .staff-workspace .journey-percent,
html[data-staff-theme=dark] .staff-workspace .journey-invoice-name,
html[data-staff-theme=dark] .staff-workspace .journey-row-content strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace .journey-header>span,
html[data-staff-theme=dark] .staff-workspace .journey-row-content>span,
html[data-staff-theme=dark] .staff-workspace .journey-text-button,
html[data-staff-theme=dark] .staff-workspace .journey-eyebrow,
html[data-staff-theme=dark] .staff-workspace .journey-choice-help,
html[data-staff-theme=dark] .staff-workspace .journey-subtitle,
html[data-staff-theme=dark] .staff-workspace .intake-final-total>span{color:#b5c2d4!important;}

/* Compact sun/moon theme control, retaining a full touch target. */
.staff-workspace .header-inner #staff-theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;flex-shrink:0;}
#staff-theme-toggle svg{display:block;pointer-events:none;}

/* Wine management landing: two centered, sequential actions. */
.staff-workspace .wine-management-choices{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:44px;min-height:calc(var(--app-height,100vh) - 230px);padding:40px 20px 56px;}
.staff-workspace .wine-management-choices[hidden]{display:none;}
.wine-management-action{width:100%;max-width:340px;text-align:center;}
.staff-workspace .wine-management-action h2{margin:0 0 10px;font-size:24px;line-height:1.4;color:var(--text);letter-spacing:-.7px;}
.wine-management-action p{margin:0 0 24px;font-size:14px;line-height:1.6;color:var(--muted);word-break:keep-all;}
.staff-workspace .wine-management-choice{width:100%;min-height:56px;padding:14px 20px;font-size:17px;border-radius:14px;}
@media(max-width:700px){.staff-workspace .wine-management-choices{min-height:calc(var(--app-height,100vh) - 240px);padding:28px 16px 36px;gap:40px;}.staff-workspace .wine-management-action h2{font-size:23px;}}

/* Match the compact account control in the header. */
.staff-workspace .header-inner #staff-theme-toggle{width:34px;min-width:34px;height:34px;min-height:34px;margin-right:8px;border-radius:6px;}
.staff-workspace .header-inner #staff-theme-toggle svg{width:18px;height:18px;}
.staff-workspace .header-inner .account-menu>summary{box-sizing:border-box;display:flex;align-items:center;height:34px;min-height:34px;padding-top:0;padding-bottom:0;}
@media(max-width:700px){.staff-workspace .header-inner #staff-theme-toggle{width:32px;min-width:32px;height:32px;min-height:32px;}.staff-workspace .header-inner .account-menu>summary{height:32px;min-height:32px;}}

/* Thumb-accessible close controls in full-screen management. */
.wine-manage-publish{display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,2fr);gap:8px;}
.wine-manage-publish #wine-menu-status{grid-column:1 / -1;}
.wine-manage-publish #wine-menu-status:empty{display:none;}
.wine-manage-publish #wine-list-close{min-height:48px;}
.pos-inbox-bottom-close{display:none;}
#pos-batch-panel.pos-inbox-fullscreen{padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))!important;}
#pos-batch-panel.pos-inbox-fullscreen>.pos-inbox-bottom-close{display:block;position:fixed;bottom:0;left:0;right:0;z-index:3;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--paper,#fff);border-top:1px solid var(--line);}
.staff-workspace #pos-batch-panel .pos-inbox-bottom-close .btn{width:100%;min-height:48px;}

/* One shared size for both wine-management footer actions. */
.staff-workspace #wine-management-card .wine-manage-publish #wine-list-close,
.staff-workspace #wine-management-card .wine-manage-publish #wine-menu-publish{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:48px;min-height:48px;max-height:48px;margin:0;padding:0 12px;font-size:15px;line-height:20px;border-radius:10px;}

.pos-inbox-group-title{font-size:16px;line-height:1.5;margin:18px 0 10px;color:var(--text);}.pos-inbox-finished-toggle{width:100%;text-align:left;}

#pos-batch-panel.pos-inbox-fullscreen{padding-bottom:calc(154px + env(safe-area-inset-bottom,0px))!important;}
.pos-inbox-group-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px;}
.staff-workspace #pos-batch-panel .pos-inbox-group-tabs .btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;width:100%;min-height:56px;padding:7px 2px;font-size:12px;line-height:1.3;text-align:center;border-radius:10px;margin:0;}
.pos-inbox-group-tabs small{font-size:12px;}
.staff-workspace #pos-batch-panel .pos-inbox-group-tabs .btn[aria-pressed=true]{background:#1e3556;color:#fff;border-color:#1e3556;}
html[data-staff-theme=dark] .staff-workspace #pos-batch-panel .pos-inbox-group-tabs .btn[aria-pressed=true]{background:#3c587d!important;color:#fff!important;border-color:#718aaa!important;}

.staff-workspace #pos-batch-panel .pos-inbox-group-tabs .btn{flex-direction:row;gap:4px;min-height:42px;height:42px;padding:6px 3px;font-size:12px;border-radius:8px;white-space:nowrap;}
.pos-inbox-group-tabs .btn::after{content:none!important;display:none!important;}
.pos-inbox-group-tabs small{font-size:11px;}
#pos-batch-panel.pos-inbox-fullscreen{padding-bottom:calc(140px + env(safe-area-inset-bottom,0px))!important;}

.pos-inbox-detail-body{flex:1 1 auto;}
.pos-inbox-detail-footer{flex:0 0 auto;padding:10px 22px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--paper,#fff);}
.staff-workspace #pos-inbox-dialog .pos-inbox-detail-footer .pos-inbox-close{display:block;box-sizing:border-box;width:100%;height:48px;min-height:48px;margin:0;padding:0 12px;line-height:20px;font-size:15px;border:1px solid var(--line);border-radius:10px;color:var(--text);background:var(--paper,#fff);}
.pos-inbox-detail-footer{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
.pos-inbox-detail-footer.has-primary{grid-template-columns:80px minmax(0,1fr);}
.pos-inbox-detail-footer .pos-inbox-error{grid-column:1/-1;margin:0;}
#pos-inbox-dialog .pos-inbox-detail-footer .pos-inbox-primary,
#pos-inbox-dialog .pos-inbox-supplier-action>button{box-sizing:border-box;display:block;width:100%;height:48px;min-height:48px;margin:0;padding:0 10px;border:0;border-radius:10px;background:var(--navy,#1e3556);color:#fff;font-size:15px;line-height:20px;}
#pos-inbox-dialog .pos-inbox-detail-footer button:disabled{opacity:.45;cursor:default;}
#pos-inbox-dialog .pos-importer-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:14px 0;}
#pos-inbox-dialog .pos-importer-summary small{display:block;color:var(--muted,#66758a);font-size:12px;margin-bottom:6px;}
#pos-inbox-dialog .pos-importer-summary strong{display:block;font-size:18px;color:var(--text,#1e3556);overflow-wrap:anywhere;}
#pos-inbox-dialog .pos-importer-summary .btn{flex:0 0 auto;min-height:40px;margin:0;}
#pos-inbox-dialog .pos-importer-progress{display:grid;justify-items:center;gap:16px;text-align:center;width:100%;padding:36px 0;color:var(--text,#1e3556);}
#pos-inbox-dialog .pos-importer-progress .loading-ring{width:32px;height:32px;}
#pos-inbox-dialog .pos-importer-progress>span:last-child{font-size:14px;color:var(--muted,#66758a);}



/* Staff accounts fit the phone without horizontal table scrolling. */
@media(max-width:700px){
 .staff-workspace #users-card .table-scroll{overflow:visible;}
 .staff-workspace #users-card table,.staff-workspace #users-card tbody{display:block;width:100%;min-width:0;}
 .staff-workspace #users-card thead{display:none;}
 .staff-workspace #users-card #user-rows tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;padding:16px;border-bottom:1px solid var(--line);}
 .staff-workspace #users-card #user-rows tr:last-child{border-bottom:0;}
 .staff-workspace #users-card #user-rows td{display:block;min-width:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word;font-size:13px;}
 .staff-workspace #users-card #user-rows td:first-child{grid-column:1 / -1;font-weight:600;font-size:15px;line-height:1.5;}
 .staff-workspace #users-card #user-rows td:nth-child(2)::before{content:'권한 · ';color:var(--muted);font-weight:400;}
 .staff-workspace #users-card #user-rows td:nth-child(3)::before{content:'상태 · ';color:var(--muted);font-weight:400;}
 .staff-workspace #users-card #user-rows td:last-child{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px;}
 .staff-workspace #users-card #user-rows td:last-child:empty{display:none;}
 .staff-workspace #users-card #user-rows .btn{margin:0;min-height:42px;flex:1 1 110px;padding:8px;font-size:12px;white-space:normal;}
}

/* Existing ledger fields inside the full-screen journey. */
#ledger-journey>div:first-child>strong{display:block;font-size:1.35rem;color:#1e3556;margin-bottom:12px}
#ledger-journey>details>input,#ledger-journey>details>select{margin:8px 8px 8px 0;max-width:100%;padding:9px}
#ledger-journey table{width:100%;min-width:740px;border-collapse:collapse}
#ledger-journey td,#ledger-journey th{padding:7px;text-align:left;border-bottom:1px solid #d8d3ca}
#ledger-journey td input,#ledger-journey td select{width:100%;box-sizing:border-box;min-width:78px}
#ledger-journey td:nth-child(2){min-width:170px}
#ledger-journey td:last-child{max-width:220px}
#ledger-journey>details>p{font-size:.9rem}
#ledger-journey .ledger-panel{margin-top:16px}
#ledger-journey .ledger-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;margin:16px 0}
#ledger-journey .ledger-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:12px;color:#667181}
#ledger-journey .ledger-field input,#ledger-journey .ledger-field select,#ledger-journey .ledger-field textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;margin:0;padding:10px;border:1px solid #d6dce4;border-radius:8px;background:#fff;color:#233650;font:inherit;font-size:15px}
#ledger-journey .ledger-field textarea{resize:vertical;line-height:1.5}
#ledger-journey .ledger-field input[type=file]{font-size:12px}
#ledger-journey .ledger-originals{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;overflow-wrap:anywhere;word-break:break-word}
#ledger-journey .ledger-status:empty{display:none}
#ledger-journey .ledger-result{padding:16px;margin:16px 0 24px;border:1px solid #d8dfe8;border-radius:12px;background:#f2f5f9;color:#233650}
#ledger-journey .ledger-result[hidden]{display:none}
#ledger-journey .ledger-result-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
#ledger-journey .ledger-result h4,#ledger-journey .ledger-editor h4{margin:0;font-size:16px;color:#233650}
#ledger-journey .ledger-result-heading>span{padding:4px 9px;border-radius:6px;font-size:12px;font-weight:600;background:#e9dfe2;color:#794853}
#ledger-journey .ledger-matched .ledger-result-heading>span{background:#dfece6;color:#376251}
#ledger-journey .ledger-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#ledger-journey .ledger-metrics>div{min-width:0;display:flex;flex-direction:column;gap:6px}
#ledger-journey .ledger-metrics span{font-size:12px;color:#667181}
#ledger-journey .ledger-metrics strong{font-size:17px;font-variant-numeric:tabular-nums;overflow-wrap:break-word}
#ledger-journey .ledger-difference .ledger-metrics>div:last-child strong{color:#794853}
#ledger-journey .ledger-issue{display:flex;flex-direction:column;gap:7px;padding:14px;margin-top:14px;border:1px solid #dce1e8;border-radius:8px;background:#fff;overflow-wrap:break-word}
#ledger-journey .ledger-issue>small{color:#794853;font-size:12px;font-weight:600}
#ledger-journey .ledger-issue>strong{font-size:15px;line-height:1.5}
#ledger-journey .ledger-issue-meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#526174}
#ledger-journey .ledger-issue p,#ledger-journey .ledger-result-note{margin:0;font-size:12px;color:#667181;line-height:1.5}
#ledger-journey .ledger-result-note{margin-top:12px}
#ledger-journey .ledger-editor{display:grid;gap:12px}
#ledger-journey .ledger-row{padding:16px;border:1px solid #dce1e8;border-radius:12px;background:#fff;display:grid;gap:12px;min-width:0}
#ledger-journey .ledger-row>small{font-weight:600;color:#738093}
#ledger-journey .ledger-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#ledger-journey .ledger-selected{margin:0;font-size:12px;line-height:1.5;color:#526174;overflow-wrap:break-word}
#ledger-journey .ledger-save{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:16px}
#ledger-journey .ledger-save .ledger-field{flex:1 1 180px}
#ledger-journey .ledger-pager{display:flex;align-items:center;justify-content:space-between;gap:10px}
#ledger-journey .ledger-row{padding:12px 0;border:0;border-bottom:1px solid #dce1e8;border-radius:0;background:transparent;gap:7px}
#ledger-journey .ledger-row>strong{font-size:14px;line-height:1.5}
#ledger-journey .ledger-row-meta{font-size:12px;line-height:1.5;color:#667181;margin:0}
#ledger-journey .ledger-row>select{box-sizing:border-box;max-width:100%;width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #d6dce4;border-radius:6px;background:#fff;font-size:14px;color:#233650}
#ledger-journey .ledger-edit>summary{font-size:12px;color:#667181;min-height:28px;padding:4px 0}
#ledger-journey .ledger-edit[open]>.ledger-field,#ledger-journey .ledger-edit[open]>.ledger-numbers{margin-top:10px}
#ledger-journey .ledger-simple{padding:12px 0;background:transparent;border:0;border-top:1px solid #dce1e8;border-bottom:1px solid #dce1e8;border-radius:0;margin:16px 0}
#ledger-journey .ledger-simple>strong{font-size:16px;color:#794853}
#ledger-journey .ledger-simple>p{font-size:13px;line-height:1.5;margin:7px 0 0}
 #ledger-journey .ledger-tools{grid-template-columns:minmax(0,1fr)}
 #ledger-journey .ledger-result,#ledger-journey .ledger-row{padding:12px}
 #ledger-journey .ledger-numbers,#ledger-journey .ledger-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 #ledger-journey .ledger-date,#ledger-journey .ledger-metrics>div:last-child{grid-column:1/-1}
 #ledger-journey .ledger-metrics>div:last-child{border-top:1px solid #d8dfe8;padding-top:10px}
 #ledger-journey .ledger-field input,#ledger-journey .ledger-field select,#ledger-journey .ledger-field textarea{font-size:16px}
 #ledger-journey .ledger-save>*{width:100%}
#ledger-journey .ledger-panel{font-size:13px;line-height:1.5}
#ledger-journey .ledger-tools{gap:8px 12px;margin:12px 0}
#ledger-journey .ledger-status,#ledger-journey .ledger-originals{font-size:12px;margin:6px 0;color:#75808e}
#ledger-journey .ledger-editor{gap:0}
#ledger-journey .ledger-editor h4{font-size:13px;font-weight:600;margin:0;padding:0 0 6px;color:#647184}
#ledger-journey .ledger-row{padding:10px 0;gap:3px;border-bottom:1px solid #e3e7ec}
#ledger-journey .ledger-row>strong{font-size:13px;font-weight:600;line-height:1.5;color:#293c53}
#ledger-journey .ledger-row-meta{font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
#ledger-journey .ledger-edit>summary{font-size:12px;line-height:1.5;min-height:28px;box-sizing:border-box;padding:5px 0;margin:0;border:0;background:transparent;color:#6d7b8c}
#ledger-journey .ledger-edit[open]{padding-bottom:4px}
#ledger-journey .ledger-simple{padding:10px 0;margin:12px 0 16px;border-top:0;border-bottom:1px solid #dce1e8}
#ledger-journey .ledger-simple>strong{font-size:14px;font-weight:600}
#ledger-journey .ledger-simple>p{font-size:12px;line-height:1.6;margin:4px 0 0}
#ledger-journey .ledger-field{font-size:11px;gap:4px}
#ledger-journey .ledger-save{margin-top:12px;gap:8px}
#ledger-journey .ledger-save button{font-size:13px}
body.staff-workspace .shell #ledger-journey .intake-summary{margin-top:8px;max-width:520px}
body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact{width:100%;min-width:0;font-size:13px;table-layout:fixed}
body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact th,body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact td{padding:7px 10px;line-height:1.4}
body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact summary{min-height:22px;padding:1px 0;margin:0;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:break-word}
body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact th:last-child,body.staff-workspace .shell #ledger-journey .intake-summary .revenue-compact td:last-child{width:125px;text-align:right;white-space:nowrap}
html[data-staff-theme=dark] .staff-workspace #ledger-journey h4{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #ledger-journey .ledger-row>strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #ledger-journey .ledger-status{color:#b5c2d4!important;}

body.ledger-journey-open{overflow:hidden;}
.ledger-launch{display:block;width:100%;max-width:340px;min-height:54px;margin:24px auto 8px;}
.ledger-journey{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;z-index:1800;display:flex;flex-direction:column;height:var(--app-height,100vh);background:var(--paper,#fff);color:var(--text,#283544);}
.ledger-journey[hidden],#ledger-journey [hidden]{display:none!important;}
.ledger-journey>header{flex-shrink:0;padding:22px 24px 14px;border-bottom:1px solid var(--line);}
.ledger-journey-step{font-size:12px;color:var(--muted,#667181);margin:0 0 8px;}
.ledger-journey h2{font-size:25px;line-height:1.4;margin:0;color:var(--text);}
.ledger-journey-body{flex:1;min-height:0;overflow:auto;padding:24px; width:100%;max-width:760px;margin:0 auto;box-sizing:border-box;-webkit-overflow-scrolling:touch;}
.ledger-journey-intro{font-size:14px;color:var(--muted,#667181);line-height:1.6;margin:0 0 16px;}
.ledger-journey-month{font-size:17px;font-weight:600;margin:0 0 24px;}
#ledger-journey .ledger-tools{grid-template-columns:1fr;}
.ledger-journey-footer{display:flex;gap:8px;flex-shrink:0;padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--paper,#fff);}
.staff-workspace #ledger-journey .ledger-journey-footer .btn{flex:1;min-width:0;min-height:48px;margin:0;padding:10px 6px;font-size:14px;border-radius:10px;}
.ledger-all-rows{margin-top:22px;}.ledger-all-rows>summary{padding:14px 0;font-weight:600;cursor:pointer;}
.ledger-journey-scan{text-align:center;padding:64px 0;}.ledger-journey-scan .loading-ring{display:inline-block;width:44px;height:44px;border-width:4px;}
#ledger-journey .ledger-status:empty{display:none;}
#ledger-journey .ledger-verification{padding:16px;margin:16px 0;border:1px solid var(--line);border-radius:12px;background:var(--paper);font-size:13px;line-height:1.6;overflow-wrap:anywhere;}
#ledger-journey .ledger-verification>strong{font-size:16px;color:var(--text);}
#ledger-journey .ledger-reading-values{padding:10px 0;border-bottom:1px solid var(--line);}
#ledger-journey .ledger-reading-values p{margin:4px 0;}
#ledger-journey .ledger-reading-original summary{padding:10px 0;cursor:pointer;}
#ledger-journey .ledger-reading-image{max-height:360px;overflow:auto;background:white;}
#ledger-journey .ledger-reading-image img{max-width:none;width:1600px;height:auto;}
#ledger-journey .ledger-reading-image iframe{width:100%;height:350px;border:0;}
#ledger-journey .ledger-reading-ack{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:12px;}
#ledger-journey .ledger-reading-ack input{flex:0 0 20px;width:20px;min-height:20px;height:20px;}
html[data-staff-theme=dark] #ledger-journey .ledger-row,html[data-staff-theme=dark] #ledger-journey .ledger-result{background:#18263a;color:#e5eaf2;border-color:#34445b;}
html[data-staff-theme=dark] #ledger-journey .ledger-field,html[data-staff-theme=dark] #ledger-journey .ledger-row-meta{color:#b5c2d4;}
html[data-staff-theme=dark] #ledger-journey input,html[data-staff-theme=dark] #ledger-journey select,html[data-staff-theme=dark] #ledger-journey textarea{background:#101b2b;color:#e5eaf2;border-color:#34445b;}
@media(max-width:700px){.ledger-journey>header{padding:20px 20px 14px;}.ledger-journey h2{font-size:23px;}.ledger-journey-body{padding:20px;}}

/* Unified wine/inventory launcher, 2026-11-04. */
.staff-workspace .wine-management-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;align-items:stretch;gap:14px;max-width:640px;margin:auto;min-height:calc(var(--app-height,100vh) - 220px);padding:24px 0 40px;}
.staff-workspace .wine-management-tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;min-width:0;min-height:148px;padding:22px 18px;border:1px solid var(--line);border-radius:16px;background:var(--paper,#fff);color:var(--text);text-align:left;cursor:pointer;}
.wine-management-tile strong{font-size:16px;font-weight:800;line-height:inherit;word-break:keep-all;}.wine-management-detail{font-size:13px;line-height:1.5;color:var(--muted);word-break:keep-all;}.wine-management-detail.has-pending{color:#ad6331;font-weight:700;}
.wine-management-tile:focus-visible{outline:3px solid #8299bb;outline-offset:2px;}
html[data-staff-theme=dark] .wine-management-tile{background:#18263a;border-color:#34465e;color:#e5eaf2;}html[data-staff-theme=dark] .wine-management-detail{color:#aebed1;}html[data-staff-theme=dark] .wine-management-detail.has-pending{color:#f0bb85;}
body.stock-management-open{overflow:hidden;}
.staff-workspace .stock-management-fullscreen:not([hidden]){position:fixed;inset:0;z-index:1100;height:var(--app-height,100vh);overflow:auto;background:var(--paper,#fff);padding:16px 16px calc(88px + env(safe-area-inset-bottom,0px));}
.stock-management-fullscreen>.card{max-width:1100px;margin:0 auto;border:0;}
.stock-management-footer{position:fixed;bottom:0;left:0;right:0;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--paper,#fff);border-top:1px solid var(--line);z-index:5;}
.stock-management-footer .btn{width:100%;height:48px;min-height:48px;font-size:15px;}
html[data-staff-theme=dark] .stock-management-fullscreen,html[data-staff-theme=dark] .stock-management-footer{background:#111c2d!important;color:#e5eaf2;}
@media(max-width:700px){body.staff-workspace .work-nav{grid-template-columns:repeat(4,minmax(0,1fr));}.staff-workspace .wine-management-choices{gap:12px;min-height:calc(var(--app-height,100vh) - 240px);padding:16px 0 28px;}.staff-workspace .wine-management-tile{min-height:136px;padding:18px 12px;}.wine-management-detail{font-size:12px;}}

.staff-workspace .stock-management-fullscreen .count-batch-bar{position:fixed;left:0;right:0;bottom:calc(69px + env(safe-area-inset-bottom,0px));margin:0;border-radius:0;padding:10px 16px;background:var(--paper,#fff);}
.staff-workspace .stock-management-fullscreen #count-save-all{width:100%;height:48px;min-height:48px;}
.staff-workspace #work-stock-count.stock-management-fullscreen{padding-bottom:calc(156px + env(safe-area-inset-bottom,0px));}
.stock-management-footer{z-index:15;}
@media(max-width:700px){body.staff-workspace .work-nav{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);}}
/* Match the monthly settlement cards in each staff theme. */
.staff-workspace .wine-management-tile{background:#f9fafb;border-color:transparent;color:#191f28;}
.staff-workspace .wine-management-tile strong{color:#191f28;}
.staff-workspace .wine-management-tile .wine-management-detail{color:#667181;}
.staff-workspace .wine-management-tile .wine-management-detail.has-pending{color:#a15b24;}
html[data-staff-theme=dark] .staff-workspace .wine-management-tile{background:#203149;border-color:#34445b;color:#e5eaf2;}
html[data-staff-theme=dark] .staff-workspace .wine-management-tile strong{color:#e5eaf2;}
html[data-staff-theme=dark] .staff-workspace .wine-management-tile .wine-management-detail{color:#b5c2d4;}
html[data-staff-theme=dark] .staff-workspace .wine-management-tile .wine-management-detail.has-pending{color:#f0bb85;}

/* Count actions share one bottom row. */
.staff-workspace .count-actions-footer{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center;}
.staff-workspace .count-actions-footer .count-batch-bar{position:static;margin:0;padding:0;border:0;background:transparent!important;min-width:0;}
.staff-workspace .count-actions-footer #count-save-all{min-width:0;width:100%;font-size:15px;}
.staff-workspace #work-stock-count.stock-management-fullscreen{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px));}

/* The star glyph can extend 1px beyond its line box; never create scrollbars. */
.wine-page-edit .wine-page-note.note-recommend{overflow:visible;}
/* Customer display settings: choose a task, then show only that task's fields. */
#wine-edit-dialog .sales-tabs{grid-template-columns:repeat(3,minmax(0,1fr));}
#wine-edit-dialog .wine-setting-choices h3{font-size:21px;line-height:1.4;margin:6px 0 20px;color:var(--text);}
#wine-edit-dialog .wine-setting-choices>button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:19px 16px;margin:0 0 10px;border:1px solid var(--line);border-radius:14px;background:var(--paper,#fff);color:var(--text);text-align:left;}
#wine-edit-dialog .wine-setting-choices>button>span:first-child{min-width:0;}
#wine-edit-dialog .wine-setting-choices strong{display:block;font-size:16px;line-height:1.5;font-weight:650;}
#wine-edit-dialog .wine-setting-choices small{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:var(--muted);word-break:keep-all;overflow-wrap:break-word;}
#wine-edit-dialog .wine-setting-choices>button>span:last-child{font-size:24px;color:var(--muted);flex-shrink:0;}
#wine-edit-dialog .wine-setting-back{display:block;min-height:44px;margin:0 0 12px;padding:8px 0;border:0;background:transparent;color:var(--text);font-size:14px;}
#wine-edit-dialog #wine-display-detail h3,#wine-edit-dialog [data-sales-pane=glass] h3{font-size:20px;line-height:1.4;margin:0 0 12px;}
#wine-edit-dialog .wine-setting-hint{margin:0 0 14px;font-size:13px;line-height:1.6;color:var(--muted);}
#wine-edit-dialog .wine-note-editor{margin:18px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--line);min-width:0;}
#wine-edit-dialog .wine-note-editor legend{font-size:14px;font-weight:600;color:var(--text);padding:0 8px 0 0;}
#wine-edit-dialog .wine-note-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0 14px;}
#wine-edit-dialog .wine-note-choices button{min-height:44px;margin:0;padding:9px 4px;border:1px solid var(--line);border-radius:9px;font-size:13px;font-weight:500;background:var(--paper,#fff);color:var(--text);}
#wine-edit-dialog .wine-note-choices button[aria-pressed=true]{background:#1e3556;color:#fff;border-color:#1e3556;}
#wine-edit-dialog .wine-editor-status{display:block;}
#wine-edit-dialog .wine-editor-visibility{text-align:left;margin-top:24px;padding-top:20px;border-top:1px solid var(--line);}
#wine-edit-dialog #wine-visibility-toggle{width:100%;white-space:normal;min-height:48px;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-setting-choices>button,
html[data-staff-theme=dark] #wine-edit-dialog .wine-note-choices button{background:#203149;color:#e5eaf2;border-color:#34445b;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-note-choices button[aria-pressed=true]{background:#45658e;color:#fff;border-color:#6a8ebc;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-setting-choices h3,
html[data-staff-theme=dark] #wine-edit-dialog .wine-note-editor legend,
html[data-staff-theme=dark] #wine-edit-dialog .wine-setting-back{color:#e5eaf2;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-setting-hint,
html[data-staff-theme=dark] #wine-edit-dialog .wine-setting-choices small{color:#acbcd0;}
html[data-staff-theme=dark] #wine-edit-dialog .wine-note-preview-label{color:#acbcd0;}
@media(max-width:600px){
 .staff-workspace #wine-edit-dialog[open]{height:var(--app-height,100vh);max-height:var(--app-height,100vh);}
 .legacy-dialogs .staff-workspace #wine-edit-dialog.legacy-modal{top:0;left:0;transform:none;}
 #wine-edit-dialog .wine-editor-footer{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));}
}

/* Monthly statement workspace: one list, quiet dividers and reachable actions. */
#ledger-journey.ledger-batch{--lb-muted:#65748a;--lb-line:#e5eaf0;--lb-soft:#f3f6fa;--lb-text:#203650;--lb-ok:#247a65;--lb-warn:#a66130;background:#fff;color:var(--lb-text)}
#ledger-journey.ledger-batch>header{border:0;max-width:760px;width:100%;box-sizing:border-box;margin:auto;padding:26px 22px 8px}
#ledger-journey.ledger-batch h2{font-size:25px;line-height:1.4;letter-spacing:-.7px;color:var(--lb-text)}
#ledger-journey.ledger-batch .ledger-journey-body{padding:8px 22px 28px}
#ledger-journey.ledger-batch .ledger-journey-step,#ledger-journey .lb-muted{color:var(--lb-muted);font-size:12px;line-height:1.6}
#ledger-journey .lb-upload{padding:0 0 22px}
#ledger-journey .lb-upload p{margin:8px 0 18px;font-size:13px;color:var(--lb-muted)}
#ledger-journey.ledger-batch .btn{font:inherit;margin:0;box-sizing:border-box;white-space:normal;min-width:0;cursor:pointer}
#ledger-journey .lb-upload .btn{width:100%;min-height:52px;border-radius:13px;font-size:15px;font-weight:650;background:#203650;color:#fff;border:0}
#ledger-journey .lb-tabs{display:flex;border-bottom:1px solid var(--lb-line);gap:16px;margin:0 0 4px}
#ledger-journey.ledger-batch .lb-tabs .btn{flex:1;min-height:44px;padding:10px 0;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--lb-muted);font-size:12px;white-space:nowrap}
#ledger-journey.ledger-batch .lb-tabs .btn[aria-pressed=true]{color:var(--lb-text);font-weight:750;border-bottom-color:var(--lb-text)}
#ledger-journey.ledger-batch .lb-supplier{display:flex;align-items:center;width:100%;min-height:84px;padding:16px 0;gap:10px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--lb-line);border-radius:0;color:var(--lb-text)}
#ledger-journey .lb-supplier-text{display:grid;gap:5px;flex:1;min-width:0}
#ledger-journey .lb-supplier strong{font-size:15px;line-height:1.4;overflow-wrap:anywhere}
#ledger-journey .lb-supplier small{font-size:11px;line-height:1.6;color:var(--lb-muted)}
#ledger-journey .lb-state{font-size:11px;white-space:nowrap;color:var(--lb-muted);font-weight:600}
#ledger-journey .lb-state.is-ok{color:var(--lb-ok)}#ledger-journey .lb-state.is-warn{color:var(--lb-warn)}
#ledger-journey .lb-chevron{font-size:20px;color:var(--lb-muted)}
#ledger-journey .lb-inbox{padding:16px 0;border-bottom:1px solid var(--lb-line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
#ledger-journey .lb-inbox>strong{font-size:13px;overflow-wrap:anywhere}
#ledger-journey .lb-inbox>.lb-field,#ledger-journey .lb-inbox>p,#ledger-journey .lb-inbox>.btn{grid-column:1/-1}
#ledger-journey .lb-empty{font-size:13px;color:var(--lb-muted);padding:42px 0;text-align:center}
#ledger-journey .lb-message{font-size:12px;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere;color:var(--lb-warn)}#ledger-journey .lb-message:empty{display:none}
#ledger-journey .lb-outcome{padding:18px 0 22px}
#ledger-journey .lb-outcome h3{font-size:18px;letter-spacing:-.4px;line-height:1.6;margin:0 0 18px;color:var(--lb-text)}
#ledger-journey .lb-outcome.is-ok h3{color:var(--lb-ok)}
#ledger-journey .lb-totals{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;margin:0 0 7px;font-size:14px;font-variant-numeric:tabular-nums}
#ledger-journey .lb-totals dt{color:var(--lb-muted)}#ledger-journey .lb-totals dd{margin:0;text-align:right;font-weight:650}
#ledger-journey .lb-totals dt:nth-last-child(2),#ledger-journey .lb-totals dd:last-child{padding-top:10px;border-top:1px solid var(--lb-line);font-weight:750;color:var(--lb-text)}
#ledger-journey .lb-warning{background:var(--lb-soft);border-radius:12px;padding:14px;margin:0 0 16px;font-size:13px;line-height:1.6}
#ledger-journey .lb-section-title{font-size:14px;margin:26px 0 6px;color:var(--lb-text)}
#ledger-journey .lb-details{border-top:1px solid var(--lb-line);font-size:13px;margin:0;padding:0}
#ledger-journey .lb-details>summary,#ledger-journey .lb-item-edit>summary{list-style:none;cursor:pointer;padding:16px 0;min-height:44px;box-sizing:border-box;font-size:13px;color:var(--lb-text)}
#ledger-journey .lb-details>summary:after,#ledger-journey .lb-item-edit>summary:after{content:'＋';float:right;color:var(--lb-muted)}
#ledger-journey .lb-details[open]>summary:after,#ledger-journey .lb-item-edit[open]>summary:after{content:'−'}
#ledger-journey .lb-details>summary::-webkit-details-marker,#ledger-journey .lb-item-edit>summary::-webkit-details-marker{display:none}
#ledger-journey .lb-details a{display:block;padding:10px 0;overflow-wrap:anywhere;color:var(--lb-text)}
#ledger-journey .lb-item{padding:14px 0;border-bottom:1px solid var(--lb-line);font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#ledger-journey .lb-item>strong{font-size:14px;color:var(--lb-text)}#ledger-journey .lb-item>p{margin:6px 0}
#ledger-journey .lb-item-edit>summary{font-size:12px;padding:10px 0;color:var(--lb-warn)}
#ledger-journey .lb-field{display:grid;gap:6px;margin:10px 0 15px;min-width:0;color:var(--lb-muted);font-size:12px}
#ledger-journey.ledger-batch .lb-field input,#ledger-journey.ledger-batch .lb-field select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px;line-height:1.4;min-height:46px;border:1px solid var(--lb-line);border-radius:9px;background:var(--lb-soft);color:var(--lb-text);padding:10px}
#ledger-journey .lb-record{display:grid;gap:4px;font-size:13px;padding:12px 0;line-height:1.6;overflow-wrap:anywhere}#ledger-journey .lb-record small{color:var(--lb-muted)}
#ledger-journey .lb-question{font-size:15px;font-weight:650;color:var(--lb-text);margin:12px 0}
#ledger-journey.ledger-batch .lb-item>.btn,#ledger-journey.ledger-batch .lb-record>.btn{min-height:44px;padding:10px 14px;border:1px solid var(--lb-line);border-radius:10px;background:var(--lb-soft);color:var(--lb-text);font-size:13px;margin:6px 8px 6px 0}
#ledger-journey .lb-original{display:inline-block;color:var(--lb-text);font-weight:650;padding:8px 0;min-height:28px}
#ledger-journey .lb-ack{display:flex;align-items:center;gap:10px;min-height:48px;font-size:13px}#ledger-journey .lb-ack input{width:20px;height:20px;min-height:20px;flex:0 0 20px}
#ledger-journey.ledger-batch .ledger-journey-footer{border-color:var(--lb-line);background:inherit}
html[data-staff-theme=dark] #ledger-journey.ledger-batch{--lb-muted:#aabbd0;--lb-line:#314158;--lb-soft:#1c2b40;--lb-text:#e5edf8;--lb-ok:#74c9aa;--lb-warn:#e8b37c;background:#111d2e;color:var(--lb-text)}
html[data-staff-theme=dark] #ledger-journey.ledger-batch .lb-upload .btn{background:#365881}
@media(max-width:360px){#ledger-journey.ledger-batch>header{padding:22px 16px 8px}#ledger-journey.ledger-batch .ledger-journey-body{padding:8px 16px 24px}#ledger-journey.ledger-batch h2{font-size:22px}#ledger-journey .lb-tabs{gap:8px}#ledger-journey.ledger-batch .lb-tabs .btn{font-size:11px}}

/* Stocktake search and customer-list structure editing. */
.staff-workspace .count-search-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 14px 12px}
.staff-workspace #stocktake-card #count-search{flex:1;min-width:0;width:auto;background:var(--paper,#fff);color:var(--navy);border:1px solid var(--line);font-size:16px}
#count-search-status{flex-basis:100%;font-size:12px;color:var(--muted)}
.count-search-empty{padding:24px 0;color:var(--muted);font-size:14px}
#wine-structure-open{margin-left:auto;white-space:nowrap;height:40px;min-height:40px;padding:0 12px;font-size:13px}
.wine-structure{--structure-bg:#fff;--structure-text:#191f28;--structure-soft:#f5f6f8;--structure-muted:#667085;--structure-line:#e5e7eb;background:var(--structure-bg);color:var(--structure-text);width:min(640px,100%);height:min(880px,100%);max-height:100%;max-width:100%;border:0;border-radius:16px;padding:0;box-sizing:border-box;overflow:hidden}
.wine-structure::backdrop{background:rgba(12,23,39,.48)}
#wine-structure-form{display:flex;flex-direction:column;height:100%;min-height:0;margin:0}
.wine-structure header{padding:22px 20px 14px;flex:none}.wine-structure h2{font-size:22px;margin:0;color:var(--structure-text)}
#wine-structure-content{overflow-y:auto;flex:1;min-height:0;padding:0 20px 20px;overscroll-behavior:contain}
.structure-help{font-size:13px;color:var(--structure-muted);line-height:1.6;margin:4px 0 16px}
.structure-section{display:flex;align-items:center;gap:12px;width:100%;padding:15px 0;border:0;border-bottom:1px solid var(--structure-line);background:transparent;color:var(--structure-text);font:inherit;text-align:left}
.structure-section>span:first-child{flex:1;min-width:0}.structure-section strong,.structure-wine strong{font-size:15px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.structure-section small,.structure-wine small{display:block;font-size:12px;margin-top:3px;color:var(--structure-muted);overflow-wrap:anywhere}
.structure-edit-label{font-size:12px;white-space:nowrap;color:var(--structure-muted)}
.wine-structure .structure-field{display:block;margin:18px 0;font-size:13px;color:var(--structure-text)}
.wine-structure input:not([type=checkbox]),.wine-structure select{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:46px;border:1px solid var(--structure-line);border-radius:9px;background:var(--structure-soft);color:var(--structure-text);font:inherit;font-size:16px;padding:10px 12px;margin-top:8px}
.structure-extra{border-top:1px solid var(--structure-line);margin:20px 0;padding-top:16px;font-size:13px}.structure-extra summary{cursor:pointer;color:var(--structure-muted)}
.wine-structure .structure-add{width:100%;margin-top:20px;background:var(--structure-soft);color:var(--structure-text);border:1px solid var(--structure-line);font-size:14px}
.structure-wine{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--structure-line)}.structure-wine input{width:20px;height:20px;flex:none;accent-color:#1e3556}.structure-wine>span{min-width:0}
#wine-structure-error{margin:0;padding:0 20px;color:#b94e57;font-size:13px;line-height:1.5}#wine-structure-error:empty{display:none}
.wine-structure footer{display:flex;gap:10px;border-top:1px solid var(--structure-line);padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--structure-bg)}
.wine-structure footer .btn{flex:1;height:48px;min-height:48px;padding:0 14px;font-size:15px}.wine-structure footer .btn:not(.primary){background:var(--structure-soft);color:var(--structure-text);border-color:var(--structure-line)}
html[data-staff-theme=dark] .wine-structure{--structure-bg:#152237;--structure-text:#e5eaf2;--structure-soft:#203149;--structure-muted:#b2bfd0;--structure-line:#34445b}
html[data-staff-theme=dark] .staff-workspace #stocktake-card #count-search{background:#203149!important;color:#e5eaf2!important;border-color:#34445b!important}
@media(max-width:700px){.wine-structure{width:100%;height:100%;border-radius:0;margin:0}.wine-structure header{padding-top:calc(20px + env(safe-area-inset-top))}#wine-structure-content{padding-left:16px;padding-right:16px}.wine-structure footer{padding-left:16px;padding-right:16px}}

body.staff-workspace dialog.wine-structure{padding:0;overflow:hidden;max-height:100%;border:0}
@media(max-width:700px){body.staff-workspace dialog.wine-structure{height:var(--app-height,100vh);width:100%;max-width:100%;max-height:var(--app-height,100vh);border-radius:0;margin:0}}

#count-search::-webkit-search-cancel-button{-webkit-appearance:none}
/* Match stock surfaces to their enclosing card, in both themes. */
body.staff-workspace .shell #stocktake-card,
body.staff-workspace .shell #count-review{background:var(--paper,#fff)!important}
body.staff-workspace .shell #count-search,
body.staff-workspace .shell .stock-status,
body.staff-workspace .shell #stocktake-card .stock-warning,
body.staff-workspace .shell #staff-stock-card .stock-warning{background:#fff!important;border:1px solid var(--line);color:var(--text)}
html[data-staff-theme=dark] body.staff-workspace .shell #count-search,
html[data-staff-theme=dark] body.staff-workspace .shell .stock-status,
html[data-staff-theme=dark] body.staff-workspace .shell #stocktake-card .stock-warning,
html[data-staff-theme=dark] body.staff-workspace .shell #staff-stock-card .stock-warning{background:#22334b!important;color:#e5eaf2!important;border-color:#42536c!important}
#wine-edit-dialog .wine-identity-fields>label:not(:first-child){margin-top:18px}
#wine-edit-dialog .wine-editor-vintage-fields{display:block;max-width:none;margin:0 0 20px}
#wine-edit-dialog .wine-editor-vintage-fields[hidden]{display:none}
#wine-edit-dialog #sales-vintage{min-height:44px;max-width:180px}
#wine-edit-dialog #wine-editor-vintage{flex-wrap:wrap;justify-content:flex-end;gap:4px}
#wine-edit-dialog #sales-name-toggle{margin-right:0}
#wine-edit-dialog .wine-identity-fields .grape-query{font-size:16px}
.staff-workspace dialog.house-wine-dialog{padding:0;border:0;border-radius:0;width:100%;max-width:none;height:var(--app-height,100vh);max-height:none;margin:0;overflow:hidden;background:var(--paper,#fff);color:var(--text,#203552);}
.house-wine-dialog form{height:100%;max-width:680px;margin:0 auto;display:flex;flex-direction:column;min-height:0;}
.house-wine-dialog header{flex:none;padding:28px 24px 16px;}
.house-wine-dialog header p{font-size:13px;color:var(--muted);margin:0 0 8px;}
#house-wine-dialog h2{font-size:26px;line-height:1.4;white-space:pre-line;margin:0;letter-spacing:-.7px;color:inherit;}
.house-wine-dialog main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 24px 20px;}
.house-wine-section{margin:16px 0 24px;}.house-wine-section h3{font-size:15px;margin:0 0 8px;color:var(--muted);}
.house-wine-dialog .house-slot,.house-current,.house-result{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;border:1px solid var(--line,#dce2e9);border-radius:14px;background:var(--paper,#fff);color:inherit;padding:16px;margin:8px 0;min-width:0;box-shadow:none;}
.house-slot>span:first-child{min-width:0;}.house-slot strong,.house-wine-name strong{display:block;font-size:17px;line-height:1.5;overflow-wrap:anywhere;}
.house-slot small,.house-wine-name small{display:block;font-size:12px;line-height:1.5;margin:4px 0;color:var(--muted);overflow-wrap:anywhere;}
.house-slot .house-slot-label{color:var(--navy,#1e3556);font-weight:700;}.house-chevron{font-size:24px;color:var(--muted);}
.house-wine-dialog .house-slot.house-empty{font-size:13px;justify-content:center;padding:10px;min-height:42px;border:0;background:transparent;color:var(--muted);}
.house-current{display:block;background:#f3f6fa;}.house-current>small{display:block;margin-bottom:8px;color:var(--muted);font-size:12px;}
.house-wine-dialog input{width:100%;box-sizing:border-box;min-width:0;background:var(--paper,#fff);color:inherit;border:1px solid var(--line,#dce2e9);border-radius:12px;min-height:50px;font-size:17px;padding:12px;}
.house-search{margin:16px 0 8px;}.house-result{display:block;}.house-result:disabled{opacity:.55;}.house-reason{display:block;margin-top:6px;color:var(--muted);}
.house-selection{padding:20px 0;}.house-fields{display:grid;gap:24px;margin:12px 0 28px;}.house-fields label{font-size:14px;color:var(--muted);}.house-input-wrap{display:flex;align-items:center;position:relative;margin-top:8px;}#house-wine-dialog .house-input-wrap input{padding-right:48px;font-weight:700;font-size:23px;appearance:textfield;-moz-appearance:textfield;}#house-wine-dialog input::-webkit-inner-spin-button,#house-wine-dialog input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}.house-input-wrap>span{position:absolute;right:16px;}
.house-help{color:var(--muted);font-size:13px;line-height:1.7;margin:16px 0;}.house-wine-dialog footer{display:flex;gap:10px;padding:14px 24px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--paper,#fff);flex:none;}
.house-wine-dialog footer .btn{flex:1;height:48px;min-height:48px;padding:10px 16px;font-size:16px;margin:0;}
#house-wine-error{flex:none;color:#b14d4e;font-size:13px;line-height:1.6;padding:0 24px;margin:0 0 8px;overflow-wrap:anywhere;}#house-wine-error:empty{display:none;}
.house-success{width:60px;height:60px;border-radius:50%;background:#e4f3e9;color:#38865c;display:grid;place-items:center;font-size:32px;margin:30px 0 24px;}.house-saved-price{font-size:22px;font-weight:700;}.house-pos{margin-top:12px;}
html[data-staff-theme=dark] .house-wine-dialog{background:#18263a;color:#e5eaf2;}html[data-staff-theme=dark] .house-wine-dialog .house-slot,html[data-staff-theme=dark] .house-current,html[data-staff-theme=dark] .house-result,html[data-staff-theme=dark] .house-wine-dialog input,html[data-staff-theme=dark] .house-wine-dialog footer{background:#22334b;color:#e5eaf2;border-color:#3c4e67;}html[data-staff-theme=dark] .house-slot .house-slot-label{color:#c6d5ec;}html[data-staff-theme=dark] .house-wine-dialog .house-empty{background:transparent;color:#b3c1d3;}html[data-staff-theme=dark] #house-wine-error{color:#f3a6a6;}
@media(max-width:360px){.house-wine-dialog header{padding:22px 18px 12px;}#house-wine-dialog h2{font-size:23px;}.house-wine-dialog main{padding:0 18px 16px;}.house-wine-dialog footer{padding-left:18px;padding-right:18px;}.house-slot strong,.house-wine-name strong{font-size:16px;}}
.legacy-dialogs .staff-workspace dialog.house-wine-dialog.legacy-modal{position:fixed;top:0;left:0;right:0;bottom:0;transform:none;}
.product-correction-dialog{box-sizing:border-box;width:min(600px,100vw);max-width:100vw;max-height:92vh;padding:0;border:1px solid var(--line,#dce1e7);border-radius:18px;background:var(--paper,#fff);color:var(--text,#182940)}
.product-correction-dialog[open]{display:flex;flex-direction:column}.product-correction-dialog::backdrop{background:rgba(12,23,40,.5)}
.product-correction-dialog header{padding:24px 22px 8px}.product-correction-dialog h2{font-size:24px;margin:0}.product-correction-dialog h3{font-size:22px;line-height:1.45;overflow-wrap:anywhere}
.product-correction-body{overflow:auto;overscroll-behavior:contain;padding:12px 22px 24px;flex:1;min-height:0}.product-correction-source{color:var(--muted,#667385);font-size:14px;overflow-wrap:anywhere}
.product-correction-body form{display:flex;gap:8px}.product-correction-body form input{min-width:0;flex:1}.product-correction-body form .btn{flex-shrink:0;width:auto}
.product-correction-choice{display:block;text-align:left;width:100%;padding:16px 0;border:0;border-bottom:1px solid var(--line,#dce1e7);background:transparent;color:inherit;white-space:normal;overflow-wrap:anywhere}.product-correction-choice strong{display:block;font-size:16px}.product-correction-choice span{display:block;font-size:14px;margin-top:6px;color:var(--muted,#667385)}
.product-correction-body dl{display:grid;grid-template-columns:82px minmax(0,1fr);gap:16px 12px;font-size:14px;padding:20px 0;border-top:1px solid var(--line,#dce1e7);border-bottom:1px solid var(--line,#dce1e7)}.product-correction-body dt{color:var(--muted,#667385)}.product-correction-body dd{margin:0;overflow-wrap:anywhere}
.product-correction-confirm{display:flex;align-items:center;gap:10px;font-size:15px}.product-correction-confirm input{width:20px;height:20px;flex-shrink:0}.product-correction-blocked{font-size:14px;line-height:1.7}.product-correction-error{margin:0;padding:0 22px;color:#aa4e51;font-size:14px;overflow-wrap:anywhere}.product-correction-error:empty{display:none}
.product-correction-dialog footer{display:flex;gap:10px;padding:16px 22px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line,#dce1e7)}.product-correction-dialog footer .btn{flex:1;height:48px;min-height:48px;margin:0;padding:0 12px;font-size:15px}
@media(max-width:700px){.staff-workspace .product-correction-dialog{position:fixed;inset:0;margin:0;width:100%;height:var(--app-height,100dvh);max-height:var(--app-height,100dvh);border:0;border-radius:0}.product-correction-dialog header{padding-top:calc(24px + env(safe-area-inset-top))}}

.staff-workspace .product-correction-dialog{padding:0}.product-correction-dialog footer .btn{white-space:nowrap}

/* Monthly closing remains the main task; purchase ratio is a compact summary. */
body.staff-workspace .shell #monthly-report-card .close-step{margin:0;border-radius:0;border-bottom:1px solid #e4e9ef;background:transparent!important;box-shadow:none}
body.staff-workspace .shell #monthly-report-card .close-step:last-child{border-bottom:0}
body.staff-workspace .shell #monthly-report-card .close-step-head{min-height:76px;padding:14px 4px}
body.staff-workspace .shell #monthly-report-card .close-step-title strong{font-weight:600}
body.staff-workspace .shell #monthly-report-card .close-step-status{font-size:12px;margin-top:4px}
body.staff-workspace .shell #monthly-report-card .close-step-num{width:28px;height:28px;line-height:28px;font-weight:600}
body.staff-workspace .shell .monthly-budget{display:block;width:100%;padding:14px 16px;margin:8px 0 18px;border:0;border-radius:12px;background:#f2f4f7;color:#1e3556;text-align:left;font:inherit;cursor:pointer}
.monthly-budget-top{display:flex;justify-content:space-between;align-items:baseline;gap:6px;flex-wrap:wrap;margin-bottom:10px;font-size:15px}
.monthly-budget-top strong{font-size:22px;font-weight:650;margin-left:6px;font-variant-numeric:tabular-nums}
.monthly-budget-top small{font-size:12px;color:#67758a}
.monthly-budget-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#67758a;margin-top:3px;font-variant-numeric:tabular-nums}
.monthly-budget-row>span:last-child{white-space:nowrap}
.monthly-budget-detail{position:fixed;inset:0;z-index:1600;background:#fff;color:#1e3556;padding:28px 22px calc(24px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
.monthly-budget-detail[hidden]{display:none!important}
.monthly-budget-detail>h2,.monthly-budget-detail>dl,.monthly-budget-detail>p,.monthly-budget-detail>.btn{max-width:560px;margin-left:auto;margin-right:auto}
.monthly-budget-detail h2{font-size:22px;margin-top:0;margin-bottom:22px}
.monthly-budget-facts>div{display:flex;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid #e4e9ef;font-size:15px}
.monthly-budget-facts dt{font-weight:400}.monthly-budget-facts dd{margin:0;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.monthly-budget-note{font-size:12px;color:#67758a;line-height:1.7}
.monthly-budget-detail>.btn{display:block;width:100%;min-height:48px;margin-top:26px}
html[data-staff-theme=dark] body.staff-workspace .shell #monthly-report-card .close-step{border-color:#34445b}
html[data-staff-theme=dark] body.staff-workspace .shell .monthly-budget{background:#25364d;color:#e5edf8}
html[data-staff-theme=dark] .monthly-budget-row,html[data-staff-theme=dark] .monthly-budget-top small,html[data-staff-theme=dark] .monthly-budget-note{color:#b5c2d4}
html[data-staff-theme=dark] .monthly-budget-detail{background:#19283a;color:#e5edf8}
html[data-staff-theme=dark] .monthly-budget-facts>div{border-color:#34445b}
.sales-dashboard{max-width:760px;margin:0 auto;padding:22px!important;color:#1e3556}
.sales-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:28px}
.sales-dashboard-head h2{font-size:22px;margin:0}.sales-dashboard-head input{width:auto;max-width:100%;min-height:42px}
.sales-total>span{font-size:15px;color:#67758a}.sales-total>strong{display:block;font-size:32px;font-weight:700;letter-spacing:-1px;line-height:1.4;margin:6px 0 22px;font-variant-numeric:tabular-nums}
.sales-figures{margin:0}.sales-figures>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:8px 0;font-size:14px}
.sales-figures dt{color:#67758a;font-weight:400}.sales-figures dd{margin:0;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.sales-composition{border-top:1px solid #e4e9ef;margin-top:22px;padding-top:14px}.sales-composition>div:last-child{border-top:1px solid #e4e9ef;margin-top:6px;padding-top:14px}
.sales-caption{font-size:12px;line-height:1.65;color:#67758a;margin:8px 0}.sales-naver{margin-top:22px}
.sales-days{margin-top:24px;border-top:1px solid #e4e9ef;padding-top:18px}.sales-days summary{font-size:14px;cursor:pointer}.sales-day{padding:20px 0;border-bottom:1px solid #e4e9ef}.sales-day>strong{font-size:14px}.sales-day .sales-figures>div{font-size:13px}
.sales-dashboard-error{color:#b14d4e;font-size:14px}.sales-dashboard-error:empty{display:none}
html[data-staff-theme=dark] .sales-dashboard{color:#e5edf8}html[data-staff-theme=dark] .sales-total>span,html[data-staff-theme=dark] .sales-figures dt,html[data-staff-theme=dark] .sales-caption{color:#b5c2d4}
html[data-staff-theme=dark] .sales-composition,html[data-staff-theme=dark] .sales-composition>div:last-child,html[data-staff-theme=dark] .sales-days,html[data-staff-theme=dark] .sales-day{border-color:#34445b}
html[data-staff-theme=dark] .sales-dashboard-error{color:#f3a6a6}
@media(max-width:360px){body.staff-workspace .shell .sales-dashboard{padding:18px!important}.sales-total>strong{font-size:28px}.sales-figures>div{font-size:13px}}

/* Revenue period switch uses the same controls in light and dark themes. */
.sales-modes{display:flex;gap:8px;margin:0 0 22px}.sales-modes .btn{min-height:40px;flex:1}.sales-modes [aria-pressed="true"]{box-shadow:inset 0 -3px 0 currentColor;font-weight:700}.sales-year-comparison{margin:24px 0 12px}.sales-year-months summary{font-size:15px;font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;list-style:none}.sales-year-months summary::-webkit-details-marker{display:none}.sales-year-months summary::after{content:"열기";font-size:12px;font-weight:400}.sales-year-months[open] summary::after{content:"닫기"}.sales-dashboard-head select{max-width:140px;min-height:40px;font:inherit}

.sales-year-comparison h3{font-size:15px;margin:24px 0 12px}.sales-year-months{margin-top:20px}
.sales-insight{border-top:1px solid #e4e9ef;margin-top:16px;padding-bottom:8px}.sales-insight summary{display:flex;align-items:center;justify-content:space-between;list-style:none;min-height:58px;font-size:15px;font-weight:600;cursor:pointer}.sales-insight summary::-webkit-details-marker{display:none}.sales-insight summary:after{content:'열기';font-size:12px;font-weight:400}.sales-insight[open] summary:after{content:'닫기'}.sales-insight-bar{display:grid;grid-template-columns:58px minmax(0,1fr) 68px;gap:8px;align-items:center;min-height:42px;font-size:12px}.sales-insight-bar>span:last-child{text-align:right;font-variant-numeric:tabular-nums}.sales-insight-track{display:flex;height:10px;overflow:hidden}.sales-insight-track i{display:block;height:100%}.sales-insight-track .food{background:#8197b1}.sales-insight-track .drink{background:#c6a573}.sales-insight .sales-figures>div{font-size:13px;gap:12px}.sales-insight .sales-figures dd{white-space:nowrap}.sales-insight .sales-modes{margin:12px 0}.sales-insight .sales-caption{overflow-wrap:anywhere}html[data-staff-theme=dark] .sales-insight{border-color:#34445b}

/* Intake dialogs need explicit foregrounds as well as dark card backgrounds. */
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-match>strong,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-identity-review>strong{color:#e5eaf2!important;}
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-match>p,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-result-english,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-catalog-form>label,
html[data-staff-theme=dark] .staff-workspace #wine-create-form label,
html[data-staff-theme=dark] .staff-workspace #wine-create-form .wine-price-ratio span{color:#bdcadd!important;}
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-identity-warning .wine-result-details dt,
html[data-staff-theme=dark] .staff-workspace #wine-find-dialog .wine-identity-warning .wine-result-details dd{color:#f5b4bb!important;}

/* Capture illustrations follow the same palette as their button. */
html[data-staff-theme=dark] body.staff-workspace #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]{--capture-ink:#e5eaf2;--capture-paper:#263b55;background:#263b55!important;color:#e5eaf2!important}
html[data-staff-theme=dark] body.staff-workspace #intake-page #intake-form .photo-actions>.btn[data-pick$="-camera"]:active{background:#344b67!important;--capture-paper:#344b67}

/* Closed-month quantity corrections: compact, non-overlapping mobile fields. */
html body.staff-workspace #report-close-review .stock-correction { min-width:0; }
html body.staff-workspace #report-close-review .stock-correction-form { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; margin:16px 0 0; padding:0; min-width:0; }
html body.staff-workspace #report-close-review .stock-correction-form input,
html body.staff-workspace #report-close-review .stock-correction-form select,
html body.staff-workspace #report-close-review .stock-correction-form .btn { box-sizing:border-box; width:100%; max-width:100%; min-width:0; min-height:48px; height:auto; margin:0; padding:12px 14px; font-size:16px; line-height:1.5; border-radius:10px; }
html body.staff-workspace #report-close-review .stock-correction-form select { padding-right:32px; text-overflow:ellipsis; }
html body.staff-workspace #report-close-review .stock-correction-name { margin:0; min-width:0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
html body.staff-workspace #report-close-review .stock-correction-lots { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; min-width:0; }
html body.staff-workspace #report-close-review .stock-correction-lot { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; margin:0; min-width:0; font-size:14px; line-height:1.5; }
html body.staff-workspace #report-close-review .stock-correction-lot span { overflow-wrap:anywhere; }

.stock-bulk-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:12px 0; }
.stock-bulk-actions p { flex-basis:100%; margin:0; font-size:14px; overflow-wrap:anywhere; }
#stock-delete-name,#stock-error { white-space:pre-line; }
#stock-delete-name { max-height:45vh; overflow:auto; }
.stock-list-actions label { display:flex; align-items:center; gap:8px; }
.stock-list-actions input[type=checkbox] { width:20px; height:20px; margin:0; }

/* Historical purchase lookup: one-column mobile layout, themed surfaces. */
.staff-workspace dialog.purchase-history-dialog{padding:0;border:0;border-radius:0;margin:0;width:100%;max-width:none;height:var(--app-height,100dvh);max-height:none;overflow:hidden;background:var(--paper,#fff);color:var(--text)}
.purchase-history-wrap{height:100%;max-width:720px;margin:auto;display:flex;flex-direction:column;min-height:0}
.purchase-history-wrap header{padding:24px 20px 12px;flex-shrink:0}.purchase-history-wrap h2{font-size:22px;margin:0 0 18px;color:var(--text)}
.purchase-history-wrap input{width:100%;min-width:0;min-height:48px;padding:12px 14px;font:inherit;font-size:16px;border:1px solid var(--line);border-radius:12px;background:var(--navy-soft);color:var(--text)}
.purchase-history-wrap input::placeholder{color:var(--muted)}.purchase-history-wrap p.purchase-history-hint,.purchase-history-wrap p.purchase-history-status{font-size:12px;color:var(--muted);margin:10px 0 0}
.purchase-history-list{overflow-y:auto;min-height:0;flex:1;padding:0 20px;overscroll-behavior:contain}.purchase-history-item{padding:18px 0;border-bottom:1px solid var(--line)}
.purchase-history-top{display:flex;gap:12px;align-items:start;justify-content:space-between}.purchase-history-top strong{font-size:15px;overflow-wrap:anywhere;min-width:0;color:var(--text)}.purchase-history-price{font-size:16px;font-weight:700;white-space:nowrap;color:var(--text)}
.purchase-history-wrap p.purchase-history-supplier{font-size:13px;color:var(--text);margin-top:8px}.purchase-history-item small{display:block;font-size:12px;color:var(--muted);margin-top:5px}
.purchase-history-wrap footer{flex-shrink:0;margin:0;padding:12px 20px max(12px,env(safe-area-inset-bottom));border-top:1px solid var(--line)}.purchase-history-wrap footer .btn{width:100%;height:44px;min-height:44px}.purchase-history-wrap>.btn{flex-shrink:0;margin:8px 20px;min-height:44px}
