/* Factum supplier panel — black "Command Center" theme in Factum colours. */
:root {
  --bg: #000; --surface: #0A0A0A; --card: #111; --raise: #1C1C1C;
  --line: #262626; --line-soft: #1F1F1F; --line-row: #1A1A1A; --line-strong: #333;
  --text: #EDEDED; --white: #FFF; --muted: #B3B3B3; --faint: #8C8C8C;
  --orange: #EE8A2B; --orange-text: #F2A65A; --orange-hover: #F8C590; --on-orange: #1A0B05;
  --grad: linear-gradient(90deg, #EE8A2B, #D2503C, #A6125A);
  --complete: #199E70; --complete-text: #3DCB95; --term: #9085E9; --oq: #3987E5; --quality: #C98500;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --head: 'Space Grotesk', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--orange-text); }
a:hover { color: var(--orange-hover); }
h1, h2, p { margin: 0; }
.sr { position: absolute; left: -9999px; }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.white { color: var(--white); }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.grow { flex: 1; }
.topline { height: 3px; background: var(--grad); flex: none; }

/* header + menu */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; min-height: 64px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 32px; width: auto; }
.brand-name { font-family: var(--head); font-size: 17px; font-weight: 700; color: var(--white); }
.chip-brand { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); border: 1px solid #3A2A1C; border-radius: 6px; padding: 3px 7px; }
.chip-brand.solid { color: var(--on-orange); background: var(--orange); border-color: var(--orange); }
.who { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; min-height: 44px; padding: 4px 14px 4px 6px; }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--orange); color: var(--on-orange); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.avatar.grey { background: #2A2A2A; color: var(--white); }
.who-text { display: flex; flex-direction: column; line-height: 1.2; }
.who-text strong { color: var(--white); font-size: 14px; }
.who-text small { color: #A3A3A3; font-size: 12px; }

.shell { flex: 1; display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 1 1 232px; background: var(--surface); border-right: 1px solid var(--line-soft); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.side a, .navbtn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font: inherit; font-size: 14px; text-decoration: none; min-height: 44px; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.side a:hover, .navbtn:hover { background: #151515; color: var(--white); }
.side a[aria-current="page"] { background: var(--raise); color: var(--white); font-weight: 600; }
.side a[aria-current="page"] .ic { color: var(--orange); }
.main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 8px; font-size: 13px; color: #A3A3A3; margin-top: auto; }
.foot strong { color: var(--white); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { margin-top: 6px; font-family: var(--head); font-size: 32px; font-weight: 700; letter-spacing: -.03em; color: var(--white); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-head .intro { max-width: 780px; display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
.btn.primary:hover { background: #F39A44; color: var(--on-orange); }
.btn.ghost { background: transparent; color: var(--text); border-color: #444; }
.btn.ghost:hover { border-color: #666; color: var(--white); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; height: 48px; font-size: 15px; }
.btn.done { background: #0E2A20 !important; color: var(--complete-text) !important; border-color: #1C4D3A !important; }
.linkbtn { background: none; border: 0; color: var(--orange-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 10px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input, .pw-wrap { height: 48px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--white); font: inherit; font-size: 15px; padding: 0 14px; outline: none; }
.field input:focus, .pw-wrap:focus-within { border-color: var(--orange); }
.pw-wrap { display: flex; align-items: center; padding: 0 4px 0 14px; }
.pw-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; }
.pw-toggle { width: 44px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 44px; color: #A3A3A3; }
.search.small { height: 40px; background: var(--surface); }
.search input { border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; width: 240px; max-width: 50vw; color: var(--text); }

/* notices */
.notice, .hint { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line-soft); background: var(--surface); }
.notice p, .hint p { flex: 1 1 300px; font-size: 14px; color: var(--text); }
.hint p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.hint strong { color: var(--text); }
.hint .ic, .notice .ic { color: var(--orange); }
.notice.warn { background: #1A1206; border-color: #4A3313; }
.notice.warn strong { color: var(--white); }
.notice.warn a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 10px 4px; }
.notice.bad { background: #240C0C; border-color: #5A2222; }
.notice.bad .ic { color: #FF8A8A; }
.notice.ok { background: #0B1F18; border-color: #1C4D3A; }
.notice.ok .ic { color: var(--complete-text); }
.notice.inset { margin: 16px 20px; }
.warn-text { font-size: 13px; color: var(--orange-text); font-weight: 600; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; }
.card.highlight { border-color: var(--orange); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head > div { display: flex; flex-direction: column; gap: 4px; }
.card-head h2 { font-size: 15px; font-weight: 600; color: var(--white); display: flex; align-items: center; gap: 10px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px 18px; font-size: 13px; line-height: 1.55; }
.empty { padding: 24px 20px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; border: 1px solid var(--line-strong); color: var(--muted); background: #1A1A1A; white-space: nowrap; }
.chip.live, .chip.st-active { color: var(--complete-text); background: #0E2A20; border-color: #1C4D3A; }
.chip.paused, .chip.st-sent { color: var(--orange-text); background: #2A1A08; border-color: #4A3313; }
.chip.plain { font-family: Inter, sans-serif; letter-spacing: 0; }
.tag { font-size: 12px; font-weight: 600; color: var(--text); background: var(--raise); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 8px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.c-complete { background: var(--complete); } .c-term { background: var(--term); } .c-oq { background: var(--oq); }
.c-quality { background: var(--quality); } .c-orange { background: var(--orange); } .c-none { border: 1px solid #666; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 8px; }
.dot.live { background: var(--complete-text); } .dot.test { border: 2px solid var(--term); }

/* stats + chart */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.stat.accent::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #EE8A2B, #A6125A); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .num { font-family: var(--head); font-size: 40px; font-weight: 700; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--faint); }
.chart { padding: 20px 20px 16px; display: flex; gap: 10px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: 11px; color: var(--faint); text-align: right; }
.plot-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.plot { height: 180px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line-strong); background: linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 60px; }
.bar { flex: 1; min-height: 1px; background: var(--complete); border-radius: 4px 4px 0 0; }
.bar.today { background: var(--orange); }
.xlabels { display: flex; gap: 8px; font-size: 11px; color: var(--faint); }
.xlabels span { flex: 1; text-align: center; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: #A3A3A3; font-weight: 600; padding: 12px; border-bottom: 1px solid var(--line-soft); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line-row); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th.r, td.r { text-align: right; }
.w-34 { width: 34%; }
.num-cell { font-variant-numeric: tabular-nums; }
.strong-link { font-weight: 600; text-decoration: none; }
.vid { color: var(--orange-text); font-weight: 600; }
.progress { display: flex; align-items: center; gap: 12px; }
.track { flex: 1; height: 8px; border-radius: 999px; background: var(--line-soft); display: flex; overflow: hidden; }
.fill { background: var(--complete); border-radius: 999px; }
.fill.hot { background: var(--orange); } .fill.grey { background: #555; }
.pnum { min-width: 72px; text-align: right; color: var(--white); font-variant-numeric: tabular-nums; }
.pnum.big { font-size: 15px; font-weight: 600; }
.legend { padding: 14px 20px; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 18px; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
form.inline { display: inline; }

/* project cards */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.pillset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--muted); border: 1px solid var(--line-strong); }
.pill[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
.hint.wide { align-items: flex-start; }
code.m-id, mark.m-id { font-family: var(--mono); color: var(--orange-text); background: #1F160C; border-radius: 4px; padding: 0 4px; font-weight: 600; }
code.m-var, mark.m-var { font-family: var(--mono); color: #C6B8FF; background: #19152B; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.cards { display: flex; flex-direction: column; gap: 16px; }
.pcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.pcard-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pcard-title h2 { font-family: var(--head); font-size: 20px; font-weight: 700; color: var(--white); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--line-soft); }
.metric { padding: 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.metric.span2 { grid-column: span 2; }
.metric .label { font-size: 12px; color: var(--faint); }
.metric .val { font-size: 15px; font-weight: 600; color: var(--white); font-variant-numeric: tabular-nums; }
.links { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.linkrow { display: flex; flex-direction: column; gap: 8px; }
.linklabel { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; }
.linklabel .muted { font-weight: 400; color: var(--faint); margin-left: 4px; }
.linkline { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.linkbox { flex: 1 1 420px; min-width: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
.copy { min-width: 160px; }
.returns { border-top: 1px solid var(--line-soft); }
.returns summary { list-style: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.returns summary::-webkit-details-marker { display: none; }
.returns[open] summary .ic { transform: rotate(180deg); }
.returns dl { margin: 0; padding: 0 20px 18px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; font-size: 13px; }
.returns dt { color: var(--faint); }
.returns dd { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.returns dd.muted { color: var(--faint); font-family: inherit; }

/* redirect + profile */
.urllist { list-style: none; margin: 0; padding: 4px 0; }
.urllist li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 20px; border-bottom: 1px solid var(--line-row); }
.urlkey { flex: 0 0 140px; font-size: 14px; font-weight: 600; color: var(--text); }
.urlval { flex: 1 1 360px; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.urlval.muted { color: var(--faint); font-family: inherit; }
.row-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border-color: var(--line-soft); }
.iconbox { width: 40px; height: 40px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.grow-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 4px; }
.two-col { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-wide { flex: 3 1 480px; min-width: 0; }
.col-narrow { flex: 2 1 340px; min-width: 0; }
.details { margin: 0; padding: 8px 20px 4px; display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); }
.details dt, .details dd { padding: 14px 0; border-bottom: 1px solid var(--line-row); }
.details dt { font-size: 13px; color: var(--faint); }
.details dd { margin: 0; font-size: 14px; color: var(--white); word-break: break-word; }
.details dd.muted { color: var(--faint); }

/* staff */
.newpw { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.msg { flex: 1 1 420px; min-width: 0; margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; }
.newpw-side { flex: 0 1 220px; display: flex; flex-direction: column; gap: 10px; }

/* sign-in pages */
.auth-split { flex: 1; display: flex; flex-wrap: wrap; align-items: stretch; }
.auth-intro { flex: 1 1 520px; padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; background: var(--surface); border-right: 1px solid var(--line-soft); }
.auth-intro .brand img { height: 44px; }
.auth-copy { display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.auth-copy h1 { font-family: var(--head); font-size: 48px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; color: var(--white); }
.auth-copy p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.ticks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ticks li { display: flex; align-items: center; gap: 12px; }
.ticks span { width: 28px; height: 28px; border-radius: 8px; background: var(--raise); border: 1px solid var(--line); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.ticks .ic { width: 15px; height: 15px; }
.auth-form-wrap { flex: 1 1 480px; padding: 64px 40px; display: flex; align-items: center; justify-content: center; }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.auth-form h2 { font-family: var(--head); font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--white); margin-bottom: 8px; }
.center-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 24px; gap: 8px; }
.card.narrow { width: 100%; max-width: 460px; padding: 36px; }
.h-card { font-family: var(--head); font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.center { text-align: center; }

@media (max-width: 720px) {
  .auth-form-wrap { order: -1; }
  .auth-intro { padding: 40px 24px; border-right: 0; border-top: 1px solid var(--line-soft); }
  .auth-copy h1 { font-size: 34px; }
  .auth-form-wrap { padding: 40px 24px; }
  .main { padding: 16px; }
  .metric.span2 { grid-column: auto; }
  .card.narrow { padding: 24px; }
}
