/**
 * استایل‌های بخش عمومی
 *
 * @package    Negaresh
 * @subpackage Negaresh/public/css
 */

/* ========================================
   استایل برای SVG آیکون‌ها
   ======================================== */

.negaresh-user-dashboard svg,
.negaresh-generator-container svg {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========================================
   پس‌زمینه کلی صفحه
   ======================================== */

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ========================================
   فونت فارسی
   ======================================== */

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
    font-display: swap;
}

/* اعمال فونت به تمام المنت‌های نگارش */
[class*="negaresh"],
[class*="negaresh"] *,
.negaresh-generator-container,
.negaresh-generator-container *,
.negaresh-user-dashboard,
.negaresh-user-dashboard *,
.negaresh-login-required,
.negaresh-login-required *,
.negaresh-modal,
.negaresh-modal *,
.negaresh-notification,
.negaresh-loading,
.negaresh-loading * {
    font-family: 'IRANSansX', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* ========================================
   رفع محدودیت عرض برای صفحات نگارش
   ======================================== */

/* حذف محدودیت max-width از is-layout-constrained فقط در صفحات نگارش */
.negaresh-user-dashboard .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.negaresh-generator-container .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.negaresh-user-dashboard.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.negaresh-generator-container.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}

/* حذف محدودیت عرض از container های اصلی نگارش */
.negaresh-user-dashboard,
.negaresh-generator-container {
    max-width: 100% !important;
    width: 100% !important;
}

