/* PyroKey tenant portal — the same surfaces, palette and accent as the
   pyrokey.com marketing site, so signing in does not feel like leaving the
   product you just bought. Tokens are copied from that site's :root rather
   than imported: the two are separate deployments (a static microsite and
   this control-plane service) and a runtime dependency between them would
   mean the portal stops rendering correctly whenever the marketing site is
   redeployed. They are a handful of values, and this comment is the note to
   keep them in step. */
:root {
  --ink: #202521;
  --muted: #59615a;
  --paper: #f5f5f0;
  --surface: #fff;
  --line: #d6d9d1;
  --dark: #191d1b;
  --dark-panel: #242a26;
  --dark-line: #414941;
  --light: #f3f5ed;
  --subtle: #b7c0b5;
  --accent: #d7ef8f;
  --accent-ink: #233316;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------------- chrome ---------------- */

.site-header {
  background: var(--dark);
  color: var(--light);
  border-bottom: 1px solid #353c35;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark { font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.wordmark span { color: var(--accent); }

.who { display: flex; align-items: center; gap: 14px; font-size: 0.85rem; color: var(--subtle); }
/* .btn.ghost is dark-on-light by default, which disappears against the dark
   header it sits in. */
.who .btn.ghost { color: var(--light); border-color: var(--dark-line); }
.who .btn.ghost:hover { border-color: var(--subtle); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 30px 22px 60px; }

h1 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-size: 1rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 26px; }

/* ---------------- cards ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; }
.stat .k { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.stat .n { font-size: 0.82rem; color: var(--muted); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 0.94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------------- launch checklist ---------------- */

.steps { list-style: none; margin: 0; padding: 0; }

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }

.tick {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}
.step.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.done .step-title { color: var(--muted); text-decoration: line-through; }

.step-title { font-weight: 600; }
.step-note { color: var(--muted); font-size: 0.88rem; }

/* ---------------- controls ---------------- */

.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--dark);
  background: var(--dark);
  color: var(--light);
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.live { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill.warn { background: #fbf1d2; border-color: #e6d59a; color: #6b551a; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 5px; }
.field input {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.msg { padding: 10px 12px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 14px; }
.msg.bad { background: #fbeaea; color: #7c2020; border: 1px solid #eecccc; }
.msg.good { background: #eef6dc; color: var(--accent-ink); border: 1px solid #d8e6b4; }

.hint { color: var(--muted); font-size: 0.88rem; }

/* ---------------- sign-in ---------------- */

.signin { max-width: 380px; margin: 9vh auto; padding: 0 22px; }
.signin .card { padding: 26px 24px; }
.signin .wordmark { color: var(--ink); font-size: 1.3rem; margin-bottom: 4px; }

@media (max-width: 640px) {
  .header-inner, .wrap { padding-left: 16px; padding-right: 16px; }
  .who .email { display: none; }
}

/* ---------------- portal shell ----------------
   A sidebar rather than one long page: launch setup, the commercial
   relationship and the technical addresses are different conversations, and
   a retailer part-way through onboarding should be able to leave and come
   back to the one they were in. */

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 53px); }

.side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 0; }
.side-group { padding: 0 14px 6px; font-size: 0.68rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.side-group:first-child { margin-top: 0; }

.side a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; margin: 1px 8px;
  border-radius: 8px; text-decoration: none;
  color: var(--ink); font-size: 0.93rem;
}
.side a:hover { background: var(--paper); }
.side a.on { background: var(--dark); color: var(--light); font-weight: 600; }
.side a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.side a.on .dot { background: var(--accent); }

.main { padding: 30px 34px 70px; max-width: 900px; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 1.5rem; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; max-width: 62ch; }

/* Progress bar used on the overview and launch pages. */
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s ease; }

.next {
  border: 1px solid var(--accent); background: #f6fbe8;
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.next .k { font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.next .t { font-weight: 700; font-size: 1.08rem; }
.next .grow { flex: 1; min-width: 220px; }

/* Feature list on the subscription page. */
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; }
.feat { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; }
.feat .m { color: var(--accent-ink); background: var(--accent); border-radius: 50%;
  width: 17px; height: 17px; display: grid; place-items: center; font-size: 0.65rem; flex: none; }
.feat.off { color: var(--muted); }
.feat.off .m { background: var(--line); color: var(--muted); }

.rows { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.rows th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 0 12px 8px 0; }
.rows td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.rows code { font: 0.86rem var(--mono); }

.empty { color: var(--muted); padding: 18px 0; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-group { display: none; }
  .side a { white-space: nowrap; }
  .main { padding: 22px 16px 50px; }
}
