/* Portfolio Dashboard Styles */
.portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.portfolio-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 206, 209, 0.1);
    border: 1px solid rgba(0, 206, 209, 0.3);
    border-radius: 8px;
    color: var(--color-dark-turquoise);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: rgba(0, 206, 209, 0.15);
    transform: translateY(-2px);
}

.btn-refresh span {
    font-size: 1.25rem;
    animation: none;
}

.btn-refresh:hover span {
    animation: rotate 1s ease-in-out;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 206, 209, 0.1);
    border-top-color: var(--color-dark-turquoise);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Account Summary */
.account-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-card label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card .value {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
}

.summary-card .value.positive {
    color: #00ff00;
}

.summary-card .value.positive::before {
    content: '+';
}

.summary-card .value.negative {
    color: #ff6b6b;
}

.summary-card .value.negative::before {
    content: '-';
}

/* Positions Section */
.positions-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.positions-section h3 {
    color: var(--color-dark-turquoise);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

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

.positions-table thead {
    border-bottom: 2px solid rgba(0, 206, 209, 0.2);
}

.positions-table th {
    padding: 1rem;
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.positions-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.positions-table tbody tr:hover {
    background: rgba(0, 206, 209, 0.03);
}

.positions-table td {
    padding: 1rem;
    color: #ffffff;
}

.symbol-cell .symbol {
    font-weight: 600;
    color: var(--color-dark-turquoise);
}

.positions-table .positive {
    color: #00ff00;
}

.positions-table .negative {
    color: #ff6b6b;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-sell {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
}

.btn-sell:hover {
    background: rgba(255, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* No Positions */
.no-positions {
    text-align: center;
    padding: 3rem;
}

.no-positions p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Performance Section */
.performance-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 206, 209, 0.1);
    border-radius: 12px;
    padding: 2rem;
}

.performance-section h3 {
    color: var(--color-dark-turquoise);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.chart-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.chart-placeholder p {
    margin: 0.5rem 0;
}

.chart-info {
    font-size: 0.875rem;
    font-style: italic;
}

/* Error State */
.error-container {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 12px;
}

.error-message {
    color: #ff6b6b;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .account-summary {
        grid-template-columns: 1fr;
    }
    
    .positions-table {
        font-size: 0.875rem;
    }
    
    .positions-table th,
    .positions-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Hide some columns on mobile */
    .positions-table th:nth-child(3),
    .positions-table td:nth-child(3) {
        display: none;
    }
}