/* ============================================================
   STRIDE — Shared design system
   EDIT: Change brand colours here to update the whole site
   Navy:  #0A1A72   Blue dot: #3B6FE8   Background: #F4F5F7
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0A1A72;
  --navy-2:     #0C1F8A;
  --blue:       #3B6FE8;
  --blue-light: #EEF2FF;
  --blue-mid:   #BAC8FF;
  --text-1:     #111827;
  --text-2:     #6B7280;
  --text-3:     #9CA3AF;
  --border:     #E8EAF0;
  --surface:    #ffffff;
  --bg:         #F4F5F7;
  --green:      #085041;
  --green-bg:   #E1F5EE;
  --amber:      #633806;
  --amber-bg:   #FAEEDA;
  --red:        #742A2A;
  --red-bg:     #FED7D7;
  --radius:     8px;
  --radius-lg:  14px;

  /* ── Aliases ──────────────────────────────────────────────
     A handful of screens were built against this alternate
     --color-*/--border-radius-*/--font-* naming convention.
     Rather than touch every page, alias them here to the same
     values above so both conventions resolve identically. */
  --color-background-primary:   var(--surface);
  --color-background-secondary: var(--bg);
  --color-background-tertiary:  var(--bg);
  --color-border-secondary:     var(--border);
  --color-border-tertiary:      var(--border);
  --color-text-primary:         var(--text-1);
  --color-text-secondary:       var(--text-2);
  --color-text-tertiary:        var(--text-3);
  --border-radius-md:  var(--radius);
  --border-radius-lg:  var(--radius-lg);
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
}

