/* Shared Ops UI. Palette and controls follow apps/mobile/styles/theme.ts. */
@font-face {
  font-family: 'InterVariable';
  src: url('/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #0a0a0a; --panel: #141414; --line: #272727; --text: #ffffff;
  --dim: #898989; --accent: #7cff00; --ok: #7cff00; --warn: #f5ab57;
  --bad: #ff4259; --chip: #1e1e1e; --blue: #6657ff; --violet: #978dff;
  --ink: #0a0a0a; --accent-soft: #7cff001f; --radius: 14px;
  /* Tinted status surfaces, taken from the internal staff app's convention
     (apps/internal/app/globals.css .status-badge.*): a fixed pair of .07 fill
     and .24 border for every status colour. Ops had invented nine different
     alphas for the same job. The staff app is the right source here — it is
     the same kind of tool, solving the same problem. */
  --ok-soft: #32c86e12; --warn-soft: #f5ab5712; --bad-soft: #ff425912;
  --ok-line: #32c86e3d; --warn-line: #f5ab573d; --bad-line: #ff42593d;
  /* their second grey step (apps/web design-system.css --muted-bright) */
  --dim-bright: #b1b1b1;
}
/* both of their apps declare this; without it native controls render light */
:root { color-scheme: dark; }
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 'InterVariable', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: 40px;
}
body > header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
header .brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .5px; }
header .brand .brand-glyph {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 0;
  background: transparent; color: var(--accent);
}
header .brand .wordmark span { color: var(--accent); }
header .brand .ops-tag {
  color: var(--dim); font-size: 10.5px; letter-spacing: 1.5px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}
