/* ============================================================================
   Pledexa — staff workspace shell.
   One design system + app chrome (sidebar + topbar + phone tab bar) shared by
   every workspace screen. PX site system (2026-11-10): the look of the product
   illustration on the Pledexa website. Black ground, neutral hairlines, flat
   panels, one polished gold on the primary control; Inter Tight reads,
   IBM Plex Mono labels and counts, Michroma displays the figures. Every gold
   token is overridden per shop from its brand colour (shell.js applyAccent).
   ============================================================================ */

:root {
  color-scheme: dark;
  /* surfaces: black ground, onyx sidebar, graphite raised */
  --ink:        #000000;
  --panel:      #0a0a0b;
  --panel-2:    #16171a;
  --card:       #0f0f11;
  --card-2:     #16171a;
  --card-3:     #1c1d21;
  --line:       rgba(255,255,255,.09);
  --line-2:     rgba(255,255,255,.18);
  --line-faint: rgba(255,255,255,.055);
  --fill:       rgba(255,255,255,.015);
  --hover:      rgba(255,255,255,.035);
  /* brand (overridden per shop by shell.js applyAccent) */
  --gold:       #E8B23A;
  --gold-2:     #F2C04F;
  --gold-rgb:   232,178,58;
  --gold-soft:  rgba(232,178,58,.1);
  --gold-line:  rgba(232,178,58,.45);
  --gold-metal: var(--gold);
  --on-gold:    #120c02;
  /* panels: a flat dark fill inside an even hairline */
  --slab:       linear-gradient(180deg, #121214 0%, #0a0a0b 100%);
  --rim:        linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.08));
  --rim-acc:    linear-gradient(180deg, rgba(var(--gold-rgb),.45), rgba(var(--gold-rgb),.36));
  --lift:       inset 0 1px 0 rgba(255,255,255,.05);
  --key:        linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.02));
  /* text: white heads, silver chrome, steel labels */
  --text:       #fdfdfd;
  --silver:     #c9ccd1;
  --muted:      #8a8d93;
  --faint:      #6e7076;
  /* status */
  --green:      #2fb98d;  --green-bg: rgba(47,185,141,.08);
  --amber:      #e9b949;  --amber-bg: rgba(233,185,73,.08);
  --red:        #e2604f;  --red-bg:   rgba(226,96,79,.08);  --red-2: #f0a083;
  --blue:       #6FA8DC;  --blue-bg:  rgba(111,168,220,.08);
  --violet:     #B58BE0;  --violet-bg:rgba(181,139,224,.08);
  /* geometry */
  --r:    12px;
  --r-sm: 9px;
  --r-pill: 999px;
  --sidebar-w: 252px;
  --topbar-h: 52px;
  --tabbar-h: 60px;
  --shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 40px 80px -30px #000, 0 0 0 1px rgba(0,0,0,.6);
  --sans: "Inter Tight", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --label: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Michroma", "Inter Tight", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}
/* Polished gold from the shop accent; browsers without color-mix keep the flat gold. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root { --gold-metal: linear-gradient(180deg, color-mix(in srgb, var(--gold) 30%, #fff) 0%, color-mix(in srgb, var(--gold) 72%, #fff) 30%, color-mix(in srgb, var(--gold) 93%, #000) 62%, color-mix(in srgb, var(--gold) 60%, #000) 100%); }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--ink); color: var(--text); font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
/* Row, card and page titles are medium (500), never bold. */
b, strong, h1, h2, h3, h4, h5, h6 { font-weight: 500; }
::selection { background: rgba(var(--gold-rgb),.28); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; border: 2px solid var(--ink); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.gold { color: var(--gold); } .green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .sp { flex: 1; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; } .hide { display: none !important; }

/* ---------------------------------------------------------------- app grid */
body.ops-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "side top" "side main";
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
#ops-sidebar { grid-area: side; }
#ops-topbar  { grid-area: top;  }
/* P-3 pilot banner: a full-width grid row above the sidebar and top bar, so no
   screen, drawer or sticky header can cover it. */
#ops-pilot { display: none; }
body.ops-pilot { grid-template-rows: auto var(--topbar-h) 1fr; grid-template-areas: "pilot pilot" "side top" "side main"; }
body.ops-pilot #ops-pilot { display: block; grid-area: pilot; padding: 9px 16px; text-align: center; background: rgba(233,185,73,.12); color: var(--amber); border-bottom: 1px solid rgba(233,185,73,.5); font: 500 11.5px/1.3 var(--label, inherit); letter-spacing: .16em; text-transform: uppercase; }
#ops-main    { grid-area: main; overflow: auto; padding: 24px 28px 70px; min-width: 0; position: relative;
  background: radial-gradient(820px 340px at 26% -8%, rgba(var(--gold-rgb),.035), transparent 70%); }
