/* HIRE IQ Head Office.
 *
 * The same tokens as HIRE IQ's own stylesheet, in the Prospra colours:
 * Matte Black #111827, Electric Cobalt #2563EB, Slate #4B5563, Stone
 * #F3F4F6. Everything is in this file and nothing is inline, because the
 * content security policy is `style-src 'self'` - an inline style
 * attribute simply does not paint. Bar widths come from the w-* classes
 * at the bottom for the same reason.
 */

:root {
  --ink: #111827;
  --ink-soft: #4B5563;
  --line: #E5E7EB;
  --bg: #F3F4F6;
  --panel: #FFFFFF;
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --ok: #166534;
  --ok-bg: #DCFCE7;
  --warn: #92400E;
  --warn-bg: #FEF3C7;
  --bad: #991B1B;
  --bad-bg: #FEE2E2;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent-dark); }
a:hover { color: #1E3A8A; }

.shell { display: flex; min-height: 100vh; }

/* The sidebar */
.side {
  width: 232px;
  flex-shrink: 0;
  background: var(--ink);
  color: #F9FAFB;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.brand span { color: #60A5FA; }
.brand-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #9CA3AF;
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  color: #D1D5DB;
  text-decoration: none;
  font-weight: 500;
}
.side nav a:hover { background: #1F2937; color: #FFFFFF; }
.side nav a.on { background: var(--accent); color: #FFFFFF; font-weight: 700; }
.side .who { margin-top: auto; border-top: 1px solid #374151; padding-top: 14px; }
.side .who p { margin: 0 0 8px; font-size: 13px; color: #D1D5DB; }

/* The page */
main { flex-grow: 1; min-width: 0; padding: 26px 32px 60px; }
h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.lede { margin: 0 0 18px; color: var(--ink-soft); }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.tiles { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 200px;
  flex-grow: 1;
}
.tile .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.tile .figure { font-size: 24px; font-weight: 700; }
.tile .under { font-size: 13px; color: var(--ink-soft); }

table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--ink-soft); background: #F9FAFB; }
th a { color: var(--ink-soft); text-decoration: none; }
th a.sorted { color: var(--accent-dark); font-weight: 700; }
td.figure, th.figure { text-align: right; }
tr:last-child td { border-bottom: 0; }
caption { text-align: left; padding: 10px; font-weight: 700; }

.pill {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.ok { background: var(--ok-bg); color: var(--ok); }
.watch { background: var(--warn-bg); color: var(--warn); }
.act { background: var(--bad-bg); color: var(--bad); }
.late { color: var(--bad); font-weight: 700; }
.up { color: var(--ok); font-weight: 700; }
.down { color: var(--bad); font-weight: 700; }
.quiet { color: var(--ink-soft); }
.small { font-size: 13px; }

.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--warn-bg);
  color: var(--warn);
}
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.good { background: var(--ok-bg); color: var(--ok); }

label { display: block; font-size: 14px; font-weight: 700; margin: 10px 0 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font: inherit;
  background: #FFFFFF;
}
textarea { min-height: 160px; font-family: ui-monospace, "Cascadia Mono", monospace; }
button, .button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.primary, .button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
button.primary:hover { background: var(--accent-dark); }
form.inline { display: inline; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 700; }

.bar { background: var(--bg); border-radius: 6px; height: 16px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.bar span.warn { background: #F59E0B; }
.bar span.bad { background: #DC2626; }

.columns { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.columns > * { flex: 1 1 320px; }

.chart { display: flex; gap: 6px; align-items: flex-end; height: 180px; }
.chart .col { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-align: center; }
.chart .col i { display: block; background: var(--accent); border-radius: 4px 4px 0 0; }
.chart .col i.running { background: #93C5FD; }
.chart .col small { font-size: 11px; color: var(--ink-soft); }

.codes { font-family: ui-monospace, monospace; font-size: 18px; line-height: 2; }

/* Widths, in steps of five, because a style attribute does not paint
   under this content security policy. */
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; }
.w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; }
.w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; }
.w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; }
.w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; }
.w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

/* Heights for the twelve-month chart, in the same steps. */
.h-0 { height: 2px; } .h-5 { height: 9px; } .h-10 { height: 18px; }
.h-15 { height: 27px; } .h-20 { height: 36px; } .h-25 { height: 45px; }
.h-30 { height: 54px; } .h-35 { height: 63px; } .h-40 { height: 72px; }
.h-45 { height: 81px; } .h-50 { height: 90px; } .h-55 { height: 99px; }
.h-60 { height: 108px; } .h-65 { height: 117px; } .h-70 { height: 126px; }
.h-75 { height: 135px; } .h-80 { height: 144px; } .h-85 { height: 153px; }
.h-90 { height: 162px; } .h-95 { height: 171px; } .h-100 { height: 180px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; }
  main { padding: 18px 16px 48px; }
  table { font-size: 14px; }
}
