/* =====================================================================
   Baden Bower internal dashboard - shared theme
   Design system v4 "Editorial Print" adapted for the ops dashboard.
   Single source of truth for tokens + shared components across all pages
   (board, reports, insights, finance, login).

   Adapted from the marketing v4 system:
   - Newsreader (serif) for display/headings, Radio Canada for body/UI.
   - Cream paper background, navy ink, gold as accent (rules/marks/offsets).
   - Square corners everywhere (border-radius 0). No soft blur shadows;
     depth comes from 1.5px navy frames and hairline rules.
   - Letterpress block buttons (solid fill, hard gold offset, press on hover).
   - Scotch-rule section kickers.
   Functional additions not in the marketing palette: --red / --amber are kept
   as data-status colours (the board heatmap and finance flags need them).
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&family=Radio+Canada:wght@400;500;600;700&display=swap');

:root {
  --navy: #0B1E3D; --navy-2: #14294f; --gold: #C9A84C; --green: #1A7A4A;
  --cream: #F7F5F0; --mist: #F5F5FD; --ink: #1B2A44; --grey: #5B6577;
  --hair: rgba(11,30,61,.28);
  /* functional data-status colours (not part of the marketing palette) */
  --red: #C0392B; --amber: #E08A1E;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Radio Canada', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--cream);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Display type: serif, negative tracking, square feel */
h1, h2, h3, .disp { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.12; letter-spacing: -0.01em; }
.disp em, h1 em, h2 em { font-style: italic; font-weight: 500; }

/* ---------------------------------------------------------------------
   Header + primary nav (navy masthead, gold rule)
   --------------------------------------------------------------------- */