/* The brand's fine 28px grid behind the content, fading out; barely there. */
#ops-main::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 640px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0/28px 28px, linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0/28px 28px;
  -webkit-mask-image: radial-gradient(75% 95% at 55% 0%, #000 8%, transparent 100%); mask-image: radial-gradient(75% 95% at 55% 0%, #000 8%, transparent 100%); }
#ops-tabbar  { display: none; }

/* ------------------------------------------------------------------ sidebar */
#ops-sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
/* The brand row is as tall as the top bar, so the two hairlines read as one
   bar: the mark, the shop name in the label face, "Staff Console" under it. */
.ops-brand { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: center; column-gap: 11px; row-gap: 3px; min-height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); padding: calc(7px + env(safe-area-inset-top, 0px)) 16px 7px; border-bottom: 1px solid var(--line); position: relative; }
.ops-brandmark { display: contents; }
.ops-brandmark b { grid-column: 2; align-self: end; font-family: var(--label); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.3; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
/* The Pledexa P mark in a hairline tile (the shop's own logo takes its place). */
.ops-brandmark .balls { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); }
.ops-brandmark .balls svg { width: 21px; height: auto; display: block; }
.ops-brandmark .balls i { display: none; }
.ops-brand .bs { grid-column: 2; align-self: start; font-family: var(--label); font-size: 8.5px; line-height: 1.2; color: var(--faint); letter-spacing: .22em; text-transform: uppercase; font-weight: 500; }
.ops-side-x { display: none; position: absolute; right: 10px; top: calc(8px + env(safe-area-inset-top, 0px)); width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); align-items: center; justify-content: center; }
.ops-side-x svg { width: 16px; height: 16px; }
.ops-nav { flex: 1; overflow-y: auto; padding: 12px 10px 18px; min-height: 0; scrollbar-width: thin; }
.ops-nav-group { margin-bottom: 4px; }
.ops-nav-group h4 { font-family: var(--label); font-size: 9.5px; line-height: 1; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 14px 10px 8px; }
.ops-nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--silver); font-weight: 400; font-size: 13.5px; line-height: 1.2; cursor: pointer; position: relative; transition: background .13s, color .13s; }
.ops-nav-item:hover { background: var(--hover); color: var(--text); }
.ops-nav-item.active { background: rgba(var(--gold-rgb),.1); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),.3); }
.ops-nav-item.active svg { color: var(--gold); }
.ops-nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.6; color: var(--faint); }
.ops-nav-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); border: 1px solid rgba(var(--gold-rgb),.45); background: rgba(var(--gold-rgb),.08); color: var(--gold-2); font-size: 10px; line-height: 1; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); }
.nav-badge.zero { display: none; }
.nav-badge.dot { min-width: 7px; width: 7px; height: 7px; padding: 0; border: 0; background: var(--green); box-shadow: 0 0 8px var(--green); }
.ops-sidebar-foot { min-height: 44px; padding: 8px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.ops-sidebar-foot .env { font: 500 8.5px/1 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ops-sidebar-foot .foot-link { font: 500 9px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ops-sidebar-foot .foot-link:hover { color: var(--text); }
.ops-sidebar-foot .foot-link svg { width: 13px; height: 13px; stroke-width: 1.6; }

/* ------------------------------------------------------------------- topbar */
/* One bar, one plain hairline under it. */
#ops-topbar { position: relative; background: linear-gradient(rgba(255,255,255,.018), rgba(255,255,255,.018)), var(--ink); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 20px; min-width: 0; }
/* When the bar is tight only the title gives way (it ellipsizes). Every other
   item keeps its size: a flex item shrinks by default, which let the price
   pills be clipped behind the icon buttons on an iPad and on a long-titled
   desktop screen. */
.ops-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ops-title h1 { font-family: var(--label); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-title .sub { font-size: 12px; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-top-spacer { flex: 1; }
.ops-pills, .ops-ibtns, .ops-user { flex: 0 0 auto; }
.ops-pills { display: flex; align-items: center; gap: 8px; }
.spot-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--silver); white-space: nowrap; }
.spot-pill .k { color: var(--faint); font-family: var(--label); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; }
.spot-pill .v { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--gold-2); }
.spot-pill.silver .v { color: var(--silver); }
.spot-stale { text-decoration: line-through; opacity: .55; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.status-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.off { background: var(--faint); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.chan-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); white-space: nowrap; }
.ops-clockchip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.ops-clockchip.on { border-color: rgba(47,185,141,.5); color: var(--green); background: var(--green-bg); }
.ops-ibtns { display: flex; align-items: center; gap: 6px; }
.ops-ibtn { position: relative; width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .12s, border-color .12s, background .12s, transform .16s var(--ease); }
.ops-ibtn:active { transform: scale(.94); }
.ops-ibtn:hover { color: var(--text); border-color: var(--line-2); background: var(--hover); }
.ops-ibtn svg { width: 17px; height: 17px; stroke-width: 1.6; }
.ops-ibtn .cnt { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); background: var(--ink); color: var(--red-2); font-size: 10px; line-height: 1; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); border: 1px solid rgba(226,96,79,.7); }
.ops-ibtn .cnt.zero { display: none; }
.ops-user { display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 4px 4px 4px 8px; border-radius: var(--r-sm); }
.ops-user:hover { background: var(--hover); }
.ops-user .who { text-align: right; }
.ops-user .who .nm { font-size: 13px; font-weight: 500; line-height: 1.2; }
.ops-user .who .rl { margin-top: 4px; font: 500 8.5px/1 var(--label); color: var(--faint); letter-spacing: .18em; text-transform: uppercase; }
.ops-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--gold-rgb),.08); color: var(--gold-2); border: 1px solid rgba(var(--gold-rgb),.45); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; flex: 0 0 36px; }
.ops-lock { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ops-lock:hover { color: var(--red); border-color: var(--red); }
.ops-burger { display: none; width: 38px; height: 38px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--silver); align-items: center; justify-content: center; cursor: pointer; flex: 0 0 38px; }
.ops-burger svg { width: 17px; height: 17px; stroke-width: 1.6; }