/* ریسپانسیو کامل برای صفحات نگارش */
@media (min-width: 1400px) {
    .negaresh-user-dashboard,
    .negaresh-generator-container {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .negaresh-user-dashboard,
    .negaresh-generator-container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .negaresh-user-dashboard,
    .negaresh-generator-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .negaresh-user-dashboard,
    .negaresh-generator-container {
        padding: 0 10px;
    }
}

/* ========================================
   انتخاب نوع محتوا
   ======================================== */

.content-type-selector {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

.content-type-selector h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تایتل اصلی صفحه */
.negaresh-page-title {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.negaresh-page-title h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.negaresh-page-title p {
    font-size: 16px;
    color: #666;
    margin: 10px 0 0 0;
}

.content-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.content-type-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255,255,255,0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'IRANSansX', sans-serif !important;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-width: 160px;
    justify-content: center;
}

.content-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.content-type-btn:hover::before {
    left: 100%;
}

.content-type-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.content-type-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.content-type-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ========================================
   فرم‌های محتوا
   ======================================== */

.content-form {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
}

.content-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* انیمیشن برای loading */
.negaresh-loading {
    animation: pulse 2s infinite;
}

.negaresh-loading .dashicons {
    animation: bounce 1s infinite;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .content-type-options {
        grid-template-columns: 1fr;
    }
}

/* فونت برای فرم‌ها و اینپوت‌ها */
.negaresh-generator-form input,
.negaresh-generator-form select,
.negaresh-generator-form textarea,
.negaresh-generator-form button,
.negaresh-generator-form label,
.form-group input,
.form-group select,
.form-group textarea {
    font-family: 'IRANSansX', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* فونت برای جداول */
.history-table,
.history-table *,
.dashboard-stats,
.dashboard-stats * {
    font-family: 'IRANSansX', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* ========================================
   متغیرهای رنگ
   ======================================== */

:root {
    --negaresh-primary: #667eea;
    --negaresh-secondary: #764ba2;
    --negaresh-success: #10b981;
    --negaresh-warning: #f59e0b;
    --negaresh-error: #ef4444;
    --negaresh-text: #1f2937;
    --negaresh-gray: #6b7280;
    --negaresh-light: #f9fafb;
    --negaresh-border: #e5e7eb;
}

/* ========================================
   ورود مورد نیاز
   ======================================== */

.negaresh-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
}

.negaresh-login-required p {
    font-size: 18px;
    color: var(--negaresh-gray);
    margin-bottom: 20px;
}

/* ========================================
   داشبورد کاربر
   ======================================== */

.negaresh-user-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    font-family: 'IRANSansX', sans-serif;
}

/* هدر داشبورد */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.welcome-section p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.quick-actions {
    display: flex;
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-action-btn.primary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.quick-action-btn.primary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.quick-action-btn.secondary {
    background: #fff;
    color: #667eea;
}

.quick-action-btn.secondary:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
}

/* آمار کلی */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.stat-card.highlight::before {
    background: rgba(255,255,255,0.3);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
}

.stat-card.highlight .stat-icon {
    background: rgba(255,255,255,0.2);
}

.stat-icon .dashicons {
    font-size: 24px;
    color: #667eea;
}

.stat-card.highlight .stat-icon .dashicons {
    color: #fff;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.stat-card.highlight .stat-info h3 {
    color: #fff;
}

.stat-info p {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.stat-card.highlight .stat-info p {
    color: rgba(255,255,255,0.9);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #28a745;
}

.stat-card.highlight .stat-trend {
    color: rgba(255,255,255,0.8);
}

/* نمودار مصرف */
.usage-chart-container {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.chart-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-btn {
    padding: 8px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
}

.chart-btn.active,
.chart-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.chart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.chart-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.detail-label {
    font-size: 14px;
    color: #666;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* هدر بخش‌ها */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-controls select,
.filter-controls input {
    padding: 8px 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 14px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
}

.action-btn:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

.action-btn.primary {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.action-btn.primary:hover {
    background: #5a6fd8;
}

.action-btn.danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

.action-btn.danger:hover {
    background: #dc3545;
    color: #fff;
}

/* تنظیمات حساب */
.account-settings-section {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-card {
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.setting-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.setting-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.edit-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #667eea;
}

.edit-btn:hover {
    background: #667eea;
    color: #fff;
}

.setting-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-item .label {
    font-size: 14px;
    color: #666;
}

.info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
}

.toggle-item input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

.toggle-item input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.select-item label {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.select-item select {
    padding: 6px 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* دکمه مشاهده محتوا */
.view-content-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-content-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
}

.view-content-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Modal بهبود یافته */
.negaresh-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    margin: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    margin: 0;
}

.modal-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.modal-loading .dashicons {
    font-size: 24px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.modal-text-content {
    margin-bottom: 20px;
}

.modal-text-content pre {
    font-family: 'IRANSansX', sans-serif;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.modal-image-content {
    text-align: center;
    margin-bottom: 20px;
}

.modal-image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
}

.modal-content-info {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: #666;
}

.info-row .value {
    color: #2c3e50;
    font-weight: 500;
}

.modal-footer {
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-footer .button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.modal-footer .button::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;
}

.modal-footer .button:hover::before {
    left: 100%;
}

.modal-footer .button:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal-footer .button:first-child:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modal-footer .button:last-child {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.modal-footer .button:last-child:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.modal-footer .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* اطلاع‌رسانی‌ها */
.negaresh-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 300px;
}

.negaresh-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.negaresh-notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.negaresh-notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.negaresh-notification.warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.negaresh-notification.info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
}

/* ========================================
   کانتینر اصلی تولید محتوا
   ======================================== */

.negaresh-generator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.negaresh-generator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.negaresh-generator-container > * {
    position: relative;
    z-index: 2;
}

/* نوار بالای صفحه */
.negaresh-user-info-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.negaresh-user-info-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%); }
    50% { transform: translateX(0%) translateY(0%); }
}

.user-welcome h2 {
    margin: 0;
    font-size: 28px;
}

.user-welcome p {
    margin: 5px 0 0;
    opacity: 0.9;
}

.user-balance {
    text-align: left;
}

.balance-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
}

.balance-value {
    font-size: 32px;
    font-weight: bold;
    margin: 0 5px;
}

.balance-unit {
    font-size: 16px;
}

.balance-warning {
    margin-top: 10px;
    background: rgba(239, 68, 68, 0.2);
    padding: 10px 15px;
    border-radius: 6px;
}

.balance-warning a {
    color: #fff;
    text-decoration: underline;
}

/* ========================================
   فرم تولید محتوا
   ======================================== */

.negaresh-generator-form {
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

/* تب‌ها */
.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--negaresh-border);
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    cursor: pointer;
    color: var(--negaresh-gray);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--negaresh-primary);
}

