/* ==========================================================================
   Supplier pages (home, sign in, onboarding, reset password, bid form).
   Uses the tokens from app.css; all classes are prefixed sp-.
   ========================================================================== */

/* ---------- shared bits ---------- */
.sp-narrow { max-width: 640px; margin: 2rem auto; }
.sp-prewrap { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.sp-eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-2); margin-bottom: .35rem; }
.sp-eyebrow-light { color: var(--accent); }
.sp-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.sp-num-sm { width: 1.5rem; height: 1.5rem; font-size: .8rem; }
.sp-danger-text { color: var(--err); }
.sp-link-btn { padding: 0 .25rem; color: var(--brand-2); }

/* ---------- landing ---------- */
.sp-hero { padding: 2.5rem 2rem; }
.sp-hero-actions { margin-top: 1.25rem; gap: 1.25rem; }
.sp-btn-light { background: #fff; border-color: #fff; color: var(--brand); font-weight: 600; padding: .65rem 1.2rem; }
.sp-btn-light:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.sp-hero-link { color: rgba(255,255,255,.85); }
.sp-howto { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.sp-howto li { display: flex; gap: .75rem; align-items: flex-start; }
.sp-howto li p { margin: .15rem 0 0; }
.sp-howto-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 900px) { .sp-howto-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sp-howto-grid { grid-template-columns: 1fr; } }
.sp-footer { text-align: center; padding: 2rem 0 0; font-size: .8rem; }
.sp-footer a { color: var(--text-3); text-decoration: none; }
.sp-footer a:hover { text-decoration: underline; }

/* ---------- auth pages ---------- */
.sp-auth-alt { margin: .85rem 0 0; text-align: center; }
.sp-readonly { background: var(--surface-2); color: var(--text-2); }
.sp-name-grid { gap: 0 .75rem; }
@media (max-width: 760px) { .sp-name-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- bid: round banner ---------- */
.sp-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--brand); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.sp-banner h1 { margin-bottom: .2rem; }
.sp-banner-sub { color: var(--text-2); margin: 0 0 .5rem; }
.sp-banner-pills { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.sp-banner-meta { display: grid; grid-template-columns: repeat(2, minmax(7rem, auto)); gap: .6rem 1.5rem; margin: 0; }
.sp-banner-meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.sp-banner-meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-banner-notice { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .sp-banner { grid-template-columns: 1fr; padding: 1rem; } }

/* ---------- bid: numbered steps ---------- */
.sp-steps { display: flex; gap: .5rem; margin-bottom: 1.25rem; overflow-x: auto; padding-bottom: 2px; }
.sp-step { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; font: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); cursor: pointer; text-align: left; }
.sp-step .sp-num { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong); width: 1.6rem; height: 1.6rem; font-size: .85rem; }
.sp-step:hover { border-color: var(--border-strong); }
.sp-step.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sp-step.active .sp-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.sp-step:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* ---------- bid: sections ---------- */
.sp-section-head { display: flex; gap: .85rem; align-items: flex-start; margin: .25rem 0 1rem; }
.sp-section-head h2 { margin: .15rem 0 .15rem; font-size: 1.3rem; }
.sp-section-head .sub { color: var(--text-2); margin: 0; }
.sp-instructions h3 { font-size: .95rem; }
.sp-instr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 2rem; }
.sp-tips { margin: 0; padding-left: 1.1rem; color: var(--text-2); }
.sp-tips li + li { margin-top: .3rem; }
.sp-instr-item + .sp-instr-item { border-top: 1px solid var(--border); margin-top: .85rem; padding-top: .85rem; }
.sp-instr-item h4 { margin: 0 0 .35rem; }
.sp-deadline { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--border); color: var(--text-2); }
.sp-faq { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.sp-faq:last-child { border-bottom: 0; }
.sp-faq summary { cursor: pointer; font-weight: 600; }
.sp-faq .sp-prewrap { margin-top: .4rem; }

/* ---------- bid: grid toolbar & status ---------- */
.sp-grid-card { padding: 1rem; }
.sp-toolbar { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.sp-toolbar-left, .sp-toolbar-right { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.sp-toolbar-left { flex: 1 1 360px; }
.sp-search { flex: 1 1 260px; max-width: 460px; }
.sp-filter { width: auto; flex: 0 0 auto; }
.sp-statusbar { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.sp-summary { flex: 1 1 320px; min-width: 0; }
.sp-summary-text { font-variant-numeric: tabular-nums; }
.sp-progress { height: .45rem; max-width: 420px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: .35rem; }
.sp-progress > span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.sp-saveline { display: flex; align-items: center; gap: .5rem; }
.sp-hint { min-height: 1.1em; margin-bottom: .35rem; }

/* save-state labels */
.sp-state { font-size: .8rem; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.sp-state::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; display: inline-block; }
.sp-state:empty::before { display: none; }
.sp-state-saving { color: var(--warn); }
.sp-state-saving::before { background: var(--accent); animation: sp-pulse 1s ease-in-out infinite; }
.sp-state-saved { color: var(--ok); }
.sp-state-saved::before { background: var(--ok); }
.sp-state-error { color: var(--err); }
.sp-state-error::before { background: var(--err); }
.sp-state-done { color: var(--text-3); font-weight: 500; }
.sp-state-done::before { background: var(--text-3); }
@keyframes sp-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sp-state-saving::before { animation: none; } }

/* ---------- bid: grid table ---------- */
.sp-grid-wrap { max-height: 68vh; }
.sp-grid th { z-index: 2; }
.sp-grid td { vertical-align: middle; }
.sp-grid tbody tr:hover td { background: var(--surface-2); }
.sp-grid .sp-col-desc { min-width: 16rem; max-width: 26rem; white-space: normal; }
.sp-grid th.sp-edit-th { background: var(--brand-soft); color: var(--brand); }
.sp-grid td.sp-edit-td { background: color-mix(in srgb, var(--brand-soft) 35%, transparent); }
.sp-grid .sp-unit { font-weight: 400; color: var(--text-3); }
.sp-grid .sp-col-status { min-width: 6.5rem; }
.sp-grid .sp-sticky { position: sticky; left: 0; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.sp-grid td.sp-sticky { z-index: 1; }
.sp-grid th.sp-sticky { z-index: 3; background: var(--surface-2); }
.sp-grid tbody tr:hover td.sp-sticky { background: var(--surface-2); }
.sp-empty-row { text-align: center; color: var(--text-3); padding: 2rem 1rem !important; }
.sp-adorn { display: flex; align-items: center; gap: .25rem; }
.sp-adorn-pre, .sp-adorn-post { color: var(--text-3); font-size: .9em; }
.sp-adorn .cell-input { min-width: 6.5rem; }
.cell-input.sp-wide { min-width: 13rem; }
.sp-pager .pager { flex-wrap: wrap; }

/* ---------- documents / modal ---------- */
.sp-file-icon { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .03em; padding: .1rem .3rem; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand); vertical-align: middle; }
.sp-doc-table td { vertical-align: middle; }
.sp-doc-table td .btn + .btn { margin-left: .35rem; }
.sp-modal-table { max-height: 45vh; }
.sp-filepick { display: inline-flex; }

/* ---------- submit ---------- */
.sp-submit-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.sp-submit-btn { padding: .65rem 1.4rem; font-weight: 600; }
.sp-missing { color: var(--warn); margin: .75rem 0 0; }
