
:root {
    --primary-color: #34C334;
    --secondary-color: #2AA52A;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #fd7e14;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-color: #e0e0e0;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'HONORSansArabicUI-DB', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.main-content {
    margin-right: 250px;
    padding: 20px;
    transition: var(--transition);
}

/* Welcome Modal Overlay */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-modal-overlay.show {
    opacity: 1;
}

/* Welcome Card Modal */
.modal-welcome-card {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-welcome-card.modal-enter {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-welcome-card.modal-exit {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
}

/* زر إغلاق الرسالة الترحيبية */
.welcome-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.welcome-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.welcome-close-btn:active {
    transform: scale(0.95);
}

.welcome-close-btn i {
    transition: transform 0.2s ease;
}

.welcome-close-btn:hover i {
    transform: rotate(90deg);
}

/* Welcome Card (Original) */
.welcome-card {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.2);
    position: relative;
    overflow: hidden;
    /* تم إزالة انيميشن welcomeSlideIn */
    transition: all 0.3s ease;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* تم إزالة تأثير الـ hover */

.welcome-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    /* تم إزالة انيميشن iconFloat */
    transition: all 0.3s ease;
}

/* تم إزالة تأثير الـ hover للـ icon */

.welcome-icon i {
    font-size: 1.5rem;
    color: white;
    /* تم إزالة انيميشن iconPulse */
    transition: all 0.3s ease;
}

/* تم إزالة تأثير الـ hover لأيقونة الـ icon */

.welcome-text {
    color: white;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease;
}

.welcome-title:hover {
    background: linear-gradient(45deg, #25D366, #128C7E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    transition: all 0.3s ease;
}

.welcome-subtitle:hover {
    opacity: 1;
    transform: scale(1.05);
}

.welcome-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    transition: all 0.3s ease;
}

.welcome-description:hover {
    opacity: 1;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.welcome-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.welcome-btn.primary {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.welcome-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.welcome-btn.primary:hover {
    background: linear-gradient(45deg, #128C7E, #25D366);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
}

.welcome-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.welcome-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.welcome-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.welcome-btn:hover::before {
    left: 100%;
}

.welcome-btn i {
    transition: all 0.3s ease;
}

.welcome-btn:hover i {
    transform: scale(1.2);
}

.welcome-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    transition: all 0.3s ease;
    cursor: pointer;
}

.circle-1 {
    width: 100px;
    height: 100px;
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.circle-2 {
    width: 60px;
    height: 60px;
    bottom: -30px;
    left: -30px;
    animation-delay: 2s;
}

.circle-3 {
    width: 40px;
    height: 40px;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

/* Enhanced Animations */
@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(-10px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-card {
        padding: 1.5rem 1rem;
        margin: 1rem;
        max-width: 100%;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-subtitle {
        font-size: 0.9rem;
    }
    
    .welcome-description {
        font-size: 0.8rem;
        max-width: 100%;
    }
    
    .welcome-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .welcome-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .welcome-icon {
        width: 50px;
        height: 50px;
    }
    
    .welcome-icon i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        padding: 1rem 0.8rem;
        margin: 0.5rem;
    }
    
    .welcome-title {
        font-size: 1.3rem;
    }
    
    .welcome-subtitle {
        font-size: 0.8rem;
    }
    
    .welcome-description {
        font-size: 0.75rem;
    }
    
    .welcome-icon {
        width: 40px;
        height: 40px;
    }
    
    .welcome-icon i {
        font-size: 1rem;
    }
    
    /* Modal responsive styles */
    .modal-welcome-card {
        width: 95%;
        padding: 1.5rem 1rem;
    }
    
    .welcome-modal-overlay {
        padding: 1rem;
    }
}


/* Period Selector */
.period-selector {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    gap: 10px;
}

.period-btn {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.period-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.period-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(74, 111, 220, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 20px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-title {
    color: #666;
    font-size: 14px;
}

.stat-trend {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
}

.stat-trend.up {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stat-trend.down {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Message Stats Card */
.message-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.message-stat {
    text-align: center;
}

.message-value {
    font-size: 25px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    margin-top: 35px;
}

.message-label {
    font-size: 12px;
    color: #666;
}

.refresh-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.refresh-btn.refreshing {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Chart Card */
.chart-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    overflow: visible; /* إزالة overflow: hidden لتجنب قطع الرسم البياني */
    display: flex;
    flex-direction: column;
}

.chart-card, .table-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    color: var(--dark-color);
}

.chart-period {
    font-size: 14px;
    color: #666;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* عرض بطاقتين جنبًا إلى جنب في الشاشات الكبيرة */
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    width: 100%;
    min-height: 280px; /* ارتفاع أدنى لضمان ظهور الرسم البياني */
    max-height: 350px; /* ارتفاع أقصى للتحكم في الحجم */
    position: relative;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Canvas for Charts */
#abandonedCartsChart,
#sentMessagesChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 330px; /* لضمان بقاء الرسم البياني داخل الحاوية */
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: right;
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.customer-info {
    display: flex;
    flex-direction: column;
}

.customer-name {
    font-weight: 500;
}

.customer-phone {
    font-size: 12px;
    color: #666;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background-color: rgba(253, 126, 20, 0.1);
    color: var(--warning-color);
}

.status-badge.completed {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.recovered {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        margin-right: 0;
        padding-bottom: 80px;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .period-selector {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .period-selector::-webkit-scrollbar {
        height: 5px;
    }
    
    .period-selector::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 5px;
    }

    .charts-container {
        grid-template-columns: 1fr; /* عرض البطاقتين أسفل بعضهما في وضع الهاتف */
    }

    .chart-container {
        min-height: 250px; /* تقليل الارتفاع الأدنى للشاشات الصغيرة */
        max-height: 300px;
    }

    #abandonedCartsChart,
    #sentMessagesChart {
        max-height: 280px;
    }
}

/* تنسيقات جدول العملاء */
#customersTable .loading-text,
#customersTable .no-data,
#customersTable .error-text {
    text-align: center;
    padding: 20px;
    color: #666;
}

#customersTable .no-data {
    color: #999;
    font-style: italic;
}

#customersTable .error-text {
    color: #f44336;
}

.sync-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
    line-height: 1.5;
    min-width: 100px; /* لضمان عرض مناسب */
    justify-content: center;
}

.sync-btn:hover {
    background-color: #45a049;
}

.sync-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* تنسيق Select2 */
.select2-container .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: var(--card-bg);
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    color: var(--text-color);
    padding-right: 30px; /* لتجنب تداخل النص مع السهم */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    width: 30px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}

.select2-container .select2-dropdown {
    background-color: var(--card-bg);
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.select2-container--default .select2-results__option {
    color: var(--text-color);
    padding: 8px 12px;
}

/* إزالة مساحة زر الإلغاء */
.select2-container--default .select2-selection--single .select2-selection__clear {
    display: none; /* إخفاء زر الإلغاء بشكل نهائي */
}

/* تعديلات للشاشات الصغيرة */
@media screen and (max-width: 600px) {
    .select2-container .select2-selection--single {
        height: 32px;
        font-size: 12px;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 32px;
        padding-right: 25px;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 30px;
        width: 25px;
    }

    .select2-container .select2-dropdown {
        font-size: 12px;
    }

    .select2-container--default .select2-results__option {
        padding: 6px 10px;
    }

    .store-select-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        max-width: 100%;
        padding: 0 10px;
    }
}

/* تنسيق حاوية القائمة المنسدلة */
.store-select-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}


/* تنسيق الإشعارات العلوية */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 280px; /* عرض افتراضي */
    max-width: 90vw; /* للتكيف مع الشاشات الصغيرة */
    box-sizing: border-box;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

.notification.info {
    background-color: var(--primary-color);
}

/* تنسيق زر إغلاق الإشعار */
.notification .close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    padding: 0;
    margin-left: 8px; /* للحفاظ على الفجوة مع النص */
}

.notification .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.notification .close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* ضمان التوافق مع أنواع الإشعارات */
.notification.success .close-btn,
.notification.error .close-btn,
.notification.info .close-btn {
    color: #fff;
}

/* تنسيق حاوية الإشعارات */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
}

/* ضمان التوافق مع أنواع الإشعارات */
.notification.success .close-btn {
    color: #fff; /* لون متناسق مع الإشعار الأخضر */
}

.notification.error .close-btn {
    color: #fff; /* لون متناسق مع الإشعار الأحمر */
}

.notification.info .close-btn {
    color: #fff; /* لون متناسق مع الإشعار الأزرق */
}

/* تعديلات للشاشات الصغيرة */
@media screen and (max-width: 600px) {
    .notification {
        width: 100%;
        max-width: 80vw;
        padding: 10px 12px;
        font-size: 12px;
        top: 10px;
        right: 10px;
    }

    .notification .close-btn {
        font-size: 12px;
        width: 18px;
        height: 18px;
        margin-left: 6px;
    }

    #notification-container {
        flex-direction: column; /* عرض الإشعارات عموديًا على الهواتف */
        align-items: flex-end;
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .notification {
        position: relative; /* تغيير إلى relative داخل الحاوية */
        right: 0 !important; /* إزالة الإزاحة الأفقية */
        transform: none; /* إزالة أنميشن التحريك الأفقي */
    }

    .sync-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 80px;
        border-radius: 3px;
    }
}

