/* Dashboard Widgets Styling */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.dashboard-section {
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

/* Market Trends Container - Add drop shadow */
.market-trends-container {
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Trend and Segment Cards */
.trend-card, .segment-card {
    background-color: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.trend-card {
    padding: 0.75rem;
    display: flex;
    align-items: center;
}

/* Ensure proper spacing in the market grid */
.dashboard-section .col-md-4, .dashboard-section .col-md-2 {
    margin-bottom: 1rem;
}


.asset-type {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.3px;
}

.asset-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.change-percentage, .change-value {
    font-size: 1rem;
    font-weight: 500;
}

.positive {
    color: #22c55e;
}

.negative {
    color: #ef4444;
}

.btn-icon {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
}

/* Balance Card - Modern Clean Design */
.balance-card {
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-grey-dark);
    overflow: hidden;
}

.balance-card .card-body {
    padding: 3rem;
}

.balance-card .card-body.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading State */
.balance-loading {
    text-align: center;
    width: 100%;
}

.loading-shimmer {
    width: 200px;
    height: 60px;
    background: linear-gradient(90deg, var(--color-grey) 25%, var(--color-grey-dark) 50%, var(--color-grey) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin: 0 auto 1rem;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-text {
    color: var(--color-dark);
    opacity: 0.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Balance Hero Section */
.balance-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-grey-dark);
}

.balance-label {
    font-size: 0.875rem;
    color: var(--color-dark);
    opacity: 0.6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.balance-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-dark);
}

/* Balance Stats Grid */
.balance-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .balance-stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-light);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.stat-item:hover {
    background: var(--color-grey);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.positive {
    background: rgba(54, 224, 160, 0.15);
    color: var(--color-success);
}

.stat-icon.negative {
    background: rgba(255, 101, 101, 0.15);
    color: var(--color-danger);
}

.stat-icon.neutral {
    background: var(--color-grey-dark);
    color: var(--color-dark);
    opacity: 0.7;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--color-dark);
}

.stat-value.positive {
    color: var(--color-success);
}

.stat-value.negative {
    color: var(--color-danger);
}

.stat-value.neutral {
    color: var(--color-dark);
    opacity: 0.7;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-dark);
    opacity: 0.6;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state p {
    font-size: 1rem;
    color: var(--color-dark);
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

/* Ensure animated spans inherit all styling from parent elements */
.animated-balance,
.animated-percentage,
.animated-change-amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* Progress Circles with improved styling */
.progress-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 2rem 0;
}

.progress-circle::before {
    content: "";
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 14px solid #f0f0f0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.progress-circle::after {
    content: "";
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 14px solid transparent;
    border-left-color: #22c55e;
    border-top-color: #22c55e;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    z-index: 1;
}

.circle-label, .circle-percentage, .circle-amount {
    position: relative;
    z-index: 2;
    text-align: center;
}

.circle-label {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.3px;
}

.circle-percentage {
    font-size: 1.2rem;
    font-weight: 600;
}

.circle-amount {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Custom styles for segment cards */
.segment-card {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Create different rotation angles for each segment */
.dashboard-section .row .col-md-4:nth-child(1) .progress-circle::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.dashboard-section .row .col-md-4:nth-child(2) .progress-circle::after {
    transform: translate(-50%, -50%) rotate(75deg);
}

.dashboard-section .row .col-md-4:nth-child(3) .progress-circle::after {
    transform: translate(-50%, -50%) rotate(180deg);
    border-left-color: #ef4444;
    border-top-color: #ef4444;
}