/* dropdowns (bell / user) */
.ops-drop { display: none; position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 6px); right: 18px; width: 360px; max-width: calc(100vw - 24px); background: var(--slab); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; box-shadow: var(--shadow); z-index: 300; overflow: hidden; }
.ops-drop.show { display: block; animation: dropIn .14s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ops-drop .dh { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ops-drop .dh b { font: 500 10.5px/1.3 var(--label); letter-spacing: .16em; text-transform: uppercase; }
.ops-drop .dh .sp { flex: 1; }
.ops-drop .lnk { background: none; border: none; color: var(--gold-2); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ops-drop .dn { display: flex; flex-direction: column; gap: 2px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.ops-drop .dn:hover { background: var(--hover); }
.ops-drop .dn b { font-size: 13px; } .ops-drop .dn span { font-size: 12px; color: var(--muted); } .ops-drop .dn i { font-style: normal; font: 400 10.5px/1.4 var(--mono); color: var(--faint); }
.ops-drop .dempty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ops-drop .dempty svg { width: 22px; height: 22px; color: var(--green); stroke-width: 1.6; }
.ops-drop .df { display: flex; gap: 8px; padding: 12px 16px; }
.ops-drop .di { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-weight: 400; font-size: 13.5px; color: var(--silver); }
.ops-drop .di:hover { background: var(--hover); color: var(--text); }
.ops-drop .di svg { width: 16px; height: 16px; stroke-width: 1.6; color: var(--faint); } .ops-drop .di.danger { color: var(--red-2); border-top: 1px solid var(--line); } .ops-drop .di.danger svg { color: currentColor; }
.ops-drop.user { width: 290px; }

/* ------------------------------------------------------------------ content */
.ops-page-head { margin-bottom: 20px; }
.ops-page-head h2 { font-size: 22px; font-weight: 400; letter-spacing: -.01em; line-height: 1.25; }
.ops-page-head p { color: var(--muted); margin-top: 3px; }
.section-title { font-family: var(--label); font-size: 9.5px; line-height: 1; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 8px 0 12px; }

/* stat tiles: a mono label, a Michroma figure, a small line under it */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--fill); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px 12px; position: relative; overflow: hidden; min-width: 0; }
.stat .k { font-family: var(--label); font-size: 9.5px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .v { font-family: var(--display); font-size: 21px; font-weight: 400; letter-spacing: 0; margin: 11px 0 6px; line-height: 1.05; overflow-wrap: anywhere; }
.stat .d { font-size: 11.5px; line-height: 1.3; color: var(--silver); }
.stat.accent { border-color: rgba(var(--gold-rgb),.42); background: rgba(var(--gold-rgb),.06); }
.stat.accent .v { color: var(--gold-2); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .stat.accent .v { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
}
.stat.warn { border-color: rgba(226,96,79,.5); } .stat.warn .v { color: var(--red-2); }
.stat .stat-ico { position: absolute; top: 12px; right: 12px; color: var(--faint); }
.stat .stat-ico svg { width: 17px; height: 17px; stroke-width: 1.6; }

/* cards: a hairline, a flat fill, a mono head with the gold dot */
.card { background: var(--fill); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.card > .card-head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 7px 16px; border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.card > .card-head h3 { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--label); font-size: 10.5px; font-weight: 500; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.card > .card-head h3::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb),.75); }
.card > .card-head .sp { flex: 1; }
.card > .card-body { padding: 16px; }
.card > .card-body.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; } }