.sync-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#storeSelect {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
}

#syncButton {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#syncButton:hover {
    background-color: #45a049;
}

#loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 5px;
}

/* === Modern Customers Card & Table === */
.modern-customers-card {
    background: linear-gradient(120deg, #f8f9fa 60%, #e0ffe6 100%);
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(52, 195, 52, 0.10);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1.5px solid #e0e0e0;
    transition: box-shadow 0.3s;
}
.modern-customers-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.modern-customers-card h3 {
    color: #34C334;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
}
.modern-customers-card .sync-btn {
    background: #34C334;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1.1rem;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 195, 52, 0.08);
    cursor: pointer;
}
.modern-customers-card .sync-btn:hover {
    background: #2AA52A;
    box-shadow: 0 4px 12px rgba(52, 195, 52, 0.15);
    transform: translateY(-1px);
}
.modern-customers-card .sync-btn:disabled {
    background: #bbb !important;
    color: #fff !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.8;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    transition: box-shadow 0.2s;
}
.data-table th, .data-table td {
    padding: 0.9rem 0.7rem;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 1.05rem;
}
.data-table th {
    background: #f5f7fa;
    color: #34C435;
    font-weight: 700;
    border-top: 1.5px solid #34C435;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr {
    transition: background 0.2s;
}
.data-table tbody tr:hover {
    background: #f5f7fa;
}

/* === Pagination === */
.customers-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.2rem;
    user-select: none;
}
.customers-pagination .page-arrow {
    background: #fff;
    color: #34C334;
    border: 1.5px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(52, 195, 52, 0.07);
}
.customers-pagination .page-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.customers-pagination .page-num {
    background: #f5f7fa;
    color: #34C334;
    border: none;
    border-radius: 8px;
    min-width: 36px;
    height: 36px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin: 0 2px;
}
.customers-pagination .page-num.active, .customers-pagination .page-num:hover {
    background: #34C334;
    color: #fff;
}

