/* ===== PORTFOLIO PAGE ===== */

#portfolio-header {
  padding: 8rem 1.5rem 3rem;
  background: radial-gradient(ellipse at center, #0d1a0d 0%, var(--bg) 70%);
  text-align: center;
}

#portfolio-header h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

#portfolio-header .section-desc { margin: 0 auto 2rem; }

/* Form */
.pf-form {
  display: flex;
  gap: 0.7rem;
  max-width: 640px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.pf-form input {
  flex: 1;
  min-width: 240px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.pf-form input:focus { border-color: var(--teal); }
.pf-form input::placeholder { color: var(--text-muted); }

.pf-form .btn-primary {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Preview note */
.pf-note {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  margin: 1.5rem auto 0;
  max-width: 640px;
  text-align: left;
}

.pf-note-tag {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold-light);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.pf-note p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Results */
#portfolio-results { background: var(--bg2); display: none; }
#portfolio-results.show { display: block; }

.pf-status {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1rem 0;
}

.pf-status.error { color: #ff6b7a; }

.pf-content { display: none; }
.pf-content.show { display: block; }

.pf-summary {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.pf-total {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pf-total-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pf-total-value {
  font-family: 'Cinzel', serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--gold-light);
}

.pf-total-sub { font-size: 0.85rem; color: var(--text-muted); }

.pf-chart-wrap {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.pf-chart-wrap svg { width: 100%; height: 100%; }

/* Holdings list */
.pf-holdings {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 760px;
  margin: 0 auto;
}

.pf-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
}

.pf-row-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold);
  flex-shrink: 0;
}

.pf-row-name { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.pf-row-amount { font-size: 0.78rem; color: var(--text-muted); }

.pf-row-usd { font-weight: 700; color: var(--gold-light); font-size: 0.95rem; text-align: right; }
.pf-row-pct {
  font-size: 0.78rem;
  color: var(--teal-light);
  font-weight: 600;
  min-width: 48px;
  text-align: right;
}

.pf-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* Rewards */
.pf-rewards {
  max-width: 760px;
  margin: 2.5rem auto 0;
  background: var(--bg3);
  border: 1px dashed var(--gold-dim);
  border-radius: 12px;
  padding: 1.8rem;
  text-align: center;
}

.pf-rewards h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.pf-rewards p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

@media (max-width: 600px) {
  .pf-summary { flex-direction: column; gap: 1.5rem; }
  .pf-row { grid-template-columns: auto 1fr auto; }
  .pf-row-pct { display: none; }
}
