:root {
  color-scheme: dark;
  --bg: #07101d;
  --panel: rgba(15, 28, 45, 0.78);
  --panel-2: #12243a;
  --line: rgba(166, 194, 220, 0.14);
  --text: #f5f7fa;
  --muted: #91a1b5;
  --orange: #ff9d3f;
  --green: #42d392;
  --red: #ff6b6b;
  --blue: #5fb7ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, #173b58 0, transparent 42%), var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}
.glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.12;
  pointer-events: none;
}
.glow-one {
  background: var(--orange);
  right: -180px;
  top: 10%;
}
.glow-two {
  background: var(--blue);
  left: -220px;
  bottom: -120px;
}
.shell {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  position: relative;
  z-index: 1;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font:
    800 18px "Manrope",
    "DM Sans",
    sans-serif;
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(255, 138, 45, 0.22);
}
.top-actions,
.hero-actions,
.secret-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.live-pill {
  font-size: 13px;
  color: #b7c4d2;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
}
.live-pill i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
  box-shadow: 0 0 10px var(--green);
}
button,
input {
  font: inherit;
}
.ghost-button,
.secondary-button,
.primary-button {
  border-radius: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 600;
}
.ghost-button,
.secondary-button {
  background: rgba(255, 255, 255, 0.035);
  color: #cad5e1;
}
.primary-button {
  border-color: transparent;
  background: linear-gradient(135deg, #ffad59, #ff832d);
  color: #1b1008;
  box-shadow: 0 10px 28px rgba(255, 131, 45, 0.18);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.hidden {
  display: none !important;
}
.login-card {
  max-width: 790px;
  margin: 11vh auto 0;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(18, 36, 58, 0.92),
    rgba(9, 20, 35, 0.9)
  );
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
}
.login-card h1,
.hero-row h1 {
  font:
    800 clamp(34px, 5vw, 60px)/1.05 "Manrope",
    "DM Sans",
    sans-serif;
  margin: 16px 0;
}
.login-card h1 span {
  color: #8da5bc;
}
.login-card > p,
.hero-row p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 650px;
}
.login-card form {
  margin-top: 34px;
}
.login-card label {
  display: block;
  font-size: 13px;
  margin-bottom: 9px;
  color: #bec9d4;
}
.secret-row input {
  flex: 1;
  min-width: 0;
  background: #091522;
  border: 1px solid #263a50;
  border-radius: 10px;
  color: white;
  padding: 13px 15px;
  outline: none;
}
.secret-row input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 157, 63, 0.1);
}
.form-error {
  color: var(--red) !important;
  font-size: 13px !important;
  min-height: 20px;
}
.dashboard {
  padding: 58px 0 80px;
}
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}
.hero-row h1 {
  font-size: 42px;
  margin: 10px 0;
}
.hero-row p {
  margin: 0;
}
.notice {
  padding: 14px 16px;
  border: 1px solid rgba(66, 211, 146, 0.22);
  background: rgba(66, 211, 146, 0.08);
  color: #a8e8cb;
  border-radius: 12px;
  margin-bottom: 20px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.metric-card,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(
    145deg,
    rgba(19, 36, 57, 0.82),
    rgba(10, 22, 37, 0.78)
  );
  border-radius: 16px;
}
.metric-card {
  padding: 22px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.accent-card {
  background: linear-gradient(
    145deg,
    rgba(77, 48, 26, 0.7),
    rgba(18, 31, 45, 0.85)
  );
  border-color: rgba(255, 157, 63, 0.2);
}
.metric-label,
.metric-detail {
  font-size: 12px;
  color: var(--muted);
}
.metric-card strong {
  font:
    800 31px "Manrope",
    "DM Sans",
    sans-serif;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 14px;
}
.panel {
  padding: 24px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.panel h2 {
  font:
    700 20px "Manrope",
    "DM Sans",
    sans-serif;
  margin: 7px 0 0;
}
.auto-refresh {
  font-size: 11px;
  color: var(--muted);
}
.run-card {
  background: rgba(5, 15, 27, 0.45);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 17px;
  margin-top: 10px;
}
.run-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.run-id {
  font:
    600 12px/1.4 ui-monospace,
    SFMono-Regular,
    monospace;
  color: #c9d4df;
  word-break: break-all;
}
.status {
  font-size: 11px;
  text-transform: capitalize;
  border-radius: 99px;
  padding: 5px 9px;
  background: rgba(95, 183, 255, 0.1);
  color: #8bc9ff;
  white-space: nowrap;
}
.status.finalized {
  background: rgba(66, 211, 146, 0.1);
  color: #79dfad;
}
.status.awaiting_audit {
  background: rgba(255, 157, 63, 0.12);
  color: #ffc078;
}
.progress-track {
  height: 7px;
  background: #07111e;
  border-radius: 99px;
  overflow: hidden;
  margin: 15px 0 11px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8c35, #ffc16d);
  border-radius: inherit;
}
.run-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.run-stats b {
  color: #e8edf2;
}
.run-outcome {
  margin: 12px 0;
  color: #dce6ef;
  font-size: 12px;
  font-weight: 700;
}
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}
.funnel-grid span {
  padding: 9px;
  border: 1px solid rgba(132, 155, 177, 0.13);
  border-radius: 9px;
  background: rgba(4, 13, 23, 0.35);
}
.funnel-grid b,
.funnel-grid small {
  display: block;
}
.funnel-grid b {
  color: #f3f7fa;
  font-size: 15px;
}
.funnel-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.run-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.run-details summary {
  cursor: pointer;
  color: #aebdca;
  font-size: 11px;
  font-weight: 700;
}
.identity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(4, 13, 23, 0.4);
}
.identity-row > div {
  min-width: 0;
}
.identity-row b,
.identity-row span,
.identity-row small,
.identity-row a {
  display: block;
}
.identity-row b {
  color: var(--orange);
  font-size: 10px;
  text-transform: uppercase;
}
.identity-row span,
.identity-row a {
  margin-top: 4px;
  color: #dce6ef;
  font-size: 11px;
  line-height: 1.4;
}
.identity-row small,
.review-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.qualified-row {
  border: 1px solid rgba(66, 211, 146, 0.15);
}
.review-row {
  padding: 9px 0;
  border-bottom: 1px solid rgba(132, 155, 177, 0.1);
}
.review-row:last-child {
  border-bottom: 0;
}
.review-row a,
.review-row > span {
  display: block;
  color: #dce6ef;
  font-size: 11px;
  line-height: 1.4;
}
.student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.student:last-child {
  border-bottom: 0;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #1c3a56;
  color: #8dccff;
  font-weight: 700;
}
.student-info {
  flex: 1;
  min-width: 0;
}
.student-info strong,
.student-info small {
  display: block;
}
.student-info small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.ready-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
}
.empty-state {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.system-panel {
  margin-top: 14px;
}
.flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-step b {
  color: var(--orange);
  font:
    700 12px "Manrope",
    "DM Sans",
    sans-serif;
}
.flow-step strong,
.flow-step small {
  display: block;
}
.flow-step strong {
  font-size: 13px;
}
.flow-step small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.flow > i {
  font-style: normal;
  color: #43566b;
}
@media (max-width: 900px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .flow > i {
    display: none;
  }
}
@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }
  .topbar {
    height: 70px;
  }
  .login-card {
    padding: 28px 20px;
    margin-top: 6vh;
  }
  .secret-row,
  .hero-row {
    align-items: stretch;
    flex-direction: column;
  }
  .secret-row button {
    width: 100%;
  }
  .dashboard {
    padding-top: 36px;
  }
  .hero-row h1 {
    font-size: 34px;
  }
  .hero-actions button {
    flex: 1;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .funnel-grid,
  .identity-row {
    grid-template-columns: 1fr;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .live-pill {
    display: none;
  }
}

/* Buy Box Bandit light identity */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f7f5;
  --line: #e5e1da;
  --text: #151515;
  --muted: #6d6a65;
  --orange: #d79a00;
  --green: #18875b;
  --red: #c63c3c;
  --blue: #346da6;
}
body { background: #fff; color: var(--text); }
.glow { opacity: 0.035; }
.topbar { background: rgba(255, 255, 255, 0.94); }
.brand > span { display: grid; gap: 1px; }
.brand > span b { font-size: 17px; }
.brand > span small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-logo { object-fit: contain; background: #fff; box-shadow: none; }
.live-pill { color: #4c4a46; background: #faf9f7; }
.ghost-button, .secondary-button { background: #faf9f7; color: #33312e; }
.primary-button { background: linear-gradient(135deg, #f2bc2c, #dfa100); color: #17130a; box-shadow: 0 10px 25px rgba(185, 128, 0, 0.15); }
.login-card { max-width: 760px; margin-top: 6vh; background: #fff; box-shadow: 0 28px 80px rgba(39, 31, 16, 0.1); text-align: center; }
.login-card form, .login-card .login-tabs { text-align: left; }
.login-logo { width: 180px; height: 180px; object-fit: contain; margin: -20px auto 18px; display: block; }
.login-card h1 span { color: #706b63; font-size: 0.62em; }
.login-card > p { margin-left: auto; margin-right: auto; }
.login-tabs { background: #f5f3ef; }
.login-tab.active { background: #fff; color: var(--text); box-shadow: 0 4px 15px rgba(45, 37, 24, 0.08); }
.secret-row input, .field-grid input, .preferences-panel input, .preferences-panel textarea { background: #fff; border-color: #d9d4cc; color: #171717; }
.metric-card, .panel { background: #fff; box-shadow: 0 10px 35px rgba(39, 31, 16, 0.045); }
.accent-card { background: linear-gradient(145deg, #fff8e5, #fff); border-color: #ead699; }
.run-card { background: #faf9f7; }
.run-id { color: #373430; }
.progress-track { background: #e9e5de; }
.run-stats b, .run-outcome, .funnel-grid b { color: #292724; }
.funnel-grid span, .identity-row { background: #fff; border-color: #e8e3db; }
.run-details summary { color: #55514b; }
.identity-row span, .identity-row a, .review-row a, .review-row > span { color: #292724; }
.status { color: #346da6; }
.status.finalized { color: #18875b; }
.status.awaiting_audit { color: #a86d00; }
.avatar { background: #fff3d3; color: #946200; }
.flow > i { color: #aaa39a; }
.notice { background: #eef9f3; color: #176843; }
