/* ============================================================
   Procusure — shared design system
   One token set (colors, radius, shadow, type) used by every
   page so the dashboard and the inner working pages read as one
   product instead of two different apps stitched together.
   ============================================================ */

/* Safety net: several pages define their own `.modal-back { display: flex }`
   for a modal overlay; that unconditional `display: flex` beats the
   `[hidden]` attribute's default `display: none` at equal specificity, so
   the modal renders permanently open. This higher-specificity rule wins
   regardless of page and fixes all of them at once. */
[hidden] { display: none !important; }

:root {
  --brand-ink: #10241c;
  --brand-primary: #1c6b4a;
  --brand-primary-dark: #144f37;
  --brand-primary-light: #e9f4ee;
  --brand-accent: #267052;

  --surface: #ffffff;
  --surface-sunken: #f6f8f7;
  --page-bg: #f3f6f5;

  --border: #dde5e1;
  --border-soft: #eaeeec;

  --text-strong: #16211c;
  --text-body: #3c4842;
  --text-muted: #6a756f;
  --text-faint: #93a09a;

  --danger: #b0392f;
  --danger-bg: #f7e9e9;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 2px rgba(16, 36, 28, .04), 0 8px 24px rgba(16, 36, 28, .05);
  --shadow-pop: 0 8px 30px rgba(16, 36, 28, .16);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--text-strong);
  margin: 0 0 4px 0;
}

h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 16px 0;
  color: var(--text-strong);
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 14px;
}

/* ---------- Brand mark (logo + wordmark) ---------- */

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-strong);
}

.brand-mark svg {
  display: block;
  flex-shrink: 0;
}

.brand-mark-word {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--brand-ink);
}

.brand-mark-word small {
  display: block;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: -1px;
}

/* ---------- Login / Welcome (centered card) ---------- */

.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 12% 8%, rgba(28, 107, 74, .07), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(28, 107, 74, .06), transparent 40%),
    var(--page-bg);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.card .brand-mark {
  justify-content: center;
  margin-bottom: 6px;
}

.card form {
  text-align: left;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 14px 0 5px 0;
  color: var(--text-strong);
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-strong);
  background: var(--surface);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s ease;
}

button:hover {
  background: var(--brand-primary-dark);
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 14px;
}

/* Shared success confirmation banner (e.g. after a request is submitted) */
.msg-success {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--brand-primary-light); color: var(--brand-primary-dark);
  border: 1px solid var(--brand-primary); border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
}
.msg-success .ms-icon { font-size: 16px; }
.msg-success a { color: inherit; text-decoration: underline; font-weight: 700; }

.admin-link {
  margin-top: 20px;
  font-size: 13px;
}

.admin-link a {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
}

.admin-link a:hover {
  text-decoration: underline;
}

/* ---------- Wide inner pages ---------- */

.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.link-btn {
  color: var(--brand-accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.link-btn:hover {
  text-decoration: underline;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.field-submit {
  grid-column: 1 / -1;
}

.field-submit button {
  width: auto;
  padding: 10px 26px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
}

th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: var(--surface-sunken);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.status-active {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}

.status-inactive {
  background: var(--danger-bg);
  color: var(--danger);
}

.toggle-btn {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-sunken);
  color: var(--text-strong);
  border: 1px solid var(--border);
}

.toggle-btn:hover {
  background: #eef1ef;
}

a.toggle-btn {
  display: inline-block;
  text-decoration: none;
}

/* ---------- Purchase Requests page additions ---------- */

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-strong);
  resize: vertical;
}

.field-wide {
  grid-column: 1 / -1;
}

.total-display {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-strong);
}

.status-submitted {
  background: #e8edfb;
  color: #2952e3;
}

/* ---------- Guided purchase intake (Step 15) ---------- */

.intake-step[hidden] { display: none; }

