/**
 * CloudBase Equipment List Styles v1.9.9
 * حذف باکس مزاحم + Sort فقط روی Headers
 */

/* Reset و تنظیمات پایه - مقاوم در برابر Dark Mode */
.cbel-equipment-list-container,
.cbel-equipment-list-container *,
.cbel-equipment-list-container *::before,
.cbel-equipment-list-container *::after {
    color-scheme: light !important;
    -webkit-color-scheme: light !important;
    box-sizing: border-box;
}

.cbel-equipment-list-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    max-width: 100%;
    margin: 0 auto;
    direction: rtl;
    line-height: 1.6;
    background-color: #ffffff !important;
    color: #333333 !important;
    /* جلوگیری کامل از Dark Mode */
    filter: none !important;
    -webkit-filter: none !important;
    /* حذف کامل باکس‌های مزاحم */
    position: relative;
}

/* حذف کامل هر نوع مودال/پاپ‌آپ/باکس مزاحم */
.cbel-equipment-list-container .modal,
.cbel-equipment-list-container .popup,
.cbel-equipment-list-container .overlay,
.cbel-equipment-list-container .sort-modal,
.cbel-equipment-list-container .sort-popup,
.cbel-equipment-list-container [class*="modal"],
.cbel-equipment-list-container [class*="popup"],
.cbel-equipment-list-container [class*="overlay"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* تب‌های دسته‌بندی - سبک Google Sheets */
.cbel-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8eaed !important;
    padding-bottom: 15px;
    background-color: #ffffff !important;
}

.cbel-tab-button {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    color: #5f6368 !important;
    text-decoration: none;
}

.cbel-tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26, 115, 232, 0.1), transparent);
    transition: left 0.5s;
}

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

.cbel-tab-button:hover {
    background-color: #f8f9fa !important;
    color: #1a73e8 !important;
    border-color: #1a73e8 !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.cbel-tab-button.active {
    background: #1a73e8 !important;
    color: #ffffff !important;
    border-color: #1a73e8 !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.cbel-tab-button.active::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* کنترل‌ها - فقط جستجو و فیلتر */
.cbel-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    background-color: #f8f9fa !important;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e8eaed !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cbel-search {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    border: 1px solid #dadce0 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    overflow: hidden;
}

.cbel-search-button {
    order: 2; /* دکمه دوم (سمت چپ در RTL) */
    padding: 10px 12px !important;
    background: linear-gradient(135deg, #1a73e8, #1557b0) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    box-sizing: border-box;
    margin: 0 !important;
    flex-shrink: 0;
    border-right: 1px solid #1557b0 !important;
}

.cbel-search input {
    order: 1; /* input اول (سمت راست در RTL) */
    flex: 1;
    padding: 10px 15px !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    background-color: transparent !important;
    color: #333333 !important;
    transition: all 0.3s ease;
    outline: none;
    height: 40px;
    box-sizing: border-box;
    margin: 0 !important;
}

.cbel-search input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.cbel-search:focus-within {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1) !important;
}

.cbel-search-button:hover {
    background: linear-gradient(135deg, #1557b0, #1346a0) !important;
    transform: none; /* حذف transform که layout خراب می‌کند */
}

.cbel-filter {
    display: flex;
    align-items: center;
    height: 40px;
}

.cbel-filter select {
    padding: 10px 15px !important;
    border: 1px solid #dadce0 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    font-size: 14px !important;
    cursor: pointer;
    min-width: 150px;
    height: 40px;
    box-sizing: border-box;
    margin: 0 !important;
}

.cbel-results-info {
    color: #5f6368 !important;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    white-space: nowrap;
    height: 40px;
    margin: 0 !important;
    padding: 0 10px !important;
}

/* جدول - سبک Google Sheets */
.cbel-table-container {
    background-color: #ffffff !important;
    border: 1px solid #e8eaed !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
}

.cbel-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cbel-equipment-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    font-size: 14px;
    min-width: 800px; /* حداقل عرض برای اسکرول */
}

/* هدر جدول با قابلیت Sort */
.cbel-equipment-table thead {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #e8eaed !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cbel-equipment-table th {
    padding: 12px 15px !important;
    text-align: center !important;
    font-weight: 500 !important;
    color: #3c4043 !important;
    background-color: #f8f9fa !important;
    border-right: 1px solid #e8eaed !important;
    position: relative;
    vertical-align: middle;
    font-size: 13px;
    white-space: nowrap;
    min-width: 100px;
    user-select: none;
}

