/* vx_ops_family.css — CRM VX presentation layer for the Parts / Service / Workshop family
   (spares_mini, spares_standalone, service_v2, service_standalone, ws_mgr).
   Scope: body.vx-ops content roots only. The shared sidebar (#v2sb), QD, CRM and
   other hosts are never matched. Tokens come from vx-foundation.css (read-only).
   Presentation only: no element is hidden, no handler or ID changes. Semantic
   status colours (green/red/amber/rose/emerald chips, badges, chart series) stay. */

body.vx-ops{background:var(--vx-paper,#fff)!important;color:var(--vx-ink,#172b45)}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main){
  font-family:var(--vx-font);color:var(--vx-ink);font-size:var(--vx-fs-body)}

/* ---------- headings ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(h1,h2,h3,h4){
  font-family:var(--vx-font)!important;letter-spacing:-.015em}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) h2{font-weight:800}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(h3,h4){font-weight:700}

/* ---------- surfaces: white cards, line borders, no decorative gradient strips ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.content-card,.shadow-lg,.shadow-xl,.shadow-md){
  box-shadow:var(--vx-shadow)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.content-card,.rounded-2xl,.rounded-xl).bg-white{
  border:1px solid var(--vx-line)!important;border-radius:var(--vx-r)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) [class*="bg-gradient"]:has(> :is(h1,h2,h3)){
  background-image:none!important;background-color:var(--vx-card)!important;color:var(--vx-ink)!important;
  border-bottom:1px solid var(--vx-line)}
/* descendants inherit ink from the bar; only white/pale tints are re-inked, semantic colours are kept */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) [class*="bg-gradient"]:has(> :is(h1,h2,h3)) :is(.text-white,[class*="text-white/"],[class*="text-blue-1"],[class*="text-indigo-1"],[class*="text-slate-2"],[class*="text-gray-2"],[class*="opacity-"]):not([class*="text-red"],[class*="text-green"],[class*="text-emerald"],[class*="text-amber"],[class*="text-rose"],[class*="text-orange"],[class*="text-yellow"],[class*="text-lime"],[class*="text-teal"]){color:var(--vx-ink-2)!important;opacity:1!important}

/* ---------- labels and controls (14px labels, 38px controls) ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) label:not(:has(input[type=checkbox],input[type=radio],input[type=file])):not([role=button]){
  font-family:var(--vx-font)!important;font-size:var(--vx-fs-label)!important;font-weight:600!important;color:var(--vx-ink-2)!important;
  text-transform:none!important;letter-spacing:0!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(select,input[type=text],input[type=search],input[type=date],input[type=month],input[type=number],input:not([type])){
  min-height:var(--vx-control-h);font-family:var(--vx-font)!important;font-size:14px!important;color:var(--vx-ink)!important;
  background-color:var(--vx-card)!important;border:1px solid var(--vx-line-2)!important;border-radius:var(--vx-r-sm)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(select,input,textarea,button,summary,a,[tabindex]):focus-visible{
  outline:3px solid var(--vx-focus)!important;outline-offset:2px}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(select,input,textarea):disabled,
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) [readonly]{
  background-color:var(--vx-sunk)!important;color:var(--vx-mute)!important;cursor:not-allowed}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(input,select,textarea):user-invalid{
  border-color:var(--vx-work)!important;background-color:var(--vx-work-bg)!important}

/* ---------- buttons: brand actions to CRM rail; semantic approve/reject colours preserved ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) button:is([class*="bg-blue-"],[class*="bg-indigo-"],[class*="bg-sky-6"],[class*="bg-slate-8"],[class*="bg-gray-8"],[class*="bg-purple-6"],[class*="bg-violet-6"]):not([class*="-50"]):not([class*="-100"]):not([class*="-200"]){
  background:var(--vx-rail)!important;border:1px solid var(--vx-rail)!important;color:var(--vx-rail-ink)!important;
  font-family:var(--vx-font)!important;font-weight:600!important;border-radius:var(--vx-r-sm)!important;background-image:none!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) button:is([class*="bg-blue-"],[class*="bg-indigo-"],[class*="bg-slate-8"],[class*="bg-gray-8"]):not([class*="-50"]):not([class*="-100"]):not([class*="-200"]):hover{
  background:var(--vx-rail-2)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) button:disabled{opacity:1;cursor:not-allowed;background:#e2e8f0!important;color:#475569!important;border-color:#cbd5e1!important}

/* ---------- sub-tab strips (in-page tab buttons) ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.sub-tab-btn,.subtab-btn,[role=tab]){
  font-family:var(--vx-font)!important;font-size:14px!important;font-weight:600!important;min-height:36px}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.sub-tab-btn,.subtab-btn,[role=tab]):is(.active,[aria-selected=true]){
  background:var(--vx-rail)!important;color:var(--vx-rail-ink)!important;border-color:var(--vx-rail)!important}
/* Nested text must follow the selected/disabled control, not label defaults. */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.sub-tab-btn,.subtab-btn,[role=tab]):is(.active,[aria-selected=true]) :is(span,label,small),
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) button:disabled :is(span,label,small){color:inherit!important}

