/* Import theme variables */
@import url('theme-variables.css');

/* Fixed Dashboard Body */
.dashboard_body {
    font-family: var(--finstock-font-primary);
    background: linear-gradient(135deg, #fef7ff 0%, #f0f9ff 50%, #f0fff4 100%);
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    /* Remove any fixed positioning that might cause issues */
    width: 100%;
    box-sizing: border-box;
}

    .dashboard_body::before {
        content: '';
        position: absolute; /* Changed from fixed to absolute */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }

/* Fixed Dashboard Container */
.dashboard {
    max-width: 1800px;
    margin: 0 auto; /* Changed from 0px 2rem to center properly */
    padding: 0 2rem; /* Added padding instead of margin for better zoom behavior */
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced responsive behavior */
.dashboard-header {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--finstock-text);
    position: relative;
    width: 100%;
}

.dashboard-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    background: var(--finstock-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Priority Section - Better zoom handling */
.priority-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* More flexible grid */
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Performance cards with better zoom behavior */
.performance-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    width: 100%;
    box-sizing: border-box;
    /* Critical for crisp text during animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

    .performance-card:hover {
        transform: translateY(-4px); /* Removed scale to prevent text blur */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        background: rgba(255, 255, 255, 0.95);
    }

/* Stock Availability Card */
.availability-card {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(56, 161, 105, 0.05) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 1.5rem 1rem;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

    .availability-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #48bb78, #38a169);
    }

.card-title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--finstock-text);
    text-align: center;
}

/* Circular progress with zoom-friendly sizing */
.circular-progress {
    position: relative;
    width: min(120px, 30vw); /* Responsive width */
    height: min(120px, 30vw); /* Responsive height */
    margin: 1rem auto;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.circular-progress svg {
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 2px 8px rgba(72, 187, 120, 0.2));
    overflow: visible;
}

.progress-ring__circle {
    stroke: #e6f4ea;
    stroke-width: 8;
    fill: transparent;
}

.progress-ring__progress {
    stroke: #48bb78;
    stroke-width: 6;
    stroke-linecap: round;
    fill: transparent;
    transition: stroke-dashoffset 2s ease-in-out;
}

.progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    pointer-events: none;
    /* Ensure crisp text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.progress-value {
    font-size: clamp(1.4rem, 4vw, 1.8rem); /* Responsive font size */
    font-weight: 900;
    color: #48bb78;
    line-height: 0.9;
    /* Removed text-shadow for crisp text */
    /* text-shadow: 0 1px 5px rgba(72, 187, 120, 0.2); */
}

.progress-label {
    font-size: clamp(0.6rem, 2vw, 0.7rem); /* Responsive font size */
    color: #48bb78;
    font-weight: 700;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Date Selector - Better centering */
.date-selector-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
    width: 100%;
}

.date-selector {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 0.5rem;
    display: flex;
    gap: 0.3rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
}

    .date-selector::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: conic-gradient(from 0deg, transparent, rgba(147, 51, 234, 0.1), transparent);
        animation: rotate 6s linear infinite;
        z-index: -1;
    }

/* Orders Section - Better zoom handling */
.orders-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 400px;
    height: auto;
    box-sizing: border-box;
}

    .orders-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
        background-size: 300% 100%;
    }

    .orders-section::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
        pointer-events: none;
        animation: floatingGlow 2s ease-in-out infinite;
    }

    .orders-section:hover {
        transform: translateY(-4px); /* Removed scale to prevent text blur */
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
        background: rgba(255, 255, 255, 0.98);
    }

