:root {
  --bg: #0a0d14;
  --panel: #131927;
  --panel-soft: #182033;
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #edf2ff;
  --muted: #94a0c0;
  --cyan: #44e2ff;
  --cyan-strong: #18c8ff;
  --pink: #ff4cd7;
  --green: #31e38f;
  --amber: #ffc75e;
  --red: #ff6c87;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Aptos", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(68, 226, 255, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 76, 215, 0.06), transparent 20%),
    linear-gradient(180deg, #090b11 0%, #0d111b 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.page-shell {
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(9, 12, 18, 0.92);
  border-right: 1px solid var(--stroke);
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 22px rgba(123, 92, 255, 0.25));
}

.brand-sub {
  color: #5a6586;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: conic-gradient(from 30deg, var(--cyan), #7b5cff, var(--pink), var(--cyan));
  box-shadow: 0 0 18px rgba(68, 226, 255, 0.45);
}

.brand strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-label {
  color: #5a6586;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin: 24px 8px 12px;
}

.nav-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  color: #b6c2e1;
  margin-bottom: 6px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(68, 226, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(68, 226, 255, 0.16);
  color: white;
}

.content {
  padding: 24px 28px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pill,
.button,
.button-secondary {
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  border: 0;
}

.button {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
  color: #07111d;
  box-shadow: 0 12px 28px rgba(24, 200, 255, 0.28);
  cursor: pointer;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid var(--stroke);
  cursor: pointer;
}

.button-danger {
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 92, 92, 0.12);
  color: #ff8a8a;
  border: 1px solid rgba(255, 92, 92, 0.4);
  cursor: pointer;
}