/* ---------- tables: 13.5 body, 12 mono header, sticky tinted header, numeric alignment ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table{font-size:var(--vx-fs-table);border-collapse:collapse;color:var(--vx-ink)}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table td{
  font-size:var(--vx-fs-table)!important;border-top:1px solid var(--vx-line)} /* no foreground: explicit semantic td colours win */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table thead :is(tr,th):not([style*="background"]):not([class*="bg-red"],[class*="bg-green"],[class*="bg-emerald"],[class*="bg-amber"],[class*="bg-rose"],[class*="bg-orange"],[class*="bg-yellow"],[class*="bg-lime"],[class*="bg-teal"]){
  background:var(--vx-paper-2)!important;background-image:none!important} /* semantic/inline header fills keep their colour */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table thead th{
  font-family:var(--vx-mono)!important;font-size:var(--vx-fs-th)!important;font-weight:600!important;
  text-transform:uppercase;letter-spacing:.06em;border-color:var(--vx-line)!important;border-bottom:1px solid var(--vx-line-2)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table thead th:not([style*="color"]):not([class*="text-red"],[class*="text-green"],[class*="text-emerald"],[class*="text-amber"],[class*="text-rose"],[class*="text-orange"],[class*="text-yellow"],[class*="text-lime"],[class*="text-teal"]){color:var(--vx-ink-2)!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table thead th *:not([class*="text-red"],[class*="text-green"],[class*="text-emerald"],[class*="text-amber"],[class*="text-rose"],[class*="text-orange"],[class*="text-yellow"],[class*="text-lime"],[class*="text-teal"]){color:inherit!important}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table tbody tr:not([style*="background"]):not([class*="bg-"]):hover>td:not([style*="background"]):not([class*="bg-"]){background-color:#eef3fa} /* heatmap/status fills never washed by hover */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(tfoot td,tfoot th,tr.font-bold>td,tr.total-row>td):not([style*="background"]):not([class*="bg-"]){
  background:var(--vx-sunk);font-weight:700} /* not !important: coloured total rows/cells keep their fill */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table td:is(.text-right,[align=right]){
  font-family:var(--vx-mono);font-variant-numeric:tabular-nums;white-space:nowrap}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.overflow-x-auto,.overflow-auto,.table-wrap,.table-container):has(> table){
  border:1px solid var(--vx-line);border-radius:var(--vx-r);background:var(--vx-card)}

/* ---------- KPI tiles: mono values, readable captions ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is([class*="text-2xl"],[class*="text-3xl"]):is(.font-bold,.font-black,.font-extrabold){
  font-family:var(--vx-mono)!important;font-variant-numeric:tabular-nums;letter-spacing:-.02em}

/* ---------- tiny text floor: nothing below 12px ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is([class*="text-[9px]"],[class*="text-[10px]"],[class*="text-[10.5px]"],[class*="text-[11px]"],[class*="text-[11.5px]"]){
  font-size:var(--vx-fs-caption)!important}

/* ---------- supporting states ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(.empty,.empty-state,.no-data){
  color:var(--vx-ink-2);border:1px dashed var(--vx-line-2);border-radius:var(--vx-r);background:var(--vx-card)}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) canvas{max-width:100%}

/* ---------- phones: 42px / 16px controls (no iOS zoom) ---------- */
@media (max-width:760px){
  body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) :is(select,input[type=text],input[type=search],input[type=date],input[type=number],input:not([type])){
    min-height:var(--vx-control-h-touch);font-size:16px!important}
}

/* ---------- PearlOrderFocus panel (focused categorical filters) inside this family ---------- */
body.vx-ops section[id^="pof-"]{
  background:var(--vx-card)!important;border:1px solid var(--vx-line)!important;border-radius:var(--vx-r)!important;
  padding:12px 14px!important;color:var(--vx-ink)!important;font:14px/1.35 var(--vx-font)!important;margin:10px 0!important}

/* ---------- semantic cell colours: shared enterprise layers (pearl-ca-system, sales-v2 theme) paint every
   tbody td slate; explicit Tailwind status colours on a cell or its children are restored here. ---------- */
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-red-500,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-red-500{color:#ef4444}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-red-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-red-600{color:#dc2626}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-red-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-red-700{color:#b91c1c}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-red-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-red-800{color:#991b1b}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-green-500,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-green-500{color:#22c55e}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-green-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-green-600{color:#16a34a}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-green-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-green-700{color:#15803d}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-green-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-green-800{color:#166534}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-emerald-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-emerald-600{color:#059669}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-emerald-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-emerald-700{color:#047857}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-emerald-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-emerald-800{color:#065f46}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-amber-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-amber-600{color:#d97706}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-amber-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-amber-700{color:#b45309}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-amber-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-amber-800{color:#92400e}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-yellow-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-yellow-600{color:#ca8a04}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-yellow-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-yellow-700{color:#a16207}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-yellow-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-yellow-800{color:#854d0e}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-orange-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-orange-600{color:#ea580c}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-orange-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-orange-700{color:#c2410c}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-orange-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-orange-800{color:#9a3412}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-rose-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-rose-600{color:#e11d48}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-rose-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-rose-700{color:#be123c}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-blue-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-blue-600{color:#2563eb}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-blue-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-blue-700{color:#1d4ed8}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-blue-800,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-blue-800{color:#1e40af}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-teal-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-teal-600{color:#0d9488}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-teal-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-teal-700{color:#0f766e}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-purple-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-purple-600{color:#9333ea}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-purple-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-purple-700{color:#7e22ce}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-indigo-600,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-indigo-600{color:#4f46e5}
body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th).text-indigo-700,body.vx-ops :is(.tab-content,#sparesTabContent,#tabContent,#main,main) table :is(td,th) .text-indigo-700{color:#4338ca}
body.vx-ops :is(.tab-content,#tabContent,main) :is(button.btn-primary,label){font-size:max(12px,1em)}
