/* -- REUSABLE COMPONENT STYLES ---------------------- */

/* Score Ring */
.score-ring {
  width: 80px; height: 80px; position: relative;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle {
  fill: none; stroke-width: 6; stroke-linecap: round;
}
.score-ring .bg { stroke: var(--border); }
.score-ring .fg { transition: stroke-dashoffset 0.6s ease; }
.score-ring .label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
}

/* Stat Row */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.sr-label { font-size: 0.78rem; color: var(--text-tertiary); }
.sr-value { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; }

/* Empty State */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 16px; color: var(--text-ghost); }
.empty-title { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 8px; color: var(--text-primary); }
.empty-sub { font-size: 0.85rem; color: var(--text-tertiary); margin-bottom: 20px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* Progress Bar */
.progress-bar {
  width: 100%; height: 6px; background: var(--surface-3);
  border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.4s ease;
}
.progress-green .progress-fill { background: var(--profit); }
.progress-red .progress-fill { background: var(--loss); }
.progress-indigo .progress-fill { background: var(--indigo); }
.progress-gold .progress-fill { background: var(--caution); }

/* Tabs */
.tabs {
  display: flex; gap: 2px; background: var(--surface-3);
  border-radius: var(--r-sm); padding: 3px;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px; border-radius: 6px; border: none;
  background: transparent; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; color: var(--text-tertiary); transition: all var(--fast);
  font-family: var(--font-sans);
}
.tab-btn.active {
  background: var(--surface); color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Chat bubbles (AI Coach) */
.chat-wrap {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 500px; overflow-y: auto;
  padding: 16px;
}
.chat-msg {
  max-width: 80%; padding: 12px 16px;
  border-radius: 14px; font-size: 0.85rem;
  line-height: 1.5;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--indigo); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.ai {
  align-self: flex-start;
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-input-wrap {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--surface-2);
  font-family: var(--font-sans); font-size: 0.85rem;
  outline: none; color: var(--text-primary);
}
.chat-input:focus { border-color: var(--indigo); background: var(--surface); }

/* Checklist */
.checklist { list-style: none; }
.checklist li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-secondary);
}
.checklist li:last-child { border-bottom: none; }
.checklist input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--indigo);
}

/* Alert/Banner */
.alert {
  padding: 14px 18px; border-radius: var(--r-sm);
  font-size: 0.82rem; display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.alert-green { background: var(--profit-bg); color: var(--profit); border: 1px solid var(--profit-border); }
.alert-red { background: var(--loss-bg); color: var(--loss); border: 1px solid var(--loss-border); }
.alert-gold { background: var(--caution-bg); color: var(--caution); border: 1px solid var(--caution-border); }
.alert-indigo { background: var(--indigo-light); color: var(--indigo); border: 1px solid var(--indigo-ring); }
/* ── PODS ───────────────────────────────────── */
.pods-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;text-align:center}
.pods-empty-icon{width:56px;height:56px;border-radius:16px;background:rgba(124,111,224,.12);border:1px solid rgba(124,111,224,.2);display:flex;align-items:center;justify-content:center;margin-bottom:20px}
.pods-empty-title{font-size:20px;font-weight:500;margin-bottom:8px;color:rgba(255,255,255,.85)}
.pods-empty-sub{font-size:14px;color:rgba(255,255,255,.4);line-height:1.7;max-width:420px;margin-bottom:28px}
.pods-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

.pod-card{background:#13131F;border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:22px;margin-bottom:12px}
.pod-card-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
.pod-name{font-size:16px;font-weight:500;color:rgba(255,255,255,.88);margin-bottom:4px}
.pod-meta{font-size:12px;color:rgba(255,255,255,.3)}
.pod-invite-code{padding:4px 10px;border-radius:6px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);font-size:11px;font-family:monospace;color:rgba(255,255,255,.4);cursor:pointer;transition:all .15s}
.pod-invite-code:hover{background:rgba(255,255,255,.09);color:rgba(255,255,255,.7)}

