/* Admin pages: orders, sales, menu, stock, people, settings, activity. */

/* ---- shared bits ---- */
.op-right { margin-left: auto; }
.op-count { margin: -4px 0 8px; min-height: 1em; }
.op-h { font-size: 14px; margin: 18px 0 6px; }
.op-sub { font-weight: 600; margin-left: 6px; }
.op-struck { text-decoration: line-through; }
.op-gap { display: inline-block; width: 16px; }
.op-flat { background: none; }
.op-flat td { padding-left: 0; }
.op-flat td.n { padding-right: 0; }
.op-qty { width: 1%; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.op-grouprow td { font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--bg); padding-top: 6px; padding-bottom: 6px; }
.op-tabs { margin-bottom: 16px; }
.op-tabs .tab { display: inline-flex; align-items: center; text-decoration: none; }
.op-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.op-check input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.op-check + .op-check { border-top: 1px solid var(--line); }
.op-help { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.op-sec { font-size: 13px; font-weight: 700; margin: 6px 0 8px; }
.op-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.op-dim td { color: var(--muted); }
@media (max-width: 560px) { .op-hide-sm { display: none; } }

/* ---- orders ---- */
.op-ostate { display: flex; gap: 14px; margin-bottom: 8px; }
.op-odetail { gap: 0 24px; }
.op-totals { margin-top: 4px; }
.op-entries { line-height: 2; }

/* ---- sales ---- */
.op-custom { display: inline-flex; gap: 6px; align-items: center; }
.op-bars { height: 170px; }
.op-bars .b i { width: 72%; }
.op-cut .op-extra { display: none; }
.op-strip8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.op-strip8 > div:nth-child(n+5) { border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .op-strip8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-strip8 > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media print { .op-cut .op-extra { display: table-row; } }

/* ---- menu ---- */
.op-block { margin-bottom: 14px; }
.op-after { margin-top: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.op-top { margin-top: 0; }
.op-note { margin-top: 6px; }
.op-fit { width: 1%; }
.op-costs { margin-top: 16px; }
.op-apply { border-top: 1px solid var(--line); margin-top: 6px; }
.op-menu { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.op-cats { padding: 6px 0; }
.op-cat { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 14px; text-align: left; font-weight: 600; font-size: 14px; color: var(--ink); border-left: 3px solid transparent; }
.op-cat:hover { background: var(--hover); }
.op-cat.on { color: var(--navy); border-left-color: var(--navy); background: var(--tint); }
.op-cat.off { color: var(--muted); }
.op-cat .c { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.op-addcat { padding: 8px 14px 4px; }
@media (max-width: 760px) {
  .op-menu { grid-template-columns: 1fr; }
  .op-cats { display: flex; overflow-x: auto; padding: 0; scrollbar-width: none; }
  .op-cats::-webkit-scrollbar { display: none; }
  .op-cat { width: auto; flex: none; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .op-cat.on { border-bottom-color: var(--navy); background: none; }
  .op-cat .c { display: none; }
  .op-addcat { flex: none; padding: 4px 8px; display: flex; align-items: center; }
}
.op-item { display: flex; gap: 12px; align-items: center; padding: 10px 16px; cursor: pointer; }
.op-item:hover { background: var(--hover); }
.op-ibody { flex: 1; min-width: 0; }
.op-iname { font-weight: 600; }
.op-isub { font-size: 13px; color: var(--muted); }
.op-iprice { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.op-iend { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.op-item.off .op-iname, .op-item.off .thumb, .op-item.off .op-iprice { opacity: .55; }
.op-sizes .row, .op-recipe .row, .op-opts .row, .op-apps .row { margin-bottom: 8px; }
.op-sizes .in[name=price] { max-width: 130px; text-align: right; }
.op-photo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.op-photo .thumb { width: 64px; height: 64px; font-size: 18px; }
.op-file { position: relative; overflow: hidden; }
.op-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.op-file[aria-busy=true] { opacity: .5; pointer-events: none; }
.op-colour { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.op-colour input[type=color] { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.op-recipe select[name=size] { max-width: 130px; }
.op-recipe .in[name=qty] { max-width: 100px; text-align: right; }
.op-recipe .u { width: 30px; color: var(--muted); font-size: 13px; flex: none; }
.op-recipe .c { width: 80px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.op-x { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); flex: none; }
.op-x:hover { background: var(--hover); color: var(--red); }
.op-group + .op-group { margin-top: 16px; }
.op-opts .in[name=oprice] { max-width: 96px; text-align: right; }
@media (max-width: 560px) {
  .op-opts .row { flex-wrap: wrap; }
  .op-opts .in[name=oname], .op-opts .in[name=oname_my] { flex-basis: 45%; }
}
.op-price { width: 140px; }

/* ---- stock ---- */
.op-search { min-width: 200px; }
.op-gapv { margin: 14px 0 4px; }

/* ---- people ---- */
.op-code { font-size: 44px; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; text-align: center; color: var(--navy); padding: 14px 0 2px; }
.op-center { text-align: center; }
.op-steps { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.op-roles { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 14px; }
@media (max-width: 560px) { .op-roles { grid-template-columns: 1fr; gap: 2px; } .op-roles span { margin-bottom: 8px; color: var(--muted); } }

/* ---- settings ---- */
.op-qr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 600px; }
.op-qr figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.op-qr figcaption { font-weight: 700; font-size: 14px; }
.op-qr .pic { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg) center / contain no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .op-qr { grid-template-columns: 1fr 1fr; } }
.op-pct { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.op-pct .in { width: 76px; text-align: right; }
@media (max-width: 640px) { .op-apps .row { flex-wrap: wrap; } .op-apps .in[name=appname] { flex-basis: 100%; } }
.op-radio { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.op-radio input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.op-after2 { margin-top: 12px; }
.op-progress { align-self: center; }

/* ---- activity ---- */
.op-dayrow td { background: var(--bg); font-weight: 700; font-size: 13px; padding-top: 7px; padding-bottom: 7px; }
.op-show-sm { display: none; }
@media (max-width: 560px) {
  .op-show-sm { display: inline; }
  .op-otable thead, .op-otable .op-c-x, .op-otable .op-c-sub { display: none; }
  .op-otable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .op-otable tr:last-child { border-bottom: 0; }
  .op-otable td { padding: 0; border: 0; }
  .op-otable .op-c-no { grid-area: 1 / 1; }
  .op-otable .op-c-total { grid-area: 1 / 2; font-weight: 700; }
  .op-otable .op-c-cust { grid-area: 2 / 1; }
  .op-otable .op-c-state { grid-area: 2 / 2; text-align: right; }
}
.op-states { display: flex; flex-direction: column; gap: 2px; }
.op-ro .in:disabled, .in.op-lock:disabled { background: var(--bg); color: var(--muted); opacity: 1; }
.op-rowact { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; align-items: center; }