/* badges: the status pill */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line-2); color: var(--silver); }
.badge::before { content: ""; width: .65em; height: .65em; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge--pending  { color: var(--amber);  background: var(--amber-bg);  border-color: rgba(233,185,73,.5); }
.badge--approved, .badge--live, .badge--done, .badge--ok { color: var(--green); background: var(--green-bg); border-color: rgba(47,185,141,.5); }
.badge--draft, .badge--info, .badge--muted { color: var(--muted); background: transparent; border-color: var(--line-2); }
.badge--flagged, .badge--rejected, .badge--overdue, .badge--urgent { color: var(--red-2); background: var(--red-bg); border-color: rgba(226,96,79,.6); }
.badge--queued, .badge--progress { color: var(--blue); background: var(--blue-bg); border-color: rgba(111,168,220,.5); }
.badge--listed, .badge--violet { color: var(--violet); background: var(--violet-bg); border-color: rgba(181,139,224,.5); }
.badge--gold { color: var(--gold-2); background: rgba(var(--gold-rgb),.08); border-color: rgba(var(--gold-rgb),.45); }
.badge.no-dot::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill); background: transparent; border: 1px solid var(--line-2); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.chip.on { background: rgba(var(--gold-rgb),.08); border-color: rgba(var(--gold-rgb),.45); color: var(--gold-2); }

/* pills / tabs */
.tabs { display: inline-flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 14px; border-radius: var(--r-pill); font: 500 10px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--silver); cursor: pointer; border: 1px solid var(--line-2); background: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab.on { background: rgba(var(--gold-rgb),.1); border-color: rgba(var(--gold-rgb),.45); color: var(--gold-2); }
.tab .cnt { margin-left: 6px; font-family: var(--mono); font-size: 9.5px; opacity: .8; }