header {
  background: var(--navy); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 20;
}
header h1 { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 0; color: #fff; letter-spacing: -0.01em; white-space: nowrap; }
header h1 .dot { color: var(--gold); margin: 0 6px; font-style: normal; }
.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none; color: #dbe2f0;
  padding: 7px 12px; white-space: nowrap; border: 1px solid transparent;
}
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.active { background: var(--gold); color: var(--navy); }
.spacer { flex: 1; }
.updated { font-family: var(--sans); font-size: 11.5px; color: #c4cde0; white-space: nowrap; }
.updated b { color: #fff; font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.whoami { font-size: 11.5px; color: #c4cde0; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.whoami b { color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------------
   Letterpress buttons: square, solid fill, hard gold offset, press on hover.
   Covers the .btn family and the dashboard's legacy button classes.
   --------------------------------------------------------------------- */
.btn, button.refresh, button.run, .btn-primary {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 13px;
  letter-spacing: .02em; padding: 11px 22px; border-radius: 0; text-decoration: none;
  cursor: pointer; border: none; background: var(--navy); color: #fff;
  box-shadow: 4px 4px 0 var(--gold); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover, button.refresh:hover, button.run:hover, .btn-primary:hover {
  transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gold);
}
.btn:disabled, button.refresh:disabled, button.run:disabled { opacity: .55; cursor: progress; box-shadow: 2px 2px 0 var(--gold); }
/* alt = cream fill for navy backgrounds */
.btn.alt { background: var(--cream); color: var(--navy); }
/* line/secondary = outline, inverts on hover */
.btn.line, button.logout, button.link {
  background: transparent; color: var(--navy); border: 1.5px solid var(--navy);
  box-shadow: none; font-weight: 700; font-size: 12px; letter-spacing: .02em;
  padding: 7px 13px; border-radius: 0; cursor: pointer; font-family: var(--sans);
  text-decoration: none; display: inline-block; transition: background .12s ease, color .12s ease;
}
.btn.line:hover, button.link:hover { background: var(--navy); color: #fff; }
/* buttons sitting on the navy header */
header button.logout { color: #dbe2f0; border-color: rgba(255,255,255,.45); background: transparent; }
header button.logout:hover { background: #fff; color: var(--navy); }
header button.refresh { background: var(--cream); color: var(--navy); }
@media (prefers-reduced-motion: reduce) {
  .btn, button.refresh, button.run { transition: none; }
  .btn:hover, button.refresh:hover, button.run:hover { transform: none; }
}

/* ---------------------------------------------------------------------
   Scotch-rule section kicker (thick-thin double rule + small-caps label)
   --------------------------------------------------------------------- */
.kick { position: relative; border-top: 3px solid var(--navy); padding-top: 13px; margin-bottom: 14px; }
.kick::before { content: ''; position: absolute; left: 0; right: 0; top: 5px; border-top: 1px solid var(--navy); }
.kick span { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--navy); }
.kick span b { color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------------------------
   Panels / cards: 1.5px navy frame, square, white on cream, no shadow
   --------------------------------------------------------------------- */
.card {
  background: #fff; border: 1.5px solid var(--navy); border-radius: 0;
  box-shadow: none; overflow: hidden;
}

/* ---------------------------------------------------------------------
   Layout container + section blocks
   --------------------------------------------------------------------- */
main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 70px; }
.block { margin-top: 30px; }
.block:first-child { margin-top: 6px; }
/* Section title: scotch rule above (3px + 1px), serif heading below —
   matches the Sales page's section treatment. */
.block-head { display: block; border-top: 3px solid var(--navy); padding-top: 2px; max-width: 300px; margin-bottom: 12px; }
.block-head::before { content: ''; display: block; border-top: 1px solid var(--navy); margin-bottom: 14px; }
h2 { font-size: 22px; margin: 0; }
.block-sub { font-family: var(--sans); font-size: 12.5px; color: var(--grey); }

/* ---------------------------------------------------------------------
   Tables: navy header, hairline rows, mist zebra, square marks
   --------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
thead th {
  background: var(--navy); color: #fff; font-family: var(--sans); font-weight: 600;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; text-align: left;
  padding: 10px 11px; white-space: nowrap; position: sticky; top: 0;
}
thead th.num, td.num { text-align: right; }
tbody td { padding: 9px 11px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--mist); }
td.num { font-family: var(--mono); }
.num-serif { font-family: var(--serif); font-weight: 600; color: var(--navy); }

/* Registration-square list/table marks */
.sq { display: inline-block; width: 10px; height: 10px; background: var(--gold); vertical-align: middle; }
.sq.hollow { background: transparent; border: 1.5px solid var(--hair); }

/* Square bordered tags (no fill) */
.tag { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 600; padding: 2px 9px; border: 1px solid var(--hair); color: var(--navy); border-radius: 0; text-transform: uppercase; letter-spacing: .04em; }
.tag.gold { border-color: var(--gold); color: #7a6222; }
.tag.green { border-color: var(--green); color: var(--green); }
.tag.red { border-color: var(--red); color: var(--red); }

/* Solid status badges (square) for functional flags */
.badge { display: inline-block; font-family: var(--sans); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 0; }
.badge.esc, .badge.due, .badge.red { background: var(--red); color: #fff; }
.badge.amber { background: var(--amber); color: var(--navy); }
.badge.green, .badge.ok { background: var(--green); color: #fff; }
.badge.step, .badge.neutral { background: var(--mist); color: var(--navy); border: 1px solid var(--hair); }

/* ---------------------------------------------------------------------
   Forms (login + inline inputs)
   --------------------------------------------------------------------- */
input, select, textarea { font-family: var(--sans); }
.field label, label { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--navy); }
.field input, input.form, select.form, .cell {
  border: 1px solid var(--navy); border-radius: 0; background: #fff; color: var(--ink);
  font-family: var(--sans); padding: 10px 12px; font-size: 14px;
}
.field input:focus, input.form:focus, select.form:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.22);
}

/* ---------------------------------------------------------------------
   States
   --------------------------------------------------------------------- */
.loading, .empty { padding: 34px; text-align: center; color: var(--grey); }
.error-state { padding: 30px; text-align: center; background: #fbe9e7; border: 1.5px solid var(--red); color: #8a261c; }
.notice { padding: 22px; text-align: center; color: var(--grey); background: #fff; border: 1.5px dashed var(--hair); }
