/* JO Safety Asset bank - shared styling.
 *
 * Design tokens carried over from the approved prototype v0.24
 * (Prototype/PROTOTYPE-asset-bank-v0.24.html) so the built site looks like
 * the thing the sales team already reviewed. Light only, matching the
 * prototype decision from 01-09-2026.
 */

:root {
  --red: #AF272E;
  --red-dark: #8C1F25;
  --grey: #333F48;
  --ink: #23292E;
  --blue: #005383;
  --green: #00955C;
  --yellow: #F6CA21;
  --bg: #f4f5f6;
  --card: #fff;
  --line: #e2e5e8;
  --muted: #6b7680;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4, .cond {
  font-family: "Roboto Condensed", Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
}

a { color: var(--red); }

/* ── header ───────────────────────────────────────────────────────── */
header {
  background: var(--grey);
  color: #fff;
  border-bottom: 3px solid var(--red);
}

.hwrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 11px 28px 12px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

header h1 { margin: 0; font-size: 21px; line-height: 1.1; }

.hmeta {
  font-size: 11.5px;
  opacity: .6;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hsep { opacity: .35; margin: 0 8px; }

.badge {
  display: inline-block;
  background: var(--yellow);
  color: #3a2f00;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: 2px;
}

.badge.admin { background: var(--blue); color: #fff; }
.badge.env { background: #4a5560; color: #fff; }
/* display: inline-block above beats the hidden attribute. On staging the env
   badge says "staging" and nobody notices; in production it stays hidden and
   rendered as an empty grey pill in the header. */
.badge[hidden] { display: none; }

.linkbtn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .3);
  background: none;
  color: #fff;
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.linkbtn:hover { background: rgba(255, 255, 255, .12); }

/* ── layout ───────────────────────────────────────────────────────── */
main { max-width: 1440px; margin: 0 auto; padding: 22px 28px 80px; }

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

.card h2 { margin: 0 0 4px; font-size: 17px; }

.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

dl.kv {
  display: grid;
  grid-template-columns: minmax(140px, max-content) 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 14px;
}

dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.pill.yes { background: #e6f5ee; color: var(--green); border-color: #bfe6d5; }
.pill.no { background: #f6e7e8; color: var(--red); border-color: #eccdcf; }

.note {
  border-left: 3px solid var(--yellow);
  background: #fffdf3;
  padding: 12px 16px;
  font-size: 13.5px;
  border-radius: 0 4px 4px 0;
}

.note strong { font-family: "Roboto Condensed", Roboto, sans-serif; }

/* ── centred pages (login, no access) ─────────────────────────────── */
.centre {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.centre .wrap {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand {
  font-family: "Roboto Condensed", Roboto, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--grey);
  letter-spacing: .01em;
  margin: 0;
}

.brand em {
  font-style: normal;
  color: var(--red);
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 22px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

.panel h1 { font-size: 20px; margin: 0 0 10px; }
.panel p { color: #4D575C; font-size: 14.5px; margin: 0 0 20px; }

.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--red-dark); }

.btn.ghost {
  background: none;
  color: var(--grey);
  border: 1px solid var(--line);
}

.btn.ghost:hover { background: var(--bg); }

.clerk-mount { display: flex; justify-content: center; width: 100%; }

.footnote {
  margin-top: 1.5rem;
  font-size: 12px;
  color: #8a949b;
  text-align: center;
}

@media (max-width: 600px) {
  .hwrap, main { padding-left: 16px; padding-right: 16px; }
  .hmeta { margin-left: 0; width: 100%; }
  dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
  dl.kv dd { margin-bottom: 10px; }
}
