/* ── Copy Trade widget ─────────────────────────────────────────────────────── */

.copytrade-card {
  background: linear-gradient(145deg, rgba(10,14,26,.96), rgba(6,10,20,.98));
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.copytrade-card.enrolled {
  border-color: rgba(99,102,241,.45);
}

.ct-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.ct-title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(165,180,252,.9);
}

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: .68rem;
  font-weight: 700;
  color: rgba(165,180,252,.9);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.ct-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Re-consent prompt — shown to followers still on an older agreement. Their
   account keeps working exactly as they agreed until they accept the new one. */
.ct-reconsent {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.08);
  font-size: 0.68rem;
  line-height: 1.45;
  color: rgba(253, 230, 138, 0.9);
}
.ct-reconsent b { color: #fcd34d; }
.ct-btn-reconsent {
  align-self: flex-start;
  margin-top: 2px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.ct-btn-reconsent:hover {
  background: rgba(251, 191, 36, 0.26);
  border-color: rgba(251, 191, 36, 0.7);
}

.ct-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.ct-hero-text .ct-headline {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(220,230,255,.9);
  line-height: 1.3;
}

.ct-hero-text .ct-subline {
  font-size: .71rem;
  color: rgba(165,180,252,.55);
  margin-top: 2px;
}

/* ── Tier table ───────────────────────────────────────────────────────────── */

.ct-tier-table {
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: .7rem;
  color: rgba(165,180,252,.65);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ct-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ct-tier-row .ct-tier-label {
  font-weight: 700;
  color: rgba(165,180,252,.8);
}

.ct-tier-row .ct-tier-arrow {
  color: rgba(99,102,241,.6);
  font-size: .65rem;
}

/* ── Fee note ─────────────────────────────────────────────────────────────── */

.ct-fee-note {
  font-size: .69rem;
  color: rgba(165,180,252,.5);
  text-align: center;
  padding: 4px 0;
  border-top: 1px solid rgba(226,182,104,.13);
}

/* ── Enroll button ────────────────────────────────────────────────────────── */

.ct-enroll-btn {
  width: 100%;
  padding: 9px 0;
  background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(79,70,229,.95));
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
  letter-spacing: .02em;
}

.ct-enroll-btn:hover { opacity: .88; }
.ct-enroll-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Progress (enrolled state) ────────────────────────────────────────────── */

.ct-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.ct-stat {
  background: rgba(0,0,0,.2);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.ct-stat-val {
  font-size: .9rem;
  font-weight: 800;
  color: rgba(220,230,255,.9);
  display: block;
}

.ct-stat-val.positive { color: #34d399; }
.ct-stat-val.fee { color: rgba(251,191,36,.85); }

.ct-stat-label {
  font-size: .61rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(165,180,252,.45);
  margin-top: 1px;
  display: block;
}

.ct-progress-wrap { display: flex; flex-direction: column; gap: 4px; }

.ct-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: .65rem;
  color: rgba(165,180,252,.5);
}

.ct-bar-bg {
  background: rgba(99,102,241,.12);
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}

.ct-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(99,102,241,.8), rgba(165,180,252,.9));
  transition: width .6s ease;
}

.ct-bar-fill.complete {
  background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.ct-disenroll-btn {
  background: none;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 7px;
  color: rgba(239,68,68,.6);
  font-size: .68rem;
  font-weight: 600;
  padding: 5px 0;
  cursor: pointer;
  width: 100%;
  transition: border-color .15s, color .15s;
}

.ct-disenroll-btn:hover {
  border-color: rgba(239,68,68,.6);
  color: rgba(239,68,68,.9);
}

/* ── Manager picker ───────────────────────────────────────────────────────── */

.ct-manager-picker {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ct-mgr-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.ct-mgr-option:hover {
  border-color: rgba(99,102,241,.4);
  background: rgba(99,102,241,.08);
}

.ct-mgr-option.selected {
  border-color: rgba(99,102,241,.6);
  background: rgba(99,102,241,.12);
}

.ct-mgr-check {
  font-size: .75rem;
  color: rgba(99,102,241,.9);
  font-weight: 800;
  min-width: 14px;
  text-align: right;
}

/* ── Legal terms modal ────────────────────────────────────────────────────── */

#ct-legal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}

.ct-legal-card {
  background: linear-gradient(160deg, rgba(14,18,34,.99), rgba(8,12,22,.99));
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ct-legal-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(226,182,104,.15);
  font-size: .82rem;
  font-weight: 800;
  color: rgba(165,180,252,.9);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ct-legal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  font-size: .73rem;
  color: rgba(175,195,240,.7);
  line-height: 1.65;
}

.ct-legal-body h4 {
  font-size: .76rem;
  color: rgba(220,230,255,.85);
  margin: 10px 0 4px;
}

.ct-legal-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(226,182,104,.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.ct-legal-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .71rem;
  color: rgba(165,180,252,.7);
  cursor: pointer;
}

.ct-legal-check-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: rgba(99,102,241,.9);
}

.ct-legal-submit-btn {
  width: 100%;
  padding: 10px 0;
  background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(79,70,229,.95));
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s;
}

.ct-legal-submit-btn:disabled { opacity: .4; cursor: not-allowed; }
.ct-legal-submit-btn:not(:disabled):hover { opacity: .88; }

.ct-legal-cancel {
  text-align: center;
  font-size: .68rem;
  color: rgba(165,180,252,.4);
  cursor: pointer;
}

.ct-legal-cancel:hover { color: rgba(165,180,252,.7); }

/* ── Tier-up overlay ──────────────────────────────────────────────────────── */

#ct-tierup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 10200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.ct-tierup-card {
  background: linear-gradient(160deg, rgba(14,18,34,.99), rgba(8,12,22,.99));
  border: 1px solid rgba(99,102,241,.5);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ct-tierup-emoji { font-size: 2.8rem; }

.ct-tierup-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: rgba(165,180,252,.95);
}

.ct-tierup-body {
  font-size: .76rem;
  color: rgba(165,180,252,.65);
  line-height: 1.6;
}

.ct-tierup-close {
  padding: 10px 28px;
  background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(79,70,229,.95));
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
}

/* ── Admin panel visibility buttons ──────────────────────────────────────── */

.ct-vis-btn {
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: 1px solid rgba(165,180,252,.18);
  border-radius: 7px;
  color: rgba(165,180,252,.5);
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.ct-vis-btn:hover {
  border-color: rgba(165,180,252,.35);
  color: rgba(165,180,252,.8);
}

.ct-vis-btn.ct-vis-active {
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(79,70,229,.35));
  border-color: rgba(99,102,241,.55);
  color: rgba(165,180,252,.95);
}
