/* Simplified operations layer. Loaded last: compact tables, one-line rows,
   and no long explanatory copy on any page. */

/* ---- Remove explanatory text everywhere (warnings and errors stay). ---- */
.pagehead .subtitle, .pagehead .eyebrow, .preview-hint, .preview-description, .recipe-form-intro,
.ws-explainer, .ws-intro-help, .ws-inline-help, .ws-line-help, .ws-detail-guide, .ws-page-footer,
.ws-export-footnote > span, .ws-export-heading small, .ws-metric small, .ws-stock-receipt small,
.fin-form-note, .fin-inline-note, .fin-help, .fin-full-help, .fin-total small, .fin-panel-heading p,
.fin-next p, .fin-choice-label, .fin-status-banner span, .fin-number small,
.funds-form-note, .funds-note, .inv-count-guide, .inv-note:not(.inv-count-progress):not(.inv-count-empty),
.labor-import-note, .pos-hint, .pos-import-help, .price-alert-help, .rv-help, .simple-help-note,
.daily-totals > small.muted, .settings-grid .backup-area p, .settings-grid form > small,
.simple-owner-actions > span, .preview-banner > span { display: none !important; }
#content[data-route="count"] .inv-subnav, #content[data-route="loss"] .inv-subnav,
#content[data-route="count"] .pagehead a[href="#inventory"], #content[data-route="settings"] > .flex.wrap.section-gap { display: none !important; }
.preview-banner { padding-top: 3px; padding-bottom: 3px; font-size: 12px; }
.pagehead { margin-bottom: 14px; }

