/* نظام تنبيهات التجديد */
.renewal-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.renewal-lamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 2px;
    transition: all 0.3s ease;
}

/* تأثير النبض للحالات الحرجة */
.renewal-pulse {
    animation: renewalPulse 2s infinite;
}

@keyframes renewalPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* عدد الأيام */
.renewal-days {
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    margin-top: 2px;
}

/* ألوان الحالات المختلفة */
.renewal-indicator[data-status="expired"] .renewal-lamp {
    background: rgba(108, 117, 125, 0.15);
    border: 1px solid #6c757d;
    box-shadow: 0 0 8px rgba(108, 117, 125, 0.3);
}

.renewal-indicator[data-status="critical"] .renewal-lamp {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
}

.renewal-indicator[data-status="warning"] .renewal-lamp {
    background: rgba(253, 126, 20, 0.15);
    border: 1px solid #fd7e14;
    box-shadow: 0 0 6px rgba(253, 126, 20, 0.3);
}

.renewal-indicator[data-status="caution"] .renewal-lamp {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    box-shadow: 0 0 6px rgba(255, 193, 7, 0.3);
}

.renewal-indicator[data-status="safe"] .renewal-lamp {
    background: rgba(25, 135, 84, 0.15);
    border: 1px solid #198754;
    box-shadow: 0 0 6px rgba(25, 135, 84, 0.3);
}

/* تحسينات للجداول */
.table .renewal-indicator {
    margin-right: 8px;
}

/* تحسينات للكروت */
.card .renewal-indicator {
    flex-shrink: 0;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .renewal-indicator {
        gap: 2px;
    }

    .renewal-lamp {
        padding: 1px;
    }

    .renewal-days {
        font-size: 9px;
    }
}

/* تحسينات للداشبورد */
.dashboard-renewal-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* تنبيهات التجديد المخصصة (لا تختفي تلقائياً) */
.renewal-alert-danger,
.renewal-alert-warning,
.renewal-alert-info {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 1rem;
}

.renewal-alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.renewal-alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #fd7e14;
}

.renewal-alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.renewal-alert-danger .alert-heading,
.renewal-alert-warning .alert-heading,
.renewal-alert-info .alert-heading {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* الأنماط القديمة للتوافق */
.dashboard-renewal-section .alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dashboard-renewal-section .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.dashboard-renewal-section .alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.dashboard-renewal-section .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* تحسينات للتوضيحات */
.renewal-tooltip {
    font-size: 12px;
    max-width: 200px;
}

/* تأثيرات التفاعل */
.renewal-indicator:hover .renewal-lamp {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
}

/* تحسينات للطباعة */
@media print {
    .renewal-indicator {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .renewal-pulse {
        animation: none;
    }
}

/* تحسينات للوضع المظلم */
@media (prefers-color-scheme: dark) {
    .renewal-lamp {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .dashboard-renewal-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
}

/* تحسينات للإمكانية */
.renewal-indicator[role="status"] {
    position: relative;
}

.renewal-indicator[aria-label] {
    cursor: help;
}

/* تحسينات للأداء */
.renewal-indicator * {
    will-change: transform, opacity;
}

.renewal-pulse {
    will-change: transform, opacity;
}
