:root {
  --chzm-blue: #0057b8;
  --chzm-blue-dark: #00438f;
  --chzm-navy: #121b2f;
  --chzm-green: #157347;
  --chzm-red: #b42318;
  --ink: #172033;
  --muted: #607087;
  --line: #dbe2ea;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --focus: #ffbf47;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(18, 27, 47, .1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
}

/* P12-A · project completion */
.project-tabs { display: flex; gap: 4px; margin: 18px 0; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.project-tabs a { min-height: 44px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 16px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.project-tabs a:hover, .project-tabs a:focus-visible { color: var(--chzm-blue-dark); background: var(--blue-soft); }
.project-tabs a.active { color: #fff; background: var(--chzm-blue); }
.project-tabs a span { min-width: 21px; min-height: 21px; display: inline-grid; place-items: center; border-radius: 20px; background: rgba(17,78,142,.1); font-size: 9px; }
.project-tabs a.active span { background: rgba(255,255,255,.2); }
.items-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-item-list { display: grid; gap: 9px; }
.project-item-row { display: grid; grid-template-columns: minmax(130px,.6fr) minmax(240px,1.7fr) minmax(110px,.6fr) minmax(190px,.9fr); align-items: center; gap: 14px; padding: 14px 15px; border: 1px solid var(--line); border-left: 4px solid var(--chzm-blue); border-radius: 10px; background: #fff; }
.project-item-overdue { border-left-color: #d83e4b; background: #fffafb; }
.project-item-code, .project-item-main, .project-item-quantity, .project-item-state { min-width: 0; display: grid; align-content: start; gap: 4px; }
.project-item-code strong { color: var(--chzm-blue-dark); font-size: 11px; }
.project-item-code span, .project-item-main small, .project-item-quantity span, .project-item-state small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.project-item-main > strong { color: var(--chzm-navy); font-size: 12px; overflow-wrap: anywhere; }
.project-item-main p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.project-item-quantity strong { color: var(--chzm-navy); font-size: 12px; }
.project-item-state { justify-items: start; }
.project-item-details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 8px; }
.project-item-details summary { min-height: 32px; display: flex; align-items: center; color: var(--chzm-blue-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.project-item-details p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.item-status-awaiting_procurement { color: #8a5400; background: #fff2d8; }
.item-status-awaiting_drawing { color: #99424b; background: #ffe9eb; }
.item-status-in_progress { color: #075bb5; background: var(--blue-soft); }
.item-status-in_stock, .item-status-completed { color: #17643b; background: var(--green-soft); }
.project-history-list { display: grid; }
.project-history-list article { min-height: 70px; display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.project-history-list time { color: var(--muted); font-size: 10px; }
.project-history-list article > div { display: grid; gap: 3px; }
.project-history-list strong { color: var(--chzm-navy); font-size: 11px; }
.project-history-list span, .project-history-list small { color: var(--muted); font-size: 10px; }
.item-form-heading .back-link { display: inline-flex; min-height: 36px; align-items: center; margin-bottom: 8px; color: var(--chzm-blue); font-size: 10px; font-weight: 800; text-decoration: none; }
.project-item-form { max-width: 980px; display: grid; gap: 20px; }
.item-type-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.item-type-fieldset > legend { margin-bottom: 9px; color: var(--chzm-navy); font-size: 11px; font-weight: 850; }
.item-type-fieldset > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.item-type-fieldset > div > div { position: relative; }
.item-type-fieldset input { position: absolute; opacity: 0; pointer-events: none; }
.item-type-fieldset label { min-height: 78px; display: grid; align-content: center; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--chzm-navy); cursor: pointer; font-size: 12px; font-weight: 850; }
.item-type-fieldset label:hover { border-color: #8ab4e3; background: #f7faff; }
.item-type-fieldset input:focus-visible + label { outline: 3px solid rgba(0,102,204,.22); outline-offset: 2px; }
.item-type-fieldset input:checked + label { border-color: var(--chzm-blue); box-shadow: inset 0 0 0 1px var(--chzm-blue); background: var(--blue-soft); color: var(--chzm-blue-dark); }
.form-section { display: grid; gap: 13px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section-heading { display: grid; gap: 3px; }
.form-section-heading strong { color: var(--chzm-navy); font-size: 13px; }
.form-section-heading span { color: var(--muted); font-size: 10px; }
.item-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; }
.item-form-wide { grid-column: 1 / -1; }
.assignment-panel[hidden] { display: none; }
.field-help { margin: -3px 0 0; color: var(--muted); font-size: 9px; }
.project-item-form textarea { min-height: 94px; resize: vertical; }
.project-item-form .errorlist { margin: 5px 0 0; padding: 0; list-style: none; color: #b32634; font-size: 9px; font-weight: 700; }
.production-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.production-metrics article { min-height: 112px; display: grid; align-content: center; gap: 3px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.production-metrics span, .production-metrics small { color: var(--muted); font-size: 10px; }
.production-metrics strong { color: var(--chzm-navy); font-size: 25px; }
.production-metrics .metric-danger { background: linear-gradient(135deg,#fff 70%,#ffebed); }
.production-metrics .metric-warning { background: linear-gradient(135deg,#fff 70%,#fff1d8); }
.production-filter { display: grid; grid-template-columns: minmax(240px,1fr) minmax(200px,.5fr) auto; align-items: end; gap: 12px; margin-bottom: 16px; }

@media (max-width: 860px) {
  .project-item-row { grid-template-columns: 1fr 1fr; }
  .project-item-main { grid-column: 1 / -1; grid-row: 1; }
  .project-item-code { grid-column: 1; }
  .project-item-state { grid-column: 1 / -1; }
  .production-metrics { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .project-tabs { margin-inline: -2px; }
  .project-tabs a { padding-inline: 12px; }
  .items-heading { flex-direction: column; }
  .items-heading .button { width: 100%; }
  .project-item-row { grid-template-columns: 1fr; padding: 13px; }
  .project-item-main, .project-item-code, .project-item-quantity, .project-item-state { grid-column: 1; grid-row: auto; }
  .project-item-details { grid-column: 1; }
  .item-type-fieldset > div, .item-form-grid, .production-filter { grid-template-columns: 1fr; }
  .item-form-wide { grid-column: 1; }
  .project-history-list article { grid-template-columns: 1fr; gap: 5px; }
  .project-item-form .form-actions { grid-template-columns: 1fr; }
  .project-item-form .form-actions .button { width: 100%; }
}

/* P12-B · drawing approval and production handoff */
.production-item-hero .back-link { display: flex; min-height: 36px; align-items: center; color: var(--chzm-blue); font-size: 10px; font-weight: 800; text-decoration: none; }
.production-item-summary { display: grid; gap: 16px; margin-bottom: 16px; }
.production-item-summary dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.production-item-summary dl div { min-height: 70px; display: grid; align-content: center; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--line); }
.production-item-summary dl div:last-child { border-right: 0; }
.production-item-summary dt { color: var(--muted); font-size: 9px; font-weight: 750; }
.production-item-summary dd { margin: 0; color: var(--chzm-navy); font-size: 12px; font-weight: 850; }
.production-item-spec { padding: 13px; border-radius: 9px; background: var(--surface-soft); }
.production-item-spec strong { font-size: 10px; }
.production-item-spec p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.production-item-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.7fr); align-items: start; gap: 16px; margin-bottom: 16px; }
.drawing-upload-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 12px; margin: 15px 0; padding: 14px; border: 1px solid #a9cbed; border-radius: 10px; background: #f7faff; }
.drawing-upload-form input[type=file] { min-height: 48px; padding: 8px; background: #fff; }
.drawing-upload-form textarea { min-height: 72px; }
.drawing-upload-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.drawing-version-list { display: grid; gap: 8px; }
.drawing-version-row { display: grid; grid-template-columns: 110px minmax(0,1fr) auto; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.drawing-current { border-color: #8bc6a6; background: #f7fcf9; }
.drawing-revision, .drawing-file { min-width: 0; display: grid; align-content: start; gap: 3px; }
.drawing-revision strong, .drawing-file strong { color: var(--chzm-navy); font-size: 11px; overflow-wrap: anywhere; }
.drawing-revision span, .drawing-file small { color: var(--muted); font-size: 9px; }
.drawing-file p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.drawing-file .drawing-rejection { color: #a92f3b; font-weight: 700; }
.drawing-actions { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.drawing-reject { position: relative; }
.drawing-reject > summary { min-height: 34px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #efbbc0; border-radius: 7px; color: #a92f3b; cursor: pointer; font-size: 9px; font-weight: 800; list-style: none; }
.drawing-reject form { width: 260px; position: absolute; z-index: 5; top: 40px; right: 0; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 30px rgba(18,39,65,.16); background: #fff; }
.drawing-reject label { font-size: 9px; font-weight: 800; }
.production-control-card { display: grid; gap: 14px; position: sticky; top: 82px; }
.button-wide { width: 100%; }
.control-hint { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.handoff-list { display: grid; gap: 7px; padding-top: 13px; border-top: 1px solid var(--line); }
.handoff-list > strong { font-size: 10px; }
.handoff-list article { display: grid; gap: 2px; padding: 9px; border-radius: 8px; background: var(--surface-soft); }
.handoff-list span, .handoff-list small { color: var(--muted); font-size: 9px; }
.handoff-list article strong { font-size: 10px; }
.production-receiving-card { display: grid; gap: 13px; }
.production-receiving-card > header { display: flex; justify-content: space-between; gap: 12px; }
.production-receiving-card h3 { margin: 4px 0; font-size: 14px; }
.production-receiving-card p { margin: 0; color: var(--muted); font-size: 10px; }
.production-receiving-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.production-receiving-facts dl { min-height: 60px; display: grid; align-content: center; gap: 3px; margin: 0; padding: 10px 12px; border-right: 1px solid var(--line); }
.production-receiving-facts dl:last-child { border-right: 0; }
.production-receiving-facts dt { color: var(--muted); font-size: 9px; }
.production-receiving-facts dd { margin: 0; font-size: 11px; font-weight: 800; }
.production-receipt-form { display: grid; grid-template-columns: minmax(120px,.4fr) minmax(260px,1fr) minmax(180px,.7fr) auto; align-items: end; gap: 10px; padding: 12px; border-radius: 9px; background: var(--blue-soft); }

@media (max-width: 900px) {
  .production-item-layout { grid-template-columns: 1fr; }
  .production-control-card { position: static; }
  .production-receipt-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .production-item-summary dl, .drawing-upload-form, .production-receiving-facts, .production-receipt-form { grid-template-columns: 1fr; }
  .production-item-summary dl div, .production-receiving-facts dl { border-right: 0; border-bottom: 1px solid var(--line); }
  .production-item-summary dl div:last-child, .production-receiving-facts dl:last-child { border-bottom: 0; }
  .drawing-upload-actions { grid-column: 1; display: grid; }
  .drawing-upload-actions .button { width: 100%; }
  .drawing-version-row { grid-template-columns: 1fr; }
  .drawing-actions { justify-content: flex-start; }
  .drawing-reject form { position: fixed; inset: auto 12px 12px; width: auto; }
  .production-receiving-card > header { flex-direction: column; }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-soft); }
body { min-height: 100vh; margin: 0; background: var(--surface-soft); color: var(--ink); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 12px 18px; background: var(--chzm-navy); color: white; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.app-header { background: var(--chzm-navy); color: #fff; border-bottom: 4px solid var(--chzm-blue); }
.header-inner, .nav-inner, .page-shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; min-width: 62px; height: 40px; padding-inline: 8px; background: var(--chzm-blue); font-size: 18px; font-weight: 900; letter-spacing: .08em; }
.brand-copy { display: grid; font-weight: 800; letter-spacing: .01em; }
.brand-copy small { color: #b9c6d8; font-size: 11px; font-weight: 500; }
.header-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.account-menu { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.account-link { display: grid; text-align: right; text-decoration: none; }
.account-name { font-weight: 700; }
.account-login { color: #b9c6d8; font-size: 12px; }
.account-switcher { position: relative; color: var(--ink); }
.account-switcher > summary { min-width: 176px; min-height: 48px; display: grid; align-content: center; padding: 7px 38px 7px 13px; position: relative; border: 1px solid #526078; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; list-style: none; }
.account-switcher > summary::-webkit-details-marker { display: none; }
.account-switcher > summary::after { content: "⌄"; position: absolute; right: 13px; top: 50%; transform: translateY(-56%); color: #c9d4e3; font-size: 20px; }
.account-switcher[open] > summary, .account-switcher > summary:hover { background: rgba(255, 255, 255, .14); }
.account-switcher > summary span { color: #b9c6d8; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.account-switcher > summary strong { max-width: 240px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-switcher-active > summary { border-color: #ffd16a; background: #5c4817; }
.switcher-popover { width: min(420px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 100px)); display: grid; gap: 12px; padding: 14px; position: absolute; z-index: 80; top: calc(100% + 9px); right: 0; overflow-y: auto; border: 1px solid #cad4df; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(5, 16, 34, .34); }
.switcher-heading { display: grid; gap: 2px; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); }
.switcher-heading strong { color: var(--chzm-navy); font-size: 16px; }
.switcher-heading small { color: var(--muted); font-size: 12px; }
.switcher-list { display: grid; gap: 6px; }
.switcher-list form { margin: 0; }
.switcher-option, .switcher-return { width: 100%; min-height: 52px; display: grid; gap: 1px; padding: 9px 11px; border: 1px solid transparent; border-radius: 9px; background: #f3f6f9; color: var(--ink); cursor: pointer; text-align: left; }
.switcher-option:hover, .switcher-option:focus-visible { border-color: #8fb5df; background: #eaf3fd; }
.switcher-option strong { color: var(--chzm-navy); font-size: 14px; }
.switcher-option small { color: var(--muted); font-size: 12px; }
.switcher-return { display: block; min-height: 44px; border-color: #a8c8eb; background: #edf5fe; color: var(--chzm-blue-dark); font-weight: 800; text-align: center; }
.switcher-empty { margin: 4px 0; color: var(--muted); font-size: 13px; }
.switcher-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.switcher-footer a, .switcher-footer button { min-height: 40px; display: inline-flex; align-items: center; padding: 6px 8px; border: 0; background: transparent; color: #40516a; cursor: pointer; font-size: 12px; font-weight: 800; text-decoration: none; }
.switcher-footer button { color: var(--chzm-red); }
.impersonation-banner { border-bottom: 1px solid #c99924; background: #fff2c7; color: #493607; }
.impersonation-inner { width: min(1180px, calc(100% - 32px)); min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-inline: auto; padding-block: 8px; font-size: 13px; }
.impersonation-banner .button { border-color: #765b15; background: #5c4817; color: #fff; white-space: nowrap; }
.work-nav { background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.nav-inner { display: flex; gap: 4px; padding-block: 8px; }
.nav-inner a { min-height: 42px; display: inline-flex; align-items: center; padding: 8px 14px; white-space: nowrap; border-radius: 8px; color: #33445b; font-weight: 700; text-decoration: none; }
.nav-inner a:hover { background: #edf4fb; color: var(--chzm-blue-dark); }

.page-shell { padding-block: 28px 60px; }
.page-heading { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
.page-heading h1, .login-heading h1, .narrow-card h1 { margin: 4px 0 8px; color: var(--chzm-navy); font-size: clamp(28px, 6vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.page-heading p, .login-heading p, .lead { max-width: 720px; margin: 0; color: var(--muted); }
.page-heading-actions { align-items: flex-start; }
.section-title { margin: 0 0 14px; font-size: 18px; }
.role-list { display: flex; flex-wrap: wrap; gap: 8px; }

.login-page { min-height: calc(100vh - 80px); display: grid; place-items: center; padding-block: 40px; }
.login-card, .narrow-card { width: min(100%, 520px); padding: clamp(24px, 6vw, 44px); background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--chzm-blue); border-radius: var(--radius); box-shadow: var(--shadow); }
.login-heading { margin-bottom: 26px; }
.security-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.otp-field input { text-align: center; font-size: 28px; font-weight: 900; letter-spacing: .35em; font-variant-numeric: tabular-nums; }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label { color: #26364d; font-size: 14px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #b9c5d3; border-radius: 9px; background: #fff; color: var(--ink); }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--chzm-blue); box-shadow: 0 0 0 3px rgba(0, 87, 184, .13); outline: none; }
.field-checks > div, .field-checks ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; }
.field-checks label { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.field-checks input { width: 18px; min-height: 18px; }
.plain-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.plain-fieldset legend { margin-bottom: 8px; color: #26364d; font-size: 14px; font-weight: 800; }
.role-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.role-checkbox-grid label { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.role-checkbox-grid input { width: 18px; height: 18px; }
.help-text { color: var(--muted); font-size: 12px; }
.help-text ul { margin: 6px 0 0; padding-left: 18px; }
.field-error, .form-error { color: var(--chzm-red); font-size: 13px; font-weight: 650; }
.field-error ul, .form-error ul { margin: 0; padding-left: 18px; }
.form-error { padding: 12px 14px; background: #fff0ee; border-left: 4px solid var(--chzm-red); border-radius: 6px; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 800; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button-primary { background: var(--chzm-blue); color: #fff; }
.button-primary:hover { background: var(--chzm-blue-dark); }
.button-quiet { border-color: #cbd4df; background: #fff; color: #31435b; }
.app-header .button-quiet { border-color: #526078; background: transparent; color: #fff; }
.button-danger { background: #fff; border-color: #e3a7a2; color: var(--chzm-red); }
.button-large { min-height: 52px; font-size: 16px; }
.button-small { min-height: 38px; padding: 7px 12px; font-size: 13px; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #edf1f5; color: var(--ink); cursor: pointer; font-size: 28px; line-height: 1; }

.workspace-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.workspace-card { min-height: 156px; display: grid; align-content: end; padding: 20px; overflow: hidden; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: 0 6px 18px rgba(18, 27, 47, .05); }
.workspace-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--chzm-blue); }
.workspace-card strong { color: var(--chzm-navy); font-size: 20px; }
.workspace-card > span:last-child { color: var(--muted); font-size: 13px; }
.workspace-card:hover { border-color: #9fbce0; box-shadow: 0 12px 30px rgba(18, 27, 47, .1); }
.role-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.role-action-card { min-height: 112px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; gap: 11px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px rgba(18, 27, 47, .05); }
.role-action-card > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--chzm-blue); font-size: 20px; font-style: normal; }
.role-action-card strong { min-width: 0; font-size: 15px; line-height: 1.25; }
.role-action-card > i { color: #93a1b3; font-size: 24px; font-style: normal; }
.role-action-card:hover { border-color: #9fbce0; box-shadow: 0 10px 26px rgba(18, 27, 47, .09); }
.workspace-index { position: absolute; right: 16px; top: 12px; color: #dce6f1; font-size: 44px; font-weight: 900; }
.empty-state { padding: 28px; background: #fff; border: 1px dashed #b8c5d3; border-radius: var(--radius); }
.empty-state p { margin-bottom: 0; color: var(--muted); }

.badge { display: inline-flex; align-items: center; min-height: 28px; margin: 2px 4px 2px 0; padding: 4px 9px; border-radius: 999px; background: #e9edf2; color: #415169; font-size: 12px; font-weight: 800; }
.badge-blue { background: #e7f1fc; color: #004c9e; }
.badge-green, .status-active { background: #e5f5ec; color: #12643f; }
.status-blocked { background: #fff0ee; color: var(--chzm-red); }
.status-archived { background: #edf0f3; color: #58677a; }
.audit-success { background: #e5f5ec; color: #12643f; }
.audit-denied, .audit-failed { background: #fff0ee; color: var(--chzm-red); }
.audit-impersonator { color: #7a5411; font-size: 12px; white-space: nowrap; }
.detail-list { display: grid; gap: 1px; margin: 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-list > div { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 16px 18px; background: #fff; }
.detail-list dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.detail-list dd { margin: 0; font-weight: 700; }
.missing-name { color: #9a5c00; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.profile-account-details { align-self: start; }
.profile-save-button { justify-self: start; }

.table-frame { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(18, 27, 47, .04); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef3f8; color: #40516a; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
td small { display: block; margin-top: 2px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.row-actions { text-align: right; }
.row-primary-link { display: grid; color: inherit; text-decoration: none; }
.row-primary-link strong { color: var(--chzm-blue-dark); }
.row-primary-link span { margin-top: 2px; font-weight: 750; }
.clickable-row:hover td { background: #f8fbfe; }
.table-empty { padding: 12px 0; color: var(--muted); text-align: center; }

.filter-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filter-bar .field { gap: 4px; }
.filter-bar .field input, .filter-bar .field select { min-height: 44px; }
.filter-bar > .button { align-self: end; }
.field-link { width: fit-content; color: var(--chzm-blue-dark); font-size: 12px; font-weight: 800; }

.project-form { gap: 18px; }
.form-section, .content-card { padding: clamp(18px, 4vw, 26px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 6px 18px rgba(18, 27, 47, .04); }
.form-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.form-section-heading > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #e7f1fc; color: var(--chzm-blue-dark); font-size: 12px; font-weight: 900; }
.form-section-heading h2, .content-card-heading h2 { margin: 0; color: var(--chzm-navy); font-size: 20px; }
.form-section-heading p, .content-card-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sticky-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px; position: sticky; z-index: 20; bottom: 12px; border: 1px solid #cdd8e4; border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 12px 36px rgba(18, 27, 47, .14); backdrop-filter: blur(12px); }

.project-hero { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.project-hero h1 { margin: 4px 0 6px; color: var(--chzm-navy); font-size: clamp(28px, 6vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.project-hero p { margin: 0; color: var(--muted); }
.project-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-hero-actions form { margin: 0; }
.project-status-draft { background: #edf0f3; color: #58677a; }
.project-status-active { background: #e5f5ec; color: #12643f; }
.project-status-completed { background: #e7f1fc; color: #004c9e; }
.project-status-cancelled { background: #fff0ee; color: var(--chzm-red); }
.project-status-archived { background: #edf0f3; color: #58677a; }
.notice { margin-bottom: 18px; padding: 13px 15px; border-left: 4px solid var(--chzm-blue); border-radius: 8px; background: #eaf3fd; }
.notice-warning { border-color: #d49718; background: #fff5d8; color: #5b430d; }
.project-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.content-card-heading { margin-bottom: 18px; }
.compact-details { display: grid; gap: 0; margin: 0; }
.compact-details > div { display: grid; grid-template-columns: minmax(112px, .75fr) minmax(0, 1.4fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.compact-details > div:last-child { border-bottom: 0; }
.compact-details dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.compact-details dd { min-width: 0; margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.compact-details dd small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.person-value strong { display: block; }
.secondary-person { display: block; margin-top: 9px; }
.compact-details .amount-detail dd { color: var(--chzm-blue-dark); font-size: 18px; font-weight: 900; }
.project-note { margin-top: 16px; padding: 14px; border-radius: 9px; background: #f4f7fa; }
.project-note p { margin: 5px 0 0; color: #415169; }

.documents-card { margin-top: 16px; }
.documents-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.document-count { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #edf2f7; color: var(--muted); font-size: 12px; font-weight: 800; }
.document-upload-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 20px; padding: 14px; border: 1px solid #bcd2ea; border-radius: 11px; background: #f5f9fd; }
.document-upload-form .field { gap: 4px; }
.document-upload-form .button { align-self: start; }
.document-list { display: grid; gap: 8px; }
.document-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.document-row-history { background: #f7f8fa; opacity: .82; }
.document-icon { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: #e7f1fc; color: var(--chzm-blue-dark); font-size: 9px; font-weight: 900; }
.document-main { min-width: 0; display: grid; }
.document-main strong { overflow: hidden; color: var(--chzm-navy); text-overflow: ellipsis; white-space: nowrap; }
.document-main span, .document-main small { color: var(--muted); font-size: 12px; }
.document-row > .badge, .document-row > .button { grid-column: 2; justify-self: start; }

.directory-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.directory-search { margin-bottom: 12px; }
.directory-list { display: grid; gap: 8px; }
.directory-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.directory-row > div { min-width: 0; display: grid; }
.directory-row strong { color: var(--chzm-navy); }
.directory-row span, .directory-row small { color: var(--muted); font-size: 12px; }
.directory-row > .badge { width: fit-content; color: #12643f; }
.directory-row > .button { justify-self: start; }
.counterparty-editor { order: -1; align-self: start; }
.narrow-content-card { width: min(100%, 680px); margin-inline: auto; }

.dialog { width: min(720px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 30px 90px rgba(18, 27, 47, .3); }
.dialog::backdrop { background: rgba(18, 27, 47, .64); }
.dialog-card { display: grid; gap: 20px; max-height: calc(100vh - 24px); padding: clamp(20px, 5vw, 32px); overflow-y: auto; background: #fff; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 3px 0 0; font-size: 26px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.action-dialog { width: min(580px, calc(100% - 24px)); }
.action-dialog-card { gap: 14px; overflow: visible; }
.action-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: #edf2f7; }
.action-tab { min-height: 42px; padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: #526176; cursor: pointer; font-size: 13px; font-weight: 850; }
.action-tab[aria-selected="true"] { background: #fff; color: var(--chzm-blue-dark); box-shadow: 0 2px 8px rgba(18, 27, 47, .1); }
.action-panel { padding-top: 2px; }
.action-panel[hidden] { display: none; }
.action-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #f2f6fa; color: var(--muted); font-size: 13px; }
.compact-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.role-checkbox-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.role-checkbox-grid-compact label { min-height: 40px; padding: 6px 8px; font-size: 12px; line-height: 1.25; }
.role-checkbox-grid-compact span { min-width: 0; }
.personal-name-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.user-presence { display: inline-flex; align-items: center; gap: 7px; color: #718096; }
.user-presence i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #aab4c0; box-shadow: 0 0 0 3px #eef1f4; }
.user-presence strong { font-size: 12px; }
.user-presence.is-online { color: #087747; }
.user-presence.is-online i { background: #19a663; box-shadow: 0 0 0 3px #dff4e9; }
.user-account-table th:nth-child(1) { width: 22%; }
.user-account-table th:nth-child(2) { width: 15%; }
.user-account-table th:nth-child(3) { width: 14%; }
.user-account-table th:nth-child(4) { width: 12%; }
.user-account-table th:nth-child(5) { width: 20%; }
.user-account-row.is-blocked td { background: #fffafa; }
.user-blocked-label { width: fit-content; color: #a43b45; font-weight: 800; }
.user-credential-value { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; }
.user-credential-value code { min-width: 0; overflow: hidden; color: var(--chzm-blue-dark); font-family: inherit; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.user-credential-value button { padding: 3px 5px; border: 0; border-radius: 5px; background: #eef4fa; color: #35618d; cursor: pointer; font-size: 9px; font-weight: 850; }
.user-credential-value button:hover { background: #dfeaf6; }
.user-credential-value button:focus-visible { outline: 3px solid rgba(40, 112, 212, .22); outline-offset: 2px; }
.user-password-cell { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.user-password-value { max-width: 100%; padding: 5px 7px; border: 1px solid #d8e5f2; border-radius: 7px; background: #f7faff; }
.user-password-value code { overflow: visible; color: #173f67; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; letter-spacing: .01em; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.user-password-missing { color: #718096; font-size: 11px; font-weight: 750; }
.user-password-missing.is-error { color: #a43b45; }
.user-password-button { padding: 3px 7px; border: 0; background: transparent; color: #326fac; font-size: 10px; }
.user-password-button:hover { background: #eef5fc; }
.user-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.user-row-actions .button { padding-inline: 8px; white-space: nowrap; }
.credential-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.dialog-eyebrow { display: block; margin-bottom: 3px; color: #66809b; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.dialog-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.user-compact-dialog { width: min(520px, calc(100% - 24px)); }
.user-edit-section { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.user-edit-section h3 { margin: 0; color: var(--chzm-navy); font-size: 15px; }
.user-edit-details { border: 1px solid var(--line); border-radius: 9px; }
.user-edit-details > summary { padding: 12px 14px; color: var(--chzm-blue-dark); cursor: pointer; font-size: 13px; font-weight: 850; }
.user-edit-details > form { padding: 4px 14px 14px; }
.user-access-note { margin: 0; padding: 11px 12px; border-radius: 8px; background: #eef5fc; color: #385777; font-size: 12px; line-height: 1.45; }
.user-archive-help { color: #8c4850; font-size: 11px; line-height: 1.45; }
.button-archive { border-color: #e3b3b8; background: #fff6f7; color: var(--chzm-red); }
.button-archive:hover { border-color: var(--chzm-red); background: #fff; }
.message-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 12px 14px; border-left: 4px solid var(--chzm-blue); border-radius: 6px; background: #eaf3fd; }
.message-success { border-color: var(--chzm-green); background: #e7f6ee; }
.message-error { border-color: var(--chzm-red); background: #fff0ee; }

@media (max-width: 760px) {
  .header-inner { align-items: flex-start; }
  .brand-copy { display: none; }
  .account-switcher > summary { min-width: 146px; max-width: calc(100vw - 116px); }
  .account-switcher > summary strong { max-width: calc(100vw - 174px); }
  .switcher-popover { position: fixed; top: 72px; right: 12px; }
  .impersonation-inner { align-items: stretch; flex-direction: column; gap: 8px; padding-block: 10px; }
  .impersonation-banner .button { width: 100%; white-space: normal; }
  .account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table-frame { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tbody { display: grid; gap: 12px; }
  tr { padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
  td { display: grid; grid-template-columns: minmax(92px, .8fr) 1.5fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 800; }
  td.row-actions { display: flex; justify-content: flex-end; border-bottom: 0; }
  .user-row-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .user-row-actions .button, .user-password-button { min-height: 44px; }
  .user-credential-value { justify-content: space-between; }
  .user-password-cell { width: 100%; }
  .user-password-value { width: 100%; }
  .user-credential-value button { min-height: 36px; padding-inline: 10px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .action-dialog-card { padding: 18px; }
  .action-dialog .dialog-heading h2 { max-width: calc(100vw - 112px); overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
  .action-tab { padding-inline: 6px; }
  .compact-form-actions { flex-direction: column; }
  .compact-form-actions .button { width: 100%; }
  .filter-bar .button { width: 100%; }
  .sticky-form-actions { flex-direction: column-reverse; }
  .sticky-form-actions .button { width: 100%; }
  .compact-details > div { grid-template-columns: 1fr; gap: 3px; }
  .documents-heading { flex-direction: column; gap: 8px; }
}

/* Invoice buyer dashboard: upload queue first, live verification context second. */
.invoice-buyer-dashboard-page { --invoice-blue-soft: #eef5ff; --invoice-green-soft: #edf9f3; --invoice-amber-soft: #fff7e8; }
.invoice-buyer-header { overflow: visible; }
.invoice-buyer-header-actions { overflow: visible !important; }
.invoice-rating-menu { position: relative; }
.invoice-rating-menu > summary { min-width: 174px; min-height: 38px; display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 8px; padding: 7px 11px 7px 13px; border: 1px solid rgba(36, 91, 151, .15); border-radius: 12px; background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(235, 245, 255, .88)); box-shadow: 0 5px 15px rgba(33, 85, 143, .08), inset 0 1px rgba(255, 255, 255, .9); color: #325371; cursor: pointer; list-style: none; transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease; }
.invoice-rating-menu > summary::-webkit-details-marker { display: none; }
.invoice-rating-menu > summary:hover { border-color: rgba(33, 105, 190, .3); box-shadow: 0 8px 20px rgba(33, 85, 143, .12), inset 0 1px rgba(255, 255, 255, .95); transform: translateY(-1px); }
.invoice-rating-menu > summary:focus-visible { outline: 3px solid rgba(33, 116, 222, .22); outline-offset: 2px; }
.invoice-rating-menu > summary span { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.invoice-rating-menu > summary strong { color: #1664b6; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1; }
.invoice-rating-menu > summary svg { width: 16px; height: 16px; fill: none; stroke: #617a94; stroke-width: 1.8; transition: transform var(--motion-fast) ease; }
.invoice-rating-menu[open] > summary svg { transform: rotate(180deg); }
.invoice-rating-popover { position: absolute; z-index: 30; top: calc(100% + 9px); right: 0; width: min(370px, calc(100vw - 40px)); overflow: hidden; border: 1px solid rgba(255, 255, 255, .94); border-radius: 18px; background: rgba(250, 252, 255, .96); box-shadow: 0 24px 60px rgba(25, 49, 78, .2), inset 0 1px rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
.invoice-rating-popover > header { padding: 16px; background: linear-gradient(135deg, rgba(231, 243, 255, .92), rgba(255, 255, 255, .84)); }
.invoice-rating-popover > header > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.invoice-rating-popover > header span { color: #557089; font-size: 10px; font-weight: 850; }
.invoice-rating-popover > header strong { color: #175fa9; font-size: 27px; font-variant-numeric: tabular-nums; line-height: 1; }
.invoice-rating-popover > header small { display: block; margin-top: 6px; color: #6f8194; font-size: 9px; line-height: 1.35; }
.invoice-buyer-header-metrics > .buyer-header-metric { min-width: 104px; min-height: 43px; flex: 1 1 120px; display: grid; align-content: center; gap: 2px; padding: 6px 10px; background: rgba(255, 255, 255, .79); color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease; }
.invoice-buyer-header-metrics > .buyer-header-metric:hover { background: rgba(246, 250, 255, .98); }
.invoice-buyer-header-metrics > .buyer-header-metric:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(33, 116, 222, .22); outline-offset: -3px; }
.invoice-buyer-header-metrics > .buyer-header-metric small { overflow: hidden; color: #718094; font-size: 8px; font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.invoice-buyer-header-metrics > .buyer-header-metric strong { overflow: hidden; color: #183957; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.invoice-buyer-header-metrics > .buyer-header-metric.upload strong { color: #855c13; }
.invoice-buyer-header-metrics > .buyer-header-metric.active strong { color: #1768c4; }
.invoice-buyer-header-metrics > .buyer-header-metric.danger strong { color: #b0323d; }
.invoice-upload-queue,
.invoice-live-panel,
.invoice-results-panel { scroll-margin-top: calc(var(--topbar-height) + 16px); overflow: hidden; border: 1px solid #d7e1ed; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(27, 54, 86, .045); }
.invoice-upload-queue { margin-bottom: 14px; border-top: 4px solid var(--chzm-blue); }
.invoice-panel-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid #e5ebf2; background: #fbfcfe; }
.invoice-panel-heading > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.invoice-panel-heading h2 { margin: 0; color: #153654; font-size: 17px; line-height: 1.2; }
.invoice-panel-heading p { margin: 3px 0 0; color: #6a7c91; font-size: 11px; line-height: 1.4; }
.invoice-panel-heading > a { min-height: 44px; display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--chzm-blue-dark); font-size: 11px; font-weight: 850; text-decoration: none; }
.invoice-heading-mark,
.invoice-result-mark { min-width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; padding-inline: 8px; border-radius: 11px; background: var(--invoice-blue-soft); color: var(--chzm-blue-dark); font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.invoice-upload-list,
.invoice-check-list,
.invoice-result-list { display: grid; }
.invoice-upload-row { position: relative; min-width: 0; min-height: 102px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(235px, .58fr) minmax(330px, .72fr); align-items: center; gap: 18px; padding: 14px 16px; border-top: 1px solid #e8edf3; box-shadow: inset 4px 0 var(--chzm-blue); transition: background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.invoice-upload-row:first-child { border-top: 0; }
.invoice-upload-row.is-overdue { box-shadow: inset 4px 0 #c43c45; background: #fffafb; }
.invoice-upload-row-link { position: absolute; z-index: 1; inset: 0; border-radius: 10px; }
.invoice-upload-row-link:focus-visible { outline: 3px solid rgba(33, 116, 222, .22); outline-offset: -4px; }
.invoice-upload-row:has(.invoice-upload-row-link:hover) { background: #f7fbff; box-shadow: inset 5px 0 var(--chzm-blue); }
.invoice-upload-row.is-overdue:has(.invoice-upload-row-link:hover) { background: #fff6f7; box-shadow: inset 5px 0 #c43c45; }
.invoice-upload-main { min-width: 0; pointer-events: none; }
.invoice-upload-main > span { color: #657b93; font-size: 10px; font-weight: 800; }
.invoice-upload-main h3 { margin: 4px 0 0; color: #123453; font-size: 14px; line-height: 1.3; }
.invoice-upload-main p { margin: 5px 0 0; color: #6b7b8f; font-size: 11px; line-height: 1.42; }
.invoice-upload-main > small { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: #2469ad; font-size: 9px; font-weight: 850; }
.invoice-upload-facts { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0; }
.invoice-upload-facts div { min-width: 0; }
.invoice-upload-facts dt { color: #78889a; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.invoice-upload-facts dd { margin: 4px 0 0; color: #264563; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.invoice-overdue-label { color: #aa2f39; }
.invoice-inline-upload { position: relative; z-index: 2; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.invoice-file-trigger { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; overflow: hidden; border: 1px dashed #a9bdd4; border-radius: 9px; background: #f8fbff; color: #345a81; cursor: pointer; font-size: 11px; font-weight: 800; transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.invoice-file-trigger:hover { border-color: #6c9bd2; background: var(--invoice-blue-soft); }
.invoice-file-trigger svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.invoice-file-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-inline-upload.has-file .invoice-file-trigger { border-style: solid; border-color: #7bb493; background: var(--invoice-green-soft); color: #136842; }
.invoice-inline-upload.is-loading { opacity: .72; pointer-events: none; }
.invoice-upload-empty,
.invoice-panel-empty { min-height: 112px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; }
.invoice-upload-empty > span,
.invoice-panel-empty > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--invoice-green-soft); color: #147049; font-weight: 900; }
.invoice-upload-empty strong,
.invoice-panel-empty strong { color: #294760; font-size: 13px; }
.invoice-upload-empty p,
.invoice-panel-empty p { margin: 3px 0 0; color: #728296; font-size: 11px; }

.invoice-buyer-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid #d7e0ea; border-radius: 12px; background: #d7e0ea; }
.invoice-buyer-metric { min-width: 0; min-height: 91px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 4px 10px; padding: 13px 14px; background: #fff; color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease; }
.invoice-buyer-metric:hover { background: #f8fbff; }
.invoice-buyer-metric > span { color: #677a90; font-size: 10px; font-weight: 800; }
.invoice-buyer-metric > strong { color: #153958; font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1; }
.invoice-buyer-metric > small { grid-column: 1 / -1; color: #7b899a; font-size: 9px; line-height: 1.3; }
.invoice-buyer-metric.active > strong { color: var(--chzm-blue); }
.invoice-buyer-metric.danger > strong { color: #b0323d; }
.invoice-buyer-metric.success > strong { color: #137148; }
.invoice-buyer-metric.leader { background: #fffaf0; }
.invoice-buyer-metric.leader > strong { color: #94600f; }

.invoice-live-panel { margin-bottom: 14px; }
.invoice-panel-heading-compact { min-height: 64px; padding-block: 11px; }
.invoice-live-dot { width: 11px; height: 11px; flex: 0 0 auto; border: 3px solid #cfe1ff; border-radius: 50%; background: var(--chzm-blue); box-shadow: 0 0 0 4px #edf4ff; }
.invoice-check-row { min-width: 0; min-height: 86px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(105px, .32fr) minmax(155px, .42fr) 18px; align-items: center; gap: 14px; padding: 13px 15px; border-top: 1px solid #e8edf3; color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease; }
.invoice-check-row:first-child { border-top: 0; }
.invoice-check-row:hover { background: #f8fbff; }
.invoice-check-main,
.invoice-check-progress,
.invoice-check-deadline { min-width: 0; display: grid; align-content: center; gap: 3px; }
.invoice-check-main > strong { overflow: hidden; color: #173958; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-check-main > small,
.invoice-check-progress > small,
.invoice-check-deadline > small { overflow: hidden; color: #718196; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-check-progress > span { color: #60758d; font-size: 9px; font-weight: 800; }
.invoice-check-progress > strong { color: #193c5f; font-size: 16px; font-variant-numeric: tabular-nums; }
.invoice-check-deadline { justify-items: end; text-align: right; }
.invoice-check-deadline > strong { color: #33516e; font-size: 11px; }
.invoice-check-deadline > small.has-saving { color: #117049; font-weight: 800; }
.invoice-check-row > i,
.invoice-result-row > i { color: #8b9aab; font-size: 17px; font-style: normal; }
.invoice-source-label { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; overflow: hidden; border-radius: 999px; background: #edf2f7; color: #536981; font-size: 8px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.invoice-source-label.self { background: var(--invoice-blue-soft); color: #245d9e; }
.invoice-source-label.leader { background: var(--invoice-amber-soft); color: #8a590c; }

.invoice-rating-card { overflow: hidden; position: sticky; top: calc(var(--topbar-height) + 16px); border: 1px solid #c8d9ec; border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(28, 65, 105, .07); }
.invoice-rating-card > header { padding: 17px; background: linear-gradient(135deg, #eaf4ff, #fbfdff); }
.invoice-rating-card > header > span { color: #56718d; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.invoice-rating-card h2 { margin: 5px 0 0; color: #174f8d; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.invoice-rating-card > header p { margin: 7px 0 0; color: #687e94; font-size: 10px; line-height: 1.4; }
.invoice-rating-card > header p strong { color: #9b6410; }
.invoice-rating-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-top: 1px solid #dbe5ef; border-bottom: 1px solid #dbe5ef; background: #dbe5ef; }
.invoice-rating-counts > div { min-width: 0; display: grid; gap: 3px; padding: 13px; background: #fff; }
.invoice-rating-counts span { color: #718399; font-size: 9px; font-weight: 800; }
.invoice-rating-counts strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.invoice-rating-counts small { color: #7a899a; font-size: 9px; }
.invoice-rating-counts .positive strong { color: #107148; }
.invoice-rating-counts .negative strong { color: #b0323d; }
.invoice-rating-pending { display: grid; padding: 12px 14px 8px; }
.invoice-rating-pending > strong { margin-bottom: 5px; color: #8a5c14; font-size: 9px; text-transform: uppercase; }
.invoice-rating-pending a,
.invoice-rating-history div a { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1f5; color: #3d5873; font-size: 10px; text-decoration: none; }
.invoice-rating-pending a b { color: #b0323d; font-variant-numeric: tabular-nums; }
.invoice-rating-history { border-top: 1px solid #e4eaf1; }
.invoice-rating-history > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; color: #355572; cursor: pointer; font-size: 10px; font-weight: 850; list-style: none; }
.invoice-rating-history > summary::-webkit-details-marker { display: none; }
.invoice-rating-history[open] > summary span { transform: rotate(180deg); }
.invoice-rating-history > div { padding: 0 14px 10px; }
.invoice-rating-history div a > span { min-width: 0; display: grid; gap: 2px; }
.invoice-rating-history div a strong { overflow: hidden; color: #31516e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-rating-history div a small { color: #7a899a; font-size: 8px; }
.invoice-rating-history div a b { flex: 0 0 auto; font-size: 10px; font-variant-numeric: tabular-nums; }
.invoice-rating-history div a b.positive { color: #107148; }
.invoice-rating-history div a b.negative { color: #b0323d; }
.invoice-rating-history div > p { color: #748398; font-size: 10px; }

.invoice-results-panel { margin-bottom: 18px; }
.invoice-result-mark { background: #eef8f3; color: #147049; }
.invoice-result-row { min-width: 0; min-height: 89px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(125px, .3fr) minmax(170px, .45fr) minmax(115px, auto) 18px; align-items: center; gap: 16px; padding: 13px 15px; border-top: 1px solid #e8edf3; box-shadow: inset 4px 0 #9aa9b9; color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease; }
.invoice-result-row:first-child { border-top: 0; }
.invoice-result-row:hover { background: #f8fbff; }
.invoice-result-row.saving { box-shadow: inset 4px 0 #1b9b62; }
.invoice-result-row.future { background: #f4f8ff; box-shadow: inset 4px 0 #2b76c8; }
.invoice-result-row.optimal { box-shadow: inset 4px 0 #3478c9; }
.invoice-result-row.warning { box-shadow: inset 4px 0 #d4922b; }
.invoice-result-main,
.invoice-result-price { min-width: 0; display: grid; gap: 3px; }
.invoice-result-main > strong { overflow: hidden; color: #173958; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-result-main > small,
.invoice-result-price > span,
.invoice-result-price > small { overflow: hidden; color: #718196; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-result-price > strong { overflow: hidden; color: #244463; font-size: 13px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.invoice-result-price.best > strong { color: #107148; }
.invoice-result-price.best > small { color: #107148; font-weight: 800; }
.invoice-result-status { justify-self: end; display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #4f647a; font-size: 8px; font-weight: 850; text-align: center; }
.invoice-result-row.saving .invoice-result-status { background: var(--invoice-green-soft); color: #107148; }
.invoice-result-row.future .invoice-result-status { background: #e7f1ff; color: #195eaa; }
.invoice-result-row.future .invoice-result-price.best > strong,
.invoice-result-row.future .invoice-result-price.best > small { color: #195eaa; }
.invoice-result-row.optimal .invoice-result-status { background: var(--invoice-blue-soft); color: #265f9e; }
.invoice-result-row.warning .invoice-result-status { background: var(--invoice-amber-soft); color: #8d5a0c; }

@media (prefers-reduced-motion: no-preference) {
  .invoice-upload-queue { animation: workspace-enter var(--motion-normal) var(--ease-out) both; }
  .invoice-live-panel,
  .invoice-results-panel { animation: workspace-enter var(--motion-normal) 80ms var(--ease-out) both; }
}

@media (max-width: 1200px) {
  .invoice-upload-row { grid-template-columns: minmax(250px, 1fr) minmax(300px, .8fr); }
  .invoice-upload-facts { grid-column: 1; }
  .invoice-inline-upload { grid-column: 2; grid-row: 1 / span 2; }
  .invoice-buyer-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .invoice-buyer-metric:nth-child(n+4) { min-height: 78px; }
}

@media (max-width: 980px) {
  .invoice-check-row { grid-template-columns: minmax(220px, 1fr) 110px minmax(145px, .45fr) 18px; }
  .invoice-result-row { grid-template-columns: minmax(230px, 1fr) minmax(120px, .34fr) minmax(160px, .45fr) 18px; }
  .invoice-result-status { grid-column: 2 / 4; justify-self: start; }
  .invoice-result-row > i { grid-column: 4; grid-row: 1 / span 2; }
}

@media (max-width: 720px) {
  .invoice-buyer-header-actions { flex-wrap: wrap; }
  .invoice-rating-menu { margin-left: auto; }
  .invoice-rating-menu > summary { min-height: 44px; }
  .invoice-rating-popover { width: min(360px, calc(100vw - 24px)); }
  .invoice-buyer-header-metrics > .buyer-header-metric { min-width: 108px; min-height: 39px; flex: 0 0 108px; padding: 5px 9px; }
  .invoice-buyer-header-metrics > .buyer-header-metric strong { font-size: 16px; }
  .invoice-panel-heading { align-items: flex-start; padding: 12px; }
  .invoice-panel-heading p { display: none; }
  .invoice-panel-heading > a { min-height: 38px; }
  .invoice-upload-row { grid-template-columns: 1fr; gap: 11px; padding: 13px 12px; }
  .invoice-upload-facts,
  .invoice-inline-upload { grid-column: 1; grid-row: auto; }
  .invoice-inline-upload { grid-template-columns: 1fr; }
  .invoice-file-trigger,
  .invoice-inline-upload .button { width: 100%; min-height: 46px; }
  .invoice-buyer-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-buyer-metric { min-height: 82px; padding: 11px 12px; }
  .invoice-buyer-metric:last-child { grid-column: 1 / -1; min-height: 70px; }
  .invoice-check-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 9px; padding: 12px; }
  .invoice-check-progress { grid-column: 1; grid-row: 2; }
  .invoice-check-deadline { grid-column: 1; grid-row: 3; justify-items: start; text-align: left; }
  .invoice-check-row > i { grid-column: 2; grid-row: 1 / span 3; }
  .invoice-result-row { grid-template-columns: minmax(0, 1fr) 18px; gap: 10px; padding: 12px; }
  .invoice-result-price { grid-column: 1; }
  .invoice-result-status { grid-column: 1; justify-self: start; }
  .invoice-result-row > i { grid-column: 2; grid-row: 1 / span 4; }
}

@media (max-width: 390px) {
  .invoice-rating-counts { grid-template-columns: 1fr; }
  .invoice-rating-menu > summary { min-width: 158px; }
}

/* Invoice sourcing: continuous market verification with a one-month reply window. */
.sourcing-page { --sourcing-ink: #132f4c; --sourcing-blue: #1768c4; --sourcing-green: #117a4b; --sourcing-amber: #a25f00; }
.sourcing-heading { align-items: end; }
.sourcing-heading p, .sourcing-detail-title p { margin: 7px 0 0; color: var(--muted); }
.eyebrow { display: block; margin-bottom: 5px; color: var(--chzm-blue); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.sourcing-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sourcing-metrics article { min-height: 88px; display: grid; align-content: center; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--chzm-blue); border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(20,47,76,.05); }
.sourcing-metrics span { color: var(--muted); font-size: 11px; font-weight: 800; }
.sourcing-metrics strong { color: var(--sourcing-ink); font-size: 29px; line-height: 1; }
.sourcing-metrics .metric-danger { border-left-color: var(--chzm-red); }
.sourcing-metrics .metric-warning { border-left-color: #e59a2d; }
.sourcing-manual-upload { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(380px, 1.2fr); gap: 28px; margin-bottom: 16px; overflow: hidden; border: 1px solid #b8d1ea; background: linear-gradient(135deg, #f6faff 0%, #fff 68%); }
.manual-upload-copy h2 { margin: 4px 0 8px; color: var(--sourcing-ink); font-size: 26px; }
.manual-upload-copy p { margin: 0; color: var(--muted); line-height: 1.55; }
.manual-check-steps { display: grid; gap: 7px; margin: 16px 0 0; padding-left: 22px; color: #36536f; font-size: 11px; line-height: 1.45; }
.manual-upload-form { display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid #d5e2ef; border-radius: 13px; background: #fff; box-shadow: 0 8px 24px rgba(18,47,79,.07); }
.manual-file-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center; padding: 15px; border: 1px dashed #7da8d2; border-radius: 11px; background: #f5f9fe; }
.manual-file-drop > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 11px; background: #dceafb; color: #155b9d; font-size: 12px; font-weight: 900; }
.manual-file-drop label { display: block; margin-bottom: 6px; color: var(--sourcing-ink); font-weight: 850; }
.manual-file-drop input { width: 100%; }
.manual-file-drop small, .manual-upload-form .field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.manual-check-button { min-height: 44px; justify-content: center; }
.sourcing-filter { grid-template-columns: minmax(260px, 1.4fr) minmax(220px, .8fr) auto; margin-bottom: 16px; }
.sourcing-pending { margin-bottom: 16px; }
.sourcing-pending-list { display: grid; }
.sourcing-pending-list article { min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sourcing-pending-list article:first-child { border-top: 0; }
.sourcing-pending-list strong, .sourcing-pending-list small { display: block; }
.sourcing-pending-list strong { color: var(--sourcing-ink); }
.sourcing-pending-list small { margin-top: 4px; color: var(--muted); }
.sourcing-case-grid { display: grid; gap: 12px; }
.sourcing-case-card-link { display: block; border-radius: 14px; color: inherit; text-decoration: none; }
.sourcing-case-card-link:focus-visible { outline: 3px solid rgba(27, 103, 211, .28); outline-offset: 3px; }
.sourcing-case-card { display: grid; gap: 15px; padding: 18px; border: 1px solid var(--line); border-left: 5px solid var(--chzm-blue); border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(18,47,79,.06); cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.sourcing-case-card-link:hover .sourcing-case-card { border-color: #afc5df; border-left-color: var(--chzm-blue); box-shadow: 0 11px 28px rgba(18,47,79,.11); transform: translateY(-2px); }
.sourcing-case-card-link:active .sourcing-case-card { box-shadow: 0 3px 10px rgba(18,47,79,.08); transform: translateY(1px) scale(.998); }
.sourcing-case-card.is-overdue { border-left-color: var(--chzm-red); }
.sourcing-case-card-link:hover .sourcing-case-card.is-overdue { border-left-color: var(--chzm-red); }
.sourcing-case-topline, .sourcing-case-footer, .sourcing-case-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sourcing-case-topline { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.sourcing-case-title h2 { margin: 0; color: var(--sourcing-ink); font-size: 20px; }
.sourcing-case-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.sourcing-case-open { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid #cad7e6; border-radius: 9px; background: #fff; color: var(--chzm-blue-dark); font-size: 11px; font-weight: 850; white-space: nowrap; transition: border-color .16s ease, background .16s ease; }
.sourcing-case-card-link:hover .sourcing-case-open { border-color: #9eb6d2; background: var(--blue-soft); }
.sourcing-price-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dbe4ee; border-radius: 11px; background: #f8fafc; }
.sourcing-price-strip > div { min-width: 0; display: grid; gap: 3px; padding: 12px 14px; border-left: 1px solid #dbe4ee; }
.sourcing-price-strip > div:first-child { border-left: 0; }
.sourcing-price-strip span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sourcing-price-strip strong { overflow: hidden; color: var(--sourcing-ink); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-progress-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; padding: 13px 15px; overflow: hidden; border: 1px solid #dbe4ee; border-radius: 12px; background: #fff; }
.sourcing-progress-steps.is-compact { margin: -2px 0 0; padding: 10px 12px; background: #f8fafc; }
.sourcing-progress-step { position: relative; min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 7px; padding-right: 12px; color: #8090a2; font-size: 9px; font-weight: 800; line-height: 1.25; }
.sourcing-progress-step:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 9px; left: 24px; right: 4px; height: 2px; background: #dce4ed; }
.sourcing-progress-step > span:last-child { position: relative; z-index: 1; width: fit-content; padding-right: 5px; background: #fff; }
.sourcing-progress-steps.is-compact .sourcing-progress-step > span:last-child { background: #f8fafc; }
.sourcing-progress-marker { position: relative; z-index: 2; width: 19px; height: 19px; display: grid; place-items: center; border: 2px solid #d1dae5; border-radius: 50%; background: #fff; color: #fff; font-size: 10px; }
.sourcing-progress-step.is-done { color: #3e5f51; }
.sourcing-progress-step.is-done::after { background: #8ec7aa; }
.sourcing-progress-step.is-done .sourcing-progress-marker { border-color: var(--sourcing-green); background: var(--sourcing-green); }
.sourcing-progress-step.is-active { color: var(--chzm-blue-dark); }
.sourcing-progress-step.is-active .sourcing-progress-marker { border-color: var(--chzm-blue); background: #fff; box-shadow: 0 0 0 4px rgba(31, 105, 207, .12); animation: sourcing-progress-pulse 1.6s ease-in-out infinite; }
.sourcing-progress-step.is-active .sourcing-progress-marker::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--chzm-blue); }
.saving-positive, .saving-positive strong { color: var(--sourcing-green) !important; }
.sourcing-case-footer { color: var(--muted); font-size: 11px; }
.sourcing-card-api-cost { color: inherit; font-weight: 650; }
.sourcing-case-footer time { color: var(--chzm-blue-dark); font-weight: 850; }
.countdown-overdue { color: var(--chzm-red) !important; }
.sourcing-start-card { width: min(100%, 760px); display: grid; gap: 24px; }
.sourcing-start-notice, .sourcing-outbound-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center; padding: 14px; border: 1px solid #bcd2ea; border-radius: 12px; background: #f4f8fd; }
.sourcing-start-notice > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--chzm-blue); color: #fff; font-size: 21px; font-weight: 900; }
.sourcing-start-notice p, .sourcing-outbound-note p { margin: 4px 0 0; color: #4d6179; font-size: 12px; line-height: 1.5; }
.sourcing-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 14px; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #0d2e50 0%, #145b9e 100%); color: #fff; box-shadow: 0 12px 34px rgba(13,46,80,.18); }
.sourcing-detail-hero .eyebrow, .sourcing-detail-hero .back-link, .sourcing-detail-hero p { color: #d6e8fa; }
.sourcing-detail-hero h1 { margin: 4px 0 0; color: #fff; font-size: clamp(25px, 4vw, 37px); }
.sourcing-detail-hero.is-overdue { background: linear-gradient(135deg, #64231f 0%, #a43f36 100%); }
.sourcing-deadline { min-width: 210px; display: grid; gap: 4px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 13px; background: rgba(255,255,255,.1); text-align: right; }
.sourcing-deadline span, .sourcing-deadline small { color: #d6e8fa; font-size: 10px; font-weight: 750; }
.sourcing-deadline strong { font-size: 23px; }
.sourcing-decision-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sourcing-decision-strip article { min-height: 105px; display: grid; align-content: center; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.sourcing-decision-strip span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.sourcing-decision-strip strong { color: var(--sourcing-ink); font-size: 21px; }
.sourcing-decision-strip small { color: var(--muted); font-size: 10px; }
.sourcing-decision-strip .saving-card { border-color: #a8d8be; background: #f1fbf5; }
.sourcing-decision-strip .saving-card strong { color: var(--sourcing-green); }
.sourcing-alert { margin-bottom: 14px; border-left: 4px solid #e59a2d; background: #fffbf1; }
.sourcing-alert-error { border-left-color: var(--chzm-red); background: #fff5f4; }
.sourcing-alert p, .sourcing-alert ul { margin: 7px 0 0; }
.sourcing-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 14px; align-items: start; }
.sourcing-main-column, .sourcing-side-column { min-width: 0; display: grid; gap: 14px; }
.sourcing-section { min-width: 0; }
.sourcing-section h2 { margin: 0; color: var(--sourcing-ink); }
.sourcing-invoice-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sourcing-invoice-meta > div { min-width: 0; display: grid; align-content: start; gap: 4px; padding: 11px; border-radius: 9px; background: #f5f8fb; }
.sourcing-invoice-meta span, .sourcing-invoice-meta small { color: var(--muted); font-size: 9px; font-weight: 750; }
.sourcing-invoice-meta strong { color: var(--sourcing-ink); font-size: 11px; line-height: 1.4; }
.sourcing-lines-table td:first-child { min-width: 330px; }
.sourcing-lines-table td > strong, .sourcing-lines-table td > small, .sourcing-offer-table td > strong, .sourcing-offer-table td > small { display: block; }
.sourcing-lines-table td > small, .sourcing-offer-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.spec-chip-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.spec-chip-list span { padding: 4px 6px; border-radius: 6px; background: #edf3f9; color: #34536f; font-size: 9px; font-weight: 750; }
.comparison-basis { margin: 8px 0 0; padding-left: 8px; border-left: 2px solid #89add2; color: #4b627a; font-size: 10px; line-height: 1.45; }
.sourcing-empty-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px dashed #a9bdd2; border-radius: 11px; background: #f8fafc; }
.sourcing-empty-action p { margin: 5px 0 0; color: var(--muted); }
.sourcing-outbound-note { margin-bottom: 13px; padding: 11px 13px; border-color: #efd39d; background: #fffaf0; }
.sourcing-outbound-note > span { color: var(--sourcing-amber); font-size: 22px; }
.outbound-approval-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.outbound-limit-alert { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--sourcing-amber); border-radius: 8px; background: #fff2d8; }
.outbound-limit-alert p { margin-top: 3px; }
.supplier-reply summary { color: var(--sourcing-green); }
.sourcing-offer-table td:first-child { min-width: 240px; }
.sourcing-offer-table td:nth-child(2) { min-width: 200px; }
.sourcing-offer-table a { display: block; margin-top: 4px; }
.best-offer-row { background: #f1fbf5; }
.match-badge { display: inline-block; margin-bottom: 5px; padding: 4px 7px; border-radius: 999px; background: #f2f4f7; color: #637185; font-size: 9px; font-weight: 850; }
.match-exact { background: #e5f6ed; color: #126a41; }
.match-review { background: #fff0d7; color: #8a5200; }
.reply-category { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 6px; background: #e9f1fb; color: #245b91; font-size: 9px; font-weight: 850; }
.reply-summary { margin: 7px 0 0; color: #334b63; font-size: 10px; line-height: 1.5; }
.analysis-details { margin-top: 7px; color: #4b627a; font-size: 10px; }
.analysis-details summary { cursor: pointer; font-weight: 800; }
.analysis-details ul, .analysis-details ol { margin: 5px 0 0; padding-left: 18px; }
.analysis-details li + li { margin-top: 3px; }
.rfq-draft { margin-top: 8px; }
.rfq-draft summary { color: var(--chzm-blue-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.rfq-draft > div { width: min(520px, 70vw); margin-top: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.rfq-draft pre { max-height: 280px; margin: 7px 0 0; overflow: auto; color: #34495f; font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.sourcing-add-offer > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.sourcing-add-offer > summary::-webkit-details-marker { display: none; }
.sourcing-add-offer > summary strong { display: block; color: var(--sourcing-ink); font-size: 16px; }
.sourcing-add-offer > summary > span:last-child { color: var(--chzm-blue); font-size: 24px; }
.sourcing-offer-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.sourcing-offer-form .field-wide { grid-column: 1 / -1; }
.sourcing-decision-card { border-top: 4px solid var(--chzm-blue); }
.decision-recorded { display: grid; gap: 7px; margin-top: 12px; padding: 13px; border-radius: 10px; background: #edf8f2; }
.decision-recorded span, .decision-recorded small { color: var(--muted); font-size: 10px; }
.decision-recorded strong { color: var(--sourcing-green); }
.decision-recorded p { margin: 0; color: #314b3f; }
.sourcing-timeline { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.sourcing-timeline li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.sourcing-timeline li:first-child { border-top: 0; }
.sourcing-timeline time { color: var(--muted); font-size: 9px; font-weight: 800; }
.sourcing-timeline strong { color: var(--sourcing-ink); font-size: 11px; }
.sourcing-timeline p { margin: 3px 0; color: #4d6179; font-size: 10px; line-height: 1.45; }
.sourcing-timeline small { color: var(--muted); font-size: 9px; }

/* Leader-facing sourcing result: decisions first, implementation detail on demand. */
.sourcing-leader-view { max-width: 1440px; }
.sourcing-breadcrumb { margin: 0 0 10px; }
.sourcing-breadcrumb a { color: var(--chzm-blue-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.sourcing-breadcrumb a:hover { text-decoration: underline; }
.sourcing-case-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 12px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 6px 20px rgba(18,47,79,.05); }
.sourcing-case-header h1 { margin: 7px 0 2px; color: var(--sourcing-ink); font-size: clamp(23px, 3vw, 32px); line-height: 1.15; }
.sourcing-case-header p { margin: 0; color: var(--muted); font-size: 12px; }
.sourcing-case-kicker { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 800; }
.sourcing-header-actions { display: flex; align-items: center; gap: 10px; }
.sourcing-time-left { min-width: 132px; display: grid; gap: 2px; padding-right: 13px; border-right: 1px solid var(--line); text-align: right; }
.sourcing-time-left span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sourcing-time-left strong { color: var(--sourcing-ink); font-size: 17px; }
.sourcing-executive-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.sourcing-executive-summary article { min-height: 94px; display: grid; align-content: center; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.sourcing-executive-summary article > span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .025em; text-transform: uppercase; }
.sourcing-executive-summary article > strong { overflow: hidden; color: var(--sourcing-ink); font-size: 22px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-executive-summary article > small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-executive-summary .sourcing-best-summary.has-offer { border-color: #9fd2b8; background: #f2fbf6; }
.sourcing-executive-summary .sourcing-best-summary.has-offer > strong, .sourcing-executive-summary .saving-card > strong { color: var(--sourcing-green); }
.sourcing-api-usage-plain { margin: -3px 0 12px; color: var(--muted); font-size: 10px; }
.sourcing-api-usage-plain > summary { width: fit-content; display: flex; align-items: center; gap: 5px; padding: 4px 1px; cursor: pointer; list-style: none; }
.sourcing-api-usage-plain > summary::-webkit-details-marker { display: none; }
.sourcing-api-usage-plain > summary .sourcing-chevron { font-size: 13px; }
.sourcing-api-usage-plain[open] > summary .sourcing-chevron { transform: rotate(180deg); }
.sourcing-api-usage-body { margin-top: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.sourcing-api-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.sourcing-api-totals > div { min-width: 0; display: grid; gap: 3px; padding: 12px 14px; border-left: 1px solid var(--line); }
.sourcing-api-totals > div:first-child { border-left: 0; }
.sourcing-api-totals span, .sourcing-api-totals small { color: var(--muted); font-size: 9px; font-weight: 800; }
.sourcing-api-totals strong { color: var(--sourcing-ink); font-size: 17px; }
.sourcing-api-breakdown { display: grid; gap: 7px; margin-top: 10px; }
.sourcing-api-breakdown article, .sourcing-api-call-list article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.sourcing-api-breakdown strong, .sourcing-api-breakdown small, .sourcing-api-call-list strong, .sourcing-api-call-list small { display: block; }
.sourcing-api-breakdown strong, .sourcing-api-call-list strong { color: var(--sourcing-ink); font-size: 11px; }
.sourcing-api-breakdown small, .sourcing-api-call-list small, .sourcing-api-call-list span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.sourcing-api-breakdown b, .sourcing-api-call-list b { color: var(--chzm-blue-dark); font-size: 12px; white-space: nowrap; }
.sourcing-api-call-list { margin-top: 10px; }
.sourcing-api-call-list > summary { width: fit-content; color: var(--chzm-blue-dark); cursor: pointer; font-size: 10px; font-weight: 850; }
.sourcing-api-call-list > div { display: grid; gap: 7px; margin-top: 9px; }
.sourcing-api-call-list article { grid-template-columns: minmax(0, 1fr) auto auto; }
.sourcing-api-empty { padding: 14px; border: 1px dashed #b7c6d8; border-radius: 9px; background: #f8fafc; color: var(--muted); font-size: 11px; }
.sourcing-api-partial-note { margin-bottom: 10px; padding: 10px 12px; border-left: 3px solid #b6c1ce; border-radius: 8px; background: #f7f9fb; color: var(--muted); font-size: 10px; }
.sourcing-collapsible { margin-bottom: 12px; padding: 0; overflow: hidden; }
.sourcing-collapsible > summary, .sourcing-awaiting > summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; cursor: pointer; list-style: none; }
.sourcing-collapsible > summary::-webkit-details-marker, .sourcing-awaiting > summary::-webkit-details-marker { display: none; }
.sourcing-collapsible > summary > span:first-child, .sourcing-awaiting > summary > span:first-child { display: grid; gap: 3px; }
.sourcing-collapsible > summary strong, .sourcing-awaiting > summary strong { color: var(--sourcing-ink); font-size: 14px; }
.sourcing-collapsible > summary small, .sourcing-awaiting > summary small { color: var(--muted); font-size: 10px; }
.sourcing-chevron { color: var(--muted); font-size: 18px; transition: transform .16s ease; }
.sourcing-collapsible[open] .sourcing-chevron, .sourcing-awaiting[open] .sourcing-chevron { transform: rotate(180deg); }
.sourcing-collapsible-body { padding: 0 17px 17px; border-top: 1px solid var(--line); }
.sourcing-collapsible-body .sourcing-invoice-meta { margin-top: 14px; }
.invoice-comparison-note { margin-top: 8px; }
.invoice-comparison-note summary { width: fit-content; color: var(--chzm-blue-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.invoice-comparison-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.sourcing-results { padding: 0; overflow: hidden; }
.sourcing-results-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sourcing-results-header h2 { margin: 0; color: var(--sourcing-ink); font-size: 20px; }
.sourcing-results-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.sourcing-service-messages { border-bottom: 1px solid var(--line); background: #fbfcfe; }
.sourcing-service-messages > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; cursor: pointer; list-style: none; }
.sourcing-service-messages > summary::-webkit-details-marker { display: none; }
.sourcing-service-messages > summary > span:first-child { display: grid; gap: 2px; }
.sourcing-service-messages > summary strong { color: var(--sourcing-ink); font-size: 13px; }
.sourcing-service-messages > summary small { color: var(--muted); font-size: 9px; }
.sourcing-service-messages[open] .sourcing-chevron { transform: rotate(180deg); }
.sourcing-service-list { display: grid; gap: 7px; padding: 0 18px 14px; }
.sourcing-service-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 11px 12px; border: 1px solid #e3e9f0; border-radius: 9px; background: #fff; }
.sourcing-service-item.is-error { border-color: #f2d3d3; background: #fffafa; }
.sourcing-service-item.is-rerouted { border-color: #cfe0f6; background: #f8fbff; }
.sourcing-service-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 999px; background: #edf2f7; color: #52667c; font-size: 12px; font-weight: 900; }
.sourcing-service-item.is-error .sourcing-service-icon { background: #fde8e8; color: #b42318; }
.sourcing-service-item.is-rerouted .sourcing-service-icon { background: #e5f0ff; color: #1557a4; }
.sourcing-service-title { display: flex; align-items: center; gap: 8px; }
.sourcing-service-title strong { color: var(--sourcing-ink); font-size: 12px; }
.sourcing-service-title span { padding: 3px 6px; border-radius: 999px; background: #eef2f6; color: #52667c; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.sourcing-service-item p { margin: 4px 0; color: #43566c; font-size: 10px; line-height: 1.45; }
.sourcing-service-item small { color: #607286; font-size: 9px; }
.sourcing-service-item .rfq-draft { margin-top: 7px; }
.sourcing-search-progress { display: grid; gap: 2px; text-align: right; }
.sourcing-search-progress span { color: var(--sourcing-ink); font-size: 11px; font-weight: 850; }
.sourcing-search-progress small { color: var(--muted); font-size: 9px; }
.sourcing-response-list { display: grid; }
.sourcing-response-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) minmax(135px, auto); gap: 15px; align-items: start; padding: 17px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.sourcing-response-card:last-child { border-bottom: 0; }
.sourcing-response-card.is-best { background: linear-gradient(90deg, #f0faf5 0%, #fff 48%); box-shadow: inset 4px 0 0 var(--sourcing-green); }
.sourcing-response-card.is-partial { background: linear-gradient(90deg, #f8fbff 0%, #fff 52%); box-shadow: inset 4px 0 0 #3273c5; }
.sourcing-response-card.is-alternative { background: linear-gradient(90deg, #fff9ef 0%, #fff 54%); box-shadow: inset 4px 0 0 #d88a16; }
.sourcing-response-card.is-purchased { background: linear-gradient(90deg, #eaf9f1 0%, #fff 58%); box-shadow: inset 5px 0 0 #078552; }
.sourcing-response-rank span { min-width: 44px; min-height: 25px; display: inline-grid; place-items: center; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #5d6d80; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.sourcing-response-card.is-best .sourcing-response-rank span { background: var(--green-soft); color: var(--sourcing-green); }
.sourcing-response-card.is-partial .sourcing-response-rank span { background: #e7f0fc; color: #1b5da7; }
.sourcing-response-card.is-alternative .sourcing-response-rank span { background: #fff0d7; color: #9a5a00; }
.sourcing-response-card.is-purchased .sourcing-response-rank span { background: #dff5e9; color: #087a4b; }
.sourcing-response-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.match-badge.match-purchased { background: #dff5e9; color: #087a4b; }
.match-badge.match-late { background: #eef1f5; color: #536476; }
.match-badge.match-future { background: #e8f2ff; color: #125fae; }
.sourcing-response-card.is-future-opportunity { background: linear-gradient(90deg, #f1f7ff 0%, #fff 58%); box-shadow: inset 4px 0 0 #2b76c8; }
.sourcing-late-saving { max-width: 900px; margin: 9px 0 0 !important; padding: 9px 11px; border-left: 3px solid #2b76c8; border-radius: 8px; background: #edf5ff; color: #234e7b !important; font-size: 10px !important; }
.sourcing-purchased-record { max-width: 900px; margin-top: 10px; padding: 9px 11px; border: 1px solid #bee6d1; border-radius: 8px; background: #f0faf5; }
.sourcing-purchased-record p { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; max-width: none; margin: 0 !important; color: #174a36 !important; font-size: 10px !important; }
.sourcing-purchased-record small { color: #547365; font-size: 9px; }
.sourcing-buy-button { margin-top: 10px; white-space: nowrap; }
.sourcing-bought-label { margin-top: 10px; padding: 6px 10px; border-radius: 999px; background: #dff5e9; color: #087a4b; font-size: 10px; font-weight: 900; white-space: nowrap; }
.sourcing-purchase-lines ul { display: grid; gap: 7px; margin: 7px 0 0; padding: 0; list-style: none; }
.sourcing-purchase-lines label { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.sourcing-purchase-lines input { width: auto; }
.sourcing-purchase-form .dialog-heading p { max-width: 520px; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.sourcing-response-main { min-width: 0; }
.sourcing-response-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.sourcing-response-title h3 { margin: 0; color: var(--sourcing-ink); font-size: 16px; }
.sourcing-response-title small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.sourcing-response-main > p { max-width: 920px; margin: 9px 0; color: #43566c; font-size: 11px; line-height: 1.55; }
.sourcing-response-facts { display: flex; flex-wrap: wrap; gap: 5px; }
.sourcing-response-facts span { padding: 4px 7px; border-radius: 6px; background: #f3f6f9; color: #53667b; font-size: 9px; }
.match-badge.match-partial { background: #e7f0fc; color: #1b5da7; }
.sourcing-partial-comparison { max-width: 960px; margin-top: 11px; padding: 12px; border: 1px solid #d8e5f4; border-radius: 10px; background: #fff; }
.sourcing-partial-comparison > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.sourcing-partial-comparison > header > div { display: grid; gap: 2px; }
.sourcing-partial-comparison > header strong { color: var(--sourcing-ink); font-size: 12px; }
.sourcing-partial-comparison > header small { color: var(--muted); font-size: 9px; }
.sourcing-partial-comparison > header > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; white-space: nowrap; }
.sourcing-partial-comparison > header > span.is-saving { background: #e5f7ed; color: #087a4b; }
.sourcing-partial-comparison > header > span.is-overpay { background: #fff0e5; color: #a44b12; }
.match-badge.match-alternative { color: #9a5a00; background: #fff0d7; border-color: #f3d096; }
.sourcing-reply-actions { padding: 0; overflow: hidden; border-color: rgba(216, 138, 22, .2); }
.sourcing-reply-actions-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; background: radial-gradient(circle at 92% 0, rgba(255, 194, 92, .18), transparent 32%), linear-gradient(135deg, #fff 0%, #fffaf2 100%); border-bottom: 1px solid var(--line); }
.sourcing-reply-actions-header > div { display: grid; gap: 3px; }
.sourcing-reply-actions-header span { color: #a5650b; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.sourcing-reply-actions-header h2 { margin: 0; color: var(--sourcing-ink); font-size: 20px; }
.sourcing-reply-actions-header p { margin: 0; color: var(--muted); font-size: 11px; }
.sourcing-reply-actions-header > strong { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; color: #8b5203; background: #fff0d7; box-shadow: inset 0 0 0 1px rgba(216, 138, 22, .18); }
.sourcing-deferred-decisions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 20px; border-top: 1px solid rgba(216, 138, 22, .14); background: linear-gradient(90deg, rgba(255, 249, 238, .88), rgba(255, 255, 255, .92)); }
.sourcing-deferred-decisions strong { color: #85520d; font-size: 11px; }
.sourcing-deferred-decisions span { color: var(--muted); font-size: 10px; text-align: right; }
.sourcing-reply-task-list { display: grid; }
.sourcing-reply-task { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; padding: 16px 20px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); }
.sourcing-reply-task:last-child { border-bottom: 0; }
.sourcing-reply-task.is-alternative.is-pending { background: linear-gradient(90deg, rgba(255, 247, 231, .8), #fff 46%); }
.sourcing-reply-task-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #125fba; background: #eaf4ff; font-size: 17px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(39, 118, 202, .08); }
.sourcing-reply-task-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sourcing-reply-task.is-alternative .sourcing-reply-task-icon { color: #9a5a00; background: #fff0d7; }
.sourcing-reply-task.is-agent { background: linear-gradient(90deg, rgba(235, 249, 244, .82), rgba(255, 255, 255, .96) 48%); }
.sourcing-reply-task.is-agent .sourcing-reply-task-icon { color: #087a4b; background: #e5f8f0; }
.sourcing-reply-task.is-agent .sourcing-reply-task-title > small { color: #087a4b; background: #e5f8f0; }
.sourcing-reply-task-body { min-width: 0; display: grid; gap: 9px; }
.sourcing-reply-task-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.sourcing-reply-task-title > div { display: grid; gap: 2px; }
.sourcing-reply-task-title span { color: var(--muted); font-size: 9px; font-weight: 800; }
.sourcing-reply-task-title h3 { margin: 0; color: var(--sourcing-ink); font-size: 14px; }
.sourcing-reply-task-title em { width: fit-content; margin-top: 3px; padding: 4px 8px; border-radius: 999px; color: #176bc0; background: #eaf4ff; font-size: 9px; font-style: normal; font-weight: 800; }
.sourcing-reply-task-title > small { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #80500e; background: #fff3de; font-size: 9px; font-weight: 850; }
.sourcing-reply-task-body > p { max-width: 960px; margin: 0; color: #31445c; font-size: 11px; line-height: 1.55; }
.sourcing-reply-source-button { width: min(960px, 100%); min-height: 50px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; appearance: none; border: 1px solid #d9e6f3; border-radius: 13px; background: linear-gradient(145deg, #f8fbff, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 5px 15px rgba(25, 77, 127, .035); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.sourcing-reply-source-button:hover { border-color: #96bce2; box-shadow: 0 9px 22px rgba(25, 77, 127, .09); transform: translateY(-1px); }
.sourcing-reply-source-button:focus-visible { outline: 3px solid rgba(8, 120, 249, .18); outline-offset: 2px; }
.sourcing-reply-source-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e9f4ff; color: #176bc0; }
.sourcing-reply-source-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sourcing-reply-source-button > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.sourcing-reply-source-button small { color: #62778d; font-size: 8.5px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.sourcing-reply-source-button strong { overflow: hidden; color: #183c5e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-reply-source-button em { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eaf4ff; color: #176bc0; font-size: 9px; font-style: normal; font-weight: 850; white-space: nowrap; }
.sourcing-line-outcome { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; width: fit-content; padding: 9px 11px; border: 1px solid #dce8f5; border-radius: 12px; background: #f7fbff; }
.sourcing-line-outcome span { flex-basis: 100%; color: var(--muted); font-size: 9px; font-weight: 750; }
.sourcing-line-outcome strong { color: var(--sourcing-ink); font-size: 11px; }
.sourcing-line-outcome small { color: #176bc0; font-size: 10px; }
.sourcing-alternative-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-width: 960px; }
.sourcing-alternative-facts > div { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid #eadfc9; border-radius: 11px; background: rgba(255,255,255,.82); }
.sourcing-alternative-facts > div.is-wide { grid-column: 1 / -1; }
.sourcing-alternative-facts span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.sourcing-alternative-facts strong { color: var(--sourcing-ink); font-size: 11px; line-height: 1.4; }
.sourcing-alternative-decision { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sourcing-alternative-decision input { min-width: min(360px, 100%); height: 36px; padding: 0 12px; border: 1px solid #d8e0ea; border-radius: 11px; background: #fff; }
.sourcing-decision-explainer { display: flex; flex-wrap: wrap; gap: 5px 9px; align-items: baseline; max-width: 960px; padding: 9px 11px; border: 1px solid #f0d7aa; border-radius: 11px; background: #fff8ea; }
.sourcing-decision-explainer strong { color: #84530d; font-size: 10px; }
.sourcing-decision-explainer span { color: #7a6851; font-size: 9px; }
.sourcing-reply-draft-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; max-width: 960px; }
.sourcing-reply-draft-form label { display: grid; gap: 5px; }
.sourcing-reply-draft-form label > span { color: #53667b; font-size: 9px; font-weight: 800; }
.sourcing-reply-draft-form textarea { min-height: 92px; padding: 11px 12px; resize: vertical; border: 1px solid #d8e0ea; border-radius: 12px; background: #fff; color: var(--sourcing-ink); font: inherit; line-height: 1.5; }
.sourcing-reply-task-result { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 10px; }
.sourcing-reply-task-result strong { color: #087a4b; }
.sourcing-reply-task-result a { color: #176bc0; font-weight: 850; }
.sourcing-reply-task-result .is-error { color: #b42318; }
.sourcing-agent-task-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid rgba(21, 145, 99, .15); border-radius: 13px; background: rgba(240, 252, 247, .82); }
.sourcing-agent-task-state > div { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 3px 7px; }
.sourcing-agent-task-state strong { color: #087a4b; font-size: 11px; }
.sourcing-agent-task-state small { grid-column: 2; color: #527064; font-size: 9px; }
.sourcing-agent-task-state > em { flex: 0 0 auto; color: #348066; font-size: 9px; font-style: normal; font-weight: 800; }
.sourcing-agent-pulse { width: 8px; height: 8px; border-radius: 50%; background: #15a36f; box-shadow: 0 0 0 0 rgba(21, 163, 111, .3); animation: sourcing-agent-pulse 1.8s ease-out infinite; }
.sourcing-agent-message { width: min(760px, 100%); }
.sourcing-agent-message summary { color: #176bc0; cursor: pointer; font-size: 10px; font-weight: 800; }
.sourcing-agent-message pre { margin: 8px 0 0; padding: 12px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #263b51; font: inherit; font-size: 10px; line-height: 1.55; }
.sourcing-reply-task-group.is-agent-group > summary { background: linear-gradient(90deg, #effaf6, #f8fbff); }
@keyframes sourcing-agent-pulse { 70% { box-shadow: 0 0 0 7px rgba(21, 163, 111, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 163, 111, 0); } }
.sourcing-task-waiting-note { color: var(--muted); font-size: 10px; }
.sourcing-reply-task:target { scroll-margin-top: calc(var(--topbar-height) + 22px); animation: sourcing-task-focus 1.35s ease both; }
.sourcing-reply-task-group { border-top: 1px solid var(--line); }
.sourcing-reply-task-group > summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; background: #f8fafc; cursor: pointer; list-style: none; }
.sourcing-reply-task-group > summary::-webkit-details-marker { display: none; }
.sourcing-reply-task-group > summary > span:first-child { display: grid; gap: 2px; }
.sourcing-reply-task-group > summary strong { color: var(--sourcing-ink); font-size: 12px; }
.sourcing-reply-task-group > summary small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.sourcing-reply-task-group[open] > summary .sourcing-chevron { transform: rotate(180deg); }
.sourcing-lazy-task-history > summary { min-height: 58px; background: linear-gradient(90deg, #f7f9fc, #fbfcfe); }
.sourcing-active-history > summary { background: linear-gradient(90deg, #effaf6, #f8fbff); }
.sourcing-resolved-history-content { min-height: 76px; background: #f8fafc; }
.sourcing-resolved-history-content > .ui-state { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.sourcing-resolved-history-page { display: grid; background: #fff; }
.sourcing-resolved-history-pager { min-height: 64px; display: flex; align-items: center; justify-content: center; padding: 10px 20px; border-top: 1px solid var(--line); background: #f8fafc; }
.sourcing-resolved-history-pager .button { min-height: 44px; }
.sourcing-resolved-history-pager small { color: var(--muted); font-size: 11px; }
.sourcing-history-error .button { min-height: 44px; }
.sourcing-history-loading .ui-state-copy p,
.sourcing-history-error .ui-state-copy p { max-width: 620px; }
@keyframes sourcing-task-focus { 0%, 45% { box-shadow: inset 4px 0 0 #f0a62b, inset 0 0 0 1px rgba(240,166,43,.25); background: #fff8e9; } 100% { box-shadow: inset 4px 0 0 transparent; } }
.sourcing-alternative-child-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 17px; border: 1px solid #d9e7f6; border-radius: 16px; background: linear-gradient(135deg, #f6fbff, #fff); box-shadow: 0 12px 30px rgba(20, 66, 110, .06); }
.sourcing-alternative-child-banner > div { display: grid; gap: 2px; }
.sourcing-alternative-child-banner span { color: #176bc0; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }
.sourcing-alternative-child-banner strong { color: var(--sourcing-ink); font-size: 14px; }
.sourcing-alternative-child-banner p { margin: 0; color: var(--muted); font-size: 10px; }
.sourcing-partial-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 10px; overflow: hidden; border: 1px solid #e2e8ef; border-radius: 8px; background: #e2e8ef; }
.sourcing-partial-totals > div { min-width: 0; display: grid; gap: 3px; padding: 9px 10px; background: #f9fbfd; }
.sourcing-partial-totals span, .sourcing-partial-totals small { color: #617287; font-size: 8px; }
.sourcing-partial-totals strong { color: var(--sourcing-ink); font-size: 14px; }
.sourcing-partial-warning, .sourcing-partial-ready { margin: 9px 0 0 !important; padding: 7px 9px; border-radius: 7px; font-size: 9px !important; }
.sourcing-partial-warning { background: #fff7e8; color: #83530d !important; }
.sourcing-partial-ready { background: #eaf8f0; color: #087a4b !important; }
.sourcing-partial-lines { margin-top: 8px; }
.sourcing-partial-lines > summary { width: fit-content; color: var(--chzm-blue-dark); cursor: pointer; font-size: 9px; font-weight: 800; }
.sourcing-partial-lines > div { display: grid; gap: 1px; margin-top: 7px; overflow: hidden; border: 1px solid #e5eaf0; border-radius: 7px; background: #e5eaf0; }
.sourcing-partial-lines p { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; max-width: none; margin: 0 !important; padding: 7px 8px; background: #fff; font-size: 9px !important; }
.sourcing-partial-lines p > span { overflow: hidden; color: #40546a; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-partial-lines p > strong { color: var(--sourcing-ink); font-size: 9px; white-space: nowrap; }
.sourcing-partial-lines p > small { color: #6a7a8d; font-size: 8px; white-space: nowrap; }
.sourcing-split-decision { display: grid; gap: 3px; margin: 9px 0; padding: 10px; border-radius: 8px; background: #eef8f2; }
.sourcing-split-decision span, .sourcing-split-decision small { color: #3f6653; font-size: 9px; }
.sourcing-split-decision strong { color: #087a4b; font-size: 13px; }
.sourcing-attachment-chip { max-width: 420px; display: inline-grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 8px 7px 0 0; padding: 7px 9px; border: 1px solid #d8e1eb; border-radius: 9px; background: #f8fafc; color: var(--sourcing-ink); text-decoration: none; vertical-align: top; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.sourcing-attachment-chip:hover { border-color: #9eb6d2; background: #fff; box-shadow: 0 4px 12px rgba(17, 48, 82, .08); }
.sourcing-attachment-chip > span:nth-child(2) { min-width: 0; display: grid; gap: 1px; }
.sourcing-attachment-chip strong { font-size: 10px; }
.sourcing-attachment-chip small { max-width: 270px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-attachment-chip > span:last-child { color: var(--chzm-blue-dark); font-size: 13px; font-weight: 900; }
.sourcing-attachment-icon { min-width: 30px; min-height: 28px; display: inline-grid; place-items: center; padding: 3px; border-radius: 6px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 8px; font-weight: 900; letter-spacing: .02em; }
.sourcing-response-price { display: grid; justify-items: end; gap: 4px; padding-top: 2px; text-align: right; }
.sourcing-response-price strong { color: var(--sourcing-ink); font-size: 20px; white-space: nowrap; }
.sourcing-response-price small { color: var(--muted); font-size: 9px; }
.sourcing-offer-details, .sourcing-response-links { margin-top: 8px; }
.sourcing-offer-details > summary, .sourcing-response-links summary { width: fit-content; color: var(--chzm-blue-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.sourcing-offer-details > div { margin-top: 8px; padding: 10px 12px; border-left: 3px solid #d89a36; background: #fffaf0; color: #4d5c6d; font-size: 10px; }
.sourcing-offer-details strong { display: block; margin-top: 7px; }
.sourcing-offer-details strong:first-child { margin-top: 0; }
.sourcing-offer-details ul { margin: 4px 0 0; padding-left: 17px; }
.sourcing-response-links .rfq-draft { margin-top: 5px; }
.sourcing-waiting-empty { padding: 28px 18px; text-align: center; }
.sourcing-waiting-empty strong { color: var(--sourcing-ink); }
.sourcing-waiting-empty p { margin: 5px 0 0; color: var(--muted); }
.sourcing-awaiting { border-top: 1px solid var(--line); background: #fafbfd; }
.sourcing-awaiting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 0 17px 17px; }
.sourcing-awaiting-grid > div { min-width: 0; display: grid; gap: 3px; padding: 10px; border: 1px solid #e4e9ef; background: #fff; }
.sourcing-awaiting-grid strong, .sourcing-awaiting-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-awaiting-grid strong { color: var(--sourcing-ink); font-size: 10px; }
.sourcing-awaiting-grid small { color: var(--muted); font-size: 9px; }
.sourcing-decision-collapsed { margin-top: 12px; }
.sourcing-decision-form { max-width: 620px; margin-top: 14px; }
.sourcing-price-strip small { display: block; margin-top: 2px; color: var(--sourcing-amber); font-size: 8px; font-weight: 800; }
.sourcing-workspace-heading { align-items: center; }
.sourcing-savings-dashboard { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(130px, 1fr)); gap: 1px; margin-bottom: 12px; overflow: hidden; border: 1px solid #bde2cd; border-radius: 13px; background: #cfe8da; box-shadow: 0 7px 22px rgba(20, 90, 61, .08); }
.sourcing-savings-dashboard > div { min-width: 0; display: grid; align-content: center; gap: 4px; min-height: 84px; padding: 14px 16px; background: #fff; }
.sourcing-savings-dashboard .sourcing-savings-lead { background: linear-gradient(135deg, #e6f7ee, #f8fffb); }
.sourcing-savings-dashboard span, .sourcing-savings-dashboard small { color: #647589; font-size: 11px; font-weight: 800; }
.sourcing-savings-dashboard strong { overflow: hidden; color: #0a7148; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-savings-dashboard .sourcing-savings-lead strong { font-size: 29px; }
.sourcing-case-card.is-purchase-complete { border-left-color: #078552; }
.sourcing-purchase-success { display: grid; grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, .8fr)); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid #a8dcc0; border-radius: 13px; background: #c9e7d7; box-shadow: 0 8px 24px rgba(17, 114, 73, .08); }
.sourcing-purchase-success > div { min-width: 0; display: grid; align-content: center; gap: 4px; min-height: 84px; padding: 14px 16px; background: #f8fffb; }
.sourcing-purchase-success-title { display: flex !important; grid-template-columns: auto 1fr; align-items: center !important; gap: 11px !important; }
.sourcing-purchase-success-title > span, .sourcing-purchase-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #078552; color: #fff; font-size: 17px; font-weight: 900; }
.sourcing-purchase-success span, .sourcing-purchase-success small { color: #587064; font-size: 9px; }
.sourcing-purchase-success strong { color: #123b2c; font-size: 19px; }
.sourcing-purchase-success .is-saving strong { color: #078552; font-size: 23px; }
.sourcing-purchase-success > details { grid-column: 1 / -1; padding: 10px 16px; background: #fff; }
.sourcing-purchase-success > details summary { color: #075f3e; cursor: pointer; font-size: 10px; font-weight: 900; }
.sourcing-purchase-success > details div { display: grid; gap: 6px; margin-top: 8px; }
.sourcing-purchase-success > details p { display: grid; grid-template-columns: minmax(160px, 1fr) auto; gap: 4px 14px; margin: 0; padding: 7px 9px; border-radius: 7px; background: #f5faf7; font-size: 10px; }
.sourcing-purchase-success > details p small { grid-column: 1 / -1; }
.sourcing-purchase-progress { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 14px; padding: 13px 15px; border: 1px solid #b9d8f2; border-radius: 12px; background: #f3f8fd; }
.sourcing-purchase-progress > div { display: flex; gap: 10px; align-items: center; }
.sourcing-purchase-progress strong { display: block; color: var(--sourcing-ink); font-size: 13px; }
.sourcing-purchase-progress small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.sourcing-purchase-progress-actions { justify-content: flex-end; }
.sourcing-time-left.is-complete strong { color: #078552; }
.sourcing-time-left.is-open strong { color: #1f69b4; }
.sourcing-future-opportunity { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid #bcd7f4; border-radius: 14px; background: linear-gradient(135deg, #edf6ff, #fbfdff); box-shadow: 0 8px 22px rgba(31, 83, 137, .08); }
.sourcing-future-opportunity > div { display: grid; gap: 3px; }
.sourcing-future-opportunity span { color: #2867a7; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.sourcing-future-opportunity strong { color: #173f68; font-size: 15px; }
.sourcing-future-opportunity p { margin: 0; color: #4c6680; font-size: 10px; }
.sourcing-alternative-opportunity { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid #efd09a; border-radius: 14px; background: linear-gradient(135deg, #fff8eb, #fffdf9); box-shadow: 0 8px 22px rgba(137, 91, 20, .08); }
.sourcing-alternative-opportunity > div { display: grid; gap: 3px; }
.sourcing-alternative-opportunity span { color: #9a5a00; font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.sourcing-alternative-opportunity strong { color: #603b08; font-size: 15px; }
.sourcing-alternative-opportunity p { margin: 0; color: #765a33; font-size: 10px; }
.sourcing-invoice-preview-button { gap: 7px; }
.sourcing-invoice-preview-button > span { display: inline-grid; place-items: center; min-width: 27px; height: 21px; padding: 0 5px; border-radius: 5px; background: #e9f1fc; color: #175cad; font-size: 8px; font-weight: 900; }
.sourcing-invoice-preview-dialog { width: min(1440px, calc(100% - 28px)); height: min(900px, calc(100vh - 28px)); max-height: none; overflow: hidden; }
.sourcing-invoice-preview-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #fff; }
.sourcing-invoice-preview-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sourcing-invoice-preview-header > div:first-child { min-width: 0; display: grid; gap: 2px; }
.sourcing-invoice-preview-header span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.sourcing-invoice-preview-header h2 { overflow: hidden; margin: 0; color: var(--sourcing-ink); font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-invoice-preview-header p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-invoice-preview-actions { display: flex; align-items: center; gap: 8px; }
.sourcing-invoice-preview-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 310px; background: #e9eef4; }
.sourcing-invoice-preview-frame { min-height: 0; display: grid; position: relative; padding: 10px; }
.sourcing-invoice-preview-frame iframe { width: 100%; height: 100%; position: relative; z-index: 1; border: 0; border-radius: 7px; background: #fff; box-shadow: 0 3px 14px rgba(23, 45, 72, .12); }
.sourcing-pdf-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #536579; }
.sourcing-pdf-loading span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 13px; background: #fff; color: #1764bd; box-shadow: 0 5px 18px rgba(23, 45, 72, .1); font-size: 13px; font-weight: 900; }
.sourcing-pdf-loading strong { font-size: 11px; }
.sourcing-invoice-preview-summary { min-height: 0; padding: 15px; overflow-y: auto; border-left: 1px solid #d5dde7; background: #fff; }
.sourcing-source-total { display: grid; gap: 3px; padding: 14px; border: 1px solid #bfd4ee; border-radius: 10px; background: #f3f7fc; }
.sourcing-source-total span, .sourcing-source-total small { color: #647589; font-size: 8px; }
.sourcing-source-total strong { color: var(--sourcing-ink); font-size: 24px; }
.sourcing-invoice-preview-summary dl { display: grid; gap: 1px; margin: 12px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.sourcing-invoice-preview-summary dl > div { display: grid; gap: 3px; padding: 9px 10px; background: #fff; }
.sourcing-invoice-preview-summary dt { color: var(--muted); font-size: 8px; }
.sourcing-invoice-preview-summary dd { margin: 0; color: var(--sourcing-ink); font-size: 11px; font-weight: 800; }
.sourcing-source-lines { display: grid; gap: 6px; }
.sourcing-source-lines > strong { color: var(--sourcing-ink); font-size: 11px; }
.sourcing-source-lines > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.sourcing-source-lines span { grid-column: 1 / -1; color: #334b65; font-size: 9px; line-height: 1.4; }
.sourcing-source-lines small { color: var(--muted); font-size: 8px; }
.sourcing-source-lines b { color: var(--sourcing-ink); font-size: 9px; }
.sourcing-open-pdf-tab { display: block; margin-top: 12px; color: var(--chzm-blue-dark); font-size: 9px; font-weight: 800; text-align: center; text-decoration: none; }
.sourcing-open-pdf-tab:hover { text-decoration: underline; }
.sourcing-heading-actions { display: flex; align-items: center; gap: 8px; }
.sourcing-heading-actions .button span, .sourcing-inline-refresh span { display: inline-block; font-size: 17px; line-height: 1; }
.sourcing-heading-actions .is-refreshing span, .sourcing-inline-refresh.is-refreshing span { animation: sourcing-spin .8s linear infinite; }
.sourcing-upload-dialog { width: min(620px, calc(100% - 24px)); }
.sourcing-upload-dialog .dialog-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.sourcing-upload-dialog .manual-upload-form { padding: clamp(20px, 4vw, 28px); background: #fff; }
.sourcing-delivery-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 11px; padding: 13px 14px; border: 1px solid #d7e2ee; border-radius: 12px; background: #f7faff; cursor: pointer; }
.sourcing-delivery-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--chzm-blue); }
.sourcing-delivery-choice span { display: grid; gap: 3px; }
.sourcing-delivery-choice strong { color: var(--sourcing-ink); font-size: 12px; }
.sourcing-delivery-choice small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.sourcing-delivery-choice:has(input:checked) { border-color: #8fc3f5; background: #eef7ff; box-shadow: 0 0 0 3px rgba(31, 132, 235, .08); }
.sourcing-delivery-fields[hidden] { display: none; }
.sourcing-compact-stats { min-height: 62px; display: grid; grid-template-columns: repeat(3, minmax(120px, 180px)) minmax(120px, 1fr); align-items: stretch; margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sourcing-compact-stats.has-unmatched { grid-template-columns: repeat(4, minmax(120px, 180px)) minmax(120px, 1fr); }
.sourcing-compact-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; border-right: 1px solid var(--line); }
.sourcing-compact-stats span { color: var(--muted); font-size: 10px; font-weight: 800; }
.sourcing-compact-stats strong { color: var(--sourcing-ink); font-size: 21px; }
.sourcing-compact-stats .metric-danger strong { color: var(--chzm-red); }
.sourcing-compact-stats .metric-warning strong { color: var(--sourcing-amber); }
.sourcing-compact-stats .metric-unmatched strong { color: #7154aa; }
.sourcing-compact-stats > small { align-self: center; justify-self: end; padding: 0 15px; color: var(--muted); font-size: 9px; }
.sourcing-filter-collapsed { margin-bottom: 10px; padding: 0; overflow: hidden; }
.sourcing-filter-collapsed > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.sourcing-filter-collapsed > summary::-webkit-details-marker { display: none; }
.sourcing-filter-collapsed > summary > span:first-child { display: flex; align-items: center; gap: 8px; }
.sourcing-filter-collapsed > summary strong { color: var(--sourcing-ink); font-size: 12px; }
.sourcing-filter-collapsed > summary small { padding: 3px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 8px; font-weight: 800; }
.sourcing-filter-collapsed[open] > summary { border-bottom: 1px solid var(--line); }
.sourcing-filter-collapsed[open] .sourcing-chevron { transform: rotate(180deg); }
.sourcing-filter-collapsed .sourcing-filter { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.sourcing-filter-collapsed .sourcing-pending-list { padding: 0 14px; }
.sourcing-inline-refresh { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; padding: 0; border: 0; background: transparent; color: var(--chzm-blue-dark); cursor: pointer; font-size: 11px; font-weight: 800; }
.sourcing-inline-refresh:disabled { opacity: .55; cursor: wait; }
.sourcing-attachment-page { min-height: 100vh; }
.attachment-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; padding: 14px 16px; }
.attachment-preview-header > div { min-width: 0; display: grid; gap: 3px; }
.attachment-preview-header > div > span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.attachment-preview-header h1 { overflow: hidden; margin: 0; color: var(--sourcing-ink); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-breadcrumb-link { width: fit-content; color: var(--chzm-blue-dark); font-size: 10px; font-weight: 800; text-decoration: none; }
.sourcing-breadcrumb-link:hover { text-decoration: underline; }
.attachment-preview-stage { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: 0; overflow: hidden; background: #e9eef4; }
.attachment-preview-stage iframe { width: 100%; min-height: calc(100vh - 170px); border: 0; background: #fff; }
.attachment-preview-stage img { display: block; max-width: 100%; max-height: calc(100vh - 190px); padding: 16px; object-fit: contain; }
@keyframes sourcing-spin { to { transform: rotate(360deg); } }
@keyframes sourcing-progress-pulse { 50% { box-shadow: 0 0 0 7px rgba(31, 105, 207, .04); } }

@media (max-width: 1100px) {
  .sourcing-savings-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-savings-dashboard .sourcing-savings-lead { grid-column: 1 / -1; }
  .sourcing-purchase-success { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-purchase-success-title { grid-column: 1 / -1; }
  .sourcing-decision-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-detail-grid { grid-template-columns: 1fr; }
  .sourcing-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-invoice-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .sourcing-invoice-preview-dialog { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; }
  .sourcing-invoice-preview-header { align-items: flex-start; padding: 12px; }
  .sourcing-invoice-preview-header h2 { font-size: 16px; }
  .sourcing-invoice-preview-actions .button { display: none; }
  .sourcing-invoice-preview-layout { grid-template-columns: 1fr; grid-template-rows: minmax(55vh, 1fr) auto; overflow-y: auto; }
  .sourcing-invoice-preview-frame { min-height: 55vh; }
  .sourcing-invoice-preview-summary { max-height: none; border-top: 1px solid #d5dde7; border-left: 0; }
  .sourcing-savings-dashboard, .sourcing-purchase-success { grid-template-columns: 1fr; }
  .sourcing-savings-dashboard .sourcing-savings-lead, .sourcing-purchase-success-title { grid-column: auto; }
  .sourcing-savings-dashboard > div, .sourcing-purchase-success > div { min-height: 65px; }
  .sourcing-purchase-progress { display: grid; }
  .sourcing-purchase-progress-actions { display: grid !important; justify-content: stretch; }
  .sourcing-purchase-progress-actions .button { width: 100%; }
  .sourcing-manual-upload { grid-template-columns: 1fr; gap: 18px; }
  .manual-upload-form { padding: 13px; }
  .manual-file-drop { grid-template-columns: 1fr; }
  .manual-file-drop > span { width: 46px; height: 46px; }
  .sourcing-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .sourcing-metrics article { min-height: 68px; padding: 10px; border-left-width: 3px; }
  .sourcing-metrics span { font-size: 8px; }
  .sourcing-metrics strong { font-size: 22px; }
  .sourcing-filter { grid-template-columns: 1fr; }
  .sourcing-filter .button { width: 100%; }
  .sourcing-pending-list article { grid-template-columns: 1fr; gap: 9px; }
  .sourcing-pending-list .button { width: 100%; }
  .sourcing-case-card { gap: 12px; padding: 13px; }
  .sourcing-case-title { align-items: start; }
  .sourcing-case-title h2 { font-size: 16px; }
  .sourcing-price-strip { grid-template-columns: 1fr; }
  .sourcing-price-strip > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-top: 1px solid #dbe4ee; border-left: 0; }
  .sourcing-price-strip > div:first-child { border-top: 0; }
  .sourcing-price-strip strong { font-size: 15px; }
  .sourcing-progress-steps { grid-template-columns: repeat(5, minmax(126px, 1fr)); overflow-x: auto; }
  .sourcing-progress-step { min-height: 28px; }
  .sourcing-case-footer { display: grid; }
  .sourcing-detail-hero { grid-template-columns: 1fr; gap: 13px; padding: 17px; }
  .sourcing-deadline { min-width: 0; text-align: left; }
  .sourcing-decision-strip { gap: 7px; }
  .sourcing-decision-strip article { min-height: 86px; padding: 11px; }
  .sourcing-decision-strip strong { font-size: 16px; }
  .sourcing-detail-grid, .sourcing-side-column { grid-template-columns: 1fr; }
  .sourcing-invoice-meta { grid-template-columns: 1fr; }
  .sourcing-empty-action { display: grid; }
  .sourcing-empty-action .button { width: 100%; }
  .sourcing-offer-form { grid-template-columns: 1fr; }
  .sourcing-offer-form .field-wide { grid-column: auto; }
  .rfq-draft > div { width: min(560px, 75vw); }
  .sourcing-case-header { display: grid; padding: 15px; }
  .sourcing-header-actions { justify-content: space-between; }
  .sourcing-time-left { text-align: left; }
  .sourcing-executive-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .sourcing-executive-summary article { min-height: 82px; padding: 11px; }
  .sourcing-executive-summary article > strong { font-size: 17px; }
  .sourcing-api-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-api-totals > div:nth-child(3) { border-left: 0; }
  .sourcing-api-totals > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sourcing-api-call-list article { grid-template-columns: 1fr auto; }
  .sourcing-api-call-list article > span { grid-column: 1 / -1; grid-row: 2; }
  .sourcing-results-header { align-items: start; }
  .sourcing-response-card { grid-template-columns: 1fr auto; gap: 10px; padding: 14px; }
  .sourcing-response-rank { grid-column: 1 / -1; }
  .sourcing-response-title { display: grid; }
  .sourcing-response-price strong { font-size: 17px; }
  .sourcing-reply-actions-header { align-items: flex-start; padding: 15px; }
  .sourcing-deferred-decisions { display: grid; gap: 3px; padding: 11px 15px; }
  .sourcing-deferred-decisions span { text-align: left; }
  .sourcing-reply-task { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px 15px; }
  .sourcing-reply-task-icon { width: 32px; height: 32px; border-radius: 11px; font-size: 15px; }
  .sourcing-reply-task-title { display: grid; }
  .sourcing-alternative-facts { grid-template-columns: 1fr; }
  .sourcing-alternative-facts > div.is-wide { grid-column: auto; }
  .sourcing-alternative-decision { display: grid; }
  .sourcing-alternative-decision input,
  .sourcing-alternative-decision .button { width: 100%; min-width: 0; }
  .sourcing-reply-draft-form { grid-template-columns: 1fr; }
  .sourcing-reply-draft-form .button { width: 100%; }
  .sourcing-alternative-child-banner { align-items: stretch; flex-direction: column; }
  .sourcing-partial-comparison > header { display: grid; }
  .sourcing-partial-comparison > header > span { width: fit-content; }
  .sourcing-partial-totals { grid-template-columns: 1fr; }
  .sourcing-partial-lines p { grid-template-columns: 1fr; gap: 3px; }
  .sourcing-attachment-chip { max-width: 100%; }
  .sourcing-attachment-chip small { max-width: min(62vw, 270px); }
  .attachment-preview-header { align-items: stretch; flex-direction: column; }
  .attachment-preview-header .button { width: 100%; }
  .attachment-preview-stage, .attachment-preview-stage iframe { min-height: calc(100vh - 230px); }
  .sourcing-awaiting-grid { grid-template-columns: 1fr; }
  .sourcing-workspace-heading { align-items: stretch; }
  .sourcing-heading-actions { width: 100%; }
  .sourcing-heading-actions .button { flex: 1; padding-inline: 10px; }
  .sourcing-compact-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sourcing-compact-stats > div { display: grid; justify-items: center; gap: 3px; padding: 9px 5px; text-align: center; }
  .sourcing-compact-stats > small { grid-column: 1 / -1; justify-self: center; padding: 7px; border-top: 1px solid var(--line); }
}

@media (min-width: 640px) {
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-list > div { grid-template-columns: 180px 1fr; align-items: center; }
  .filter-bar { grid-template-columns: minmax(220px, 1fr) minmax(180px, .35fr) auto; align-items: end; }
  .directory-search { grid-template-columns: minmax(220px, 1fr) auto; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .form-grid > .field > label { min-height: 42px; display: flex; align-items: flex-end; }
  .field-wide { grid-column: 1 / -1; }
  .document-upload-form { grid-template-columns: minmax(140px, .55fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: start; }
  .document-upload-form > .field { grid-template-rows: 42px minmax(48px, auto) minmax(36px, auto); align-self: stretch; }
  .document-upload-form > .field > label { min-height: 42px; display: flex; align-items: flex-end; }
  .document-upload-form > .field > input, .document-upload-form > .field > select { min-height: 48px; }
  .document-upload-form > .button { min-height: 48px; margin-top: 42px; }
  .action-tabs { grid-template-columns: repeat(4, 1fr); }
  .personal-name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-row { grid-template-columns: 46px minmax(0, 1fr) auto auto; }
  .document-row > .badge, .document-row > .button { grid-column: auto; justify-self: auto; }
  .directory-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .directory-row > .button { justify-self: auto; }
}

@media (min-width: 900px) {
  .page-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .page-heading-actions { align-items: center; }
  .workspace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-hero { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .project-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
  .form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .directory-layout { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); }
  .counterparty-editor { order: initial; position: sticky; top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sourcing-reply-task:target { animation: none; box-shadow: inset 4px 0 0 #f0a62b; background: #fff8e9; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* P04 · Исходные заявки на закупку */
.request-page-heading, .request-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.request-create-button { white-space: nowrap; }
.request-filter { margin-bottom: 16px; }
.request-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.request-row { min-height: 112px; display: grid; grid-template-columns: 5px minmax(0, 1fr) 32px; gap: 15px; align-items: stretch; padding: 15px 18px 15px 13px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background-color .16s ease, box-shadow .16s ease; }
.request-row:last-child { border-bottom: 0; }
.request-row:hover { background: #f9fbfe; }
.request-row:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--focus); outline-offset: -3px; }
.request-row-marker { width: 4px; min-height: 72px; align-self: center; border-radius: 999px; background: var(--chzm-blue); }
.request-row-main { min-width: 0; display: grid; align-content: center; gap: 5px; }
.request-row-topline { display: flex; align-items: center; gap: 10px; }
.request-row-topline > strong { color: var(--chzm-navy); font-size: 15px; }
.request-row-title { display: -webkit-box; overflow: hidden; color: var(--chzm-navy); font-size: 15px; font-weight: 850; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.request-row-project { overflow: hidden; color: #64758a; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.request-row-meta { display: flex; flex-wrap: wrap; gap: 5px 15px; color: var(--muted); font-size: 11px; }
.request-row-arrow { align-self: center; color: #8ba0ba; font-size: 20px; }
.request-empty { border: 0; }
.request-empty .button { margin-top: 12px; }
.request-status-warehouse_review { background: var(--blue-soft); color: var(--chzm-blue-dark); }
.request-status-needs_clarification { background: var(--amber-soft); color: #8d5710; }
.request-status-rejected { background: var(--red-soft); color: #a52d34; }
.request-status-processed { background: var(--green-soft); color: #187148; }

.request-form { max-width: 1040px; }
.request-core-fields { display: grid; grid-template-columns: minmax(240px, .45fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.request-core-fields textarea { min-height: 190px; resize: vertical; }
.request-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.request-upload-card { min-height: 220px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px 13px; align-content: start; padding: 18px; border: 1px solid #cad9ea; border-radius: 12px; background: #f9fbfe; }
.request-upload-card > div > strong { display: block; font-size: 15px; }
.request-upload-card > div > p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.request-upload-icon { width: 44px; height: 44px; display: grid; grid-row: span 1; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 19px; }
.request-upload-gallery .request-upload-icon { background: var(--green-soft); color: var(--chzm-green); }
.request-file-button { grid-column: 1 / -1; justify-content: center; margin-top: 9px; cursor: pointer; }
.request-upload-card input[type="file"] { width: 1px; height: 1px; padding: 0; position: absolute; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.request-upload-card input[type="file"]:focus-visible + .request-file-selection { outline: 3px solid var(--focus); outline-offset: 3px; }
.request-file-selection { min-height: 34px; grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; text-align: center; }
.request-upload-card .field-error { grid-column: 1 / -1; }

.request-detail-hero { margin-bottom: 20px; }
.request-detail-hero .back-link { display: block; width: fit-content; margin-bottom: 16px; color: var(--chzm-blue-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
.request-detail-hero h1 { margin: 3px 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.request-detail-hero p { margin: 0; color: var(--muted); }
.request-detail-hero > .status-pill { margin-top: 35px; }
.request-detail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 16px; }
.request-source-text { min-height: 170px; padding: 17px; border-radius: 10px; background: #f6f8fb; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; white-space: normal; }
.request-no-text { min-height: 120px; display: grid; place-items: center; padding: 18px; border: 1px dashed #b8c6d8; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.request-metadata { display: grid; margin: 0; }
.request-metadata > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.request-metadata > div:last-child { border-bottom: 0; }
.request-metadata dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.request-metadata dd { margin: 0; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.request-metadata dd span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.request-metadata dd a { color: var(--chzm-blue-dark); }
.request-photos-section { margin-top: 16px; }
.request-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.request-photo { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: var(--ink); text-decoration: none; }
.request-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.request-photo img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: #e8edf3; }
.request-photo > span { display: grid; gap: 2px; padding: 10px 11px; }
.request-photo strong { font-size: 12px; }
.request-photo small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1000px) {
  .request-filter { grid-template-columns: minmax(260px, 1fr) minmax(220px, .75fr) minmax(170px, .45fr) auto; }
}

@media (max-width: 820px) {
  .request-page-heading, .request-detail-hero { display: block; }
  .request-create-button { width: 100%; justify-content: center; }
  .request-detail-hero > .status-pill { margin-top: 13px; }
  .request-detail-layout { grid-template-columns: 1fr; }
  .request-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-form-actions { display: grid; grid-template-columns: minmax(100px, .45fr) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .request-row { min-height: 136px; grid-template-columns: 4px minmax(0, 1fr); gap: 11px; padding: 14px 13px 14px 10px; }
  .request-row-arrow { display: none; }
  .request-row-topline { align-items: flex-start; justify-content: space-between; }
  .request-row-topline .status-pill { max-width: 150px; text-align: center; white-space: normal; }
  .request-row-excerpt { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .request-core-fields, .request-upload-grid { grid-template-columns: 1fr; }
  .request-upload-card { min-height: 205px; }
  .request-photo-grid { grid-template-columns: 1fr; }
  .request-photo img { aspect-ratio: 16 / 11; }
  .request-metadata > div { grid-template-columns: 92px minmax(0, 1fr); }
}

/* Production shell based on the approved CHZM prototype. */
:root {
  --chzm-blue: #2468d8;
  --chzm-blue-dark: #1e5ab6;
  --chzm-navy: #102f53;
  --chzm-green: #1f8b5b;
  --chzm-red: #c83f45;
  --ink: #162234;
  --muted: #68758a;
  --line: #dfe6ef;
  --surface: #ffffff;
  --surface-soft: #f3f6fa;
  --blue-soft: #eaf2ff;
  --green-soft: #e8f6ef;
  --amber: #a76512;
  --amber-soft: #fff4df;
  --red-soft: #fff0f1;
  --focus: #ffbf47;
  --radius: 12px;
  --shadow: 0 14px 38px rgba(30, 54, 82, .12);
  --sidebar-width: 244px;
  --topbar-height: 68px;
}

html, body { background: var(--surface-soft); color: var(--ink); }
.authenticated-app { overflow-x: hidden; }
.app-sidebar { width: var(--sidebar-width); display: flex; flex-direction: column; padding: 18px 14px; position: fixed; z-index: 40; inset: 0 auto 0 0; background: var(--chzm-navy); color: #fff; }
.sidebar-brand { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 10px; margin-bottom: 20px; color: #fff; font-weight: 800; letter-spacing: .02em; line-height: 1.15; text-decoration: none; }
.sidebar-brand-mark { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; background: rgba(255,255,255,.12); font-size: 12px; letter-spacing: .03em; }
.sidebar-brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.65); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.sidebar-nav-label { padding: 0 12px; margin: 10px 0 7px; color: rgba(255,255,255,.48); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.78); font-weight: 540; text-decoration: none; }
.sidebar-nav-link > span:last-child { min-width: 0; overflow: hidden; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav-link.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 540; }
.sidebar-nav-icon { width: 20px; flex: 0 0 auto; color: #bfd0e3; text-align: center; }
.sidebar-footer { display: grid; gap: 2px; margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.11); }
.sidebar-footer strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer span { color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.35; }
.sidebar-backdrop { display: none; }

.app-topbar { height: var(--topbar-height); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: fixed; z-index: 30; inset: 0 0 auto var(--sidebar-width); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.topbar-icon.menu-toggle { display: none; }
.topbar-icon { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; position: relative; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 17px; }
.topbar-icon:disabled { cursor: default; opacity: .7; }
.global-search { width: min(440px, 44vw); height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: #f7f9fc; color: var(--muted); }
.global-search:focus-within { border-color: #a9c5ef; background: #fff; box-shadow: 0 0 0 3px #edf4ff; }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.topbar-spacer { flex: 1; }
.role-context { min-height: 40px; max-width: 238px; display: flex; align-items: center; padding: 0 34px 0 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.account-switcher { position: relative; color: var(--ink); }
.account-switcher > summary { width: 238px; min-height: 40px; display: flex; align-items: center; padding: 0 34px 0 11px; position: relative; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; list-style: none; }
.account-switcher > summary::-webkit-details-marker { display: none; }
.account-switcher > summary::after { content: "⌄"; position: absolute; right: 12px; top: 50%; transform: translateY(-57%); color: var(--muted); font-size: 18px; }
.account-switcher > summary strong { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.account-switcher-active > summary { border-color: #e3b356; background: #fff8e8; }
.switcher-popover { width: min(420px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 90px)); display: grid; gap: 12px; padding: 14px; position: absolute; z-index: 80; top: calc(100% + 9px); right: 0; overflow-y: auto; border: 1px solid #cad4df; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(5,16,34,.25); }
.switcher-heading { display: grid; gap: 2px; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); }
.switcher-heading strong { font-size: 15px; }
.switcher-heading small { color: var(--muted); font-size: 12px; }
.switcher-list { display: grid; gap: 6px; }
.switcher-list form { margin: 0; }
.switcher-option, .switcher-return { width: 100%; min-height: 48px; display: grid; gap: 1px; padding: 8px 11px; border: 1px solid transparent; border-radius: 9px; background: #f3f6f9; color: var(--ink); cursor: pointer; text-align: left; }
.switcher-option:hover, .switcher-option:focus-visible { border-color: #8fb5df; background: #eaf3fd; }
.switcher-option strong { font-size: 13px; }
.switcher-option small { color: var(--muted); font-size: 11px; }
.switcher-return { min-height: 42px; border-color: #a8c8eb; background: #edf5fe; color: var(--chzm-blue-dark); font-weight: 800; text-align: center; }
.switcher-empty { margin: 4px 0; color: var(--muted); font-size: 13px; }

.user-menu { position: relative; }
.user-menu > summary { min-height: 42px; display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-avatar { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--chzm-blue); font-weight: 800; }
.user-copy { min-width: 0; }
.user-copy strong, .user-copy small { max-width: 170px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 13px; }
.user-copy small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.user-popover { width: 230px; display: grid; gap: 4px; padding: 8px; position: absolute; z-index: 80; top: calc(100% + 9px); right: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.user-popover a, .user-popover button, .user-popover > span { min-height: 40px; display: flex; align-items: center; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 12px; text-decoration: none; }
.user-popover > span { min-height: auto; color: var(--muted); }
.user-popover a:hover { background: #f3f6f9; }
.user-popover button { width: 100%; color: var(--chzm-red); cursor: pointer; }

.app-main { min-height: 100vh; margin-left: var(--sidebar-width); padding-top: var(--topbar-height); }
.page-shell { width: auto; max-width: 1600px; margin: 0 auto; padding: 28px; }
.authenticated-app .page-heading { margin-bottom: 22px; }
.authenticated-app .page-heading h1, .authenticated-app .project-hero h1 { margin: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
.authenticated-app .page-heading p { margin-top: 7px; }
.authenticated-app .button { min-height: 40px; padding: 8px 14px; }
.authenticated-app .button-small { min-height: 34px; padding: 6px 11px; }
.authenticated-app .field input, .authenticated-app .field select { min-height: 42px; padding: 9px 11px; }
.authenticated-app .field textarea { min-height: 82px; padding: 9px 11px; }
.authenticated-app .form-section, .authenticated-app .content-card { padding: 20px; }
.authenticated-app th, .authenticated-app td { padding: 12px 14px; }
.authenticated-app th { height: 42px; background: #f7f9fc; font-size: 11px; }
.authenticated-app td { font-size: 13px; }

.impersonation-banner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 28px; border-bottom: 1px solid #e4c46f; background: #fff6d9; color: #5b430d; font-size: 12px; }
.impersonation-banner form { margin: 0; }
.impersonation-banner .button { border-color: #8c6a1c; background: #fff; color: #6b4c0b; }

.public-header { min-height: 78px; display: flex; align-items: center; padding: 12px max(32px, calc((100vw - 1180px) / 2)); border-bottom: 4px solid var(--chzm-blue); background: var(--chzm-navy); color: #fff; }
.public-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; text-decoration: none; }
.public-brand-mark { min-width: 62px; height: 40px; display: grid; place-items: center; background: var(--chzm-blue); letter-spacing: .08em; }
.public-brand small { display: block; color: #bdcad9; font-size: 11px; font-weight: 500; }
.public-main { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.dashboard-heading { align-items: flex-start; }
.leader-dashboard-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 430px)); gap: 14px; margin-bottom: 16px; }
.leader-savings-widget { min-height: 178px; display: grid; align-content: space-between; gap: 13px; padding: 17px 18px; overflow: hidden; position: relative; border: 1px solid #a9dbc1; border-radius: 16px; background: linear-gradient(145deg, #f8fffb 0%, #e7f7ef 100%); box-shadow: 0 10px 26px rgba(10, 111, 71, .08); color: inherit; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.leader-savings-widget::before { content: ""; width: 150px; height: 150px; position: absolute; right: -58px; top: -68px; border-radius: 50%; background: radial-gradient(circle, rgba(17, 151, 94, .16), rgba(17, 151, 94, 0) 70%); pointer-events: none; }
.leader-savings-widget:hover { border-color: #65bd91; box-shadow: 0 14px 32px rgba(10, 111, 71, .13); transform: translateY(-2px); }
.leader-savings-widget-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; position: relative; z-index: 1; }
.leader-agent-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #087a4b; color: #fff; box-shadow: 0 5px 13px rgba(8, 122, 75, .18); }
.leader-agent-mark i { font-size: 11px; font-style: normal; font-weight: 900; letter-spacing: .04em; }
.leader-savings-widget-top > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.leader-savings-widget-top strong { color: #174333; font-size: 12px; }
.leader-savings-widget-top small { color: #678174; font-size: 11px; }
.leader-savings-widget-top > b { color: #3d765f; font-size: 14px; }
.leader-savings-value { display: grid; gap: 3px; position: relative; z-index: 1; }
.leader-savings-value span { color: #567566; font-size: 11px; font-weight: 800; }
.leader-savings-value strong { color: #087a4b; font-size: clamp(29px, 3vw, 38px); line-height: 1; letter-spacing: -.04em; }
.leader-savings-widget footer { display: flex; justify-content: space-between; gap: 10px; position: relative; z-index: 1; color: #678174; font-size: 11px; }
.leader-savings-widget footer span { font-weight: 800; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.metric-card { min-height: 118px; padding: 17px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.metric-card::after { content: ""; width: 64px; height: 64px; position: absolute; right: -18px; top: -18px; border-radius: 50%; background: var(--blue-soft); opacity: .85; }
.metric-card.critical::after { background: var(--red-soft); }
.metric-card.warning::after { background: var(--amber-soft); }
.metric-card.success::after { background: var(--green-soft); }
.metric-card > span { display: block; color: var(--muted); font-size: 13px; }
.metric-card > strong { display: block; margin-top: 8px; font-size: 27px; line-height: 1.05; letter-spacing: -.035em; }
.metric-card > small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.section-heading { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading span { color: var(--muted); font-size: 12px; }
.attention-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.attention-row { min-height: 72px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover { background: #fbfcfe; }
.attention-bar { width: 4px; height: 38px; border-radius: 999px; background: var(--chzm-blue); }
.attention-bar.critical { background: var(--chzm-red); }
.attention-bar.warning { background: #d18a26; }
.attention-copy strong { display: block; font-size: 14px; }
.attention-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.attention-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { min-height: 25px; display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-pill.critical { background: var(--red-soft); color: #a52d34; }
.status-pill.warning { background: var(--amber-soft); color: #8d5710; }
.dashboard-empty { padding: 24px; }
.dashboard-empty p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-note { margin-top: 24px; padding: 13px 15px; border: 1px dashed #b6c4d6; border-radius: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 1180px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .user-copy { display: none; }
}

@media (max-width: 820px) {
  :root { --topbar-height: 62px; }
  .app-sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .nav-open .app-sidebar { transform: translateX(0); }
  .nav-open { overflow: hidden; }
  .sidebar-backdrop { display: block; position: fixed; z-index: 35; inset: 0; border: 0; background: rgba(11,26,45,.34); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
  .nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .app-topbar { left: 0; padding: 0 14px; }
  .topbar-icon.menu-toggle { display: grid; }
  .app-main { margin-left: 0; }
  .page-shell { padding: 18px 14px 88px; }
  .global-search { width: auto; flex: 1; }
  .global-search input::placeholder { color: transparent; }
  .account-switcher > summary { width: 170px; }
  .role-context { max-width: 170px; }
  .switcher-popover, .user-popover { position: fixed; top: 62px; right: 14px; }
  .authenticated-app .page-heading { display: block; }
  .authenticated-app .page-heading-actions { margin-top: 14px; }
  .authenticated-app .button { min-height: 44px; }
  .authenticated-app .button-small { min-height: 38px; }
  .impersonation-banner { align-items: stretch; flex-direction: column; padding: 10px 14px; }
  .impersonation-banner .button { width: 100%; }
  .attention-row { grid-template-columns: 6px minmax(0,1fr); }
  .attention-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .leader-dashboard-widgets { grid-template-columns: 1fr; }
  .leader-savings-widget { min-height: 170px; }
  .leader-savings-widget footer { display: grid; }
  .global-search, .topbar-spacer, .notification-button { display: none; }
  .account-switcher { min-width: 0; flex: 1; }
  .account-switcher > summary { width: 100%; }
  .role-context { min-width: 0; max-width: none; flex: 1; font-size: 12px; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .authenticated-app .page-heading h1, .authenticated-app .project-hero h1 { font-size: 25px; }
  .public-header { padding-inline: 16px; }
  .public-brand > span:last-child { display: none; }
  .public-brand-mark { min-width: 52px; }
  .section-heading { align-items: baseline; justify-content: space-between; }
}

/* Lightweight CHZM UI primitives adapted for the server-rendered interface. */
.authenticated-app .button,
.authenticated-app .topbar-icon,
.authenticated-app .account-switcher > summary,
.authenticated-app .user-menu > summary,
.authenticated-app .switcher-option,
.authenticated-app .switcher-return {
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

@media (hover: hover) {
  .authenticated-app .button:not(:disabled):hover { transform: translateY(-1px); }
  .authenticated-app .button-primary:not(:disabled):hover { box-shadow: 0 7px 18px rgba(36, 104, 216, .22); }
  .authenticated-app .topbar-icon:not(:disabled):hover,
  .authenticated-app .account-switcher > summary:hover,
  .authenticated-app .user-menu > summary:hover { border-color: #bfd0e5; background: #f7f9fc; }
}

.authenticated-app .button:not(:disabled):active,
.authenticated-app .topbar-icon:not(:disabled):active,
.authenticated-app .account-switcher > summary:active,
.authenticated-app .user-menu > summary:active { transform: translateY(1px) scale(.99); }

.account-switcher[open] > summary { border-color: #9ebbe2; box-shadow: 0 0 0 3px #edf4ff; }
.account-switcher[open] > summary::after { transform: translateY(-42%) rotate(180deg); }
.app-topbar details[open] .switcher-popover,
.app-topbar details[open] .user-popover { animation: ui-popover-in .16s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top right; }

@keyframes ui-popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog[open] { animation: ui-dialog-in .18s cubic-bezier(.2, .8, .2, 1) both; }
.dialog[open]::backdrop { animation: ui-backdrop-in .18s ease-out both; }

@keyframes ui-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ui-backdrop-in {
  from { background: rgba(18, 27, 47, 0); }
  to { background: rgba(18, 27, 47, .64); }
}

.message { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid #c8dcf4; border-left-width: 4px; box-shadow: 0 10px 28px rgba(30, 54, 82, .1); animation: ui-message-in .2s cubic-bezier(.2, .8, .2, 1) both; }
.message > span { min-width: 0; padding-top: 1px; }
.message-success { border-color: #b9dfcc; border-left-color: var(--chzm-green); }
.message-error { border-color: #efc5c8; border-left-color: var(--chzm-red); }
.message-close { width: 44px; height: 44px; display: grid; flex: 0 0 auto; place-items: center; margin: -10px -10px -10px 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #526176; cursor: pointer; font-size: 21px; line-height: 1; }
.message-close:hover { background: rgba(16, 47, 83, .08); color: var(--ink); }
.message-closing { opacity: 0; transform: translateX(10px); transition: opacity .18s ease, transform .18s ease; }

.authenticated-app .toast-stack { width: min(390px, calc(100vw - 28px)); margin: 0; position: fixed; z-index: 110; top: calc(var(--topbar-height) + 14px); right: 20px; }

@keyframes ui-message-in {
  from { opacity: 0; transform: translateY(-6px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ui-tooltip { max-width: min(260px, calc(100vw - 16px)); padding: 7px 9px; position: fixed; z-index: 200; border: 1px solid rgba(255,255,255,.11); border-radius: 7px; background: #102f53; color: #fff; box-shadow: 0 8px 24px rgba(10, 28, 50, .24); opacity: 0; pointer-events: none; font-size: 11px; font-weight: 650; line-height: 1.35; transform: translateY(2px) scale(.98); transition: opacity .12s ease, transform .12s ease; }
.ui-tooltip-visible { opacity: 1; transform: translateY(0) scale(1); }
.ui-tooltip::after { content: ""; width: 7px; height: 7px; position: absolute; left: 50%; background: #102f53; transform: translateX(-50%) rotate(45deg); }
.ui-tooltip[data-side="top"]::after { bottom: -4px; }
.ui-tooltip[data-side="bottom"]::after { top: -4px; }

.catalog-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.catalog-stat { min-height: 82px; display: grid; align-content: center; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.catalog-stat span { color: var(--muted); font-size: 12px; }
.catalog-stat strong { color: var(--chzm-navy); font-size: 24px; line-height: 1.1; }
.catalog-code { width: fit-content; margin-bottom: 3px; color: var(--chzm-blue-dark) !important; font-size: 10px !important; font-weight: 850; letter-spacing: .06em; }
.nomenclature-row small { margin-top: 3px; }
.directory-disclosure { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.directory-disclosure > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: #f3f6f9; color: var(--chzm-blue-dark); cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; }
.directory-disclosure > summary::-webkit-details-marker { display: none; }
.directory-disclosure > summary::after { content: "+"; font-size: 19px; font-weight: 500; }
.directory-disclosure[open] > summary::after { content: "−"; }
.directory-disclosure > form { margin-top: 12px; }

@media (max-width: 820px) {
  .authenticated-app .toast-stack { right: 14px; }
  .catalog-summary { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .catalog-filter { grid-template-columns: minmax(260px, 1fr) minmax(170px, .42fr) minmax(140px, .3fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .app-topbar details[open] .switcher-popover,
  .app-topbar details[open] .user-popover,
  .dialog[open],
  .dialog[open]::backdrop,
  .message { animation: none; }
}

/* Keep P04 layout rules after the compact application-shell overrides above. */
@media (min-width: 821px) {
  .request-page-heading, .request-detail-hero { flex-direction: row; }
}

@media (min-width: 1000px) {
  .filter-bar.request-filter { grid-template-columns: minmax(260px, 1fr) minmax(220px, .75fr) minmax(170px, .45fr) auto; }
}

@media (max-width: 820px) {
  .sticky-form-actions.request-form-actions { display: grid; grid-template-columns: minmax(100px, .45fr) minmax(0, 1fr); }
}

/* P05 · Проверка кладовщиком и нормализация заявки */
.request-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.request-summary-card { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.request-summary-card::after { content: ""; width: 48px; height: 48px; position: absolute; right: -19px; top: -19px; border-radius: 50%; background: var(--blue-soft); }
.request-summary-card span { color: var(--muted); font-size: 12px; }
.request-summary-card strong { color: var(--chzm-navy); font-size: 24px; }
.request-summary-card.summary-clarification::after { background: var(--amber-soft); }
.request-summary-card.summary-ready::after { background: var(--green-soft); }
.request-summary-card.summary-rejected::after { background: var(--red-soft); }

.request-state-notice { margin-bottom: 16px; }
.request-rejected-notice { border-color: #df858b; background: var(--red-soft); color: #8e252c; }
.request-project-corrected { margin-top: 6px; padding: 9px !important; border: 1px solid #d9aa4d !important; border-radius: 8px; background: #fff8e7; }
.warehouse-action-card, .clarification-editor, .approved-positions-card, .clarification-history-card, .request-timeline-card { margin-top: 16px; }
.warehouse-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.warehouse-action-tile { min-height: 116px; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 3px 12px; align-content: center; padding: 17px; border: 1px solid #bfd3eb; border-radius: 11px; background: #f6faff; color: var(--ink); text-decoration: none; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.warehouse-action-tile > span { width: 38px; height: 38px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 19px; font-weight: 850; }
.warehouse-action-tile strong { font-size: 14px; }
.warehouse-action-tile small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.warehouse-action-tile:hover { border-color: #76a8df; box-shadow: 0 9px 24px rgba(20, 66, 119, .09); transform: translateY(-1px); }
.warehouse-action-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.warehouse-action-split > span { background: var(--green-soft); color: var(--chzm-green); }
.warehouse-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.decision-disclosure { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.decision-disclosure > summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; color: var(--chzm-navy); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; }
.decision-disclosure > summary::-webkit-details-marker { display: none; }
.decision-disclosure > summary::after { content: "+"; color: var(--muted); font-size: 19px; }
.decision-disclosure[open] > summary::after { content: "−"; }
.decision-disclosure form { padding: 0 13px 13px; }
.decision-reject { border-color: #ecc6c8; }
.clarification-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.approved-position-list { overflow: hidden; margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; }
.approved-position-row { min-height: 78px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 13px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.approved-position-row:last-child { border-bottom: 0; }
.approved-position-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 11px; font-weight: 900; }
.approved-position-row > div { min-width: 0; display: grid; gap: 2px; }
.approved-position-row > div strong { overflow-wrap: anywhere; font-size: 13px; }
.approved-position-row > div small { color: var(--muted); font-size: 11px; }
.approved-position-quantity { font-size: 14px; white-space: nowrap; }

.clarification-list { display: grid; gap: 10px; margin-top: 15px; }
.clarification-entry { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; font-size: 13px; line-height: 1.55; }
.clarification-entry header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.clarification-entry time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.clarification-photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.clarification-photo-strip a { width: 112px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; }
.clarification-photo-strip img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.clarification-photo-strip span { display: block; padding: 5px 7px; font-size: 10px; font-weight: 750; }

.request-timeline { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.request-timeline-item { min-height: 65px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; position: relative; }
.request-timeline-item::before { content: ""; width: 2px; position: absolute; left: 6px; top: 15px; bottom: -5px; background: #dce5ef; }
.request-timeline-item:last-child::before { display: none; }
.timeline-dot { width: 14px; height: 14px; margin-top: 2px; position: relative; z-index: 1; border: 3px solid #fff; border-radius: 50%; background: var(--chzm-blue); box-shadow: 0 0 0 1px #a9bfd7; }
.timeline-returned .timeline-dot, .timeline-project_changed .timeline-dot { background: #d89421; }
.timeline-rejected .timeline-dot { background: var(--chzm-red); }
.timeline-ready_for_purchase .timeline-dot { background: var(--chzm-green); }
.request-timeline-item strong { display: block; font-size: 13px; }
.request-timeline-item p, .request-timeline-item small { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.request-timeline-item blockquote { margin: 7px 0 12px; padding: 9px 11px; border-left: 3px solid #d39a37; border-radius: 0 7px 7px 0; background: #fff8e8; color: #4c3a17; font-size: 12px; }

.processing-heading { margin-bottom: 14px !important; }
.processing-heading .back-link { display: block; width: fit-content; margin-bottom: 14px; color: var(--chzm-blue-dark); font-size: 12px; font-weight: 750; text-decoration: none; }
.processing-mode-switch { width: fit-content; display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #e9eef5; }
.processing-mode-switch a { min-height: 38px; display: flex; align-items: center; padding: 7px 13px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: none; }
.processing-mode-switch a.active { background: #fff; color: var(--chzm-navy); box-shadow: 0 2px 8px rgba(20, 40, 70, .09); }
.processing-source-preview { margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid var(--chzm-blue); border-radius: 8px; background: #eef5fd; }
.processing-source-preview > span { display: block; color: var(--chzm-blue-dark); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.processing-source-preview > strong { display: block; margin-top: 4px; font-size: 12px; }
.processing-source-preview p { max-height: 120px; margin: 6px 0 0; overflow: auto; color: #41536a; font-size: 13px; line-height: 1.5; }
.processing-form { max-width: 1250px; }
.processing-project-grid { display: grid; grid-template-columns: minmax(240px, .42fr) minmax(0, 1fr); gap: 15px; }
.processing-position-heading { align-items: center; }
.processing-position-heading .button { margin-left: auto; }
.position-editor-list { display: grid; gap: 10px; }
.position-editor-row { display: grid; grid-template-columns: 62px minmax(250px, 1.15fr) minmax(150px, .55fr) minmax(210px, .75fr) 32px; gap: 12px; align-items: start; padding: 14px; position: relative; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.position-editor-row[hidden] { display: none; }
.position-editor-index { grid-row: 1 / 4; display: grid; align-content: start; gap: 2px; padding-top: 23px; }
.position-editor-index span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.position-editor-index strong { color: var(--chzm-blue-dark); font-size: 20px; }
.position-editor-row .field label { min-height: 18px; display: flex; align-items: flex-end; }
.position-nomenclature { grid-column: 2; }
.position-quantity { grid-column: 3; }
.position-resolution { grid-column: 4; }
.position-stock-availability { grid-column: 2 / 5; padding: 9px 11px; border: 1px solid #cbdcf0; border-radius: 8px; background: #eef5fd; color: #405a76; font-size: 11px; line-height: 1.4; }
.position-purchase-quantity { grid-column: 2; }
.position-stock-scope { grid-column: 3; }
.position-note { grid-column: 4; }
.position-editor-row > .position-remove { grid-column: 5; grid-row: 1; }
.position-delete-field { display: none; }
.position-remove { width: 32px; height: 32px; margin-top: 21px; display: grid; place-items: center; border: 1px solid #e3b8ba; border-radius: 8px; background: #fff; color: var(--chzm-red); cursor: pointer; font-size: 20px; }
.inline-nomenclature { margin: 0; padding: 0 !important; overflow: hidden; }
.inline-nomenclature > summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; list-style: none; }
.inline-nomenclature > summary::-webkit-details-marker { display: none; }
.inline-nomenclature > summary::after { content: "+"; color: var(--chzm-blue-dark); font-size: 23px; }
.inline-nomenclature[open] > summary::after { content: "−"; }
.inline-nomenclature > summary span { display: grid; gap: 2px; }
.inline-nomenclature > summary strong { font-size: 13px; }
.inline-nomenclature > summary small { color: var(--muted); font-size: 11px; }
.inline-nomenclature-body { padding: 15px 18px 18px; border-top: 1px solid var(--line); background: #f9fbfd; }
.inline-nomenclature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inline-category-create-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inline-category-create-control .button { min-height: 42px; white-space: nowrap; }
.inline-create-item-button { margin-top: 13px; }
.inline-nomenclature [aria-invalid="true"] { border-color: #d65b62; box-shadow: 0 0 0 3px rgba(184, 45, 54, .09); }
.inline-result { min-height: 0; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.inline-result:not(:empty) { min-height: 38px; margin-bottom: 10px; padding: 9px 11px; border-radius: 8px; background: #edf3fa; }
.inline-result-success:not(:empty) { background: var(--green-soft); color: #176744; }
.inline-result-error:not(:empty) { background: var(--red-soft); color: #922a31; }
.processing-actions { margin-top: 2px; }

@media (max-width: 1000px) {
  .request-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .position-editor-row { grid-template-columns: 48px minmax(0, 1fr) minmax(170px, .5fr) 32px; }
  .position-nomenclature, .position-resolution, .position-stock-availability, .position-purchase-quantity, .position-note { grid-column: 2; }
  .position-quantity, .position-stock-scope { grid-column: 3; }
  .position-editor-row > .position-remove { grid-column: 4; }
  .inline-nomenclature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .request-summary { gap: 8px; }
  .request-summary-card { min-height: 68px; display: grid; gap: 2px; padding: 11px 12px; }
  .request-summary-card strong { font-size: 21px; }
  .warehouse-primary-actions, .warehouse-secondary-actions, .clarification-upload-grid, .processing-project-grid { grid-template-columns: 1fr; }
  .warehouse-action-tile { min-height: 104px; }
  .approved-position-row { grid-template-columns: 38px minmax(0, 1fr); gap: 8px 11px; }
  .approved-position-quantity, .approved-position-row > .status-pill { grid-column: 2; justify-self: start; }
  .clarification-entry header { align-items: flex-start; flex-direction: column; gap: 2px; }
  .processing-mode-switch { width: 100%; }
  .processing-mode-switch a { flex: 1; justify-content: center; }
  .processing-position-heading { flex-wrap: wrap; }
  .processing-position-heading .button { width: 100%; margin: 7px 0 0 46px; }
  .position-editor-row { grid-template-columns: 42px minmax(0, 1fr) 32px; gap: 9px; padding: 12px 10px; }
  .position-editor-index { grid-row: 1 / 8; padding-top: 23px; }
  .position-nomenclature, .position-quantity, .position-resolution, .position-stock-availability, .position-purchase-quantity, .position-stock-scope, .position-note { grid-column: 2; }
  .position-remove { grid-column: 3; grid-row: 1; }
  .inline-nomenclature-grid { grid-template-columns: 1fr; }
  .inline-category-create-control { grid-template-columns: 1fr; }
  .inline-category-create-control .button, .inline-create-item-button { width: 100%; }
  .processing-actions { display: grid; grid-template-columns: minmax(92px, .4fr) minmax(0, 1fr); }
}

/* P06 · Рабочее место закупщика хозтоваров */
.request-status-purchase_in_progress, .position-status-partially_purchased { background: var(--amber-soft); color: #87530f; }
.request-status-awaiting_warehouse, .position-status-awaiting_warehouse { background: var(--green-soft); color: #176b46; }
.request-awaiting-notice { border-color: #87c7a6; background: var(--green-soft); color: #165f40; }
.approved-position-progress { margin-top: 4px; color: var(--chzm-blue-dark) !important; font-weight: 750; }
.timeline-purchase_recorded .timeline-dot { background: var(--chzm-green); }
.timeline-purchase_deferred .timeline-dot { background: #d89421; }
.summary-progress::after { background: var(--amber-soft); }
.summary-awaiting::after { background: var(--green-soft); }

.buyer-heading { margin-bottom: 18px !important; }
.buyer-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.buyer-stat { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.buyer-stat::after { content: ""; width: 52px; height: 52px; position: absolute; right: -18px; top: -18px; border-radius: 50%; background: var(--blue-soft); }
.buyer-stat span { color: var(--muted); font-size: 12px; }
.buyer-stat strong { color: var(--chzm-navy); font-size: 25px; }
.buyer-stat-warning::after { background: var(--amber-soft); }
.buyer-stat-muted::after { background: #eef1f5; }
.buyer-stat-success::after { background: var(--green-soft); }
.buyer-filter { grid-template-columns: minmax(240px, 1fr) auto; align-items: end; margin-bottom: 8px; }
.buyer-queue-section { margin-top: 20px; }
.buyer-section-heading { justify-content: space-between; margin-bottom: 10px; }
.buyer-section-heading > div { display: flex; align-items: center; gap: 9px; }
.buyer-priority-dot, .buyer-today-dot, .buyer-complete-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #d58a1d; box-shadow: 0 0 0 4px var(--amber-soft); }
.buyer-today-dot { background: var(--chzm-blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.buyer-complete-dot { background: var(--chzm-green); box-shadow: 0 0 0 4px var(--green-soft); }
.buyer-position-list { display: grid; gap: 10px; }
.buyer-position-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(19, 48, 81, .045); }
.buyer-position-card:hover { border-color: #c2d2e5; }
.buyer-position-partially_purchased { border-left: 4px solid #dc941f; }
.buyer-position-awaiting_warehouse { border-left: 4px solid var(--chzm-green); }
.buyer-position-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.buyer-position-header > div { min-width: 0; display: grid; gap: 2px; }
.buyer-position-header > div > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.buyer-position-code { width: fit-content; color: var(--chzm-blue-dark); font-size: 13px; font-weight: 850; text-decoration: none; }
.buyer-position-code:hover { text-decoration: underline; }
.buyer-position-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .42fr); gap: 18px; padding: 15px; }
.buyer-position-main { min-width: 0; }
.buyer-position-main h3 { margin: 2px 0 4px; color: var(--chzm-navy); font-size: 17px; overflow-wrap: anywhere; }
.buyer-position-main > p { margin: 0; color: var(--muted); font-size: 11px; }
.buyer-position-project { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 11px; font-size: 11px; }
.buyer-position-project span { color: var(--muted); }
.buyer-position-project a { color: var(--chzm-blue-dark); font-weight: 750; }
.buyer-quantity-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.buyer-quantity-panel > div { display: grid; align-content: center; gap: 3px; padding: 10px; border-right: 1px solid var(--line); }
.buyer-quantity-panel > div:last-child { border-right: 0; }
.buyer-quantity-panel dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.buyer-quantity-panel dd { margin: 0; color: var(--chzm-navy); font-size: 13px; font-weight: 850; white-space: nowrap; }
.buyer-remaining { background: #f2f7fd; }
.buyer-deferral-note { display: grid; gap: 2px; margin: 0 15px 13px; padding: 9px 11px; border-left: 3px solid #d89224; border-radius: 0 7px 7px 0; background: #fff8e8; font-size: 11px; }
.buyer-deferral-note span { color: #6a552c; }
.buyer-card-actions { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 9px; padding: 0 15px 15px; }
.buyer-action-disclosure { border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.buyer-action-disclosure > summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; cursor: pointer; font-size: 12px; font-weight: 850; list-style: none; }
.buyer-action-disclosure > summary::-webkit-details-marker { display: none; }
.buyer-action-disclosure > summary::after { content: "+"; color: var(--muted); font-size: 18px; }
.buyer-action-disclosure[open] > summary::after { content: "−"; }
.buyer-buy-disclosure { border-color: #9dcdb5; }
.buyer-buy-disclosure > summary { color: #176944; background: #f2faf6; }
.buyer-defer-disclosure > summary { color: #7b5213; background: #fffaf0; }
.buyer-action-disclosure > form { padding: 12px; border-top: 1px solid var(--line); }
.buyer-purchase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.buyer-purchase-grid + .button { margin-top: 11px; }
.buyer-action-disclosure input[type="file"] { min-height: 42px; padding: 8px; background: #fff; font-size: 11px; }
.buyer-history { margin: 0 15px 15px; border-top: 1px solid var(--line); }
.buyer-history > summary { min-height: 42px; display: flex; align-items: center; color: var(--chzm-blue-dark); cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.buyer-history > summary::-webkit-details-marker { display: none; }
.buyer-history-list { display: grid; gap: 7px; padding-bottom: 2px; }
.buyer-history-list > article { padding: 10px 11px; border-radius: 8px; background: #f6f8fb; }
.buyer-history-list > article > div:first-child { display: flex; align-items: center; gap: 10px; }
.buyer-history-list > article > div:first-child span { color: var(--chzm-green); font-size: 12px; font-weight: 800; }
.buyer-history-list p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.buyer-receipt-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.buyer-receipt-strip a { width: 90px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); text-decoration: none; }
.buyer-receipt-strip img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.buyer-receipt-strip span { display: block; padding: 4px 6px; font-size: 9px; font-weight: 750; }
.buyer-completed-section { margin-top: 28px; padding-top: 3px; border-top: 1px solid var(--line); }
.buyer-completed-list { opacity: .92; }
.buyer-section-empty { padding: 17px; border: 1px dashed #b9c7d7; border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.buyer-empty { margin-top: 20px; }

@media (max-width: 1000px) {
  .buyer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .buyer-position-body { grid-template-columns: 1fr; }
  .buyer-card-actions { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .buyer-summary { gap: 8px; }
  .buyer-stat { min-height: 68px; display: grid; gap: 2px; padding: 11px 12px; }
  .buyer-stat strong { font-size: 21px; }
  .buyer-filter { grid-template-columns: 1fr; }
  .buyer-position-header { align-items: flex-start; flex-direction: column; }
  .buyer-position-header .status-pill { align-self: flex-start; }
  .buyer-position-body { padding: 13px; }
  .buyer-quantity-panel { grid-template-columns: 1fr; }
  .buyer-quantity-panel > div { min-height: 48px; grid-template-columns: 90px minmax(0, 1fr); align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .buyer-quantity-panel > div:last-child { border-bottom: 0; }
  .buyer-purchase-grid { grid-template-columns: 1fr; }
  .buyer-card-actions { padding-inline: 13px; }
  .buyer-deferral-note, .buyer-discrepancy-note, .buyer-history { margin-inline: 13px; }
}

/* P07 · Фактическая приёмка и первый складской приход */
.request-status-received, .position-status-received { background: #dff4e8; color: #12613e; }
.request-status-awaiting_issue, .request-status-partially_issued { background: var(--amber-soft); color: #87530f; }
.request-status-fulfilled { background: var(--green-soft); color: #176b46; }
.position-status-returned_to_buyer { background: var(--red-soft); color: #a32e35; }
.request-received-notice { border-color: #79bf9a; background: #eaf8f0; color: #145f3e; }
.request-discrepancy-notice { border-color: #e6a1a6; background: var(--red-soft); color: #8f292f; }
.timeline-warehouse_received .timeline-dot { background: var(--chzm-green); }
.timeline-warehouse_discrepancy .timeline-dot { background: var(--chzm-red); }
.summary-received::after { background: var(--green-soft); }

.buyer-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.buyer-stat-danger::after { background: var(--red-soft); }
.buyer-position-returned_to_buyer { border-left: 4px solid var(--chzm-red); }
.buyer-discrepancy-note { display: grid; gap: 3px; margin: 0 15px 13px; padding: 10px 12px; border-left: 3px solid var(--chzm-red); border-radius: 0 8px 8px 0; background: var(--red-soft); color: #84272d; font-size: 11px; }
.buyer-discrepancy-note strong { font-size: 12px; }
.buyer-warehouse-history { margin-top: -8px; }
.buyer-history-list .history-discrepancy { background: var(--red-soft); }
.buyer-history-list .history-discrepancy > div:first-child span { color: #9b3036; }

.warehouse-receiving-heading { margin-bottom: 18px !important; }
.warehouse-receiving-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.warehouse-receiving-stat { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.warehouse-receiving-stat::after { content: ""; width: 52px; height: 52px; position: absolute; right: -18px; top: -18px; border-radius: 50%; background: var(--blue-soft); }
.warehouse-receiving-stat span { color: var(--muted); font-size: 12px; }
.warehouse-receiving-stat strong { color: var(--chzm-navy); font-size: 25px; }
.warehouse-receiving-stat > span, .warehouse-receiving-stat > strong, .buyer-stat > span, .buyer-stat > strong, .request-summary-card > span, .request-summary-card > strong { position: relative; z-index: 1; }
.warehouse-receiving-stat.stat-discrepancy::after { background: var(--red-soft); }
.warehouse-receiving-stat.stat-received::after { background: var(--green-soft); }
.warehouse-receiving-filter { grid-template-columns: minmax(240px, 1fr) auto; align-items: end; margin-bottom: 8px; }
.warehouse-receiving-section { margin-top: 22px; }
.warehouse-receiving-section-heading { justify-content: space-between; margin-bottom: 10px; }
.warehouse-receiving-section-heading > div { display: flex; align-items: center; gap: 9px; }
.warehouse-receiving-dot, .warehouse-discrepancy-dot, .warehouse-received-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--chzm-blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.warehouse-review-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #d88919; box-shadow: 0 0 0 4px var(--amber-soft); }
.warehouse-discrepancy-dot { background: var(--chzm-red); box-shadow: 0 0 0 4px var(--red-soft); }
.warehouse-received-dot { background: var(--chzm-green); box-shadow: 0 0 0 4px var(--green-soft); }
.warehouse-receiving-list { display: grid; gap: 10px; }
.warehouse-review-list { display: grid; gap: 9px; }
.warehouse-review-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 15px; border: 1px solid #dfc796; border-radius: 13px; background: linear-gradient(135deg, #fffdf8 0%, #fff 68%); box-shadow: 0 6px 18px rgba(126, 83, 14, .055); }
.warehouse-review-main { min-width: 0; display: grid; gap: 3px; color: inherit; text-decoration: none; }
.warehouse-review-main:hover > .warehouse-review-title { color: var(--chzm-blue-dark); }
.warehouse-review-code { color: #9a6012; font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.warehouse-review-title { display: -webkit-box; overflow: hidden; color: var(--chzm-navy); font-size: 15px; font-weight: 850; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.warehouse-review-project { overflow: hidden; color: #64758a; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.warehouse-review-main > small { color: var(--muted); font-size: 9px; }
.warehouse-review-actions { display: flex; align-items: center; gap: 7px; }
.warehouse-review-actions .button { min-height: 38px; padding-inline: 14px; white-space: nowrap; }
.warehouse-receiving-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(19, 48, 81, .045); }
.warehouse-receiving-returned_to_buyer { border-left: 4px solid var(--chzm-red); }
.warehouse-receiving-received { border-left: 4px solid var(--chzm-green); }
.warehouse-receiving-card-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.warehouse-receiving-card-header > div { min-width: 0; display: grid; gap: 2px; }
.warehouse-receiving-card-header a { width: fit-content; color: var(--chzm-blue-dark); font-size: 13px; font-weight: 850; text-decoration: none; }
.warehouse-receiving-card-header a:hover { text-decoration: underline; }
.warehouse-receiving-card-header div > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.warehouse-receiving-card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .5fr); gap: 18px; padding: 15px; }
.warehouse-receiving-item { min-width: 0; }
.warehouse-receiving-item h3 { margin: 2px 0 4px; color: var(--chzm-navy); font-size: 17px; overflow-wrap: anywhere; }
.warehouse-receiving-item > p { margin: 0; color: var(--muted); font-size: 11px; }
.warehouse-receiving-item > div { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 11px; font-size: 11px; }
.warehouse-receiving-item > div span { color: var(--muted); }
.warehouse-receiving-item > div a { color: var(--chzm-blue-dark); font-weight: 750; }
.warehouse-receiving-quantities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.warehouse-receiving-quantities > div { display: grid; align-content: center; gap: 3px; padding: 10px; border-right: 1px solid var(--line); }
.warehouse-receiving-quantities > div:last-child { border-right: 0; }
.warehouse-receiving-quantities dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.warehouse-receiving-quantities dd { margin: 0; color: var(--chzm-navy); font-size: 13px; font-weight: 850; white-space: nowrap; }
.warehouse-pending-quantity { background: #f2f7fd; }
.warehouse-receiving-form { display: grid; grid-template-columns: minmax(170px, .35fr) minmax(260px, 1fr) auto; gap: 12px; align-items: start; margin: 0 15px 15px; padding: 14px; border: 1px solid #9fc7ad; border-radius: 10px; background: #f4fbf7; }
.warehouse-receiving-form textarea { min-height: 68px !important; }
.warehouse-receiving-form .button { min-width: 180px; align-self: end; }
.warehouse-discrepancy-alert { display: grid; gap: 3px; margin: 0 15px 15px; padding: 11px 12px; border-left: 3px solid var(--chzm-red); border-radius: 0 8px 8px 0; background: var(--red-soft); color: #84272d; font-size: 11px; }
.warehouse-discrepancy-alert strong { font-size: 13px; }
.warehouse-receiving-history-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 15px 15px; border-top: 1px solid var(--line); }
.warehouse-receiving-history { min-width: 220px; flex: 1; }
.warehouse-receiving-history > summary { min-height: 42px; display: flex; align-items: center; color: var(--chzm-blue-dark); cursor: pointer; font-size: 11px; font-weight: 800; list-style: none; }
.warehouse-receiving-history > summary::-webkit-details-marker { display: none; }
.warehouse-receiving-history > div { display: grid; gap: 7px; padding-bottom: 3px; }
.warehouse-receiving-history article { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; background: #f6f8fb; }
.warehouse-receiving-history article.history-discrepancy { background: var(--red-soft); }
.warehouse-receiving-history article strong { font-size: 11px; }
.warehouse-receiving-history article > span { color: var(--muted); font-size: 10px; }
.warehouse-received-section { margin-top: 28px; padding-top: 3px; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .buyer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-receiving-card-body { grid-template-columns: 1fr; }
  .warehouse-receiving-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-receiving-form .button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .warehouse-receiving-summary { gap: 8px; grid-template-columns: 1fr; }
  .warehouse-receiving-stat { min-height: 64px; padding: 10px 12px; }
  .warehouse-receiving-stat strong { font-size: 21px; }
  .warehouse-receiving-filter, .warehouse-receiving-form { grid-template-columns: 1fr; }
  .warehouse-receiving-card-header { align-items: flex-start; flex-direction: column; }
  .warehouse-receiving-card-header .status-pill { align-self: flex-start; }
  .warehouse-receiving-card-body { padding: 13px; }
  .warehouse-receiving-quantities { grid-template-columns: 1fr; }
  .warehouse-receiving-quantities > div { min-height: 48px; grid-template-columns: 100px minmax(0, 1fr); align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .warehouse-receiving-quantities > div:last-child { border-bottom: 0; }
  .warehouse-receiving-form, .warehouse-discrepancy-alert, .warehouse-receiving-history-row { margin-inline: 13px; }
  .warehouse-receiving-form .button { width: 100%; }
  .warehouse-review-card { grid-template-columns: 1fr; }
  .warehouse-review-actions { display: grid; grid-template-columns: 1fr; }
  .warehouse-review-actions .button { width: 100%; }
}

/* P08 · Журнал и вычисляемые остатки склада */
.detail-back { margin: 0 0 12px; }
.detail-back a { color: var(--chzm-blue-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.detail-back a:hover { text-decoration: underline; }
.button-link { border-color: transparent; background: transparent; color: var(--chzm-blue-dark); }
.stock-page-heading { align-items: flex-end; margin-bottom: 18px !important; }
.stock-page-heading .button { flex: 0 0 auto; }
.stock-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stock-stat { min-height: 82px; display: grid; align-content: center; gap: 4px; padding: 14px 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stock-stat::after { content: ""; width: 56px; height: 56px; position: absolute; top: -20px; right: -18px; border-radius: 50%; background: var(--blue-soft); }
.stock-stat-projects::after { background: #edf1fb; }
.stock-stat-movements::after { background: var(--green-soft); }
.stock-stat-latest::after { background: #fff3dc; }
.stock-stat span, .stock-stat strong { position: relative; z-index: 1; }
.stock-stat span { color: var(--muted); font-size: 11px; }
.stock-stat strong { color: var(--chzm-navy); font-size: 23px; line-height: 1.1; }
.stock-stat-latest strong { font-size: 17px; }
.stock-filter { grid-template-columns: minmax(260px, 1fr) auto auto; align-items: end; }
.stock-list-heading { justify-content: space-between; }
.stock-list { display: grid; gap: 11px; }
.stock-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(19, 48, 81, .045); }
.stock-card-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px; }
.stock-card-main > div { min-width: 0; }
.stock-card-main h2 { margin: 3px 0 4px; color: var(--chzm-navy); font-size: 17px; overflow-wrap: anywhere; }
.stock-card-main p { margin: 0; color: var(--muted); font-size: 11px; }
.stock-total { min-width: 190px; margin: 0; padding-left: 20px; border-left: 1px solid var(--line); text-align: right; }
.stock-total dt { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.stock-total dd { margin: 3px 0 0; color: var(--chzm-green); font-size: 24px; font-weight: 900; white-space: nowrap; }
.stock-total dd small { font-size: 12px; }
.stock-projects { display: grid; border-block: 1px solid var(--line); background: #f8fafc; }
.stock-project-row { min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.stock-project-row:last-child { border-bottom: 0; }
.stock-project-row > a { min-width: 0; display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; }
.stock-project-row > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.stock-project-row > a:hover strong { text-decoration: underline; }
.stock-project-row strong { color: var(--chzm-blue-dark); font-size: 11px; white-space: nowrap; }
.stock-project-row a span, .stock-project-row div span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stock-project-row > span { color: var(--chzm-navy); font-size: 12px; font-weight: 850; white-space: nowrap; }
.stock-general-row { background: #f2faf6; }
.stock-card-footer { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; }
.stock-card-footer > span { color: var(--muted); font-size: 10px; }
.stock-card-footer > div { display: flex; gap: 8px; }
.stock-empty { margin-top: 12px; text-align: center; }

.stock-detail-hero { min-height: 156px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-bottom: 16px; padding: 24px; overflow: hidden; position: relative; border: 1px solid #bfd3eb; border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #f2f7fd 100%); }
.stock-detail-hero::after { content: ""; width: 180px; height: 180px; position: absolute; top: -90px; right: -60px; border-radius: 50%; background: rgba(35, 111, 190, .08); }
.stock-detail-hero > * { position: relative; z-index: 1; }
.stock-detail-hero h1 { margin: 4px 0 7px; color: var(--chzm-navy); font-size: clamp(28px, 4vw, 40px); line-height: 1.08; letter-spacing: -.03em; overflow-wrap: anywhere; }
.stock-detail-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.stock-detail-total { min-width: 230px; display: grid; justify-items: end; gap: 12px; }
.stock-detail-total dl { margin: 0; text-align: right; }
.stock-detail-hero dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.stock-detail-hero dd { margin: 5px 0 0; color: var(--chzm-green); font-size: 31px; font-weight: 900; white-space: nowrap; }
.stock-detail-hero dd small { font-size: 14px; }
.stock-project-breakdown, .stock-ledger { margin-top: 16px; }
.stock-project-breakdown .content-card-heading, .stock-ledger .content-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stock-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stock-project-grid article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.stock-project-grid article > a { min-width: 0; display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.stock-project-grid article > div { min-width: 0; display: grid; gap: 2px; }
.stock-project-grid article > div strong { color: var(--chzm-green); font-size: 12px; }
.stock-project-grid article > div span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stock-project-grid article > a strong { color: var(--chzm-blue-dark); font-size: 12px; }
.stock-project-grid article > a span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stock-project-grid dl { margin: 0; text-align: right; }
.stock-project-grid dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.stock-project-grid dd { margin: 2px 0 0; color: var(--chzm-navy); font-size: 14px; font-weight: 850; white-space: nowrap; }
.stock-project-grid article > small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.stock-ledger-list { display: grid; }
.stock-ledger-list > article { min-height: 76px; display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(220px, .5fr); align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.stock-movement-sign { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--chzm-green); font-size: 18px; font-weight: 900; }
.stock-movement-sign.stock-movement-issue { background: var(--amber-soft); color: #9a5d0c; }
.stock-movement-main { min-width: 0; display: grid; gap: 2px; }
.stock-movement-main strong { color: var(--chzm-navy); font-size: 13px; }
.stock-movement-main a, .stock-movement-source a { width: fit-content; max-width: 100%; overflow: hidden; color: var(--chzm-blue-dark); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.stock-movement-main span, .stock-movement-source span { color: var(--muted); font-size: 9px; }
.stock-movement-source { display: grid; gap: 3px; padding-left: 14px; border-left: 1px solid var(--line); }
.stock-movement-source strong { color: var(--chzm-navy); font-size: 11px; }
.stock-movement-source small { color: var(--muted); font-size: 9px; }
.stock-scope-label { width: fit-content; padding: 3px 7px; border-radius: 999px; background: var(--green-soft); color: #176744 !important; font-weight: 800; }

/* P09 · Общий запас и выдачи сотрудникам */
.issue-create-layout { display: grid; grid-template-columns: minmax(260px, .36fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.issue-item-summary { position: sticky; top: calc(var(--topbar-height) + 18px); }
.issue-item-summary h2 { margin: 7px 0 5px; color: var(--chzm-navy); font-size: 20px; }
.issue-item-summary > p { margin: 0; color: var(--muted); font-size: 12px; }
.issue-item-summary dl { display: grid; gap: 8px; margin: 18px 0 0; }
.issue-item-summary dl > div { display: flex; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.issue-item-summary dt { color: var(--muted); font-size: 11px; }
.issue-item-summary dd { margin: 0; color: var(--chzm-navy); font-size: 12px; font-weight: 850; text-align: right; }
.issue-form-card { max-width: 760px; }
.issue-form-card .content-card-heading { margin-bottom: 17px; }
.issue-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.issue-summary > div { min-height: 76px; display: grid; align-content: center; gap: 4px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.issue-summary span { color: var(--muted); font-size: 11px; }
.issue-summary strong { color: var(--chzm-navy); font-size: 22px; }
.issue-filter { grid-template-columns: minmax(260px, 1fr) auto auto; align-items: end; }
.issue-history-list { display: grid; gap: 10px; }
.issue-history-list > article { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(190px, .42fr); gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.issue-history-quantity { display: grid; justify-items: start; }
.issue-history-quantity strong { color: #a3630c; font-size: 20px; }
.issue-history-quantity span { color: var(--muted); font-size: 10px; }
.issue-history-main, .issue-history-project { min-width: 0; display: grid; gap: 3px; }
.issue-history-main > a { width: fit-content; max-width: 100%; overflow: hidden; color: var(--chzm-blue-dark); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.issue-history-main > strong { color: var(--chzm-navy); font-size: 13px; }
.issue-history-main > span, .issue-history-project > span, .issue-history-project > small { color: var(--muted); font-size: 10px; }
.issue-history-project { padding-left: 14px; border-left: 1px solid var(--line); }
.issue-history-project > a { color: var(--chzm-blue-dark); font-size: 13px; font-weight: 850; }
.issue-history-list > article > p { grid-column: 2 / -1; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.locked-request-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.locked-request-fields > div { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f6f8fb; }
.locked-request-fields span { color: var(--muted); font-size: 10px; }
.locked-request-fields strong { color: var(--chzm-navy); font-size: 12px; }
.stock-need-list { display: grid; gap: 12px; margin-bottom: 20px; }
.stock-need-card { display: grid; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(20, 45, 75, .035); }
.stock-need-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.stock-need-card h3 { margin: 4px 0 2px; color: var(--chzm-navy); font-size: 15px; }
.stock-need-card header p { margin: 0; color: var(--muted); font-size: 10px; }
.stock-need-facts { display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(110px, .7fr)); gap: 8px; }
.stock-need-facts > div, .stock-need-availability > div { display: grid; gap: 3px; padding: 10px 11px; border-radius: 8px; background: #f6f8fb; }
.stock-need-facts span, .stock-need-availability span { color: var(--muted); font-size: 9px; }
.stock-need-facts strong, .stock-need-facts a, .stock-need-availability strong { color: var(--chzm-navy); font-size: 11px; font-weight: 800; }
.stock-need-availability { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stock-need-availability > div:last-child { background: var(--blue-soft); }
.stock-need-note { margin: 0; padding: 9px 11px; border-left: 3px solid var(--chzm-blue); background: #f7faff; color: #40536a; font-size: 11px; }
.stock-need-purchases { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 10px; }
.stock-need-purchases a { color: var(--chzm-blue-dark); font-weight: 750; }
.stock-need-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.stock-need-action-panel { position: relative; }
.stock-need-action-panel > summary { list-style: none; cursor: pointer; }
.stock-need-action-panel > summary::-webkit-details-marker { display: none; }
.stock-need-action-panel > form { width: min(390px, calc(100vw - 48px)); margin-top: 8px; padding: 14px; position: absolute; z-index: 8; left: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 14px 36px rgba(18, 44, 73, .18); }
.completed-stock-needs { margin-bottom: 20px; padding: 0 !important; overflow: hidden; }
.completed-stock-needs > summary { padding: 15px 17px; cursor: pointer; color: var(--chzm-navy); font-size: 12px; font-weight: 800; }
.completed-stock-needs > div { border-top: 1px solid var(--line); }
.completed-stock-needs article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 17px; border-top: 1px solid var(--line); }
.completed-stock-needs article:first-child { border-top: 0; }
.completed-stock-needs article > div { display: grid; gap: 2px; }
.completed-stock-needs article strong { font-size: 11px; }
.completed-stock-needs article span, .completed-stock-needs article p { color: var(--muted); font-size: 10px; }
.completed-stock-needs article p { grid-column: 1 / -1; margin: 2px 0 0; }
.request-status-pending, .request-status-partially_issued { background: var(--amber-soft); color: #87530f; }
.request-status-fulfilled { background: var(--green-soft); color: #176b46; }

@media (max-width: 1000px) {
  .stock-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-project-grid { grid-template-columns: 1fr; }
  .issue-create-layout { grid-template-columns: 1fr; }
  .issue-item-summary { position: static; }
}

@media (max-width: 640px) {
  .stock-page-heading { align-items: stretch; }
  .stock-page-heading .button { width: 100%; }
  .stock-summary { gap: 8px; }
  .stock-stat { min-height: 68px; padding: 11px 12px; }
  .stock-stat strong { font-size: 20px; }
  .stock-stat-latest strong { font-size: 15px; }
  .stock-filter { grid-template-columns: 1fr; }
  .stock-card-main { grid-template-columns: 1fr; gap: 12px; padding: 13px; }
  .stock-total { min-width: 0; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
  .stock-total dd { font-size: 22px; }
  .stock-project-row { align-items: start; gap: 8px; padding-inline: 13px; }
  .stock-project-row > a { display: grid; gap: 2px; }
  .stock-project-row > div { display: grid; gap: 2px; }
  .stock-project-row a span { white-space: normal; }
  .stock-card-footer { align-items: stretch; flex-direction: column; padding: 11px 13px 13px; }
  .stock-card-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .stock-card-footer .button { width: 100%; }
  .stock-detail-hero { min-height: 0; grid-template-columns: 1fr; gap: 18px; padding: 19px; }
  .stock-detail-total { min-width: 0; justify-items: stretch; padding-top: 14px; border-top: 1px solid #bfd3eb; }
  .stock-detail-total dl { text-align: left; }
  .stock-detail-hero dd { font-size: 26px; }
  .stock-project-breakdown, .stock-ledger { padding: 16px !important; }
  .stock-project-grid article { grid-template-columns: 1fr; }
  .stock-project-grid dl { text-align: left; }
  .stock-ledger-list > article { grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px; }
  .stock-movement-source { grid-column: 2; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .issue-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .issue-filter { grid-template-columns: 1fr; }
  .stock-need-card { padding: 13px; }
  .stock-need-card > header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .stock-need-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-need-facts > div:first-child { grid-column: 1 / -1; }
  .stock-need-availability { grid-template-columns: 1fr; }
  .stock-need-actions { display: grid; grid-template-columns: 1fr; }
  .stock-need-actions > .button, .stock-need-action-panel, .stock-need-action-panel > summary { width: 100%; }
  .stock-need-action-panel > form { width: 100%; position: static; box-shadow: none; }
  .locked-request-fields { grid-template-columns: 1fr; }
  .issue-history-list > article { grid-template-columns: 60px minmax(0, 1fr); align-items: start; padding: 13px; }
  .issue-history-project { grid-column: 2; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .issue-history-list > article > p { grid-column: 2; }
}

/* P10 · opening balances and inventory */
.stock-records-heading { align-items: flex-end; }
.stock-records-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stock-records-summary > div { min-height: 78px; display: grid; align-content: center; gap: 4px; padding: 13px 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stock-records-summary > div::after { content: ""; width: 58px; height: 58px; position: absolute; top: -22px; right: -18px; border-radius: 50%; background: var(--amber-soft); }
.stock-records-summary .records-stat-approved::after { background: var(--green-soft); }
.stock-records-summary .records-stat-openings::after { background: var(--blue-soft); }
.stock-records-summary .records-stat-returns::after { background: var(--green-soft); }
.stock-records-summary .records-stat-transfers::after { background: #f0eaff; }
.stock-records-summary span, .stock-records-summary strong { position: relative; z-index: 1; }
.stock-records-summary span { color: var(--muted); font-size: 11px; }
.stock-records-summary strong { color: var(--chzm-navy); font-size: 23px; }
.stock-record-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.stock-record-forms-single { grid-template-columns: minmax(0, 760px); }
.stock-record-form-card { padding: 19px; }
.stock-record-form-card .content-card-heading { margin-bottom: 16px; }
.stock-record-form-card .content-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.stock-record-form-card .form-stack { gap: 12px; }
.stock-source-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.stock-project-field[hidden] { display: none; }
.stock-record-form-card textarea { min-height: 76px; }
.stock-record-form-card .button { width: 100%; min-height: 44px; }
.stock-record-warning { display: grid; gap: 2px; padding: 10px 11px; border-left: 3px solid #d48a22; border-radius: 0 8px 8px 0; background: var(--amber-soft); color: #774a0b; font-size: 11px; }
.stock-record-warning strong { font-size: 11px; }
.stock-record-info { border-left-color: var(--chzm-blue); background: var(--blue-soft); color: var(--chzm-blue-dark); }
.stock-inventory-section, .stock-record-history { margin-top: 24px; }
.stock-records-section-heading { justify-content: space-between; margin-bottom: 10px; }
.stock-records-section-heading > div { display: flex; align-items: center; gap: 9px; }
.stock-inventory-list { display: grid; gap: 10px; }
.stock-inventory-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(19, 48, 81, .045); }
.stock-inventory-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.stock-inventory-card > header > div { min-width: 0; }
.stock-inventory-card h3 { margin: 3px 0; color: var(--chzm-navy); font-size: 15px; overflow-wrap: anywhere; }
.stock-inventory-card header p { margin: 0; color: var(--muted); font-size: 10px; }
.stock-inventory-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stock-inventory-values dl { display: grid; gap: 3px; margin: 0; padding: 13px 16px; border-right: 1px solid var(--line); }
.stock-inventory-values dl:last-child { border-right: 0; }
.stock-inventory-values dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.stock-inventory-values dd { margin: 0; color: var(--chzm-navy); font-size: 18px; font-weight: 900; }
.stock-inventory-values .inventory-negative { background: var(--red-soft); }
.stock-inventory-values .inventory-negative dd, .text-danger { color: var(--chzm-red) !important; }
.stock-inventory-values .inventory-positive { background: var(--green-soft); }
.stock-inventory-values .inventory-positive dd { color: var(--chzm-green); }
.stock-inventory-meta { display: grid; gap: 4px; padding: 12px 16px; }
.stock-inventory-meta p { margin: 0; color: var(--ink); font-size: 11px; }
.stock-inventory-meta span { color: var(--muted); font-size: 10px; }
.stock-inventory-review { display: flex; align-items: flex-start; justify-content: flex-end; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); background: #fbfcfd; }
.stock-inventory-review form { margin: 0; }
.stock-inventory-review details { width: min(100%, 430px); }
.stock-inventory-review details > summary { margin-left: auto; cursor: pointer; list-style: none; }
.stock-inventory-review details > summary::-webkit-details-marker { display: none; }
.stock-inventory-review details[open] { padding: 12px; border: 1px solid #efb6b8; border-radius: 9px; background: var(--red-soft); }
.stock-inventory-review details[open] > summary { margin-bottom: 10px; }
.stock-inventory-review details form { display: grid; gap: 8px; }
.stock-inventory-review textarea { min-height: 64px; }
.stock-record-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stock-record-history-grid > details { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stock-record-history-grid > details > summary { min-height: 48px; display: flex; align-items: center; padding: 11px 14px; background: #f8fafc; color: var(--chzm-navy); cursor: pointer; font-size: 12px; font-weight: 850; }
.stock-record-history-grid > details > div { display: grid; padding: 0 14px; }
.stock-record-history-grid article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .75fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.stock-record-history-grid article > div { min-width: 0; display: grid; gap: 2px; }
.stock-record-history-grid article strong { color: var(--chzm-navy); font-size: 11px; overflow-wrap: anywhere; }
.stock-record-history-grid article span, .stock-record-history-grid article small, .stock-record-history-grid details p { color: var(--muted); font-size: 9px; }

@media (max-width: 980px) {
  .stock-record-forms, .stock-record-history-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .stock-records-heading { align-items: stretch; }
  .stock-records-heading .button { width: 100%; }
  .stock-records-summary { grid-template-columns: 1fr; gap: 8px; }
  .stock-records-summary > div { min-height: 64px; padding: 10px 12px; }
  .stock-source-row { grid-template-columns: 1fr; }
  .stock-inventory-card > header { flex-direction: column; }
  .stock-inventory-values { grid-template-columns: 1fr; }
  .stock-inventory-values dl { min-height: 52px; grid-template-columns: 100px minmax(0, 1fr); align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .stock-inventory-values dl:last-child { border-bottom: 0; }
  .stock-inventory-review { align-items: stretch; flex-direction: column; }
  .stock-inventory-review > form .button, .stock-inventory-review details, .stock-inventory-review details > summary { width: 100%; }
  .stock-record-history-grid article { grid-template-columns: 1fr; }
}

/* P10-B · partial returns and stock transfers */
.stock-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.issue-history-quantity small { display: block; margin-top: 4px; color: var(--chzm-green); font-size: 9px; font-weight: 800; }
.issue-return-history { grid-column: 1 / -1; overflow: hidden; border: 1px solid #b9ddca; border-radius: 10px; background: #f6fcf8; }
.issue-return-history > summary { min-height: 44px; display: flex; align-items: center; padding: 9px 12px; color: #17653b; cursor: pointer; font-size: 11px; font-weight: 850; list-style-position: inside; }
.issue-return-history > div { display: grid; gap: 8px; padding: 0 10px 10px; }
.issue-return-history article { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 12px; padding: 11px; border: 1px solid #d7eade; border-radius: 9px; background: #fff; }
.issue-return-history article > div:first-child { display: grid; align-content: start; gap: 3px; min-width: 0; }
.issue-return-history article strong { color: var(--chzm-green); font-size: 12px; }
.issue-return-history article span, .issue-return-history article small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.return-photo-strip { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.return-photo-strip a { width: 72px; display: grid; gap: 3px; color: var(--muted); text-align: center; text-decoration: none; }
.return-photo-strip img { width: 72px; height: 54px; display: block; object-fit: cover; border: 1px solid var(--line); border-radius: 7px; background: #eef2f6; }
.return-photo-strip a:hover img, .return-photo-strip a:focus-visible img { border-color: var(--chzm-blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.return-form-card, .transfer-form-card { align-self: start; }
.return-condition-field { padding: 11px 12px; border: 1px solid #a8d7bd; border-radius: 9px; background: var(--green-soft); }
.return-condition-field > label { min-height: 24px; display: flex; align-items: flex-start; gap: 9px; color: #155c36; cursor: pointer; font-size: 11px; font-weight: 800; }
.return-condition-field input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--chzm-green); }
.return-photo-fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.return-photo-fieldset legend { padding: 0 4px; color: var(--chzm-navy); font-size: 11px; font-weight: 850; }
.return-photo-fieldset > p { margin: 0 0 11px; color: var(--muted); font-size: 10px; }
.return-photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.return-photo-actions input[type="file"] { min-height: 46px; padding: 8px; background: #fff; }
.return-photo-actions input[type="file"]::file-selector-button { min-height: 30px; margin-right: 8px; border: 0; border-radius: 7px; padding: 0 10px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-weight: 800; cursor: pointer; }
.transfer-destination-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.transfer-project-field[hidden] { display: none; }

@media (max-width: 720px) {
  .stock-card-footer > div { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
  .stock-detail-actions, .stock-detail-actions .button { width: 100%; }
  .issue-return-history { grid-column: 1 / -1; }
  .issue-return-history article, .return-photo-actions, .transfer-destination-row { grid-template-columns: 1fr; }
  .return-photo-strip { justify-content: flex-start; }
  .return-photo-strip a, .return-photo-strip img { width: 82px; }
  .return-photo-strip img { height: 62px; }
  .compact-form-actions { display: grid; grid-template-columns: 1fr; }
  .compact-form-actions .button { width: 100%; min-height: 44px; }
}

/* Mobile application shell and in-app notifications. */
.mobile-topbar-brand,
.employee-bottom-nav,
.role-bottom-nav { display: none; }
.notification-menu { position: relative; }
.notification-menu > summary { list-style: none; cursor: pointer; }
.notification-menu > summary::-webkit-details-marker { display: none; }
.notification-bell-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-badge { min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; position: absolute; top: -6px; right: -6px; border: 2px solid #fff; border-radius: 999px; background: var(--chzm-red); color: #fff; font-size: 9px; font-weight: 900; line-height: 1; }
.notification-popover { width: min(390px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 88px)); display: grid; overflow: hidden; position: absolute; z-index: 90; top: calc(100% + 9px); right: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(5, 16, 34, .22); }
.notification-popover-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.notification-popover-heading > div { display: grid; gap: 2px; }
.notification-popover-heading strong { font-size: 15px; }
.notification-popover-heading small { color: var(--muted); font-size: 11px; }
.notification-popover-heading form { margin: 0; }
.notification-popover-heading button { padding: 5px 0; border: 0; background: transparent; color: var(--chzm-blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.notification-preview-list { display: grid; max-height: 430px; overflow-y: auto; }
.notification-preview-list form { margin: 0; }
.notification-preview { width: 100%; min-height: 78px; display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 9px; padding: 12px 15px; border: 0; border-bottom: 1px solid #edf1f6; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.notification-preview:hover { background: #f8faff; }
.notification-preview > span:last-child { min-width: 0; display: grid; gap: 3px; }
.notification-preview strong { font-size: 12px; }
.notification-preview small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-preview time { color: #8b98a9; font-size: 9px; }
.notification-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--chzm-blue); }
.notification-warning .notification-dot { background: #d18a26; }
.notification-error .notification-dot { background: var(--chzm-red); }
.notification-success .notification-dot { background: var(--chzm-green); }
.notification-action .notification-dot { background: #8b5ec9; }
.notification-preview-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 24px; color: var(--muted); text-align: center; }
.notification-preview-empty > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--chzm-green); font-weight: 900; }
.notification-preview-empty strong { color: var(--ink); font-size: 13px; }
.notification-preview-empty small { font-size: 11px; }
.notification-all-link { min-height: 44px; display: grid; place-items: center; border-top: 1px solid var(--line); color: var(--chzm-blue); font-size: 12px; font-weight: 850; text-decoration: none; }
.notification-page-heading form { margin: 0; }
.notification-list { display: grid; gap: 9px; }
.notification-list form { margin: 0; }
.notification-card { width: 100%; min-height: 92px; display: grid; grid-template-columns: 5px minmax(0, 1fr) 24px; gap: 13px; align-items: center; padding: 14px 16px 14px 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.notification-card.unread { border-color: #bfd4ef; background: #f9fbff; box-shadow: 0 7px 22px rgba(36, 104, 216, .07); }
.notification-card-marker { width: 4px; height: 46px; border-radius: 999px; background: #b7c1ce; }
.notification-card.unread .notification-card-marker { background: var(--chzm-blue); }
.notification-card.notification-warning .notification-card-marker { background: #d18a26; }
.notification-card.notification-error .notification-card-marker { background: var(--chzm-red); }
.notification-card.notification-success .notification-card-marker { background: var(--chzm-green); }
.notification-card-copy { min-width: 0; display: grid; gap: 4px; }
.notification-card-top { display: flex; align-items: center; gap: 8px; }
.notification-card-top strong { font-size: 13px; }
.notification-card-top > span { padding: 2px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.notification-card-copy > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-card-copy time { color: #8b98a9; font-size: 9px; }
.notification-card-arrow { color: #95a3b5; font-size: 18px; }

.employee-home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: stretch; margin-bottom: 18px; }
.employee-home-hero > div { display: grid; align-content: center; padding: 24px; overflow: hidden; position: relative; border-radius: 18px; background: linear-gradient(135deg, var(--chzm-navy), #174c7f); color: #fff; box-shadow: 0 16px 34px rgba(16, 47, 83, .16); }
.employee-home-hero > div::after { content: ""; width: 130px; height: 130px; position: absolute; right: -42px; bottom: -56px; border: 22px solid rgba(255, 255, 255, .07); border-radius: 50%; }
.employee-home-kicker { margin-bottom: 8px; color: #9fc7f2; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.employee-home-hero h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.employee-home-hero p { max-width: 600px; margin: 7px 0 0; color: #c8d8e9; font-size: 13px; line-height: 1.45; }
.employee-home-create { min-height: 156px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 3px 13px; align-content: center; padding: 22px; border: 1px solid #bcd2ed; border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 12px 30px rgba(34, 70, 111, .09); }
.employee-home-create > span { width: 52px; height: 52px; display: grid; grid-row: span 2; place-items: center; border-radius: 16px; background: var(--chzm-blue); color: #fff; font-size: 28px; }
.employee-home-create strong { align-self: end; font-size: 16px; }
.employee-home-create small { color: var(--muted); font-size: 11px; }
.employee-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.employee-status-grid > a { min-height: 108px; display: grid; align-content: center; gap: 4px; padding: 16px; overflow: hidden; position: relative; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-decoration: none; }
.employee-status-grid > a::after { content: ""; width: 64px; height: 64px; position: absolute; top: -25px; right: -25px; border-radius: 50%; background: var(--blue-soft); }
.employee-status-grid > a.needs-action::after { background: var(--amber-soft); }
.employee-status-grid > a.completed::after { background: var(--green-soft); }
.employee-status-grid span { color: var(--muted); font-size: 11px; }
.employee-status-grid strong { color: var(--chzm-navy); font-size: 27px; line-height: 1; }
.employee-status-grid small { color: var(--muted); font-size: 10px; }
.employee-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 24px 0 11px; }
.employee-section-heading h2 { margin: 0; font-size: 18px; }
.employee-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.employee-section-heading > a { color: var(--chzm-blue); font-size: 12px; font-weight: 850; text-decoration: none; }
.employee-recent-requests { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.employee-recent-requests > a { min-height: 86px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.employee-recent-requests > a:last-child { border-bottom: 0; }
.employee-request-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--chzm-blue); font-size: 17px; }
.employee-request-copy { min-width: 0; display: grid; gap: 4px; }
.employee-request-copy > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.employee-request-copy > small { color: var(--muted); font-size: 10px; }
.employee-request-copy .status-pill { width: fit-content; min-height: 22px; padding: 2px 7px; font-size: 9px; }
.employee-request-arrow { color: #95a3b5; font-size: 24px; }
.employee-empty-requests { min-height: 250px; display: grid; justify-items: center; align-content: center; gap: 7px; padding: 30px 20px; text-align: center; }
.employee-empty-requests > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--blue-soft); color: var(--chzm-blue); font-size: 26px; }
.employee-empty-requests > strong { margin-top: 4px; font-size: 15px; }
.employee-empty-requests > p { max-width: 350px; margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.45; }

@media (max-width: 820px) {
  .mobile-work-shell { background: #f4f7fb; }
  .mobile-work-shell .app-topbar { gap: 9px; padding: 0 12px; }
  .mobile-work-shell .mobile-topbar-brand { display: grid; place-items: center; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--chzm-navy); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-decoration: none; }
  .mobile-work-shell .global-search,
  .mobile-work-shell .role-context,
  .mobile-work-shell .account-switcher { display: none; }
  .mobile-work-shell .topbar-spacer { display: block; }
  .mobile-work-shell .notification-button { display: grid; }
  .mobile-work-shell .notification-popover { position: fixed; top: 62px; right: 10px; }
  .mobile-work-shell .page-shell { max-width: 680px; padding: 18px 14px calc(104px + env(safe-area-inset-bottom)); }
  .employee-mobile-shell .employee-bottom-nav { min-height: calc(74px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; align-items: start; padding: 7px 18px env(safe-area-inset-bottom); position: fixed; z-index: 70; inset: auto 0 0; border-top: 1px solid rgba(196, 208, 222, .86); background: rgba(255, 255, 255, .96); box-shadow: 0 -12px 34px rgba(24, 50, 82, .11); backdrop-filter: blur(16px); }
  .employee-bottom-link { min-width: 0; min-height: 59px; display: grid; justify-items: center; align-content: center; gap: 3px; padding-inline: 4px; position: relative; color: #7d8999; font-size: 10px; font-weight: 750; text-decoration: none; }
  .employee-bottom-link.active { color: var(--chzm-blue); }
  .employee-bottom-link.active::after { content: ""; width: 24px; height: 3px; position: absolute; bottom: 0; border-radius: 999px; background: var(--chzm-blue); }
  .employee-bottom-icon { font-size: 21px; line-height: 1; }
  .employee-bottom-create { min-height: 83px; display: grid; justify-items: center; align-content: start; gap: 4px; margin-top: -28px; color: var(--chzm-blue); font-size: 10px; font-weight: 850; text-decoration: none; }
  .employee-bottom-create > span { width: 58px; height: 58px; display: grid; place-items: center; border: 6px solid #f4f7fb; border-radius: 50%; background: var(--chzm-blue); color: #fff; box-shadow: 0 8px 22px rgba(36, 104, 216, .32); font-size: 30px; font-weight: 400; line-height: 1; }
  .employee-bottom-create.active > span { background: var(--chzm-navy); }
  .employee-bottom-create small { color: inherit; font-size: 9px; }
  .mobile-work-shell .role-bottom-nav { min-height: calc(72px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(var(--role-nav-count), minmax(0, 1fr)); gap: 4px; align-items: stretch; padding: 6px 8px env(safe-area-inset-bottom); position: fixed; z-index: 70; inset: auto 0 0; border-top: 1px solid rgba(196, 208, 222, .86); background: rgba(255, 255, 255, .96); box-shadow: 0 -12px 34px rgba(24, 50, 82, .11); backdrop-filter: blur(16px); }
  .role-bottom-link { min-width: 0; min-height: 58px; display: grid; justify-items: center; align-content: center; gap: 4px; position: relative; border-radius: 10px; color: #778598; text-decoration: none; }
  .role-bottom-link > span { font-size: 21px; line-height: 1; }
  .role-bottom-link small { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
  .role-bottom-link.active { background: var(--blue-soft); color: var(--chzm-blue); }
  .role-dashboard-page { padding-top: 12px !important; }
  .role-dashboard-heading { margin-bottom: 12px; }
  .role-dashboard-heading h1 { font-size: 25px; }
  .role-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .role-action-card { min-height: 92px; grid-template-columns: 38px minmax(0, 1fr) 13px; gap: 8px; padding: 12px; border-radius: 13px; }
  .role-action-card > span { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
  .role-action-card strong { font-size: 12px; }
  .role-action-card > i { font-size: 20px; }
  .employee-home-hero { grid-template-columns: 1fr; gap: 10px; margin-bottom: 11px; }
  .employee-home-hero > div { min-height: 145px; padding: 20px; border-radius: 17px; }
  .employee-home-hero h1 { font-size: 24px; }
  .employee-home-create { min-height: 86px; grid-template-columns: 46px minmax(0, 1fr); padding: 14px 16px; border-radius: 15px; }
  .employee-home-create > span { width: 46px; height: 46px; border-radius: 14px; font-size: 25px; }
  .employee-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .employee-status-grid > a { min-height: 102px; padding: 12px 10px; border-radius: 13px; }
  .employee-status-grid span { font-size: 9px; }
  .employee-status-grid strong { font-size: 24px; }
  .employee-status-grid small { font-size: 8px; line-height: 1.3; }
  .employee-section-heading { margin-top: 20px; }
  .employee-recent-requests { border-radius: 14px; }
  .employee-recent-requests > a { padding-inline: 12px; }
  .employee-mobile-shell .request-create-page .page-heading { margin-bottom: 12px; }
  .employee-mobile-shell .request-create-page .page-heading p { font-size: 12px; }
  .employee-mobile-shell .request-create-page .form-section { padding: 14px; border-radius: 15px; }
  .employee-mobile-shell .request-create-page .form-section-heading { margin-bottom: 13px; }
  .employee-mobile-shell .request-create-page .form-section-heading > span { display: none; }
  .employee-mobile-shell .request-create-page .form-section-heading h2 { font-size: 16px; }
  .employee-mobile-shell .request-create-page .field textarea { min-height: 150px; font-size: 16px; }
  .employee-mobile-shell .request-create-page .request-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .employee-mobile-shell .request-create-page .request-upload-card { min-height: 156px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 12px; }
  .employee-mobile-shell .request-create-page .request-upload-icon { width: 36px; height: 36px; border-radius: 10px; }
  .employee-mobile-shell .request-create-page .request-upload-card > div > strong { font-size: 12px; }
  .employee-mobile-shell .request-create-page .request-upload-card > div > p { display: none; }
  .employee-mobile-shell .request-create-page .request-file-button { grid-column: 1 / -1; padding-inline: 8px; font-size: 10px; }
  .employee-mobile-shell .request-create-page .request-file-selection { grid-column: 1 / -1; font-size: 9px; }
  .employee-mobile-shell .request-create-page .request-form-actions { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .employee-mobile-shell .my-request-list-page .request-summary { display: flex; margin-inline: -14px; padding: 0 14px 3px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .employee-mobile-shell .my-request-list-page .request-summary::-webkit-scrollbar { display: none; }
  .employee-mobile-shell .my-request-list-page .request-summary-card { min-width: 142px; scroll-snap-align: start; }
  .employee-mobile-shell .my-request-list-page .request-filter { grid-template-columns: 1fr; }
  .employee-mobile-shell .my-request-list-page .request-filter .button { width: 100%; }
}

@media (max-width: 420px) {
  .employee-mobile-shell .employee-bottom-nav { column-gap: 8px; padding-inline: 10px; }
  .employee-mobile-shell .request-create-page .request-upload-grid { grid-template-columns: 1fr; }
  .employee-mobile-shell .request-create-page .request-upload-card { min-height: 126px; }
  .notification-card { grid-template-columns: 4px minmax(0, 1fr); padding-inline: 10px; }
  .notification-card-arrow { display: none; }
}

/* Compact employee request form: working controls without explanatory landing blocks. */
.request-form-compact { width: min(100%, 760px); }
.request-compact-card { display: grid; gap: 16px; }
.request-kind-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.request-kind-fieldset > legend { margin-bottom: 8px; color: var(--ink); font-size: 11px; font-weight: 850; }
.request-kind-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.request-kind-option { min-width: 0; min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #c8d4e2; border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(19, 48, 81, .04); transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.request-kind-option:hover { border-color: #91b7e6; background: #f8fbff; transform: translateY(-1px); }
.request-kind-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--chzm-blue); }
.request-kind-copy { min-width: 0; display: grid; gap: 3px; }
.request-kind-copy strong { font-size: 13px; }
.request-kind-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.request-kind-option > i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #dce8f6; color: transparent; font-size: 12px; font-style: normal; }
.request-kind-option.is-selected { border-color: #61a7f6; background: #eef7ff; box-shadow: 0 8px 22px rgba(22, 119, 232, .13); }
.request-kind-option.is-selected > i { background: var(--chzm-blue); color: #fff; }
.routine-label { color: #1a6d4d; }
.request-compact-card textarea { min-height: 150px; resize: vertical; }
.request-quick-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.request-quick-photo-control { min-width: 0; display: grid; gap: 5px; position: relative; }
.request-quick-photo-control input[type="file"] { width: 1px; height: 1px; padding: 0; position: absolute; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.request-quick-photo-button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 12px; border: 1px solid #b8cce4; border-radius: 11px; background: #f7faff; color: var(--chzm-blue-dark); cursor: pointer; font-size: 12px; font-weight: 850; text-align: center; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.request-quick-photo-button svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.request-quick-gallery-button { border-color: #b8dac8; background: #f6fcf8; color: #187148; }
.request-quick-photo-button:hover { border-color: #86adde; background: #eef5ff; }
.request-quick-gallery-button:hover { border-color: #83c4a1; background: #edf9f2; }
.request-quick-photo-control input[type="file"]:focus-visible + .request-file-selection { outline: 3px solid var(--focus); outline-offset: 2px; }
.request-quick-photo-control .request-file-selection { min-height: 17px; display: block; padding: 0 5px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.4; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.request-quick-photo-control.has-files .request-quick-photo-button { border-color: #6fa58a; background: var(--green-soft); color: #17653b; }

@media (max-width: 820px) {
  .employee-mobile-shell .request-form-compact { margin-top: 0; }
  .employee-mobile-shell .request-compact-card { gap: 14px; padding: 14px; }
  .employee-mobile-shell .request-compact-card textarea { min-height: 138px; font-size: 16px; }
  .employee-mobile-shell .request-quick-photo-grid { gap: 8px; }
  .employee-mobile-shell .request-quick-photo-button { min-height: 52px; padding-inline: 8px; font-size: 10px; }
  .request-kind-options { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .employee-mobile-shell .request-quick-photo-grid { grid-template-columns: 1fr; }
}

/* Employee work queue and compact request progress roadmap. */
.employee-status-grid-compact > a { min-height: 74px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; align-content: center; gap: 8px; padding-block: 11px; }
.employee-status-grid-compact > a.awaiting-warehouse::after { background: var(--blue-soft); }
.employee-status-grid-compact > a.needs-action::after { background: var(--amber-soft); }
.employee-status-grid-compact span { position: relative; z-index: 1; color: var(--ink); font-size: 11px; font-weight: 750; line-height: 1.25; }
.employee-status-grid-compact strong { position: relative; z-index: 1; font-size: 22px; }
.employee-request-with-progress { min-height: 116px !important; }
.request-roadmap-status { width: fit-content; display: block; color: var(--chzm-blue-dark); font-size: 10px; font-weight: 850; line-height: 1.25; }
.request-roadmap-status.warning { color: #9a6012; }
.request-roadmap-status.error { color: var(--chzm-red); }
.request-roadmap-status.success { color: var(--chzm-green); }
.request-roadmap { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 3px; }
.request-roadmap-stage { min-width: 0; display: grid; justify-items: center; gap: 4px; position: relative; color: #9ba6b5; }
.request-roadmap-stage::before { content: ""; width: 100%; height: 2px; position: absolute; z-index: 0; top: 4px; right: 50%; background: #dce3ec; }
.request-roadmap-stage:first-child::before { display: none; }
.request-roadmap-stage i { width: 10px; height: 10px; display: block; position: relative; z-index: 1; border: 2px solid #cbd4df; border-radius: 50%; background: #fff; }
.request-roadmap-stage small { max-width: 100%; overflow: hidden; font-size: 7px; font-style: normal; font-weight: 700; line-height: 1.15; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.request-roadmap-stage.done,
.request-roadmap-stage.current { color: var(--chzm-blue-dark); }
.request-roadmap-stage.done::before,
.request-roadmap-stage.current::before { background: var(--chzm-blue); }
.request-roadmap-stage.done i { border-color: var(--chzm-blue); background: var(--chzm-blue); box-shadow: inset 0 0 0 2px #fff; }
.request-roadmap-stage.current i { border-color: var(--chzm-blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.request-roadmap-stage.error { color: var(--chzm-red); }
.request-roadmap-stage.error::before { background: var(--chzm-red); }
.request-roadmap-stage.error i { border-color: var(--chzm-red); background: var(--red-soft); box-shadow: 0 0 0 3px var(--red-soft); }
.request-roadmap-stage.skipped { color: #a5afbb; }
.request-roadmap-stage.skipped::before { height: 0; border-top: 2px dashed #cbd4df; background: transparent; }
.request-roadmap-stage.skipped i { border-style: dashed; background: #f5f7fa; }
.request-detail-roadmap { display: grid; gap: 10px; margin: -7px 0 17px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.request-detail-roadmap .request-roadmap-status { font-size: 12px; }
.request-detail-roadmap .request-roadmap-stage small { font-size: 9px; }

@media (max-width: 820px) {
  .employee-mobile-shell .employee-dashboard-page { padding-top: 12px; }
  .employee-mobile-shell .employee-status-grid-compact { gap: 7px; }
  .employee-mobile-shell .employee-status-grid-compact > a { min-height: 67px; padding: 9px 8px; }
  .employee-mobile-shell .employee-status-grid-compact span { font-size: 9px; }
  .employee-mobile-shell .employee-status-grid-compact strong { font-size: 21px; }
  .employee-mobile-shell .employee-section-heading { margin: 17px 0 9px; }
  .employee-mobile-shell .employee-section-heading h2 { font-size: 17px; }
  .employee-mobile-shell .employee-request-with-progress { min-height: 120px; grid-template-columns: 38px minmax(0, 1fr) 14px; gap: 9px; }
  .employee-mobile-shell .employee-request-with-progress .employee-request-icon { width: 38px; height: 38px; border-radius: 11px; }
  .employee-mobile-shell .employee-request-with-progress .employee-request-copy > strong { font-size: 12px; }
  .employee-mobile-shell .my-request-list-page .request-row { min-height: 154px; }
  .employee-mobile-shell .my-request-list-page .request-roadmap { margin-top: 3px; }
  .employee-mobile-shell .my-request-list-page .request-roadmap-stage small { font-size: 7px; }
  .employee-mobile-shell .my-request-list-page .request-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-inline: 0; padding: 0; overflow: visible; }
  .employee-mobile-shell .my-request-list-page .request-summary-card { min-width: 0; min-height: 62px; padding: 9px; }
  .employee-mobile-shell .my-request-list-page .request-summary-card span { font-size: 11px; line-height: 1.2; }
  .employee-mobile-shell .my-request-list-page .request-summary-card strong { font-size: 19px; }
  .employee-mobile-shell .request-detail-roadmap { margin-top: -5px; padding: 12px; }
}

/* Self-registration and leader approval queue. */
.registration-page { min-height: calc(100vh - 78px); display: grid; place-items: center; padding-block: 28px 48px; }
.registration-card { width: min(100%, 760px); padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-top: 5px solid var(--chzm-blue); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.registration-heading { margin-bottom: 22px; }
.registration-heading h1 { margin: 0; color: var(--chzm-navy); font-size: clamp(28px, 5vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.registration-name-grid, .registration-access-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.registration-access-grid { margin-top: 2px; }
.registration-access-grid > .field { align-self: start; }
.registration-password-field input { height: 48px; min-height: 48px; }
.registration-password-help { min-height: 18px; }
.registration-password-help.is-empty { visibility: hidden; }
.registration-submit { width: 100%; margin-top: 2px; }

.management-tabs { display: flex; gap: 4px; margin: -8px 0 18px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: #eef3f8; }
.management-tab { min-height: 42px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; color: #4c5d73; font-size: 13px; font-weight: 850; text-decoration: none; }
.management-tab:hover { color: var(--chzm-blue-dark); }
.management-tab.active { background: #fff; color: var(--chzm-blue-dark); box-shadow: 0 2px 8px rgba(18,27,47,.09); }
.management-tab-count { min-width: 23px; height: 23px; display: inline-grid; place-items: center; padding-inline: 6px; border-radius: 999px; background: var(--chzm-blue); color: #fff; font-size: 11px; }

.registration-share-card { margin-bottom: 20px; padding: 16px; border: 1px solid #bcd2ea; border-radius: 12px; background: #f5f9fd; }
.registration-share-card > label { display: block; margin-bottom: 8px; color: var(--chzm-navy); font-size: 13px; font-weight: 850; }
.registration-share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.registration-share-row input { min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #b9c5d3; border-radius: 9px; background: #fff; color: #34455c; }
.registration-request-grid { display: grid; gap: 10px; }
.registration-request-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(18,27,47,.04); }
.registration-request-main { min-width: 0; }
.registration-request-time { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.registration-request-main h3 { margin: 0; color: var(--chzm-navy); font-size: 17px; }
.registration-request-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 7px; color: #4c5d73; font-size: 12px; }
.registration-request-meta strong { color: var(--chzm-blue-dark); }
.registration-request-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 11px 0 0; }
.registration-request-credentials > div { min-width: 0; padding: 8px 10px; border: 1px solid #c6d7e9; border-radius: 9px; background: #f4f8fc; }
.registration-request-credentials dt { color: var(--muted); font-size: 10px; font-weight: 750; }
.registration-request-credentials dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--chzm-navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 850; }
.registration-request-actions { display: flex; align-items: flex-start; gap: 8px; }
.registration-request-actions form { margin: 0; }
.registration-reject-panel { position: relative; }
.registration-reject-panel > summary { list-style: none; }
.registration-reject-panel > summary::-webkit-details-marker { display: none; }
.registration-reject-panel[open] > summary { border-color: var(--chzm-red); }
.registration-reject-panel > form { width: min(340px, calc(100vw - 48px)); padding: 14px; position: absolute; z-index: 25; top: calc(100% + 8px); right: 0; border: 1px solid #e3a7a2; border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.registration-reject-panel textarea { min-height: 76px; }
.registration-history-table { margin-top: 0; }
.registration-status-approved { background: var(--green-soft); color: #12643f; }
.registration-status-rejected { background: var(--red-soft); color: var(--chzm-red); }

@media (min-width: 640px) {
  .registration-name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .registration-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .registration-field-wide { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .registration-page { width: min(100% - 20px, 760px); padding-block: 14px 32px; }
  .registration-card { padding: 20px 14px; border-radius: 14px; }
  .registration-password-help.is-empty { display: none; }
  .registration-share-row { grid-template-columns: 1fr; }
  .registration-share-row .button { width: 100%; }
  .registration-request-card { grid-template-columns: 1fr; gap: 13px; padding: 14px; }
  .registration-request-credentials { grid-template-columns: 1fr; }
  .registration-request-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .registration-request-actions .button { width: 100%; }
  .registration-reject-panel > form { position: fixed; z-index: 90; inset: auto 12px 12px; width: auto; }
}

/* Role-first workspace system: one primary task, compact live context, progressive disclosure. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --surface-raised: #fff;
  --surface-subtle: #f7f9fc;
  --line-strong: #cdd7e4;
  --motion-fast: 160ms;
  --motion-normal: 240ms;
  --ease-out: cubic-bezier(.2,.8,.2,1);
}

.sidebar-nav { min-height: 0; flex: 1; gap: 10px; padding-right: 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar-nav-group { display: grid; gap: 3px; }
.sidebar-nav-label { margin: 3px 0 4px; padding-inline: 12px; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.sidebar-nav-link { min-height: 40px; gap: 10px; padding: 8px 11px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease; }
.sidebar-nav-link:hover { border-color: rgba(255,255,255,.06); background: rgba(255,255,255,.065); }
.sidebar-nav-link.active { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.14); box-shadow: inset 3px 0 0 #67a3ff; }
.sidebar-nav-icon { height: 20px; display: grid; place-items: center; }
.sidebar-nav-icon svg,
.global-search-icon svg,
.topbar-menu-icon svg,
.employee-bottom-icon svg,
.role-bottom-link > span svg,
.role-primary-icon svg,
.role-quick-icon svg,
.role-more-sections nav span svg,
.employee-request-icon svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.global-search-icon { width: 18px; height: 18px; display: grid; place-items: center; }
.global-search-icon svg { width: 18px; height: 18px; }
.topbar-menu-icon { display: grid; place-items: center; }
.topbar-menu-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.employee-bottom-icon svg,
.role-bottom-link > span svg { width: 21px; height: 21px; }

.authenticated-app .page-shell { padding-top: 24px; }
.authenticated-app .content-card { border-color: #dfe5ed; box-shadow: 0 1px 2px rgba(17, 39, 67, .025); }
.authenticated-app .page-heading { align-items: flex-end; }
.authenticated-app .page-heading h1 { max-width: 900px; color: #0d2948; font-weight: 760; }
.authenticated-app .page-heading p { max-width: 760px; color: #64758a; }
.dashboard-eyebrow { display: block; margin-bottom: 7px; color: #5f7188; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.leader-command-header,
.role-focus-hero,
.employee-dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.leader-command-header h1,
.role-focus-hero h1,
.employee-dashboard-intro h1 { margin: 0; color: #0b2c50; font-size: clamp(27px, 2.5vw, 36px); line-height: 1.08; letter-spacing: -.035em; }
.leader-command-header p,
.role-focus-hero p,
.employee-dashboard-intro p { max-width: 700px; margin: 8px 0 0; color: #61738a; font-size: 13px; line-height: 1.5; }
.leader-command-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.leader-command-tabs { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(81, 107, 136, .12); }
.leader-command-tabs a { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 10px; color: #526a84; font-size: 11px; font-weight: 800; text-decoration: none; transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.leader-command-tabs a:hover { background: rgba(255, 255, 255, .72); color: #174a82; }
.leader-command-tabs a.is-active { background: #fff; box-shadow: 0 5px 16px rgba(31, 73, 122, .1), inset 0 0 0 1px rgba(37, 93, 156, .1); color: #1261bd; }
.leader-command-tabs b { min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #146ee0; color: #fff; font-size: 9px; font-variant-numeric: tabular-nums; }

.leader-sourcing-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid #d9e2ed; border-radius: 14px; background: #d9e2ed; box-shadow: 0 7px 24px rgba(27, 58, 94, .045); }
.leader-sourcing-summary > div { min-height: 74px; display: grid; align-content: center; gap: 4px; padding: 12px 15px; background: rgba(255, 255, 255, .97); }
.leader-sourcing-summary span { color: #6f8093; font-size: 9px; font-weight: 780; }
.leader-sourcing-summary strong { color: #173657; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.leader-sourcing-summary .is-decision strong { color: #7454b7; }
.leader-sourcing-summary .is-question strong { color: #a16408; }
.leader-sourcing-summary .is-agent strong { color: #087d51; }

.leader-sourcing-queue { overflow: hidden; border: 1px solid #dbe3ed; border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 11px 32px rgba(27, 56, 89, .055); }
.leader-sourcing-queue > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 18px 20px 14px; border-bottom: 1px solid #e5ebf2; }
.leader-sourcing-queue h2 { margin: 0; color: #102f53; font-size: 20px; letter-spacing: -.02em; }
.leader-sourcing-queue header p { margin: 4px 0 0; color: #6c7e92; font-size: 10px; }
.leader-sourcing-failure-count { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #fff0f1; color: #b23842; font-size: 9px; font-weight: 850; }
.leader-sourcing-list { display: grid; }
.leader-sourcing-row { min-width: 0; min-height: 94px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid #e8edf3; color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.leader-sourcing-row:first-child { border-top: 0; }
.leader-sourcing-row:hover { background: #f8fbff; box-shadow: inset 3px 0 #3485e6; }
.leader-sourcing-order { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #eff4fa; color: #60768d; font-size: 10px; font-weight: 850; font-variant-numeric: tabular-nums; }
.leader-sourcing-row.decision .leader-sourcing-order { background: #f1ecff; color: #6c47b3; }
.leader-sourcing-row.critical .leader-sourcing-order { background: #ffedef; color: #ad3540; }
.leader-sourcing-row.question .leader-sourcing-order { background: #fff4df; color: #99600a; }
.leader-sourcing-copy { min-width: 0; display: grid; gap: 3px; }
.leader-sourcing-tags { display: flex; align-items: center; gap: 7px; }
.leader-sourcing-tags b { padding: 3px 7px; border-radius: 999px; background: #eef4fb; color: #496985; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.leader-sourcing-row.decision .leader-sourcing-tags b { background: #f0eaff; color: #6942ad; }
.leader-sourcing-row.critical .leader-sourcing-tags b { background: #ffebed; color: #aa303a; }
.leader-sourcing-row.question .leader-sourcing-tags b { background: #fff2db; color: #8e5907; }
.leader-sourcing-tags small { color: #7a899b; font-size: 8px; }
.leader-sourcing-copy > strong { overflow: hidden; color: #183858; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.leader-sourcing-copy > small { overflow: hidden; color: #5f748a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.leader-sourcing-copy p { margin: 2px 0 0; overflow: hidden; color: #748497; font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.leader-sourcing-action { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 5px 8px; }
.leader-sourcing-action small { grid-column: 1 / -1; color: #8996a5; font-size: 8px; }
.leader-sourcing-action b { color: #1767c2; font-size: 10px; }
.leader-sourcing-action i { color: #7190b1; font-size: 15px; font-style: normal; }
.leader-sourcing-empty { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 28px; }
.leader-sourcing-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e8f7ef; color: #087d51; font-size: 18px; font-weight: 900; }
.leader-sourcing-empty strong { color: #23415e; font-size: 14px; }
.leader-sourcing-empty p { max-width: 570px; margin: 4px 0 0; color: #718196; font-size: 10px; line-height: 1.5; }
.leader-sourcing-queue > footer { padding: 10px 18px; border-top: 1px solid #e8edf3; background: #f8fafc; color: #718196; font-size: 9px; text-align: center; }

.executive-metric-strip,
.role-metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid #d9e1eb; border-radius: 12px; background: #d9e1eb; gap: 1px; }
.executive-metric,
.role-metric { min-width: 0; min-height: 86px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center; gap: 4px 12px; padding: 14px 16px; background: #fff; color: inherit; text-decoration: none; transition: background-color var(--motion-fast) ease; }
.executive-metric:hover,
.role-metric:hover { background: #f8fbff; }
.executive-metric span,
.role-metric span { color: #68798e; font-size: 11px; font-weight: 750; }
.executive-metric strong,
.role-metric strong { grid-row: 2; color: #112e50; font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.03em; }
.executive-metric i { grid-column: 2; grid-row: 1 / span 2; color: #91a0b2; font-size: 16px; font-style: normal; }
.executive-metric.critical strong,
.executive-metric.danger strong,
.role-metric.danger strong { color: #b3323a; }
.executive-metric.warning strong,
.role-metric.warning strong { color: #98600f; }
.executive-metric.success strong,
.role-metric.success strong { color: #117149; }

.leader-dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; gap: 18px; }
.leader-attention-panel { min-width: 0; }
.section-heading-priority { min-height: 42px; justify-content: space-between; margin: 0 0 10px; }
.section-heading-priority > div { display: grid; gap: 2px; }
.section-heading-priority span { color: #a3353c; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.section-heading-priority h2 { color: #102f53; font-size: 20px; }
.section-heading-priority > small { color: #7b899b; font-size: 11px; }
.attention-card { border-radius: 12px; box-shadow: 0 5px 18px rgba(25, 49, 78, .045); }
.attention-row-link { color: inherit; text-decoration: none; }
.attention-row { min-height: 78px; transition: background-color var(--motion-fast) ease; }
.attention-actions i { color: #7f90a5; font-style: normal; }
.dashboard-empty-success { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.dashboard-empty-success > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--chzm-green); font-weight: 900; }
.dashboard-empty-success p { margin: 3px 0 0; }
.leader-result-rail { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar-height) + 18px); }
.leader-result-rail .leader-savings-widget { min-height: 190px; }
.leader-context-card { padding: 16px; border: 1px solid #dce4ed; border-radius: 12px; background: #fff; }
.leader-context-card > span { color: #6b7b8f; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.leader-context-card dl { display: grid; margin: 10px 0 0; }
.leader-context-card dl div { min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf1f5; }
.leader-context-card dt { color: #607188; font-size: 11px; }
.leader-context-card dd { margin: 0; color: #173657; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

.role-focus-hero { min-height: 190px; align-items: center; padding: clamp(22px, 3vw, 34px); overflow: hidden; position: relative; border: 1px solid #d5e0ee; border-radius: 16px; background: linear-gradient(120deg, #fff 0%, #f8fbff 72%, #edf4ff 100%); box-shadow: 0 9px 28px rgba(29, 62, 99, .06); }
.role-focus-hero::after { content: ""; width: 260px; height: 260px; position: absolute; right: -110px; bottom: -170px; border-radius: 50%; background: rgba(36,104,216,.07); pointer-events: none; }
.role-focus-copy { min-width: 0; position: relative; z-index: 1; }
.role-primary-action { width: min(100%, 390px); min-height: 92px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 16px; position: relative; z-index: 1; border-radius: 13px; background: #1f64ce; box-shadow: 0 12px 24px rgba(31,100,206,.2); color: #fff; text-decoration: none; transition: background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out); }
.role-primary-action:hover { background: #1857b8; box-shadow: 0 15px 30px rgba(31,100,206,.25); transform: translateY(-2px); }
.role-primary-action:active { transform: translateY(0); }
.role-primary-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.14); }
.role-primary-icon svg { width: 24px; height: 24px; }
.role-primary-action > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.role-primary-action strong { font-size: 14px; }
.role-primary-action small { color: rgba(255,255,255,.76); font-size: 10px; line-height: 1.35; }
.role-primary-action > i { font-size: 19px; font-style: normal; }
.role-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.role-metric { min-height: 78px; }
.role-sections-panel { padding: 18px; border: 1px solid #dde5ee; border-radius: 13px; background: #fff; }
.section-heading-compact { justify-content: space-between; margin: 0 0 12px; }
.section-heading-compact h2 { color: #183653; font-size: 16px; }
.section-heading-compact p { margin: 3px 0 0; color: #708095; font-size: 10px; }
.role-quick-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-quick-list > a { min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 10px; color: #203b59; text-decoration: none; transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease; }
.role-quick-list > a:hover { border-color: #b7cce6; background: #f8fbff; }
.role-quick-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #edf4fd; color: #2a67b6; }
.role-quick-icon svg { width: 18px; height: 18px; }
.role-quick-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.role-quick-list i { color: #94a2b2; font-style: normal; }
.role-more-sections { margin-top: 9px; border-top: 1px solid #edf1f5; }
.role-more-sections > summary { min-height: 42px; display: flex; align-items: center; color: #587089; cursor: pointer; font-size: 11px; font-weight: 800; }
.role-more-sections nav { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.role-more-sections nav a { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 8px; background: #f5f7fa; color: #40546a; font-size: 10px; font-weight: 750; text-decoration: none; }
.role-more-sections nav span { width: 17px; height: 17px; display: grid; place-items: center; }
.role-more-sections nav span svg { width: 16px; height: 16px; }

.role-assignment-panel { margin-bottom: 18px; padding: 18px; scroll-margin-top: calc(var(--topbar-height) + 18px); border: 1px solid #dce4ed; border-radius: 13px; background: #fff; }
.role-assignment-list { display: grid; border: 1px solid #e1e7ee; border-radius: 11px; overflow: hidden; }
.role-assignment-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); align-items: center; gap: 20px; min-height: 92px; padding: 14px 16px; border-top: 1px solid #e8edf3; }
.role-assignment-row:first-child { border-top: 0; }
.role-assignment-row.is-overdue { box-shadow: inset 3px 0 #c23840; }
.role-assignment-main { min-width: 0; }
.role-assignment-main > span { color: #688096; font-size: 9px; font-weight: 750; }
.role-assignment-main h3 { margin: 4px 0 0; color: #153654; font-size: 14px; }
.role-assignment-main p { margin: 5px 0 0; color: #68798d; font-size: 10px; line-height: 1.45; }
.role-assignment-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.role-assignment-facts div { min-width: 0; }
.role-assignment-facts dt { color: #77879a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.role-assignment-facts dd { margin: 4px 0 0; overflow: hidden; color: #23415f; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.role-assignment-empty { min-height: 116px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
.role-assignment-empty > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--chzm-green); font-weight: 900; }
.role-assignment-empty strong { color: #29445f; font-size: 13px; }
.role-assignment-empty p { margin: 3px 0 0; color: #738398; font-size: 10px; }

.employee-dashboard-intro { align-items: center; }
.employee-dashboard-intro .button { flex: 0 0 auto; }
.employee-request-icon { color: var(--chzm-blue); }

.workspace-filter { margin: 0 0 16px; overflow: hidden; border: 1px solid #dde5ee; border-radius: 11px; background: #fff; }
.workspace-filter > summary { min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: #2d4967; cursor: pointer; font-size: 11px; font-weight: 850; list-style: none; }
.workspace-filter > summary::-webkit-details-marker { display: none; }
.workspace-filter > summary::after { content: "⌄"; margin-left: auto; color: #74869a; font-size: 16px; transition: transform var(--motion-fast) ease; }
.workspace-filter[open] > summary::after { transform: rotate(180deg); }
.workspace-filter > summary small { padding: 2px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--chzm-blue-dark); font-size: 9px; }
.workspace-filter .filter-bar,
.workspace-filter .compact-filter { margin: 0; padding: 13px 14px 14px; border: 0; border-top: 1px solid #edf1f5; border-radius: 0; background: #fafbfd; box-shadow: none; }

.request-summary,
.buyer-summary,
.warehouse-receiving-summary,
.stock-summary,
.catalog-summary,
.issue-summary,
.stock-records-summary,
.production-metrics { display: flex; gap: 1px; margin-bottom: 14px; overflow-x: auto; border: 1px solid #dbe3ec; border-radius: 11px; background: #dbe3ec; scrollbar-width: thin; }
.request-summary > *,
.buyer-summary > *,
.warehouse-receiving-summary > *,
.stock-summary > *,
.catalog-summary > *,
.issue-summary > *,
.stock-records-summary > *,
.production-metrics > * { min-width: 140px; min-height: 72px; flex: 1 0 140px; display: grid; align-content: center; gap: 3px; padding: 11px 13px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.production-metrics > article { min-height: 72px; padding: 11px 13px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.request-summary > * span,
.buyer-summary > * span,
.warehouse-receiving-summary > * span,
.stock-summary > * span,
.catalog-summary > * span,
.issue-summary > * span,
.stock-records-summary > * span,
.production-metrics > * span { color: #6d7c8e; font-size: 11px; font-weight: 750; }
.request-summary > * strong,
.buyer-summary > * strong,
.warehouse-receiving-summary > * strong,
.stock-summary > * strong,
.catalog-summary > * strong,
.issue-summary > * strong,
.stock-records-summary > * strong,
.production-metrics > * strong { color: #173657; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; }
.request-summary > .summary-clarification strong,
.buyer-summary > .buyer-stat-danger strong,
.warehouse-receiving-summary > .stat-discrepancy strong,
.production-metrics > .metric-danger strong { color: #b3343c; }
.request-summary > .summary-ready strong,
.buyer-summary > .buyer-stat-success strong,
.warehouse-receiving-summary > .stat-received strong { color: #147049; }

.stock-record-forms { align-items: start; }
.stock-record-disclosure { padding: 0 !important; }
.stock-record-disclosure > summary,
.directory-create-disclosure > summary { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; color: #183957; cursor: pointer; list-style: none; }
.stock-record-disclosure > summary::-webkit-details-marker,
.directory-create-disclosure > summary::-webkit-details-marker { display: none; }
.stock-record-disclosure > summary > span,
.directory-create-disclosure > summary > span { min-width: 0; display: grid; gap: 2px; }
.stock-record-disclosure > summary strong,
.directory-create-disclosure > summary strong { font-size: 13px; }
.stock-record-disclosure > summary small,
.directory-create-disclosure > summary small { color: #718196; font-size: 11px; font-weight: 500; }
.stock-record-disclosure > summary i,
.directory-create-disclosure > summary i { margin-left: auto; color: #66809b; font-size: 17px; font-style: normal; transition: transform var(--motion-fast) ease; }
.stock-record-disclosure[open] > summary,
.directory-create-disclosure[open] > summary { border-bottom: 1px solid #e8edf3; background: #f8fbff; }
.stock-record-disclosure[open] > summary i { transform: rotate(180deg); }
.stock-record-disclosure > form { padding: 15px; }
.directory-create-disclosure > form,
.directory-create-disclosure > .action-note,
.directory-create-disclosure > .directory-disclosure { margin: 0 14px 14px; }
.counterparty-editor:has(.directory-create-disclosure:not([open])) { padding: 0 !important; position: static; }
.directory-create-disclosure:not([open]) + * { display: none; }

.table-frame { border-color: #dce4ed; border-radius: 11px; box-shadow: 0 2px 10px rgba(26, 48, 75, .035); }
.authenticated-app th { color: #63758a; font-size: 10px; letter-spacing: .025em; }
.authenticated-app tbody tr { transition: background-color var(--motion-fast) ease; }
.authenticated-app tbody tr:hover { background: #f8fbff; }

@media (prefers-reduced-motion: no-preference) {
  .leader-command-header,
  .role-focus-hero,
  .employee-dashboard-intro { animation: workspace-enter var(--motion-normal) var(--ease-out) both; }
  .executive-metric-strip,
  .role-metric-strip { animation: workspace-enter var(--motion-normal) 45ms var(--ease-out) both; }
  .leader-dashboard-layout,
  .role-sections-panel,
  .employee-recent-requests { animation: workspace-enter var(--motion-normal) 90ms var(--ease-out) both; }
}
@keyframes workspace-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .leader-dashboard-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .role-focus-hero { align-items: stretch; flex-direction: column; }
  .role-primary-action { width: 100%; }
}

@media (max-width: 900px) {
  .executive-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leader-dashboard-layout { grid-template-columns: 1fr; }
  .leader-result-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
  .leader-result-rail .leader-savings-widget { min-height: 176px; }
  .leader-sourcing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sidebar-nav { padding-bottom: 20px; }
  .leader-command-header,
  .employee-dashboard-intro { align-items: stretch; flex-direction: column; gap: 14px; }
  .leader-command-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .employee-dashboard-intro .button { width: 100%; }
  .role-focus-hero { min-height: 0; padding: 20px; }
  .role-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .role-metric { padding: 12px; }
  .role-metric strong { font-size: 21px; }
  .role-assignment-row { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 620px) {
  .authenticated-app .page-shell { padding-top: 14px; }
  .leader-command-header h1,
  .role-focus-hero h1,
  .employee-dashboard-intro h1 { font-size: 27px; }
  .leader-command-header p,
  .employee-dashboard-intro p { display: none; }
  .leader-command-actions { grid-template-columns: 1fr; }
  .executive-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .executive-metric { min-height: 74px; padding: 12px; }
  .executive-metric strong { font-size: 22px; }
  .leader-result-rail { grid-template-columns: 1fr; }
  .leader-command-tabs { margin-inline: -3px; overflow-x: auto; }
  .leader-command-tabs a { white-space: nowrap; }
  .leader-sourcing-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leader-sourcing-summary > div { min-height: 64px; padding: 10px 12px; }
  .leader-sourcing-summary strong { font-size: 21px; }
  .leader-sourcing-queue > header { align-items: flex-start; padding: 15px; }
  .leader-sourcing-queue header p,
  .leader-sourcing-failure-count { display: none; }
  .leader-sourcing-row { grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 9px; min-height: 88px; padding: 11px 12px; }
  .leader-sourcing-order { width: 27px; height: 27px; }
  .leader-sourcing-tags small,
  .leader-sourcing-copy p,
  .leader-sourcing-action small,
  .leader-sourcing-action b { display: none; }
  .leader-sourcing-action { display: block; }
  .attention-row { grid-template-columns: 5px minmax(0, 1fr); padding: 12px; }
  .attention-actions { grid-column: 2; }
  .status-pill { white-space: normal; }
  .role-focus-hero { gap: 18px; padding: 18px 15px; border-radius: 14px; }
  .role-focus-hero::after { display: none; }
  .role-focus-hero p { font-size: 12px; }
  .role-primary-action { min-height: 82px; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 13px; }
  .role-primary-icon { width: 42px; height: 42px; }
  .role-metric-strip { grid-template-columns: 1fr; }
  .role-metric { min-height: 62px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto; }
  .role-metric span { font-size: 11px; }
  .role-metric strong { grid-column: 2; grid-row: 1; font-size: 22px; }
  .role-sections-panel { padding: 14px; }
  .role-quick-list { grid-template-columns: 1fr; }
  .role-assignment-panel { padding: 14px; }
  .role-assignment-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading-priority > small,
  .section-heading-compact p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Sourcing workspace: compact, status-first case cards */
.sourcing-buyer-rating { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 2.2fr); gap: 1px; margin-bottom: 12px; overflow: hidden; border: 1px solid #c7d9ee; border-radius: 13px; background: #dce8f5; box-shadow: 0 7px 22px rgba(31, 76, 126, .07); }
.sourcing-rating-score { min-width: 0; display: grid; align-content: center; gap: 2px; min-height: 86px; padding: 13px 16px; background: linear-gradient(135deg, #eaf4ff, #fbfdff); }
.sourcing-rating-score > span { color: #55708d; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.sourcing-rating-score > strong { color: #174f8d; font-size: 31px; line-height: 1; font-variant-numeric: tabular-nums; }
.sourcing-rating-score > small { overflow: hidden; color: #667c92; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-rating-summary { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(105px, 1fr)); gap: 1px; background: #e3eaf2; }
.sourcing-rating-summary > div { min-width: 0; display: grid; align-content: center; gap: 4px; min-height: 86px; padding: 12px 14px; background: #fff; }
.sourcing-rating-summary span { color: #74859a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.sourcing-rating-summary strong { color: #183a5b; font-size: 20px; font-variant-numeric: tabular-nums; }
.sourcing-rating-summary .is-positive strong { color: #087e4e; }
.sourcing-rating-summary .is-negative strong { color: #b13b46; }
.sourcing-rating-summary .is-forecast { background: #fffaf0; }
.sourcing-rating-summary .is-forecast strong { color: #9b6410; }
.sourcing-rating-history { grid-column: 1 / -1; background: #fff; }
.sourcing-rating-history > summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; cursor: pointer; list-style: none; }
.sourcing-rating-history > summary::-webkit-details-marker { display: none; }
.sourcing-rating-history > summary > span:first-child { display: flex; align-items: baseline; gap: 7px; }
.sourcing-rating-history > summary strong { color: #244462; font-size: 10px; }
.sourcing-rating-history > summary small { color: #7a899a; font-size: 8px; }
.sourcing-rating-history > summary:focus-visible { outline: 3px solid rgba(40, 112, 212, .22); outline-offset: -3px; }
.sourcing-rating-history-list { border-top: 1px solid #e7edf3; }
.sourcing-rating-history-list > a { min-height: 48px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid #edf1f5; color: inherit; text-decoration: none; }
.sourcing-rating-history-list > a:first-child { border-top: 0; }
.sourcing-rating-history-list > a:hover { background: #f8fbff; }
.sourcing-rating-history-list > a:focus-visible { outline: 3px solid rgba(40, 112, 212, .22); outline-offset: -3px; }
.sourcing-rating-history-list > a > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.sourcing-rating-history-list strong { overflow: hidden; color: #173756; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-rating-history-list small { overflow: hidden; color: #718196; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-rating-history-list time,
.sourcing-rating-history-list em { color: #8090a1; font-size: 8px; font-style: normal; white-space: nowrap; }
.sourcing-rating-delta { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sourcing-rating-delta.is-positive { background: #e9f7f0; color: #087e4e; }
.sourcing-rating-delta.is-negative { background: #fff0f1; color: #b13b46; }
.sourcing-rating-delta.is-pending { border: 1px dashed #d5a54e; background: #fffaf0; color: #9b6410; }
.sourcing-rating-history-list > p { margin: 0; padding: 12px 14px; color: #718196; font-size: 9px; }
.sourcing-case-grid { gap: 10px; }
.sourcing-case-card {
  --sourcing-card-state: #2b68c8;
  --sourcing-card-state-soft: #edf4ff;
  min-width: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid #dce4ed;
  border-left: 5px solid var(--sourcing-card-state);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(18, 47, 79, .045);
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}
.sourcing-case-card:hover { border-color: color-mix(in srgb, var(--sourcing-card-state) 42%, #dce4ed); border-left-color: var(--sourcing-card-state); box-shadow: 0 8px 22px rgba(18, 47, 79, .1); transform: translateY(-1px); }
.sourcing-case-card:has(.sourcing-case-card-link:focus-visible) { outline: 3px solid color-mix(in srgb, var(--sourcing-card-state) 26%, transparent); outline-offset: 2px; }
.sourcing-case-card-link { position: absolute; z-index: 1; inset: 0; display: block; border-radius: inherit; }
.sourcing-case-card-link:focus-visible { outline: 0; }
.sourcing-card-state-processing,
.sourcing-card-state-searching { --sourcing-card-state: #2468d3; --sourcing-card-state-soft: #edf4ff; }
.sourcing-card-state-waiting { --sourcing-card-state: #b87309; --sourcing-card-state-soft: #fff5df; }
.sourcing-card-state-offers { --sourcing-card-state: #7051b5; --sourcing-card-state-soft: #f2edff; }
.sourcing-card-state-failed { --sourcing-card-state: #a52935; --sourcing-card-state-soft: #fdecef; }
.sourcing-card-state-completed { --sourcing-card-state: #078552; --sourcing-card-state-soft: #eaf8f1; }
.sourcing-card-state-decided { --sourcing-card-state: #19817d; --sourcing-card-state-soft: #eaf8f7; }
.sourcing-card-state-partial { --sourcing-card-state: #d15e12; --sourcing-card-state-soft: #fff1e8; }
.sourcing-card-state-cancelled { --sourcing-card-state: #7b8998; --sourcing-card-state-soft: #f0f3f6; }
.sourcing-card-header { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 13px 9px; }
.sourcing-card-identity { min-width: 0; }
.sourcing-card-identity > span { display: block; overflow: hidden; color: #718196; font-size: 8px; font-weight: 850; letter-spacing: .045em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.sourcing-card-identity h2 { overflow: hidden; margin: 4px 0 0; color: #123251; font-size: 16px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-card-identity p { overflow: hidden; margin: 4px 0 0; color: #6b7c90; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-card-ownership { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.sourcing-card-ownership > span { display: inline-flex; min-height: 20px; align-items: center; padding: 3px 7px; border-radius: 999px; background: #eef3f8; color: #526b83; font-size: 8px; font-weight: 850; }
.sourcing-card-ownership > span.is-leader { background: #eef2ff; color: #4f55a5; }
.sourcing-card-ownership > span.is-self { background: #eaf7f0; color: #087e4e; }
.sourcing-card-ownership small { overflow: hidden; color: #7b8999; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-case-owner { color: #4f6479; font-weight: 750; text-transform: none; }
.sourcing-card-state { min-width: 132px; display: grid; justify-items: end; gap: 5px; }
.sourcing-card-status { min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--sourcing-card-state) 18%, transparent); border-radius: 999px; background: var(--sourcing-card-state-soft); color: var(--sourcing-card-state); font-size: 9px; font-weight: 850; white-space: nowrap; }
.sourcing-card-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sourcing-card-state) 12%, transparent); }
.sourcing-card-state-processing .sourcing-card-status i,
.sourcing-card-state-searching .sourcing-card-status i { animation: sourcing-status-pulse 1.6s ease-in-out infinite; }
.sourcing-card-deadline { display: flex; align-items: baseline; gap: 5px; }
.sourcing-card-deadline span { color: #8491a1; font-size: 8px; font-weight: 750; }
.sourcing-card-deadline strong { color: var(--sourcing-card-state); font-size: 10px; font-variant-numeric: tabular-nums; }
.sourcing-card-price-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid #e6ebf1; background: #fbfcfe; }
.sourcing-card-price-row > div,
.sourcing-card-price-row > button { min-width: 0; display: grid; gap: 2px; padding: 8px 12px; border: 0; border-left: 1px solid #e6ebf1; background: transparent; color: inherit; font: inherit; text-align: left; }
.sourcing-card-price-row > div:first-child { border-left: 0; }
.sourcing-card-price-row span { color: #77879a; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.sourcing-card-price-row strong { overflow: hidden; color: #153654; font-size: 14px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-card-price-row small { color: #a1630a; font-size: 7px; font-weight: 800; }
.sourcing-card-price-row .saving-positive strong { color: #087e4e; }
.sourcing-card-saving { position: relative; z-index: 3; cursor: pointer; transition: background var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.sourcing-card-saving:hover { background: #f0fbf6; box-shadow: inset 0 0 0 1px rgba(18, 139, 87, .12); }
.sourcing-card-saving:focus-visible { outline: 3px solid rgba(18, 139, 87, .2); outline-offset: -3px; }
.sourcing-card-saving small { overflow: hidden; color: #37735c; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-card-saving.is-delivery-unknown small { color: #a1630a; }
.sourcing-card-saving.is-delivery-separate small { color: #715c9d; }
.sourcing-card-progress { min-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 12px; }
.sourcing-card-progress > span { overflow: hidden; color: #66798e; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-card-progress ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sourcing-card-progress li { width: 15px; height: 4px; border-radius: 999px; background: #dbe2ea; }
.sourcing-card-progress li.is-done { background: #52a97f; }
.sourcing-card-progress li.is-active { background: var(--sourcing-card-state); box-shadow: 0 0 0 2px var(--sourcing-card-state-soft); }
.sourcing-case-future-note { display: grid; gap: 2px; margin: 0 12px 7px; padding: 8px 10px; border: 1px solid #c9def5; border-radius: 9px; background: #f0f7ff; color: #3a5d81; font-size: 8px; }
.sourcing-case-future-note strong { color: #1f5f9f; font-size: 9px; }
.sourcing-case-alternative-note { display: grid; gap: 2px; margin: 0 12px 7px; padding: 8px 10px; border: 1px solid #efd5a8; border-radius: 9px; background: #fff8ec; color: #7d6035; font-size: 8px; }
.sourcing-case-alternative-note strong { color: #9a5a00; font-size: 9px; }
.sourcing-case-opportunity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 12px 7px; }
.sourcing-case-opportunity { width: 100%; min-width: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; position: relative; z-index: 3; border: 1px solid; border-radius: 12px; appearance: none; font: inherit; text-align: left; }
button.sourcing-case-opportunity { cursor: pointer; transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out); }
button.sourcing-case-opportunity:hover { border-color: #d9ae63; box-shadow: 0 9px 24px rgba(126, 83, 13, .12); transform: translateY(-1px); }
button.sourcing-case-opportunity:focus-visible { outline: 3px solid rgba(213, 126, 14, .22); outline-offset: 2px; }
.sourcing-case-opportunity > span { min-width: 0; display: grid; gap: 2px; }
.sourcing-case-opportunity > span:last-child { flex: 0 0 auto; min-width: 150px; text-align: right; }
.sourcing-case-opportunity strong { overflow: hidden; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-case-opportunity small { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-case-opportunity-copy em { margin-top: 4px; color: #a45d00; font-size: 9px; font-style: normal; font-weight: 900; }
.sourcing-case-opportunity-amount { padding-left: 12px; border-left: 1px solid rgba(168, 101, 13, .18); }
.sourcing-case-opportunity-amount small { color: #8d6a35; font-size: 7px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.sourcing-case-opportunity-amount strong { color: #153654; font-size: 11px; font-weight: 850; line-height: 1.1; }
.sourcing-case-opportunity-amount b { color: #087e4e; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.08; white-space: nowrap; }
.sourcing-case-opportunity.is-potential { border-color: #ead4a7; background: #fff9ed; color: #7d6035; }
.sourcing-case-opportunity.is-potential .sourcing-case-opportunity-copy > strong { color: #7b4900; }
.sourcing-case-opportunity.is-approved { border-color: rgba(33, 158, 104, .28); background: linear-gradient(135deg, #effcf6, #fbfffd); color: #08764c; text-decoration: none; }
.sourcing-case-opportunity.is-approved .sourcing-case-opportunity-copy > strong { color: #08764c; }
.sourcing-case-opportunity.is-partial { border-color: #c8dcf2; background: #f1f7fe; color: #486984; }
.sourcing-case-opportunity.is-partial strong { color: #1e5f9f; }
.sourcing-case-opportunity.is-partial .sourcing-case-opportunity-copy em { color: #1e6caf; }
.sourcing-case-opportunity.is-partial .sourcing-case-opportunity-amount { border-left-color: rgba(30, 95, 159, .16); }
.sourcing-case-opportunity.is-partial .sourcing-case-opportunity-amount small { color: #597994; }
.sourcing-alternative-review-dialog { width: min(980px, calc(100% - 24px)); border-radius: 24px; background: rgba(246, 249, 253, .98); box-shadow: 0 34px 110px rgba(8, 24, 46, .34); }
.sourcing-alternative-review-dialog::backdrop { background: rgba(12, 23, 40, .66); backdrop-filter: blur(11px) saturate(115%); }
.sourcing-alternative-review-card { gap: 16px; padding: 22px; position: relative; background: radial-gradient(circle at 92% 0, rgba(228, 239, 255, .88), transparent 34%), linear-gradient(145deg, rgba(255,255,255,.99), rgba(244,248,253,.98)); }
.sourcing-alternative-review-heading { padding: 2px 2px 1px; }
.sourcing-alternative-review-heading h2 { margin-top: 4px; color: #102e4d; font-size: 24px; letter-spacing: -.025em; }
.sourcing-alternative-review-heading p { max-width: 620px; margin: 5px 0 0; color: #6f8093; font-size: 11px; line-height: 1.45; }
.sourcing-alternative-review-savings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dce5ef; border-radius: 17px; background: rgba(255,255,255,.82); box-shadow: 0 10px 28px rgba(30, 65, 103, .06); }
.sourcing-alternative-review-savings > div { min-width: 0; display: grid; align-content: center; gap: 3px; min-height: 96px; padding: 15px 18px; }
.sourcing-alternative-review-savings > div + div { border-left: 1px solid #e0e7ef; }
.sourcing-alternative-review-savings span { color: #6e7f91; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.sourcing-alternative-review-savings strong { overflow: hidden; color: #173957; font-size: 25px; font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-alternative-review-savings small { color: #7a8999; font-size: 9px; }
.sourcing-alternative-review-savings .is-potential { background: linear-gradient(135deg, #fff8e8, #fffdf8); }
.sourcing-alternative-review-savings .is-potential span { color: #9b620c; }
.sourcing-alternative-review-savings .is-potential strong { color: #d66a00; }
.sourcing-offer-review-totals .is-saving { background: linear-gradient(135deg, #effaf5, #fbfffd); }
.sourcing-offer-review-totals .is-saving span,
.sourcing-offer-review-totals .is-saving strong { color: #087e4e; }
.sourcing-partial-review-totals .is-saving { background: linear-gradient(135deg, #eef9f4, #fbfffd); }
.sourcing-partial-review-totals .is-saving span,
.sourcing-partial-review-totals .is-saving strong { color: #087e4e; }
.sourcing-alternative-review-grid { min-height: 310px; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 12px; }
.sourcing-alternative-review-summary { min-width: 0; display: grid; align-content: start; gap: 10px; }
.sourcing-alternative-review-ai,
.sourcing-alternative-review-change,
.sourcing-alternative-review-letter { min-width: 0; border: 1px solid #dfe7f0; border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 7px 22px rgba(28, 61, 98, .045); }
.sourcing-alternative-review-ai { padding: 14px 15px; }
.sourcing-alternative-review-ai > span,
.sourcing-alternative-review-change span,
.sourcing-alternative-review-letter header span { color: #176bc0; font-size: 8px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sourcing-alternative-review-ai p { margin: 7px 0 0; color: #2d435a; font-size: 11px; font-weight: 650; line-height: 1.55; }
.sourcing-alternative-review-change { display: grid; overflow: hidden; }
.sourcing-alternative-review-change > div { display: grid; gap: 4px; padding: 12px 15px; border-top: 1px solid #e8edf3; }
.sourcing-alternative-review-change > div:first-child { border-top: 0; }
.sourcing-alternative-review-change strong { color: #203c58; font-size: 11px; line-height: 1.45; }
.sourcing-alternative-review-change small { color: #74869a; font-size: 9px; line-height: 1.45; }
.sourcing-alternative-review-change em { width: max-content; max-width: 100%; display: inline-flex; align-items: center; margin-top: 3px; padding: 4px 7px; border-radius: 999px; background: #fff1d7; color: #9b620c; font-size: 8px; font-style: normal; font-weight: 850; }
.sourcing-alternative-review-change .is-warning { background: #fff9ed; }
.sourcing-alternative-review-change .is-warning span { color: #a1640a; }
.sourcing-offer-review-terms .is-delivery-known { background: #f2fbf7; }
.sourcing-offer-review-terms .is-delivery-known span { color: #087e4e; }
.sourcing-offer-review-terms .is-delivery-unknown { background: #fff8e9; }
.sourcing-offer-review-terms .is-delivery-unknown span { color: #a1640a; }
.sourcing-offer-review-terms .is-delivery-separate { background: #f8f5ff; }
.sourcing-offer-review-terms .is-delivery-separate span { color: #6650a5; }
.sourcing-alternative-review-letter { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 15px 16px; overflow: hidden; }
.sourcing-alternative-review-letter header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.sourcing-alternative-review-letter header > div { min-width: 0; display: grid; gap: 3px; }
.sourcing-alternative-review-letter header strong { overflow: hidden; color: #1b3754; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-alternative-review-letter time,
.sourcing-alternative-review-letter > small { color: #74869a; font-size: 10px; white-space: nowrap; }
.sourcing-alternative-review-letter > small { margin-top: 5px; }
.sourcing-alternative-review-letter pre { min-height: 210px; max-height: 300px; margin: 12px 0 0; padding: 15px 16px; overflow: auto; border: 1px solid #e0e8f1; border-radius: 13px; background: #f8fafc; color: #263f58; font: 12.5px/1.68 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #a9b6c3 transparent; }
.sourcing-offer-review-attachments { display: grid; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px solid #e4eaf1; }
.sourcing-offer-review-attachments[hidden] { display: none; }
.sourcing-attachment-list-title { color: #63778d; font-size: 9px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sourcing-offer-review-attachments > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 7px; }
.sourcing-offer-review-attachments button.sourcing-attachment-chip { width: 100%; max-width: 100%; min-height: 56px; margin: 0; padding: 8px 10px; appearance: none; border-color: #d5e0ec; border-radius: 12px; background: linear-gradient(145deg, #fbfdff, #f2f7fc); font: inherit; text-align: left; cursor: pointer; }
.sourcing-offer-review-attachments button.sourcing-attachment-chip:hover { border-color: #8eb7df; background: #fff; box-shadow: 0 8px 20px rgba(24, 77, 129, .1); transform: translateY(-1px); }
.sourcing-offer-review-attachments button.sourcing-attachment-chip:focus-visible { outline: 3px solid rgba(8, 120, 249, .18); outline-offset: 2px; }
.sourcing-offer-review-attachments .sourcing-attachment-icon { min-width: 36px; min-height: 34px; border-radius: 9px; }
.sourcing-offer-review-attachments .sourcing-attachment-chip strong { color: #244768; font-size: 11px; }
.sourcing-offer-review-attachments .sourcing-attachment-chip small { max-width: none; color: #70849a; font-size: 9.5px; }
.sourcing-offer-review-attachments .sourcing-attachment-chip > span:last-child { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: #e8f3ff; color: #176bc0; font-size: 8px; font-weight: 900; }
.sourcing-thread-review-card { width: min(980px, calc(100vw - 32px)); max-height: min(860px, calc(100vh - 32px)); overflow: auto; }
.sourcing-thread-review-summary,
.sourcing-thread-review-attention,
.sourcing-thread-review-message { border: 1px solid #dce6f1; border-radius: 16px; background: rgba(255, 255, 255, .9); }
.sourcing-thread-review-summary { padding: 16px; }
.sourcing-thread-review-summary > span,
.sourcing-thread-review-attention > strong { display: block; margin-bottom: 6px; color: #286292; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.sourcing-thread-review-summary > p { margin: 0 0 12px; color: #17324d; font-size: 15px; line-height: 1.55; }
.sourcing-thread-review-attention { display: grid; gap: 10px; padding: 14px 16px; background: #fffaf0; border-color: #efd9a9; }
.sourcing-thread-review-attention > div { display: grid; gap: 4px; }
.sourcing-thread-review-attention span { color: #8a570a; font-size: 11px; font-weight: 800; }
.sourcing-thread-review-attention ul { margin: 0; padding-left: 18px; color: #4a3b24; font-size: 13px; line-height: 1.5; }
.sourcing-thread-review-messages { display: grid; gap: 12px; }
.sourcing-thread-review-message { overflow: hidden; }
.sourcing-thread-review-message > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid #e4ebf3; background: #f7faff; }
.sourcing-thread-review-message > header div { display: grid; gap: 3px; min-width: 0; }
.sourcing-thread-review-message > header span,
.sourcing-thread-review-message > header time { color: #6b7f94; font-size: 10px; }
.sourcing-thread-review-message > header strong { overflow-wrap: anywhere; color: #17324d; font-size: 14px; }
.sourcing-thread-review-message > pre { margin: 0; padding: 16px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #243d56; background: #fff; font: 13px/1.62 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.sourcing-thread-review-message .sourcing-offer-review-attachments { margin: 0 16px 16px; }

.sourcing-reply-source-dialog { width: min(980px, calc(100% - 28px)); max-height: min(820px, calc(100dvh - 28px)); overflow: hidden; border-radius: 25px; background: #f4f7fb; box-shadow: 0 40px 130px rgba(5, 18, 34, .45); }
.sourcing-reply-source-dialog::backdrop { background: rgba(5, 15, 29, .56); -webkit-backdrop-filter: blur(12px) saturate(112%); backdrop-filter: blur(12px) saturate(112%); }
.sourcing-reply-source-shell { max-height: min(820px, calc(100dvh - 28px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: radial-gradient(circle at 100% 0, rgba(191, 221, 255, .4), transparent 30rem), linear-gradient(145deg, #fbfdff, #eff4f9); }
.sourcing-reply-source-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 21px 16px; border-bottom: 1px solid rgba(50, 82, 116, .12); background: rgba(255,255,255,.82); }
.sourcing-reply-source-header > div { min-width: 0; display: grid; gap: 3px; }
.sourcing-reply-source-header span { color: #176bc0; font-size: 9px; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.sourcing-reply-source-header h2 { overflow: hidden; margin: 0; color: #122f4b; font-size: clamp(19px, 2vw, 25px); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-reply-source-header small { color: #6d8297; font-size: 11px; }
.sourcing-reply-source-content { min-height: 0; display: grid; grid-template-columns: minmax(200px, .32fr) minmax(0, 1fr); gap: 12px; padding: 15px; overflow: auto; }
.sourcing-reply-source-meta { min-width: 0; display: grid; align-content: start; gap: 1px; overflow: hidden; border: 1px solid #dce6f0; border-radius: 16px; background: #dce6f0; }
.sourcing-reply-source-meta > div { min-width: 0; display: grid; gap: 4px; padding: 13px 14px; background: rgba(255,255,255,.94); }
.sourcing-reply-source-meta span { color: #71859a; font-size: 8.5px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sourcing-reply-source-meta strong { overflow-wrap: anywhere; color: #25425e; font-size: 11.5px; line-height: 1.45; }
.sourcing-reply-source-letter { min-width: 0; display: grid; align-content: start; padding: 16px; overflow: hidden; border: 1px solid #dce6f0; border-radius: 16px; background: rgba(255,255,255,.94); }
.sourcing-reply-source-letter > span { color: #176bc0; font-size: 9px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sourcing-reply-source-letter > pre { min-height: 250px; max-height: 440px; margin: 11px 0 0; padding: 16px 17px; overflow: auto; border: 1px solid #e0e8f1; border-radius: 13px; background: #f8fafc; color: #263f58; font: 14.5px/1.7 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #a9b6c3 transparent; }
.sourcing-reply-source-actions { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 16px 11px 20px; border-top: 1px solid rgba(50, 82, 116, .12); background: rgba(255,255,255,.9); }
.sourcing-reply-source-actions > span { color: #71859a; font-size: 10px; }
.sourcing-reply-source-actions .button { min-height: 42px; }

.sourcing-attachment-viewer { width: min(1180px, calc(100% - 28px)); height: min(820px, calc(100dvh - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; border-radius: 24px; background: #f2f6fb; box-shadow: 0 40px 130px rgba(5, 18, 34, .46); }
.sourcing-attachment-viewer::backdrop { background: rgba(5, 15, 29, .58); -webkit-backdrop-filter: blur(13px) saturate(112%); backdrop-filter: blur(13px) saturate(112%); }
.sourcing-attachment-viewer-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: radial-gradient(circle at 100% 0, rgba(184, 218, 255, .46), transparent 30rem), linear-gradient(145deg, #fbfdff, #eef4fa); }
.sourcing-attachment-viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 19px 15px; border-bottom: 1px solid rgba(50, 82, 116, .12); background: rgba(255, 255, 255, .83); }
.sourcing-attachment-viewer-header > div { min-width: 0; display: grid; gap: 3px; }
.sourcing-attachment-viewer-header span { color: #176bc0; font-size: 9px; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.sourcing-attachment-viewer-header h2 { overflow: hidden; margin: 0; color: #112f4d; font-size: 21px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-attachment-viewer-header small { color: #75889c; font-size: 10px; }
.sourcing-attachment-viewer-stage { min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; background: #dfe6ee; }
.sourcing-attachment-viewer-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.sourcing-attachment-viewer-stage img { display: block; max-width: 100%; max-height: 100%; padding: 22px; object-fit: contain; }
.sourcing-attachment-viewer-stage > [hidden] { display: none !important; }
.sourcing-attachment-viewer-loading { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(237, 243, 249, .94); color: #315674; }
.sourcing-attachment-viewer-loading[hidden] { display: none; }
.sourcing-attachment-viewer-loading span { width: 34px; height: 34px; border: 3px solid #c9d7e5; border-top-color: #0878f2; border-radius: 50%; animation: sourcing-attachment-spin .72s linear infinite; }
.sourcing-attachment-viewer-loading strong { font-size: 12px; }
.sourcing-attachment-viewer-file { display: grid; place-items: center; gap: 8px; max-width: 420px; padding: 30px; color: #526a82; text-align: center; }
.sourcing-attachment-viewer-file > span { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 19px; background: linear-gradient(145deg, #e7f2ff, #fff); color: #176bc0; box-shadow: 0 13px 30px rgba(22, 86, 151, .13); font-size: 14px; font-weight: 950; }
.sourcing-attachment-viewer-file strong { color: #183a59; font-size: 17px; }
.sourcing-attachment-viewer-file p { margin: 0; font-size: 12px; line-height: 1.55; }
.sourcing-attachment-viewer-actions { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 16px 11px 19px; border-top: 1px solid rgba(50, 82, 116, .12); background: rgba(255, 255, 255, .9); }
.sourcing-attachment-viewer-actions > span { color: #71859a; font-size: 10px; }
.sourcing-attachment-viewer-actions > div { display: flex; gap: 8px; }
.sourcing-attachment-viewer-actions .button { min-height: 42px; }
@keyframes sourcing-attachment-spin { to { transform: rotate(360deg); } }
.sourcing-partial-review-lines { overflow: hidden; border: 1px solid #dce6f0; border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 7px 22px rgba(28, 61, 98, .045); }
.sourcing-partial-review-lines > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #e5ecf3; background: #f5f9fd; }
.sourcing-partial-review-lines > header span { color: #176bc0; font-size: 8px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.sourcing-partial-review-lines > header strong { color: #315b82; font-size: 10px; }
.sourcing-partial-review-lines > div { display: grid; }
.sourcing-partial-review-lines article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #e9eef4; }
.sourcing-partial-review-lines article:first-child { border-top: 0; }
.sourcing-partial-review-lines article > span { min-width: 0; display: grid; gap: 3px; }
.sourcing-partial-review-lines article > span:not(:first-child) { text-align: right; }
.sourcing-partial-review-lines article strong { overflow: hidden; color: #203d59; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-partial-review-lines article > span:last-child strong { color: #1d659f; }
.sourcing-partial-review-lines article small { color: #74869a; font-size: 8px; white-space: nowrap; }
.sourcing-alternative-review-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.sourcing-alternative-review-actions form { margin: 0; }
.sourcing-alternative-review-actions .button { min-height: 42px; }
.sourcing-alternative-review-actions .is-danger { color: #a8323d; }
.sourcing-alternative-review-actions .is-danger:hover { border-color: #efb4ba; background: #fff2f3; }
.sourcing-alternative-clarify-form { display: grid; gap: 11px; padding: 14px; border: 1px solid #cfe0f3; border-radius: 16px; background: rgba(244,249,255,.96); animation: ui-dialog-in .17s var(--ease-out) both; }
.sourcing-alternative-clarify-form[hidden] { display: none; }
.sourcing-alternative-clarify-form label { display: grid; gap: 6px; }
.sourcing-alternative-clarify-form label > span { color: #315270; font-size: 10px; font-weight: 850; }
.sourcing-alternative-clarify-form textarea { width: 100%; min-height: 104px; resize: vertical; border: 1px solid #cfdbe8; border-radius: 13px; background: #fff; color: #20374e; font: 11px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.sourcing-alternative-clarify-form textarea:focus { border-color: #4090e8; outline: 3px solid rgba(40, 123, 221, .13); }
.sourcing-alternative-clarify-form > div { display: flex; justify-content: flex-end; gap: 8px; }
.sourcing-alternative-review-wait { display: grid; gap: 3px; padding: 13px 15px; border: 1px solid #e9d39f; border-radius: 14px; background: #fff9ec; }
.sourcing-alternative-review-wait strong { color: #8c5709; font-size: 11px; }
.sourcing-alternative-review-wait span { color: #7c6a4d; font-size: 9px; }
.sourcing-alternative-review-feedback { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; border-radius: inherit; background: rgba(248, 252, 250, .94); backdrop-filter: blur(12px); animation: ui-dialog-in .18s var(--ease-out) both; }
.sourcing-alternative-review-feedback[hidden] { display: none; }
.sourcing-alternative-review-feedback span { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: #0b9860; color: #fff; box-shadow: 0 18px 42px rgba(11, 152, 96, .26); font-size: 36px; animation: sourcing-success-pop .34s cubic-bezier(.2,1.45,.45,1) both; }
.sourcing-alternative-review-feedback strong { max-width: 480px; color: #153c2c; font-size: 16px; text-align: center; }
.sourcing-alternative-review-error { margin: 0; padding: 10px 12px; border: 1px solid #f1c0c4; border-radius: 12px; background: #fff1f2; color: #a52c38; font-size: 10px; font-weight: 750; }
.sourcing-alternative-review-error[hidden] { display: none; }
@keyframes sourcing-success-pop { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: scale(1); } }
.sourcing-case-footer { min-height: 38px; padding: 7px 12px; border-top: 1px solid #edf1f5; color: #738397; font-size: 9px; }
.sourcing-card-actions { z-index: 2; display: flex; align-items: center; gap: 8px; position: relative; }
.sourcing-case-open { color: #315d8e; font-size: 9px; font-weight: 850; }
@keyframes sourcing-status-pulse { 50% { opacity: .38; box-shadow: 0 0 0 5px color-mix(in srgb, var(--sourcing-card-state) 8%, transparent); } }

@media (min-width: 1280px) {
  .sourcing-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-case-grid > .empty-state { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .sourcing-buyer-rating { grid-template-columns: 1fr; }
  .sourcing-rating-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-rating-history { grid-column: auto; }
  .sourcing-rating-history-list > a { grid-template-columns: 48px minmax(0, 1fr); }
  .sourcing-rating-history-list time,
  .sourcing-rating-history-list em { grid-column: 2; }
  .sourcing-card-header { grid-template-columns: 1fr; gap: 8px; }
  .sourcing-card-state { min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; }
  .sourcing-card-deadline { justify-self: end; }
  .sourcing-card-price-row > div,
  .sourcing-card-price-row > button { padding: 8px; }
  .sourcing-card-price-row span { font-size: 7px; }
  .sourcing-card-price-row strong { font-size: 12px; }
  .sourcing-card-progress > span { white-space: normal; }
  .sourcing-case-opportunity-list { grid-template-columns: 1fr; }
  .sourcing-case-opportunity { align-items: stretch; flex-direction: column; }
  .sourcing-case-opportunity > span:last-child { min-width: 0; text-align: left; }
  .sourcing-case-opportunity-amount { padding: 8px 0 0; border-top: 1px solid rgba(168, 101, 13, .18); border-left: 0; }
  .sourcing-alternative-review-card { padding: 16px; }
  .sourcing-alternative-review-savings,
  .sourcing-alternative-review-grid { grid-template-columns: 1fr; }
  .sourcing-alternative-review-savings > div + div { border-top: 1px solid #e0e7ef; border-left: 0; }
  .sourcing-alternative-review-savings > div { min-height: 82px; }
  .sourcing-partial-review-lines article { grid-template-columns: 1fr; gap: 7px; }
  .sourcing-partial-review-lines article > span:not(:first-child) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; text-align: left; }
  .sourcing-alternative-review-actions { display: grid; }
  .sourcing-alternative-review-actions form,
  .sourcing-alternative-review-actions .button { width: 100%; }
  .sourcing-alternative-clarify-form > div { display: grid; }
  .sourcing-alternative-clarify-form .button { width: 100%; }
  .sourcing-alternative-review-letter pre { min-height: 230px; max-height: 42dvh; font-size: 13px; }
  .sourcing-reply-source-button { grid-template-columns: 32px minmax(0, 1fr); }
  .sourcing-reply-source-button > em { display: none; }
  .sourcing-reply-source-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); border-radius: 18px; }
  .sourcing-reply-source-shell { max-height: calc(100dvh - 12px); }
  .sourcing-reply-source-header { padding: 14px; }
  .sourcing-reply-source-header h2 { font-size: 18px; white-space: normal; }
  .sourcing-reply-source-content { grid-template-columns: 1fr; padding: 10px; }
  .sourcing-reply-source-meta { grid-template-columns: 1fr; }
  .sourcing-reply-source-letter { padding: 12px; }
  .sourcing-reply-source-letter > pre { min-height: 220px; max-height: 42dvh; padding: 13px; font-size: 14px; }
  .sourcing-reply-source-actions { align-items: stretch; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
  .sourcing-reply-source-actions > span { text-align: center; }
  .sourcing-reply-source-actions .button { width: 100%; }
  .sourcing-attachment-viewer { width: calc(100% - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); border-radius: 18px; }
  .sourcing-attachment-viewer-header { padding: 13px 14px; }
  .sourcing-attachment-viewer-header h2 { font-size: 17px; }
  .sourcing-attachment-viewer-stage img { padding: 10px; }
  .sourcing-attachment-viewer-actions { align-items: stretch; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
  .sourcing-attachment-viewer-actions > span { text-align: center; }
  .sourcing-attachment-viewer-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .sourcing-attachment-viewer-actions .button { width: 100%; padding-inline: 10px; }
  .sourcing-case-footer { display: flex; }
  .sourcing-future-opportunity { align-items: stretch; flex-direction: column; }
  .sourcing-alternative-opportunity { align-items: stretch; flex-direction: column; }
}

.sourcing-savings-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sourcing-savings-lanes > article { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid; border-radius: 14px; box-shadow: 0 7px 20px rgba(18, 47, 79, .055); }
.sourcing-savings-lanes > article > div { min-width: 0; display: grid; align-content: center; gap: 4px; min-height: 74px; padding: 11px 13px; }
.sourcing-savings-lanes > article > div + div { border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 12%, transparent); }
.sourcing-savings-lanes span { color: inherit; font-size: 11px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.sourcing-savings-lanes strong { overflow: hidden; color: var(--sourcing-ink); font-size: 17px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-savings-lanes small { overflow: hidden; color: inherit; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-savings-lanes .is-potential { border-color: #ead4a7; background: linear-gradient(135deg, #fffaf0, #fff); color: #835f29; }
.sourcing-savings-lanes .is-potential strong { color: #935b00; }
.sourcing-savings-lanes .is-partial { border-color: #c8dcf2; background: linear-gradient(135deg, #f2f8ff, #fff); color: #4a6b89; }
.sourcing-savings-lanes .is-partial strong { color: #1f609f; }

@media (max-width: 760px) {
  .sourcing-savings-lanes { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .authenticated-app .user-password-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d8e5f2;
    background: #f7faff;
    font-size: 12px;
  }
}

/* People management styles are route-scoped in css/people-workspace.css. */

/* Warehouse digitization: one clear entry point for existing physical stock. */
.stock-heading-actions .button-primary { box-shadow: 0 9px 22px rgba(26, 112, 224, .2); }
.stock-workflow-switcher { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 0 0 18px; }
.stock-workflow-switcher > a { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #dbe5f0; border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(28, 58, 91, .055); color: #163651; text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.stock-workflow-switcher > a:hover { border-color: #a9c8ec; background: #fff; box-shadow: 0 12px 28px rgba(28, 70, 119, .1); }
.stock-workflow-switcher > a:focus-visible { outline: 3px solid rgba(32, 126, 229, .25); outline-offset: 2px; }
.stock-workflow-switcher > a.is-active,
.stock-workflow-switcher > a.is-primary { border-color: #91c2f8; background: linear-gradient(145deg, #f4faff 0%, #e9f4ff 100%); box-shadow: 0 11px 28px rgba(24, 110, 210, .12); }
.stock-workflow-switcher > a > span:last-child { min-width: 0; display: grid; gap: 3px; }
.stock-workflow-switcher strong { color: #102f4c; font-size: 13px; line-height: 1.25; }
.stock-workflow-switcher small { color: #687b8f; font-size: 11px; line-height: 1.35; }
.stock-workflow-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 1px solid #d8e9fa; border-radius: 13px; background: #edf6ff; color: #1374d5; font-size: 22px; font-weight: 500; }
.stock-workflow-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.stock-list-workflows { margin-top: -2px; }
.stock-issue-guide { display: flex; align-items: flex-start; gap: 13px; margin: 0 0 16px; padding: 15px 17px; border: 1px solid #a8d0f7; border-radius: 17px; background: linear-gradient(145deg, #f5faff 0%, #eaf5ff 100%); box-shadow: 0 10px 28px rgba(25, 106, 190, .09); color: #28516f; }
.stock-issue-guide-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: #147be0; box-shadow: 0 7px 18px rgba(20, 123, 224, .22); color: #fff; font-size: 22px; font-weight: 700; }
.stock-issue-guide > div { display: grid; gap: 4px; }
.stock-issue-guide strong { color: #123f68; font-size: 13px; }
.stock-issue-guide p { max-width: 820px; margin: 0; font-size: 11px; line-height: 1.5; }
.issue-empty-state { min-height: 150px; display: grid; justify-items: center; align-content: center; gap: 9px; padding: 24px; text-align: center; }
.issue-empty-state > span { max-width: 660px; color: #6b7e91; font-size: 11px; line-height: 1.5; }
.issue-empty-state .button { margin-top: 3px; }
.warehouse-ready-heading { align-items: end; margin-top: 18px; }
.warehouse-ready-heading > div { display: grid; gap: 3px; }
.warehouse-ready-heading h2,
.warehouse-ready-heading p { margin: 0; }
.warehouse-ready-heading p { color: #718296; font-size: 10px; font-weight: 600; }
.warehouse-ready-list { display: grid; gap: 10px; margin-bottom: 22px; }
.warehouse-ready-card { position: relative; display: grid; grid-template-columns: 5px minmax(0, 1fr) minmax(230px, auto); gap: 16px; align-items: center; overflow: visible; padding: 14px 15px 14px 0; border: 1px solid #cde3d9; border-radius: 17px; background: linear-gradient(145deg, rgba(247, 253, 250, .98), rgba(255, 255, 255, .98)); box-shadow: 0 10px 28px rgba(26, 82, 59, .065); }
.warehouse-ready-card.has-warning { border-color: #edcf9a; background: linear-gradient(145deg, #fffaf0, #fff); }
.warehouse-ready-state { align-self: stretch; overflow: hidden; border-radius: 17px 0 0 17px; background: #159364; }
.warehouse-ready-card.has-warning .warehouse-ready-state { background: #d88b19; }
.warehouse-ready-main { min-width: 0; display: grid; gap: 4px; }
.warehouse-ready-main h3 { margin: 0; color: #123451; font-size: 15px; line-height: 1.3; }
.warehouse-ready-main p,
.warehouse-ready-main small { margin: 0; color: #60758a; font-size: 10px; line-height: 1.45; }
.warehouse-ready-alert { margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: #fff1d7; color: #8a570b; font-size: 10px; font-weight: 750; }
.warehouse-ready-actions { min-width: 230px; display: grid; justify-items: end; gap: 8px; }
.warehouse-ready-actions > form,
.warehouse-ready-actions > details { width: 100%; }
.warehouse-ready-actions > form .button,
.warehouse-ready-actions > details > summary { width: 100%; min-height: 42px; justify-content: center; }
.warehouse-ready-actions > small { max-width: 260px; color: #587066; font-size: 10px; line-height: 1.4; text-align: right; }
.request-status-ready_for_pickup { border-color: #bfe6d5; background: #eaf8f1; color: #087a4f; }
.stock-prepared-value { color: #98610a !important; font-size: 13px !important; }
.warehouse-dashboard-actions { margin-bottom: 18px; }
.warehouse-dashboard-actions .section-heading { margin-bottom: 10px; }
.stock-search-panel { margin-top: 4px; }
.stock-empty { min-height: 210px; display: grid; justify-items: center; align-content: center; gap: 9px; text-align: center; }
.stock-empty > span { max-width: 440px; color: #6c7d90; font-size: 12px; }
.stock-empty .button { margin-top: 5px; }

.stock-digitize-header .page-heading-actions { align-self: center; }
.stock-digitize-layout { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(285px, .62fr); gap: 16px; align-items: start; }
.stock-digitize-card { overflow: hidden; padding: 0; border-radius: 20px; box-shadow: 0 18px 42px rgba(21, 55, 90, .08); }
.stock-digitize-card-header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 17px; border-bottom: 1px solid #e6edf4; background: linear-gradient(145deg, #fff 0%, #f6faff 100%); }
.stock-digitize-card-header > div { display: grid; gap: 4px; }
.stock-digitize-card-header h2 { margin: 0; color: #102e4a; font-size: 20px; letter-spacing: -.02em; }
.stock-digitize-card-header p { margin: 0; color: #687b8f; font-size: 12px; }
.stock-digitize-step { min-height: 25px; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #e9f4ff; color: #116fc9; font-size: 9px; font-weight: 850; white-space: nowrap; }
.stock-digitize-form { gap: 15px; padding: 20px 22px 22px; }
.stock-digitize-form input,
.stock-digitize-form select,
.stock-digitize-form textarea { min-height: 46px; border-color: #cfdbe8; background: #fff; font-size: 13px; }
.stock-digitize-form textarea { min-height: 78px; }
.stock-digitize-form input:focus,
.stock-digitize-form select:focus,
.stock-digitize-form textarea:focus { border-color: #318de8; box-shadow: 0 0 0 4px rgba(49, 141, 232, .13); }
.stock-item-picker { padding-bottom: 2px; }
.stock-item-search-wrap { position: relative; }
.stock-item-search-wrap svg { width: 19px; height: 19px; position: absolute; top: 50%; left: 14px; transform: translateY(-50%); fill: none; stroke: #6f8295; stroke-linecap: round; stroke-width: 1.8; pointer-events: none; }
.stock-item-search-wrap input { width: 100%; padding-left: 43px; }
.stock-field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stock-field-label-row > a { color: #176fc3; font-size: 10px; font-weight: 800; text-decoration: none; }
.stock-field-label-row > a:hover { text-decoration: underline; }
.stock-quantity-field input { max-width: 280px; font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 750; }
.stock-quantity-unit-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(190px, .8fr); gap: 12px; align-items: start; }
.stock-quantity-unit-row .stock-quantity-field input { max-width: none; }
.stock-unit-field select { font-weight: 780; color: #12395d; }
.stock-unit-summary { display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px; border: 1px solid #cfe2f4; border-radius: 13px; background: linear-gradient(145deg, #f5faff 0%, #edf7ff 100%); color: #365c7e; }
.stock-unit-summary-icon { min-width: 36px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #dceeff; color: #0873d7; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.stock-unit-summary > span:last-child { display: grid; gap: 3px; }
.stock-unit-summary strong { color: #123f69; font-size: 12px; }
.stock-unit-summary small { color: #657d93; font-size: 10px; line-height: 1.45; }
.stock-item-details-field textarea { min-height: 70px; }
.stock-item-specification { display: block; max-width: 760px; margin-top: 5px; color: #526b82; font-size: 11px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.stock-digitize-note { border: 1px solid #e0e8f0; border-radius: 13px; background: #f9fbfd; }
.stock-digitize-note > summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; color: #36516b; cursor: pointer; font-size: 11px; font-weight: 800; }
.stock-digitize-note > summary span { color: #8190a0; font-size: 9px; font-weight: 650; }
.stock-digitize-note > .field { padding: 0 13px 13px; }
.stock-digitize-confirmation { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid #cfe2f4; border-radius: 13px; background: #f1f8ff; color: #365c7e; }
.stock-digitize-confirmation svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: #1877d4; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.stock-digitize-confirmation span { display: grid; gap: 3px; }
.stock-digitize-confirmation strong { color: #174b7c; font-size: 11px; }
.stock-digitize-confirmation small { font-size: 9px; line-height: 1.45; }
.stock-digitize-submit { min-height: 48px; width: 100%; border-radius: 14px; box-shadow: 0 10px 25px rgba(19, 111, 214, .21); font-size: 13px; }
.stock-digitize-submit:disabled { box-shadow: none; cursor: wait; opacity: .62; }
.stock-digitize-error { display: grid; gap: 5px; padding: 12px 13px; border: 1px solid #f2c7cc; border-radius: 13px; background: #fff4f5; color: #a22f3d; }
.stock-digitize-error strong { font-size: 12px; }
.stock-digitize-aside { display: grid; gap: 13px; }
.stock-guide-card,
.stock-recent-card { overflow: hidden; border: 1px solid #dce5ef; border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 10px 28px rgba(24, 55, 87, .055); }
.stock-guide-card { display: grid; gap: 0; padding: 17px; }
.stock-guide-kicker { margin-bottom: 8px; color: #74869a; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.stock-guide-card > div { display: grid; gap: 3px; padding: 11px 0; border-top: 1px solid #e9eef4; }
.stock-guide-card > div:first-of-type { border-top: 0; }
.stock-guide-card strong { color: #163653; font-size: 11px; }
.stock-guide-card p { margin: 0; color: #6e7f91; font-size: 10px; line-height: 1.45; }
.stock-recent-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px 11px; }
.stock-recent-card h2 { margin: 0; color: #143451; font-size: 14px; }
.stock-recent-card header a { color: #176fc3; font-size: 9px; font-weight: 800; text-decoration: none; }
.stock-recent-card > div { display: grid; padding: 0 16px 8px; }
.stock-recent-card article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #e9eef4; }
.stock-recent-card article > span { min-width: 0; display: grid; gap: 3px; }
.stock-recent-card article strong { overflow: hidden; color: #25445f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stock-recent-card article small { color: #8391a0; font-size: 8px; }
.stock-recent-card article b { color: #087b4c; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-recent-empty { margin: 0 0 8px; padding: 13px; border-radius: 12px; background: #f6f9fc; color: #74869a; font-size: 10px; line-height: 1.45; }

@media (max-width: 980px) {
  .stock-digitize-layout { grid-template-columns: 1fr; }
  .stock-digitize-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .stock-workflow-switcher { grid-template-columns: 1fr; }
  .stock-workflow-switcher > a { min-height: 66px; }
  .stock-digitize-card { border-radius: 16px; }
  .stock-digitize-card-header { padding: 17px 15px 14px; }
  .stock-digitize-form { padding: 16px 15px 18px; }
  .stock-field-label-row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .stock-quantity-field input { max-width: none; }
  .stock-quantity-unit-row { grid-template-columns: 1fr; }
  .stock-digitize-aside { grid-template-columns: 1fr; }
  .warehouse-ready-card { grid-template-columns: 5px minmax(0, 1fr); padding-right: 12px; }
  .warehouse-ready-actions { min-width: 0; grid-column: 2; justify-items: stretch; }
  .warehouse-ready-actions > small { max-width: none; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .stock-workflow-switcher > a { transition: none; }
}
