/* ══════════════════════════════════════════════════════════════
   STATUS BOARD
   Five colours, seven panels, thin white gaps between them.
   Empty for now — each panel gets its content later.
   ══════════════════════════════════════════════════════════════ */

.jsb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 30vh 44vh;
  gap: 6px;
  padding: 6px;
  background: #ffffff;
  min-height: 74vh;
}

.jsb-panel {
  border-radius: 0;
  min-height: 120px;
}

/* ── Colours ── */
.jsb-slate  { background: #0d1e3a; }
.jsb-orange { background: #e8563f; }
.jsb-green  { background: #7cbf43; }
.jsb-teal   { background: #22aac6; }
.jsb-gold   { background: #f5d020; }
.jsb-navy   { background: #2a55a8; }

/* ── Where each panel sits ──
   Top row: logo, status, rating, quote — then the board runs
   down the whole right-hand side. Bottom row: today's numbers
   under the first two, goals under the next two. */
#jsbLogo   { grid-column: 1;     grid-row: 1; }
#jsbStatus { grid-column: 2;     grid-row: 1; }
#jsbRating { grid-column: 3;     grid-row: 1; }
#jsbQuote  { grid-column: 4;     grid-row: 1; }
#jsbBoard  { grid-column: 5;     grid-row: 1 / span 2; }
#jsbToday  { grid-column: 1 / span 2; grid-row: 2; }
#jsbGoals  { grid-column: 3 / span 2; grid-row: 2; }

/* ── Narrow screens: two columns, board across the top ── */
@media (max-width: 900px) {
  .jsb-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  #jsbLogo, #jsbStatus, #jsbRating, #jsbQuote,
  #jsbBoard, #jsbToday, #jsbGoals {
    grid-column: auto;
    grid-row: auto;
  }
  #jsbBoard { grid-column: 1 / span 2; min-height: 260px; }
  #jsbToday { grid-column: 1 / span 2; min-height: 220px; }
  #jsbGoals { grid-column: 1 / span 2; min-height: 220px; }
}

/* ══ Panel contents ══════════════════════════════════════════ */

#jsbGoals .jsb-title { color: #ffffff; }

.jsb-title {
  font-size: 22px;
  font-weight: 400;
  color: #ffffff;
  text-align: center;
  padding: 14px 10px 10px;
  letter-spacing: .5px;
}

.jsb-board {
  padding: 0 14px 14px;
  overflow-y: auto;
  max-height: calc(100% - 52px);
}

.jsb-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

.jsb-rank { text-align: right; opacity: .8; }
.jsb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jsb-sub  { opacity: .55; font-size: 12px; min-width: 26px; text-align: right; }
.jsb-big  { font-weight: bold; min-width: 44px; text-align: right; }

/* Column headings — sit above the rows and stay put while it scrolls */
.jsb-row.jsb-head {
  position: sticky;
  top: 0;
  background: #22aac6;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 5px;
  margin-bottom: 3px;
  font-size: 11px;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.jsb-row.jsb-head .jsb-sub { opacity: .85; font-size: 11px; }
.jsb-row.jsb-head .jsb-big { font-weight: 400; font-size: 11px; }

/* A single line of wording sitting in the middle of a panel */
.jsb-centre {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
}
@media (max-width: 900px) {
  .jsb-centre { font-size: 20px; }
}

/* A caption above a big figure — the rating-tile shape */
.jsb-stack {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  color: #ffffff;
}
.jsb-label {
  font-size: 19px;
  font-weight: 400;
  margin-bottom: 10px;
  text-align: center;
}
.jsb-figure { display: flex; align-items: center; gap: 8px; }
.jsb-thumb {
  width: 52px;
  height: 52px;
  fill: #f5d020;
  stroke: #0d1e3a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.jsb-number { font-size: 52px; font-weight: bold; line-height: 1; }
@media (max-width: 900px) {
  .jsb-label  { font-size: 16px; }
  .jsb-thumb  { width: 40px; height: 40px; }
  .jsb-number { font-size: 40px; }
}

/* Logo panel — sits centred with room to breathe */
.jsb-logo {
  display: block;
  max-width: 62%;
  max-height: 78%;
  width: auto;
  height: auto;
  margin: auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
#jsbLogo { overflow: hidden; }

/* ══ Random critique panel ══ */
.jsb-quote {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 18px;
  color: #0d1e3a;
}
.jsb-face {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0d1e3a;
  margin-bottom: 10px;
}
.jsb-face-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1e3a;
  color: #f5d020;
  font-size: 24px;
  font-weight: bold;
}
.jsb-quote-name {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.15;
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jsb-quote-body { font-size: 16px; line-height: 1.5; font-style: italic; }
.jsb-quote-on   { font-size: 13px; color: #1a3a7a; margin-top: 10px; }
@media (max-width: 900px) {
  .jsb-quote-name { font-size: 19px; }
}

/* ══ Activity grid ══
   Navy panel with a gold border. The left column carries the icon
   and the label; the three number columns alternate shade row by
   row so the eye can track across. */

#jsbToday {
  border: 3px solid #0a1f4a;
  border-radius: 12px;
  overflow: hidden;
}

.jsb-title-big {
  font-family: 'Luckiest Guy', cursive;
  font-size: 30px;
  font-weight: 400;
  color: #ffd400;
  letter-spacing: 1px;
  text-shadow:
    -3px -3px 0 #0a1f4a,  0 -3px 0 #0a1f4a,  3px -3px 0 #0a1f4a,
    -3px  0   0 #0a1f4a,                     3px  0   0 #0a1f4a,
    -3px  3px 0 #0a1f4a,  0  3px 0 #0a1f4a,  3px  3px 0 #0a1f4a;
  padding: 12px 10px 12px;
}

.jsb-grid-stats {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  grid-template-rows: auto repeat(5, 1fr);
  margin: 0 14px 14px;
  border-radius: 6px;
  overflow: hidden;
  color: #ffffff;
  height: calc(100% - 66px);
}

.jsb-gh {
  background: #1a3f88;
  border-left: 2px solid #2a55a8;
  padding: 8px 4px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  opacity: 1;
}
.jsb-gh-blank { border-left: 0; }

.jsb-grow {
  background: #10306e;
  border-top: 2px solid #2a55a8;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: bold;
  opacity: 1;
}
.jsb-grow.jsb-alt { background: #1a3f88; }

.jsb-gnum {
  background: #10306e;
  border-top: 2px solid #2a55a8;
  border-left: 2px solid #2a55a8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
}
.jsb-gnum.jsb-alt { background: #1a3f88; }

.jsb-gicon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: #ffd400;
}
.jsb-gicon-white { fill: #ffffff; }

/* ══ Levelling up ══
   Name on the left, bar filling the middle, target on the right —
   so the row reads across instead of leaving a hole in the centre. */
/* One grid for the whole list, not one per row — that way every
   bar starts and finishes in the same place no matter how wide
   the name or the numbers are. */
.jsb-goals {
  padding: 0 22px 20px;
  color: #0d1e3a;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(60px, 1.5fr) max-content;
  align-items: center;
  align-content: space-around;
  column-gap: 16px;
  row-gap: 12px;
  height: calc(100% - 56px);
}
.jsb-goal { display: contents; }
.jsb-goal-who { min-width: 0; }
.jsb-goal-name {
  font-size: 15px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jsb-goal-sub {
  font-size: 11px;
  opacity: .8;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jsb-goal-bar {
  height: 10px;
  border-radius: 5px;
  background: rgba(13, 30, 58, .3);
  overflow: hidden;
}
.jsb-goal-fill {
  height: 100%;
  border-radius: 5px;
  background: #f5d020;
}
.jsb-goal-num {
  font-size: 19px;
  font-weight: bold;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 900px) {
  .jsb-grid-stats { height: auto; grid-template-rows: auto; }
  .jsb-title-big  { font-size: 24px; }
  .jsb-gh         { font-size: 13px; }
  .jsb-grow       { font-size: 13px; padding: 10px 8px; gap: 7px; }
  .jsb-gicon      { width: 17px; height: 17px; }
  .jsb-gnum       { font-size: 18px; padding: 10px 2px; }
  .jsb-goal-num { font-size: 15px; }
  .jsb-goals    { grid-template-columns: 1fr; row-gap: 6px; height: auto; }
  .jsb-goal-num { text-align: left; }
}
