/* 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; }

/* ---- 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; }
.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 .ops-in-ing { display: block; width: 120px; margin-top: 3px; }
.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-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 { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid #f6efe5; color: inherit; text-decoration: none; }
.ops-todo a:first-child { border-top: 0; }
.ops-todo a .icon { margin-left: auto; width: 16px; color: #b09a80; }
.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: grid; grid-template-columns: minmax(150px, 1.6fr) minmax(130px, 1.2fr) 90px minmax(140px, 2fr) 190px auto; gap: 8px; align-items: end; }
.ops-loss-row .field { margin: 0; }
.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; }

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

@media (max-width: 760px) {
  .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 { grid-template-columns: 1fr 1fr; }
  .ops-loss-row .btn { grid-column: 1 / -1; }
  .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; }
}
