/* Removed import for Noto Naskh Arabic */

body {
    font-family: 'Rabar_038', serif;
    background-color: #f5f7fa;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-hover:active {
    transform: translateY(0);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        /* Force 2 columns on mobile */
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Low Stock Animation */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        border-color: #ef4444;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        border-color: #ef4444;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        border-color: #ef4444;
    }
}

.low-stock-active {
    animation: pulse-red 2s infinite;
    position: relative;
}

.low-stock-active i {
    color: #ef4444 !important; /* Force red icon */
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both infinite;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.badge-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff4d4d, #d32f2f);
    color: white;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border: 3px solid white;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.4);
    z-index: 10;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