/* Orders Content - Better responsive grid */
.orders-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: stretch;
    position: relative;
    z-index: 2;
    min-height: 300px;
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced responsive breakpoints */
@media (max-width: 1200px) {
    .orders-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .priority-section {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard_body {
        padding: 0.5rem;
    }

    .dashboard {
        padding: 0 1rem;
    }

    .dashboard-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    .priority-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .orders-section {
        padding: 1rem;
    }

    .orders-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .performance-card {
        padding: 1rem;
        min-height: 180px;
    }

    .date-selector {
        padding: 0.4rem;
        flex-wrap: wrap;
    }

    .date-option {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        min-width: 60px;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .dashboard {
        padding: 0 0.5rem;
    }

    .priority-section {
        gap: 0.8rem;
    }

    .performance-card {
        min-height: 160px;
        padding: 0.8rem;
    }

    .circular-progress {
        width: min(100px, 25vw);
        height: min(100px, 25vw);
    }
}

/* Base card styles */
.overdue-card {
    /* Critical for crisp text during animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

    /* Normal state - no urgent styling */
    .overdue-card.overdue-normal {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(34, 197, 94, 0.05) 100%);
        border: 2px solid rgba(16, 185, 129, 0.2);
    }

    /* Maintain background on hover for normal state */
    .overdue-card.overdue-normal:hover {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(34, 197, 94, 0.07) 100%);
        border: 2px solid rgba(16, 185, 129, 0.25);
        transform: translateY(-4px); /* Remove scale to prevent text blur */
    }

        .overdue-card.overdue-normal::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #10b981, #22c55e);
        }

    /* Urgent state - NO animation on the card itself */
    .overdue-card.overdue-urgent {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.08) 100%);
        border: 2px solid rgba(239, 68, 68, 0.2);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
    }

    /* Maintain background on hover for urgent state */
    .overdue-card.overdue-urgent:hover {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(220, 38, 38, 0.10) 100%);
        border: 2px solid rgba(239, 68, 68, 0.25);
        transform: translateY(-4px); /* Remove scale to prevent text blur */
    }

        .overdue-card.overdue-urgent::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--finstock-error), #dc2626);
            animation: alertGlow 2s ease-in-out infinite alternate;
        }

/* Animation keyframes - only for icon and badge */
@keyframes warningIconPulse {
    0%, 100% {
        transform: scale(1) translateZ(0);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.08) translateZ(0);
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
    }
}

/* Common warning container styles */
.warning-container {
    position: relative;
    text-align: center;
    margin: 0.8rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Status icon for non-urgent state */
.status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    cursor: pointer;
    /* Crisp rendering */
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Warning icon for urgent state */
.warning-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    animation: warningIconPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    position: relative;
    cursor: pointer;
    /* Crisp animation */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

    .warning-icon::before {
        content: '';
        position: absolute;
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        border: 2px solid #ef4444;
        border-radius: 50%;
        animation: warningRipple 2s infinite;
        opacity: 0;
    }

@keyframes warningBlink {
    0%, 50% {
        opacity: 1;
        transform: translateZ(0);
    }

    51%, 100% {
        opacity: 0.7;
        transform: translateZ(0);
    }
}

@keyframes warningRipple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Urgent badge - only shown when urgent */
.urgent-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--finstock-error), #dc2626);
    color: var(--finstock-white);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.3rem;
    animation: badgePulse 1.5s infinite;
    /* Crisp text during animation */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1) translateZ(0);
    }

    50% {
        transform: scale(1.05) translateZ(0);
    }
}
/* Out of Stock Card */
.oos-card {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1) 0%, rgba(221, 107, 32, 0.05) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 1.5rem;
}

    .oos-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--finstock-warning), #dd6b20);
    }

.dashboard_metric-showcase {
    text-align: center;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.animated-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.3rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--finstock-warning), #dd6b20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--finstock-white);
    animation: pulse 2s infinite;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(237, 137, 54, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(237, 137, 54, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 14px rgba(237, 137, 54, 0.4);
    }
}

.main-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--finstock-warning);
    line-height: 0.9;
    /* Removed text-shadow for crisp text */
    /* text-shadow: 0 1px 5px rgba(237, 137, 54, 0.2); */
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.card-description {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--finstock-warning);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
}