.pod-members{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:18px}
.pod-member{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:12px 8px;text-align:center;position:relative}
.pod-member.you{border-color:rgba(124,111,224,.3);background:rgba(124,111,224,.06)}
.pm-avatar{width:36px;height:36px;border-radius:50%;background:#7C6FE0;color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;margin:0 auto 8px}
.pm-name{font-size:11px;color:rgba(255,255,255,.6);margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-score{font-size:18px;font-weight:500;font-family:monospace;line-height:1}
.pm-score-label{font-size:9px;color:rgba(255,255,255,.25);text-transform:uppercase;letter-spacing:.06em;margin-top:2px}
.pm-you-badge{position:absolute;top:-6px;left:50%;transform:translateX(-50%);background:#7C6FE0;color:#fff;font-size:8px;font-weight:700;padding:1px 6px;border-radius:999px;white-space:nowrap}
.pm-empty{border-style:dashed;opacity:.5;cursor:pointer}
.pm-empty:hover{opacity:.8;border-color:rgba(255,255,255,.2)}
.pm-empty .pm-avatar{background:rgba(255,255,255,.06);color:rgba(255,255,255,.3)}

.pod-scores-history{border-top:1px solid rgba(255,255,255,.06);padding-top:16px}
.psh-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:rgba(255,255,255,.25);margin-bottom:12px}
.psh-row{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.psh-week{font-size:11px;color:rgba(255,255,255,.3);width:60px;flex-shrink:0}
.psh-bars{display:flex;gap:4px;flex:1}
.psh-bar-wrap{flex:1;position:relative}
.psh-bar-track{height:20px;background:rgba(255,255,255,.04);border-radius:4px;overflow:hidden}
.psh-bar-fill{height:20px;border-radius:4px;transition:width .3s}
.psh-bar-name{position:absolute;bottom:-14px;left:0;right:0;font-size:8px;color:rgba(255,255,255,.25);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.pod-digest-strip{background:rgba(124,111,224,.08);border:1px solid rgba(124,111,224,.15);border-radius:10px;padding:12px 16px;display:flex;align-items:center;gap:12px;margin-bottom:12px;font-size:12px;color:rgba(255,255,255,.4)}
.pds-icon{width:28px;height:28px;border-radius:7px;background:rgba(124,111,224,.15);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#7C6FE0}

/* Pod Modal */
.pod-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);z-index:299;display:flex;align-items:center;justify-content:center}
.pod-modal{background:#13131F;border:1px solid rgba(255,255,255,.1);border-radius:16px;padding:28px;width:min(480px,calc(100vw - 32px));box-shadow:0 24px 64px rgba(0,0,0,.6)}
.pod-modal-title{font-size:17px;font-weight:500;margin-bottom:6px}
.pod-modal-sub{font-size:13px;color:rgba(255,255,255,.35);margin-bottom:24px;line-height:1.6}
.pod-modal-field{margin-bottom:16px}
.pod-modal-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.3);margin-bottom:7px;display:block}
.pod-modal-input{width:100%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:11px 14px;font-size:13px;color:rgba(255,255,255,.85);font-family:inherit;outline:none;transition:border-color .15s;box-sizing:border-box}
.pod-modal-input:focus{border-color:#7C6FE0}
.pod-modal-input::placeholder{color:rgba(255,255,255,.25)}
.pod-modal-actions{display:flex;gap:10px;margin-top:20px}
.pod-modal-cancel{flex:1;padding:11px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:8px;color:rgba(255,255,255,.5);font-family:inherit;font-size:13px;cursor:pointer}
.pod-modal-confirm{flex:2;padding:11px;background:#7C6FE0;border:none;border-radius:8px;color:#fff;font-family:inherit;font-size:13px;font-weight:500;cursor:pointer}
.pod-modal-confirm:hover{background:#6B5FD0}

/* ── Trading Plan Wizard ──────────────────────── */
.wiz-card{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:28px;margin-bottom:14px}
.wiz-eyebrow{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.25);margin-bottom:8px}
.wiz-title{font-size:20px;font-weight:500;letter-spacing:-.02em;margin-bottom:6px;color:rgba(255,255,255,.9)}
.wiz-sub{font-size:13px;color:rgba(255,255,255,.35);line-height:1.6;margin-bottom:24px}
.wiz-field{margin-bottom:22px}
.wiz-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.35);margin-bottom:10px}
.wiz-input{width:100%;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:9px;padding:12px 16px;font-size:14px;color:rgba(255,255,255,.85);font-family:inherit;outline:none;transition:border-color .15s;box-sizing:border-box}
.wiz-input:focus{border-color:#7C6FE0;background:rgba(124,111,224,.04)}
.wiz-input::placeholder{color:rgba(255,255,255,.2)}

.tag-grid{display:flex;flex-wrap:wrap;gap:8px}
.tag-pill{padding:8px 14px;border-radius:8px;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.5);user-select:none}
.tag-pill:hover{border-color:rgba(124,111,224,.4);color:rgba(255,255,255,.7)}
.tag-pill.selected{background:rgba(124,111,224,.15);border-color:rgba(124,111,224,.4);color:#C4B5FD}
.tag-pill.green.selected{background:rgba(74,222,128,.12);border-color:rgba(74,222,128,.3);color:#4ADE80}

.wiz-slider{width:100%;height:6px;-webkit-appearance:none;appearance:none;background:rgba(255,255,255,.08);border-radius:3px;outline:none;cursor:pointer}
.wiz-slider::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#7C6FE0;cursor:pointer;box-shadow:0 0 10px rgba(124,111,224,.4)}
.wiz-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#7C6FE0;cursor:pointer;border:none}

.rule-item{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}
.rule-num{width:24px;height:24px;border-radius:6px;background:rgba(124,111,224,.12);color:#7C6FE0;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:8px}
.rule-input{flex:1;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 14px;font-size:13px;color:rgba(255,255,255,.8);font-family:inherit;outline:none;resize:vertical;min-height:36px;transition:border-color .15s}
.rule-input:focus{border-color:#7C6FE0}
.rule-input::placeholder{color:rgba(255,255,255,.2)}
.rule-del{width:24px;height:24px;border-radius:6px;background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.2);color:#F87171;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;margin-top:8px;transition:all .15s}
.rule-del:hover{background:rgba(248,113,113,.2)}

.add-rule-btn{display:flex;align-items:center;gap:8px;padding:10px 16px;background:rgba(124,111,224,.08);border:1px dashed rgba(124,111,224,.25);border-radius:8px;color:#7C6FE0;font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;margin-top:12px;transition:all .15s}
.add-rule-btn:hover{background:rgba(124,111,224,.12);border-color:rgba(124,111,224,.4)}

.wiz-btn-back{padding:11px 20px;background:transparent;border:1px solid rgba(255,255,255,.1);border-radius:9px;color:rgba(255,255,255,.4);font-family:inherit;font-size:13px;cursor:pointer;transition:all .15s}
.wiz-btn-back:hover{border-color:rgba(255,255,255,.2);color:rgba(255,255,255,.6)}
.wiz-btn-next{padding:11px 28px;background:#7C6FE0;border:none;border-radius:9px;color:#fff;font-family:inherit;font-size:13px;font-weight:500;cursor:pointer;box-shadow:0 0 20px rgba(124,111,224,.25);display:flex;align-items:center;gap:7px;transition:all .15s}
.wiz-btn-next:hover{background:#6B5FD0;box-shadow:0 0 28px rgba(124,111,224,.35)}
.wiz-btn-next:disabled{opacity:.5;cursor:not-allowed}
.wiz-btn-done{padding:11px 28px;background:#4ADE80;border:none;border-radius:9px;color:#0D0D14;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:7px;transition:all .15s}
.wiz-btn-done:hover{background:#34D399}