/* toolbar / forms */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.input, .select, .textarea { background: #000; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); padding: 9px 12px; font-family: var(--sans); font-weight: 400; font-size: 13.5px; min-width: 0; width: 100%; transition: border-color .16s, box-shadow .16s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.toolbar .input { width: auto; min-width: 200px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgba(var(--gold-rgb),.6); box-shadow: 0 0 0 3px rgba(var(--gold-rgb),.14); }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.select option { background: var(--panel); color: var(--text); }
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; min-width: 0; }
.field > label { font-family: var(--label); font-size: 9.5px; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 400; color: var(--silver); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 40px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); position: relative; transition: background .15s; flex: 0 0 40px; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--gold-metal); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(var(--gold-rgb),.85); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--on-gold); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--gold-rgb),.25); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* buttons: pills in the label face; the primary one is polished gold */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: var(--r-pill); font: 500 10.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--silver); transition: background .2s, color .2s, border-color .2s, box-shadow .2s, filter .2s, transform .16s var(--ease); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--hover); color: var(--text); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn svg { width: 14px; height: 14px; stroke-width: 1.7; }
.btn--gold { background: var(--gold-metal); color: var(--on-gold); border-color: transparent; box-shadow: 0 8px 22px -8px rgba(var(--gold-rgb),.85); }
.btn--gold:hover { background: var(--gold-metal); color: var(--on-gold); filter: brightness(1.06); }
.btn--green { background: var(--green-bg); color: var(--green); border-color: rgba(47,185,141,.5); }
.btn--green:hover { background: rgba(47,185,141,.14); color: var(--green); }
.btn--danger { background: transparent; color: var(--red-2); border-color: rgba(226,96,79,.6); }
.btn--danger:hover { background: var(--red-bg); color: var(--red-2); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 8px 12px; font-size: 9.5px; }
.btn--lg { padding: 15px 26px; font-size: 12px; letter-spacing: .16em; }
.btn--block { width: 100%; }
.btn--block:not(.btn--gold) { border-radius: 10px; }
.btn--icon { padding: 0; width: 36px; height: 36px; border-radius: 10px; font-family: var(--sans); font-size: 16px; letter-spacing: 0; }

/* data table: mono heads, hairline rows, figures in mono */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th { text-align: left; font-family: var(--label); font-size: 9.5px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 11px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #050506; z-index: 1; white-space: nowrap; }
.data-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--hover); }
.data-table .mono { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.data-table .thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.data-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-table td.num { font-size: 12.5px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* lists */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.item:last-child { border-bottom: none; }
.item.click { cursor: pointer; } .item.click:hover { background: var(--hover); }
.item .ib { flex: 1; min-width: 0; }
.item .ib b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .ib span { font-size: 12px; line-height: 1.35; color: var(--muted); display: block; margin-top: 2px; }
.item .ir { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(var(--gold-rgb),.08); color: var(--gold-2); border: 1px solid rgba(var(--gold-rgb),.45); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-family: var(--mono); font-size: 11px; flex: 0 0 auto; }
.progress { height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .9s var(--ease); box-shadow: 0 0 10px rgba(var(--gold-rgb),.65); }
.progress.green > i { background: var(--green); box-shadow: 0 0 10px rgba(47,185,141,.6); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: transparent; border: 1px solid var(--line-2); color: var(--silver); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 7px; padding: 13px 14px; background: var(--fill); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s; min-width: 0; }
.tile:hover, .tile-grid .tile:first-child { border-color: rgba(var(--gold-rgb),.42); background: rgba(var(--gold-rgb),.06); }
.tile svg { width: 18px; height: 18px; color: var(--gold); stroke-width: 1.6; }
.tile b { font-size: 13.5px; font-weight: 500; line-height: 1.25; } .tile span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: rgba(var(--gold-rgb),.06); border: 1px solid rgba(var(--gold-rgb),.42); font-size: 13px; color: var(--silver); }
.callout b { color: var(--text); }
.callout svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--gold); margin-top: 1px; stroke-width: 1.6; }
.callout.red { background: var(--red-bg); border-color: rgba(226,96,79,.6); } .callout.red svg { color: var(--red-2); }
.callout.blue { background: var(--blue-bg); border-color: rgba(111,168,220,.5); } .callout.blue svg { color: var(--blue); }

/* queue / review cards (v1) */
.queue { display: flex; flex-direction: column; gap: 10px; }
.queue-item { background: var(--fill); border: 1px solid var(--line); border-radius: var(--r); display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; padding: 16px; align-items: start; }
.queue-item.flagged { border-color: rgba(226,96,79,.6); background: var(--red-bg); }
.queue-item .qi-media { position: relative; }
.queue-item .qi-media img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.queue-item .qi-media .more { position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,.7); border-radius: 6px; font: 500 10px/1.4 var(--mono); padding: 2px 6px; }
.queue-item .qi-body { min-width: 0; }
.queue-item .qi-title { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.queue-item .qi-sku { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--gold); }
.qi-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.qi-meta b { color: var(--text); font-weight: 500; }
.qi-price { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.qi-price .p { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--gold-2); }
.qi-price .arrow { color: var(--faint); }
.qi-price .p2 { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--green); }
.qi-price small { color: var(--faint); font-size: 11px; }
.qi-flag { margin-top: 10px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--red-bg); border: 1px solid rgba(226,96,79,.6); color: var(--red-2); font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.qi-flag svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.qi-actions { display: flex; flex-direction: column; gap: 8px; min-width: 128px; }
.qi-admlock svg { width: 13px; height: 13px; flex: 0 0 13px; }

