/**
 * تحسينات التصميم العام - المرحلة 4
 * ==================================
 */

/* كروت الإحصائيات */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.12);
}

/* كروت الطلبات - ظلال ناعمة */
.order-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* أزرار محسّنة */
.btn-primary {
    transition: all 0.2s ease;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* تأثير ظهور سلس */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeInUp 0.3s ease forwards;
}

/* صفحة تسجيل الدخول */
.login-card {
    animation: fadeInUp 0.4s ease;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.login-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* مؤشر التحميل */
.loading-spinner {
    border: 3px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   أيقونات التنقل - تلميح عند التحويم (متحرك)
   ============================================ */
.tab-btn,
.nav-icon-btn {
    position: relative;
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem !important;
}
.tab-btn .tab-label,
.nav-icon-btn .nav-label {
    display: none;
}
/* التلميح يظهر فوق الزر عند التحويم */
.tab-btn[data-tooltip]::after,
.nav-icon-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    padding: 0.35rem 0.75rem;
    background: #1f2937;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.tab-btn:hover[data-tooltip]::after,
.nav-icon-btn:hover[data-tooltip]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}
[data-theme="dark"] .tab-btn[data-tooltip]::after,
[data-theme="dark"] .nav-icon-btn[data-tooltip]::after {
    background: #334155;
    color: #f1f5f9;
}

/* روابط سريعة في لوحة التحكم - أيقونة فقط + تلميح */
.dash-quick-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem !important;
    min-height: 3.5rem;
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.dash-quick-link .quick-link-icon {
    font-size: 1.75rem;
}
.dash-quick-link .quick-link-text {
    display: none;
}
.dash-quick-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    padding: 0.4rem 0.6rem;
    background: #1f2937;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.dash-quick-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dash-quick-link:hover[data-tooltip]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}
[data-theme="dark"] .dash-quick-link[data-tooltip]::after {
    background: #334155;
    color: #f1f5f9;
}
