/* CP-G (owner, Nov 4 2026): readable status words and flat underline navigation. Loaded after theme-b.css, staff pages only.
   Status: a small marker plus plain words, no enclosing box; the words carry the meaning, colour never does it alone.
   Tabs: text with a gold underline and a plain inline count. Locations .seg and Contacts .qchips keep the live joined and rounded look (crm-ui.css).
   Hover is a faint wash that sits on any surface, so ink stays readable; keyboard focus is a solid ring in the page ink. */
:root, :root:not([data-theme="light"]) { --cx-hover: rgb(255 255 255 / 0.08); --cx-divider: #343A43; --cx-tab-line: #FAD552; }
:root[data-theme="light"] { --cx-hover: rgb(22 24 29 / 0.06); --cx-divider: #C3C8D0; --cx-tab-line: #D9A514; }

/* ---- Tabs ------------------------------------------------------------------------------------------------- */
#main .cd-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; width: auto; margin: 0 0 18px; padding: 0; border: 0; border-bottom: 1px solid var(--cx-divider);
  border-radius: 0; background: transparent; box-shadow: none; }
#main .sgt-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--cx-divider); }
#main :is(.us-seg, .us-seg--switch) { display: flex; flex-wrap: wrap; gap: 2px 4px; width: auto; border: 0; border-bottom: 1px solid var(--cx-divider); border-radius: 0; background: transparent; overflow: visible; }
#main .fl-tabs, #main .ws-tabs { border-bottom: 1px solid var(--cx-divider); }
#main .fl-libhead .fl-tabs { border-bottom: 0; }
#main :is(.cd-tabs a.cd-tab, .ws-tabs > a:not(.btn), .fl-tabs a, .sgt-tabs a.sgt-card, .us-seg a, .us-seg span.us-tab) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; margin: 0; padding: 8px 12px; border: 0 !important; border-radius: 0 !important;
  background: transparent !important; color: var(--ui-text-2) !important; box-shadow: none !important; font-size: 0.92rem; font-weight: 600; text-decoration: none; text-shadow: none; white-space: nowrap; }
#main :is(.cd-tabs a.cd-tab, .ws-tabs > a:not(.btn), .fl-tabs a, .sgt-tabs a.sgt-card, .us-seg a):hover {
  background: var(--cx-hover) !important; color: var(--ui-text) !important; }
#main :is(.cd-tabs a.cd-tab.active, .ws-tabs > a:not(.btn)[aria-current], .fl-tabs a.is-on, .sgt-tabs a.sgt-card[aria-current], .us-seg [aria-current="true"]) {
  color: var(--ui-text) !important; font-weight: 700; box-shadow: inset 0 -3px 0 var(--cx-tab-line) !important; }
#main :is(.cd-tabs a.cd-tab, .ws-tabs > a:not(.btn), .fl-tabs a, .sgt-tabs a.sgt-card, .us-seg a):focus-visible {
  outline: 2px solid var(--ui-focus) !important; outline-offset: -2px; }
#main .ws-tabs > a[aria-current]::after { content: none; }
/* Counts are plain numbers in the tab's own ink. */
#main :is(.cd-tabs a.cd-tab .n, .us-seg .n, .ws-tabs__n) { display: inline; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  color: inherit; font-size: inherit; font-weight: 500; font-variant-numeric: tabular-nums; }
#main .sgt-tabs a.sgt-card { display: inline-flex; }
#main .sgt-tabs a.sgt-card b { order: 2; font-size: inherit; font-weight: 500; line-height: inherit; color: inherit !important; font-variant-numeric: tabular-nums; }
#main .sgt-tabs a.sgt-card span { order: 1; font-size: inherit; color: inherit; }
/* Section counts: "Open requests 1", not a boxed 1. */
#main :is([class$="-panel__title"], .dw-sub, .dg__head h4, .ws-panel__title) .n,
#main[id] :is([class$="-panel__head"], [class*="-panel__head "]) :is(h2, h3) :is([class$="-count"], .n) {
  display: inline; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit !important; font-size: inherit; font-weight: 500; }
@media (max-width: 767.98px) {
  #main :is(.cd-tabs a.cd-tab, .fl-tabs a, .sgt-tabs a.sgt-card, .us-seg a, .us-seg span.us-tab) { min-height: 44px; padding: 8px 10px; }
  #main .sgt-tabs a.sgt-card { white-space: normal; }
}

/* ---- Light section strips in the Paperwork and signing workspace: words on the page surface, a fine line under them. ---- */
#main .sgt-panel .sgt-panel__head { --ui-head: var(--ui-panel); --ui-head-ink: var(--ui-text); --ui-head-quiet: var(--ui-text-2); background: var(--ui-panel); border-bottom: 1px solid var(--cx-divider); border-radius: 12px 12px 0 0; }
#main details.sgt-panel:not([open]) .sgt-panel__head { border-bottom: 0; border-radius: 12px; }
#main[id] .sgt-panel .sgt-panel__head h2 { color: var(--ui-text) !important; }
#main[id] .sgt-panel .sgt-panel__head .sgt-muted { color: var(--ui-text-2) !important; }

