/* governance area styles (loaded after app.css): approval tiers, portal branding, negotiation process,
   RFQ process stepper, award approval chain, locked/coming-soon cards. */

/* ---------- Locked & coming-soon cards ---------- */
.gov-section { margin-top: 28px; }
.gov-locked .card-head h2 svg { color: var(--steel-2); }
.gov-locked-body { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.gov-locked-body p { margin: 0; max-width: 620px; flex: 1 1 260px; color: var(--ink-2); }
.gov-locked .tier-chip svg { width: 11px; height: 11px; }
.gov-locked.ent-card .card-head { border-bottom-color: rgba(184, 149, 74, .35); }
.gov-locked.ent-card .card-head h2 { color: #F3E2B3; }
.gov-locked.ent-card .card-head h2 svg { color: #B8954A; }
.gov-locked.ent-card .gov-locked-body p { color: #D9D2BE; }
.gov-locked.ent-card .btn:hover { background: rgba(184, 149, 74, .14); }
.gov-soon { border-style: dashed; box-shadow: none; }
.gov-soon .card-head h2 { color: var(--ink-2); }
.gov-soon-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.gov-soon-list li + li { margin-top: 3px; }
.grid.g2 > .card + .card { margin-top: 0; }

/* ---------- Approval tiers ---------- */
.gov-example { background: var(--sky-soft); color: #22348F; border-radius: var(--r-sm); padding: 8px 12px; }
.gov-empty { padding: 10px 12px; border: 1px dashed var(--rule); border-radius: var(--r-sm); }
.gov-tier { display: grid; grid-template-columns: 26px minmax(110px, 150px) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 10px; align-items: end; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: var(--r-md); background: var(--paper); }
.gov-tier-n { width: 24px; height: 24px; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; margin-bottom: 5px; }
.gov-tier-x { margin-bottom: 1px; }
@media (max-width: 900px) {
  .gov-tier { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .gov-tier > .field:nth-of-type(1) { grid-column: 2; }
  .gov-tier > .field:nth-of-type(2) { grid-column: 3; }
  .gov-tier > .gov-tier-x { grid-column: 4; grid-row: 1; }
  .gov-tier > .field:nth-of-type(3) { grid-column: 2; }
  .gov-tier > .field:nth-of-type(4) { grid-column: 3 / span 2; }
}
@media (max-width: 560px) {
  .gov-tier { grid-template-columns: minmax(0, 1fr) 32px; align-items: start; }
  .gov-tier-n { grid-column: 1; grid-row: 1; margin: 0; }
  .gov-tier > .gov-tier-x { grid-column: 2; grid-row: 1; }
  .gov-tier > .field:nth-of-type(n) { grid-column: 1 / -1; }
}

/* ---------- Portal branding ---------- */
.gov-brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px 28px; align-items: start; }
@media (max-width: 900px) { .gov-brand-grid { grid-template-columns: minmax(0, 1fr); } }
.gov-color { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--white); cursor: pointer; flex: none; }
.gov-logo-thumb { display: inline-grid; place-items: center; height: 34px; min-width: 34px; max-width: 120px; padding: 3px 6px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; }
.gov-logo-thumb img { max-height: 26px; max-width: 106px; object-fit: contain; }
.gov-preview { border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.gov-preview .portal-top .inner { padding: 12px 14px; }
.gov-preview .portal-top.branded .buyer-brand { font-size: 15px; min-width: 0; }
.gov-preview .portal-top.branded .buyer-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gov-preview .portal-top .buyer { color: rgba(255, 255, 255, .72); flex: none; }
.gov-preview-body { padding: 16px 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.gov-sk { display: block; height: 9px; border-radius: 99px; background: var(--rule); }
.gov-sk.w60 { width: 60%; height: 13px; background: #CBD2E3; } .gov-sk.w90 { width: 90%; } .gov-sk.w40 { width: 40%; }
.gov-sk-btn { display: block; width: 110px; height: 26px; border-radius: var(--r-sm); margin-top: 4px; }

/* ---------- Process templates (settings) ---------- */
.gov-tpls > li { padding: 12px 0; }
.gov-chainline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin-top: 8px; }
.gov-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--sky-soft); color: var(--sky-ink); font-size: 12px; font-weight: 600; max-width: 100%; }
.gov-pill svg { width: 13px; height: 13px; flex: none; }
.gov-pill.opt { background: var(--white); border: 1px dashed var(--steel-2); color: var(--steel); }
.gov-arrow { color: var(--steel-2); font-weight: 700; }
.gov-empty-proc { padding: 12px 14px; border: 1px dashed var(--rule); border-radius: var(--r-md); }
.gov-req { justify-content: flex-end; padding-bottom: 2px; }
.gov-bsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gov-bstep { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 10px 12px; background: var(--paper); }
.gov-bstep-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gov-bstep-type { flex: 1 1 auto; max-width: 300px; font-weight: 600; }
.gov-bstep-tools { margin-left: auto; display: flex; gap: 2px; flex: none; }
.gov-bstep-tools .btn { font-size: 15px; }
.gov-bstep-grid { gap: 10px 12px; }

/* ---------- RFQ process stepper ---------- */
.gov-proc { overflow: hidden; }
.gov-proc .card-head h2 { min-width: 0; overflow-wrap: anywhere; }
.gov-meter { height: 3px; background: var(--rule-2); }
.gov-meter span { display: block; height: 100%; background: var(--win); transition: width .3s; }
.gov-steps { list-style: none; margin: 0; padding: 14px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; counter-reset: none; }
.gov-step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 11px; border: 1px solid var(--rule); border-top: 3px solid var(--rule); border-radius: var(--r-md); background: var(--white); min-width: 0; }
.gov-step.st-done { border-top-color: var(--win); background: #FAFDFB; }
.gov-step.st-in_progress { border-top-color: #E2A23B; }
.gov-step.st-rejected { border-top-color: var(--red); background: #FFFBFB; }
.gov-step.st-skipped { border-top-style: dashed; border-top-color: var(--steel-2); background: var(--paper); }
.gov-step.st-skipped .gov-step-name { text-decoration: line-through; color: var(--steel); }
.gov-step.current { border-color: var(--oxide-btn); box-shadow: 0 0 0 1px var(--oxide-btn) inset; }
.gov-step.current.st-pending { border-top-color: var(--oxide-btn); }
.gov-step-top { display: flex; align-items: center; gap: 6px; }
.gov-step-top .badge { margin-left: auto; }
.gov-step-n { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule); background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; color: var(--ink-2); }
.gov-step.st-done .gov-step-n, .gov-step.st-skipped .gov-step-n { background: var(--night); border-color: var(--night); color: #fff; }
.gov-step.current .gov-step-n { border-color: var(--oxide-btn); background: var(--oxide-soft); color: var(--oxide-btn-h); }
.gov-step-ic { color: var(--steel); display: inline-flex; }
.gov-step-ic svg { width: 16px; height: 16px; }
.gov-step-name { font-weight: 650; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.gov-step-note { color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.gov-step-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 6px; }
.gov-step-acts .btn.ghost.sm { padding: 0 7px; }
@media (max-width: 560px) {
  .gov-steps { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 12px; gap: 8px; }
}

/* ---------- Award approval chain ---------- */
.gov-chain-box { border-top: 1px solid rgba(210, 56, 15, .25); padding-top: 12px; }
.gov-chain-box .section-title { margin-top: 0; }
.gov-chain li { padding-bottom: 16px; }
.gov-chain li.ap-pending::after { border-color: #E2A23B; background: var(--amber-soft); }
.gov-chain li.ap-approved::after { border-color: var(--win); background: var(--win); }
.gov-chain li.ap-rejected::after { border-color: var(--red); background: var(--red); }
.gov-chain li.ap-approved::before { background: var(--win); opacity: .45; }

/* Disabled award form while process steps block it. */
.gov-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.gov-fieldset[disabled] { opacity: .6; }