.dashboard_metric-subvalue {
    font-size: 0.8rem;
    color: var(--finstock-warning);
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0.2rem;
    text-align: center;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.date-option {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--finstock-dark-grey);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    min-width: 50px;
}

    .date-option:hover {
        color: var(--finstock-secondary-blue);
        background: rgba(46, 96, 157, 0.08);
        transform: translateY(-1px);
    }

    .date-option.active {
        color: var(--finstock-white);
        background: var(--finstock-gradient-primary);
        box-shadow: 0 4px 12px rgba(0, 37, 84, 0.3);
        transform: translateY(-1px);
    }

.orders-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.orders-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    background: var(--finstock-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
}

    .orders-title::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 3px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        border-radius: 2px;
        animation: titleUnderline 3s ease-in-out infinite;
    }

.period-label {
    color: var(--finstock-dark-grey);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

.orders-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    height: 100%;
}

.dashboard_metric-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Critical for crisp text during animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

    .dashboard_metric-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.6s ease;
    }

    .dashboard_metric-item:hover::before {
        left: 100%;
    }

    .dashboard_metric-item:hover {
        transform: translateY(-4px) translateZ(0);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 0.8);
    }

.dashboard_metric-label {
    font-size: 0.8rem;
    color: var(--finstock-dark-grey);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.dashboard_metric-value {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--finstock-text);
    margin-bottom: 0.3rem;
    position: relative;
    transition: all 0.3s ease;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.dashboard_metric-item:hover .dashboard_metric-value {
    color: var(--finstock-secondary-blue);
    /* Removed scaling to prevent blur */
}

.dashboard_metric-change {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.change-positive {
    color: var(--finstock-success);
    background: rgba(16, 185, 129, 0.1);
}

.change-negative {
    color: var(--finstock-error);
    background: rgba(239, 68, 68, 0.1);
}

.change-neutral {
    color: var(--finstock-dark-grey);
    background: rgba(107, 114, 128, 0.1);
}

.donut-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    height: 100%;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.donut-container {
    position: relative;
    width: min(250px, 40vw); /* Responsive width */
    height: min(250px, 40vw); /* Responsive height */
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0.5rem;
    /* Critical for crisp text during animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

    .donut-container:hover {
        transform: translateZ(0); /* Removed scale to prevent text blur */
    }

.donut-chart {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}

.donut-center {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    max-width: 55%;
    max-height: 55%;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
}

.donut-container:hover .donut-center {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) translateZ(0); /* Removed scale to prevent text blur */
}

.donut-value {
    font-size: clamp(1.2rem, 3vw, 1.6rem); /* Responsive font size */
    font-weight: 900;
    color: var(--finstock-text);
    line-height: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.donut-container:hover .donut-value {
    color: var(--finstock-success);
    transform: translateZ(0); /* Removed scale to prevent text blur */
}

.donut-label {
    font-size: clamp(0.6rem, 1.5vw, 0.7rem); /* Responsive font size */
    color: var(--finstock-dark-grey);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.2rem;
    white-space: nowrap;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.donut-subtitle {
    text-align: center;
    color: var(--finstock-dark-grey);
    font-size: clamp(0.8rem, 2vw, 0.9rem); /* Responsive font size */
    font-weight: 600;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 100%;
    word-wrap: break-word;
    margin: 0 1rem;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes titleUnderline {
    0%, 100% {
        width: 60px;
    }

    50% {
        width: 80px;
    }
}

@keyframes floatingGlow {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -45%);
    }
}

.card-comparison {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--finstock-success);
}

.comparison-negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--finstock-error);
}

/* Loading CSS */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--finstock-light-grey);
    border-top: 4px solid var(--primary-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--finstock-dark-grey);
    font-size: 16px;
    margin: 0;
}

.section-loading {
    margin: 20px 0;
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0f0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.proposals-skeleton {
    height: 200px;
    width: 100%;
}

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

    100% {
        background-position: -200% 0;
    }
}

.priority-skeleton {
    height: 120px;
    width: 100%;
    margin-bottom: 16px;
}