.tab-button.active {
    color: var(--negaresh-primary);
    border-bottom-color: var(--negaresh-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* فیلدهای فرم */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.field-description {
    font-size: 12px;
    color: var(--negaresh-gray);
    margin-top: 5px;
}

/* اسلایدر */
.form-group input[type="range"] {
    width: calc(100% - 60px);
    margin-left: 10px;
}

.range-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: var(--negaresh-primary);
}

/* ردیف فرم */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* دکمه‌های عملیات */
.form-actions {
    margin-top: 30px;
}

.button-large {
    padding: 18px 40px !important;
    font-size: 16px !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

.button-large::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;
}

.button-large:hover::before {
    left: 100%;
}

.button-large:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

/* ========================================
   نمایش نتیجه
   ======================================== */

.negaresh-result-container {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--negaresh-border);
}

.result-header h3 {
    margin: 0;
    font-size: 22px;
}

.result-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    font-size: 14px;
    color: var(--negaresh-gray);
}

.stat-item strong {
    color: var(--negaresh-text);
}

.result-content {
    background: var(--negaresh-light);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.8;
    min-height: 200px;
}

/* استایل‌های HTML برای محتوای تولید شده */
.result-content h2 {
    color: var(--negaresh-primary);
    font-size: 24px;
    margin: 20px 0 15px 0;
    font-weight: 600;
    border-bottom: 2px solid var(--negaresh-primary);
    padding-bottom: 8px;
}

.result-content h3 {
    color: var(--negaresh-secondary);
    font-size: 20px;
    margin: 18px 0 12px 0;
    font-weight: 600;
}

.result-content h4 {
    color: var(--negaresh-text);
    font-size: 18px;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.result-content h5 {
    color: var(--negaresh-text);
    font-size: 16px;
    margin: 12px 0 8px 0;
    font-weight: 600;
}

.result-content h6 {
    color: var(--negaresh-gray);
    font-size: 14px;
    margin: 10px 0 6px 0;
    font-weight: 600;
}

.result-content p {
    margin: 12px 0;
    text-align: justify;
}

.result-content ul, .result-content ol {
    margin: 15px 0;
    padding-right: 25px;
}

.result-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.result-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-content th {
    background: var(--negaresh-primary);
    color: white;
    padding: 12px;
    text-align: right;
    font-weight: 600;
}

.result-content td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.result-content tr:nth-child(even) {
    background: #f8f9fa;
}

.result-content blockquote {
    border-right: 4px solid var(--negaresh-primary);
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--negaresh-text);
}

.result-content strong, .result-content b {
    font-weight: 600;
    color: var(--negaresh-primary);
}

.result-content em, .result-content i {
    font-style: italic;
    color: var(--negaresh-secondary);
}

.result-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--negaresh-primary), var(--negaresh-secondary));
    margin: 30px 0;
    border-radius: 1px;
}

/* استایل‌های HTML برای modal content */
.modal-text-content h2 {
    color: var(--negaresh-primary);
    font-size: 22px;
    margin: 18px 0 12px 0;
    font-weight: 600;
    border-bottom: 2px solid var(--negaresh-primary);
    padding-bottom: 6px;
}

.modal-text-content h3 {
    color: var(--negaresh-secondary);
    font-size: 18px;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.modal-text-content h4 {
    color: var(--negaresh-text);
    font-size: 16px;
    margin: 12px 0 8px 0;
    font-weight: 600;
}

.modal-text-content h5 {
    color: var(--negaresh-text);
    font-size: 14px;
    margin: 10px 0 6px 0;
    font-weight: 600;
}

.modal-text-content h6 {
    color: var(--negaresh-gray);
    font-size: 12px;
    margin: 8px 0 4px 0;
    font-weight: 600;
}

.modal-text-content p {
    margin: 10px 0;
    text-align: justify;
}

.modal-text-content ul, .modal-text-content ol {
    margin: 12px 0;
    padding-right: 20px;
}

.modal-text-content li {
    margin: 6px 0;
    line-height: 1.5;
}

.modal-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.modal-text-content th {
    background: var(--negaresh-primary);
    color: white;
    padding: 10px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}

.modal-text-content td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: right;
    font-size: 14px;
}

