/* Contralio Vendor. The family layout of CLM, Board and HQ: navy top bar with the "C" mark, white sidebar,
   centred page. Accent amber like HQ (decided by Ahmad 2026-10-19); font Inter.
   Logical properties (inline-start/end) everywhere, so Arabic (dir="rtl") mirrors the layout. */
:root {
  --navy: #0b1530;
  --navy-2: #14213d;
  --accent: #b45309;        /* buttons, links, active items (white text passes contrast) */
  --accent-hover: #92400e;
  --accent-bright: #f59e0b; /* highlights on navy */
  --accent-light: #fbbf24;
  --accent-tint: #fffbeb;
  --accent-tint-2: #fef3c7;
  --text: #1f2937;
  --text-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #f1f5f9;
  --bg: #f4f6f9;
  --card: #ffffff;
  --danger: #b91c1c;
  --ok: #15803d;
  --navbar: 60px;
  --sidebar: 220px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif; font-size: 14px; line-height: 1.55; color: var(--text); background: var(--bg); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; color: var(--text-2); }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- top bar */
.navbar { position: sticky; inset-block-start: 0; z-index: 50; height: var(--navbar); padding: 0 24px; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; }
.brand { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .5px; text-decoration: none; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand span { color: var(--accent-light); }
.brand-product { color: var(--accent-bright); font-weight: 800; }
.brand-mark { width: 1.35em; height: 1.35em; vertical-align: middle; position: relative; top: -.08em; margin-inline-end: .4em; border-radius: .3em; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.topbar-company { color: #cbd5e1; font-size: 13px; font-weight: 500; }
.topbar-name { font-size: 13px; font-weight: 600; color: #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-bright); color: var(--navy); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav-toggle { display: none; background: none; border: 1px solid #ffffff33; border-radius: 8px; padding: 6px; cursor: pointer; line-height: 0; color: #fff; }
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* user and language menus (details elements) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: #f1f5f9; }
.navbar .menu > summary, .on-dark > summary { color: #e2e8f0; border: 1px solid #ffffff26; font-size: 13px; font-weight: 500; }
.navbar .menu > summary:hover, .on-dark > summary:hover { background: #ffffff14; }
.menu-panel { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px #0b153022; padding: 6px; z-index: 60; color: var(--text); }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: start; text-decoration: none; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--accent-tint); color: var(--text); }
.menu-panel form { margin: 0; }
.menu-head { padding: 6px 10px 8px; border-block-end: 1px solid var(--line); margin-block-end: 4px; font-size: 13px; }
.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }

/* ---------------------------------------------------------------- sidebar and page */
.app-shell { display: flex; align-items: flex-start; }
.sidebar { position: sticky; inset-block-start: var(--navbar); height: calc(100vh - var(--navbar)); width: var(--sidebar); flex-shrink: 0; background: #fff; border-inline-end: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side-section { margin: 14px 12px 4px; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; background: none; border: none; text-align: start; font-family: inherit; cursor: pointer; }
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-link:hover { background: var(--line-2); color: #111827; }
.side-link.active { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.side-logout { margin-block-start: auto; border-block-start: 1px solid var(--line-2); padding-block-start: 8px; }
.side-logout .side-link { color: var(--muted); }
.side-logout .side-link:hover { background: #fef2f2; color: var(--danger); }
.side-version { padding: 6px 12px 2px; font-size: 11px; color: var(--faint); }

.main { flex: 1; min-width: 0; }
.page { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-block-end: 20px; }
.page-intro { color: var(--muted); font-size: 14px; margin: 2px 0 0; max-width: 680px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 4px; }
.eyebrow a { color: inherit; }

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--card); border-radius: 10px; padding: 24px 28px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); margin-block-end: 24px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-block-end: 24px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; margin-block-end: 24px; }
.grid > .card, .grid-2 > .card, .grid-2 > div > .card:last-child { margin-block-end: 0; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.6rem; font-weight: 750; color: var(--navy); }
.stat-note { font-size: .8rem; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 6px; padding: 8px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.secondary { background: #fff; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-tint); color: var(--accent-hover); }
.btn.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { padding: .35rem .7rem; font-size: .86rem; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-block-start: 1rem; }
.actions form { margin: 0; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-block-end: 1rem; background: var(--accent-tint); border: 1px solid #fde68a; }
.flash.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.warning { background: var(--accent-tint); border-color: #fde68a; color: #92400e; }
.banner { padding: 10px 24px; font-size: .9rem; background: var(--accent-tint-2); color: #78350f; border-block-end: 1px solid #fde68a; }
.banner.danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.badge { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; background: #f1f5f9; color: #475569; }
.badge.accent { background: var(--accent-tint-2); color: #92400e; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.off { background: #f1f5f9; color: #64748b; }
.badge.warn { background: #ffedd5; color: #9a3412; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; }

.table-wrap { overflow-x: auto; background: var(--card); border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-block-end: 1px solid var(--line-2); text-align: start; vertical-align: middle; }
.table th { background: #f8fafc; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; padding-block: 10px; border-block-end-color: var(--line); }
.table tbody tr:last-child td { border-block-end: 0; }
.table tbody tr:hover { background: #fffdf7; }
.row-title { color: var(--text); text-decoration: none; font-weight: 650; }
.row-title:hover { color: var(--accent); text-decoration: underline; }
.section-title { margin: 1.75rem 0 .6rem; }
.matrix td { text-align: center; }
.matrix-check { display: inline-flex; padding: 4px; cursor: pointer; }
.matrix-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.matrix-info td { background: #f8fafc; }
.matrix td.matrix-rule { text-align: start; color: var(--muted); font-size: 13px; }
.matrix-later td { color: var(--faint); }
.matrix-foot { display: flex; gap: 10px; margin-block: 20px 8px; position: sticky; inset-block-end: 0; padding-block: 12px; background: linear-gradient(transparent, var(--bg) 30%); }
.role-card .card-head { margin-block-end: 4px; }
.ob-dialog input[type=text] { width: 100%; }
.ob-dialog-actions .spacer { flex: 1; }
.matrix td:first-child { text-align: start; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: #cbd5e1; }
.cond { font-size: .8rem; color: var(--muted); }

.empty-state { padding: 2.5rem 1.5rem; border: 1px dashed #cbd5e1; border-radius: 12px; text-align: center; background: #fff; }
.empty-state h2 { margin: .7rem 0 .25rem; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto 1rem; }
.empty-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-tint-2); color: var(--accent); }
.empty-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .88rem; }
dl.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mono, code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }

/* suppliers (0.2) */
a.stat-link { text-decoration: none; color: inherit; }
.stat-danger { color: var(--danger); }
a.stat-link:hover { border-color: var(--accent-bright); }
.status-draft { background: #f1f5f9; color: #475569; }
.status-pending { background: var(--accent-tint-2); color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-suspended { background: #fee2e2; color: #991b1b; }
.status-inactive { background: #e5e7eb; color: #4b5563; }
h1 .badge { vertical-align: middle; font-size: .8rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: .75rem; }
.card-head h2 { margin: 0; }
.table-wrap.flat { border-radius: 0; box-shadow: none; }
.row-actions { display: flex; gap: .9rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.row-actions.start { justify-content: flex-start; }
.link.danger { color: var(--danger); }
.dup-card { border: 1px solid #fde68a; background: var(--accent-tint); }
.dup-list { margin: 0 0 .75rem; padding-inline-start: 1.1rem; }
.dup-list li { margin-block-end: .35rem; }
.inline-form { display: flex; gap: .5rem; align-items: center; margin: 0; }
.inline-form input[type=text] { max-width: 320px; }
.narrow-card { max-width: 640px; }
.section-gap { margin-block-start: 24px; }
.history-item { padding-block: .45rem; border-block-end: 1px solid var(--line); }
.history-item:last-child { border-block-end: 0; }
.actions.no-margin { margin-block-start: 0; }
.status-card .field { max-width: 640px; }
.filters input[type=search] { flex: 1 1 280px; width: auto; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover { color: var(--accent); }
.sort-link.sorted { color: var(--accent); }
.sort-arrow { font-size: 12px; opacity: .6; }
.sort-link.sorted .sort-arrow { opacity: 1; }

/* Vault home (as CLM's): cards of settings, each a link and what it is for */
.vault-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.vault-grid > .card { margin-block-end: 0; }
.vault-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vault-table td { padding: 10px 0; border-block-end: 1px solid var(--line-2); vertical-align: top; }
.vault-table tr:last-child td { border-block-end: 0; }
.vault-table td:first-child { width: 45%; padding-inline-end: 14px; font-weight: 600; }
.vault-table a { text-decoration: none; }
.vault-table a:hover { text-decoration: underline; }
@media (max-width: 900px) { .vault-grid { grid-template-columns: 1fr; gap: 14px; } }

/* documents (0.3) */
.doc-valid { background: #dcfce7; color: #166534; }
.doc-expiring { background: #ffedd5; color: #9a3412; }
.doc-expired, .doc-rejected, .doc-missing { background: #fee2e2; color: #991b1b; }
.doc-pending { background: var(--accent-tint-2); color: #92400e; }
.card-head h2 .badges, .card-head h2 .badge { margin-inline-start: 6px; vertical-align: middle; }
.review-row td { background: var(--accent-tint); padding-block: 8px; }
.review-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.review-form input[type=text] { flex: 1 1 260px; width: auto; }
.older-versions { margin-block-start: 14px; font-size: 13px; }
.older-versions summary { cursor: pointer; color: var(--muted); }
.plain-list { margin: 8px 0 0; padding-inline-start: 18px; line-height: 1.8; }
.field div div label { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-weight: 400; font-size: 14px; }
.field div div input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-block-end: 16px; border-block-end: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-block-end: 2px solid transparent; margin-block-end: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-block-end-color: var(--accent); }

/* Supplier page, laid out as CLM's request page (contract_detail.html) */
.detail-layout { display: flex; gap: 24px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-sidebar { width: 240px; flex-shrink: 0; position: sticky; inset-block-start: calc(var(--navbar) + 16px); }
.detail-sidebar .card { padding: 18px; }
.detail-sidebar h2 { margin: 0 0 14px; font-size: 14px; }
.card.tab-group { padding-block-start: 0; overflow: hidden; }
.card-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #f8fafc;
  border-block-end: 1px solid var(--line); margin: 0 -28px 20px; padding: 10px 28px; }
.request-ids { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-ids > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.request-ids strong { color: var(--text); font-size: 13px; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.card-bar-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--text-2); background: #fff; border: 1px solid #cbd5e1; cursor: pointer; }
.card-bar-btn:hover { background: #f8fafc; color: var(--text); border-color: #94a3b8; }
.card-bar-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.detail-title { font-size: 24px; margin: 0 0 4px; }
.detail-subtitle { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.type-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; margin-inline-end: 4px; }
.type-mainland { background: var(--accent-tint); color: #92400e; border-color: #fde68a; }
.type-free_zone { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.type-gcc { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.type-international { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.type-category { background: #f1f5f9; color: #475569; border-color: var(--line); }
/* 0.8.0 risk level: page badge (type-badge risk-*) and list badge (badge risk-*) */
.risk-low { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.risk-medium { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.risk-high { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.risk-reason { display: block; margin-block-start: 2px; }
/* 0.8.0 scorecard tab: 1-5 as a row of radio buttons */
.scorecard-form { margin-block: 12px 20px; padding: 14px 16px; border-radius: 8px; background: var(--accent-tint); }
.scorecard-form h3 { margin: 0 0 10px; font-size: 15px; }
.score-field { border: 0; padding: 0; margin: 0 0 12px; }
.score-field legend { font-weight: 600; font-size: 13px; padding: 0; margin-block-end: 4px; }
.score-radios { display: flex; gap: 6px; flex-wrap: wrap; }
.score-radios > div label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.score-radios > div label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint-2); }
.blank-fields-warning { margin-block-start: 16px; padding: 10px 14px; border-radius: 8px; background: var(--accent-tint); border: 1px solid #fde68a; color: #92400e; font-size: 13px; }
.blank-fields-warning ul { margin: 6px 0; padding-inline-start: 20px; }
.lock-banner { margin-block-start: 12px; padding: 8px 14px; border-radius: 8px; background: #f1f5f9; color: var(--text-2); font-size: 13px; }
.status-bar { display: flex; margin: 20px 0 8px; }
.status-bar .seg { flex: 1; text-align: center; padding: 8px 4px; font-size: 12px; font-weight: 600; color: var(--faint); background: #f1f5f9; border-inline-end: 2px solid #fff; }
.status-bar .seg:first-child { border-start-start-radius: 6px; border-end-start-radius: 6px; }
.status-bar .seg:last-child { border-start-end-radius: 6px; border-end-end-radius: 6px; border-inline-end: none; }
.status-bar .seg.done { background: #ecfdf5; color: #047857; }
.status-bar .seg.current { background: var(--navy); color: #fff; }
.status-alt-banner { padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
.status-alt-banner.suspended { background: #fee2e2; color: #b91c1c; }
.status-alt-banner.inactive { background: #e5e7eb; color: #4b5563; }
.status-alt-note { display: block; font-weight: 400; margin-block-start: 2px; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: 0; border-block-end: 1px solid var(--line); }
.detail-tabs-top { margin-block-start: 22px; }
.detail-tabs.card-bar-tabs { margin-inline: -28px; padding: 0 16px; }
.card-tabs-first .detail-tabs.card-bar { margin-block-start: 0; padding-block: 0; justify-content: flex-start; margin-block-end: 0; }
.detail-tab-btn { background: none; border: none; padding: 13px 16px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-block-end: 2px solid transparent; margin-block-end: -1px; white-space: nowrap; }
.detail-tab-btn:hover { color: var(--text); }
.detail-tab-btn.active { color: var(--accent); border-block-end-color: var(--accent); background: #fff; }
.detail-tab-panel { display: none; padding-block: 20px 4px; }
.detail-tab-panel.active { display: block; }
.tab-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-inline-start: 4px; border-radius: 999px; background: #e5e7eb; color: var(--text-2); font-size: 11px; line-height: 18px; text-align: center; }
.tab-count-alert { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 0 0 4px; }
.meta-item .label, .meta-block .label { font-size: 11px; text-transform: uppercase; color: var(--faint); font-weight: 600; letter-spacing: .4px; }
.meta-item .value, .meta-block .value { font-size: 14px; font-weight: 500; margin-block-start: 2px; overflow-wrap: anywhere; }
.meta-block { margin-block-start: 18px; padding-block-start: 14px; border-block-start: 1px solid var(--line-2); }
.notes-block .value { font-weight: 400; }
.cmp-entry { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-block-end: 12px; font-size: 13px; }
.history-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.profile-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-2); color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.profile-avatar-empty { background: #e5e7eb; color: var(--faint); }
.approver-cell { display: inline-flex; align-items: center; gap: 8px; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-list form { margin: 0; }
.detail-sidebar .action-list .btn { width: 100%; margin: 0; justify-content: center; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 8px; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.detail-sidebar .action-list .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.detail-sidebar .action-list .btn.btn-reject { background: #dc2626; border-color: #dc2626; }
.detail-sidebar .action-list .btn.btn-reject:hover { background: #b91c1c; border-color: #b91c1c; }
.detail-sidebar .action-list .btn.btn-quiet { background: #f8fafc; color: var(--text-2); border-color: var(--line); font-weight: 500; font-size: 13px; padding: 7px 12px; box-shadow: none; }
.detail-sidebar .action-list .btn.btn-quiet:hover { background: #f1f5f9; color: var(--text); }
.detail-sidebar .action-list .btn.btn-quiet-danger { color: var(--danger); }
.detail-sidebar .action-list .btn.btn-quiet-danger:hover { background: #fef2f2; border-color: #fecaca; }
.action-list .btn-icon { display: flex; align-items: center; gap: 8px; }
.action-list .btn-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ooo-period { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-block-end: 8px; }
.ooo-period form { margin: 0; }
.ooo-now { border-color: #fde68a; background: var(--accent-tint); }
.ooo-add summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.ooo-form { margin-block-start: 10px; }
.sidebar-note { margin: 14px 0 0; padding-block-start: 12px; border-block-start: 1px solid var(--line-2); }
.action-group-label { margin: 18px 0 8px; padding-block-start: 14px; border-block-start: 1px solid var(--line-2); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
.my-decision { background: #fff; border: 1px solid #fde68a; border-inline-start: 3px solid var(--accent); border-radius: 8px; padding: 12px; margin-block-end: 16px; }
.my-decision-title { font-weight: 700; font-size: 14px; color: var(--text); }
.my-decision-stage { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.my-decision textarea { font-size: 13px; resize: vertical; }
.delegate-box { margin-block-start: 10px; }
.delegate-box label { font-size: 12px; font-weight: 600; color: var(--muted); }
.decision-jump { display: none; }
.appr-intro { margin: 0 0 10px; }
.appr-table td { vertical-align: top; }
.appr-stage { --appr-accent: #cbd5e1; --appr-num-bg: #f1f5f9; --appr-num-fg: #64748b; --appr-state: var(--muted); }
.appr-stage-current { --appr-accent: var(--navy); --appr-num-bg: var(--navy); --appr-num-fg: #fff; --appr-state: var(--navy); }
.appr-stage-done { --appr-accent: #16a34a; --appr-num-bg: #dcfce7; --appr-num-fg: #15803d; --appr-state: #15803d; }
.appr-stage-rejected { --appr-accent: #dc2626; --appr-num-bg: #fee2e2; --appr-num-fg: #b91c1c; --appr-state: #b91c1c; }
.appr-stage td:first-child { border-inline-start: 3px solid var(--appr-accent); }
.appr-stage-head td { background: #f8fafc; border-block: 1px solid var(--line); padding: 10px 14px; }
.appr-stage-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.appr-stage-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--appr-num-bg); color: var(--appr-num-fg); font-size: 12px; font-weight: 700; }
.appr-stage-name { font-weight: 600; color: var(--text); }
.appr-stage-count { font-size: 12px; color: var(--muted); }
.appr-stage-state { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--appr-state); }
.appr-note { font-size: 11px; color: var(--faint); margin-block-start: 2px; }
.appr-note-warn { color: #92400e; }
.appr-comment-cell { text-align: center; width: 48px; }
.comment-view-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 4px; border-radius: 6px; line-height: 0; }
.comment-view-btn:hover { background: var(--accent-tint); }
.comment-view-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appr-round { margin-block-start: 10px; }
.appr-round summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; list-style: none; padding: 4px 0; }
.appr-round summary::-webkit-details-marker { display: none; }
.appr-round-chevron { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
[dir="rtl"] .appr-round-chevron { transform: scaleX(-1); }
.appr-round[open] .appr-round-chevron { transform: rotate(90deg); }
.appr-round-link { color: var(--accent); font-weight: 600; font-size: 14px; }
.appr-round-meta { font-size: 12px; color: var(--muted); }
.appr-table-past { opacity: .9; }
.ob-dialog { border: none; border-radius: 12px; padding: 22px 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.ob-dialog::backdrop { background: rgba(15, 23, 42, .4); }
.ob-dialog h3 { margin: 0 0 8px; font-size: 17px; }
.ob-dialog-title { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.ob-dialog label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
.ob-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-block-start: 18px; }
.ob-dialog .btn.danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.ob-dialog .btn.danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }
.undo-list { margin: 0 0 12px; padding-inline-start: 18px; font-size: 13px; color: var(--text-2); }
.undo-list li { margin: 4px 0; }
.undo-list .undo-effect { color: #92400e; }
.comment-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 6px; }
.comment-dialog-head .link { font-size: 22px; text-decoration: none; line-height: 1; }
.comment-dialog-text { margin-block-start: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .detail-layout { flex-direction: column; align-items: stretch; gap: 0; }
  .detail-sidebar { width: 100%; position: static; }
  .card-bar, .detail-tabs.card-bar-tabs { margin-inline: -18px; padding-inline: 18px; }
  .detail-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .decision-jump { display: block; margin-block-end: 12px; padding: 12px 16px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; text-align: center; text-decoration: none; }
}

/* approvals (0.4) */
.side-count { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.lock-note { max-width: 260px; margin: 0; text-align: end; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; color: var(--text-2); }
.stages { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stage { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; border-inline-start: 4px solid var(--line); }
.stage-done { border-inline-start-color: var(--ok); }
.stage-current { border-inline-start-color: var(--accent-bright); background: var(--accent-tint); }
.stage-rejected { border-inline-start-color: var(--danger); }
.stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-block-end: 6px; }
.stage-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line-2); font-size: 12px; font-weight: 700; color: var(--text-2); }
.stage-done .stage-number { background: #dcfce7; color: #166534; }
.stage-current .stage-number { background: var(--accent-bright); color: var(--navy); }
.stage-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stage-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.row-comment { flex-basis: 100%; padding: 6px 10px; border-radius: 6px; background: #f8fafc; color: var(--text-2); }
.approval-pending { background: var(--accent-tint-2); color: #92400e; }
.approval-approved { background: #dcfce7; color: #166534; }
.approval-rejected { background: #fee2e2; color: #991b1b; }
.approval-not_required, .approval-not_reached { background: #f1f5f9; color: #64748b; }
.outcome-approved { background: #dcfce7; color: #166534; }
.outcome-rejected { background: #fee2e2; color: #991b1b; }
.outcome-withdrawn { background: #f1f5f9; color: #475569; }
.decide-box { border: 1px solid #fde68a; background: var(--accent-tint); border-radius: 10px; padding: 14px 16px; margin-block-end: 16px; }
.delegate-box, .ask-box { margin-block-start: 10px; }
.delegate-box summary, .ask-box summary, .past-round summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.delegate-box .inline-form, .ask-box form { margin-block-start: 8px; }
.ask-box form, .answer-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.questions { border-block-start: 1px solid var(--line-2); padding-block-start: 14px; }
.question { padding-block: 8px; border-block-end: 1px solid var(--line-2); }
.question p { margin: 0 0 6px; }
.answer { padding-inline-start: 14px; border-inline-start: 3px solid var(--accent-tint-2); }
.past-round { padding-block: 8px; border-block-end: 1px solid var(--line-2); }
.past-round summary { color: var(--text); font-weight: 500; }

/* Workflow Designer (as CLM's, Vault > Approval workflows) */
.back-link { display: inline-block; margin-block-end: 12px; font-size: 13px; font-weight: 600; text-decoration: none; }
.card-title { font-size: 20px; margin: 0; }
.card-head .actions { margin: 0; }
.form-foot { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 20px; }
.wf-narrow { max-width: 640px; margin-inline: auto; }
.wf-meta { margin: 4px 0 0; }
.wf-table td { vertical-align: top; }
.wf-table form { margin: 0; }
.wf-col-active { width: 100px; }
.wf-col-menu { width: 48px; text-align: end; }
.wf-active-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; cursor: pointer; }
.wf-active-toggle input { width: auto; margin: 0; accent-color: var(--accent); }
.wf-inactive td { color: var(--faint); }
.wf-inactive td a { color: var(--muted); }
.wf-warning { font-size: 12px; color: var(--danger); font-weight: 600; margin-block-start: 2px; }
.wf-badge-inactive { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #e5e7eb; color: #4b5563; margin-inline-start: 8px; vertical-align: middle; }
.wf-check-label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.wf-check-label input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.row-menu > summary.row-menu-btn { padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; color: var(--muted); line-height: 0; }
.row-menu > summary.row-menu-btn:hover, .row-menu[open] > summary.row-menu-btn { background: var(--line-2); border-color: var(--line); color: var(--text); }
.row-menu-btn svg { width: 18px; height: 18px; fill: currentColor; }
.menu-panel.wf-menu { min-width: 220px; }
.menu-panel form { border-block-start: 1px solid var(--line-2); margin-block-start: 4px; padding-block-start: 4px; }
.menu-panel .row-menu-danger { color: var(--danger); }
.menu-panel .row-menu-danger:hover { background: #fef2f2; color: var(--danger); }
.stage-list { margin-block-start: 16px; }
.stage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin-block-end: 8px; background: #fff; }
.stage-row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stage-row-actions { display: flex; gap: 6px; white-space: nowrap; }
.stage-row-actions form { margin: 0; }
.drag-handle { cursor: grab; color: var(--faint); font-size: 18px; user-select: none; }
.sortable-ghost { opacity: .5; }
.stage-title { font-weight: 600; }
.stage-desc { font-size: 12px; color: var(--muted); }
.wf-rules { margin-block-start: 4px; }
.wf-rule { color: var(--accent); padding: 3px 6px; border-radius: 4px; margin-block-start: 2px; }
.wf-rules > .wf-rule:nth-child(even) { background: var(--accent-tint); }
.wf-rule-mail { color: var(--muted); font-size: 11px; margin-inline-start: 6px; }
.wf-fallback { color: var(--accent); margin-block-start: 8px; }
.wf-none { color: var(--danger); margin-block-start: 8px; }
.wf-timing { color: #92400e; font-size: 12px; margin-block-start: 4px; }
.radio-option { display: flex; align-items: flex-start; gap: 8px; font-weight: normal !important; margin: 6px 0; }
.radio-option input { width: auto; margin-block-start: 4px; accent-color: var(--accent); }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; font-size: 13px; margin: 0; }
.inline-check input { width: auto; margin: 0; accent-color: var(--accent); }
.is-invisible { visibility: hidden; }
.stage-editor { max-width: 820px; margin-inline: auto; }
#rule-rows > .rule-row:nth-child(even) { background: var(--accent-tint); border-color: #fde68a; }
.rule-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-block-end: 10px; background: #f8fafc; }
.rule-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block-end: 8px; }
.rule-head-main { display: flex; align-items: center; gap: 8px; flex: 1; }
.rule-head-main input { max-width: 260px; font-size: 13px; }
.rule-title { font-size: 13px; white-space: nowrap; }
.rule-head-buttons { display: flex; gap: 4px; white-space: nowrap; }
.rule-body { font-size: 13px; }
.approver-rows { margin-block-start: 4px; }
.approver-row { display: flex; gap: 6px; margin-block-end: 6px; }
.approver-row select { flex: 1; }
.rule-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rule-notify-row { margin-block-start: 8px; }
.role-hint { flex-basis: 100%; }
.rule-conditions { margin-block-start: 10px; }
.cond-builder { font-size: 13px; }
.cond-group { border: 1px solid #d1d5db; border-inline-start: 4px solid var(--accent-light); border-radius: 8px; padding: 8px 10px; margin: 6px 0; background: #f8fafc; }
.cond-group .cond-group { border-inline-start-color: #a78bfa; background: #fff; }
.cond-group .cond-group .cond-group { border-inline-start-color: var(--accent-light); background: #f8fafc; }
.cond-group-root { border: none; padding: 0; margin: 0; background: none; }
.cond-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cond-group-head select.cond-group-op { flex: 0 1 280px; width: auto; }
.cond-group-head .cond-group-remove { margin-inline-start: auto; }
.cond-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #92400e; }
.cond-items { margin-block-start: 4px; }
.cond-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; padding: 4px 0; }
.cond-row > select.cond-field { flex: 1 1 170px; width: auto; }
.cond-row > select.cond-operator { flex: 1 1 130px; width: auto; }
.cond-row .cond-val { flex: 2 1 220px; display: flex; gap: 6px; align-items: center; }
.cond-row .cond-val[hidden] { display: none !important; }
.cond-num { flex: 0 0 auto; min-width: 22px; height: 22px; margin-block-start: 9px; border-radius: 999px; background: #e5e7eb; color: var(--text-2); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cond-joiner { display: block; margin: 2px 0; padding: 1px 10px; border-radius: 999px; border: 1px solid #fde68a; background: var(--accent-tint); color: #92400e; font-size: 11px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.cond-joiner-or { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
.cond-group-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 4px; }
.cond-preview { margin-block-start: 8px; padding: 5px 10px; border-radius: 6px; background: var(--line-2); color: var(--text-2); font-size: 12px; }
.cond-preview code { font-size: 12px; font-weight: 600; white-space: pre-wrap; }
.no-cond-hint { display: block; margin-block-start: 4px; font-size: 12px; color: var(--faint); }
.ms { flex-direction: column; align-items: stretch !important; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px; background: #fff; }
.ms .ms-filter { margin: 0 0 4px; padding: 5px 8px; font-size: 13px; }
.ms-list { display: block; max-height: 150px; overflow-y: auto; }
.ms-list label { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; margin: 0; padding: 3px 4px; border-radius: 4px; cursor: pointer; }
.ms-list label:hover { background: var(--line-2); }
.ms-list label[hidden] { display: none; }
.ms-list input { width: auto; margin: 0; accent-color: var(--accent); }
.ms-count { font-size: 11px; color: var(--muted); margin-block-start: 4px; }
.stage-timing { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 20px 0 0; min-width: 0; }
.stage-timing legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.stage-timing-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block-start: 8px; }
.stage-timing-row label { margin: 0; font-weight: normal; }
.stage-timing-row span { white-space: nowrap; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stage-timing-row input[type="number"] { width: 80px; }
.stage-timing-row select { width: auto; max-width: 220px; }
.stage-timing-help { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.wt-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.wt-layout .card { margin-block-end: 12px; }
.wt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wt-submit { width: 100%; }
.wt-workflow { margin: 0 0 6px; }
.wt-outcome { border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.wt-outcome-approval { background: var(--accent-tint); color: #92400e; }
.wt-outcome-approved { background: #f0fdf4; color: #166534; }
.wt-stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wt-stage-skipped { opacity: .75; }
.wt-why { font-size: 13px; color: var(--text-2); margin-block-start: 4px; }
.wt-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-inline-start: auto; }
.wt-pill-ok { background: #dcfce7; color: #166534; }
.wt-pill-skip { background: #e5e7eb; color: #4b5563; }
.wt-pill-warn { background: var(--accent-tint-2); color: #92400e; }
.wt-steps { margin: 10px 0 0; padding-inline-start: 22px; font-size: 14px; }
.wt-steps li { padding: 3px 0; }
.wt-src { font-size: 12px; color: var(--muted); margin-inline-start: 6px; }
.wt-unassigned { color: var(--danger); font-weight: 600; }
.wt-note { font-size: 12px; margin-block-start: 6px; }
.wt-rules { margin-block-start: 10px; border-block-start: 1px solid var(--line-2); padding-block-start: 8px; }
.wt-rules summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 500; }
.wt-rule { border-radius: 8px; padding: 8px 10px; margin-block-start: 8px; font-size: 13px; }
.wt-rule-yes { background: #f0fdf4; border: 1px solid #bbf7d0; }
.wt-rule-no { background: #f8fafc; border: 1px solid var(--line-2); color: var(--muted); }
.wt-mark { font-weight: 700; margin-inline-end: 4px; }
.wt-rule-yes .wt-mark, .wt-c-yes { color: #15803d; }
.wt-rule-no .wt-mark, .wt-c-no { color: var(--danger); }
.aa-list { list-style: none; margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; }
.aa-list li { padding: 2px 0; }
.aa-joiner { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.aa-list.cx-group { margin: 2px 0 2px 2px; padding-inline-start: 10px; border-inline-start: 2px solid var(--accent-light); }
.cx-group-label { font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .wt-layout { grid-template-columns: 1fr; } .stage-row { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; gap: .25rem 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { margin-block-end: .85rem; }
.field label, .field > .label { display: block; font-weight: 600; margin-block-end: .3rem; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=file], input[type=url],
input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent-bright); box-shadow: 0 0 0 3px #f59e0b33; }
.helptext, .field .help { display: block; color: var(--muted); font-size: .84rem; margin-block-start: .25rem; }
.errorlist { color: var(--danger); margin: .25rem 0; padding-inline-start: 1rem; font-size: .88rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-block-end: .5rem; background: #fff; }
.check input { margin-block-start: .2rem; width: 1rem; height: 1rem; accent-color: var(--accent); flex: none; }
.check strong { display: block; }
.check .help { margin: 0; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-block-end: 1rem; }
.filters select { width: auto; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin-block-start: 1rem; }
.changes { margin: .3rem 0 0; padding: 0; list-style: none; font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------------- sign-in pages
   Split screen as in CLM and Board (brand panel + form), in Vendor's amber. */
.auth-body { background: #f8fafc; min-height: 100vh; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; }

/* brand panel */
.auth-brand { position: relative; overflow: hidden; color: #e2e8f0;
  background: url('../img/auth-panel.svg') center / cover no-repeat, linear-gradient(145deg, #070e20 0%, var(--navy) 50%, var(--navy-2) 100%); }
.auth-brand-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; gap: 28px; padding: 44px 56px 32px; max-width: 760px; animation: auth-rise .6s ease-out both; }
.auth-logo { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.auth-logo span { color: var(--accent-light); }
.auth-hero { margin-block-start: 20px; }
.auth-hero-title { font-size: 40px; line-height: 1.15; font-weight: 800; color: #fff; margin: 0 0 14px; letter-spacing: -.5px; }
.auth-hero p:not(.auth-hero-title) { font-size: 16px; line-height: 1.6; color: #cbd5e1; margin: 0; max-width: 460px; }
.auth-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.auth-features li { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: #94a3b8; }
.auth-features strong { color: #f1f5f9; font-weight: 600; font-size: 13.5px; }
.auth-feature-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .3); }
.auth-feature-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-light); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* product preview card */
.auth-preview { margin-block-start: 4px; max-width: 420px; padding: 18px 20px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 20px 40px rgba(2, 6, 23, .35); }
.auth-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.auth-preview-title { color: #fff; font-weight: 700; font-size: 14px; }
.auth-preview-sub { color: #94a3b8; font-size: 12px; margin-block-start: 2px; }
.auth-preview-badge { font-size: 11px; font-weight: 700; color: #fcd34d; background: rgba(251, 191, 36, .15); border: 1px solid rgba(251, 191, 36, .35); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.auth-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 14px; }
.auth-steps span { position: relative; font-size: 11px; font-weight: 600; color: #64748b; padding-block-start: 10px; text-align: center; }
.auth-steps span::before { content: ''; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.auth-steps span.done { color: var(--accent-light); }
.auth-steps span.done::before { background: var(--accent-bright); }
.auth-steps span.active { color: #fff; }
.auth-steps span.active::before { background: linear-gradient(90deg, var(--accent-light), var(--accent-bright)); animation: auth-pulse 1.8s ease-in-out infinite; }
.auth-approvers { display: flex; align-items: center; }
.auth-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; border: 2px solid var(--navy); margin-inline-end: -6px; }
.auth-avatar.ok { background: #d97706; }
.auth-avatar.wait { background: #475569; }
.auth-approvers-text { margin-inline-start: 16px; font-size: 12px; color: #cbd5e1; }
.auth-brand-foot { margin-block-start: auto; font-size: 12px; color: #64748b; }

/* form side */
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px;
  background: url('../img/auth-form-bg.svg') center / cover no-repeat, #f8fafc; }
.auth-lang { position: absolute; inset-block-start: 20px; inset-inline-end: 24px; }
.auth-lang .menu > summary { background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--text-2); }
.auth-lang .menu > summary:hover { background: #f8fafc; }
.auth-card { width: 100%; max-width: 400px; background: #fff; color: var(--text); border: 1px solid #eef2f7; border-radius: 16px; padding: 36px 36px 30px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 16px 40px rgba(15, 23, 42, .08); animation: auth-rise .5s ease-out .05s both; }
.auth-logo-mobile { display: none; color: var(--navy); margin-block-end: 18px; }
.auth-logo-mobile span { color: var(--accent); }
.auth-logo-mobile .brand-product { color: var(--accent); }
.auth-card h1 { font-size: 24px; font-weight: 800; color: #0f172a; margin: 0 0 6px; letter-spacing: -.2px; }
.auth-card h1 + .muted, .auth-subtitle { font-size: 14px; color: #64748b; margin: 0 0 24px; line-height: 1.55; }
.auth-card .btn { width: 100%; height: 46px; margin-block-start: .5rem; border-radius: 10px; font-size: 15px; font-weight: 700; }
.auth-card .btn:not(.secondary):not(.danger), .auth-submit { border: none; color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-hover));
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 8px 18px rgba(180, 83, 9, .25); transition: transform .08s, box-shadow .15s, filter .15s; }
.auth-card .btn:not(.secondary):not(.danger):hover, .auth-submit:hover { filter: brightness(1.08); color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 10px 22px rgba(180, 83, 9, .32); }
.auth-links { margin: 1rem 0 0; font-size: .9rem; }

.auth-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin: 0 0 6px; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-block-start: 16px; }
.auth-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-field { position: relative; }
.auth-field > svg { position: absolute; inset-block-start: 50%; inset-inline-start: 14px; transform: translateY(-50%); pointer-events: none;
  width: 18px; height: 18px; fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-field input { height: 46px; margin: 0; font-size: 15px; color: #0f172a; padding-inline: 42px 44px; border: 1px solid #dbe2ea; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.auth-field input:hover { border-color: #c3ccd8; }
.auth-field input:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.auth-field:focus-within > svg { stroke: var(--accent-bright); }
.auth-eye { position: absolute; inset-block-start: 50%; inset-inline-end: 8px; transform: translateY(-50%); background: none; border: none; padding: 6px; border-radius: 6px; cursor: pointer; line-height: 0; color: #94a3b8; }
.auth-eye:hover { background: #f1f5f9; color: #475569; }
.auth-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-capslock { font-size: 12px; font-weight: 600; color: var(--accent); margin-block-start: 6px; }
.auth-capslock::before { content: '\26A0\FE0E  '; }
.auth-gap { height: 22px; }
.auth-submit { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { cursor: wait; filter: none; opacity: .9; }
.auth-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-block-start-color: #fff; animation: spin .7s linear infinite; }
.auth-submit.loading .auth-submit-text { visibility: hidden; }
.auth-submit.loading .auth-spinner { display: block; position: absolute; }
.auth-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; margin-block-end: 18px; }
.auth-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-block-start: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert-info { background: var(--accent-tint); color: #92400e; border: 1px solid #fde68a; }
.auth-main-foot { margin: 22px 0 0; font-size: 12.5px; color: #94a3b8; }
.auth-main-foot a { color: #64748b; text-decoration: none; font-weight: 600; }
.auth-main-foot a:hover { color: var(--accent); }

@keyframes auth-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes auth-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
[dir="rtl"] .auth-hero-title, [dir="rtl"] .auth-card h1 { letter-spacing: 0; }
@media (max-width: 1100px) {
  .auth-brand-inner { padding: 36px 40px 28px; }
  .auth-hero-title { font-size: 34px; }
  .auth-features { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-inner { padding: 26px 24px; gap: 14px; max-width: none; }
  .auth-hero { margin-block-start: 6px; }
  .auth-hero-title { font-size: 26px; margin-block-end: 6px; }
  .auth-hero p:not(.auth-hero-title) { font-size: 14px; }
  .auth-features, .auth-preview, .auth-brand-foot { display: none; }
  .auth-main { padding: 28px 16px 40px; justify-content: flex-start; }
  .auth-lang { position: static; align-self: flex-end; margin-block-end: 14px; }
  .auth-card { padding: 28px 22px 24px; }
}
.mfa-qr { display: grid; place-items: center; margin: 1rem auto; }
.mfa-qr svg { width: min(240px, 100%); height: auto; }
.mfa-manual { margin: .5rem 0 1rem; color: var(--muted); }
.mfa-manual summary { cursor: pointer; }
.mfa-key { display: block; margin-block-start: .5rem; padding: .6rem; border-radius: 6px; background: #f1f5f9; text-align: center; overflow-wrap: anywhere; }
.mfa-digits { direction: ltr; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin: .45rem 0 .75rem; }
.mfa-digits input { min-width: 0; height: 3.3rem; padding: .25rem; border: 1px solid #cbd5e1; border-radius: 9px; background: #f8fafc; color: var(--navy); text-align: center; font: 700 1.4rem/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.mfa-digits input:focus { border-color: var(--accent-bright); background: #fff; box-shadow: 0 0 0 4px #f59e0b33; outline: 0; }
.mfa-progress { display: flex; align-items: center; gap: .6rem; margin-block-start: .75rem; color: var(--muted); font-weight: 600; }
.mfa-spinner { width: 1.1rem; height: 1.1rem; border: 2px solid #fde68a; border-block-start-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.mfa-result { text-align: center; padding: .5rem 0; }
.mfa-result-icon { display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto .75rem; border-radius: 50%; color: var(--ok); background: #f0fdf4; box-shadow: 0 0 0 8px #22c55e12; }
.mfa-result-icon svg { width: 2.3rem; height: 2.3rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mfa-codes { direction: ltr; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: 1rem; margin: 1rem 0; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; list-style: none; }
.mfa-codes li { text-align: center; }
.mfa-codes code { font-size: 1rem; font-weight: 700; letter-spacing: .04em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .sidebar { position: fixed; inset-block: var(--navbar) 0; inset-inline-start: 0; height: auto; width: min(280px, 85vw); z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax #0b153066; }
  .nav-toggle { display: inline-flex; }
  .navbar { padding: 0 14px; }
  .topbar-company, .topbar-name, .lang-menu summary span { display: none; }
  .page { margin: 20px auto; padding: 0 14px; }
  .card { padding: 18px; }
}
@media (max-width: 480px) {
  .mfa-digits { gap: .35rem; }
  .mfa-digits input { height: 3rem; font-size: 1.2rem; }
  dl.facts { grid-template-columns: 1fr; gap: .1rem; }
  dl.facts dd { margin-block-end: .5rem; }
}
/* ---------------------------------------------------------------- supplier portal (0.5) */
.portal-label { color: var(--accent-light); font-size: 13px; font-weight: 600; padding-inline-start: 12px; border-inline-start: 1px solid #ffffff33; white-space: nowrap; }
.portal-foot { max-width: 1100px; margin: 0 auto 32px; padding: 0 24px; font-size: 12px; color: var(--muted); }
.portal-person { padding-block: 10px; border-block-end: 1px solid #f1f5f9; }
.portal-person:last-of-type { border-block-end: 0; }
.portal-person .row-actions { margin-block-start: 4px; }
.badge.portal-active { background: #dcfce7; color: #166534; }
.badge.portal-invited { background: var(--accent-tint-2); color: #92400e; }
.badge.portal-off { background: #f1f5f9; color: #64748b; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 16px; }
.portal-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.portal-tabs a:hover { background: var(--accent-tint); }
.portal-tabs a.active { background: var(--navy); color: #fff; }
.tab-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.tab-mark.done { background: #dcfce7; color: #166534; }
.tab-mark.missing { background: #fef3c7; color: #92400e; }
.tab-mark.locked { background: transparent; font-size: 12px; }
.portal-checklist { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.portal-checklist li { padding: 10px 14px; border-radius: 8px; border-inline-start: 4px solid #22c55e; background: #f8fafc; }
.portal-checklist li.missing { border-inline-start-color: var(--accent-bright, #f59e0b); background: var(--accent-tint); }
.portal-banner { margin-block: 12px; padding: 10px 14px; border-radius: 8px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 14px; }
.portal-banner.muted-banner { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
.tick-list { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tick-list legend { font-weight: 600; font-size: .92rem; margin-block-end: 6px; padding: 0; }
.tick-list label, .tick-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
.tick-list input, .tick-inline input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.row-no { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent-tint-2); color: #92400e; font-size: 13px; font-weight: 700; }
.stage-row.row-off { opacity: .6; }
.answers-list { margin-block-start: 6px; }
.answers-list dt { font-weight: 600; font-size: 14px; }
/* ---------------------------------------------------------------- Dashboard (0.8.2, as CLM's home page) */
:root {
  /* supplier status colours (pipeline rings, donut, legend) and chart tokens; static/js/dashboard.js reads them */
  --st-draft: #94a3b8; --st-filling: #a78bfa; --st-submitted: #3b82f6; --st-pending: #f59e0b;
  --st-approved: #16a34a; --st-suspended: #ea580c; --st-inactive: #64748b;
  --chart-series: #b45309; --chart-series-soft: #fde68a; --chart-grid: #eef1f5; --chart-tooltip: #0b1530;
  --chart-bad: #ef4444; --chart-warn: #f97316; --chart-warn-soft: #fed7aa;
  --risk-low: #22c55e; --risk-medium: #f59e0b; --risk-high: #ef4444; --risk-none: #cbd5e1;
}
.dash { display: flex; flex-direction: column; gap: 20px; }
.dash > * { min-width: 0; }
.dash-hello { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; padding: 22px 24px; border-radius: 16px; color: #fff; background: radial-gradient(circle at 85% -20%, rgba(245, 158, 11, .35), transparent 55%), linear-gradient(120deg, var(--navy), var(--navy-2)); }
.dash-hello-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.dash-date { color: rgba(255, 255, 255, .7); margin-block-start: 2px; }
.dash-tasks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block-start: 12px; font-size: 13px; }
.dash-tasks-label { color: rgba(255, 255, 255, .75); margin-inline-end: 2px; }
.dash-task { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-block: 0; padding-inline: 10px 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 500; text-decoration: none; }
.dash-task:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }
.dash-task b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--accent-bright); color: var(--navy); }
.dash-task-alert b { background: #f87171; color: #fff; }
.dash-hello-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid transparent; text-decoration: none; }
.dash-btn:hover { text-decoration: none; }
.dash-btn-primary { background: var(--accent-bright); color: var(--navy); }
.dash-btn-primary:hover { background: var(--accent-light); }
.dash-btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.dash-btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.dash-section { margin: 8px 0 -6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

.dash-card { background: var(--card); border-radius: 16px; padding: 20px; min-width: 0; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05); }
a.dash-card { color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.dash-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 24, 40, .09); text-decoration: none; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block-end: 14px; }
.dash-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.dash-meta { color: var(--muted); font-size: 13px; }
.dash-more { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.dash-more:hover { text-decoration: underline; }
.dash-empty { color: var(--muted); margin: 4px 0 0; }
.dash-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.dash-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.dash-kpi { display: flex; flex-direction: column; gap: 10px; }
.dash-kpi-top { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); font-size: 14px; }
.dash-kpi-arrow { margin-inline-start: auto; color: var(--faint); }
.dash-kpi-value { font-size: 34px; font-weight: 650; color: var(--navy); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.dash-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dash-ico-sm { width: 34px; height: 34px; flex-basis: 34px; }
.dash-ico-green { background: #dcfce7; color: #15803d; }
.dash-ico-amber { background: var(--accent-tint-2); color: #b45309; }
.dash-ico-red { background: #fee2e2; color: #b91c1c; }
.dash-ico-violet { background: #ede9fe; color: #6d28d9; }
.dash-ico-blue { background: #dbeafe; color: #1d4ed8; }
.dash-ico-teal { background: #ccfbf1; color: #0f766e; }
.dash-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.dash-chip-green { background: #dcfce7; color: #15803d; }
.dash-chip-amber { background: var(--accent-tint-2); color: #92400e; }
.dash-chip-red { background: #fee2e2; color: #b91c1c; }
.dash-chip-blue { background: #dbeafe; color: #1d4ed8; }
.dash-chip-neutral { background: #f1f5f9; color: #475569; }

.dash-st-draft { --st: var(--st-draft); }
.dash-st-filling { --st: var(--st-filling); }
.dash-st-submitted { --st: var(--st-submitted); }
.dash-st-pending { --st: var(--st-pending); }
.dash-st-approved { --st: var(--st-approved); }
.dash-st-suspended { --st: var(--st-suspended); }
.dash-st-inactive { --st: var(--st-inactive); }

/* onboarding pipeline: rings joined by a line; suspended / inactive beside it */
.dash-pipe-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-pipe-scroll { overflow-x: auto; flex: 1 1 520px; min-width: 0; }
.dash-pipe { list-style: none; margin: 0; padding: 6px 0 2px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); min-width: 520px; }
.dash-step { position: relative; }
.dash-step::before { content: ""; position: absolute; top: 27px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line); }
.dash-step:first-child::before { display: none; }
.dash-step a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 6px 4px; color: inherit; text-decoration: none; }
.dash-step a:hover .dash-ring { transform: scale(1.06); }
.dash-step a:hover .dash-step-label { color: var(--accent); }
.dash-ring { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--st); background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; transition: transform .15s ease; }
.dash-step-end .dash-ring { width: 64px; height: 64px; margin-block-start: -4px; font-size: 21px; background: #f0fdf4; }
.dash-step-label { font-weight: 600; color: var(--text-2); font-size: 13px; }
.dash-pipe-side { list-style: none; margin: 0; padding-block: 0; padding-inline: 16px 0; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dash-pipe-side a { display: flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none; }
.dash-pipe-side a:hover { color: var(--accent); }
.dash-pipe-side b { margin-inline-start: 4px; color: var(--navy); }
.dash-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--st, var(--faint)); display: inline-block; }
.dash-dot-red { background: var(--chart-bad); }
.dash-dot-amber { background: var(--st-pending); }
.dash-dot-slate { background: var(--st-inactive); }

.dash-row { display: grid; gap: 16px; align-items: start; }
.dash-row-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.dash-row-half { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.dash-big-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-block-start: 6px; }
.dash-big { font-size: 28px; font-weight: 650; color: var(--navy); letter-spacing: -.02em; }

/* columns: new suppliers per month, documents expiring per week */
.dash-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; height: 190px; padding-block-start: 8px; border-block-end: 1px solid var(--line); background-image: linear-gradient(var(--chart-grid) 1px, transparent 1px); background-size: 100% 47px; background-position: 0 7px; }
.dash-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.dash-bar { display: block; width: 100%; max-width: 34px; height: 4px; border-radius: 999px 999px 6px 6px; background: var(--chart-series-soft); }
.dash-bar-now { background: var(--chart-series); }
.dash-bar-warn { background: var(--chart-warn-soft); }
.dash-bar-warn.dash-bar-now { background: var(--chart-warn); }
.dash-bar-n { font-size: 11px; color: var(--muted); font-weight: 600; min-height: 1em; }
.dash-bar-tag { font-size: 12px; font-weight: 700; color: #fff; background: var(--chart-series); border-radius: 6px; padding: 2px 7px; }
.dash-bar-tag-warn { background: var(--chart-warn); }
.dash-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; margin-block-start: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.dash-weeks span { white-space: nowrap; font-size: 11px; }
.dash-month-now { color: var(--navy); font-weight: 700; }

/* doughnuts */
.status-donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.status-donut-plot { position: relative; flex: 0 0 170px; width: 170px; }
.status-donut-small { flex-basis: 150px; width: 150px; }
.status-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.status-donut-total { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.status-donut-caption { font-size: 12px; color: var(--muted); margin-block-start: 4px; }
.status-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; min-width: 200px; }
.status-legend li { display: grid; grid-template-columns: 12px 1fr auto 44px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: var(--text); cursor: default; }
.status-legend li:hover { background: #f8fafc; }
.status-legend li + li { border-block-start: 1px solid var(--line-2); }
.status-legend-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--st); }
.status-legend-count { font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.status-legend-pct { color: var(--muted); font-size: 12px; text-align: end; font-variant-numeric: tabular-nums; }
.status-legend li.is-empty { color: var(--faint); }
.status-legend li.is-empty .status-legend-swatch { opacity: .45; }
.dash-compliance-text { flex: 1 1 200px; min-width: 200px; }
.dash-compliance-text p { margin: 0 0 10px; color: var(--text-2); }
.dash-mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 13px; }
.dash-mini a { display: flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none; padding: 4px 0; }
.dash-mini a:hover { color: var(--accent); }
.dash-mini b { margin-inline-start: auto; color: var(--navy); }

/* risk mix: one stacked bar */
.dash-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--line-2); gap: 2px; }
.dash-stack-part { display: block; flex: 0 1 0; min-width: 6px; }
.dash-stack-part:hover { filter: brightness(.92); }
.risk-part-low { background: var(--risk-low); }
.risk-part-medium { background: var(--risk-medium); }
.risk-part-high { background: var(--risk-high); }
.risk-part-none { background: var(--risk-none); }
.dash-stack-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.dash-stack-legend a { display: flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; }
.dash-stack-legend a:hover { color: var(--accent); }
.dash-stack-legend b { color: var(--navy); }

/* lists */
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; margin: 0 -6px; border-block-start: 1px solid var(--line-2); border-radius: 10px; color: inherit; text-decoration: none; }
.dash-list li:first-child .dash-li { border-block-start: 0; }
.dash-li:hover { background: #f8fafc; text-decoration: none; }
.dash-list-tight .dash-li { padding-block: 7px; }
.dash-datebox { width: 46px; height: 50px; flex: 0 0 46px; border-radius: 12px; background: var(--accent-tint); border: 1px solid #fde68a; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dash-datebox b { font-size: 17px; color: var(--navy); line-height: 1.1; }
.dash-datebox span { font-size: 11px; color: #92400e; text-transform: uppercase; letter-spacing: .04em; }
.dash-li-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dash-li-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-li-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-when { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* tiles, meters and horizontal bars */
.dash-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-block-end: 18px; }
.dash-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-end: 10px; }
.dash-tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-tile { display: block; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; color: inherit; text-decoration: none; }
a.dash-tile:hover { border-color: var(--accent-bright); text-decoration: none; }
.dash-tile-l { font-size: 12px; color: var(--muted); font-weight: 500; }
.dash-tile-v { font-size: 22px; font-weight: 650; color: var(--navy); margin-block-start: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dash-tile-v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.dash-tile-s { font-size: 12px; color: var(--muted); }
.dash-tile-alert { background: #fef2f2; border-color: #fecaca; }
.dash-tile-alert .dash-tile-l, .dash-tile-alert .dash-tile-v { color: #b91c1c; }
.dash-tile-warn { background: var(--accent-tint); border-color: #fde68a; }
.dash-tile-warn .dash-tile-v { color: #b45309; }
.dash-meter { display: block; height: 6px; margin-block-start: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.dash-meter-fill { display: block; height: 6px; width: 0; border-radius: 999px; background: var(--chart-series); }
.dash-sub-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 10px; }
.dash-hbars { display: flex; flex-direction: column; gap: 10px; }
.dash-hb { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: 13px; }
.dash-hb-name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hb-track { display: block; height: 10px; border-radius: 999px; background: var(--line-2); }
.dash-hb-fill { display: block; height: 10px; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent-bright), var(--accent)); }
[dir="rtl"] .dash-hb-fill { background: linear-gradient(270deg, var(--accent-bright), var(--accent)); }
.dash-hb-v { font-weight: 600; color: var(--navy); text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .dash-row-wide { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .dash-tiles, .dash-tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hello { padding: 18px; }
  .dash-hello-title { font-size: 22px; }
  .dash-bars, .dash-months { gap: 4px; }
  .dash-weeks span:nth-child(even) { visibility: hidden; }
  .dash-pipe-side { border: 0; padding: 0; flex-direction: row; flex-wrap: wrap; gap: 14px; }
}

/* bank details (0.6) */
.stat-warn { color: #b45309; }
.bank-box { padding: 14px 16px; border-radius: 8px; border: 1px solid var(--line); margin-block-end: 12px; }
.bank-box.bank-current { border-inline-start: 4px solid #22c55e; }
.bank-box.bank-waiting { border-inline-start: 4px solid var(--accent-bright); background: var(--accent-tint); }
.bank-head { display: flex; align-items: center; gap: 8px; margin-block-end: 8px; }
.bank-facts { margin-block-end: 8px; }
.bank-alert { margin-block: 8px; padding: 8px 12px; border-radius: 6px; background: #fef2f2; color: #991b1b; font-weight: 600; }
.bank-decide { margin-block-start: 10px; display: grid; gap: 6px; max-width: 520px; }
.bank-decide label { font-weight: 600; font-size: .92rem; }
.return-note { padding: 12px 16px; border-radius: 8px; background: var(--accent-tint); border: 1px solid #fde68a; margin-block-end: 12px; }
@media (max-width: 640px) { .portal-label { display: none; } }

/* 0.8.0 User Manual (staff /manual/ and portal /portal/help/), as CLM's */
.man-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.man-head h1 { margin: 0 0 6px; }
.man-head p { margin: 0; max-width: 640px; }
.man-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.man-tools input[type="search"] { width: 260px; margin: 0; }
.man-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin-block-start: 16px; }
.man-toc { position: sticky; top: calc(var(--navbar) + 16px); padding: 14px; display: flex; flex-direction: column; gap: 2px; margin: 0; }
.man-toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); margin-block-end: 6px; }
.man-toc a { padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.man-toc a:hover { background: var(--accent-tint); }
.man-you { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700; vertical-align: middle; }
.man-section { scroll-margin-top: calc(var(--navbar) + 16px); }
.man-section > h2 { margin: 26px 0 12px; font-size: 22px; }
.man-section:first-of-type > h2 { margin-block-start: 0; }
.man-topic { scroll-margin-top: calc(var(--navbar) + 16px); margin-block-end: 16px; }
.man-topic h3 { margin: 0 0 10px; font-size: 17px; }
.man-topic p { line-height: 1.6; }
.man-steps { list-style: none; counter-reset: step; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.man-steps li { counter-increment: step; position: relative; padding-inline-start: 36px; line-height: 1.55; }
.man-steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 24px; text-align: center; }
.man-list { margin: 10px 0; padding-inline-start: 20px; line-height: 1.6; }
.man-list li { margin-block-end: 4px; }
.man-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 8px 0 0; }
.man-dl dt { font-weight: 700; color: var(--accent-hover); }
.man-dl dd { margin: 0; color: var(--text-2); }
.man-topic .man-dl + p, .man-topic .man-dl + .man-go { margin-block-start: 14px; }
.man-tip { background: var(--accent-tint); border: 1px solid #fde68a; color: #78350f; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.man-go { display: inline-block; margin-block-start: 4px; font-weight: 600; color: var(--accent); text-decoration: none; }
.man-go:hover { text-decoration: underline; }
.man-empty { text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .man-layout { grid-template-columns: minmax(0, 1fr); }
  .man-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .man-tools input[type="search"] { width: 100%; }
  .man-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .man-dl dd { margin-block-end: 8px; }
}

/* ---------------------------------------------------------------- Workflow page and diagram (0.8.3) */
/* condition chips: field + operator + value(s), joined by AND / OR pills */
.wfc { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; background: #f1f5f9; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; }
.wfc-field { font-weight: 600; color: var(--text); }
.wfc-op { color: var(--muted); }
.wfc-val { display: inline-block; padding: 0 7px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 600; }
.wfc-join { display: inline-block; margin: 0 2px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; }
.wfc-join-and { background: #dbeafe; color: #1d4ed8; }
.wfc-join-or { background: var(--accent-tint-2); color: #92400e; }
.wfc-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 6px; border: 1px dashed #cbd5e1; border-radius: 10px; }
.wfc-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wfc-always { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12.5px; font-weight: 600; }

/* approver chips */
.wfa-list { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.wfa { display: inline-flex; align-items: center; gap: 6px; padding-block: 2px; padding-inline: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.wfa-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 10px; font-weight: 700; }
.wfa-ico { margin-inline-start: 5px; color: var(--accent); }
.wfa-role { background: var(--accent-tint); border-color: #fde68a; }
.wfa-owner { background: #ede9fe; border-color: #ddd6fe; }
.wfa-owner .wfa-ico { color: #6d28d9; }
.wfa-none { color: var(--danger); padding-inline: 10px; }
.wfa-join { font-size: 12px; color: var(--muted); font-weight: 600; }

/* workflow page: start node, stage cards joined by "then" lines, end node */
.wfd-help { margin-block: 4px 14px; }
.wfd-node { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.wfd-node-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.wfd-node-start { background: #f1f5f9; color: #475569; }
.wfd-node-end { background: #dcfce7; color: #166534; margin-block-start: 0; }
.wfd-list { position: relative; margin: 0; padding-inline-start: 18px; border-inline-start: 2px solid var(--line); margin-inline-start: 18px; }
.wfd-list::before, .wfd-list::after { content: ""; display: block; height: 14px; }
.wfd-stage { display: block; position: relative; padding: 14px 16px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.wfd-stage:last-child { margin-block-end: 0; }
.wfd-stage::before { content: ""; position: absolute; inset-inline-start: -21px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-bright); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--accent-bright); }
.wfd-stage.sortable-ghost { opacity: .4; }
.wfd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wfd-head .drag-handle { cursor: grab; color: var(--faint); font-size: 16px; }
.wfd-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; }
.wfd-name { margin: 0; font-size: 16px; font-weight: 650; color: var(--text); }
.wfd-mode { padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; }
.wfd-skip { padding: 2px 10px; border-radius: 999px; border: 1px dashed #94a3b8; color: #475569; font-size: 12px; }
.wfd-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.wfd-actions form { margin: 0; }
.wfd-delete { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #94a3b8; cursor: pointer; }
.wfd-delete:hover { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.wfd-rules { margin-block-start: 12px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.wfd-rule { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-block-start: 1px solid var(--line-2); }
.wfd-rule:first-child { border-block-start: 0; }
.wfd-rule-head { padding-block: 6px; background: #f8fafc; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wfd-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.wfd-label { display: block; flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--accent); }
.wfd-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.wfd-tag { font-size: 11.5px; color: #92400e; background: var(--accent-tint); padding: 1px 8px; border-radius: 999px; }
.wfd-mail { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.wfd-mail-off { color: var(--faint); }
.wfd-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.wfd-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.wfd-chip-muted { color: var(--muted); border-style: dashed; }
.wfd-chip-esc { background: var(--accent-tint); border-color: #fde68a; color: #92400e; }
.wfd-warn { margin: 10px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.wfd-empty { margin: 0; padding: 10px 0; }
@media (max-width: 720px) {
  .wfd-rule { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .wfd-rule-head { display: none; }
  .wfd-actions { margin-inline-start: 0; }
}

/* diagram: nodes and stage boxes joined by arrows; top to bottom on narrow screens */
.wfg-card { overflow: hidden; }
.wfg-scroll { overflow-x: auto; padding-block: 8px 4px; margin-block: 8px 0; }
.wfg-flow { list-style: none; margin: 0; padding: 4px; display: flex; align-items: stretch; gap: 0; width: max-content; min-width: 100%; }
.wfg-node { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px 12px; border-radius: 16px; align-self: center; }
.wfg-node-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.wfg-node-title { font-size: 14px; color: var(--navy); }
.wfg-node-sub { font-size: 12px; color: var(--muted); }
.wfg-start { background: #f1f5f9; border: 1px solid #e2e8f0; }
.wfg-start .wfg-node-ico { color: #475569; }
.wfg-end { background: #f0fdf4; border: 1px solid #bbf7d0; }
.wfg-end .wfg-node-ico { color: #16a34a; }
.wfg-arrow { flex: 0 0 44px; display: flex; align-items: center; }
.wfg-arrow span { position: relative; display: block; width: 100%; height: 2px; background: #94a3b8; }
.wfg-arrow span::after { content: ""; position: absolute; inset-inline-end: -1px; top: -5px; border-block: 6px solid transparent; border-inline-start: 9px solid #94a3b8; }
.wfg-stage { flex: 0 0 260px; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-block-start: 4px solid var(--accent-bright); box-shadow: 0 2px 10px rgba(16, 24, 40, .06); }
.wfg-stage-maybe { border-style: dashed; border-block-start-style: solid; }
.wfg-stage-head { display: flex; align-items: center; gap: 8px; }
.wfg-no { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.wfg-stage-name { font-size: 15px; color: var(--text); }
.wfg-mode { font-size: 12px; color: var(--muted); font-weight: 600; }
.wfg-maybe { color: #475569; font-style: italic; }
.wfg-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wfg-rule { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px; border-radius: 10px; background: #f8fafc; }
.wfg-rule-label { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.wfg-if { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.wfg-if-word { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wfg-else { font-size: 12px; color: var(--muted); border-block-start: 1px dashed var(--line); padding-block-start: 6px; }
.wfg-timing { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #92400e; }
.wfg-exits { margin-block-start: 20px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); }
.wfg-exits-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wfg-exits ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.wfg-exit { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wfg-exit-line { display: inline-block; width: 26px; height: 0; border-block-start: 2px dashed #94a3b8; transform: translateY(-3px); }
.wfg-exit-red .wfg-exit-line { border-color: var(--danger); }
.wfg-exit-red strong { color: var(--danger); }
.wfg-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.wfg-legend-dash { display: inline-block; width: 22px; height: 12px; border: 1.5px dashed #94a3b8; border-radius: 4px; vertical-align: middle; }
@media (max-width: 900px) {
  .wfg-flow { flex-direction: column; align-items: stretch; width: auto; }
  .wfg-node, .wfg-stage { flex: 0 0 auto; align-self: stretch; }
  .wfg-arrow { flex: 0 0 34px; justify-content: center; }
  .wfg-arrow span { width: 2px; height: 100%; }
  .wfg-arrow span::after { inset-inline-end: auto; top: auto; bottom: -1px; left: -5px; border-inline: 6px solid transparent; border-block-start: 9px solid #94a3b8; border-block-end: 0; }
}
@media print {
  .wfg-scroll { overflow: visible; }
  .wfg-flow { flex-wrap: wrap; width: auto; row-gap: 12px; }
  .wfg-stage { break-inside: avoid; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .sidebar, .navbar, .auth-brand, .auth-lang, .auth-main-foot, .no-print { display: none !important; }
  .auth-shell { display: block; min-height: 0; }
  .auth-main { background: #fff; padding: 0; }
  .auth-card { box-shadow: none; border: 0; }
  .man-toc, .man-tools, .man-go, .portal-foot { display: none !important; }
  .man-layout { display: block; }
  .man-topic { break-inside: avoid; box-shadow: none; }
  .man-topic[hidden], .man-section[hidden] { display: block !important; }
}

/* Workflow page: confirm a new stage order (0.8.4, as CLM 0.45.0) */
.wfd-order-confirm { margin-block-start: 16px; }
.wfd-order-confirm div { margin-block-start: 6px; }
.wfd-order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 12px; }
