/* css/views/supplier-portal.css — supplier-facing portal (js/views/supplier-portal.js). Plain, calm, branded. */
.sp { max-width: 1360px; }
.sp-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 20px 24px; margin: 6px 0 20px; border-top: 4px solid var(--brand); background-image: linear-gradient(100deg, var(--surface) 62%, var(--brand-t) 140%); }
.sp-brand { display: flex; gap: 16px; align-items: center; }
.sp-brand img { flex: none; }
.sp-brand h1 { font-size: 30px; margin: 2px 0 0; }
.sp-brand .page-sub { margin-top: 4px; font-size: 14px; }
.sp-who { display: flex; gap: 12px; align-items: center; background: var(--soft2); border-radius: 14px; padding: 10px 14px; }
.sp-who b { display: block; font-size: 14px; }
.sp-who small { font-size: 12px; color: var(--mut); }

.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 450px; gap: 20px; align-items: start; }
.sp-main { min-width: 0; }
.sp-side { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 14px; }

/* invoice detail */
.sp-detail { margin-bottom: 18px; border-top: 3px solid var(--brand); }
.sp-detail h3 { font-size: 22px; margin: 2px 0 0; }
.sp-detail h3 small { font-size: 12px; font-weight: 500; margin-left: 6px; }
.sp-say { font-size: 16px; margin: 10px 0 14px; }
.sp-pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--sans); padding: 4px 11px; border-radius: var(--r-pill); white-space: nowrap; justify-self: start; }
.sp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sp-hold { background: var(--danger-bg); color: var(--danger-fg); }
.sp-review { background: var(--emph-t); color: var(--emph); }
.sp-approved, .sp-matched { background: var(--teal-t); color: var(--teal-d); }
.sp-scheduled, .sp-paid { background: var(--blue-t); color: var(--bblue); }

.sp-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.sp-steps li { position: relative; padding: 26px 8px 0 0; display: flex; flex-direction: column; gap: 2px; }
.sp-steps li::before { content: ""; position: absolute; top: 8px; left: 18px; right: 0; height: 3px; background: var(--line2); }
.sp-steps li:last-child::before { display: none; }
.sp-steps li.done::before { background: var(--bblue); }
.sp-steps .d { position: absolute; top: 0; left: 0; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); border: 2px dashed var(--mut3); }
.sp-steps li.done .d { background: var(--bblue); border: 0; }
.sp-steps li.now .d { border: 4px solid var(--teal-d); }
.sp-steps li.bad .d { background: var(--red); border: 0; box-shadow: 0 0 0 4px var(--pink-t); }
.sp-steps b { font-size: 13.5px; }
.sp-steps li.bad b { color: var(--red-d); }
.sp-steps li.next b { color: var(--mut2); }
.sp-steps small { font-size: 12px; color: var(--mut); }

.sp-facts { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--soft2); border-radius: 12px; overflow: hidden; }
.sp-facts > div { padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--line); }
.sp-facts > div:first-child { border-left: 0; }
.sp-facts b { font-size: 14px; }
.sp-need { margin-top: 14px; border-radius: 12px; background: var(--pink-t); padding: 14px 16px; }
.sp-need p { margin: 6px 0 12px; font-size: 14px; line-height: 1.55; }
.sp-need.ok { background: var(--blue-t); }
.sp-need.ok p { margin-bottom: 4px; }
.sp-need .row { gap: 14px; }
.sp-need .mut2 { font-size: 12.5px; }

/* list */
.sp-row { grid-template-columns: 150px 150px 1fr 110px; color: var(--ink); }
.sp-row.on { background: var(--brand-t); box-shadow: inset 3px 0 0 var(--brand); }
.sp .sechd .act { font-family: var(--mono); font-size: 11px; }

/* chat */
.sp-chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; height: calc(var(--app-h) - var(--topbar-h) - var(--footer-h) - 230px); min-height: 460px; border-top: 3px solid var(--ai); }
.sp-chat-hd { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sp-chat-hd b { display: block; font-size: 14px; }
.sp-chat-hd small { font-size: 12px; color: var(--mut); }
.elpis-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--ai-t); color: var(--ai); display: inline-flex; align-items: center; justify-content: center; }
.sp-chat .elpis { flex: 1; min-height: 0; }
.sp-chat .elpis-thread { padding: 14px 16px 8px; }
.sp-chat .elpis-dock { padding: 6px 12px 12px; }
.sp-empty { padding: 10px 2px; }
.sp-empty p { font-size: 14px; color: var(--mut); margin: 0 0 12px; }
.sp-empty .chips { flex-direction: column; align-items: flex-start; }
.sp-empty .chip { white-space: normal; text-align: left; }

.sp-value { border-top: 3px solid var(--bblue); }
.sp-value .row { gap: 14px; margin: 8px 0; }
.sp-value .big { font-size: 34px; font-weight: 600; color: var(--bblue); line-height: 1; }
.sp-value b { display: block; font-size: 13.5px; }
.sp-value small { font-size: 12px; color: var(--mut); }
.sp-value p { font-size: 12.5px; margin: 6px 0 0; line-height: 1.5; }

@media (max-width: 1180px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-side { position: static; }
  .sp-band { flex-direction: column; align-items: flex-start; }
}
