.vn-wrapper {
    font-family: inherit;
    direction: rtl;
    /*max-width: 800px;*/
    max-width: 100%;
    margin: 0 auto;
}

/* Grid System */
.vn-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.vn-service-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.vn-service-card:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.vn-icon span {
    font-size: 32px;
    color: #555;
    width: 32px;
    height: 32px;
}

.vn-name {
    font-weight: bold;
    margin: 10px 0 5px;
    font-size: 14px;
}

.vn-price {
    font-size: 12px;
    color: #28a745;
}

/* Modal */
.vn-modal-overlay {
    position: fixed;
    top: 0; right: 0; left: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.vn-modal {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.vn-modal-header {
    background: #f1f1f1;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vn-modal-header h4 { margin: 0; }
.vn-close-btn { background: none; border: none; font-size: 24px; cursor: pointer; }

.vn-countries-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.vn-country-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.vn-buy-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.vn-buy-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dashboard */
.vn-order-dashboard {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.vn-order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: bold;
}

.vn-timer { color: #d63638; font-size: 18px; }

.vn-info-box, .vn-sms-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px dashed #ccc;
}

.vn-copy-row {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.vn-sms-box.received {
    background: #e7f6e7;
    border-color: #28a745;
    border-style: solid;
}

.vn-code-display {
    font-size: 32px;
    letter-spacing: 5px;
    font-weight: bold;
    color: #28a745;
    cursor: pointer;
}

.vn-cancel-btn { background: #d63638; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.vn-finish-btn { background: #28a745; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }

/* Spinner */
.vn-waiting-anim span {
    display: inline-block;
    width: 8px; height: 8px;
    background: #888;
    border-radius: 50%;
    margin: 0 2px;
    animation: blink 1.4s infinite both;
}
.vn-waiting-anim span:nth-child(2) { animation-delay: 0.2s; }
.vn-waiting-anim span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0% { opacity: 0.2; } 20% { opacity: 1; } 100% { opacity: 0.2; } }


/* Alert Box */
.vn-alert-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vn-alert-warning button {
    background: #856404;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

/* Modal Inputs */
.vn-input-text {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.center-text { text-align: center; letter-spacing: 5px; font-size: 18px; }

.vn-btn-primary { background: #0073aa; color: #fff; border: none; padding: 10px 20px; width: 100%; border-radius: 5px; cursor: pointer; }
.vn-btn-success { background: #28a745; color: #fff; border: none; padding: 10px 20px; width: 100%; border-radius: 5px; cursor: pointer; }
.vn-link-sm { font-size: 12px; color: #666; text-decoration: none; margin-top: 10px; display: block; text-align: center; }

.vn-modal-sm { max-width: 350px; }
.vn-modal-body { padding: 20px; }

/* Tabs Navigation */
.vn-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}
.vn-tabs button {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    color: #777;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}
.vn-tabs button.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}
.vn-tabs button span {
    font-size: 16px;
    vertical-align: middle;
}

/* History Table */
.vn-table-responsive {
    overflow-x: auto;
}
.vn-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}
.vn-history-table th {
    background: #f9f9f9;
    text-align: right;
    padding: 10px;
    border-bottom: 2px solid #eee;
    color: #555;
}
.vn-history-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}
.vn-history-table tr:hover {
    background: #fcfcfc;
}

/* Status Badges */
.vn-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
}
.vn-badge-success { background-color: #28a745; }
.vn-badge-warning { background-color: #ffc107; color: #333; }
.vn-badge-danger  { background-color: #dc3545; }
.vn-badge-gray    { background-color: #6c757d; }

.vn-code-badge {
    background: #e7f6e7;
    color: #28a745;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #c3e6cb;
}
.vn-date-col {
    font-size: 11px;
    color: #888;
}
.vn-empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.vn-service-img { width: 40px; height: 40px; object-fit: contain; }
.vn-flag-img { width: 24px; height: 16px; border-radius: 2px; margin-left: 8px; vertical-align: middle; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.vn-c-info { display: flex; align-items: center; }
.vn-c-meta { display: flex; align-items: center; gap: 10px; margin-left: 10px; margin-right: auto; }
.vn-count-badge { background: #eee; font-size: 11px; padding: 2px 6px; border-radius: 4px; color: #555; }
.vn-loading-modal { padding: 40px; text-align: center; color: #666; }

/* استایل وقتی موجودی تمام شده است */
.vn-count-badge.vn-zero-stock {
    background-color: #ffe6e6;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

/* استایل رادیو باتن‌های فیلتر */
.vn-sort-radios {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    flex-wrap: wrap; /* برای موبایل */
}

.vn-radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.vn-radio-label:hover {
    background-color: #f0f0f1;
}

/* استایل حالت انتخاب شده (Active) */
.vn-radio-label.active {
    background-color: #e6f7ff;
    color: #0073aa;
    font-weight: 500;
}

.vn-radio-label input[type="radio"] {
    margin: 0; /* حذف مارجین پیش‌فرض وردپرس */
}

/* استایل‌های جدید جدول تاریخچه */
.vn-history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.vn-h-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.2;
}

.vn-tiny-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.vn-tiny-flag {
    width: 16px;
    height: 11px; /* نسبت استاندارد پرچم */
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.vn-text-muted {
    color: #777;
    font-size: 11px;
}

/* استایل قابلیت کلیک و کپی */
.vn-td-copy {
    cursor: pointer;
    transition: color 0.2s;
    font-family: monospace; /* فونت مناسب برای اعداد */
    font-size: 13px;
}

.vn-td-copy:hover {
    color: #2271b1;
    background-color: #f0f6fc;
}

.vn-code-badge.clickable {
    cursor: pointer;
    transition: transform 0.1s;
}

.vn-code-badge.clickable:active {
    transform: scale(0.95);
}

.vn-code-badge.clickable:hover {
    background-color: #444;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Custom Template Styles --- */
body.vn-app-body {
    background-color: #f4f6f9 !important; /* رنگ زمینه کل صفحه */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* هدر */
.vn-custom-header {
    background: var(--vn-header-bg, #fff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
    height: 70px;
    display: flex;
    align-items: center;
}
.vn-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vn-header-brand img { height: 40px; width: auto; }
.vn-site-title { font-weight: bold; font-size: 18px; color: #333; }

/* منو دسکتاپ */
.vn-header-nav ul.vn-nav-ul {
    display: flex; gap: 20px; list-style: none; margin: 0; padding: 0;
}
.vn-header-nav ul.vn-nav-ul li a {
    text-decoration: none; color: #555; font-weight: 500; font-size: 14px;
}
.vn-header-nav ul.vn-nav-ul li a:hover { color: #2271b1; }

/* بخش کاربری */
.vn-header-actions { display: flex; align-items: center; gap: 15px; }
.vn-mini-wallet {
    background: #e6f7ff; color: #2271b1; padding: 5px 12px;
    border-radius: 20px; font-size: 13px; font-weight: bold;
    display: flex; align-items: center; gap: 5px;
}
.vn-user-trigger {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.vn-user-trigger img { border-radius: 50%; }
.vn-user-dropdown { position: relative; }
.vn-dropdown-menu {
    position: absolute; top: 100%; left: 0; background: #fff;
    border: 1px solid #eee; border-radius: 8px; width: 150px;
    display: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    list-style: none; padding: 10px 0; margin: 0;
}
.vn-user-dropdown:hover .vn-dropdown-menu { display: block; }
.vn-dropdown-menu li a {
    display: block; padding: 8px 15px; text-decoration: none; color: #333; font-size: 13px;
}
.vn-dropdown-menu li a:hover { background: #f5f5f5; }

/* دکمه‌های ورود */
.vn-btn-primary { background: #2271b1; color: #fff; padding: 8px 20px; border-radius: 5px; text-decoration: none; font-size: 13px; }
.vn-btn-outline { border: 1px solid #ddd; color: #555; padding: 8px 15px; border-radius: 5px; text-decoration: none; font-size: 13px; }

/* محتوای اصلی */
.vn-main-content { flex: 1; padding: 40px 20px; width: 100%; box-sizing: border-box; }
.vn-container-boxed { max-width: 1200px; margin: 0 auto; }
.vn-container-full { max-width: 100%; }
/* --- استایل دشبورد (کارت سفید وسط صفحه) --- */

/* فقط زمانی که کلاس vn-container-boxed دارد (یعنی حالت باکس شده است) */
.vn-app-body .vn-main-content.vn-container-boxed {
    background-color: #ffffff;   /* پس‌زمینه سفید */
    border-radius: 20px;         /* گوشه‌های گرد مدرن */
    box-shadow: 0 15px 50px rgba(0,0,0,0.04); /* سایه بسیار نرم و عمیق */

    /* فاصله‌ها */
    margin-top: 40px;            /* فاصله از هدر */
    margin-bottom: 40px;         /* فاصله از فوتر */
    padding: 40px;               /* فضای داخلی زیاد برای تنفس محتوا */

    /* خط دور ظریف */
    border: 1px solid #f0f2f5;

    /* حفظ ساختار فلکس */
    width: calc(100% - 40px);    /* جلوگیری از اسکرول افقی در برخی مرورگرها */
    max-width: 1200px;
    align-self: center;          /* وسط‌چین کردن در فلکس پدر */
}

/* اصلاح ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .vn-app-body .vn-main-content.vn-container-boxed {
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 20px;       /* در موبایل پدینگ کمتر شود */
        border-radius: 12px; /* گردی گوشه‌ها کمتر شود */
        width: 95%;          /* عرض تقریبا کامل */
    }
}
/* فوتر */
.vn-custom-footer {
    background: #fff; border-top: 1px solid #eee; padding: 20px; text-align: center; color: #777; font-size: 13px; margin-top: auto;
}

/* موبایل */
.vn-mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
.vn-mobile-drawer {
    position: fixed; top: 0; right: -280px; width: 260px; height: 100%;
    background: #fff; z-index: 1000; transition: 0.3s; padding: 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}
.vn-menu-open .vn-mobile-drawer { right: 0; }
.vn-mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 999; display: none;
}
.vn-menu-open .vn-mobile-menu-overlay { display: block; }
.vn-mobile-ul { list-style: none; padding: 0; margin-top: 40px; }
.vn-mobile-ul li { border-bottom: 1px solid #eee; }
.vn-mobile-ul li a { display: block; padding: 12px 0; text-decoration: none; color: #333; }

@media (max-width: 768px) {
    .vn-header-nav { display: none; }
    .vn-mobile-toggle { display: block; }
    .vn-username { display: none; }
}

/* استایل ابزارک‌های فوتر */
.vn-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: right;
    padding-bottom: 20px;
}
.vn-footer-widget h4.vn-widget-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #e6f7ff;
    display: inline-block;
    padding-bottom: 5px;
}
.vn-footer-widget ul {
    list-style: none; padding: 0; margin: 0;
}
.vn-footer-widget ul li {
    padding: 5px 0; border-bottom: 1px dashed #eee;
}
.vn-footer-widget ul li a {
    text-decoration: none; color: #666; font-size: 13px;
}
.vn-copy-bar {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

/* --- استایل جدول قیمت شورتکد --- */
.vn-pricing-wrap { margin: 20px 0; font-family: inherit; }
.vn-pricing-wrap h3 { margin-bottom: 20px; font-size: 20px; border-right: 4px solid #2271b1; padding-right: 10px; }

.vn-pricing-grid {
    display: grid;
    gap: 15px;
}
.vn-pricing-grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.vn-price-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 15px;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.vn-price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #2271b1;
}

.vn-pc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.vn-pc-flag { width: 24px; height: 18px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.vn-pc-name { font-weight: bold; font-size: 14px; color: #333; }

.vn-pc-body { margin-bottom: 15px; text-align: center; }
.vn-pc-price { font-size: 18px; font-weight: 800; color: #2271b1; }
.vn-pc-price small { font-size: 12px; font-weight: normal; color: #777; }
.vn-pc-stock { font-size: 12px; color: #00a32a; margin-top: 5px; background: #e6ffed; display: inline-block; padding: 2px 8px; border-radius: 10px; }

.vn-pc-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #2271b1;
    color: #fff !important;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    transition: 0.2s;
}
.vn-pc-btn:hover { background: #135e96; box-shadow: 0 4px 10px rgba(34, 113, 177, 0.3); }

@media (max-width: 600px) {
    .vn-pricing-grid { grid-template-columns: 1fr 1fr; } /* موبایل دو ستونه */
}