.modal-text-content tr:nth-child(even) {
    background: #f8f9fa;
}

.modal-text-content blockquote {
    border-right: 3px solid var(--negaresh-primary);
    background: #f8f9fa;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--negaresh-text);
}

.modal-text-content strong, .modal-text-content b {
    font-weight: 600;
    color: var(--negaresh-primary);
}

.modal-text-content em, .modal-text-content i {
    font-style: italic;
    color: var(--negaresh-secondary);
}

.modal-text-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, var(--negaresh-primary), var(--negaresh-secondary));
    margin: 20px 0;
    border-radius: 1px;
}

.result-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.result-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-buttons .button {
    font-size: 14px;
    padding: 8px 16px;
}

.copy-buttons .button-primary {
    background: var(--negaresh-primary);
    color: white;
    border-color: var(--negaresh-primary);
}

.copy-buttons .button-primary:hover {
    background: var(--negaresh-secondary);
    border-color: var(--negaresh-secondary);
}

/* نسخه‌های قبلی */
.versions-container {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--negaresh-border);
}

.version-item {
    background: var(--negaresh-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-right: 4px solid var(--negaresh-primary);
}

.version-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.version-number {
    font-weight: bold;
    color: var(--negaresh-primary);
}

.version-date {
    font-size: 12px;
    color: var(--negaresh-gray);
}

.version-content {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    line-height: 1.6;
}

/* ========================================
   لودینگ
   ======================================== */

.negaresh-loading {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--negaresh-light);
    border-top-color: var(--negaresh-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.negaresh-loading .loading-text {
    font-size: 16px;
    color: var(--negaresh-gray);
    margin-bottom: 20px;
    line-height: 1.5;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--negaresh-primary), var(--negaresh-secondary));
    border-radius: 2px;
    animation: progressMove 2s ease-in-out infinite;
}

@keyframes progressMove {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   داشبورد کاربر
   ======================================== */

.negaresh-user-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.negaresh-user-dashboard h1 {
    font-size: 32px;
    margin-bottom: 30px;
}

/* آمار کلی */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--negaresh-primary) 0%, var(--negaresh-secondary) 100%);
    color: #fff;
}

