/* Rebalance Alert Specific Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.rebalance-content {
    padding: 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

.rebalance-intro, 
.portfolio-comparison, 
.rebalance-recommendations, 
.rebalance-actions {
    background: white;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
}

.rebalance-intro h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #212529;
    text-align: center;
    line-height: 1.3;
}

.rebalance-intro p {
    font-size: 1.1rem;
    color: #57606a;
    max-width: 700px;
    margin: 0 auto 10px auto;
    line-height: 1.6;
    text-align: center;
}

.portfolio-comparison h2, 
.rebalance-recommendations h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.allocation-card {
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    text-align: center;
}

.allocation-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #34495e;
}

.mini-pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#currentPie {
     background: conic-gradient(
        #6f42c1 0% 45%,  /* Stocks - purple */
        #0d6efd 45% 75%, /* Bonds - blue */
        #20c997 75% 100% /* Funds - green */
    );
}
#targetPie {
    background: conic-gradient(
        #6f42c1 0% 35%,  /* Stocks */
        #0d6efd 35% 75%, /* Bonds */
        #20c997 75% 100% /* Funds */
    );
}

.allocation-details {
    text-align: left;
    margin-top: 15px;
}
.allocation-details p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
}
.allocation-details strong {
    color: #2c3e50;
    margin-right: auto;
    padding-left: 5px;
}

.allocation-details span[id^="current"], 
.allocation-details span[id^="target"] {
    font-weight: 500;
    color: #2980b9;
}

.color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}
.stocks-bg { background-color: #6f42c1; }
.bonds-bg { background-color: #0d6efd; }
.funds-bg { background-color: #20c997; }


.current-allocation {
    border-top: 4px solid #fd7e14; 
}

.target-allocation {
    border-top: 4px solid #20c997;
}

.recommendation-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 5px solid;
    transition: transform 0.2s ease-in-out;
}
.step:hover {
    transform: translateX(5px);
}

.step:nth-child(1) { border-left-color: #e74c3c; } /* Sell */
.step:nth-child(2) { border-left-color: #2ecc71; } /* Buy */
.step:nth-child(3) { border-left-color: #3498db; } /* Hold */


.step-icon {
    font-size: 2rem;
    margin-top: 2px;
    min-width: 30px;
}
.step:nth-child(1) .step-icon { color: #e74c3c; }
.step:nth-child(2) .step-icon { color: #2ecc71; }
.step:nth-child(3) .step-icon { color: #3498db; }


.step-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.step-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #57606a;
}
.step-text p strong {
    color: #34495e;
}

.rebalance-actions {
    text-align: center;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.rebalance-actions .cta-button, 
.rebalance-actions .secondary-button {
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 220px;
}

.rebalance-actions .cta-button {
    background: #0d6efd;
    color: white;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}
.rebalance-actions .cta-button:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.rebalance-actions .secondary-button {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}
.rebalance-actions .secondary-button:hover {
    background: #dee2e6;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rebalance-intro h1 {
        font-size: 1.8rem;
    }
    .rebalance-intro p {
        font-size: 1rem;
    }
    .portfolio-comparison h2, .rebalance-recommendations h2 {
        font-size: 1.4rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .allocation-card {
        padding: 20px;
    }
    .mini-pie-chart {
        width: 120px;
        height: 120px;
    }

    .step {
        gap: 15px;
        padding: 15px;
    }
    .step-icon {
        font-size: 1.8rem;
    }
    .step-text h4 {
        font-size: 1rem;
    }
    .step-text p {
        font-size: 0.9rem;
    }

    .rebalance-actions {
        flex-direction: column;
        gap: 15px;
    }
    .rebalance-actions .cta-button, 
    .rebalance-actions .secondary-button {
        width: 100%;
        min-width: auto;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
     .rebalance-content {
        padding: 15px 0;
    }
    .rebalance-intro, 
    .portfolio-comparison, 
    .rebalance-recommendations, 
    .rebalance-actions {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    .rebalance-intro h1 {
        font-size: 1.5rem;
    }
    .rebalance-intro p {
        font-size: 0.9rem;
    }
    .portfolio-comparison h2, .rebalance-recommendations h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    .allocation-card h3 {
        font-size: 1.1rem;
    }
    .mini-pie-chart {
        width: 100px;
        height: 100px;
    }
    .allocation-details p {
        font-size: 0.9rem;
    }
     .step-text h4 {
        font-size: 0.95rem;
    }
    .step-text p {
        font-size: 0.85rem;
    }
}