/* ── Top nav ── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 52px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  gap: 12px;
}
.topnav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topnav-wordmark { font-size: 20px; font-weight: 600; color: var(--navy); letter-spacing: -.4px; position: relative; display: inline-block; }
.topnav-dot { position: absolute; top: 1px; right: -7px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.topnav-links { display: flex; gap: 4px; align-items: center; overflow-x: auto; }
.topnav-link { padding: 6px 11px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap; transition: background .1s, color .1s; }
.topnav-link:hover { background: var(--bg); color: var(--text-1); }
.topnav-link.active { background: var(--blue-light); color: var(--navy); }
.topnav-right { display: flex; align-items: center; gap: 10px; }
.topnav-club { font-size: 12px; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 99px; }
.topnav-av { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* ── Sidebar ── */
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 10px 0; display: flex; flex-direction: column; overflow-y: auto; min-height: calc(100vh - 52px); align-self: start; position: sticky; top: 52px; }
.nav-sec { font-size: 9px; font-weight: 600; color: #B0B7C3; padding: 10px 14px 3px; letter-spacing: .07em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 12px; color: var(--text-2); cursor: pointer; border-radius: 7px; margin: 0 6px 1px; text-decoration: none; transition: background .1s, color .1s; }
.nav-item:hover { background: var(--bg); color: var(--text-1); }
.nav-item.active { background: var(--blue-light); color: var(--navy); font-weight: 600; }
.nav-item i { font-size: 14px; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--navy); color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 99px; font-weight: 600; }
.nav-badge.red { background: #E53E3E; }
.nav-divider { height: 1px; background: var(--border); margin: 6px 10px; }

/* ── Layout ── */
.app { display: grid; grid-template-columns: 184px 1fr; min-height: calc(100vh - 52px); align-items: start; }
.main { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 52px); overflow-y: visible; }
.page { max-width: 960px; margin: 0 auto; padding: 20px 20px 48px; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media(max-width:700px) { .g4{grid-template-columns:repeat(2,minmax(0,1fr))} .g3{grid-template-columns:repeat(2,minmax(0,1fr))} .g2{grid-template-columns:1fr} .app{grid-template-columns:1fr} .sidebar{display:none} }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.card-hd { font-size: 11px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.card-hd i { font-size: 14px; color: var(--navy); }
.see-all { font-size: 11px; color: var(--text-3); margin-left: auto; cursor: pointer; font-weight: 400; text-transform: none; letter-spacing: 0; text-decoration: none; }
.see-all:hover { color: var(--navy); }

/* ── Metric chips ── */
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; }
.chip-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.chip-val { font-size: 20px; font-weight: 700; line-height: 1; color: var(--text-1); }
.chip-lbl { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.chip-delta { font-size: 10px; margin-top: 3px; display: flex; align-items: center; gap: 2px; }
.up { color: #276749; } .dn { color: #C53030; } .wa { color: #C05621; }

/* ── Buttons ── */
.btn-p { background: var(--navy); color: #fff; border: none; padding: 9px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; text-decoration: none; transition: background .12s; }
.btn-p:hover { background: var(--navy-2); }
.btn-g { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); padding: 9px 14px; border-radius: var(--radius); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; text-decoration: none; transition: background .1s; }
.btn-g:hover { background: var(--bg); }
.btn-sm { font-size: 11px; padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; background: transparent; color: var(--text-2); font-family: inherit; }
.btn-sm:hover { background: var(--bg); }

/* ── Tags ── */
.tag { font-size: 10px; padding: 2px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; display: inline-block; }
.tg { background: #E1F5EE; color: #085041; }
.ta { background: #FAEEDA; color: #633806; }
.tb { background: #EEF2FF; color: var(--navy); }
.tr { background: #FED7D7; color: #742A2A; }
.tn { background: #F4F5F7; color: #6B7280; }
.td { background: var(--navy); color: #BAC8FF; }

/* ── Rows ── */
.row-d { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.row-d:last-child { border-bottom: none; }
.pav { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; flex-shrink: 0; }

/* ── Notices ── */
.notice { border-radius: var(--radius); padding: 10px 13px; display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.55; }
.n-blue   { background: #EEF2FF; border: 1px solid #6B87E8; color: var(--navy); }
.n-green  { background: #E1F5EE; border: 1px solid #5DCAA5; color: #085041; }
.n-amber  { background: #FAEEDA; border: 1px solid #EF9F27; color: #633806; }
.n-red    { background: #FED7D7; border: 1px solid #FC8181; color: #742A2A; }

/* ── Bars ── */
.bar-w { flex: 1; height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar-f { height: 100%; border-radius: 99px; }

/* ── Metric boxes ── */
/* Several screens build their top-of-page totals rows out of .metric
   (with optional .mi/.mv/.ml sub-elements) but never had these defined
   anywhere — this gave them an unstyled, un-boxed look. Defined once
   here so every screen using this pattern gets a consistent boxed look. */
.metric { background: var(--bg); border-radius: var(--radius); padding: 13px; display: flex; flex-direction: column; gap: 4px; }
.mi { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-bottom: 2px; }
.mv { font-size: 22px; font-weight: 700; line-height: 1; color: var(--text-1); }
.ml { font-size: 11px; color: var(--text-2); margin-top: 2px; }

/* ── Toggle ── */
.toggle { width: 40px; height: 22px; border-radius: 99px; cursor: pointer; display: flex; align-items: center; padding: 2px; border: none; transition: background .15s; flex-shrink: 0; }
.toggle.on  { background: var(--navy); justify-content: flex-end; }
.toggle.off { background: #D1D5DB; justify-content: flex-start; }
.toggle-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; }

/* ── Fixture hero ── */
.fix-hero { background: var(--navy); border-radius: var(--radius); padding: 13px; }
.fix-btn { flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #BAC8FF; padding: 7px 0; border-radius: 7px; font-size: 11px; cursor: pointer; font-family: inherit; font-weight: 500; text-align: center; display: inline-block; text-decoration: none; }
.fix-btn:hover { background: rgba(255,255,255,.18); }

/* ── AI insight ── */
.insight { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; display: flex; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.insight:last-child { margin-bottom: 0; }
.insight i { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* ── Misc ── */
.screen-title { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.screen-sub   { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.divider { height: 1px; background: var(--border); margin: 10px 0; }
.field { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; color: var(--text-1); background: var(--bg); }
.field:focus { outline: none; border-color: var(--navy); }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; display: block; }
.form-group { display: flex; flex-direction: column; margin-bottom: 12px; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.pulse { animation: pulse 1.5s infinite; }