header nav { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
header nav::-webkit-scrollbar { display: none; }
@media (max-width: 560px) {
  body > header { padding: 10px 12px; gap: 8px; }
  /* Keep identity and sign-out reachable on a phone: hiding the whole block
     meant nobody could tell who was signed in, or hand the phone over. */
  header .who { font-size: 11.5px; width: 100%; order: 3; color: var(--dim);
    display: flex; gap: 8px; align-items: center; }
  header .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 55vw; }
}
header nav a {
  color: var(--dim); text-decoration: none; padding: 5px 10px; border-radius: 6px;
  font-size: 13.5px;
}
header nav a.active, header nav a:hover { color: var(--text); background: var(--chip); }
header .who { margin-left: auto; color: var(--dim); font-size: 13px; }
header .who b { color: var(--text); }
main { padding: 16px 18px; max-width: 1280px; margin: 0 auto; }
h2 { font-size: 17px; color: var(--text); font-weight: 550; margin: 24px 0 14px; letter-spacing: -.02em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.tile .n { font-size: 32px; font-weight: 500; letter-spacing: -.035em; }
.tile .l { color: #9d9d9d; font-size: 12px; margin-top: 2px; }
.tile.bad .n { color: var(--bad); }
.tile.ok .n { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--chip); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 11px; font-size: 12.5px; color: var(--dim);
}
.chip b { color: var(--text); margin-right: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: #bababa; font-size: 12px; font-weight: 500; padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
/* theirs: apps/web/app/styles/collection.css:446, :741, :829 — numbers that
   change must not shift width */
.mono, .cnt, .tile .n { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.s { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); white-space: nowrap; }
.s.vaulted-available { color: #32c86e; } .s.in-pool { color: #32c86e; }
.s.owned-by-user { color: #978dff; } .s.reserved, .s.redemption-requested { color: #f5ab57; }
.s.picking, .s.in-pick-tote, .s.packing, .s.packed { color: #f5ab57; }
.s.label-created, .s.awaiting-carrier, .s.carrier-accepted, .s.in-transit { color: #6657ff; }
.s.delivered { color: #32c86e; } .s.quarantined, .s.damaged, .s.missing { color: #ff4259; }
.s.received-unverified { color: #898989; }
.dim { color: var(--dim); } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .row.two { grid-template-columns: 3fr 2fr; } }
input, select, button, textarea {
  font: inherit; color: var(--text); background: var(--chip); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
}
input:focus { outline: none; border-color: var(--accent); }
button { background: #fff; color: #0a0a0a; border: 0; border-radius: 999px; font-weight: 550; cursor: pointer; transition: background .15s; }
button.ghost { border: 1px solid var(--line); background: transparent; color: var(--text); font-weight: 500; }
button:disabled { opacity: .45; cursor: not-allowed; }
/* both of their apps ring every control; ops had removed it entirely */
:is(button, input, select, textarea, a):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.scanbar { display: flex; gap: 8px; margin: 10px 0; }
.scanbar input { flex: 1; font-size: 17px; }
.big { font-size: 17px; padding: 12px 16px; }
.feedback { border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: var(--panel); border: 1px solid var(--line); }
.feedback.ok { border-color: #32c86e3d; background: #32c86e14; }
.feedback.err { border-color: #ff425952; background: #ff425914; }
/* amber: something needs a look before it is right, but nothing is broken —
   a placement that disagrees with the plan, a sealed box with no photo yet */
.feedback.warn { border-color: #f5ab5752; background: #f5ab5714; }
.feedback .h { font-weight: 700; margin-bottom: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: block; color: var(--dim); font-size: 12.5px; margin: 10px 0 4px; }
.cardpick { display: flex; flex-direction: column; gap: 6px; }
.cardpick button { text-align: left; background: var(--chip); color: var(--text); font-weight: 500; }
.cardpick button { border: 1px solid transparent; }
.cardpick button:hover { border-color: var(--accent); }
/* A chosen chip has to LOOK chosen. Removing .ghost was the idiom used
   elsewhere, but inside .cardpick the plain-button rule loses on specificity,
   so selected and unselected rendered identically — and on the pack bench the
   choice decides whether a one-of-one is recorded missing, damaged or fine. */
.cardpick button.picked { background: var(--accent); color: #0a0a0a;
  border-color: var(--accent); font-weight: 700; }
.login-box { max-width: 420px; margin: 10vh auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.login-box h1 { font-size: 20px; margin-bottom: 4px; }
.login-box p { color: var(--dim); font-size: 13.5px; margin-bottom: 14px; }
.evt { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.evt:last-child { border-bottom: 0; }
.evt .t { color: var(--dim); white-space: nowrap; font-size: 12px; min-width: 62px; }
.evt .k { min-width: 74px; font-weight: 600; }
.evt .k.intake { color: #32c86e; } .evt .k.putaway { color: #32c86e; }
.evt .k.play-award { color: #978dff; }
.evt .k.reserve { color: #f5ab57; } .evt .k.pick, .evt .k.pack { color: #f5ab57; }
.evt .k.label, .evt .k.ship { color: #6657ff; } .evt .k.count { color: #978dff; }
.evt .k.exception, .evt .k.freeze { color: #ff4259; } .evt .k.override { color: #f5ab57; }
.evt .k.pool-add { color: #32c86e; }
.evt .k.pool-remove { color: #f5ab57; }
footer { text-align: center; color: var(--dim); font-size: 12px; margin-top: 28px; }

/* --- scan result banner: unmissable green/red --- */
.scanresult { border-radius: 12px; padding: 14px 16px; margin: 10px 0; display: none;
  border: 2px solid transparent; }
.scanresult.show { display: block; animation: bannerpop .18s ease-out; }
.scanresult.ok { background: #32c86e1f; border-color: #32c86e; }
.scanresult.err { background: #ff42591f; border-color: #ff4259; animation: bannerpop .18s ease-out, shake .35s ease-in-out; }
.scanresult .big { font-size: 19px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.scanresult.ok .big { color: #32c86e; }
.scanresult.err .big { color: #ff4259; }
.scanresult .why { color: var(--text); margin-top: 4px; font-size: 14px; }
@keyframes bannerpop { 0% { transform: scale(.96); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
/* --- batch putaway progress --- */
.progressbar { height: 10px; background: var(--chip); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progressbar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.pitem { display: flex; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.pitem:last-child { border-bottom: 0; }
.pitem.done { opacity: .62; }
.pitem .st { min-width: 20px; }
.nextstep { display: block; text-align: center; background: var(--accent); color: #0a0a0a;
  font-weight: 800; font-size: 16px; border-radius: 10px; padding: 13px; margin-top: 12px; text-decoration: none; }

/* Wrong-card stop: unmissable across the room, must be acknowledged. */
#hardstop { position: fixed; inset: 0; z-index: 9999; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(120, 0, 14, .82); animation: hsflash .45s steps(1) 3; }
#hardstop .hs-card { background: var(--bad); color: #fff; border-radius: 18px;
  padding: 28px 24px; max-width: 460px; width: 100%; text-align: center;
  box-shadow: 0 18px 60px rgba(0,0,0,.55); }
#hardstop .hs-x { font-size: 62px; font-weight: 800; line-height: 1; }
#hardstop .hs-title { font-size: 27px; font-weight: 800; margin-top: 8px; letter-spacing: -.01em; }
#hardstop .hs-why { font-size: 15.5px; margin-top: 10px; opacity: .95; line-height: 1.4; }
#hardstop .hs-ok { margin-top: 18px; width: 100%; padding: 15px; font-size: 16px;
  border-radius: 12px; background: #fff; color: var(--bad); font-weight: 800; }
@keyframes hsflash { 0% { background: rgba(255,66,89,.95); } 50% { background: rgba(120,0,14,.82); } }

/* Drawer fill meter: the floor learns a drawer is full when it fills, not
   when the next card bounces off a red wall. */
.fillbar { border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: 15px;
  font-weight: 700; border: 1px solid var(--line); background: var(--panel); }
.fillbar .track { height: 8px; border-radius: 99px; background: var(--chip);
  margin-top: 8px; overflow: hidden; }
.fillbar .track i { display: block; height: 100%; background: var(--accent); transition: width .18s; }
.fillbar .sub { font-weight: 500; font-size: 13px; color: var(--dim); margin-top: 4px; }
.fillbar.warn { border-color: var(--warn); color: var(--warn); background: #f5ab5714; }
.fillbar.warn .track i { background: var(--warn); }
.fillbar.warn .sub { color: var(--warn); font-weight: 700; }

/* The phone menu keeps warehouse workflows before management tools. */
nav details.moremenu { display: inline-block; }
nav details.moremenu > summary { list-style: none; cursor: pointer; display: inline-block;
  padding: 6px 10px; border-radius: 8px; color: var(--dim); font-weight: 600; }
nav details.moremenu > summary::-webkit-details-marker { display: none; }
nav details.moremenu > summary::after { content: ' ▾'; }
nav details.moremenu > summary.active, nav details.moremenu[open] > summary { color: var(--text); }
/* Anchor below the header even when the account row wraps on a small phone. */
nav .moresheet { position: absolute; top: calc(100% + 4px); left: 16px; right: 16px; z-index: 200;
  max-height: 65dvh; overflow-y: auto; background: #141414; border: 1px solid #313131;
  border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px #0008; display: flex; flex-direction: column; }
nav .moresheet a { min-height: 44px; display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
nav .moresheet a:hover { background: var(--chip); }

/* a job nobody has touched for hours — visible without being an alarm */
.pitem.warnrow { border-left: 3px solid var(--warn); padding-left: 9px; }

/* Shared layout, type and navigation. Workflow-specific scanner geometry stays in its page. */
:root { -webkit-font-smoothing: antialiased; }
body { font-feature-settings: "tnum" 1; }
a { color: #cecece; text-underline-offset: 3px; }
::selection { background: var(--accent); color: #0a0a0a; }
.ops-app > main { width: 100%; max-width: 1240px; padding: 36px 32px 64px; margin: 0 auto; }
.ops-app > main.ops-workflow { max-width: 960px; }
.page-title, .ops-app main > h1 { font-size: 32px; font-weight: 550; letter-spacing: -.04em; line-height: 1.2; margin: 0 0 10px; }
.page-description { color: #9d9d9d; font-size: 14px; line-height: 1.6; margin-bottom: 28px; max-width: 720px; }
.ops-app label { font-size: 12px; font-weight: 500; color: #bababa; }
input, select, textarea { background: #141414; border-radius: 10px; }
input::placeholder, textarea::placeholder { color: #898989; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
button:hover:not(:disabled) { filter: brightness(.9); }
.scanbar .cam, .bigadd { background: var(--accent); color: #0a0a0a; }
tbody tr:hover { background: #ffffff04; }
.table-meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px; font-size: 12px; color: var(--dim); }
.hero-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 20px; }
.s { border: 1px solid color-mix(in srgb, currentColor 24%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); }
.s.received-unverified { border-color: var(--line); background: var(--chip); }
.ops-app .ops-shell { background: #0a0a0a; border-color: #1e1e1e; }
.ops-shell .brand .brand-glyph { background: transparent; color: var(--accent); }
.ops-shell .ops-desktop-nav { display: none; }
.ops-shell nav a { font-weight: 500; }
.ops-shell .who .status-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block; }
.ops-shell .who b { font-weight: 500; }
.ops-shell .nav-group { color: #767676; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 22px 12px 8px; }
@media (min-width: 1100px) {
  body.ops-app { padding-left: 220px; }
  .ops-app .ops-shell { position: fixed; inset: 0 auto 0 0; width: 220px; padding: 26px 14px 16px; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; border: 0; border-right: 1px solid #1e1e1e; }
  .ops-shell .brand { padding-left: 10px; margin-bottom: 12px; }
  .ops-shell .ops-mobile-nav { display: none; }
  .ops-shell .ops-desktop-nav { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  .ops-shell .ops-desktop-nav a { padding: 8px 12px; min-height: 34px; font-size: 13px; border-radius: 8px; flex-shrink: 0; }
  .ops-shell .ops-desktop-nav a.active { background: #1e1e1e; color: #fff; }
  .ops-shell .ops-desktop-nav a.active::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-right: 8px; display: inline-block; vertical-align: middle; }
  .ops-shell .who { margin: 0; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
  .ops-shell .who b { font-size: 12px; }
}
@media (max-width: 1099px) {
  .ops-app .ops-shell { gap: 10px; padding: 14px 18px; }
  .ops-shell .ops-mobile-nav { display: flex; gap: 2px; }
  .ops-shell nav a { white-space: nowrap; }
}
@media (max-width: 600px) {
  .ops-app > main { padding: 24px 16px 48px; }
  .page-title, .ops-app main > h1 { font-size: 28px; }
  .page-description { font-size: 13px; margin-bottom: 22px; }
  .ops-shell .brand { flex: 1; }
  .ops-shell .ops-mobile-nav { order: 3; width: 100%; overflow: visible; }
  .ops-shell .ops-mobile-nav > a, .ops-shell .moremenu > summary { padding: 10px 12px; font-size: 13px; }
  .ops-shell .who { width: auto; order: 2; font-size: 10px; flex-wrap: wrap; gap: 4px; max-width: 190px; }
  .ops-shell .who b { max-width: 180px; }
  .ops-app button, .ops-app input:not([type=checkbox]):not([type=radio]), .ops-app select { min-height: 44px; }
}
@media print {
  body.ops-app { padding-left: 0; }
  .ops-shell { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Landing and authentication use the same surfaces as the warehouse pages. */
.ops-app[data-ops-page=today] .hero-panel { padding: 0; background: transparent; border: 0; }
.ops-app[data-ops-page=today] .job { min-height: 136px; padding: 24px; }
.ops-app[data-ops-page=today] .job.start { background: #141414; border-color: #3b3b3b; }
.ops-app[data-ops-page=today] .job .ttl { font-size: 16px; font-weight: 550; }
.ops-app[data-ops-page=today] .job .cnt { font-weight: 500; }
.ops-app[data-ops-page=intake] .seg { border-radius: 999px; padding: 4px; background: #141414; }
.ops-app[data-ops-page=intake] .seg button { border-radius: 999px; font-size: 13px; font-weight: 550; }
.ops-app[data-ops-page=intake] .startrow { padding: 8px 0; }
.ops-app[data-ops-page=intake] .startrow button { font-size: 13px; font-weight: 550; }
.ops-app[data-ops-page=intake] .batchline { padding: 16px; border-radius: 14px; }
.ops-app[data-ops-page=dashboard] #sourcing-alert { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.auth-body { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-page { max-width: 980px; width: 100%; margin: auto; padding: 0; }
.auth-panel { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.auth-intro, .auth-form-wrap { padding: 44px; }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; background: #141414; }
.auth-brand { font-size: 14px; font-weight: 600; }
.auth-brand span, .auth-logo { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--accent); margin-right: 8px; }
.auth-intro .eyebrow { font-size: 10px; letter-spacing: .12em; color: #898989; margin-bottom: 16px; }
.auth-intro h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.04em; font-weight: 550; margin-bottom: 18px; }
.auth-intro p, .auth-form-wrap p { font-size: 13px; line-height: 1.7; color: #9d9d9d; }
.auth-mini-grid { display: flex; gap: 14px; color: #9d9d9d; font-size: 11px; }
.auth-form-wrap { display: flex; flex-direction: column; justify-content: center; }
.auth-form-head { margin-bottom: 24px; }
.auth-form-head h2 { margin-bottom: 8px; font-size: 22px; }
.auth-form-wrap :is(button,input) { width: 100%; min-height: 44px; margin-top: 12px; }
.auth-divider { text-align: center; font-size: 12px; color: #767676; margin-top: 16px; }
.auth-hidden { display: none !important; }
.auth-error { color: var(--bad); }
@media(max-width:700px) {
  .auth-panel { grid-template-columns: 1fr; }
  .auth-intro { padding: 28px; gap: 28px; }
  .auth-intro h1 { font-size: 28px; }
  .auth-mini-grid { display: none; }
  .auth-form-wrap { padding: 28px; }
}
@media print {
  .ops-app > main { padding: 0; max-width: none; }
}
@media (max-width: 520px) {
  .ops-app[data-ops-page=intake] main > .page-title,
  .ops-app[data-ops-page=intake] main > .page-description { order: -4; }
}