.stat-card.highlight .stat-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card.highlight .dashicons {
    color: #fff;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--negaresh-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .dashicons {
    color: var(--negaresh-primary);
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.stat-info h3 {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
}

.stat-info p {
    margin: 5px 0 0;
    font-size: 14px;
    opacity: 0.8;
}

/* نمودار مصرف */
.usage-chart-container {
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.usage-chart-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.usage-chart .chart-bar {
    width: 100%;
    height: 50px;
    background: var(--negaresh-light);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 15px;
}

.usage-chart .bar-used {
    height: 100%;
    background: linear-gradient(90deg, var(--negaresh-primary) 0%, var(--negaresh-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    transition: width 0.5s ease;
}

.chart-legend {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.used {
    background: var(--negaresh-primary);
}

.legend-color.remaining {
    background: var(--negaresh-light);
    border: 2px solid var(--negaresh-border);
}

/* توکن‌های فعال */
.active-tokens-section {
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.active-tokens-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.token-card {
    background: var(--negaresh-light);
    border: 1px solid var(--negaresh-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

/* بسته فعال - نمایش برجسته */
.token-card.active-token {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.15);
    transform: scale(1.02);
}

.token-card.active-token .token-header {
    border-bottom: 2px solid #0284c7;
    padding-bottom: 10px;
}

/* بسته رزرو شده - نمایش ملایم‌تر */
.token-card.reserved-token {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    opacity: 0.85;
}

.token-card.reserved-token:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* بسته هدیه - طراحی ویژه */
.token-card.gift-token {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    position: relative;
    overflow: hidden;
}

.token-card.gift-token::before {
    content: '🎁';
    position: absolute;
    top: -15px;
    left: -15px;
    font-size: 60px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.token-card.gift-token.active-token {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.token-card.gift-token .token-header {
    border-bottom: 2px solid #f59e0b;
}

.token-card.gift-token.reserved-token {
    opacity: 0.9;
}

/* دکمه فعال‌سازی بسته */
.token-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--negaresh-border);
}

.activate-token-btn {
    width: 100%;
    padding: 10px 15px;
    background: var(--negaresh-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.activate-token-btn:hover {
    background: var(--negaresh-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.activate-token-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.activate-token-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.token-header h3 {
    margin: 0;
    font-size: 18px;
}

.token-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.token-status.active {
    background: #dbeafe;
    color: #075985;
    border: 1px solid #0284c7;
}

.token-status.reserved {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.token-progress {
    margin-bottom: 15px;
}

.token-progress .progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.token-progress .progress-fill {
    height: 100%;
    background: var(--negaresh-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    /* بدون animation - فقط برای نمایش میزان مصرف */
}

/* اطمینان از عدم animation برای progress bar های dashboard */
.dashboard-progress .progress-fill,
.token-progress .progress-fill,
.user-dashboard .progress-fill {
    animation: none !important;
    transform: none !important;
}

.progress-text {
    font-size: 13px;
    color: var(--negaresh-gray);
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--negaresh-gray);
}

/* تاریخچه محتوا */
.content-history-section {
    background: #fff;
    border: 1px solid var(--negaresh-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.content-history-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--negaresh-border);
}

.history-table th {
    background: var(--negaresh-light);
    font-weight: 600;
    color: var(--negaresh-text);
}

.history-table tbody tr:hover {
    background: var(--negaresh-light);
}

.content-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.content-type.text {
    background: #dbeafe;
    color: #1e40af;
}

.content-type.image {
    background: #fce7f3;
    color: #9f1239;
}

.version-badge {
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
}

/* عملیات داشبورد */
.dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-hero {
    padding: 20px 40px !important;
    font-size: 18px !important;
}

/* Modal */
.negaresh-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    max-width: 800px;
    margin: 50px auto;
    border-radius: 12px;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--negaresh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--negaresh-gray);
    line-height: 1;
}

.modal-close:hover {
    color: var(--negaresh-text);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--negaresh-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========================================
   نوتیفیکیشن
   ======================================== */

.negaresh-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.negaresh-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.negaresh-notification.notification-success {
    background: var(--negaresh-success);
    color: #fff;
}

.negaresh-notification.notification-error {
    background: var(--negaresh-error);
    color: #fff;
}

.negaresh-notification.notification-warning {
    background: var(--negaresh-warning);
    color: #fff;
}

.negaresh-notification.notification-info {
    background: var(--negaresh-primary);
    color: #fff;
}

/* ========================================
   پیام‌های خالی بودن
   ======================================== */

.no-tokens,
.no-history {
    text-align: center;
    padding: 60px 20px;
    background: var(--negaresh-light);
    border-radius: 8px;
}

.no-tokens p,
.no-history p {
    font-size: 16px;
    color: var(--negaresh-gray);
    margin-bottom: 20px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .negaresh-user-info-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .user-balance {
        text-align: center;
    }
    
    .dashboard-stats,
    .tokens-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px;
    }
}

/* Pagination Styles */
.history-pagination {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.pagination-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.pagination-btn.active:hover {
    background: #005a87;
    border-color: #005a87;
}

.pagination-btn.prev,
.pagination-btn.next {
    font-weight: 500;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .history-pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Settings Link Button */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.link-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.link-btn.danger {
    background: #fff5f5;
    border-color: #feb2b2;
    color: #c53030;
}

.link-btn.danger:hover {
    background: #fed7d7;
    border-color: #fc8181;
    color: #991b1b;
}

/* Dark Theme Styles */
body.negaresh-dark-theme {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%) !important;
}

body.negaresh-dark-theme .negaresh-user-dashboard,
body.negaresh-dark-theme .negaresh-generator-container {
    background: transparent !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .stat-card,
body.negaresh-dark-theme .setting-card,
body.negaresh-dark-theme .token-card,
body.negaresh-dark-theme .section-header,
body.negaresh-dark-theme .dashboard-header {
    background: rgba(26, 30, 40, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .stat-card:hover,
body.negaresh-dark-theme .setting-card:hover,
body.negaresh-dark-theme .token-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

/* بسته فعال در تم تاریک */
body.negaresh-dark-theme .token-card.active-token {
    background: linear-gradient(135deg, rgba(15, 118, 203, 0.15) 0%, rgba(15, 118, 203, 0.1) 100%) !important;
    border-color: #0f76cb !important;
    box-shadow: 0 4px 20px rgba(15, 118, 203, 0.25) !important;
}

body.negaresh-dark-theme .token-card.active-token .token-header {
    border-bottom-color: #0f76cb !important;
}

/* بسته رزرو شده در تم تاریک */
body.negaresh-dark-theme .token-card.reserved-token {
    background: rgba(35, 45, 60, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.15) !important;
    opacity: 0.7;
}

body.negaresh-dark-theme .token-card.reserved-token:hover {
    opacity: 0.9;
}

/* وضعیت‌ها در تم تاریک */
body.negaresh-dark-theme .token-status.active {
    background: rgba(15, 118, 203, 0.3) !important;
    color: #5db3f0 !important;
    border-color: #0f76cb !important;
}

body.negaresh-dark-theme .token-status.reserved {
    background: rgba(60, 60, 60, 0.3) !important;
    color: #9ca3af !important;
    border-color: #4b5563 !important;
}

/* بسته هدیه در تم تاریک */
body.negaresh-dark-theme .token-card.gift-token {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%) !important;
    border-color: #f59e0b !important;
}

body.negaresh-dark-theme .token-card.gift-token.active-token {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25) !important;
}

body.negaresh-dark-theme .token-card.gift-token .token-header {
    border-bottom-color: #f59e0b !important;
}

body.negaresh-dark-theme h1,
body.negaresh-dark-theme h2,
body.negaresh-dark-theme h3,
body.negaresh-dark-theme .section-header h2 {
    color: #ffffff !important;
}

body.negaresh-dark-theme p,
body.negaresh-dark-theme .info-item,
body.negaresh-dark-theme .label,
body.negaresh-dark-theme .value {
    color: #e8eaed !important;
}

body.negaresh-dark-theme .quick-action-btn {
    background: rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

body.negaresh-dark-theme .quick-action-btn:hover {
    background: rgba(102, 126, 234, 0.4) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
}

body.negaresh-dark-theme .history-table {
    background: rgba(26, 30, 40, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

body.negaresh-dark-theme .history-table th {
    background: rgba(22, 27, 37, 0.95) !important;
    color: #ffffff !important;
}

body.negaresh-dark-theme .history-table td {
    border-color: rgba(102, 126, 234, 0.1) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .history-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

body.negaresh-dark-theme .view-content-btn {
    background: rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

body.negaresh-dark-theme .view-content-btn:hover {
    background: rgba(102, 126, 234, 0.4) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
}

body.negaresh-dark-theme .pagination-btn {
    background: rgba(26, 30, 40, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .pagination-btn:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #ffffff !important;
}

body.negaresh-dark-theme .pagination-btn.active {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #ffffff !important;
}

body.negaresh-dark-theme select,
body.negaresh-dark-theme input[type="text"],
body.negaresh-dark-theme input[type="email"],
body.negaresh-dark-theme textarea {
    background: rgba(26, 30, 40, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme select:focus,
body.negaresh-dark-theme input[type="text"]:focus,
body.negaresh-dark-theme input[type="email"]:focus,
body.negaresh-dark-theme textarea:focus {
    border-color: #667eea !important;
    outline: none;
}

body.negaresh-dark-theme .negaresh-modal .modal-content {
    background: rgba(26, 30, 40, 0.98) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .modal-header {
    background: rgba(22, 27, 37, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

body.negaresh-dark-theme .modal-header h3 {
    color: #ffffff !important;
}

body.negaresh-dark-theme .modal-body pre {
    background: rgba(22, 27, 37, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
    color: #e8eaed !important;
}

body.negaresh-dark-theme .modal-body,
body.negaresh-dark-theme .modal-footer {
    color: #e8eaed !important;
}

body.negaresh-dark-theme .history-pagination {
    background: rgba(26, 30, 40, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

body.negaresh-dark-theme .pagination-info {
    color: #b3b8c1 !important;
}

body.negaresh-dark-theme .stat-info h3,
body.negaresh-dark-theme .stat-info p {
    color: #e8eaed !important;
}

body.negaresh-dark-theme .content-type,
body.negaresh-dark-theme code {
    color: #e8eaed !important;
    background: rgba(102, 126, 234, 0.15) !important;
}

body.negaresh-dark-theme .toggle-label {
    color: #e8eaed !important;
}

body.negaresh-dark-theme .info-item .label {
    color: #b3b8c1 !important;
}

body.negaresh-dark-theme .info-item .value {
    color: #ffffff !important;
}

/* ========================================
   فرم فعال‌سازی بسته با کد توکن
   ======================================== */

.token-activation-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.token-activation-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
}

.activation-form-wrapper {
    box-sizing: border-box;
    overflow: hidden;
}

.form-group {
    margin-bottom: 20px;
    box-sizing: border-box;
    width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.token-code-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 15px;
    font-size: 18px;
    font-family: monospace;
    letter-spacing: 2px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.token-code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.activate-code-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.activate-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.activate-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.activation-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
}

.activation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.activation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   نمایش کد توکن در کارت‌های بسته
   ======================================== */

.token-code-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.token-card.active-token .token-code-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.token-card.currently-used .token-code-display {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.code-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    font-weight: 500;
}

.code-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.code-value code {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.copy-code-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-code-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.code-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

.token-card.inactive-token {
    opacity: 0.85;
    border: 2px dashed #dc3545;
}

.token-card.inactive-token .token-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.token-status.inactive {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.token-card.currently-used {
    border: 3px solid #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

/* ========================================
   نمایش کد توکن در جزئیات سفارش WooCommerce
   ======================================== */

.negaresh-order-tokens {
    margin: 20px 0 !important;
    padding: 20px !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%) !important;
    border: 2px solid #4CAF50 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2) !important;
}

.negaresh-order-tokens h3 {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    color: #2c3e50 !important;
    font-size: 20px !important;
}

.negaresh-order-tokens ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 !important;
}

.negaresh-order-tokens li {
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.negaresh-order-tokens li:last-child {
    border-bottom: none !important;
}

.negaresh-order-tokens code {
    background: white !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-family: 'Courier New', monospace !important;
    letter-spacing: 1px !important;
}

.copy-order-token-btn {
    padding: 6px 14px !important;
    background: #4CAF50 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.copy-order-token-btn:hover {
    background: #45a049 !important;
    transform: scale(1.05) !important;
}

/* Dark theme support */
body.negaresh-dark-theme .token-activation-form {
    background: rgba(26, 30, 40, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

body.negaresh-dark-theme .form-group label {
    color: #e8eaed;
}

body.negaresh-dark-theme .token-code-input {
    background: rgba(26, 30, 40, 0.8);
    color: #e8eaed;
    border-color: rgba(102, 126, 234, 0.3);
}

body.negaresh-dark-theme .form-description {
    color: #b3b8c1;
}

body.negaresh-dark-theme .code-value {
    background: rgba(26, 30, 40, 0.8);
}

body.negaresh-dark-theme .code-value code {
    color: #e8eaed;
}

