/* Punchout Procure: Punchout Headquarters' dark style (Unbounded/Inter, spectrum accents). */
:root {
  --bg: #0b0b10; --surface: #13131a; --surface-2: #16161f; --field: #0e0e14; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.06);
  --text: #e4e4ea; --muted: #a1a1b0; --link: #a5b4fc; --link-hover: #c7d2fe;
  --blue: #60a5fa; --purple: #a78bfa; --pink: #f472b6; --orange: #fb923c; --yellow: #facc15; --green: #34d399; --red: #f87171;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); } a:hover { color: var(--link-hover); }
h1, h2, h3 { margin: 0; }
.wm { font-family: Unbounded, Inter, sans-serif; font-weight: 600; letter-spacing: -0.03em; }
.spectrum { background: linear-gradient(90deg, #60a5fa, #a78bfa 30%, #f472b6 60%, #fb923c 85%, #facc15); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: rgba(11,11,16,.92); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .wm { font-size: 16px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); }
.nav a.on { color: #fff; background: rgba(255,255,255,.06); }
.switches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.switches form { display: flex; }
.switches select { appearance: none; background: rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23a1a1b0' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 28px 6px 12px; font: 600 12px Inter, sans-serif; min-height: 32px; cursor: pointer; }
.switches select.env { background-color: rgba(167,139,250,.14); color: #c4b5fd; }

/* Layout */
main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 32px 64px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .eyebrow { font-size: 13px; color: var(--muted); }
.head h1 { font-size: 30px; line-height: 1.15; margin-top: 6px; }
.head .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.pad { padding: 20px; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.card-h h2 { font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.row .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.kv > :last-child { text-align: right; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line-2); }
.flash { background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.35); color: #ddd6fe; border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.warn { background: rgba(251,146,60,.1); border: 1px solid rgba(251,146,60,.35); color: #fed7aa; border-radius: 12px; padding: 12px 16px; font-size: 14px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font: 600 14px Inter, sans-serif; border: 1px solid rgba(255,255,255,.12); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--surface-2); color: #fff; }
.btn-p { border: 0; color: #fff; background-image: linear-gradient(100deg, #4f46e5 0%, #7c3aed 45%, #c026d3 100%); box-shadow: 0 6px 24px -8px rgba(168,85,247,.6); }
.btn-p:hover { filter: brightness(1.1); background-image: linear-gradient(100deg, #4f46e5 0%, #7c3aed 45%, #c026d3 100%); }
.btn-d { color: #fca5a5; border-color: rgba(248,113,113,.35); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn-wide { justify-content: space-between; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.in { display: block; width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: var(--field); color: var(--text); padding: 10px 12px; font: 14px Inter, sans-serif; min-height: 44px; }
.in:focus, .qty:focus { outline: 2px solid rgba(167,139,250,.6); outline-offset: 1px; }
.qty { width: 84px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: var(--field); color: var(--text); padding: 8px 10px; font: 14px Inter, sans-serif; min-height: 40px; text-align: right; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .full { grid-column: 1 / -1; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.neutral { background: rgba(255,255,255,.06); color: #d4d4dc; }
.pill.blue { background: rgba(96,165,250,.12); color: #93c5fd; }
.pill.purple { background: rgba(167,139,250,.14); color: #c4b5fd; }
.pill.pink { background: rgba(244,114,182,.14); color: #f9a8d4; }
.pill.orange { background: rgba(251,146,60,.14); color: #fdba74; }
.pill.yellow { background: rgba(250,204,21,.12); color: #fde047; }
.pill.green { background: rgba(52,211,153,.14); color: #6ee7b7; }
.pill.red { background: rgba(248,113,113,.14); color: #fca5a5; }
.dot { width: 10px; height: 10px; border-radius: 999px; flex: none; }

/* Tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
td a { font-weight: 600; text-decoration: none; }
.code { background: #0a0a0f; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font: 12px/1.6 "JetBrains Mono", monospace; white-space: pre; overflow: auto; color: #d4d4dc; margin: 0; max-height: 32rem; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* Home */
.hero h1 { font-size: 40px; line-height: 1.1; }
.hero p { margin: 10px 0 0; font-size: 16px; color: var(--muted); max-width: 640px; }
.envcard { text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; width: 100%; height: 100%; }
.envcard:hover { border-color: rgba(255,255,255,.18); }
.envcard.on { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6, #fb923c) border-box; border: 1px solid transparent; }
.envcard .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 17px; font-weight: 700; }
.envcard .facts { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pipeline { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stage { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.03); }
.stage .n { font-size: 26px; }

/* PO stepper */
.stepper { list-style: none; margin: 0; padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 4px; }
.stepper li.todo { opacity: .55; }
.stepper .ring { width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid currentColor; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.chain li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.chain li.now { border-color: rgba(167,139,250,.5); }
.chain .n { flex: none; width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }

footer { border-top: 1px solid var(--line); padding: 20px 32px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  main { padding: 24px 16px 48px; }
  .hero h1 { font-size: 30px; }
  .head h1 { font-size: 24px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  footer { padding: 20px 16px; }
}