/* activity feed (v1) */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: none; }
.feed-ico { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.feed-ico svg { width: 15px; height: 15px; stroke-width: 1.6; }
.feed-ico.ok { color: var(--green); } .feed-ico.no { color: var(--red); } .feed-ico.up { color: var(--gold); }
.feed-body { flex: 1; min-width: 0; }
.feed-body .ft { font-size: 13px; } .feed-body .ft b { font-weight: 500; }
.feed-body .fm { font: 400 10.5px/1.4 var(--mono); color: var(--faint); margin-top: 3px; }

/* empty / loading states */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state svg { width: 30px; height: 30px; color: var(--faint); margin-bottom: 10px; stroke-width: 1.4; }
.empty-state h4 { font-size: 14px; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.empty-state p { font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 37%, var(--card) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* connect banner (v1) */
.connect-banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px; background: var(--amber-bg); border: 1px solid rgba(233,185,73,.5); color: var(--silver); margin-bottom: 18px; font-size: 13px; }
.connect-banner svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--amber); }
.connect-banner b { color: var(--text); }
.connect-banner code { font-family: var(--mono); background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.ops-spot-warn { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 9998; background: var(--red); color: #fff; font-weight: 600; padding: 12px 18px; border-radius: var(--r-sm); box-shadow: 0 30px 60px -20px #000; max-width: calc(100vw - 32px); text-align: center; }

/* toast */
#ops-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: rgba(15,15,17,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(var(--gold-rgb),.45); color: var(--text); padding: 11px 18px; border-radius: var(--r-pill); font-weight: 500; font-size: 13px; box-shadow: 0 30px 60px -20px #000; z-index: 9999; transition: transform .2s, opacity .2s; max-width: calc(100vw - 32px); }
#ops-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#ops-toast.ok { border-color: rgba(47,185,141,.5); } #ops-toast.err { border-color: rgba(226,96,79,.6); }

/* modal */
.ops-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 9000; padding: 20px; }
.ops-modal-back.show { display: flex; }
.ops-modal { background: var(--slab); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; width: 100%; max-width: 460px; box-shadow: var(--shadow); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; animation: dropIn .16s ease; }
.ops-modal.wide { max-width: 720px; }
.ops-modal .mh { min-height: 46px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); font: 500 11px/1.3 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--text); display: flex; align-items: center; gap: 10px; }
.ops-modal .mh::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb),.75); }
.ops-modal .mh span { flex: 1; min-width: 0; }
.ops-mclose { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ops-mclose:hover { color: var(--text); border-color: var(--line-2); }
.ops-mclose svg { width: 14px; height: 14px; }
.ops-modal .mb { padding: 18px 18px; overflow: auto; }
.ops-modal textarea { width: 100%; min-height: 84px; background: #000; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); padding: 10px 12px; font-family: var(--sans); font-size: 13.5px; resize: vertical; }
.ops-modal .mf { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* help + tour */
.help-topic h3 { font-size: 19px; font-weight: 400; line-height: 1.3; margin: 0 0 8px; }
.help-topic p { font-size: 13.5px; line-height: 1.6; color: var(--silver); margin: 0 0 10px; }
.help-search { margin: 14px 0 18px; }
.help-hits { display: flex; flex-direction: column; }
.help-hits button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; cursor: pointer; color: var(--text); font-family: var(--sans); }
.help-hits button b { display: block; font-size: 13.5px; font-weight: 500; }
.help-hits button span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.help-hits button:hover b { color: var(--gold-2); }
.help-course { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.help-course .hc-k { font: 500 9.5px/1.3 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.help-course h3 { font-size: 17px; font-weight: 400; margin: 6px 0 6px; }
.help-steps { margin: 12px 0 0 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.help-steps b { color: var(--text); font-weight: 500; }
.ops-tour { position: fixed; inset: 0; z-index: 9500; }
.ops-tour-dim { position: absolute; inset: 0; }
.ops-tour-spot { position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.72), 0 0 0 1px var(--gold), 0 0 0 4px rgba(var(--gold-rgb),.2); transition: all .22s ease; pointer-events: none; }
.ops-tour-card { position: absolute; background: var(--slab); border: 1px solid rgba(var(--gold-rgb),.42); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow); width: 380px; max-width: calc(100vw - 24px); }
.ops-tour-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ops-tour-card .tt { font-size: 16px; font-weight: 500; margin-bottom: 6px; padding-right: 28px; }
.ops-tour-card .tb { font-size: 13.5px; color: var(--muted); line-height: 1.55; white-space: pre-line; }
.ops-tour-card .tp { font-size: 12.5px; color: var(--gold-2); margin-top: 8px; }
.ops-tour-card .tf { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ops-tour-card .tn { font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.ops-tour-x { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ops-tour-x svg { width: 14px; height: 14px; }

/* phone tab bar */
#ops-tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(0,0,0,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 45; grid-template-columns: repeat(5, 1fr); }
#ops-tabbar .tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: 500 8.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); position: relative; }
#ops-tabbar .tab-item svg { width: 20px; height: 20px; stroke-width: 1.6; color: var(--faint); }
#ops-tabbar .tab-item.active { color: var(--text); }
#ops-tabbar .tab-item.active svg { color: var(--gold); }
#ops-tabbar .tab-item .tb { position: absolute; top: 8px; left: calc(50% + 7px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }
#ops-tabbar .tab-item .tb.zero { display: none; }

/* ------------------------------------------------------- responsive / phone */
#ops-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
@media (max-width: 1280px) { .ops-user .who { display: none; } .chan-pill { display: none; } }
/* With the sidebar still beside it the bar is ~750px wide at 1000px; the pills
   drop their labels here so the title keeps room. */
@media (max-width: 1100px) {
  .ops-pills .spot-pill .k { display: none; }
  .spot-pill, .ops-clockchip { padding: 5px 9px; }
  .ops-clockchip .t { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 900px) {
  body.ops-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  body.ops-pilot { grid-template-areas: "pilot" "top" "main"; }
  #ops-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 50; transform: translateX(-100%); transition: transform .22s ease; }
  body.ops-nav-open #ops-sidebar { transform: translateX(0); }
  body.ops-nav-open #ops-scrim { display: block; }
  .ops-burger { display: inline-flex; }
  .ops-side-x { display: inline-flex; }
  .ops-brand { padding-right: 54px; }
  #ops-topbar { padding: 0 14px; gap: 10px; }
  #ops-main { padding: 18px 16px calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
  #ops-tabbar { display: grid; }
  .queue-item { grid-template-columns: 72px 1fr; }
  .queue-item .qi-actions { grid-column: 1 / -1; flex-direction: row; }
  .queue-item .qi-media img { width: 72px; height: 72px; }
  .ops-drop { right: 10px; }
  .ops-spot-warn { bottom: calc(var(--tabbar-h) + 14px); }
}
/* Below 1000px the three pills plus the icon buttons would leave the title no
   room (at 901px the sidebar still takes 252px of it); the clock chip goes
   first — the Home card, the Time Clock screen, the phone tab bar's dot and
   the account menu all still carry the clock. */
@media (max-width: 1000px) { .ops-clockchip { display: none; } }
/* C-7: what this device has not sent (the counter's offline queue). Between
   the pills and the icon buttons; on a phone, only its dot (the words are in
   its title and one tap away). */
.ops-syncpill { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 28px; min-height: 28px; padding: 5px 11px; border-radius: var(--r-pill); background: transparent; border: 1px solid var(--line-2); font: 500 9.5px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--muted); text-decoration: none; }
.ops-syncpill[hidden] { display: none; }
.ops-syncpill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; flex: 0 0 7px; }
.ops-syncpill.on { color: var(--green); border-color: rgba(47,185,141,.5); background: var(--green-bg); }
.ops-syncpill.off { color: var(--amber); border-color: rgba(233,185,73,.5); background: var(--amber-bg); }
.ops-syncpill.syncing { color: var(--gold-2); border-color: rgba(var(--gold-rgb),.45); background: rgba(var(--gold-rgb),.08); }
/* Up to 1440px the bar has no room for the words beside the spot pills and
   the clock chip (at 1024px they pushed the account button off the screen and
   squeezed the screen name to nothing): only the dot shows. Its words are its
   title and aria-label, and one tap opens the list. The clock chip also goes
   earlier, at ≤1240px, while the sidebar still takes 252px. */
@media (max-width: 1440px) { .ops-syncpill { padding: 9px; } .ops-syncpill .t { display: none; } }
@media (max-width: 1240px) { .ops-clockchip { display: none; } }
/* The screen name gives way first, but never to nothing. */
.ops-title { min-width: 64px; }
/* A phone already has Chat in its tab bar (with the same badge); the top
   bar's Messages button gives its room to the sync dot and the screen name. */
@media (max-width: 600px) { #ops-chatbtn { display: none; } }
/* The sync dot and a screen name that never collapses need room the spot
   prices took on a small tablet (601–760px, no sidebar) and just above the
   sidebar's return (901–990px): the prices go there, as on a phone. They are
   on the Home card and every desk view. */
@media (min-width: 601px) and (max-width: 760px) { .ops-pills { display: none; } }
@media (min-width: 901px) and (max-width: 990px) { .ops-pills { display: none; } }
@media (max-width: 600px) { .ops-syncpill { padding: 9px; } .ops-syncpill .t { display: none; } }
@media (max-width: 600px) {
  #ops-topbar { padding: 0 10px; gap: 8px; }
  .ops-title h1 { font-size: 12px; }
  .ops-title .sub { display: none; }
  .ops-clockchip { display: none; }
  .ops-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .ops-pills { gap: 6px; }
  .spot-pill { padding: 5px 9px; font-size: 10.5px; }
  .ops-pills { display: none; }                 /* phones: title + alert buttons win; prices live on the iPad/desk views */
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
  .stat { padding: 12px 12px 11px; }
  .stat .v { font-size: 17px; }
  .stat .stat-ico { top: 10px; right: 10px; }
  .ops-page-head h2 { font-size: 19px; }
  .input { width: 100%; min-width: 0; }
  .toolbar .input { flex: 1 1 100%; min-width: 0; }
  .tab { padding: 10px 14px; }
  .table-wrap > .data-table { min-width: 520px; }
  .ops-modal { max-width: 100%; }
  .ops-modal-back { padding: 10px; align-items: flex-end; }
  .ops-modal { max-height: calc(100dvh - 20px); }
  #ops-main { padding-left: 14px; padding-right: 14px; }
}
html[data-device="iphone"] .ops-pills .spot-pill .k { display: none; }

/* ==================== iOS / iPad / iPhone hardening ==================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
img, svg, video, canvas { max-width: 100%; }
body.ops-body { grid-template-rows: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)) 1fr; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
/* The rule above has the same weight as body.ops-pilot's three rows and comes
   later, so it used to win: the banner took the top bar's height and the top
   bar the free space. With the banner on, its row is first again. */
body.ops-body.ops-pilot { grid-template-rows: auto calc(var(--topbar-h) + env(safe-area-inset-top, 0px)) 1fr; }
#ops-topbar { padding-top: env(safe-area-inset-top, 0px); }
.ops-modal-back { padding: max(20px, env(safe-area-inset-top, 0px)) 20px max(20px, env(safe-area-inset-bottom, 0px)); }
@media (pointer: coarse) {
  input, select, textarea, .input, .select, .textarea, .ops-modal textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn--sm { min-height: 38px; }
  .ops-nav-item { padding: 12px; min-height: 44px; }
  .tab { min-height: 40px; }
  .chip.click { min-height: 32px; padding-left: 12px; padding-right: 12px; }
}
@media print { #ops-sidebar, #ops-topbar, #ops-tabbar, #ops-toast, .ops-drop { display: none !important; } body.ops-body { display: block; height: auto; overflow: visible; } #ops-main { padding: 0; } }
