/* Investments Section Styles */

.investments-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.investments-header h2 {
    color: #00CED1;
    font-size: 1.75rem;
    margin: 0;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-btn:hover {
    color: white;
}

.view-btn.active {
    background: rgba(0, 206, 209, 0.2);
    color: #00CED1;
}

/* Investment Views */
.investment-view {
    display: none;
}

.investment-view.active {
    display: block;
}

/* Portfolio Summary */
.portfolio-summary {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.portfolio-value-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
}

.portfolio-value-card h4 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.big-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.day-change {
    color: #4ade80;
    font-weight: 500;
}

.day-change.negative {
    color: #f87171;
}

.portfolio-stats {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.stat-value {
    color: white;
    font-weight: 600;
}

/* Positions */
.positions-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.positions-section h3 {
    color: white;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.positions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.position-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    gap: 1rem;
}

.position-symbol .symbol {
    display: block;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.position-symbol .qty {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.position-price .current-price {
    display: block;
    color: white;
    font-weight: 500;
}

.position-price .avg-price {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.position-value .market-value {
    color: white;
    font-weight: 500;
}

.position-pl {
    text-align: right;
}

.position-pl .pl-value {
    display: block;
    font-weight: 600;
}

.position-pl .pl-percent {
    display: block;
    font-size: 0.8rem;
}

.position-pl.positive {
    color: #4ade80;
}

.position-pl.negative {
    color: #f87171;
}

.empty-positions,
.portfolio-error {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Trade Panel */
.trade-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

.symbol-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.symbol-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
}

.symbol-input:focus {
    outline: none;
    border-color: #00CED1;
}

.symbol-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    text-transform: none;
}

/* Quote Display */
.quote-display {
    background: rgba(0, 206, 209, 0.05);
    border: 1px solid rgba(0, 206, 209, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.quote-symbol {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.quote-price {
    font-size: 2rem;
    font-weight: 600;
    color: #00CED1;
    margin: 0.5rem 0;
}

.quote-change {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Order Form */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-form .form-group {
    margin-bottom: 0;
}

.order-form label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.order-form input,
.order-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
}

.order-form input:focus,
.order-form select:focus {
    outline: none;
    border-color: #00CED1;
}

/* Side Toggle */
.side-toggle {
    display: flex;
    gap: 0.5rem;
}

.side-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.side-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.side-btn.active[data-side="buy"] {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
    color: #4ade80;
}

.side-btn.active[data-side="sell"] {
    background: rgba(248, 113, 113, 0.2);
    border-color: #f87171;
    color: #f87171;
}

.order-submit {
    margin-top: 0.5rem;
}

/* Recent Orders */
.recent-orders {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.recent-orders h3 {
    color: white;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.order-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.order-side {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-side.buy {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.order-side.sell {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.order-symbol {
    font-weight: 600;
    color: white;
}

.order-qty {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.order-details {
    display: flex;
    gap: 1rem;
}

.order-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-transform: capitalize;
}

.order-status {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.order-status.filled {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.order-status.pending_new,
.order-status.accepted,
.order-status.new {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.order-status.canceled,
.order-status.rejected {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.order-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.empty-orders {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Tax Section Placeholder */
.tax-container {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tax-container h2 {
    color: #00CED1;
    font-size: 1.75rem;
    margin: 0 0 2rem 0;
}

.tax-coming-soon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.tax-coming-soon h3 {
    color: white;
    margin-bottom: 1rem;
}

.tax-coming-soon p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.feature-list li {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00CED1;
}

/* Responsive */
@media (max-width: 1024px) {
    .portfolio-summary {
        grid-template-columns: 1fr;
    }

    .position-item {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .investments-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .position-item {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .position-pl {
        text-align: left;
    }

    .symbol-search {
        flex-direction: column;
    }

    .order-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}