.cbel-equipment-table th:hover {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
}

.cbel-equipment-table th:last-child {
    border-right: none !important;
}

/* Sort Headers - کلیک‌آبل با آیکون واضح */
.cbel-equipment-table th.sortable {
    cursor: pointer !important;
    position: relative;
    transition: all 0.2s ease;
    padding-left: 40px !important; /* فضای بیشتر برای آیکون */
}

.cbel-equipment-table th.sortable:hover {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
    transform: translateY(-1px);
}

/* آیکون Sort پیش‌فرض - دو فلش */
.cbel-equipment-table th.sortable::before {
    content: "⇅";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9aa0a6;
    transition: all 0.2s ease;
    font-weight: bold;
}

.cbel-equipment-table th.sortable:hover::before {
    color: #1a73e8;
    transform: translateY(-50%) scale(1.1);
}

/* آیکون Sort فعال - صعودی */
.cbel-equipment-table th.sortable.sort-asc::before {
    content: "↑";
    color: #ea4335 !important;
    font-size: 18px;
    transform: translateY(-50%) scale(1.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* آیکون Sort فعال - نزولی */
.cbel-equipment-table th.sortable.sort-desc::before {
    content: "↓";
    color: #ea4335 !important;
    font-size: 18px;
    transform: translateY(-50%) scale(1.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* نمایش tooltip راهنما */
.cbel-equipment-table th.sortable::after {
    content: "کلیک برای مرتب‌سازی";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cbel-equipment-table th.sortable:hover::after {
    opacity: 1;
}

/* حالت فعال Sort - highlighting */
.cbel-equipment-table th.sortable.sort-asc,
.cbel-equipment-table th.sortable.sort-desc {
    background-color: #e8f0fe !important;
    color: #1a73e8 !important;
    box-shadow: inset 0 -3px 0 #ea4335;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* سلول‌های جدول */
.cbel-equipment-table td {
    padding: 12px 15px !important;
    text-align: center !important;
    border-right: 1px solid #e8eaed !important;
    border-bottom: 1px solid #e8eaed !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    vertical-align: middle;
    font-size: 13px;
}

.cbel-equipment-table td:last-child {
    border-right: none !important;
}

/* ردیف‌های جدول */
.cbel-equipment-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

.cbel-equipment-table tbody tr:nth-child(even) {
    background-color: #fafafa !important;
}

.cbel-equipment-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f4 !important;
}

/* رنگ‌بندی وضعیت - مشابه Google Sheets */
.cbel-condition-badge {
    display: inline-block;
    padding: 5px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    min-width: 60px;
    text-align: center;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.cbel-condition-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* وضعیت بسیار خوب - سبز پررنگ */
.cbel-condition-excellent,
.cbel-condition-badge[data-condition*="بسیار خوب"],
.cbel-condition-badge[data-condition*="مشابه نو"],
.cbel-condition-badge[data-condition*="نو"] {
    background-color: #0d7377 !important;
    color: #ffffff !important;
}

/* وضعیت خوب - سبز روشن */
.cbel-condition-good,
.cbel-condition-badge[data-condition*="خوب"] {
    background-color: #34a853 !important;
    color: #ffffff !important;
}

/* وضعیت متوسط - نارنجی */
.cbel-condition-average,
.cbel-condition-badge[data-condition*="متوسط"] {
    background-color: #ff9800 !important;
    color: #ffffff !important;
}

/* وضعیت ضعیف - قرمز */
.cbel-condition-poor,
.cbel-condition-badge[data-condition*="ضعیف"],
.cbel-condition-badge[data-condition*="خارج از استاندارد"] {
    background-color: #ea4335 !important;
    color: #ffffff !important;
}

/* تصاویر */
.cbel-equipment-image {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    border: 2px solid #e8eaed !important;
    transition: all 0.3s ease;
}

.cbel-equipment-image:hover {
    transform: scale(1.05);
    border-color: #1a73e8 !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.cbel-no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa !important;
    color: #9aa0a6 !important;
    border: 2px solid #e8eaed !important;
    border-radius: 6px;
    font-size: 24px;
}

/* Loading و Empty State */
.cbel-loading,
.cbel-loading-container {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368 !important;
    background-color: #ffffff !important;
}

.cbel-loading-spinner,
.cbel-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: cbel-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes cbel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.cbel-sort-loading {
    animation: spin 1s linear infinite !important;
    margin-left: 5px !important;
    display: inline-block !important;
    color: #1a73e8 !important;
    font-weight: bold !important;
}

.cbel-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #5f6368 !important;
    background-color: #ffffff !important;
}

.cbel-empty-state h3 {
    color: #3c4043 !important;
    margin-bottom: 10px;
    font-size: 16px;
}

.cbel-empty-state p {
    color: #5f6368 !important;
    font-size: 14px;
}

/* صفحه‌بندی */
.cbel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 6px;
    background-color: #ffffff !important;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e8eaed !important;
    flex-wrap: wrap;
}

.cbel-pagination-btn {
    padding: 8px 12px !important;
    border: 1px solid #dadce0 !important;
    background-color: #ffffff !important;
    color: #1a73e8 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 36px;
    text-align: center;
}

.cbel-pagination-btn:hover {
    background-color: #e8f0fe !important;
    border-color: #1a73e8 !important;
    transform: translateY(-1px);
}

.cbel-pagination-btn.active {
    background-color: #1a73e8 !important;
    color: #ffffff !important;
    border-color: #1a73e8 !important;
}

.cbel-pagination-btn:disabled {
    background-color: #f8f9fa !important;
    color: #9aa0a6 !important;
    border-color: #e8eaed !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* خطا */
.cbel-error-message {
    background-color: #fef7f0 !important;
    color: #ea4335 !important;
    padding: 12px 16px !important;
    border: 1px solid #fce8e6 !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
    text-align: center !important;
    font-weight: 500;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbel-equipment-list-container {
        padding: 10px;
    }
    
    .cbel-category-tabs {
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .cbel-tab-button {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 70px;
    }
    
    .cbel-filters {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        align-items: stretch;
    }
    
    /* جستجو در موبایل - دکمه سمت چپ */
    .cbel-search {
        min-width: 100%;
        width: 100%;
        height: 40px;
        border: 1px solid #dadce0 !important;
        border-radius: 6px !important;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .cbel-search-button {
        order: 2; /* دکمه دوم - سمت چپ در RTL */
        height: 40px;
        min-width: 40px;
        border-radius: 0 !important;
        border-top-left-radius: 6px !important;
        border-bottom-left-radius: 6px !important;
        flex-shrink: 0;
        margin: 0 !important;
    }
    
    .cbel-search input {
        order: 1; /* input اول - سمت راست در RTL */
        height: 40px;
        flex: 1;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .cbel-filter {
        width: 100%;
        height: 40px;
    }
    
    .cbel-filter select {
        width: 100%;
        height: 40px;
    }
    
    .cbel-results-info {
        width: 100%;
        text-align: center;
        height: 30px;
        justify-content: center;
    }
    
    .cbel-equipment-table {
        min-width: 700px; /* اسکرول افقی */
    }
    
    .cbel-equipment-table th,
    .cbel-equipment-table td {
        padding: 8px 6px !important;
        font-size: 11px;
        min-width: 70px;
    }
    
    /* Sort Headers در موبایل - آیکون‌های کوچک‌تر */
    .cbel-equipment-table th.sortable {
        padding-left: 25px !important;
        cursor: pointer;
    }
    
    .cbel-equipment-table th.sortable::before {
        font-size: 12px;
        left: 8px;
    }
    
    .cbel-equipment-table th.sortable.sort-asc::before {
        content: "↑";
        color: #ea4335 !important;
        font-size: 14px;
    }
    
    .cbel-equipment-table th.sortable.sort-desc::before {
        content: "↓";
        color: #ea4335 !important;
        font-size: 14px;
    }
    
    /* tooltip در موبایل غیرفعال */
    .cbel-equipment-table th.sortable::after {
        display: none;
    }
    
    .cbel-equipment-image,
    .cbel-no-image {
        width: 40px !important;
        height: 40px !important;
    }
    
    .cbel-condition-badge {
        padding: 2px 4px !important;
        font-size: 9px !important;
        min-width: 40px;
    }
    
    .cbel-pagination {
        gap: 4px;
        padding: 10px;
    }
    
    .cbel-pagination-btn {
        padding: 6px 8px !important;
        font-size: 12px !important;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .cbel-tab-button {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .cbel-equipment-table {
        min-width: 600px;
    }
    
    .cbel-equipment-table th,
    .cbel-equipment-table td {
        padding: 6px 4px !important;
        font-size: 10px;
        min-width: 60px;
    }
    
    /* Sort Headers در موبایل کوچک */
    .cbel-equipment-table th.sortable {
        padding-left: 20px !important;
    }
    
    .cbel-equipment-table th.sortable::before {
        font-size: 10px;
        left: 6px;
    }
    
    .cbel-equipment-table th.sortable.sort-asc::before,
    .cbel-equipment-table th.sortable.sort-desc::before {
        font-size: 12px;
    }
    
    .cbel-equipment-image,
    .cbel-no-image {
        width: 30px !important;
        height: 30px !important;
    }
    
    .cbel-condition-badge {
        padding: 1px 3px !important;
        font-size: 8px !important;
        min-width: 35px;
    }
}

/* اصلاحات خاص برای تضمین عدم تأثیر Dark Mode */
@media (prefers-color-scheme: dark) {
    .cbel-equipment-list-container,
    .cbel-equipment-list-container *,
    .cbel-equipment-list-container *::before,
    .cbel-equipment-list-container *::after {
        color-scheme: light !important;
        -webkit-color-scheme: light !important;
    }
}

/* حذف کامل تمام عناصر مزاحم که ممکن است از تم یا پلاگین‌های دیگر بیاید */
.cbel-equipment-list-container .wp-block-cover__overlay,
.cbel-equipment-list-container .elementor-widget-container > div:not(.cbel-equipment-list-container),
.cbel-equipment-list-container .modal-backdrop,
.cbel-equipment-list-container .fancybox-overlay,
.cbel-equipment-list-container .magnific-popup,
.cbel-equipment-list-container .prettyPhoto,
.cbel-equipment-list-container .colorbox,
.cbel-equipment-list-container .featherlight,
.cbel-equipment-list-container .reveal-modal-bg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* حالت مدیریت */
.cbel-admin-mode {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.cbel-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cbel-admin-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cbel-admin-actions {
    display: flex;
    gap: 10px;
}

/* دکمه‌ها */
.cbel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cbel-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.cbel-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cbel-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
}

.cbel-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 70px;
    height: 28px;
}

.cbel-btn-icon {
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.cbel-btn-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* دکمه‌های رنگی */
.cbel-btn-primary {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.cbel-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3367d6, #2e7d32);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
}

.cbel-btn-edit {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.cbel-btn-edit:hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00, #d84315);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.cbel-btn-delete {
    background: linear-gradient(135deg, #f44336, #e91e63);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.cbel-btn-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f, #c2185b);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.cbel-btn-success {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.cbel-btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.cbel-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.cbel-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* ستون عملیات */
.cbel-actions-cell {
    width: 100px;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px !important;
}

.cbel-actions {
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* در موبایل، دکمه‌ها عمودی */
@media (max-width: 768px) {
    .cbel-actions {
        flex-direction: column;
        gap: 2px;
    }
    
    .cbel-btn-sm {
        min-width: 60px;
        font-size: 9px;
    }
    
    .cbel-btn-text {
        font-size: 8px;
    }
    
    .cbel-btn-icon {
        font-size: 10px;
    }
    
    .cbel-actions-cell {
        width: 70px;
        padding: 4px 2px !important;
    }
}

/* Modal */
.cbel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbel-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cbel-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.cbel-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.cbel-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbel-modal-close:hover {
    color: #333;
}

.cbel-modal-body {
    padding: 20px;
}

/* فرم */
.cbel-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.cbel-form-group {
    margin-bottom: 15px;
}

.cbel-form-half {
    flex: 1;
    margin-bottom: 0;
}

.cbel-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.cbel-form-group input,
.cbel-form-group select,
.cbel-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.cbel-form-group input:focus,
.cbel-form-group select:focus,
.cbel-form-group textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.cbel-form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.cbel-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive مدیریت */
@media (max-width: 768px) {
    .cbel-admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .cbel-actions {
        flex-direction: column;
        gap: 2px;
    }
    
    .cbel-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .cbel-form-actions {
        flex-direction: column;
    }
    
    .cbel-btn {
        width: 100%;
        justify-content: center;
    }
}