.intake-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 14px;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: auto;
  margin: 0;
  padding: 16px;
  text-align: left;
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.type-card:hover {
  background: var(--surface);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.type-card .tc-icon { font-size: 22px; }
.type-card .tc-title { font-weight: 700; font-size: 14px; }
.type-card .tc-blurb { font-size: 12px; font-weight: 500; color: var(--text-muted); }

.intake-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.intake-crumb { font-weight: 700; color: var(--text-strong); }

.intake-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.intake-actions { gap: 12px; align-items: center; }
.intake-actions button { width: auto; padding: 10px 24px; }

@media (max-width: 620px) {
  .type-cards { grid-template-columns: 1fr 1fr; }
}

/* ---------- Smart intake start (Step 25) ---------- */

/* [hidden] must win over the display rules below (grid/flex). */
#intake-form[hidden],
.intake-actions[hidden],
.intake-summary[hidden],
.attachments-block[hidden] { display: none !important; }

.smart-start {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px;
  margin-bottom: 18px;
  background: var(--brand-primary-light, #eef2ff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.smart-start-col { display: flex; flex-direction: column; gap: 8px; }
.smart-start-col label { font-weight: 700; font-size: 13px; color: var(--text-strong); }
.smart-start-col textarea,
.smart-start-col input[type="file"] { width: 100%; }
.smart-start-col button { width: auto; align-self: flex-start; }

.smart-start-or {
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.smart-msg {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-strong);
}

.smart-blank-line {
  margin: -8px 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.smart-blank-line button { font-size: 13px; }

/* ---------- Request landing / intent picker (Step 27) ---------- */

.start-cta {
  width: auto; padding: 10px 20px; font-size: 14px; font-weight: 700;
  border-radius: 10px;
}

#page-header[hidden] { display: none !important; }
.intake-landing[hidden] { display: none !important; }
.intake-landing {
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}
.il-card {
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 40px 44px 34px;
}
.il-greeting { font-size: 26px; font-weight: 800; line-height: 1.3; margin: 0 0 10px; color: var(--text-strong); }
.il-sub { font-size: 14px; color: var(--text-muted); margin: 0 0 22px; }
.il-sub a { color: var(--brand-primary, #4f46e5); font-weight: 700; }

.il-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.il-option {
  display: flex; align-items: center; gap: 14px; width: 100%;
  text-align: left; cursor: pointer;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
}
.il-option:hover { background: var(--surface-sunken, #f6f8fb); border-color: var(--brand-primary, #4f46e5); }
.il-option.sel, .il-option.sel:hover { background: var(--brand-primary-light, #eef2ff); border-color: var(--brand-primary, #4f46e5); box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff); }
.il-check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--border); color: transparent;
}
.il-option.sel .il-check { background: var(--brand-primary, #4f46e5); border-color: var(--brand-primary, #4f46e5); color: #fff; }
.il-option-text { display: flex; flex-direction: column; gap: 2px; }
.il-option-label { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.il-option-desc { font-size: 12.5px; color: var(--text-muted); }

.il-continue {
  width: 100%; padding: 14px; font-size: 15px; font-weight: 700; border-radius: 12px;
}
.il-continue:disabled { opacity: .5; cursor: default; }

@media (max-width: 620px) {
  .il-card { padding: 28px 22px; border-radius: 14px; }
  .il-greeting { font-size: 21px; }
}

/* ---------- Stepped intake wizard (Step 26) ---------- */

.intake-wizard[hidden] { display: none !important; }
.intake-wizard {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* Full-page mode: the wizard takes over the whole content area. Both html
   and body need overflow:hidden — the app shell's fixed header/sidebar are
   pinned to the viewport, so if the document scrolls at all (e.g. focus
   scroll on step change) their content silently slides out from under it. */
html:has(body.pr-wizard-open) { overflow: hidden; }
body.pr-wizard-open { overflow: hidden; }
body.pr-wizard-open .page-wrap {
  max-width: none;
  height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.pr-wizard-open .header-row,
body.pr-wizard-open #start-panel,
body.pr-wizard-open #submitted-panel { display: none; }
body.pr-wizard-open .intake-wizard {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.pr-wizard-open .iw-main { min-height: 0; }
body.pr-wizard-open .iw-body { overflow-y: auto; max-width: none; }
body.pr-wizard-open .iw-nav { height: 100%; overflow-y: auto; }

.iw-nav {
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  background: var(--surface-muted, #f7f8fa);
}
.iw-nav-title {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 8px 12px;
}
.iw-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; background: none; border: 0; cursor: pointer;
  padding: 10px 8px 10px 12px; margin: 0; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  border-left: 3px solid transparent;
}
.iw-nav-item:hover:not(:disabled) { background: rgba(0,0,0,.04); }
.iw-nav-item.iw-current { color: var(--text-strong); border-left-color: var(--brand-primary, #4f46e5); background: var(--surface); }
.iw-nav-item.iw-done { color: var(--text-strong); }
.iw-nav-item.iw-locked { opacity: .55; cursor: default; }
.iw-nav-mark {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--border); color: var(--text-muted);
}
.iw-nav-item.iw-current .iw-nav-mark { background: var(--brand-primary, #4f46e5); color: #fff; }
.iw-nav-item.iw-done .iw-nav-mark { background: #1f9d55; color: #fff; }
@keyframes iw-slidein { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.iw-nav-item { animation: iw-slidein .18s ease; }

.iw-main { display: flex; flex-direction: column; min-height: 480px; }
.iw-body { flex: 1 1 auto; padding: 40px 48px; }
.iw-step { max-width: 860px; margin: 0 auto; }
.iw-title { font-size: 30px; font-weight: 800; margin: 0 0 26px; color: var(--text-strong); }

.iw-q { margin: 0 0 30px; }
.iw-q-label { font-size: 18px; font-weight: 700; color: var(--text-strong); margin: 0 0 4px; }
.iw-q-help { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; font-weight: 400; }

.iw-field { position: relative; }
.iw-field .prefill-tag { position: absolute; top: -9px; right: 8px; z-index: 1; }
.iw-input {
  width: 100%; box-sizing: border-box;
  font-size: 16px; padding: 13px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-strong);
}
.iw-input:focus { outline: none; border-color: var(--brand-primary, #4f46e5); box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff); }
textarea.iw-input { resize: vertical; min-height: 84px; line-height: 1.5; }
.iw-field.iw-prefilled .iw-input { border-color: var(--brand-primary, #4f46e5); background: var(--brand-primary-light, #eef2ff); }

.iw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.iw-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px;
}
.iw-card:hover { background: var(--surface-sunken, #f6f8fb); border-color: var(--brand-primary, #4f46e5); }
.iw-card.sel, .iw-card.sel:hover { background: var(--brand-primary-light, #eef2ff); border-color: var(--brand-primary, #4f46e5); box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff); }
.iw-card-ico { font-size: 22px; }
.iw-card-name { font-weight: 700; font-size: 14px; color: var(--text-strong); }
.iw-card-blurb { font-size: 12px; color: var(--text-muted); }
.iw-cards-rest { margin-top: 10px; }
.iw-card-rest { border-style: dashed; }
.iw-card-rest.open { border-color: var(--brand-primary, #4f46e5); background: var(--brand-primary-light, #eef2ff); }

.iw-q-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.iw-customize { font-size: 12.5px; }
.iw-cust-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 6px; }
.iw-cust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.iw-cust-item input { width: 16px; height: 16px; accent-color: var(--brand-primary, #4f46e5); }

/* ---------- Modules admin (Step 30) ---------- */
.mod-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.mod-row {
  display: flex; align-items: flex-start; gap: 16px;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
}
.mod-row.mod-off { opacity: .62; background: var(--surface-muted, #f6f7f9); }
.mod-main { flex: 1 1 auto; min-width: 0; }
.mod-name { font-weight: 700; font-size: 15px; }
.mod-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.mod-dep { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.mod-dep .mod-dep-off { color: var(--wf-rej, #d64545); font-weight: 700; }
.mod-toggle { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mod-toggle input { width: 18px; height: 18px; accent-color: var(--brand-primary, #4f46e5); }

/* ---------- Procurement categories admin (Step 29) ---------- */
.pc-cat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.pc-cat.row-inactive { opacity: .55; }
.pc-cat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pc-cat-title { font-weight: 700; font-size: 15px; }
.pc-cat-routing { font-size: 12px; color: var(--text-muted); }
.pc-cat-actions { margin-left: auto; display: flex; gap: 6px; }
.pc-cat-actions .toggle-btn { margin: 0; }
.pc-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pc-sub {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 10px; font-size: 12.5px;
  background: var(--surface-muted, #f1f3f6); border: 1px solid var(--border); border-radius: 999px;
}
.pc-sub.row-inactive { opacity: .5; }
.pc-sub-btn {
  width: 20px; height: 20px; margin: 0; padding: 0; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; line-height: 1;
  background: none; color: var(--text-muted); border: none; border-radius: 5px; cursor: pointer;
}
.pc-sub-btn:hover { background: var(--wf-rej, #d64545); color: #fff; }
.pc-sub-input {
  width: 180px; margin: 0; font-size: 12.5px; padding: 5px 10px;
  border: 1px dashed var(--border); border-radius: 999px; background: var(--surface);
}

.iw-radios { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.iw-radio {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--text-strong); cursor: pointer;
}
.iw-radio:hover { background: var(--surface-sunken, #f6f8fb); border-color: var(--brand-primary, #4f46e5); }
.iw-radio.sel, .iw-radio.sel:hover { border-color: var(--brand-primary, #4f46e5); background: var(--brand-primary-light, #eef2ff); }
.iw-radio input { width: 18px; height: 18px; accent-color: var(--brand-primary, #4f46e5); }

.iw-callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 10px;
  background: var(--brand-primary-light, #eef2ff);
  border: 1px solid color-mix(in srgb, var(--brand-primary, #4f46e5) 30%, transparent);
}
.iw-callout-ico {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-primary, #4f46e5); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.iw-callout p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-strong); }

.iw-total { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 18px; }
.iw-total-value { font-size: 22px; font-weight: 800; color: var(--text-strong); margin: 0; }

.iw-doc-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px;
}
.iw-doc-ico { font-size: 26px; }
.iw-doc-name { font-weight: 700; font-size: 15px; margin: 0 0 2px; color: var(--text-strong); }

.iw-attach-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.iw-attach-add select, .iw-attach-add input[type="file"] { font-size: 13px; }
.iw-att-list { margin-top: 8px; }

.iw-review { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 26px; }
.iw-review-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 16px; font-size: 14px; }
.iw-review-row:nth-child(odd) { background: var(--surface-muted, #f7f8fa); }
.iw-review-row span { color: var(--text-muted); }
.iw-review-row strong { color: var(--text-strong); text-align: right; max-width: 60%; }

.iw-footer {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  border-top: 1px solid var(--border); padding: 16px 48px;
  background: var(--surface);
  box-shadow: 0 -6px 16px rgba(20,24,40,.04);
}
.iw-footer-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.iw-msg { margin: 0; }
.iw-next {
  width: auto; padding: 11px 28px; font-size: 15px; font-weight: 700;
  border-radius: 10px;
}
.iw-next.iw-submit { background: #1f9d55; }

@media (max-width: 760px) {
  .intake-wizard { grid-template-columns: 1fr; }
  .iw-nav { border-right: 0; border-bottom: 1px solid var(--border); display: flex; gap: 6px; overflow-x: auto; }
  .iw-nav-title { display: none; }
  .iw-nav-item { white-space: nowrap; }
  .iw-body { padding: 24px 20px; }
  .iw-footer { padding: 14px 20px; }
}

.field.prefilled input,
.field.prefilled select,
.field.prefilled textarea {
  border-color: var(--brand-primary, #4f46e5);
  background: var(--brand-primary-light, #eef2ff);
}

.prefill-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--brand-primary, #4f46e5);
  background: var(--surface);
  border: 1px solid var(--brand-primary, #4f46e5);
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
}

.intake-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px 14px;
  margin: 6px 0 4px;
  font-size: 13px;
  background: var(--surface-muted, #f6f7f9);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (max-width: 720px) {
  .smart-start { grid-template-columns: 1fr; }
  .smart-start-or { justify-self: start; }
}

/* ---------- Approval rules admin (Step 18) ---------- */

.role-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-selects select {
  width: auto;
  min-width: 170px;
  flex: 1 1 170px;
}

tr.row-inactive td {
  opacity: 0.5;
}

/* ---------- PR supporting documents (Step 22) ---------- */

.attachments-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.attachment-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.attachment-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
}

.attachment-meta { font-size: 12px; color: var(--text-muted); }

.attachment-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.attachment-add select, .attachment-add input[type="file"] { width: auto; flex: 0 1 auto; }
.attachment-add .att-error { width: 100%; margin: 4px 0 0; }

.staged-attachments { margin: 6px 0 0; }
.staged-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.staged-attachment button {
  width: auto; margin: 0; padding: 2px 8px;
  background: var(--danger-bg); color: var(--danger); border: none;
}

/* ---------- RFQ (Step 22) ---------- */

.rfq-supplier-picks { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.rfq-supplier-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.rfq-supplier-pick input { width: auto; margin: 0; }

.rfq-supplier { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.rfq-quote-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.rfq-quote-form input { width: auto; flex: 1 1 140px; margin: 0; }
.rfq-quote-form input[type="file"] { flex: 1 1 100%; }
.rfq-quote-form .q-error { flex: 1 1 100%; margin: 2px 0 0; }

tr.row-lowest td { background: var(--brand-primary-light); }

.password-control { position: relative; }
.password-control input { padding-right: 44px; }
.password-toggle { position: absolute; top: 50%; right: 5px; width: 34px; height: 32px; margin: 0; padding: 0; transform: translateY(-50%); background: transparent; color: var(--text-muted); font-size: 16px; }
.password-toggle:hover { background: #eef1ef; }

.invoice-state { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.invoice-generated { color: #17633d; background: #e5f5ec; }
.invoice-missing { color: #8a4b08; background: #fff1da; }
.invoice-na { color: var(--text-muted); background: var(--surface-sunken); }

.status-approved { background: #e3f7e9; color: #1c8a44; }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-created { background: #f0eafd; color: #6741b5; }
.status-issued { background: #e7edff; color: #3451a3; }
.status-received { background: #e3f7e9; color: #1c8a44; }
.status-partially-received,
.status-partially-accepted { background: #fff1da; color: #8a4b08; }
.status-fully-received,
.status-fully-accepted { background: #e3f7e9; color: #1c8a44; }
.status-closed,
.status-fully-consumed { background: #e6e9ee; color: #3c4655; }
.status-cancelled,
.status-expired { background: var(--danger-bg); color: var(--danger); }
.status-returned { background: #fff1da; color: #8a4b08; }
.status-paid { background: #dff5ef; color: #11735a; }
.status-ready-for-payment { background: #e7edff; color: #3451a3; }
.status-matched { background: #e3f7e9; color: #1c7440; }
.status-mismatch { background: #fff1da; color: #8a4b08; }
.receipt-help { margin: 6px 0 0; color: var(--text-muted); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 33, 26, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(1px);
}

.overlay[hidden] {
  display: none;
}

.overlay-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px;
  width: 100%;
  max-width: 480px;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: var(--shadow-pop);
}

.link-btn-plain {
  width: auto;
  background: none;
  color: var(--brand-accent);
  font-weight: 650;
  padding: 0;
  margin: 0;
}

.details-body {
  margin-top: 8px;
}

/* ---------- Tabbed PR detail body ---------- */

.pr-tabbar {
  display: flex;
  flex-wrap: wrap; /* up to eight tabs (Comments, Contract, Signature...) must never be clipped off a narrow drawer */
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.pr-tab {
  width: auto;
  margin: 0;
  padding: 9px 11px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-weight: 650;
}

.pr-tab:hover { background: transparent; color: var(--text-strong); }

.pr-tab-active {
  color: var(--brand-primary-dark);
  border-bottom-color: var(--brand-primary);
}

.pr-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.pr-tab-active .pr-tab-count { background: var(--brand-primary-light); color: var(--brand-primary-dark); }

.pr-tabpanel[hidden] { display: none; }
.pr-tabpanel .attachments-block:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.pr-tabpanel .approval-strip { margin-top: 2px; }

/* Step 32: Vendor 360 / Master Vendor Shell */
.v360-header { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: baseline; }
.v360-header h1 { margin: 0; }
.v360-code { color: var(--text-muted); font-size: 14px; font-weight: 650; }
.v360-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 20px; margin: 12px 0 4px; }
.v360-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.v360-meta span { color: var(--text-muted); }
.v360-meta strong { color: var(--text-strong); font-weight: 650; text-align: right; }
.v360-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 4px; }
.v360-stat { border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 12px 14px; }
.v360-stat .v360-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 650; }
.v360-stat .v360-stat-value { font-size: 18px; font-weight: 700; margin-top: 3px; }
.v360-stat .v360-stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.v360-empty { color: var(--text-muted); font-size: 13px; margin: 6px 0; }
table.v360-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.v360-table th, table.v360-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.v360-table th { color: var(--text-muted); font-weight: 650; white-space: nowrap; }
table.v360-table tfoot td { border-bottom: none; padding-top: 10px; }

/* Step 32: multi-line editors */
.line-editor { margin: 6px 0 4px; }
.line-editor .le-row { display: grid; grid-template-columns: 1.4fr 1.6fr 0.7fr 0.9fr 0.9fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.line-editor .le-row input { margin-bottom: 0; }
.line-editor .le-row .le-total { font-weight: 650; padding: 8px 0; color: var(--text-strong); }
.line-editor .le-head { font-size: 12px; color: var(--text-muted); font-weight: 650; }
.line-editor .le-remove { width: auto; margin: 0; padding: 8px 10px; background: var(--danger-bg); color: var(--danger); border: 1px solid transparent; }
.line-editor .le-add { width: auto; margin: 4px 0 0; padding: 8px 14px; }
.line-editor .le-grand { text-align: right; font-size: 14px; font-weight: 700; margin-top: 8px; }
tr.close-unfilled td { background: #fff1da; }
@media (max-width: 720px) { .line-editor .le-row { grid-template-columns: 1fr 1fr; } }

/* Step 28: Blanket PO detail */
.bpo-life { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.bpo-life-step { border: 1px solid var(--border-soft); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 650; color: var(--text-muted); }
.bpo-life-step.done { background: #e3f7e9; color: #1c8a44; border-color: transparent; }
.bpo-life-step.current { background: var(--brand-primary-light, #e7edff); color: var(--brand-primary-dark, #3451a3); border-color: transparent; }
.bpo-bar { height: 12px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; margin: 8px 0 4px; }
.bpo-bar > span { display: block; height: 100%; background: var(--brand-primary, #3451a3); }
.bpo-consume { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.bpo-consume .v360-stat-value { font-size: 16px; }

.table-status-filter {
  width: auto;
  min-width: 150px;
  margin: 0;
}

/* ---------- Help page ---------- */

#role-picker { display: flex; align-items: center; gap: 8px; }
#role-picker label { margin: 0; }
#role-picker select { width: auto; min-width: 200px; margin: 0; }

#help-content .panel h2 { margin-bottom: 12px; }
#help-content .panel > p { margin: 0 0 6px; color: var(--text-body); font-size: 14px; line-height: 1.6; }
#help-content h3 { font-size: 14px; margin: 18px 0 6px; color: var(--text-strong); }
#help-content .panel > h3:first-of-type { margin-top: 14px; }

.help-flow, .help-tips { margin: 0; padding-left: 20px; }
.help-flow li, .help-tips li { margin: 6px 0; font-size: 14px; line-height: 1.55; color: var(--text-body); }

.help-page {
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.help-page:first-of-type { border-top: none; padding-top: 4px; }
.help-page h3 { margin: 0 0 2px; font-size: 15px; }
.help-page > .subtitle { margin: 0 0 8px; }

.help-opts { margin: 0; }
.help-opts > div {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.help-opts dt { margin: 0; font-weight: 650; color: var(--text-strong); }
.help-opts dd { margin: 0; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 640px) {
  .help-opts > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Modifiable workflow graph (Step 25) ---------- */

:root {
  --wf-done: #1f9d55;
  --wf-rej: #d64545;
  --wf-pending: #aeb6c2;
  --wf-queue: var(--brand-primary, #4f46e5);
}

.workflow-editor { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }

/* Full-bleed, full-height page layout for /workflow.html */
body.wf-page { overflow: hidden; }
body.wf-page .page-wrap {
  max-width: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 16px;
  gap: 10px;
}
body.wf-page .wf-head { flex: 0 0 auto; }
body.wf-page .panel.wf-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.wf-fullpage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.wf-fullpage .workflow-editor { flex: 1 1 auto; min-height: 0; }
.wf-fullpage .wf-toolbar,
.wf-fullpage .wf-palette,
.wf-fullpage .wf-legend { flex: 0 0 auto; }
.wf-fullpage .wf-scroll { flex: 1 1 auto; min-height: 0; }

/* Stage wrapper: centres a small diagram, grows for a large one so it scrolls
   (grid place-content keeps overflow reachable, unlike flex centring). */
.wf-stage {
  min-width: 100%;
  min-height: 100%;
  display: grid;
  align-content: safe center;
  justify-content: safe center;
  padding: 20px 0;
}

.wf-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.wf-toolbar-hint { font-size: 12.5px; color: var(--text-muted); max-width: 62ch; }
.wf-toolbar-actions { display: flex; align-items: center; gap: 12px; }
.wf-toolbar-actions:empty { display: none; }
.wf-save {
  width: auto; margin: 0; padding: 8px 20px; border-radius: var(--radius-sm, 8px);
  font-weight: 700;
}
.wf-save:disabled { opacity: .45; cursor: default; }
.wf-editbtn {
  width: auto; margin: 0; padding: 8px 18px; border-radius: var(--radius-sm, 8px);
  font-weight: 700; font-size: 13px;
  background: var(--surface); color: var(--brand-primary, #4f46e5);
  border: 1.5px solid var(--brand-primary, #4f46e5); cursor: pointer;
}
.wf-editbtn:hover { background: var(--brand-primary-light, #eef2ff); }
.wf-toolbar-actions .link-btn-plain { margin: 0; }
.wf-msg { font-size: 12.5px; color: var(--text-muted); }
.wf-msg[data-kind="err"] { color: var(--wf-rej); font-weight: 600; }

.wf-scroll {
  position: relative;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  background-image: radial-gradient(rgba(148, 163, 184, .35) 1px, transparent 1.4px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.wf-canvas-outer { position: relative; margin: 26px; }
.wf-diagram { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

/* Floating zoom / edit controls: sticky to the top, pushed to the right edge */
.wf-controls {
  position: sticky; top: 10px; z-index: 20;
  width: fit-content; margin: 10px 10px -48px auto;
  display: flex; align-items: center; gap: 2px;
  padding: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 4px 14px rgba(20,24,40,.10);
}
.wf-ctl {
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text-strong); font-size: 15px; font-weight: 700;
  cursor: pointer; display: grid; place-items: center;
}
.wf-ctl:hover { background: var(--surface-muted, #f1f3f6); }
.wf-ctl.wf-edit-toggle { color: var(--wf-queue); }
.wf-zoom-label { font-size: 11px; color: var(--text-muted); min-width: 34px; text-align: center; }

.wf-links { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: visible; }
.wf-links .wf-link {
  fill: none; stroke: var(--wf-pending); stroke-width: 2.25; stroke-linecap: round;
  opacity: .9; marker-end: url(#wf-arrow); transition: opacity .12s, stroke-width .12s;
}
.wf-links .wf-link.wf-done { stroke: var(--wf-done); }
.wf-links .wf-link.wf-rejected { stroke: var(--wf-rej); }
.wf-links.wf-links-focus .wf-link.wf-link-on { stroke-width: 3; } /* connected lines get heavier; nothing is ever hidden */

.wf-node {
  position: absolute; z-index: 3; box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid #a9b4bf;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20,24,40,.08), 0 6px 16px rgba(20,24,40,.06);
  transition: box-shadow .12s, transform .12s, border-color .12s;
}
/* Neutralise the global button reset inside the canvas */
.wf-node button, .wf-controls button, .wf-insert, .wf-insert-menu button { margin: 0; }
.wf-node.wf-editable { cursor: grab; }
.wf-node.wf-editable:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(20,24,40,.14); }
.wf-node.wf-editable:active { cursor: grabbing; }
.wf-node.wf-done { background: #fbfdfb; }
.wf-node.wf-actionable { border-color: var(--wf-queue); box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff), 0 10px 24px rgba(20,24,40,.10); }

.wf-ico {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 14px; line-height: 1;
  background: var(--surface-muted, #eef1f5); color: var(--text-muted);
}
.wf-ico-done { background: var(--wf-done); color: #fff; border-radius: 50%; font-size: 15px; }
.wf-ico-rej { background: var(--wf-rej); color: #fff; border-radius: 50%; }
.wf-ico-queue { background: #f6a723; color: #fff; border-radius: 50%; font-size: 11px; }

.wf-node-top { display: flex; align-items: center; gap: 8px; padding-right: 24px; }
.wf-pill {
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: #fdf0d9; color: #9a6400;
}
.wf-pill-req { background: var(--brand-primary-light); color: var(--brand-primary-dark); cursor: help; }
.wf-node-title { font-weight: 700; font-size: 14px; line-height: 1.25; color: var(--text-strong); }
.wf-node-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }
.wf-mini { font-size: 10px; flex: 0 0 auto; filter: grayscale(1); opacity: .7; }

.wf-fld {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  font-size: 11.5px; padding: 3px 6px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-strong);
}
.wf-fld:focus { outline: none; border-color: var(--wf-queue); }
input.wf-fld-due { color-scheme: light; }

.wf-node-actions { display: flex; gap: 6px; margin-top: 3px; min-width: 0; }
.wf-approve {
  flex: 1 1 auto; min-width: 0; width: auto; box-sizing: border-box;
  padding: 6px 8px; font-size: 12px; font-weight: 700;
  border-radius: 8px; background: var(--text-strong); color: #fff; border: 0; cursor: pointer;
}
.wf-approve:hover { filter: brightness(1.15); }
.wf-reject {
  flex: 0 0 28px; width: 28px; height: 28px; padding: 0; box-sizing: border-box;
  border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--wf-rej); font-weight: 700;
}
.wf-reject:hover { background: var(--wf-rej); color: #fff; }
.wf-node.wf-can-decide { border-color: var(--wf-queue); box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff), 0 10px 24px rgba(20,24,40,.12); }

.wf-insert {
  position: absolute; z-index: 6; width: 26px; height: 26px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--wf-queue); font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(20,24,40,.14);
  opacity: .35; transition: opacity .12s, transform .12s;
}
.wf-insert:hover { opacity: 1; transform: scale(1.12); }
.wf-insert-menu {
  position: absolute; z-index: 30; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20,24,40,.22); padding: 4px; display: flex; flex-direction: column;
}
.wf-insert-menu button {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 8px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-strong);
}
.wf-insert-menu button:hover { background: var(--brand-primary-light, #eef2ff); }
.wf-insert-menu button span { color: var(--text-muted); font-weight: 500; font-size: 11px; }
.wf-insert-empty { padding: 8px 10px; font-size: 12px; color: var(--text-muted); }
.wf-grip { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--border); }
.wf-remove {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 20px; height: 20px; padding: 0; margin: 0;
  border: none; background: var(--surface); cursor: pointer;
  color: var(--text-muted); font-size: 12px; line-height: 1; border-radius: 6px;
  display: grid; place-items: center;
}
.wf-remove:hover { color: #fff; background: var(--wf-rej); }

.wf-clone {
  position: fixed; z-index: 9999; pointer-events: none; margin: 0;
  box-shadow: 0 16px 40px rgba(20,24,40,.30); opacity: .96;
}
.wf-diagram.wf-drag-active .wf-node.wf-editable { opacity: .96; }

.wf-ins-bar {
  position: absolute; top: 0; width: 3px; z-index: 4;
  background: var(--wf-queue); border-radius: 2px;
  box-shadow: 0 0 0 3px var(--brand-primary-light, #eef2ff);
}
.wf-col-hi {
  position: absolute; top: 0; z-index: 2;
  background: rgba(79,70,229,.07);
  border: 2px dashed var(--wf-queue); border-radius: var(--radius-md);
}

/* Collapsed read-only procurement tail lane */
.wf-tail {
  position: absolute; z-index: 3; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: 8px 10px;
}
.wf-tail-head { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 6px; }
.wf-tail-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 2px 0; color: var(--text-strong); }
.wf-tail-row .wf-tail-st { margin-left: auto; font-size: 10px; color: var(--text-muted); }

.wf-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wf-palette-label { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.wf-palette-empty { font-size: 12px; color: var(--text-muted); }
.wf-add {
  display: inline-flex; align-items: center; gap: 6px; width: auto;
  padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); color: var(--text-strong);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.wf-add:hover { border-color: var(--wf-queue); background: var(--brand-primary-light, #eef2ff); }
.wf-add-plus { font-weight: 800; color: var(--wf-queue); }
.wf-add-role { color: var(--text-muted); font-weight: 500; }

.wf-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--text-muted); }
.wf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.wf-lg-queue { background: var(--wf-queue); }
.wf-lg-done { background: var(--wf-done); }
.wf-lg-pending { background: var(--wf-pending); }
.wf-lg-rej { background: var(--wf-rej); }

.wf-openfull { font-size: 13px; }

/* /workflow.html header */
.wf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.wf-head h1 { margin: 0; }
.wf-picker { display: flex; align-items: center; gap: 8px; }
.wf-picker label { font-weight: 700; font-size: 13px; }
.wf-picker select { width: auto; min-width: 260px; max-width: 52vw; }
.wf-picker button, #wf-view-pr { width: auto; margin: 0; white-space: nowrap; }
.wf-statuschip {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-muted, #eef1f5); color: var(--text-muted);
}

/* ---------- Activity / audit timeline (Step 23) ---------- */

.activity-block { margin-top: 18px; }
.activity-block h2 { margin-bottom: 12px; }

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 16px 4px;
}
.activity-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: var(--border);
}
.activity-item:last-child::before { display: none; }

.activity-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

.activity-body { flex: 1; min-width: 0; }
.activity-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.activity-head strong { font-size: 13.5px; color: var(--text-strong); }
.activity-when { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.activity-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.activity-status { font-size: 12px; margin-top: 5px; }
.activity-detail {
  font-size: 13px;
  color: var(--text-body);
  margin-top: 5px;
  padding: 6px 10px;
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.detail-row span {
  color: var(--text-muted);
}

.detail-section {
  margin: 16px 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-primary-dark);
}

.detail-row strong {
  text-align: right;
  color: var(--text-strong);
  font-weight: 650;
}

.decision-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

/* Step 25: Goods Receipt / Service Entry */
.receipt-block { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.receipt-block h3 { margin: 0 0 10px; font-size: 15px; }
.receipt-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-bottom: 12px; }
.receipt-summary-grid div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.receipt-summary-grid span { color: var(--text-muted); }
.receipt-summary-grid strong { color: var(--text-strong); font-weight: 650; }
table.receipt-history { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
table.receipt-history th, table.receipt-history td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--border-soft); }
table.receipt-history th { color: var(--text-muted); font-weight: 650; }
.receipt-none { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.receipt-form label { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.receipt-form input, .receipt-form textarea, .receipt-form select { margin-bottom: 0; }
.receipt-form .receipt-ro { font-weight: 650; color: var(--text-strong); }
ul.plain-list { list-style: none; padding: 0; margin: 6px 0 0; }
ul.plain-list li { padding: 5px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.pdf-download-btn { display: inline-block; margin-top: 18px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--brand-ink); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.pdf-download-btn:hover { background: #0a1712; }
.pdf-download-btn[hidden] { display: none; }
.pdf-options { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.pdf-options[hidden] { display: none; }
.pdf-options input { margin-bottom: 0; }
.decision-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Step 37: shared Custom Fields card on entity detail screens */
.panel-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.panel-sub h3 { margin: 0 0 8px; font-size: 15px; }
.cfc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cfc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cfc-field > span:first-child { font-weight: 600; }
.cfc-input { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; }
.cfc-input:disabled { background: var(--surface-2, #f3f3f7); color: var(--muted); }
.decision-btn { width: auto; padding: 9px 18px; }
.approve-btn { background: #21864a; }
.approve-btn:hover { background: #196d3b; }
.reject-btn { background: #b53b32; }
.reject-btn:hover { background: #963129; }
.decision-btn:disabled { opacity: .55; cursor: wait; }

/* ---------- Role-based home dashboard ---------- */

.dashboard-body { background: var(--page-bg); color: var(--brand-ink); }
.dashboard-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 56px; }
.dashboard-intro { padding: 40px 0 28px; }
.dashboard-eyebrow { margin: 0 0 8px; color: var(--brand-accent); font-size: 12px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.dashboard-intro h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.04em; }
.dashboard-intro > p:last-child { margin: 10px 0 0; color: var(--text-muted); }
.dashboard-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.dashboard-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: #254d3c; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; font-weight: 700; text-decoration: none; }
.dashboard-links a:hover { border-color: #93b2a3; background: #fbfdfc; }
.dashboard-links a span { color: var(--brand-accent); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); color: inherit; text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: #9fbcae; }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.03em; color: var(--text-strong); }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }

.dashboard-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dashboard-count-card { min-height: 158px; display: flex; flex-direction: column; padding: 22px; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); transition: transform .15s ease, border-color .15s ease; }
.dashboard-count-card:hover { transform: translateY(-2px); border-color: #9fbcae; }
.dashboard-count-card span { color: var(--text-muted); font-size: 13px; font-weight: 650; }
.dashboard-count-card strong { margin-top: 12px; font-size: 36px; letter-spacing: -.04em; }
.dashboard-count-card small { margin-top: auto; color: var(--brand-accent); font-weight: 650; }
.dashboard-section { margin-bottom: 22px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.dashboard-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.dashboard-section-title h2 { margin: 0; font-size: 17px; }
.dashboard-section-title > span { display: inline-grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 99px; background: var(--brand-primary-light); color: var(--brand-accent); font-size: 12px; font-weight: 750; }
.dashboard-list { border-top: 1px solid var(--border-soft); }
.dashboard-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 2px; border-bottom: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.dashboard-item:hover strong:first-child { color: var(--brand-accent); }
.dashboard-item > div:first-child { display: grid; gap: 4px; }
.dashboard-item > div:first-child span { color: var(--text-muted); font-size: 13px; }
.dashboard-item-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; white-space: nowrap; }
.dashboard-item-meta b:last-child { color: var(--brand-accent); }
.dashboard-empty { padding: 28px; color: var(--text-muted); text-align: center; background: var(--surface-sunken); border-radius: var(--radius-md); }
@media (max-width: 760px) { .dashboard-counts { grid-template-columns: repeat(2, 1fr); } .dashboard-item { align-items: flex-start; flex-direction: column; } .dashboard-item-meta { width: 100%; justify-content: flex-start; flex-wrap: wrap; } }
@media (max-width: 430px) { .dashboard-counts { grid-template-columns: 1fr; } .dashboard-intro { padding-top: 34px; } }

/* ---------- Lifecycle stepper (PR -> PO -> Invoice -> Payment) ---------- */

.lifecycle-strip {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.lifecycle-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  min-width: 120px;
}

a.lifecycle-step:hover {
  background: #eef3f1;
}

.lifecycle-step-current {
  background: var(--brand-primary-light);
  box-shadow: inset 0 0 0 1px #b9d4c6;
}

.lifecycle-step-empty {
  opacity: 0.55;
}

.lifecycle-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.lifecycle-number {
  font-size: 13px;
  color: var(--text-strong);
}

.lifecycle-pending {
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
}

.lifecycle-connector {
  align-self: center;
  color: #b7c1bc;
  font-weight: 700;
  padding: 0 2px;
}

@media (max-width: 700px) {
  .lifecycle-strip { flex-direction: column; }
  .lifecycle-connector { display: none; }
}

/* ---------- Approval routing strip (Step 16) ---------- */

.approval-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.appr-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.appr-step .appr-mark { font-weight: 800; }

.appr-done { background: #e3f7e9; border-color: #b7e3c6; color: #1c7a44; }
.appr-rejected { background: var(--danger-bg); border-color: #e6b9b4; color: var(--danger); }
.appr-current { background: var(--brand-primary-light); border-color: #b9d4c6; color: var(--brand-primary-dark); }
.appr-upcoming { opacity: 0.7; }

.appr-arrow { color: #b7c1bc; font-weight: 700; }

@media (max-width: 700px) {
  .approval-strip { flex-direction: column; align-items: stretch; }
  .appr-arrow { display: none; }
}

/* ---------- Table search + sortable columns ---------- */

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.table-search {
  width: 100%;
  max-width: 320px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sortable-th:hover {
  color: var(--brand-accent);
}

.sortable-th::after {
  content: '↕';
  display: inline-block;
  margin-left: 4px;
  opacity: 0.35;
  font-size: 11px;
}

.sortable-th.sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--brand-accent);
}

.sortable-th.sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--brand-accent);
}

/* ---------- App shell: top header + left sidebar (all logged-in pages) ---------- */

:root {
  --topbar-h: 56px;
  --sidebar-w: 236px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
}

body.has-sidebar { padding-left: var(--sidebar-w); padding-top: var(--topbar-h); }

.app-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-topbar .brand-mark { display: flex; align-items: center; }

.topbar-search { position: relative; width: 260px; max-width: 34vw; }
.topbar-search-input {
  width: 100%; margin: 0; padding: 7px 10px;
  font-size: 13px; font-weight: 500;
  background: var(--surface-sunken); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-body);
}
.topbar-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  z-index: 46; max-height: 320px; overflow-y: auto; padding: 6px;
}
.topbar-search-results a {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--text-body); text-decoration: none;
}
.topbar-search-results a:hover { background: var(--surface-sunken); }
.topbar-search-empty { margin: 0; padding: 8px 10px; font-size: 12px; color: var(--text-muted); }

.topbar-spacer { flex: 1; }

.ac-bell {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  font-size: 18px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); text-decoration: none;
}
.ac-bell:hover { background: var(--surface-sunken); }
.ac-bell-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; text-align: center;
  padding: 1px 5px; border-radius: 999px;
  background: #b3261e; color: #fff; font-size: 10px; font-weight: 700;
}

.topbar-user { position: relative; }
.topbar-user-btn {
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25;
  margin: 0; padding: 5px 12px;
  font-size: 13px; font-weight: 650; color: var(--text-strong);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.topbar-user-btn:hover { background: var(--surface-sunken); }
.topbar-user-btn small { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.topbar-user-menu {
  position: absolute; top: calc(100% + 4px); right: 0; min-width: 160px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  z-index: 46; overflow: hidden;
}
.topbar-user-menu a, .topbar-user-menu button {
  width: 100%; margin: 0; padding: 9px 12px;
  font-size: 13px; font-weight: 600; text-align: left;
  color: var(--text-body); text-decoration: none;
  background: var(--surface); border: 0; border-radius: 0;
}
.topbar-user-menu a:hover, .topbar-user-menu button:hover { background: var(--surface-sunken); }

.org-brand { display: flex; align-items: center; gap: 6px; }
.org-brand-logo { max-height: 22px; max-width: 90px; object-fit: contain; }
.org-brand-name { font-size: 12px; font-weight: 650; color: var(--text-strong); }
.org-brand-status { font-size: 10px; font-weight: 700; color: #a12626; background: #fde0e0; border-radius: 8px; padding: 1px 6px; }

.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-3);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.nav-group { display: flex; flex-direction: column; gap: 2px; }

.nav-group-label {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin: 0 0 4px; padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: none; border: 0; cursor: pointer;
}
.nav-group-chevron { font-size: 10px; transition: transform .15s ease; }
.nav-group-collapsed .nav-group-chevron { transform: rotate(-90deg); }
.nav-group-collapsed .nav-group-items { display: none; }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #45524c;
  text-decoration: none;
  transition: background .1s ease;
}

.nav-link:hover { background: var(--surface-sunken); color: var(--text-strong); }

.nav-link-active {
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  font-weight: 700;
  box-shadow: inset 2px 0 0 var(--brand-primary);
}

.sidebar-toggle {
  display: none;
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  z-index: 39;
  background: rgba(16, 33, 26, .4);
}

@media (max-width: 960px) {
  body.has-sidebar { padding-left: 0; }
  .topbar-search { width: 160px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .sidebar-toggle { display: block; }
}

/* ---------- Shared priority badge (Action Center, Home) ---------- */
.pri-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pri-badge.Urgent { background: var(--danger-bg, #fdeceb); color: var(--danger, #b3261e); }
.pri-badge.High { background: #fff4e5; color: #9a6700; }
.pri-badge.Normal { background: var(--surface-sunken); color: var(--text-muted); }

/* ---------- Shared wide-table scroll wrapper with sticky action column ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 100%; }
.table-wrap th.col-actions, .table-wrap td.col-actions {
  position: sticky; right: 0; background: var(--surface);
  box-shadow: -6px 0 6px -6px rgba(0,0,0,.15);
}

/* ---------- Shared filter-tab row (sourcing/contracts/etc status filters) ---------- */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-tabs button {
  width: auto; display: inline-block; margin: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-body);
  border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 13px; font-weight: 500;
}
.filter-tabs button.on { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* Step 67: Home "View My Actions" call-to-action (replaces the old queues) */
.my-actions-cta {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 22px; padding: 14px 18px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e0e0e0);
  border-left: 4px solid #2e5db0; border-radius: 12px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.06));
}
.my-actions-cta:hover { background: var(--surface-sunken, #f6f8fb); }
.my-actions-cta .mac-count {
  min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: #2e5db0; color: #fff; border-radius: 10px; font-size: 20px; font-weight: 800;
}
.my-actions-cta .mac-text { display: flex; flex-direction: column; }
.my-actions-cta .mac-text strong { font-size: 15px; }
.my-actions-cta .mac-text span { font-size: 12px; color: var(--text-muted, #777); }
.my-actions-cta b { margin-left: auto; font-size: 18px; color: #2e5db0; }

/* Intake wizard: required markers and "what is still missing" feedback */
.iw-req { color: var(--danger); font-weight: 700; margin-left: 2px; }
.iw-invalid {
  border-left: 3px solid var(--danger);
  padding-left: 12px;
  background: var(--danger-bg);
  border-radius: var(--radius-md);
}
.iw-invalid .iw-input,
.iw-invalid select,
.iw-invalid input[type="text"],
.iw-invalid textarea { border-color: var(--danger); }
.iw-field-error { color: var(--danger); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.iw-problems {
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.iw-problems strong { color: var(--danger); }
.iw-problems ul { margin: 8px 0 0; padding-left: 18px; }
.iw-problems li { margin: 4px 0; }
.iw-problems .link-btn-plain { color: var(--danger); text-decoration: underline; font-weight: 600; }
.iw-problem-step { color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.iw-late { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border); }

/* Workflow: parallel stages and stages waiting on another */
.wf-pill-par { background: #e8f1ff; color: #1d4f9c; }
.wf-pill-wait { background: #f3f0e6; color: #7a6a2f; cursor: help; }
.wf-lg-wait { background: #d9cfa3; }
.wf-node.wf-pending:not(.wf-actionable) { opacity: .92; }

/* Workflow: merged connectors, room under the buttons, read-only dates, undo */
.wf-links .wf-link.wf-link-nohead { marker-end: none; }
.wf-node { padding-bottom: 16px; }
.wf-node-actions { margin-bottom: 2px; }
.wf-node-date { color: var(--text-muted, #5b6672); }
.wf-undo:disabled { opacity: .4; cursor: default; }

/* Request comments + @mentions */
.pr-comments { max-width: 760px; }
.pr-comment-list { display: flex; flex-direction: column; gap: 14px; max-height: 460px; overflow-y: auto; padding: 4px 2px 12px; }
.pr-comment { display: flex; gap: 10px; align-items: flex-start; }
.pr-comment-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-primary-light, #e8f1ec); color: var(--brand-primary-dark, #1b5e45); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pr-comment-avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.pr-comment-main { min-width: 0; flex: 1; background: var(--surface-alt, #f6f8f7); border: 1px solid var(--border-soft, #e3e8e5); border-radius: 12px; padding: 9px 12px; }
.pr-comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.pr-comment-role { font-size: 12px; color: var(--text-muted, #5b6672); }
.pr-comment-time { font-size: 12px; color: var(--text-muted, #5b6672); margin-left: auto; }
.pr-comment-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.pr-mention { background: #e3efe9; color: #17684a; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.pr-comment-empty { text-align: center; color: var(--text-muted, #5b6672); padding: 28px 12px; border: 1px dashed var(--border-soft, #d5dcd8); border-radius: 12px; }
.pr-comment-composer { margin-top: 10px; }
.pr-mention-wrap { position: relative; }
.pr-comment-input { width: 100%; box-sizing: border-box; min-height: 74px; max-height: 240px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border: 1px solid var(--border, #d5dcd8); border-radius: 10px; background: var(--surface, #fff); color: var(--text-strong, #17242c); font: inherit; line-height: 1.45; outline: none; }
.pr-comment-input:focus { border-color: var(--brand-primary, #1b5e45); box-shadow: 0 0 0 3px rgba(27,94,69,.14); }
.pr-comment-input:empty::before { content: attr(data-placeholder); color: var(--text-muted, #7a8590); pointer-events: none; }
/* a tagged person: one green chip, deleted whole with one Backspace */
.pr-mention-chip { display: inline-block; background: #d6efe2; color: #0d6a45; border-radius: 6px; padding: 0 6px; margin: 0 1px; font-weight: 650; user-select: all; white-space: nowrap; }
.pr-comment-note { color: var(--text-muted, #5b6672); font-size: 12px; flex-basis: 100%; }
.pr-mention-menu { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 4px; z-index: 20; background: var(--surface, #fff); border: 1px solid var(--border-soft, #d5dcd8); border-radius: 10px; box-shadow: 0 8px 24px rgba(20,24,40,.14); overflow: hidden; max-height: 280px; overflow-y: auto; }
.pr-mention-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text-strong, #17242c); padding: 7px 10px; cursor: pointer; font: inherit; }
.pr-mention-name { color: var(--text-strong, #17242c); font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.pr-mention-item .pr-comment-role { margin-left: auto; color: var(--text-muted, #5b6672); font-size: 12px; text-align: right; }
.pr-mention-title { position: sticky; top: 0; background: var(--surface, #fff); padding: 7px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #5b6672); }
.pr-mention-foot { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--border-soft, #e3e8e5); background: var(--surface, #fff); position: sticky; bottom: 0; color: var(--brand-primary-dark, #17684a); padding: 9px 10px; font: inherit; font-weight: 650; cursor: pointer; }
.pr-mention-foot:hover { background: var(--brand-primary-light, #e8f1ec); }
.pr-mention-item:hover, .pr-mention-active { background: var(--brand-primary-light, #e8f1ec); }
.pr-mention-none { padding: 9px 12px; color: var(--text-muted, #5b6672); font-size: 13px; }
.pr-comment-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.pr-comment-hint { font-size: 12px; color: var(--text-muted, #5b6672); margin-right: auto; }
.pr-comment-err { color: var(--danger, #b3261e); font-size: 13px; }
.pr-comment-post { background: var(--brand-primary, #1b5e45); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font-weight: 650; cursor: pointer; }
.pr-comment-post:disabled { opacity: .6; cursor: default; }

/* Contract Review workspace */
.pr-contract { max-width: 980px; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.cr-status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; background: #eef1f4; color: #3a4654; }
.cr-status-under-legal-review, .cr-status-supplier-revision-received { background: #fff3d9; color: #8a5a00; }
.cr-status-with-supplier { background: #e8f1ff; color: #1d4f9c; }
.cr-status-agreed { background: #e3efe9; color: #17684a; }
.cr-status-completed { background: #1b5e45; color: #fff; }
.cr-banner { background: #f3f0e6; border-radius: 10px; padding: 9px 12px; margin: 8px 0; }
.cr-banner-ok { background: #e3efe9; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.cr-card { border: 1px solid var(--border-soft, #e3e8e5); border-radius: 12px; padding: 12px 14px; background: var(--surface, #fff); }
.cr-card h4, .pr-contract > h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #5b6672); }
.cr-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cr-row select { flex: 1; min-width: 160px; }
.cr-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cr-lbl { display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted, #5b6672); gap: 2px; }
.cr-details { margin-top: 10px; }
.cr-table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.cr-table th, .cr-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-soft, #e3e8e5); vertical-align: top; }
.cr-table th { font-size: 12px; color: var(--text-muted, #5b6672); text-transform: uppercase; letter-spacing: .03em; }
.cr-final-row { background: #f1f8f4; }
.cr-final { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #1b5e45; color: #fff; font-size: 12px; font-weight: 700; }
.cr-actions a, .cr-link { margin-right: 10px; }
.cr-link { background: none; border: 0; color: var(--brand-accent, #1b5e45); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.cr-btn { background: var(--surface-alt, #f6f8f7); border: 1px solid var(--border-soft, #d5dcd8); border-radius: 8px; padding: 7px 14px; font-weight: 650; cursor: pointer; }
.cr-btn-primary { background: var(--brand-primary, #1b5e45); color: #fff; border-color: transparent; margin-top: 6px; }
.cr-btn:disabled { opacity: .6; cursor: default; }
.cr-upload { margin-top: 14px; }
.cr-err { color: var(--danger, #b3261e); margin: 8px 0; }

/* ---- DocuSign / contract execution (Batch D2) ---- */
.ds-sim { background: #fdecec; border: 1px solid #e3b3b3; color: #7a1f1f; border-radius: 10px; padding: 9px 12px; margin: 8px 0; }
.ds-sim-tag { background: #8a1c1c; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.ds-hash { font-family: ui-monospace, Consolas, monospace; }
.ds-history { margin: 0; padding-left: 18px; }
.ds-history li { margin: 3px 0; }
.cr-err-inline { color: #a02323; font-weight: 600; }
.cr-status-not-started, .cr-status-prepared { background: #eef1f0; color: #4a5a54; }
.cr-status-sent, .cr-status-partially-signed { background: #e8f1ff; color: #1d4f9c; }
.cr-status-executed { background: #1b5e45; color: #fff; }
.cr-status-declined, .cr-status-error { background: #fdecec; color: #8a1c1c; }
.cr-status-voided { background: #f3f0e6; color: #6b5a1f; }

/* ---------- Record pages: a PR / PO / Invoice is a page, not a popup (see installRecordPages in app.js) ---------- */
body.record-page .page-wrap { display: none; }
body.record-page .overlay { position: static; inset: auto; display: block; background: transparent; backdrop-filter: none; padding: 38px 40px 64px; max-width: 1500px; margin: 0 auto; }
body.record-page .overlay[hidden] { display: none; }
body.record-page .overlay-card { max-width: none; max-height: none; overflow: visible; margin: 0; padding: 28px 32px 36px; box-shadow: var(--shadow-card, 0 1px 3px rgba(16,33,26,.1)); border: 1px solid var(--ph-line, #cfd7d1); }
body.record-page .overlay-card > .header-row { align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--ph-line, #cfd7d1); }
body.record-page #details-title { font-size: 28px; line-height: 1.15; margin: 0; }
body.record-page .overlay-card > .header-row .link-btn-plain { font-size: 14px; white-space: nowrap; }
@media (max-width: 960px) { body.record-page .overlay { padding: 28px 22px 48px; } }
@media (max-width: 680px) { body.record-page .overlay { padding: 20px 14px 40px; } body.record-page .overlay-card { padding: 18px 16px 24px; } body.record-page #details-title { font-size: 22px; } }

:root { --ph-line: #d3dad5; --ph-line-strong: #bcc7c0; } /* visible on bright / low-contrast monitors (the global soft border is nearly the page colour) */
/* ---------- Home for the Procurement roles ---------- */
body.ph-body .dashboard-shell main { max-width: 1480px; }
.ph { display: flex; flex-direction: column; gap: 22px; }
.ph-top { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) minmax(250px, 1.1fr) auto; gap: 18px; align-items: stretch; }
.ph-welcome h1 { font-size: clamp(28px, 3vw, 40px); margin: 4px 0 6px; letter-spacing: -.03em; }
.ph-welcome > p:last-child { color: var(--text-muted, #5b6672); margin: 0; font-size: 16px; }
.ph-kpi { box-shadow: var(--shadow-card, 0 1px 3px rgba(16,33,26,.1)); background: var(--surface, #fff); border: 1px solid var(--ph-line); border-radius: 14px; padding: 16px 18px; }
.ph-kpi h3 { margin: 0 0 8px; font-size: 16px; color: var(--text-strong, #17242c); }
.ph-kpi-big { display: flex; align-items: baseline; gap: 8px; }
.ph-kpi-big strong { font-size: 30px; line-height: 1; letter-spacing: -.03em; color: var(--text-strong, #17242c); }
.ph-kpi-big span { color: var(--text-muted, #5b6672); font-size: 14px; }
.ph-bar { height: 8px; border-radius: 999px; background: #e6ece8; overflow: hidden; flex: 1; margin: 8px 0 6px; }
.ph-bar i { display: block; height: 100%; background: var(--brand-primary, #1b5e45); border-radius: 999px; }
.ph-delta { margin: 2px 0; font-size: 13px; font-weight: 650; }
.ph-delta.up { color: #17684a; } .ph-delta.down { color: #b3261e; }
.ph-kpi-sub { margin: 6px 0 0; font-size: 13px; color: var(--text-muted, #5b6672); }
.ph-row { display: grid; grid-template-columns: 112px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.ph-row .ph-bar { margin: 6px 0; } .ph-row b { text-align: right; color: var(--text-strong, #17242c); }
.ph-create { display: inline-flex; align-items: center; gap: 8px; align-self: start; background: var(--brand-primary, #1b5e45); color: #fff !important; text-decoration: none; font-weight: 650; font-size: 16px; padding: 16px 24px; border-radius: 12px; white-space: nowrap; }
.ph-create:hover { background: var(--brand-primary-dark, #134a37); }
.ph-ico { width: 18px; height: 18px; flex: none; }
.ph-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.ph-card { box-shadow: var(--shadow-card, 0 1px 3px rgba(16,33,26,.1)); background: var(--surface, #fff); border: 1px solid var(--ph-line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; }
.ph-side .ph-card:last-child { margin-bottom: 0; }
.ph-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ph-card-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.ph-pill { display: inline-block; min-width: 26px; padding: 2px 9px; border-radius: 999px; background: #e3efe9; color: #17684a; font-weight: 700; font-size: 13px; text-align: center; }
.ph-viewall { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--brand-primary-dark, #17684a); text-decoration: none; }
.ph-viewall .ph-ico, .ph-review .ph-ico, .ph-beyond a .ph-ico, .ph-selbar .ph-ico { width: 15px; height: 15px; }
.ph-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--ph-line); margin-bottom: 14px; flex-wrap: wrap; }
.ph-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 14px; font: inherit; font-weight: 650; color: var(--text-muted, #5b6672); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.ph-tabs button.on { color: var(--brand-primary-dark, #17684a); border-bottom-color: var(--brand-primary, #1b5e45); }
.ph-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ph-select, .ph-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ph-line-strong); border-radius: 10px; padding: 0 12px; background: var(--surface, #fff); color: var(--text-strong, #17242c); }
.ph-search { flex: 1; min-width: 200px; }
.ph-select select, .ph-search input { border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 11px 0; width: 100%; box-shadow: none; }
.ph-filters { display: inline-flex; gap: 8px; align-items: center; background: var(--surface, #fff); color: var(--text-strong, #17242c); border: 1px solid var(--ph-line-strong); border-radius: 10px; padding: 0 16px; font: inherit; font-weight: 650; cursor: pointer; }
.ph-filters.on { border-color: var(--brand-primary, #1b5e45); }
.ph-filterbox { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; background: #f4f7f5; border-radius: 10px; font-size: 14px; }
.ph-filterbox select { margin-left: 6px; padding: 6px 8px; border: 1px solid var(--ph-line-strong); border-radius: 8px; font: inherit; }
.ph-selbar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 8px 12px; background: #e3efe9; border-radius: 10px; font-weight: 650; color: #17684a; }
.ph-selbar button { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; background: var(--brand-primary, #1b5e45); color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font: inherit; font-weight: 650; cursor: pointer; }
.ph-tablewrap { overflow-x: auto; border: 1px solid var(--ph-line); border-radius: 12px; }
.ph-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.ph-table th { text-align: left; background: #f4f7f5; color: var(--text-strong, #17242c); font-size: 14px; font-weight: 650; padding: 14px 14px; border-bottom: 1px solid var(--ph-line); white-space: nowrap; }
.ph-table td { padding: 14px; border-bottom: 1px solid var(--ph-line); vertical-align: middle; }
.ph-table tr:last-child td { border-bottom: 0; }
.ph-table tr.sel { background: #f1f7f3; }
.ph-c { width: 44px; text-align: center !important; } .ph-r { text-align: right !important; white-space: nowrap; }
.ph-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand-primary, #1b5e45); }
.ph-req { display: flex; gap: 14px; align-items: center; }
.ph-reqicon { width: 42px; height: 42px; border-radius: 50%; background: #eef2f0; display: inline-flex; align-items: center; justify-content: center; color: #3a4654; flex: none; }
.ph-reqicon .ph-ico { width: 20px; height: 20px; }
.ph-reqtitle { font-weight: 650; color: var(--text-strong, #17242c); text-decoration: none; font-size: 15px; }
.ph-reqtitle:hover { text-decoration: underline; }
.ph-reqsub { color: var(--text-muted, #5b6672); font-size: 13px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ph-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #e3efe9; color: #17684a; }
.ph-badge.warn { background: #fdecc8; color: #8a5a00; }
.ph-due { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--text-strong, #17242c); }
.ph-due .ph-ico { width: 18px; height: 18px; }
.ph-due-over { color: #b3261e; } .ph-due-today { color: #b45309; } .ph-due-none { color: var(--text-muted, #5b6672); }
.ph-review { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--brand-primary, #1b5e45); border-radius: 8px; color: var(--brand-primary-dark, #17684a); font-weight: 650; text-decoration: none; white-space: nowrap; background: var(--surface, #fff); }
.ph-review:hover { background: #e8f1ec; }
.ph-empty { text-align: center; color: var(--text-muted, #5b6672); padding: 28px 14px !important; }
.ph-muted { color: var(--text-muted, #5b6672); margin: 0 0 8px; font-size: 14px; } .ph-none { padding: 6px 0; }
.ph-beyond { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--ph-line); }
.ph-bicon { width: 44px; height: 44px; border-radius: 10px; background: #eef2f0; display: inline-flex; align-items: center; justify-content: center; color: #3a4654; flex: none; }
.ph-beyond strong { display: block; color: var(--text-strong, #17242c); } .ph-beyond p { margin: 2px 0 6px; color: var(--text-muted, #5b6672); font-size: 14px; }
.ph-beyond a { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; color: var(--brand-primary-dark, #17684a); text-decoration: underline; }
.ph-act { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--ph-line); }
.ph-act:last-child { border-bottom: 0; }
.ph-act i { width: 9px; height: 9px; border-radius: 50%; background: #aab5af; margin-top: 7px; }
.ph-act strong { display: block; font-size: 14px; color: var(--text-strong, #17242c); } .ph-act span { font-size: 13px; color: var(--text-muted, #5b6672); } .ph-act span a { color: inherit; }
.ph-act em { font-style: normal; font-size: 13px; color: var(--text-muted, #5b6672); white-space: nowrap; }
@media (max-width: 1280px) { .ph-top { grid-template-columns: 1fr 1fr; } .ph-welcome { grid-column: 1 / -1; } .ph-create { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 1100px) { .ph-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .ph-top { grid-template-columns: 1fr; } .ph-card { padding: 16px 14px; } .ph-card-head h2 { font-size: 19px; } .ph-tools { flex-direction: column; } .ph-search { min-width: 0; } }
.ph button { width: auto; margin: 0; }
.ph .ph-tabs button { background: none; box-shadow: none; }
.ph .ph-filters { background: var(--surface, #fff); }

/* ---------- Home for a Requester ---------- */
.rq-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.rq-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.rq-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--surface, #fff); color: var(--text-strong, #17242c) !important; border: 1px solid var(--ph-line-strong); border-radius: 12px; padding: 15px 22px; font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap; }
.rq-btn:hover { background: #f1f5f2; }
.rq .ph-create { align-self: auto; }
.rq-banner { display: flex; align-items: center; gap: 16px; background: #eef5f0; border: 1px solid var(--ph-line); border-radius: 14px; padding: 16px 20px; }
.rq-banner > div { flex: 1; min-width: 0; } .rq-banner strong { display: block; font-size: 17px; color: var(--text-strong, #17242c); }
.rq-banner p { margin: 2px 0 0; color: var(--text-muted, #5b6672); overflow-wrap: anywhere; }
.rq-pill { display: inline-block; padding: 3px 12px; border-radius: 8px; font-size: 13px; font-weight: 650; background: #e3efe9; color: #17684a; }
.rq-pill.warn { background: #fdecc8; color: #8a5a00; } .rq-pill.info { background: #e1ecfb; color: #1d4f9c; } .rq-pill.muted { background: #eceff0; color: #46535d; }
.rq-next { margin-top: 5px; font-size: 13px; color: var(--text-muted, #5b6672); }
.rq-upd { color: var(--text-muted, #5b6672); white-space: nowrap; }
.rq-row { cursor: pointer; } .rq-row:hover { background: #f6f9f7; }
.rq-chev .ph-ico { width: 16px; height: 16px; color: var(--text-muted, #5b6672); }
.rq-foot { margin: 12px 2px 0; }
.rq-table { min-width: 720px; }
.rq-help { text-decoration: none; cursor: pointer; align-items: center; }
.rq-help strong { display: inline-flex; gap: 8px; align-items: center; } .rq-help strong .ph-ico { width: 15px; height: 15px; }
.rq-person { font-size: 14px; margin-top: 6px; color: var(--text-strong, #17242c); } .rq-person span { color: var(--text-muted, #5b6672); font-size: 13px; }
.rq-del .ph-review { margin-top: 6px; }

/* Savings uses its own modal: same page mode */
body.record-page .modal-back { position: static; inset: auto; display: block; background: transparent; padding: 38px 40px 64px; max-width: 1500px; margin: 0 auto; overflow: visible; }
body.record-page .modal-back[hidden] { display: none; }
body.record-page .modal-back .modal { max-width: none; width: 100%; padding: 28px 32px 36px; border: 1px solid var(--ph-line, #cfd7d1); box-shadow: var(--shadow-card, 0 1px 3px rgba(16,33,26,.1)); }
body.record-page .modal-back .modal .header-row h2 { font-size: 28px; line-height: 1.15; margin: 0; }
@media (max-width: 680px) { body.record-page .modal-back { padding: 20px 14px 40px; } body.record-page .modal-back .modal { padding: 18px 16px 24px; } }

/* Workspace shell: breadcrumb in the top bar and record results in the search box (Procurement + Requester homes) */
.ws-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); white-space: nowrap; margin-left: 4px; }
.ws-crumb i { font-style: normal; opacity: .5; }
.ws-crumb b { color: var(--text); font-weight: 600; }
body.ws-shell .topbar-search { width: 380px; max-width: 40vw; }
body.ws-shell .topbar-search-results { width: 100%; min-width: 320px; }
.topbar-search-results .ts-type { display: inline-block; min-width: 62px; margin-right: 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.topbar-search-results a small { display: block; margin-left: 70px; color: var(--text-muted); font-size: 11px; }
@media (max-width: 760px) { .ws-crumb { display: none; } body.ws-shell .topbar-search { max-width: 52vw; } }
