/* ══════════════════════════════════════
   PORTFOLIO TRACKER — tracker.css
   Matches scanner/swap visual language
══════════════════════════════════════ */

/* ── Wallet Input Area (reuses scanner-search-wrap from scanner.css via swap.css) ── */
.connect-wallet-btn {
    padding: 11px 22px;
    background: linear-gradient(135deg, rgba(147,51,234,0.25), rgba(6,182,212,0.15));
    border: 1px solid rgba(147,51,234,0.5);
    border-radius: 12px;
    color: #a78bfa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}
.connect-wallet-btn:hover {
    background: rgba(147,51,234,0.4);
    box-shadow: 0 0 20px rgba(147,51,234,0.4);
    transform: translateY(-1px);
}

/* ── Summary Cards Row ── */
.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ps-card {
    background: rgba(20,20,40,0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    transition: all 0.3s;
}
.ps-card:hover {
    border-color: rgba(147,51,234,0.55);
    transform: translateY(-3px);
    box-shadow: 0 0 28px rgba(147,51,234,0.18);
}
.ps-card.qcat-highlight {
    border-color: rgba(167,139,250,0.55);
    background: linear-gradient(135deg, rgba(147,51,234,0.18), rgba(6,182,212,0.1));
    box-shadow: 0 0 28px rgba(147,51,234,0.15);
}
.ps-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(200,200,255,0.5);
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}
.ps-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #a78bfa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}
.ps-sub {
    font-size: 11px;
    color: rgba(200,200,255,0.45);
}

/* ── QCAT Position Card ── */
.qcat-position-card {
    background: linear-gradient(135deg, rgba(147,51,234,0.16), rgba(6,182,212,0.08));
    border: 1px solid rgba(147,51,234,0.45);
    border-radius: 20px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    box-shadow: 0 0 40px rgba(147,51,234,0.12);
    animation: fadeInUp 0.6s ease;
}
.qp-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.qp-icon { font-size: 38px; line-height: 1; }
.qp-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 4px;
}
.qp-sub { font-size: 11px; color: rgba(200,200,255,0.45); font-family: monospace; }

.qp-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}
.qp-stat { text-align: center; }
.qp-stat-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 4px;
}
.qp-stat-val.green { color: #22c55e; }
.qp-stat-val.red   { color: #ef4444; }
.qp-stat-label {
    font-size: 10px;
    color: rgba(200,200,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Holdings Card ── */
.holdings-card {
    background: rgba(20,20,40,0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeInUp 0.7s ease;
    margin-bottom: 30px;
}
.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(147,51,234,0.18);
    background: rgba(147,51,234,0.06);
    flex-wrap: wrap;
    gap: 10px;
}
.holdings-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #a78bfa;
}
.holdings-search {
    background: rgba(10,10,30,0.7);
    border: 1px solid rgba(147,51,234,0.3);
    border-radius: 10px;
    padding: 8px 14px;
    color: #e0e0ff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    width: 200px;
}
.holdings-search:focus { border-color: #a78bfa; }
.holdings-search::placeholder { color: rgba(167,139,250,0.35); }

.holdings-table-wrap { overflow-x: auto; }
.holdings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.holdings-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(200,200,255,0.45);
    background: rgba(147,51,234,0.05);
    border-bottom: 1px solid rgba(147,51,234,0.12);
    white-space: nowrap;
    font-family: 'Orbitron', sans-serif;
}
.holdings-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(147,51,234,0.07);
    color: #d0d0ff;
    white-space: nowrap;
    vertical-align: middle;
}
.holdings-table tbody tr:hover td {
    background: rgba(147,51,234,0.07);
}
.holdings-table tr.qcat-row td {
    background: rgba(147,51,234,0.09);
    border-left: 3px solid #a78bfa;
}
.td-rank { color: rgba(200,200,255,0.3); font-size: 12px; }
.td-token { display: flex; align-items: center; gap: 10px; }
.td-icon {
    width: 32px; height: 32px;
    background: rgba(147,51,234,0.2);
    border: 1px solid rgba(147,51,234,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.td-name  { font-weight: 600; color: #e0e0ff; font-size: 13px; }
.td-ticker { font-size: 10px; color: rgba(200,200,255,0.45); margin-top: 1px; }
.td-positive { color: #22c55e; font-weight: 600; }
.td-negative { color: #ef4444; font-weight: 600; }
.pct-bar-wrap { display: flex; align-items: center; gap: 8px; }
.pct-bar-track {
    width: 55px; height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px; overflow: hidden;
}
.pct-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9333ea, #06b6d4);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.green { color: #22c55e !important; }
.red   { color: #ef4444 !important; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .portfolio-summary { grid-template-columns: repeat(2, 1fr); }
    .qcat-position-card { flex-direction: column; gap: 16px; }
    .qp-stats { gap: 16px; }
}
@media (max-width: 500px) {
    .portfolio-summary { grid-template-columns: 1fr 1fr; }
    .holdings-search { width: 100%; }
    .ps-value { font-size: 17px; }
}