.button-danger:hover { background: rgba(255, 92, 92, 0.2); }
.button-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.pill {
  background: rgba(68, 226, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(68, 226, 255, 0.2);
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(68, 226, 255, 0.08);
  border: 1px solid rgba(68, 226, 255, 0.25);
  color: var(--cyan);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.help-link:hover {
  background: rgba(68, 226, 255, 0.18);
  border-color: var(--cyan);
}

.grid {
  display: grid;
  gap: 18px;
}

.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: linear-gradient(180deg, rgba(19, 25, 39, 0.96), rgba(15, 20, 32, 0.98));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card.callout {
  background: linear-gradient(135deg, rgba(68, 226, 255, 0.12), rgba(255, 76, 215, 0.08));
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2,
.section-head h3 { margin: 0; }

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-value.small { font-size: 28px; }

.delta { margin-top: 10px; color: var(--green); font-weight: 700; font-size: 13px; }
.delta.down { color: var(--red); }

.profile {
  display: flex;
  gap: 18px;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.36);
  background-size: cover;
  background-position: center;
}

.muted { color: var(--muted); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 700;
}

.badge.cyan {
  background: rgba(68, 226, 255, 0.14);
  color: var(--cyan);
}

.badge.green {
  background: rgba(49, 227, 143, 0.14);
  color: var(--green);
}

.badge.amber {
  background: rgba(255, 199, 94, 0.14);
  color: var(--amber);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-chip {
  min-width: 132px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px;
}

.stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-chip strong {
  font-size: 22px;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.mini-kpi {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--stroke);
}

.mini-kpi:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }
tr.row-active td {
  background: rgba(68, 226, 255, 0.12);
}
tr.row-active td:first-child {
  border-left: 3px solid #44e2ff;
}

.tag {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(68, 226, 255, 0.12);
  color: var(--cyan);
}

.tag.warn {
  background: rgba(255, 199, 94, 0.12);
  color: var(--amber);
}

.tag.red {
  background: rgba(255, 108, 135, 0.12);
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.status-explanation {
  background: var(--panel-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #c4cfea;
}
.status-explanation .status-title {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px;
}
.status-explanation .status-detail {
  color: #94a0c0;
}
.status-explanation .status-warn {
  color: #f5a623;
}
.status-explanation .status-ok {
  color: var(--accent);
}
.tag[data-tooltip] {
  cursor: pointer;
  position: relative;
}
.tag[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2236;
  color: #c4cfea;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: pre-line;
  min-width: 220px;
  max-width: 320px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  pointer-events: none;
  line-height: 1.5;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a0c0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input-group {
  display: grid;
  gap: 8px;
}

.input-group label {
  color: var(--muted);
  font-size: 12px;
  padding-left: 4px;
}

.field,
.input,
.textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: white;
}

.field {
  padding: 14px 16px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.field strong {
  display: block;
}

.input,
.textarea {
  padding: 14px 16px;
  font-size: 14px;
}

.textarea {
  min-height: 112px;
  resize: vertical;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.login-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-box-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 440px;
}

.helper {
  color: var(--muted);
  font-size: 13px;
}

.message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
}

.message.error {
  border-color: rgba(255, 108, 135, 0.24);
  color: #ffd3db;
  background: rgba(255, 108, 135, 0.08);
}

.message.success {
  border-color: rgba(49, 227, 143, 0.22);
  color: #d5ffe8;
  background: rgba(49, 227, 143, 0.08);
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.calc-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calc-block {
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  padding: 16px;
}

.calc-block strong {
  display: block;
  margin-bottom: 8px;
}

.calc-block p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.hidden { display: none !important; }

.footer-note {
  margin-top: 24px;
  color: #66718f;
  font-size: 12px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 14, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal {
  background: linear-gradient(180deg, #131927, #0f1420);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 0;
}

.modal-body {
  padding: 20px 24px 28px;
}

.modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
  color: var(--muted);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.modal-close:hover { background: rgba(255,255,255,0.12); color: white; }

/* ── CRM Association Panel ── */
.crm-panel {}

.crm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.crm-header h2 { margin: 0; }
.crm-header p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }

.crm-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 420px;
}

.crm-list {
  border-right: 1px solid var(--stroke);
  padding-right: 18px;
  overflow-y: auto;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-empty {
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

.crm-host-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.crm-host-card:hover {
  background: rgba(68, 226, 255, 0.06);
  border-color: rgba(68, 226, 255, 0.14);
}

.crm-host-card.active {
  background: rgba(68, 226, 255, 0.18);
  border-color: #44e2ff;
  box-shadow: 0 0 0 1px rgba(68, 226, 255, 0.3), inset 0 0 12px rgba(68, 226, 255, 0.06);
}
.crm-host-card.active .crm-avatar {
  background: #44e2ff;
  color: #0b1120;
}

.crm-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: conic-gradient(from 30deg, var(--cyan), #7b5cff, var(--pink), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #07111d;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.crm-host-info { flex: 1; min-width: 0; }
.crm-host-info strong { display: block; font-size: 13px; }
.crm-host-info .muted { font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.crm-host-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.crm-form {
  padding-left: 24px;
}

.crm-form-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.crm-section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--muted);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--stroke);
}

.crm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.crm-full { grid-column: 1 / -1; }

.crm-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .crm-layout { grid-template-columns: 1fr; }
  .crm-list { border-right: none; border-bottom: 1px solid var(--stroke); padding-right: 0; padding-bottom: 18px; max-height: 280px; }
  .crm-form { padding-left: 0; margin-top: 18px; }
  .crm-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .layout,
  .login-shell,
  .split,
  .cols-4,
  .cols-3,
  .cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .login-shell { display: flex; flex-direction: column; }
  .login-hero { order: 2; padding: 16px 18px 24px; }
  .login-box-wrap { order: 1; padding: 20px 16px 8px; }
  .login-hero .brand { align-items: center; margin-bottom: 0; }
  .login-hero > div > div { margin-top: 0 !important; }
  .login-hero h1 { font-size: 24px !important; margin: 10px 0 4px !important; text-align: center; }
  .login-hero-copy p { display: none; }
  .login-hero-cards { display: none !important; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 40;
    display: none;
  }
  body.sidebar-open .sidebar-backdrop { display: block; }

  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    gap: 4px;
  }
  .menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .topbar { gap: 10px; flex-wrap: wrap; align-items: center; }
  .topbar .actions { margin-left: auto; gap: 6px; }
  .topbar h1 { font-size: 22px; }
  .content { padding: 16px; }
}

.menu-toggle { display: none; }

.stat-chip.highlight {
  background: linear-gradient(135deg, rgba(255, 76, 215, 0.18), rgba(68, 226, 255, 0.18));
  border-color: rgba(255, 76, 215, 0.35);
  box-shadow: 0 0 0 1px rgba(68, 226, 255, 0.25) inset;
}
.stat-chip.highlight strong {
  font-size: 30px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-chip.highlight span {
  color: var(--text);
  font-weight: 700;
}

.progress.slim {
  height: 6px;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}
.progress-row .progress-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.progress-row .progress-row-head strong {
  color: var(--text);
  font-weight: 700;
}

.mission-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 10px;
}

.mission-description {
  white-space: pre-wrap;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.mission-complete-tag {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  color: #0a0d14;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mini-missions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.mini-missions .mini-mission {
  display: grid;
  gap: 4px;
}
.mini-missions .mini-mission .mini-mission-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.mini-missions .mini-mission .mini-mission-head strong {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(68, 226, 255, 0.14);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  cursor: help;
  margin-left: 6px;
  position: relative;
}
.info-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2236;
  color: #c4cfea;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: pre-line;
  min-width: 260px;
  max-width: 360px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  pointer-events: none;
  line-height: 1.5;
  text-align: left;
}

.manager-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  border-radius: 16px;
}
.manager-card .manager-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #44e2ff, #18c8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0a0d14;
}

.earnings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.earnings-grid .earning-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
}
.earnings-grid .earning-item .earning-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.earnings-grid .earning-item .earning-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.earnings-grid .earning-item.total {
  background: linear-gradient(135deg, rgba(49, 227, 143, 0.16), rgba(68, 226, 255, 0.12));
  border-color: rgba(49, 227, 143, 0.35);
}
.earnings-grid .earning-item.total .earning-value {
  color: var(--green);
}

.position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #0a0d14;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 6px;
}
.hero-name-row h2 {
  margin: 0;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.hero-pill-position {
  background: linear-gradient(135deg, rgba(68,226,255,0.22), rgba(170,68,255,0.22));
  color: #edf2ff;
  border: 1px solid rgba(68,226,255,0.4);
}
.hero-pill-points {
  background: linear-gradient(135deg, #ffc75e, #ff9e4a);
  color: #1a0f00;
  box-shadow: 0 6px 18px rgba(255,199,94,0.22);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 12px;
}
.progress-head strong { color: var(--text); font-weight: 700; }
.progress-head .muted { font-size: 12px; }

/* Version badge */
.version-badge {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px 8px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 9999;
  letter-spacing: 0.4px;
  font-family: ui-monospace, monospace;
}
.version-badge.v2 {
  color: rgba(125,211,252,0.8);
  border-color: rgba(125,211,252,0.3);
  background: rgba(14,165,233,0.12);
}