/* === Animation for Table Fade+Slide === */
@keyframes fadeSlideIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-30px); }
}
.data-table tbody.animating-in {
    animation: fadeSlideIn 0.5s cubic-bezier(.39,.575,.56,1.000);
}
.data-table tbody.animating-out {
    animation: fadeSlideOut 0.4s cubic-bezier(.39,.575,.56,1.000);
}

@media (max-width: 700px) {
    .modern-customers-card {
        padding: 1rem 0.3rem;
    }
    .data-table th, .data-table td {
        padding: 0.5rem 0.2rem;
        font-size: 0.95rem;
    }
    .customers-pagination .page-arrow, .customers-pagination .page-num {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 1rem;
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .modern-customers-card {
        padding: 1.5rem 1rem 1rem 1rem;
        margin-bottom: 2rem;
    }
    
    .modern-customers-card .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .modern-customers-card .sync-container {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .modern-customers-card .sync-btn {
        width: 100%;
        margin-right: 0;
        margin-top: 0.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th, .data-table td {
        padding: 0.7rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .customers-pagination {
        gap: 0.2rem;
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .customers-pagination .page-arrow,
    .customers-pagination .page-num {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .modern-customers-card {
        padding: 1rem 0.8rem 0.8rem 0.8rem;
    }
    
    .data-table th, .data-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .customers-pagination .page-arrow,
    .customers-pagination .page-num {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        min-width: 28px;
    }
}

.user-profile .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(.39,.575,.56,1), transform 0.3s cubic-bezier(.39,.575,.56,1), visibility 0.3s;
    position: absolute;
    right: -50px;
    top: 110%;
    min-width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(52, 195, 52, 0.13);
    z-index: 100;
    padding: 0.7rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.user-profile .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .user-profile .dropdown-menu {
        min-width: 140px;
        right: -50px;
        left: auto;
        top: 110%;
        font-size: 0.97rem;
        padding: 0.5rem 0.3rem;
    }
}
@media (max-width: 480px) {
    .user-profile .dropdown-menu {
        min-width: 110px;
        right: -50px;
        font-size: 0.9rem;
        padding: 0.4rem 0.2rem;
    }
}

/* === Navbar Improvements === */
.user-profile .dropdown-arrow {
    transition: transform 0.3s cubic-bezier(.39,.575,.56,1);
    margin-right: 0.5rem;
}
.user-profile .dropdown-arrow.rotate {
    transform: rotate(180deg);
}
.user-profile:hover .dropdown-arrow {
    transform: translateY(2px);
}

/* === Navbar Layout === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.navbar-section {
    display: flex;
    align-items: center;
}

.navbar-left {
    flex-direction: row;
    gap: 1rem;
}

.navbar-right {
    flex-direction: row;
    gap: 0.7rem;
}

.logo {
    margin: 0 0.7rem;
}

@media (max-width: 992px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    .logo img {
        max-height: 35px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.7rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    .navbar-section {
        flex: 1 1 0;
        min-width: 0;
    }
    .navbar-left {
        order: 1;
        flex: 1 1 0;
        justify-content: flex-start;
        gap: 0.3rem;
    }
    .navbar-right {
        order: 3;
        flex: 1 1 0;
        justify-content: flex-end;
        gap: 0.3rem;
    }
    .logo {
        order: 2;
        flex: 0 0 auto;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .logo img {
        max-height: 30px;
    }
    .user-profile {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        min-width: 0;
        flex: 0 0 auto;
        position: static;
    }
    .user-profile .dropdown-arrow {
        display: none;
    }
    .user-profile .dropdown-menu {
        display: none;
    }
    .user-profile .user-avatar {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    .user-profile .user-avatar img,
    .user-profile .user-avatar svg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    #username-display {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
        flex-shrink: 1;
    }
    .menu-toggle {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        margin-left: 0;
        z-index: 1001;
    }
    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background-color: #34C435;
        margin: 2px 0;
        transition: all 0.3s ease;
    }
    .connect-store-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
}

.mobile-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}
.mobile-footer a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
    transition: color 0.3s, background 0.3s, transform 0.3s;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.mobile-footer a.footer-menu-toggle {
    color: #34C334;
    font-weight: bold;
    background: #e0ffe6;
    box-shadow: 0 2px 8px rgba(52, 195, 52, 0.07);
}

.mobile-footer a.footer-menu-toggle i {
    transition: transform 0.4s ease;
}

.mobile-footer a.footer-menu-toggle.active i {
    transform: rotate(135deg);
}
.mobile-footer a:hover,
.mobile-footer a.active {
    color: #34C334;
    background: #f5f7fa;
    transform: translateY(-5px);
}

.mobile-footer a:hover::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #34C334;
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
.mobile-footer i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    transition: transform 0.3s, color 0.3s;
}

.mobile-footer a:hover i {
    transform: scale(1.2);
    color: #34C334;
}

/* تأثير انيميشن للنص */
.mobile-footer a span {
    transition: all 0.3s ease;
    position: relative;
}

.mobile-footer a:hover span {
    font-weight: bold;
    letter-spacing: 0.5px;
}

.mobile-footer a:hover span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #34C334;
    bottom: -3px;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
    animation: underlineAnimation 0.5s forwards;
}

@keyframes underlineAnimation {
    to {
        transform: scaleX(1);
        transform-origin: bottom left;
    }
}

.mobile-footer a:active i {
    transform: scale(0.9);
}

/* تأثيرات إضافية للـ mobile-footer */
.mobile-footer {
    animation: slideUp 0.5s ease-in-out;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* تأثير ظل متحرك عند التحويم */
.mobile-footer a:hover {
    box-shadow: 0 -5px 15px rgba(52, 195, 52, 0.2);
}

/* تأثير دوران للأيقونات عند التحويم (باستثناء أيقونة القائمة) */
.mobile-footer a:not(.footer-menu-toggle):hover i {
    animation: spinIcon 0.6s ease;
}

@keyframes spinIcon {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* تأثير الموجة عند النقر */
.mobile-footer a {
    position: relative;
    overflow: hidden;
}

.mobile-footer a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(52, 195, 52, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.mobile-footer a:active::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}
@media (max-width: 480px) {
    .mobile-footer {
        padding: 0.6rem 0.8rem;
    }
    .mobile-footer a {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
    }
    .mobile-footer i {
        font-size: 1.1rem;
    }
}

.mobile-footer { display: none; }
@media (max-width: 768px) {
  .mobile-footer { display: flex; }
  /* إخفاء القائمة المنسدلة للبروفايل في وضع الشاشات الصغيرة */
  .user-profile:hover .dropdown-menu,
  .user-profile.active .dropdown-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

