/* MARS app UI — shared by the buyer app, supplier portal and live auction room.
   Same brand as the marketing site: Archivo, night navy, oxide accent, sky links. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var-latin.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0A1230;
  --night-2: #101A42;
  --night-3: #18245A;
  --line-dark: rgba(150, 170, 255, .16);
  --mist: #A9B4DC;
  --mist-2: #7D89B6;

  --paper: #F3F5FA;
  --white: #FFFFFF;
  --ink: #0C1433;
  --ink-2: #283253;
  --steel: #5A6585;
  --steel-2: #8C95B2;
  --rule: #DDE2EE;
  --rule-2: #EBEEF5;

  --oxide: #FF5A2E;
  --oxide-btn: #D2380F;
  --oxide-btn-h: #B52E0A;
  --oxide-soft: #FFE6DD;
  --sky: #7C95FF;
  --sky-ink: #3550E0;
  --sky-soft: #E9EDFF;
  --mint: #34D69E;
  --win: #0A8A5B;
  --win-soft: #DCF5EA;
  --amber-soft: #FFF0D2;
  --amber-ink: #855600;
  --red: #C42A2A;
  --red-soft: #FDE4E4;
  --violet: #6A3FC9;
  --violet-soft: #EEE7FD;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 16px;
  --r-md: 11px;
  --r-sm: 8px;
  --shadow: none;
  --shadow-pop: 0 1px 0 rgba(12, 20, 51, .04), 0 12px 32px -18px rgba(12, 20, 51, .28);
  --descent: #0E9F6E;
  --descent-soft: #DDF5EB;
  --live: #FF5A2E;
  --wide: "wdth" 118;
  --cond: "wdth" 82;
  --shadow-lg: 0 24px 60px -12px rgba(10, 18, 48, .35);
  --side-w: 232px;
  --top-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sky-ink); text-decoration: none; }
svg[aria-hidden="true"] { width: 16px; height: 16px; flex: none; }
svg.inline { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-size: 26px; letter-spacing: -.015em; font-weight: 720; font-variation-settings: var(--wide); }
h2 { font-size: 15.5px; font-weight: 680; font-variation-settings: "wdth" 108; letter-spacing: -.005em; }
h3 { font-size: 14px; }
p { margin: 0 0 .6em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 16px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
/* RFQ codes and identifiers: condensed Archivo, not a monospace. */
.mono { font-variation-settings: var(--cond); font-weight: 650; letter-spacing: .02em; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--steel); }
.num { font-variant-numeric: tabular-nums; font-stretch: 88%; white-space: nowrap; }
.muted { color: var(--steel); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 650; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.pre { white-space: pre-wrap; word-break: break-word; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-sm { margin-bottom: 8px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; font-weight: 750; letter-spacing: .14em; font-stretch: 112%; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  background: var(--night); color: var(--mist);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 16px 12px; border-right: 1px solid var(--line-dark); z-index: 30;
  background-image: radial-gradient(420px 260px at -20% 105%, rgba(255, 90, 46, .12), transparent 70%), radial-gradient(360px 300px at 120% -10%, rgba(124, 149, 255, .14), transparent 70%);
}
.nav-group { font-size: 11.5px; font-weight: 650; color: var(--mist-2); padding: 14px 10px 6px; letter-spacing: .01em; }
.nav-group:first-child { padding-top: 4px; }
.side .brand { color: #fff; padding: 4px 8px 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--mist); font-weight: 520; position: relative; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(124,149,255,.14); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--live); }
.nav a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; background: var(--oxide-btn); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.side-foot { margin-top: auto; padding: 10px 8px 2px; border-top: 1px solid var(--line-dark); font-size: 12px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .plan { color: var(--mist-2); text-transform: capitalize; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20;
}
.topbar .crumbs { font-weight: 600; color: var(--ink-2); min-width: 0; }
.topbar .crumbs a { color: var(--steel); }
.menu-btn { display: none; }
.page { padding: 26px 28px 72px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--steel); margin-top: 4px; font-size: 14px; max-width: 70ch; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .18s ease; }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .page { padding: 16px 14px 60px; }
  .scrim { position: fixed; inset: 0; background: rgba(10,18,48,.4); z-index: 25; }
}

/* ---------- Cards / grids ---------- */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--rule-2); flex-wrap: wrap; min-height: 52px; }
.card-body { padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat .value { font-size: 22px; } }

.stat { padding: 14px 16px; }
.stat .label { color: var(--steel); font-size: 12.5px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: var(--cond); letter-spacing: -.01em; margin-top: 2px; line-height: 1.1; }
.stat a.value { color: var(--ink); display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: var(--r-sm); border: 1px solid var(--rule);
  background: var(--white); color: var(--ink); font-weight: 620; font-size: 13.5px; cursor: pointer;
  white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, transform .08s, box-shadow .12s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:hover { background: var(--rule-2); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--oxide-btn); border-color: var(--oxide-btn); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 18px -10px rgba(210,56,15,.8); }
