/* حل ریشه‌ای مشکل عریض شدن صفحه در موبایل */
.aft-premium-wrapper,
.aft-premium-wrapper *,
.aft-premium-wrapper *::before,
.aft-premium-wrapper *::after {
    box-sizing: border-box !important;
}

.aft-premium-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0;
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.06);
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eef2f7;
    direction: rtl;
    font-family: inherit;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.aft-premium-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(17, 24, 39, 0.1);
}

.aft-premium-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    text-align: right;
    background: #f8faff;
}

/* استایل هدر پریمیوم */
.aft-premium-table th {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 20px 24px;
    font-size: 15px;
    letter-spacing: -0.02em;
    border: none;
}

/* استایل بدنه و خطوط جداکننده */
.aft-premium-table td {
    padding: 20px 24px;
    color: #64748b;
    background-color: #ffffff;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
    transition: background-color 0.25s ease;
    word-break: break-word; /* جلوگیری از عریض شدن سلول با متن‌های طولانی */
}

.aft-premium-table tr:last-child td {
    border-bottom: none;
}

.aft-premium-table tr:hover td {
    background-color: #f8faff;
}

/* قوانین اختصاصی برای ستون‌های خاص */
.aft-premium-table td.aft-col-bold {
    font-weight: 700;
    color: #111827;
}

.aft-premium-table td.aft-col-accent {
    color: #7c3aed;
    font-weight: 500;
}

/* طراحی مدرن بج وضعیت (Status Badge) */
.aft-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    max-width: 100%;
}

/* =======================================================
   طراحی ۱۰۰٪ فیت موبایل: جلوگیری از هرگونه اسکرول افقی
   ======================================================= */
@media screen and (max-width: 991px) {
    
    .aft-premium-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: hidden !important; /* قفل اسکرول بیرونی */
        margin: 15px 0 !important;
        padding: 0 !important;
    }
    
    .aft-premium-wrapper:hover {
        transform: none !important;
    }

    .aft-premium-table, 
    .aft-premium-table thead, 
    .aft-premium-table tbody, 
    .aft-premium-table th, 
    .aft-premium-table td, 
    .aft-premium-table tr { 
        display: block !important; 
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* حذف هدر جدول در موبایل */
    .aft-premium-table thead tr { 
        display: none !important;
    }
    
    /* کارت‌های گلس‌مورفیسم فیت موبایل */
    .aft-premium-table tr { 
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(238, 242, 247, 0.8) !important;
        border-radius: 20px !important;
        box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04) !important;
        margin-bottom: 16px !important;
        padding: 16px 20px !important;
        position: relative !important;
        overflow: hidden !important;
        transition: transform 0.3s ease !important;
    }
    
    .aft-premium-table tr:hover {
        transform: translateY(-2px) !important;
    }

    /* المان دکوراتیو گوشه کارت */
    .aft-premium-table tr::before {
        content: "" !important;
        position: absolute !important;
        top: -30px !important;
        left: -30px !important;
        width: 80px !important;
        height: 80px !important;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%) !important;
        border-radius: 50% !important;
        z-index: 0 !important;
        pointer-events: none !important;
    }
    
    /* سلول‌های موبایل با لایه‌بندی فلکس و کنترل فاصله‌ها */
    .aft-premium-table td { 
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 15px !important; /* ایجاد فاصله ایمن بین لیبل و مقدار */
        border-bottom: 1px dashed #eef2f7 !important; 
        padding: 12px 0 !important;
        background: transparent !important;
        z-index: 1 !important;
        position: relative !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    .aft-premium-table td:last-child {
        border-bottom: none !important;
    }
    
    /* عناوین ستون‌ها در سمت راست کارت */
    .aft-premium-table td::before { 
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #64748b !important;
        font-size: 13px !important;
        flex-shrink: 0 !important; /* جلوگیری از فشرده شدن عنوان */
        max-width: 45% !important;
        text-align: right !important;
    }

    .aft-premium-table td.aft-col-bold {
        color: #111827 !important;
    }
    
    /* بج وضعیت در انتهای کارت */
    .aft-premium-table td:has(.aft-status-badge) {
        flex-direction: column !important;
        align-items: stretch !important;
        margin-top: 8px !important;
        padding-bottom: 0 !important;
    }

    .aft-premium-table td:has(.aft-status-badge)::before {
        margin-bottom: 6px !important;
        max-width: 100% !important;
    }

    .aft-status-badge {
        width: 100% !important;
        padding: 10px 0 !important;
        border-radius: 12px !important;
        font-size: 13px !important;
    }
}