/* ---- Page frame ---- */
.ops-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.ops-head h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.ops-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-panel { padding: 14px 16px; margin-bottom: 14px; }
.ops-panel > summary { cursor: pointer; font-weight: 600; color: #68584c; }
.ops-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ops-panel-head h2, .ops-more h2 { margin: 0; font-size: 16px; }
.ops-empty { color: #897869; margin: 8px 0; padding: 4px 0; }
.ops-foot-links { color: #897869; font-size: 13px; margin: 4px 2px 18px; }
.ops-foot-links a { color: #9f342d; }
.ops-spacer { flex: 1; }
.ops-sub { font-size: 13px; color: #897869; margin: 14px 0 6px; font-weight: 600; }
.ops-zero { color: #d2c3b1; }
.ops-live { font-weight: 600; color: #68584c; margin: 12px 0 0; }

/* ---- KPI strip ---- */
.ops-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ops-kpi { background: #fff; border: 1px solid #efe3d4; border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ops-kpi span { font-size: 12px; color: #897869; }
.ops-kpi strong { font-size: 20px; color: #2f2925; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-kpi.accent { background: #9f342d; border-color: #9f342d; }
.ops-kpi.accent span { color: #f3d9c9; }
.ops-kpi.accent strong { color: #fff; }
.ops-kpi.neg strong { color: #b74d3e; }
.ops-kpi.pos strong { color: #214e3b; }
.ops-kpis-small .ops-kpi strong { font-size: 17px; }
.ops-kpis-wide { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.ops-kpis-wide .ops-kpi strong { font-size: 18px; }

/* ---- Controls ---- */
.ops-segment { display: inline-flex; border: 1px solid #e7d8c7; border-radius: 9px; overflow: hidden; background: #fff; }
.ops-segment button { border: 0; background: transparent; padding: 7px 12px; font: inherit; font-size: 13px; color: #68584c; cursor: pointer; }
.ops-segment button + button { border-left: 1px solid #efe3d4; }
.ops-segment button.active { background: #9f342d; color: #fff; }
.ops-stepper { display: inline-flex; align-items: center; border: 1px solid #e7d8c7; border-radius: 9px; background: #fff; }
.ops-stepper span { padding: 0 8px; font-weight: 600; white-space: nowrap; }
.ops-stepper button { border: 0; background: transparent; font-size: 18px; width: 32px; height: 34px; cursor: pointer; color: #9f342d; }
.ops-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.ops-toolbar select, .ops-toolbar input[type=date] { height: 34px; padding: 0 8px; border-radius: 8px; width: auto; flex: 0 0 auto; max-width: 220px; }
.ops-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #77695f; white-space: nowrap; }
.ops-search { flex: 1 1 200px; max-width: 320px; margin: 0; display: block; position: relative; }
.ops-search input { width: 100%; box-sizing: border-box; padding-left: 36px; }
/* Search magnifier: centred on the input whatever its height (pages and dialogs). */
.ops-search > .icon, .modal .search > .icon { top: 50%; transform: translateY(-50%); left: 12px; width: 16px; height: 16px; pointer-events: none; }
.btn.small.danger, .btn.outline.danger { color: #b74d3e; border-color: #ecc7c0; }

/* ---- Compact tables: one line per row ---- */
.ops-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ops-table th { font-size: 12px; font-weight: 600; padding: 7px 8px; white-space: nowrap; text-align: left; position: sticky; top: 0; z-index: 1; }
.ops-table td { padding: 6px 8px; vertical-align: middle; white-space: nowrap; }
.ops-table .right { text-align: right; }
.ops-table .cell-main { font-weight: 600; }
.ops-table .cell-sub { font-weight: 400; font-size: 12px; white-space: normal; }
.ops-table td.cell-sub { white-space: nowrap; }
.ops-table td.strong, .ops-table .strong { font-weight: 700; }
.ops-table tfoot td { font-weight: 700; border-top: 2px solid #efe3d4; background: #fffaf4; }
.ops-table tbody tr:hover { background: #fffaf4; }
.ops-table tr.clickable { cursor: pointer; }
.ops-table input, .ops-table select { height: 30px; padding: 0 6px; border-radius: 6px; font-size: 13px; min-width: 0; }
.ops-table .ops-in-qty, .ops-table .ops-in-price, .ops-table .ops-count-in { width: 68px; text-align: right; }
.ops-table .ops-in-unit { width: 58px; }
.ops-table .ops-in-supplier { width: 120px; }
.ops-table td.neg, .ops-table .neg { color: #b74d3e; }
.ops-matrix td.num a { color: inherit; text-decoration: none; }
.ops-matrix td.num a:hover { color: #9f342d; text-decoration: underline; }
.ops-cell-link { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.ops-cell-link:hover { color: #9f342d; text-decoration: underline; }
.ops-matrix th .link { font-size: 12px; font-weight: 600; padding: 0; }
.ops-row-empty td { color: #c5b6a5; }
.ops-stock-table .ops-st-low td:first-child, .ops-stock-table .ops-st-bad td:first-child { box-shadow: inset 3px 0 0 #b74d3e; }
.ops-stock-table .ops-st-refill td:first-child { box-shadow: inset 3px 0 0 #d9a35b; }
.ops-table tr.ops-group-row td { background: #f6efe5; color: #68584c; font-weight: 700; font-size: 12px; padding: 5px 8px; letter-spacing: 1px; }
.ops-flag { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; background: #f6e3cd; color: #a96c24; font-size: 11px; font-weight: 700; }

.ops-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; background: #eaf0e9; color: #214e3b; white-space: nowrap; }
.ops-badge.warn { background: #fbecd9; color: #a96c24; }
.ops-badge.bad { background: #f8e1dd; color: #b74d3e; }
.ops-badge.info { background: #e6eef6; color: #2f5f8a; }
.ops-badge.void { background: #f1ece5; color: #897869; }

/* ---- Requisition form ---- */
.ops-req-top { display: flex; gap: 10px; flex-wrap: wrap; }
.ops-req-top .field { flex: 0 0 170px; }
.ops-req-top .ops-grow { flex: 1 1 220px; }
.ops-lines { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.ops-line { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(70px, 1fr) minmax(64px, 1fr) minmax(100px, 2fr) 34px; gap: 6px; align-items: center; }
.ops-line input { height: 38px; padding: 0 10px; border-radius: 8px; min-width: 0; width: 100%; }
.ops-x { border: 0; background: transparent; font-size: 20px; color: #b09a80; cursor: pointer; height: 38px; }
.ops-form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.ops-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ops-check { margin: 10px 0 0; }
.ops-other { display: block; font-size: 12px; color: #a96c24; margin-top: 3px; }

/* ---- Home ---- */
.ops-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ops-todo a, .ops-todo button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 4px; border: 0; border-top: 1px solid #f6efe5; background: none; color: inherit; text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.ops-todo > :first-child { border-top: 0; }
.ops-todo a .icon, .ops-todo button .icon { margin-left: auto; width: 16px; color: #b09a80; }
.ops-todo .ops-dot.warn { background: #c9842b; }
.ops-dot { width: 8px; height: 8px; border-radius: 50%; background: #a96c24; flex: none; }
.ops-big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ops-big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; background: #fff; border: 1px solid #efe3d4; border-radius: 14px; color: #2f2925; text-decoration: none; }
.ops-big .icon { width: 26px; height: 26px; color: #9f342d; }
.ops-big:first-child { background: #9f342d; color: #fff; border-color: #9f342d; }
.ops-big:first-child .icon { color: #fff; }
.ops-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ops-more .panel { padding: 12px 14px; }
.ops-more a { display: flex; align-items: center; gap: 8px; padding: 9px 2px; color: inherit; text-decoration: none; border-top: 1px solid #f6efe5; }
.ops-more a .icon:last-child { margin-left: auto; width: 14px; color: #b09a80; }

/* ---- Revenue report preview ---- */
.ops-report { margin-top: 14px; }
.ops-report-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ops-report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ops-calc { border: 1px solid #efe3d4; border-radius: 10px; padding: 8px 12px; }
.ops-calc h3 { font-size: 13px; color: #897869; margin: 0 0 4px; }
.ops-calc div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.ops-calc div b { font-variant-numeric: tabular-nums; }
.ops-calc div.total { border-top: 1px solid #efe3d4; margin-top: 3px; padding-top: 6px; font-weight: 700; }
.ops-warn-list { margin: 10px 0 0; padding: 8px 12px 8px 28px; background: #fdf5ea; border-radius: 8px; color: #8a5a1f; font-size: 13px; }
.ops-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.ops-cats div { border: 1px solid #efe3d4; border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.ops-cats span { font-size: 12px; color: #897869; }
.ops-cats strong { font-size: 16px; }
.ops-cats small { font-size: 12px; color: #a3927f; }

/* ---- Overview bar ---- */
.ops-bar-cell { width: 120px; }
.ops-bar { display: block; height: 8px; border-radius: 4px; background: #6f9a7f; }
.ops-bar.neg { background: #d58b7e; }
.ops-bar.w0 { width: 2%; } .ops-bar.w1 { width: 10%; } .ops-bar.w2 { width: 20%; } .ops-bar.w3 { width: 30%; }
.ops-bar.w4 { width: 40%; } .ops-bar.w5 { width: 50%; } .ops-bar.w6 { width: 60%; } .ops-bar.w7 { width: 70%; }
.ops-bar.w8 { width: 80%; } .ops-bar.w9 { width: 90%; } .ops-bar.w10 { width: 100%; }

/* ---- Compact detail pages ---- */
.ops-filters { margin-top: 0; }
.ops-filters input[type=date], .ops-filters input[type=search], .ops-filters select { height: 34px; padding: 0 8px; border-radius: 8px; width: auto; max-width: 180px; flex: 0 1 auto; font-size: 13px; }
.ops-filters .chip { height: 30px; }
.ops-toolbar .hq-date-control { width: auto; flex: 0 0 auto; display: inline-flex; }
.ops-toolbar .hq-date-control input[type=date] { width: 150px; max-width: 150px; }
.ops-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; color: #77695f; font-size: 13px; }
.ops-table td.ops-wrap, .ops-table .ops-wrap { white-space: normal; min-width: 160px; }
.ops-nowrap { white-space: nowrap; }
.ops-loss-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.ops-loss-row .field { margin: 0; min-width: 0; flex: 1 1 150px; }
.ops-loss-row .field:nth-child(3) { flex: 0 1 90px; }
.ops-loss-row .field:nth-child(4) { flex: 2 1 180px; }
.ops-loss-row .field:nth-child(5) { flex: 0 1 200px; }
.ops-loss-row .btn { flex: 0 0 auto; }
.ops-loss-row input, .ops-loss-row select { height: 38px; }
.ops-calc-line { display: flex; flex-wrap: wrap; gap: 6px 22px; border: 0; padding: 0; }
.ops-calc-line > div { flex-direction: column; justify-content: flex-start; gap: 2px; padding: 0; }
.ops-calc-line > div span { font-size: 12px; color: #897869; }
.ops-calc-line > div b { font-size: 16px; }
.ops-calc-line > div.total { border-top: 0; margin-top: 0; padding-top: 0; }
.ops-calc-line > div.total b { color: #9f342d; }
.ops-note-panel p { margin: 4px 0; color: #68584c; }
.ops-panel-head .ops-actions .ops-search { max-width: 220px; }
#content .usage-current-preview:empty { display: none; }
/* Remaining older pages: same header weight as the new ones. */
#content .pagehead { align-items: center; }
#content .pagehead h1 { font-size: 24px; margin: 0; }

/* ---- Searchable picker (suppliers / ingredients) ---- */
.ops-pick-btn { height: 30px; min-width: 96px; max-width: 150px; padding: 0 8px; border: 1px solid #e7d8c7; border-radius: 6px; background: #fff; font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2f2925; }
.ops-pick-btn.empty { color: #a96c24; border-style: dashed; }
.ops-tag-btn { display: inline-block; margin-left: 4px; padding: 1px 7px; border: 0; border-radius: 999px; background: #fbecd9; color: #a96c24; font: inherit; font-size: 12px; line-height: 18px; font-weight: 400; cursor: pointer; vertical-align: 1px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.ops-tag-btn.linked { background: #eaf0e9; color: #214e3b; }
.ops-picker .ops-search { max-width: none; margin-bottom: 8px; }
.ops-picker-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; }
.ops-picker-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px; border: 0; border-bottom: 1px solid #f6efe5; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.ops-picker-row:hover, .ops-picker-row:focus { background: #fffaf4; }
.ops-picker-row small { color: #897869; font-size: 12px; }
.ops-line { position: relative; }
.ops-suggest { position: absolute; top: 40px; left: 0; z-index: 20; min-width: 220px; background: #fff; border: 1px solid #e7d8c7; border-radius: 8px; box-shadow: 0 10px 24px #23332622; display: flex; flex-direction: column; overflow: hidden; }
.ops-suggest button { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 0; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.ops-suggest button:hover { background: #fffaf4; }
.ops-suggest small { color: #897869; }
.ops-perm-list { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 4px; }
.ops-perm-tags { display: inline-flex; gap: 4px; margin-right: 8px; flex-wrap: wrap; }

/* ---- Receipt photos: thumbnails, upload button, hover zoom ---- */
.ops-photo-btn { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.ops-photo-btn .icon { width: 16px; height: 16px; }
.ops-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ops-thumbs { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ops-thumb { position: relative; display: inline-block; vertical-align: middle; }
.ops-thumb + .ops-thumb { margin-left: 4px; }
.ops-thumb img { display: block; width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid #e7d8c7; cursor: zoom-in; background: #fff; }
.ops-thumb.small img { width: 26px; height: 26px; border-radius: 4px; }
.ops-thumb.small + .ops-thumb.small { margin-left: 2px; }
.ops-thumb-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; line-height: 16px; padding: 0; border-radius: 50%; border: 1px solid #e7d8c7; background: #fff; color: #b74d3e; font-size: 13px; cursor: pointer; }
.ops-photo-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: #e6eef6; color: #2f5f8a; font-size: 12px; line-height: 18px; cursor: zoom-in; white-space: nowrap; }
.ops-photo-chip .icon { width: 13px; height: 13px; }
.photos img { cursor: zoom-in; }
.ops-zoom { position: fixed; top: 50%; right: 16px; z-index: 1000; transform: translateY(-50%); padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 18px 48px #23332655; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s; }
.ops-zoom.left { right: auto; left: 16px; }
.ops-zoom.show { opacity: 1; visibility: visible; }
.ops-zoom img { display: block; max-width: min(46vw, 760px); max-height: 88vh; border-radius: 6px; }
.ops-names { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ops-person { display: inline-block; max-width: 96px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.ops-link { color: #9f342d; font-size: 12px; }
.ops-people-line { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -6px 0 14px; color: #77695f; font-size: 13px; }
.ops-people-line strong { color: #2f2925; }

/* ---- Supplier statement: expandable goods list ---- */
.ops-expand::before { content: "▸"; display: inline-block; width: 14px; color: #b09a80; transition: transform .12s; }
.ops-expand.open::before { transform: rotate(90deg); }
.ops-table tr.ops-sub-row > td { background: #fffaf4; padding: 4px 8px 10px 22px; white-space: normal; }
.ops-table tr.ops-sub-row:hover { background: transparent; }
/* width 0 + min-width 100%: the goods list scrolls on its own instead of widening the statement table. */
.ops-sub-wrap { width: 0; min-width: 100%; overflow-x: auto; }
.ops-sub-table { font-size: 13px; background: #fff; border: 1px solid #efe3d4; border-radius: 8px; }
.ops-sub-table th { position: static; background: #f6efe5; }
.ops-sub-table td { padding: 5px 8px; }
.ops-sub-table tfoot td { background: #fffaf4; }

/* ---- 月底对账 checklist ---- */
.ops-checklist { display: flex; flex-direction: column; }
.ops-check-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 76px 96px; grid-template-areas: "name amt state act"; align-items: center; gap: 4px 14px; padding: 10px 6px; border-top: 1px solid #f6efe5; }
.ops-check-row:first-child { border-top: 0; }
.ops-check-name { grid-area: name; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ops-check-name strong { font-size: 15px; }
.ops-check-links { font-size: 13px; color: #b09a80; }
.ops-check-links .link { font-size: 13px; padding: 0; }
.ops-check-links .ops-fill-now { color: #9f342d; font-weight: 700; text-decoration: underline; }
.ops-check-amt { grid-area: amt; text-align: right; font-variant-numeric: tabular-nums; }
.ops-check-state { grid-area: state; }
.ops-check-act { grid-area: act; text-align: right; }
.ops-check-act .btn { min-width: 76px; }
.ops-check-missing, .ops-check-stale { background: #fffaf4; }

/* ---- 营业收入 按日 (shift report layout) ---- */
.ops-stepper input[type=date] { border: 0; background: transparent; height: 34px; padding: 0 4px; font: inherit; font-weight: 600; width: 140px; }
.ops-shift div.total.grand { border-top: 2px solid #9f342d; color: #9f342d; font-size: 16px; }
.ops-shift div span { color: #4b3f37; }
.ops-table td.ops-indent { padding-left: 24px; color: #4b3f37; }
.ops-cash .ops-panel-head h2 .cell-sub { font-weight: 400; margin-left: 6px; }
.ops-wine-gift { margin: 10px 0 4px; padding: 10px 12px; border: 1px dashed #e7d8c7; border-radius: 10px; background: #fffaf4; }
.ops-wine-gift .ops-form-grid { margin-top: 8px; }

/* ---- 收支总览: two lines that read like sums ---- */
.ops-flow { display: flex; flex-direction: column; gap: 18px; }
.ops-flow-row + .ops-flow-row { border-top: 1px solid #f1e6d8; padding-top: 16px; }
.ops-flow-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ops-flow-title strong { font-size: 16px; }
.ops-flow-title span { font-size: 13px; color: #897869; }
.ops-flow-sum { display: flex; align-items: stretch; flex-wrap: wrap; gap: 6px; }
.ops-flow-box { flex: 1 1 120px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid #efe3d4; border-radius: 10px; background: #fff; }
.ops-flow-box span { font-size: 12px; color: #897869; }
.ops-flow-box strong { font-size: 18px; color: #2f2925; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops-flow-box strong.neg { color: #b74d3e; }
.ops-flow-box small { font-size: 11px; color: #a3927f; line-height: 1.4; }
.ops-flow-box.accent { background: #fbf1ea; border-color: #f0d9c9; }
.ops-flow-box.result { background: #9f342d; border-color: #9f342d; }
.ops-flow-box.result span { color: #f3d9c9; }
.ops-flow-box.result strong, .ops-flow-box.result strong.neg { color: #fff; }
.ops-flow-op { align-self: center; font-size: 20px; font-weight: 700; color: #b09a80; padding: 0 2px; }
.ops-flow-links { margin-top: 8px; font-size: 13px; color: #b09a80; }
.ops-flow-links .link { font-size: 13px; padding: 0; }
.ops-reset-groups { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.ops-reset-groups small { color: #897869; margin-left: 4px; }
.ops-danger-panel h2 { color: #b74d3e; }

/* ---- Recipe search, unit add, chips ---- */
.ops-hidden-select { display: none !important; }
.recipe-ingredient { position: relative; }
.recipe-ingredient .ops-suggest { top: 100%; }
.ops-recipe-q { width: 100%; min-width: 0; }
.ops-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ops-chips .chip { height: 28px; padding: 0 10px; }
.ops-unit-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 10px 12px; margin: 6px 0 10px; border: 1px dashed #e7d8c7; border-radius: 10px; background: #fffaf4; }
.ops-unit-add .field { margin: 0; flex: 1 1 140px; }
.ops-thumbs:empty { display: none; }

/* ---- 录入现有库存 ---- */
.ops-open-head, .ops-open-line { display: grid; grid-template-columns: minmax(130px, 2.2fr) minmax(64px, 0.9fr) minmax(60px, 0.8fr) minmax(76px, 0.9fr) minmax(90px, 1.2fr) 30px; gap: 6px; align-items: center; }
.ops-open-head { font-size: 12px; color: #897869; margin: 10px 0 4px; }
.ops-open-lines { display: flex; flex-direction: column; gap: 6px; }
.ops-open-line input, .ops-open-line select { height: 36px; padding: 0 8px; border-radius: 8px; min-width: 0; width: 100%; font-size: 14px; }
.ops-open-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin: 8px 0 4px; border-radius: 10px; background: #fffaf4; border: 1px dashed #e7d8c7; }
.ops-open-tools .ops-spacer { flex: 1; }
.ops-open-find { max-width: 220px; }
.ops-open-line[hidden] { display: none; }
.ops-open-head { position: sticky; top: -1px; z-index: 2; background: #fff; padding: 4px 0; }
.ops-sticky-actions { position: sticky; bottom: -1px; z-index: 2; background: #fff; padding: 10px 0 6px; border-top: 1px solid #efe3d4; }
.ops-sticky-actions #ops-open-count { margin-right: auto; }
.ops-draft-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #eef6f1; color: #214e3b; font-size: 13px; }
.ops-draft-note .link { font-size: 13px; padding: 0; }
.ops-cash-line { margin: -4px 2px 14px; }
.ops-cash-line .link { font-size: 13px; padding: 0; }

/* ---- Supplier order sharing ---- */
.ops-share { margin-top: 0; }
.ops-share select { height: 34px; padding: 0 8px; border-radius: 8px; max-width: 220px; }
.ops-share .cell-sub { color: #a3927f; font-size: 12px; }
.ops-copy-buffer { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---- Settings permission toggle ---- */
.ops-perm { margin-right: 10px; color: #897869; }
.ops-perm.on { color: #214e3b; font-weight: 600; }

/* ---- Pick-or-type inputs ---- */
/* Every dropdown looks the same: native selects and pick-or-type fields share the
   border, corner, white background and the small caret on the right. */
select:not([multiple]), .ops-combo-input { -webkit-appearance: none; appearance: none; background-color: #fff; border: 1px solid #e7d8c7; border-radius: 8px; color: #3b2f25;
  background-image: linear-gradient(45deg, transparent 50%, #a3927f 50%), linear-gradient(135deg, #a3927f 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px !important; text-overflow: ellipsis; }
select:not([multiple]):disabled, .ops-combo-input:disabled { background-color: #f6f1ea; color: #a3927f; }
select::-ms-expand { display: none; }
.ops-in-short { width: 76px; }
.ops-order-table .ops-in-unit { width: 80px; }

/* 记一笔费用 / 调料: two or three mutually exclusive choices */
.ops-seg-radio { display: inline-flex; flex-wrap: wrap; border: 1px solid #e7d8c7; border-radius: 9px; overflow: hidden; background: #fff; margin: 4px 0 12px; }
.ops-seg-opt { position: relative; display: inline-flex; align-items: center; padding: 8px 14px; font-size: 14px; color: #68584c; cursor: pointer; }
.ops-seg-opt + .ops-seg-opt { border-left: 1px solid #efe3d4; }
.ops-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ops-seg-opt:has(input:checked) { background: #9f342d; color: #fff; }
.ops-seg-opt:focus-within { outline: 2px solid #9f342d55; outline-offset: -2px; }
.ops-full { grid-column: 1 / -1; }
.field[hidden], .ops-only-cost[hidden], .ops-only-deposit[hidden] { display: none !important; }
.ops-cost-live { font-weight: 400; font-size: 13px; line-height: 1.7; background: #fffaf4; border-radius: 8px; padding: 0 10px; }
.ops-cost-live:not(:empty) { padding: 8px 10px; }
.ops-season { margin: 4px 0 6px; padding: 10px 12px; border: 1px dashed #e7d8c7; border-radius: 10px; background: #fffaf4; }
.ops-season-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; font-weight: 600; color: #3b2f25; }
.ops-season-head .ops-seg-radio { margin: 0; }
.ops-season .ops-season-fields { margin-top: 10px; align-items: start; }
.ops-season .ops-live { margin-top: 6px; font-weight: 400; font-size: 13px; }
.ops-recipe-cost { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 4px; max-width: 420px; }
#v22-recipe .preview-formgrid { align-items: start; }

/* Duplicate ingredients (鸡蛋 / 草鸡蛋) */
.ops-dupes { border-color: #ecd3a8; background: #fffaf0; }
.ops-dupe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px dashed #efe3d4; }
.ops-dupe-row:first-of-type { border-top: 0; }
.ops-dupe-row > span { margin-right: auto; }
.ops-merge-opts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.ops-merge-opt { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #e7d8c7; border-radius: 10px; cursor: pointer; }
.ops-merge-opt:has(input:checked) { border-color: #9f342d; background: #fbf1ee; }
.ops-open-hint { grid-column: 1 / -1; font-size: 13px; color: #8a5a1c; background: #fff6e6; border-radius: 8px; padding: 5px 8px; }
.ops-open-at { max-width: 360px; margin: 4px 0 8px; }
.ops-open-at small { display: block; margin-top: 4px; }
.ops-start-hint { display: block; margin-top: 4px; font-weight: 400; }
.ops-group-total { margin-left: 6px; }
.ops-price-hint { margin-top: 4px; font-size: 12px; line-height: 1.5; min-width: 150px; max-width: 240px; white-space: normal; }
.ops-price-hint:empty { display: none; }
.ops-price-hint .ops-badge { font-size: 11px; }

/* A unit an ingredient does not have yet: 1 箱 = ? 斤 */
.ops-unit-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: #fffaf4; border: 1px dashed #e7d8c7; font-size: 13px; font-weight: 400; }
.ops-unit-ask input { width: 70px; height: 30px; padding: 0 6px; border-radius: 6px; }
td .ops-unit-ask { margin: 4px 0 0; }

/* 待收货 grouped by supplier, with one photo button per group */
.ops-table tr.ops-sup-group td { letter-spacing: 0; font-weight: 400; padding: 7px 8px; }
.ops-sup-group td > * { margin-right: 10px; vertical-align: middle; }
.ops-sup-group .ops-sup-name { font-weight: 700; font-size: 14px; color: #3b2f25; }
.ops-sup-group .ops-photo-btn { background: #fff; }
.ops-combo-menu { position: fixed; z-index: 3000; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #e7d8c7; border-radius: 10px; box-shadow: 0 8px 24px rgba(60, 40, 20, .16); padding: 4px; }
.ops-combo-menu[hidden] { display: none; }
.ops-combo-menu button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 14px; color: #3b2f25; cursor: pointer; }
.ops-combo-menu button small { color: #a3927f; font-size: 12px; white-space: nowrap; }
.ops-combo-menu button:hover, .ops-combo-menu button.active { background: #f6ede2; }
.ops-combo-menu .ops-combo-new { color: #214e3b; font-weight: 600; border-top: 1px dashed #efe3d4; border-radius: 0 0 7px 7px; }
.ops-combo-menu .ops-empty { margin: 0; padding: 8px 10px; color: #a3927f; font-size: 13px; }
.ops-new-ing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; background: #fffaf4; border: 1px dashed #e7d8c7; font-size: 13px; }
.ops-new-ing input { height: 32px; padding: 0 8px; border-radius: 8px; width: 120px; }

/* ---- 收款手续费 ---- */
.ops-fees { display: flex; flex-direction: column; gap: 6px; }
.ops-fee-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.ops-fee-row input { height: 32px; width: 110px; padding: 0 8px; margin: 0 4px; border-radius: 8px; }
.ops-fee-row.total { border-top: 1px solid #efe3d4; padding-top: 6px; font-weight: 600; }

@media (max-width: 760px) {
  .ops-open-find { max-width: none; flex: 1 1 100%; }
  .ops-head h1 { font-size: 20px; }
  .ops-head { align-items: flex-start; }
  .ops-actions { width: 100%; }
  .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ops-kpi strong { font-size: 17px; }
  .ops-kpis-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-panel { padding: 10px; }
  .hide-sm { display: none; }
  .ops-table { font-size: 13px; }
  .ops-table th, .ops-table td { padding: 6px 5px; }
  .ops-lines { gap: 10px; }
  .ops-line { grid-template-columns: 1fr 1fr 1.3fr 30px; padding-bottom: 10px; border-bottom: 1px dashed #efe3d4; }
  .ops-line [name=name] { grid-column: 1 / 4; }
  .ops-line .ops-x { grid-row: 1; grid-column: 4; }
  .ops-line [name=note] { grid-column: 3 / 5; }
  .ops-toolbar .ops-spacer { display: none; }
  .ops-table td.cell-main { white-space: normal; min-width: 72px; }
  .ops-loss-row .field, .ops-loss-row .field:nth-child(n) { flex: 1 1 40%; }
  .ops-loss-row .btn { flex: 1 1 100%; }
  .ops-filters input[type=date], .ops-filters select, .ops-filters input[type=search] { max-width: none; flex: 1 1 140px; }
  .ops-panel-head { flex-wrap: wrap; }
  .ops-search { max-width: none; }
  .ops-table td.ops-names { white-space: normal; max-width: 140px; min-width: 90px; }
  .ops-check-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name amt" "state act"; padding: 10px 2px; }
  .ops-check-name { flex-direction: column; gap: 2px; }
  .ops-share .cell-sub { display: none; }
  .ops-open-head { display: none; }
  .ops-flow-box { flex: 1 1 38%; }
  .ops-flow-title { flex-direction: column; gap: 2px; }
  .ops-open-line { grid-template-columns: 1fr 1fr; position: relative; padding: 0 32px 8px 0; border-bottom: 1px dashed #efe3d4; }
  .ops-open-line [name=name] { grid-column: 1 / 3; }
  .ops-open-line .ops-x { position: absolute; right: 0; top: 0; }
  .ops-table tr.ops-sub-row > td { padding: 4px 2px 8px; }
}
