/* Class ballot — the staff side (year head board, portal manager).
   Uses the site's theme tokens, so light and dark both work. */

.bb-gate{ text-align:center; padding:70px 20px; font-size:13px; color:var(--text-secondary); }

.bb-hero{
  position:relative; overflow:hidden; border-radius:var(--radius-lg); padding:18px 18px 16px; margin-bottom:12px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(245,184,0,.22), transparent 60%),
    var(--surface);
  border:1px solid var(--border);
}
.bb-hero-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.bb-pill{
  display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px;
  font-size:11px; font-weight:800; letter-spacing:.8px; text-transform:uppercase;
  background:var(--success-tint); color:var(--success);
}
.bb-pill .dot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.bb-pill.off{ background:var(--danger-tint); color:var(--danger); }
.bb-live{ font-size:10px; font-weight:800; letter-spacing:1.4px; color:var(--text-muted); display:inline-flex; align-items:center; gap:6px; }
.bb-live::before{ content:""; width:6px; height:6px; border-radius:50%; background:var(--danger); animation:bb-blink 1.6s infinite; }
@keyframes bb-blink{ 50%{ opacity:.2; } }
.bb-scope{ font-size:22px; font-weight:800; letter-spacing:-.4px; margin:12px 0 12px; }
.bb-progress{ height:8px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.bb-progress span{ display:block; height:100%; width:0; border-radius:inherit;
  background:linear-gradient(90deg, #F5B800, #FF00FF); transition:width .5s ease; }
.bb-stats{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:14px; }
.bb-stats > div{ background:var(--surface-2); border-radius:var(--radius-sm); padding:10px 8px; text-align:center; }
.bb-stats b{ display:block; font-size:20px; font-weight:800; font-variant-numeric:tabular-nums; }
.bb-stats span{ display:block; font-size:10.5px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.4px; margin-top:2px; }

.bb-note{ font-size:12px; color:var(--text-secondary); line-height:1.55; margin:0 2px 14px; }
.bb-msg{ font-size:12.5px; color:var(--danger); margin:0 2px 10px; }
.bb-msg:empty{ display:none; }
.bb-msg.ok{ color:var(--success); }
.bb-empty{ text-align:center; padding:36px 14px; font-size:13px; color:var(--text-secondary);
  background:var(--surface); border:1px dashed var(--border); border-radius:var(--radius-md); }

.bb-classes{ display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.bb-class{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); overflow:hidden; }
.bb-class.flash{ animation:bb-flash 1.8s ease; }
@keyframes bb-flash{ 0%{ box-shadow:0 0 0 2px #F5B800; } 100%{ box-shadow:0 0 0 0 transparent; } }
.bb-class-h{
  width:100%; display:flex; align-items:center; gap:12px; padding:13px 14px 10px; background:none; border:0;
  font:inherit; color:inherit; text-align:left; cursor:pointer;
}
.bb-class-n{ flex:1; min-width:0; display:flex; flex-direction:column; }
.bb-class-n b{ font-size:14.5px; font-weight:800; }
.bb-class-n small{ font-size:11.5px; color:var(--text-secondary); margin-top:2px; }
.bb-count{ font-size:20px; font-weight:800; font-variant-numeric:tabular-nums; min-width:34px; text-align:right; }
.bb-chev{ font-size:20px; color:var(--text-muted); transition:transform .15s ease; }
.bb-class-h[aria-expanded="true"] .bb-chev{ transform:rotate(90deg); }
.bb-meter{ height:5px; margin:0 14px 12px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.bb-meter span{ display:block; height:100%; border-radius:inherit; background:#F5B800; transition:width .5s ease; }
.bb-list{ list-style:none; border-top:1px solid var(--border); counter-reset:bb; }
.bb-list li{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 14px; border-bottom:1px solid var(--border); font-size:13px; counter-increment:bb; }
.bb-list li:last-child{ border-bottom:none; }
.bb-list li::before{ content:counter(bb); width:22px; font-size:11px; color:var(--text-muted); flex-shrink:0; }
.bb-list li > span{ flex:1; min-width:0; display:flex; flex-direction:column; }
.bb-list li small{ font-size:11px; color:var(--text-secondary); }
.bb-list li em{ font-style:normal; font-size:11px; color:var(--text-muted); flex-shrink:0; }
.bb-list li.new{ background:var(--warning-tint); }
.bb-list li.none{ color:var(--text-muted); justify-content:center; }
.bb-list li.none::before{ content:none; }

.bb-wait{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:20px; }
.bb-wait-h{ font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--text-secondary); margin-bottom:10px; }
.bb-wait-h span{ color:var(--text-primary); }
.bb-chip{ display:inline-block; margin:0 6px 6px 0; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:600;
  background:var(--surface-2); color:var(--text-primary); }

/* portal manager controls */
.bb-switch{ display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:14px; margin-bottom:10px; }
.bb-switch .t{ flex:1; min-width:0; }
.bb-switch .t b{ display:block; font-size:14.5px; font-weight:800; }
.bb-switch .t small{ display:block; font-size:12px; color:var(--text-secondary); margin-top:2px; line-height:1.45; }
.bb-toggle{ position:relative; width:54px; height:30px; border-radius:999px; border:0; cursor:pointer; flex-shrink:0;
  background:var(--border); transition:background .15s; }
.bb-toggle::after{ content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .15s; }
.bb-toggle.on{ background:var(--success); }
.bb-toggle.on::after{ left:27px; }
.bb-toggle:disabled{ opacity:.5; cursor:default; }
.bb-gapsel{ display:flex; align-items:center; gap:8px; }
.bb-gapsel button{ width:34px; height:34px; border-radius:50%; border:1px solid var(--border); background:var(--surface-2);
  color:var(--text-primary); font:inherit; font-size:18px; font-weight:700; cursor:pointer; }
.bb-gapsel output{ min-width:26px; text-align:center; font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; }
.bb-yg{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:10px; }
.bb-yg-h{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
.bb-yg-h b{ font-size:15px; font-weight:800; }
.bb-yg-h small{ font-size:12px; color:var(--text-secondary); }
.bb-bars{ display:flex; flex-direction:column; gap:6px; }
.bb-bar{ display:grid; grid-template-columns:minmax(0, 7.5em) 1fr 2.5em; align-items:center; gap:8px; font-size:12px; }
.bb-bar .n{ font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bb-bar .m{ height:8px; border-radius:999px; background:var(--surface-2); overflow:hidden; }
.bb-bar .m span{ display:block; height:100%; background:#F5B800; border-radius:inherit; }
.bb-bar .c{ text-align:right; font-weight:800; font-variant-numeric:tabular-nums; }
.bb-yg .bb-warn{ font-size:12px; color:var(--warning); margin-top:8px; }
.bb-act{ margin-top:12px; width:100%; padding:11px; border-radius:var(--radius-sm); border:1.5px solid var(--border);
  background:var(--surface-2); color:var(--text-primary); font:inherit; font-size:13px; font-weight:800; cursor:pointer; }
.bb-act:disabled{ opacity:.5; cursor:default; }