.btn.primary:hover:not(:disabled) { background: var(--oxide-btn-h); }
.btn.dark { background: var(--night); border-color: var(--night); color: #fff; }
.btn.dark:hover:not(:disabled) { background: var(--night-3); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--rule-2); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.success { background: var(--win); border-color: var(--win); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { width: 32px; height: 32px; padding: 0; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; }
.linkish { background: none; border: 0; padding: 0; color: var(--sky-ink); cursor: pointer; font-weight: 500; }
.linkish:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--steel); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--white); outline: none; transition: border-color .12s, box-shadow .12s; min-width: 0;
}
.textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sky-ink); box-shadow: 0 0 0 3px var(--sky-soft); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--rule-2); color: var(--ink-2); }
.input.invalid { border-color: var(--red); }
.input.num { text-align: right; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--oxide-btn); margin: 0; flex: none; }
.form-grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span2 { grid-column: span 2; } .form-grid .span4 { grid-column: 1 / -1; }
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; } }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; font-variation-settings: "wdth" 110; color: var(--ink); margin: 28px 0 12px; }
.section-title:first-child { margin-top: 0; }
.private-box { border: 1.5px dashed #E4A28A; background: #FFF7F3; border-radius: var(--r-md); padding: 14px; }
.private-box .section-title { color: var(--oxide-btn); margin-top: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--steel); padding: 10px 14px; border-bottom: 1px solid var(--rule); background: transparent; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.table td.num, .table td .num { font-variation-settings: var(--cond); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: #F6F8FD; }
.table tbody tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--sky-ink); }
.table th.right, .table td.right { text-align: right; }
.table td.best { background: var(--win-soft); color: var(--win); font-weight: 650; }
.table tfoot td { font-weight: 650; background: #FAFBFD; border-top: 1px solid var(--rule); }
.table.edit td { padding: 4px 6px; }
.table.edit .input { height: 30px; border-color: transparent; background: transparent; }
.table.edit .input:hover { border-color: var(--rule); }
.table.edit .input:focus { border-color: var(--sky-ink); background: #fff; }
.table.compact td, .table.compact th { padding: 6px 10px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 620; white-space: nowrap; background: var(--rule-2); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before { display: none; }
.badge.blue { background: var(--sky-soft); color: var(--sky-ink); }
.badge.green { background: var(--win-soft); color: var(--win); }
.badge.amber { background: var(--amber-soft); color: var(--amber-ink); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.oxide { background: var(--oxide-soft); color: var(--oxide-btn-h); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.dark { background: var(--night); color: #fff; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--rule-2); font-size: 12px; color: var(--ink-2); margin: 0 4px 4px 0; }
.chips { display: flex; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 11px 12px; color: var(--steel); font-weight: 620; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .12s, border-color .12s; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--oxide-btn); }
.tabs .count { font-size: 11px; background: var(--rule-2); border-radius: 99px; padding: 1px 6px; margin-left: 4px; color: var(--ink-2); }
.tabs .count.hot { background: var(--oxide-btn); color: #fff; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 10px; background: var(--rule-2); }
.seg button { border: 0; background: none; padding: 5px 12px; cursor: pointer; font-weight: 620; font-size: 12.5px; color: var(--steel); border-radius: 7px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(12,20,51,.12); }

/* ---------- Alerts / empty / loading ---------- */
.alert { border-radius: var(--r-md); padding: 10px 14px; border: 1px solid; font-size: 13.5px; }
.alert.info { background: var(--sky-soft); border-color: #C9D3FF; color: #22348F; }
.alert.warn { background: var(--amber-soft); border-color: #F3D9A0; color: var(--amber-ink); }
.alert.error { background: var(--red-soft); border-color: #F5C2C2; color: #8E1C1C; }
.alert.success { background: var(--win-soft); border-color: #B6E6D1; color: #075F3F; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.empty { text-align: center; padding: 40px 20px; color: var(--steel); }
.empty .title { color: var(--ink); font-weight: 650; font-size: 15px; margin-bottom: 4px; }
.empty svg { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--steel-2); display: block; }
.empty .btn { margin-top: 12px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--rule); border-top-color: var(--oxide-btn); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--steel); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--night); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .22s cubic-bezier(.2,.9,.3,1.2); border-left: 4px solid var(--sky); }
.toast.success { border-left-color: var(--mint); }
.toast.error { border-left-color: var(--oxide); }
.toast.warn { border-left-color: #F5B544; }
.toast button { background: none; border: 0; color: var(--mist); cursor: pointer; margin-left: auto; padding: 0 0 0 6px; font-size: 16px; line-height: 1; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 18, 48, .46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in .15s ease; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 90; overflow-y: auto; }
.modal { background: var(--white); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 88vh; animation: pop-in .18s cubic-bezier(.2,.9,.3,1.1); }
.modal.wide { max-width: 900px; }
.modal.xwide { max-width: 1120px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--rule-2); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--rule-2); flex-wrap: wrap; }
.modal-err:empty { display: none; }
.modal-err { margin-right: auto; color: var(--red); font-size: 13px; align-self: center; }

/* ---------- Gates / timeline ---------- */
.flow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0 2px; }
.flow .step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 92px; font-size: 12px; color: var(--steel); text-align: center; position: relative; }
.flow .dot { 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; }
.flow .step.done .dot { background: var(--night); border-color: var(--night); color: #fff; }
.flow .step.current .dot { border-color: var(--oxide-btn); background: var(--oxide-soft); color: var(--oxide-btn-h); }
.flow .step.current { color: var(--ink); font-weight: 650; }
.flow .bar { flex: 1 1 24px; min-width: 18px; height: 2px; background: var(--rule); margin-bottom: 20px; position: relative; }
.flow .bar.done { background: var(--night); }
.flow .gate { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.gate-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 680; color: var(--oxide-btn-h); background: var(--oxide-soft); padding: 1px 7px; border-radius: 99px; }
.gate-box { border: 1.5px solid var(--oxide-btn); background: #FFF7F3; border-radius: var(--r-md); padding: 12px 14px; }

.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { position: relative; padding: 0 0 14px 22px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 2px; background: var(--rule-2); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--steel-2); }
.tl li.ai::after { border-color: var(--violet); }
.tl li.human::after { border-color: var(--oxide-btn); }
.tl li.supplier::after { border-color: var(--win); }

/* ---------- Two-pane (inbox) ---------- */
.split { display: grid; grid-template-columns: 340px 1fr; min-height: 420px; }
.split .list { border-right: 1px solid var(--rule); overflow-y: auto; max-height: 640px; }
.split .detail { padding: 18px; min-width: 0; overflow-y: auto; max-height: 640px; }
.msg-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--rule-2); background: none; cursor: pointer; }
.msg-item:hover { background: #F7F8FC; }
.msg-item.active { background: var(--sky-soft); }
.msg-item .from { font-weight: 650; }
.msg-item .subj { font-size: 13px; color: var(--ink-2); }
.msg-item .sum { font-size: 12.5px; color: var(--steel); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split .list { border-right: 0; border-bottom: 1px solid var(--rule); max-height: 300px; } }

/* ---------- Misc ---------- */
.meter { height: 8px; background: var(--rule-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--sky-ink); border-radius: 99px; }
.meter.warn > span { background: #E09B1A; } .meter.over > span { background: var(--red); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--steel); } .kv dd { margin: 0; min-width: 0; word-break: break-word; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.list-plain > li:last-child { border-bottom: 0; }
.todo a { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.sev-high { color: var(--red); } .sev-medium { color: var(--amber-ink); } .sev-low { color: var(--steel); }
.pick-card { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 12px 14px; display: block; cursor: pointer; background: #fff; }
.pick-card:hover { border-color: var(--steel-2); }
.pick-card.on { border-color: var(--oxide-btn); box-shadow: 0 0 0 3px var(--oxide-soft); }
.score { display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--night); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: var(--cond); font-size: 13px; }
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--steel); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.copy-field { display: flex; gap: 6px; min-width: 0; }
.copy-field .input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.dropzone { border: 1.5px dashed var(--steel-2); border-radius: var(--r-md); padding: 18px; text-align: center; color: var(--steel); background: #FAFBFD; }
.dropzone.over { border-color: var(--sky-ink); background: var(--sky-soft); }

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 80% -10%, var(--night-3), var(--night) 60%); color: #fff; }
.auth-card { width: 100%; max-width: 400px; background: var(--white); color: var(--ink); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card .brand { color: var(--ink); margin-bottom: 18px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-foot { margin-top: 14px; text-align: center; color: var(--mist); font-size: 12.5px; }
.auth-foot a { color: var(--mist); text-decoration: underline; }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- Supplier portal ---------- */
.portal-top { background: var(--night); color: #fff; }
.portal-top .inner { max-width: 860px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portal-top .buyer { font-size: 12.5px; color: var(--mist); text-align: right; }
.portal-top .buyer b { color: #fff; display: block; font-size: 14px; }
.portal { max-width: 860px; margin: 0 auto; padding: 16px 16px 40px; }
.portal .card { margin-bottom: 14px; }
.portal-hero h1 { font-size: 21px; }
.countdown { font-variant-numeric: tabular-nums; font-stretch: 85%; font-size: 22px; font-weight: 700; }
.countdown.late { color: var(--red); }
.portal-foot { text-align: center; color: var(--steel); font-size: 12px; padding: 20px 16px 30px; }
.line-card { border-bottom: 1px solid var(--rule-2); padding: 10px 0; display: grid; grid-template-columns: 1fr 150px 120px; gap: 10px; align-items: center; }
.line-card:last-child { border-bottom: 0; }
@media (max-width: 600px) { .line-card { grid-template-columns: 1fr 1fr; } .line-card .desc { grid-column: 1 / -1; } }
.grand { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(242,244,249,.94); backdrop-filter: blur(6px); padding: 10px 0; border-top: 1px solid var(--rule); margin-top: 14px; }

/* ---------- Live auction (dark) ---------- */
body.arena { background: var(--night); color: #E6EAFA; }
.arena a { color: var(--sky); }
.arena .card { background: var(--night-2); border-color: var(--line-dark); box-shadow: none; color: #E6EAFA; }
.arena .card-head { border-color: var(--line-dark); }
.arena .muted { color: var(--mist-2); }
.arena .table th { background: transparent; color: var(--mist-2); border-color: var(--line-dark); }
.arena .table td { border-color: var(--line-dark); }
.arena .input { background: var(--night); border-color: var(--line-dark); color: #fff; }
.arena .input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(124,149,255,.25); }
.arena .btn { background: var(--night-3); border-color: var(--line-dark); color: #fff; }
.arena .btn:hover:not(:disabled) { background: #22307A; }
.arena .btn.primary { background: var(--oxide-btn); border-color: var(--oxide-btn); }
.arena .btn.primary:hover:not(:disabled) { background: var(--oxide-btn-h); }
.arena .btn.success { background: var(--win); border-color: var(--win); }
.arena .badge { background: var(--night-3); color: var(--mist); }
.arena .badge.green { background: rgba(52,214,158,.15); color: var(--mint); }
.arena .badge.amber { background: rgba(245,181,68,.15); color: #F5C46A; }
.arena .badge.red { background: rgba(255,90,46,.15); color: #FF8A66; }
.arena .badge.blue { background: rgba(124,149,255,.15); color: var(--sky); }
.arena .alert.error { background: rgba(255,90,46,.12); border-color: rgba(255,90,46,.4); color: #FFB59E; }
.arena .alert.info { background: rgba(124,149,255,.12); border-color: rgba(124,149,255,.35); color: #C8D2FF; }
.arena .alert.warn { background: rgba(245,181,68,.12); border-color: rgba(245,181,68,.35); color: #F5D08A; }
.arena .toast { background: var(--night-3); }
.arena .modal { background: var(--night-2); color: #E6EAFA; }
.arena .modal-head, .arena .modal-foot { border-color: var(--line-dark); }
.arena-top { border-bottom: 1px solid var(--line-dark); }
.arena-top .inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.arena-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.big-clock { font-size: clamp(44px, 11vw, 92px); font-weight: 750; font-variant-numeric: tabular-nums; font-stretch: 78%; letter-spacing: -.02em; line-height: 1; color: #fff; }
.big-clock.hot { color: var(--oxide); }
.big-num { font-size: clamp(32px, 8vw, 60px); font-weight: 700; font-variant-numeric: tabular-nums; font-stretch: 82%; line-height: 1.05; color: #fff; }
.mid-num { font-size: clamp(22px, 5vw, 32px); font-weight: 650; font-variant-numeric: tabular-nums; font-stretch: 85%; color: #fff; }
.kicker { font-size: 12.5px; font-weight: 650; color: var(--mist-2); }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mist); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--mist-2); }
.conn.on i { background: var(--mint); box-shadow: 0 0 0 3px rgba(52,214,158,.2); }
.conn.off i { background: var(--oxide); }
.bid-input { height: 56px; font-size: 26px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.accept-btn { height: 72px; font-size: 22px; width: 100%; border-radius: 14px; }
.log { max-height: 320px; overflow-y: auto; font-size: 12.5px; }
.log div { padding: 4px 0; border-bottom: 1px solid var(--line-dark); }
.rank-1 td { color: var(--mint); font-weight: 650; }

/* ---------- Language switcher ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.4; flex-wrap: wrap; }
.lang-switch button { background: none; border: 0; padding: 2px 0; margin: 0; cursor: pointer; color: inherit; font: inherit; opacity: .72; display: inline-flex; align-items: center; gap: 4px; }
.lang-switch button:hover:not(:disabled) { opacity: 1; text-decoration: underline; }
.lang-switch button[aria-pressed="true"] { opacity: 1; font-weight: 700; cursor: default; text-decoration: none; }
.lang-switch button:disabled { cursor: progress; }
.lang-switch .sep { opacity: .45; }
.lang-switch .spinner { width: 10px; height: 10px; border-width: 2px; }
.side-foot .lang-switch { margin-top: 8px; color: var(--mist); }
.auth-foot .lang-switch { margin-top: 10px; color: var(--mist); }
.portal-foot .lang-switch { margin-top: 10px; color: var(--steel); }
.arena .portal-foot .lang-switch { color: var(--mist); }

/* ---------- Billing: plan ladder and credits ---------- */
.plans .plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-card.featured { border-color: var(--oxide-btn-h); box-shadow: 0 0 0 1px var(--oxide-btn-h) inset; }
.plan-card.current { background: var(--win-soft); }
.plan-card .plan-name { font-size: 17px; }
.plan-price b { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.plan-price .muted { font-size: 13px; margin-left: 2px; }
.feat { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.feat li { display: flex; gap: 6px; align-items: flex-start; }
.feat li svg { color: var(--win); flex: none; margin-top: 2px; }
.mt-auto { margin-top: auto; }
.btn.block { width: 100%; justify-content: center; }
.row.wrap { flex-wrap: wrap; }
.text-red { color: var(--red); }
.explain { background: var(--sky-soft); }
@media (max-width: 640px) { .grid.plans { grid-template-columns: minmax(0, 1fr); } }
.toast .toast-action { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; margin-left: 6px; }
.plan-card .blurb { min-height: 2.8em; }
.explain .how { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.explain .how svg { margin-top: 2px; }

/* ---------- Licence card (sidebar): tiers like card levels ---------- */
.license { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 8px; padding: 9px 12px; border-radius: 10px; text-decoration: none !important;
  border: 1px solid rgba(169,180,220,.25); background: rgba(255,255,255,.04); color: #fff; position: relative; overflow: hidden; }
.license-k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mist-2); font-weight: 700; }
.license-n { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.license.tier-pro { background: linear-gradient(135deg, #22306E, #18245A); border-color: rgba(124,149,255,.45); }
.license.tier-team { background: linear-gradient(135deg, #3B4FB8, #22306E); border-color: rgba(124,149,255,.7); }
.license.tier-business { background: linear-gradient(135deg, #1B1B1F 0%, #000 60%, #2A2A30 100%); border-color: #4A4A52; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.license.tier-business .license-k { color: #9A9AA5; }
.license.tier-enterprise { background: linear-gradient(135deg, #111 0%, #000 55%, #1D1A12 100%); border-color: #B8954A; }
.license.tier-enterprise .license-n { background: linear-gradient(90deg, #E9D39A, #B8954A, #F3E2B3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.license.tier-enterprise .license-k { color: #B8954A; }
.license::after { content: ""; position: absolute; right: -18px; top: -18px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); }

/* Tier chips used across the app (plan cards, locked features). */
.tier-chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.tier-chip.tier-free, .tier-chip.tier-pro { background: var(--rule-2); color: var(--ink-2); }
.tier-chip.tier-team { background: var(--sky-soft); color: var(--sky-ink); }
.tier-chip.tier-business { background: #0B0B0E; color: #fff; }
.tier-chip.tier-enterprise { background: #0B0B0E; color: #E9D39A; box-shadow: inset 0 0 0 1px #B8954A; }

/* Billing plan cards per tier. */
.plan-card.tier-business { background: linear-gradient(160deg, #1B1B1F, #000 70%); color: #fff; border-color: #000; }
.plan-card.tier-business .muted, .plan-card.tier-business .small, .plan-card.tier-business .tiny { color: #B9B9C2; }
.plan-card.tier-business .feat li svg { color: #E9D39A; }
.plan-card.tier-business .btn:not(.primary) { background: transparent; color: #fff; border-color: #55555E; }
.plan-card.tier-business.current { box-shadow: 0 0 0 2px var(--win) inset; }

/* Supplier portal with the buyer's brand (Business+). */
.portal-top.branded .buyer-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 16px; }
.portal-top .buyer-logo { height: 30px; max-width: 140px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px 6px; }
.feat li.soon { color: var(--steel); }
.feat li.soon .tiny { border: 1px solid currentColor; border-radius: 99px; padding: 0 7px; margin-left: 4px; font-size: 11px; }
.plan-card.tier-business .feat li.soon { color: #9A9AA5; }
.ent-card { background: linear-gradient(135deg, #111 0%, #000 60%, #1D1A12 100%); color: #fff; border-color: #B8954A; }
.ent-card .muted, .ent-card .small { color: #C9C2AE !important; }
.ent-card .ent-name { background: linear-gradient(90deg, #E9D39A, #B8954A, #F3E2B3); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 17px; }
.ent-card .btn { background: transparent; color: #E9D39A; border-color: #B8954A; }

/* =====================================================================
   Sourcing telemetry — design layer (Nov 2026)
   Signature: the price-descent trace (first-quote average → best now),
   deadline rings and response gauges. One bold night surface per page.
   ===================================================================== */
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes draw { from { stroke-dashoffset: var(--len, 400); } }
@keyframes pulse-live { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,46,.45); } 50% { box-shadow: 0 0 0 5px rgba(255,90,46,0); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Topbar search / command palette trigger */
.cmd-trigger { display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 260px; padding: 0 10px 0 12px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--steel); cursor: pointer; font-size: 13.5px; transition: border-color .15s, background .15s; }
.cmd-trigger:hover { border-color: var(--steel-2); background: #fff; }
.cmd-trigger svg { width: 15px; height: 15px; }
.cmd-trigger kbd, .cmd kbd { margin-left: auto; font: inherit; font-size: 11.5px; font-weight: 650; color: var(--steel); border: 1px solid var(--rule); background: #fff; border-radius: 6px; padding: 1px 6px; }
@media (max-width: 900px) { .cmd-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; } .cmd-trigger span, .cmd-trigger kbd { display: none; } }

.cmd-back { position: fixed; inset: 0; z-index: 120; background: rgba(10,18,48,.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: center; padding: 12vh 16px 16px; animation: fade-in .12s ease; }
.cmd { width: 100%; max-width: 640px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; animation: pop-in .16s cubic-bezier(.2,.9,.3,1.1); align-self: flex-start; }
.cmd-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--rule-2); }
.cmd-input svg { width: 18px; height: 18px; color: var(--steel); }
.cmd-input input { flex: 1; border: 0; outline: none; font-size: 17px; font-weight: 520; background: none; min-width: 0; }
.cmd-list { overflow-y: auto; padding: 6px; }
.cmd-sec { font-size: 12px; font-weight: 650; color: var(--steel); padding: 10px 12px 4px; }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); }
.cmd-item .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--rule-2); color: var(--ink-2); flex: none; }
.cmd-item .ic svg { width: 16px; height: 16px; }
.cmd-item .t { font-weight: 620; }
.cmd-item .d { font-size: 12.5px; color: var(--steel); }
.cmd-item .meta { margin-left: auto; font-size: 12px; color: var(--steel); white-space: nowrap; }
.cmd-item.on { background: var(--sky-soft); }
.cmd-item.on .ic { background: var(--sky-ink); color: #fff; }
.cmd-empty { padding: 28px; text-align: center; color: var(--steel); }
.cmd-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--rule-2); font-size: 12px; color: var(--steel); background: var(--paper); }

/* Skeleton loading */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--rule-2) 0%, #F7F8FC 40%, var(--rule-2) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel-page { display: grid; gap: 16px; }
.skel-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .skel-row { grid-template-columns: 1fr 1fr; } }

/* Price-descent trace (signature) */
.descent { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.descent svg { width: 76px; height: 26px; overflow: visible; flex: none; }
.descent .pct { font-weight: 720; font-variation-settings: var(--cond); font-variant-numeric: tabular-nums; color: var(--descent); font-size: 13.5px; }
.descent .pct.up { color: var(--red); }
.descent .pct.none { color: var(--steel-2); font-weight: 600; }
.descent .ln { fill: none; stroke: var(--descent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.descent .ar { fill: url(#descentFill); }
.descent .start { fill: #fff; stroke: var(--steel-2); stroke-width: 1.5; }
.descent .end { fill: var(--descent); }

/* Deadline ring */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: var(--rule-2); }
.ring .val { fill: none; stroke: var(--sky-ink); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring.hot .val { stroke: var(--live); }
.ring.done .val { stroke: var(--steel-2); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 720; font-variation-settings: var(--cond); color: var(--ink-2); text-align: center; line-height: 1.05; }
.when { display: flex; align-items: center; gap: 10px; min-width: 0; }
.when .t { font-weight: 650; font-variant-numeric: tabular-nums; font-variation-settings: var(--cond); }
.when .d { font-size: 12px; color: var(--steel); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse-live 1.8s ease-in-out infinite; flex: none; }

/* Response gauge: one pip per invited supplier */
.pips { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 120px; }
.pips i { width: 8px; height: 8px; border-radius: 3px; background: var(--rule); }
.pips i.q { background: var(--descent); }
.pips i.a { background: var(--sky); }
.pips i.x { background: #F3B4A6; }
.pips-lbl { font-size: 12px; color: var(--steel); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* RFQ list as telemetry strips */
.rfq-list { display: grid; }
.rfq-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 130px 150px 150px minmax(150px, 1.1fr) 92px; gap: 18px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--rule-2); color: var(--ink); position: relative; transition: background .12s; }
.rfq-row:hover { background: #F6F8FD; text-decoration: none; }
.rfq-row:hover::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sky-ink); }
.rfq-row:last-child { border-bottom: 0; }
.rfq-row .ttl { font-weight: 680; font-size: 14.5px; line-height: 1.3; }
.rfq-row .sub { font-size: 12.5px; color: var(--steel); margin-top: 2px; }
.rfq-row .best { font-weight: 700; font-variation-settings: var(--cond); font-variant-numeric: tabular-nums; font-size: 15px; }
.rfq-row .upd { font-size: 12px; color: var(--steel); text-align: right; }
.rfq-head { display: grid; grid-template-columns: minmax(0, 2.4fr) 130px 150px 150px minmax(150px, 1.1fr) 92px; gap: 18px; padding: 10px 20px; font-size: 12.5px; font-weight: 600; color: var(--steel); border-bottom: 1px solid var(--rule); }
@media (max-width: 1100px) {
  .rfq-row, .rfq-head { grid-template-columns: minmax(0, 1fr) 130px 140px; }
  .rfq-row > :nth-child(4), .rfq-row > :nth-child(6), .rfq-head > :nth-child(4), .rfq-head > :nth-child(6) { display: none; }
}
@media (max-width: 640px) {
  .rfq-head { display: none; }
  .rfq-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .rfq-row > :nth-child(3), .rfq-row > :nth-child(5) { display: none; }
}

/* Board view (by stage) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.lane { background: rgba(221,226,238,.45); border-radius: 14px; padding: 10px; min-height: 120px; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 680; font-size: 13.5px; }
.lane-head .n { margin-left: auto; font-size: 12px; color: var(--steel); font-weight: 650; }
.lane-head i { width: 9px; height: 9px; border-radius: 50%; background: var(--steel-2); }
.bcard { display: block; background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 12px 13px; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.bcard + .bcard { margin-top: 8px; }
.bcard:hover { text-decoration: none; border-color: var(--steel-2); transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.bcard .ttl { font-weight: 680; line-height: 1.3; margin: 4px 0 10px; }
.bcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Night hero band (RFQ header, dashboard) */
.hero { position: relative; overflow: hidden; border-radius: 20px; background: var(--night); color: #E6EAFA; padding: 22px 24px; margin-bottom: 18px;
  background-image: radial-gradient(600px 280px at 100% 0%, rgba(124,149,255,.20), transparent 70%), radial-gradient(500px 260px at 0% 120%, rgba(255,90,46,.14), transparent 70%); }
.hero::after { content: ""; position: absolute; right: -140px; top: -160px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(169,180,220,.12); box-shadow: 0 0 0 60px rgba(169,180,220,.03), 0 0 0 120px rgba(169,180,220,.025); pointer-events: none; }
.hero h1 { color: #fff; font-size: clamp(22px, 2.6vw, 30px); max-width: 30ch; }
.hero .mono { color: var(--mist); }
.hero .sub { color: var(--mist); font-size: 13.5px; margin-top: 6px; }
.hero .badge { background: rgba(255,255,255,.1); color: #fff; }
.hero .badge.green { background: rgba(52,214,158,.16); color: #7EEBC4; }
.hero .badge.red { background: rgba(255,90,46,.16); color: #FF9A7C; }
.hero .badge.blue { background: rgba(124,149,255,.18); color: #C3CEFF; }
.hero .badge.amber { background: rgba(245,181,68,.16); color: #F7CF7E; }
.hero .badge.violet { background: rgba(160,130,255,.18); color: #D2C4FF; }
.hero .btn { background: rgba(255,255,255,.06); border-color: rgba(169,180,220,.3); color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,.12); }
.hero .btn.danger { color: #FF9A7C; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: end; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.tele { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(169,180,220,.16); border-radius: 14px; overflow: hidden; margin-top: 18px; position: relative; z-index: 1; }
.tele > div { background: rgba(10,18,48,.78); padding: 12px 14px; min-width: 0; }
.tele .k { font-size: 12px; color: var(--mist-2); font-weight: 600; }
.tele .v { font-size: 22px; color: #fff; font-weight: 720; font-variation-settings: var(--cond); font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tele .v.down { color: #7EEBC4; }
.tele .s { font-size: 12px; color: var(--mist-2); margin-top: 2px; }
@media (max-width: 760px) { .tele { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-trace { position: relative; z-index: 1; }
.hero-trace svg { width: 100%; height: 120px; overflow: visible; display: block; }
.hero-trace .ln { fill: none; stroke: #7EEBC4; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 600); animation: draw 1.1s cubic-bezier(.3,.7,.2,1) both; }
.hero-trace .ar { fill: url(#heroFill); opacity: .9; }
.hero-trace .base { stroke: rgba(169,180,220,.35); stroke-dasharray: 3 4; }
.hero-trace text { font-family: var(--font); font-size: 11px; fill: var(--mist); }
.hero-trace .pt { fill: var(--night); stroke: #7EEBC4; stroke-width: 2; }
.hero-trace .empty-note { color: var(--mist-2); font-size: 13px; padding: 34px 0; text-align: center; border: 1px dashed rgba(169,180,220,.25); border-radius: 12px; }

/* Status flow restyled as a track */
.flow .dot { width: 24px; height: 24px; }
.flow .step.current .dot { box-shadow: 0 0 0 4px var(--oxide-soft); }
.flow .bar { height: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.ring svg { width: 100%; height: 100%; }

/* ---------- Sign-in with Microsoft ---------- */
.ms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1B1B1F; border: 1px solid #C9CEDA; font-weight: 640; text-decoration: none; }
.ms-btn:hover { border-color: #8C95B2; background: #FAFBFE; }
.ms-logo { width: 18px; height: 18px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--steel-2); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ---------- Team ---------- */
.seat-meter { display: inline-flex; align-items: center; gap: 10px; }
.seat-bar { width: 120px; height: 7px; border-radius: 7px; background: var(--rule-2); overflow: hidden; }
.seat-bar i { display: block; height: 100%; border-radius: 7px; background: var(--sky-ink); }
.seat-bar i.full { background: var(--oxide-btn); }
.tm-invite { border-bottom: 1px solid var(--rule-2); }
.tm-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr) auto; gap: 10px; align-items: end; }
.tm-form .field { margin: 0; }
.tm-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tm-av { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--night); color: #fff; font-size: 12px; font-weight: 800; }
.tm-av.pend { background: var(--sky-soft); color: var(--sky-ink); }
.tm-av.pend svg { width: 16px; height: 16px; }
.tm-ms { display: inline-flex; vertical-align: -2px; }
.tm-ms .ms-logo { width: 13px; height: 13px; }
.tm-pending td { background: #FBFCFE; }
.select.sm { height: 30px; padding: 0 28px 0 8px; font-size: 13px; width: auto; }
.tm-method { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule-2); }
.tm-method:first-child { border-top: 0; }
.tm-mi { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); }
.tm-mi svg { width: 16px; height: 16px; }
.idle-count { font-size: 15px; }
.idle-count b { font-size: 22px; color: var(--oxide-btn); }
@media (max-width: 760px) { .tm-form { grid-template-columns: 1fr; } .seat-bar { width: 80px; } }

/* ---------- Sign-in flow (SMS code, mobile, company & plan, payment) ---------- */
.auth-wide { width: 100%; max-width: 760px; }
.auth-card.wide { max-width: 760px; }
.linklike { background: none; border: 0; padding: 0; color: var(--azure, #3550E0); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike:disabled { color: var(--steel-2); cursor: default; text-decoration: none; }
.auth-foot .linklike { color: var(--mist); font-size: 12.5px; }
.flow-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: st; }
.flow-steps li { flex: 1; font-size: 11.5px; font-weight: 620; color: var(--steel-2); padding-top: 8px; border-top: 3px solid var(--rule); counter-increment: st; }
.flow-steps li::before { content: counter(st) ". "; }
.flow-steps li.done { color: var(--steel); border-top-color: var(--green, #0E9F6E); }
.flow-steps li.on { color: var(--ink); border-top-color: var(--oxide-btn, #D2400F); }
.code-input { font-size: 26px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding: 12px; }
.phone-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.flow-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.flow-plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.flow-plan:hover { border-color: var(--steel-2); }
.flow-plan.on { border-color: var(--oxide-btn, #D2400F); box-shadow: 0 0 0 3px rgba(210, 64, 15, .12); }
.flow-plan input { position: absolute; opacity: 0; pointer-events: none; }
.flow-plan .fp-name { font-weight: 700; font-size: 14px; }
.flow-plan .fp-price b { font-size: 20px; }
.flow-wait { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--rule-2); }
.rec-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 14px; border-radius: 10px; background: var(--rule-2); font-size: 15px; margin-top: 10px; }
@media (max-width: 720px) { .flow-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .auth-card.wide .grid.g2 { grid-template-columns: minmax(0, 1fr); } }

/* Sign-in: a proper card width (the wrapper used to shrink-wrap it to ~280px) and the site's night-sky look */
.auth > div { width: min(440px, 100%); }
.auth > div.auth-wide { width: min(760px, 100%); }
.auth { position: relative; overflow: hidden; background:
  radial-gradient(900px 520px at 85% -10%, rgba(53, 80, 224, .32), transparent 60%),
  radial-gradient(1400px 700px at 50% 135%, rgba(240, 96, 42, .38), rgba(169, 51, 13, .12) 38%, transparent 60%),
  var(--night); }
.auth::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 68%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 58%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 34%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 86%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 82%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 52%, #fff 50%, transparent 51%); }
.auth > div { position: relative; z-index: 1; }
.auth-card { padding: 32px; border-radius: 20px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.auth-card h1 { font-size: 24px; line-height: 1.2; margin-bottom: 8px; }
.auth-card > #auth-body > .muted, .auth-card .muted:first-of-type { line-height: 1.5; }
.auth-foot { line-height: 1.5; }
@media (max-width: 480px) { .auth-card { padding: 24px 20px; } }

/* Sign-in card: Log in / Create account tabs */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; background: var(--paper-2, #EEF1F7); border-radius: 12px; }
.auth-tabs button { appearance: none; border: 0; background: transparent; height: 38px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 640; color: #4A5578; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.auth-tabs button:hover { color: var(--ink, #0A1230); }
.auth-tabs button.on { background: #fff; color: var(--ink, #0A1230); box-shadow: 0 1px 2px rgba(10, 18, 48, .08), 0 2px 8px -2px rgba(10, 18, 48, .12); }
.auth-tabs button:focus-visible { outline: 2px solid var(--oxide, #E5531E); outline-offset: 1px; }
.auth-foot a[data-mode] { color: #fff; font-weight: 640; }

/* ---------- Language menu (flags) ---------- */
.lang-menu { position: relative; display: inline-block; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: inherit; white-space: nowrap; user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { background: rgba(127, 140, 180, .14); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--sky, #7C95FF); outline-offset: 2px; }
.lang-menu .flag { width: 20px; height: 14px; flex: none; border-radius: 2.5px; overflow: hidden; box-shadow: 0 0 0 1px rgba(12, 20, 51, .12); }
.lang-menu .lm-chev { width: 10px; height: 6px; opacity: .65; transition: transform .2s; }
.lang-menu[open] .lm-chev { transform: rotate(180deg); }
.lang-menu .lm-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 300; min-width: 220px; padding: 6px; display: grid; gap: 2px; background: #fff; color: #0C1433; border: 1px solid #DDE2EE; border-radius: 12px; box-shadow: 0 24px 50px -20px rgba(12, 20, 51, .35); }
.lang-menu.up .lm-list { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.lang-menu .lm-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 550; text-align: left; cursor: pointer; }
.lang-menu .lm-list button:hover:not(:disabled) { background: #F2F4F9; }
.lang-menu .lm-list button[aria-pressed="true"] { background: #E9EDFF; color: #3550E0; font-weight: 700; cursor: default; }
.lang-menu .lm-list button[aria-pressed="true"]::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #3550E0; }
.lang-menu .lm-list button:disabled { cursor: progress; }
.lang-menu .spinner { width: 10px; height: 10px; border-width: 2px; }
.topbar .tb-lang > summary { height: 38px; }
@media (max-width: 720px) { .topbar .tb-lang .lm-code, .topbar .tb-lang .lm-chev { display: none; } .topbar .tb-lang > summary { padding: 0 8px; } }
.auth-foot .lang-menu, .portal-foot .lang-menu { margin-top: 10px; }
.set-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.set-langs button { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #DDE2EE; border-radius: 10px; background: #fff; color: inherit; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.set-langs button:hover:not(:disabled) { border-color: #B6BDD3; }
.set-langs button.on { border-color: #3550E0; background: #E9EDFF; color: #3550E0; font-weight: 700; }
.set-langs .flag { width: 20px; height: 14px; flex: none; border-radius: 2.5px; overflow: hidden; box-shadow: 0 0 0 1px rgba(12, 20, 51, .12); }
@media (max-width: 720px) { .topbar .tb-lang .lm-list { position: fixed; left: 12px; right: 12px; top: 58px; min-width: 0; } }