/* ---- Status: marker + words ---------------------------------------------------------------------------------- */
#main :is(.pw-st, .dw-st, .st-badge, .ws-status, .fl-chip, .us-chip) { display: inline-flex; align-items: baseline; gap: 6px; width: auto; min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important;
  color: var(--ui-text) !important; font-size: 0.86rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; text-transform: none; white-space: normal; opacity: 1; }
#main :is(.pw-st, .dw-st, .st-badge, .ws-status, .fl-chip, .us-chip)::before { content: ""; flex: none; align-self: center; width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--ui-text-3); box-sizing: border-box; }
#main :is(.pw-st--problem, .dw-st--missing, .ws-status--quiet)::before { background: transparent; border: 2px solid var(--ui-text); }
#main :is(.pw-st--wait, .dw-st--needed, .dw-st--review, .dw-st--awaiting, .st-badge--customer, .fl-chip--gold, .us-chip--wait)::before { background: var(--pw-amber); }
#main :is(.pw-st--ours, .st-badge--ours)::before { border-radius: 2px; background: var(--pw-amber); }
#main :is(.pw-st--ok, .dw-st--verified, .ws-status--on, .fl-chip--ok, .us-chip--ok)::before { content: "\2713"; width: auto; height: auto; border-radius: 0; background: none; color: var(--pw-green); font-weight: 800; line-height: 1; }
#main .pw-st--todo::before { background: transparent; border: 1.5px dashed var(--ui-text-3); }
#main :is(.pw-st--old, .dw-st--old, .st-badge--closed) { color: var(--ui-text-2) !important; }
#main .st-badge--completed::before { display: none; }
#main .st-badge--completed { color: var(--pw-green) !important; }
#main .st-badge--external::before { background: transparent; border: 2px solid var(--ui-text-3); }
#main .st-badge--decision::before { border-radius: 1px; transform: rotate(45deg); background: var(--ui-text); }
#main :is(.ws-status--warn, .fl-chip--bad, .us-chip--off) { color: var(--pw-ruby) !important; font-weight: 700; }
#main :is(.ws-status--warn, .fl-chip--bad, .us-chip--off)::before { content: "!"; width: auto; height: auto; border-radius: 0; background: none; color: inherit; font-weight: 800; line-height: 1; }
#main .fl-chip:not([class*="fl-chip--"])::before, #main .fl-chip--muted::before { display: none; }
#main .us-row .us-chip--kind { color: var(--ui-text-2) !important; font-weight: 500; }
#main .us-row .us-chip--kind::before { display: none; }
#main .fl-chip--muted { color: var(--ui-text-2) !important; }
#main a.fl-chip { text-decoration: underline; text-underline-offset: 2px; }
#main a.fl-chip:hover { background: var(--cx-hover) !important; }
#main .fl-chip.is-on { font-weight: 700; text-decoration-thickness: 2px; }
/* Paperwork type: a small square in the type's colour, then its name in sentence case. */
#main .cx-cat { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ui-text-2); font-size: 0.8rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; text-transform: none; }
#main .cx-cat::before { width: 7px; height: 7px; background: var(--cat-line); }
/* Contact labels: plain words with a middle dot between them. */
#main :is(.cd-badge, .ct-badge) { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ui-text-2); font-size: 0.86rem; font-style: normal; font-weight: 600; white-space: normal; }
#main :is(.cd-badge, .ct-badge) + :is(.cd-badge, .ct-badge)::before { content: "\00B7"; margin-right: 8px; color: var(--ui-text-3); }
#main .cd-badge--archived { color: var(--ui-text); font-weight: 700; }
#main .cd-chip, #main .cd-chips .cd-chip { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ui-text-2); font-size: 0.82rem; font-weight: 500; white-space: normal; }
#main .cd-chips { gap: 2px 12px; }
#main .cd-chip--gold { color: var(--ui-text); font-weight: 700; }
#main .cd-chip--ok { color: var(--ui-text); font-weight: 600; }
#main .cd-chip--ok::before { content: "\2713"; margin-right: 5px; color: var(--pw-green); font-weight: 800; }

/* ---- Row hover: a faint wash, ink unchanged; the edge is a neutral line, not a black bar. ---- */
#main :is(.ct-list, .ld-list, .lo-list, .us-list, .sgt-list, .pa-list, .cd-rows, .ov-out, .tk-list, .rq-list, .dr) > :not([class*="--head"]):hover,
#main :is(tbody tr, a.pa-row):hover { box-shadow: inset 2px 0 0 var(--ui-line); }
/* Warning words stay readable on a hovered row in Dark (they measured 4.0:1 on the red wash). */
:root:not([data-theme="light"]) #main :is(.fl-alert, .fl-alert__i) { --ui-danger: #FFB4AE; }
