/* Stats card transitions */
.bg-white {
    transition: all 0.3s ease;
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
}

/* Update animation */
.value-updated {
    animation: highlight 1.5s ease-out;
}

@keyframes highlight {
    0% { color: #3b82f6; }
    100% { color: inherit; }
}

/* Error state */
.error {
    border: 1px solid #ef4444;
    background: #fee2e2;
}

.error::after {
    content: 'خطأ في تحديث البيانات';
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: #dc2626;
}

/* RTL number formatting */
.font-numeric {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    direction: ltr; /* Keep numbers LTR */
    unicode-bidi: bidi-override;
}

.digit-container {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.digit {
    display: inline-block;
    transition: transform 0.3s ease-out;
}

.digit-change {
    animation: digitSlide 0.3s ease-out;
}

@keyframes digitSlide {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Preserve Arabic number formatting */
.digit-container {
    direction: ltr;
    unicode-bidi: bidi-override;
}