/* ==========================================================
   FT Dokan Customizer — Modern Minimal Design System
   No external frameworks. Pure clean CSS.
========================================================== */

/* ---------- Base & Typography ---------- */
.mdc-dashboard-container {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #1e293b;
    line-height: 1.6;
    padding: 20px;
    box-sizing: border-box;
}

.mdc-dashboard-container *,
.mdc-dashboard-container *::before,
.mdc-dashboard-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a.dokan-btn.dokan-btn-theme.vendor-dashboard {
    display: none;
}

/* ---------- Tabs Navigation ---------- */
.mdc-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.mdc-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mdc-tab-btn i {
    font-size: 1.1rem;
    transition: color 0.2s;
    color: inherit;
}

.mdc-tab-btn:hover {
background: #d0deff;
    color: #1e293b !important;
}

.mdc-tab-btn.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.mdc-tab-btn.active i {
    color: #fff !important;
}

/* ---------- Sub‑tabs (Profile) ---------- */
.mdc-sub-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.mdc-sub-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mdc-sub-tab-btn:hover {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.mdc-sub-tab-btn.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.mdc-sub-tab-btn i {
    font-size: 1rem;
    color: inherit;
}

.mdc-subtab-pane {
    display: none;
    animation: fadeIn 0.25s ease;
}

.mdc-subtab-pane.active {
    display: block;
}

/* ---------- Tab Panes ---------- */
.mdc-tab-pane {
    display: none;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.mdc-tab-pane.active {
    display: block;
}

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

/* ---------- Dashboard Statistics Cards ---------- */
.mdc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.mdc-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    cursor: default;
}

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

.mdc-stat-card .icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #2563eb;
    flex-shrink: 0;
}

.mdc-stat-card .info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.mdc-stat-card .info strong {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

/* ---------- Card Box (used in profile) ---------- */
.mdc-card-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mdc-section-title {
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin: 0 0 18px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdc-section-title i {
    font-size: 1.1rem;
    color: #2563eb;
}

/* ---------- Product Table – Full Replacement ---------- */
.mdc-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.mdc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mdc-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 14px 16px;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.mdc-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}

.mdc-table tbody tr:last-child td {
    border-bottom: none;
}

.mdc-table tbody tr:hover td {
    background: #fafbfc;
}

.mdc-table img {
    border-radius: 6px;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

/* Actions Column */
.mdc-actions-header {
    width: 140px;
}

.mdc-actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

/* Action Buttons – Vibrant & Distinct */
.mdc-btn-view,
.mdc-btn-edit,
.mdc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mdc-btn-view {
    background: #64748b;
    color: #fff;
}
.mdc-btn-view:hover {
    background: #475569;
    box-shadow: 0 4px 10px rgba(100,116,139,0.3);
}

.mdc-btn-edit {
    background: #f59e0b;
    color: #fff;
}
.mdc-btn-edit:hover {
    background: #d97706;
    box-shadow: 0 4px 10px rgba(245,158,11,0.35);
}

.mdc-btn-disable {
    background: #ef4444;
    color: #fff;
}
.mdc-btn-disable:hover {
    background: #dc2626;
    box-shadow: 0 4px 10px rgba(239,68,68,0.3);
}

.mdc-btn-enable {
    background: #22c55e;
    color: #fff;
}
.mdc-btn-enable:hover {
    background: #16a34a;
    box-shadow: 0 4px 10px rgba(34,197,94,0.3);
}

/* Inside icons remain white */
.mdc-btn-view i,
.mdc-btn-edit i,
.mdc-btn i {
    color: inherit;
}

/* ---------- Badges ---------- */
.mdc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
}

.mdc-badge.publish,
.instock-badge {
    background: #dcfce7;
    color: #166534;
}

.mdc-badge.pending {
    background: #fef9c3;
    color: #854d0e;
}

.mdc-badge.draft {
    background: #f1f5f9;
    color: #475569;
}

.outofstock-badge {
    background: #fee2e2;
    color: #991b1b;
}

/* ---------- Pagination ---------- */
.mdc-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.mdc-page-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.mdc-page-btn:hover {
    background: #f1f5f9;
}

.mdc-page-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ---------- Forms & Inputs ---------- */
.form-group,
.mdc-form-group {
    margin-bottom: 18px;
}

.form-group label,
.mdc-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea,
.form-group select,
.mdc-form-group input,
.mdc-form-group select,
.mdc-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.mdc-form-group input:focus,
.mdc-form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path d='M5.25 7.5l4.5 4.5 4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 16px;
    padding-left: 36px;
}

input[type="file"] {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    width: 100%;
    font-size: 0.85rem;
}

/* Checkbox */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* ---------- Primary Button ---------- */
.mdc-btn-primary,
button.mdc-btn-primary {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.15s;
    text-align: center;
    width: auto;
}

.mdc-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.mdc-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------- Form Responses ---------- */
.mdc-form-response {
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.mdc-form-response.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.mdc-form-response.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* ---------- Auth / Message Tabs ---------- */
#mdc-messages-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mdc-msg-badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-right: 4px;
    vertical-align: top;
}



/* ---------- Select2 Override ---------- */
.select2-container {
    z-index: 99999 !important;
}

.select2-container .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

/* ---------- Progress Bar (Upload) ---------- */
.mdc-upload-progress {
    margin: 16px 0;
}

.mdc-progress-bar {
    background: #e2e8f0;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}

.mdc-progress-bar-fill {
    height: 100%;
    width: 0;
    background: #2563eb;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ========== فیلدها و پیام‌های خطا ========== */
.mdc-field-error {
    border-color: #e0245e !important;
    box-shadow: 0 0 0 3px rgba(224, 36, 94, 0.15);
    background-color: #fff5f5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mdc-field-error-message {
    display: none;
    align-items: center;
    gap: 6px;
    color: #e0245e;
    font-size: 0.82rem;
    margin-top: 6px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

/* وقتی display:block شد */
.mdc-field-error-message[style*="display: block"],
.mdc-field-error-message.show {
    display: flex !important;
}

/* ---------- Image Previews ---------- */
.featured-image-preview img,
.mdc-image-preview-container img,
.gallery-preview-container img,
#mdc-form-profile img[src] {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    object-fit: cover;
    margin-top: 10px;
}

/* Preview for store logo & store image (small) */
#mdc-form-profile input[name="store_logo"] + img,
#mdc-form-profile input[name="store_image"] + img {
    max-width: 80px;
    height: auto;
    margin-top: 10px;
}

/* Preview for store banner (larger, but contained) */
#mdc-form-profile input[name="store_banner"] + img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.gallery-preview-container,
.mdc-gallery-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.remove-gallery-image,
.remove-gallery-img {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}

.remove-gallery-image:hover,
.remove-gallery-img:hover {
    background: #dc2626;
}

/* ---------- Download/Attribute Row Remove Buttons ---------- */
.mdc-remove-attribute,
.mdc-remove-download,
.remove-row.button {
    background: #f1f5f9;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
}

.mdc-remove-attribute:hover,
.mdc-remove-download:hover,
.remove-row.button:hover {
    background: #fee2e2;
}

/* ==============================
   محصولات: فیلترها و جدول
   ============================== */

/* -- نوار فیلتر تک‌ردیفه -- */
.mdc-product-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mdc-product-filters input,
.mdc-product-filters select {
    padding: 12px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
    flex-shrink: 0;
}

.mdc-product-filters input {
    min-width: 180px;
    flex-basis: 200px;
}

.mdc-product-filters select {
    min-width: 190px;
    max-width: 220px;
}

.mdc-product-filters button#mdc-apply-filters {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.mdc-product-filters button#mdc-apply-filters:hover {
    background: #1d4ed8;
}

/* ---------- Withdraw Table ---------- */
.mdc-table.small-table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mdc-table.small-table thead th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.mdc-table.small-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.mdc-table.small-table tbody tr:last-child td {
    border-bottom: none;
}

.mdc-table.small-table tbody tr:hover td {
    background: #f8fafc;
}

.mdc-table.small-table .mdc-badge {
    padding: 4px 12px;
}

/* ---------- Shortcode Output Styling ---------- */
.mdc-product-dimensions {
    margin: 15px 0;
    padding: 15px;
    background: #f8fafc;
    border-right: 4px solid #2563eb;
    border-radius: 8px;
    line-height: 1.8;
}

.mdc-product-dimensions .mdc-dimension-item {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.mdc-download-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 15px;
}

.mdc-product-attributes {
    margin: 15px 0;
}

.mdc-attr-list {
    list-style: none;
    padding: 0;
}

.mdc-attr-list li {
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 6px;
}

/* ---------- نوار وضعیت محصول در صفحه ویرایش ---------- */
#mdc-edit-status-bar {
    margin-bottom: 20px;
}

.mdc-status-banner {
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border-right: 6px solid transparent;
}

#tab-add-product .mdc-status-banner.status-publish {
    background-color: #dcfce7;
    color: #166534;
    border-right-color: #16a34a;
}

.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
    border-right-color: #ca8a04;
}

.status-draft {
    background-color: #f1f5f9;
    color: #475569;
    border-right-color: #64748b;
}

.mdc-btn-cancel,
button.mdc-btn-cancel {
    display: inline-block;
    background: #e53935;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.15s;
    text-align: center;
    width: auto;
}

.mdc-btn-cancel:hover:not(:disabled) {
    background: #c62828;
    box-shadow: 0 4px 10px rgba(198, 40, 40, 0.3);
}

.mdc-btn-cancel:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.mdc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.mdc-loading-spinner {
    background: #fff;
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    font-family: inherit;
}

.mdc-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 16px;
}

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

.mdc-loading-text {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
}

.mdc-loading{
    text-align: center;
    padding: 20px;
}

.mdc-error {
    text-align: center;
    padding: 20px;
}

.mdc-filter-link {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.mdc-filter-link:hover {
    background: #e2e8f0;
}

.mdc-filter-link.mdc-filter-active {
    background: #2563eb;
    color: #ffffff;text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ========== Modern Messaging UI ========== */
.mdc-messages-modern { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }

.mdc-thread-list { display: flex; flex-direction: column; }
.mdc-thread-item { 
    display: flex; justify-content: space-between; align-items: center; padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.15s;
}
.mdc-thread-item:hover { background: #f8fafc; }
.mdc-thread-item.unread { background: #eff6ff; font-weight: 500; }
.mdc-thread-item.unread .thread-subject { color: #1e40af; }
.thread-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.thread-sender { font-size: 0.85rem; color: #64748b; }
.thread-subject { font-weight: 600; color: #0f172a; }
.thread-excerpt { color: #64748b; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.thread-meta { text-align: left; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.thread-time { font-size: 0.75rem; color: #94a3b8; }

/* مکالمه */
.conversation-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    justify-content: space-between;
    flex-direction: row-reverse;
}.conversation-header h3 { margin: 0; font-size: 1.1rem; }

.mdc-conversation-messages {
    padding: 20px; max-height: 400px; overflow-y: auto; background: #fcfcfd;
    display: flex; flex-direction: column; gap: 12px;
}

.mdc-msg-bubble {
    max-width: 75%; padding: 14px 18px; border-radius: 20px; line-height: 1.6;
    position: relative; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mdc-msg-bubble.sent { background: #2563eb; color: white; align-self: flex-start; border-bottom-right-radius: 4px; }
.mdc-msg-bubble.received { background: #d4dee8; color: #1e293b; align-self: flex-end; border-bottom-left-radius: 4px; }

.mdc-msg-sender { font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; opacity: 0.8; }
.mdc-msg-time { font-size: 0.7rem; opacity: 0.7; margin-top: 8px; text-align: left; }
.sent .mdc-msg-time { color: rgba(255,255,255,0.8); }
.received .mdc-msg-time { color: #64748b; }

.mdc-reply-form {
    display: flex; flex-direction: column; gap: 10px; padding: 16px; border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.mdc-reply-form textarea { border-radius: 12px; padding: 12px; border: 1px solid #cbd5e1; resize: vertical; font-family: inherit; }
.mdc-reply-form button { align-self: flex-end; }

/* ========== Admin Modal ========== */
.mdc-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mdc-modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}
.mdc-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 24px;
}
.mdc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.mdc-modal-header h3 { margin: 0; }
.mdc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}
.mdc-modal-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.mdc-suggestions-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 2;
    width: 92%;
    display: none;
}
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}
.suggestion-item:hover {
    background: #f1f5f9;
}
.mdc-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .mdc-tabs-nav {
        flex-direction: column;
        gap: 6px;
    }

    .mdc-tab-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        padding: 10px;
    }

    .mdc-sub-tabs-nav {
        flex-direction: column;
        gap: 4px;
    }

    .mdc-sub-tab-btn {
        width: 100%;
        justify-content: center;
    }

    .mdc-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .mdc-stat-card {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    .mdc-table thead {
        display: none;
    }

    .mdc-table,
    .mdc-table tbody,
    .mdc-table tr,
    .mdc-table td {
        display: block;
        width: 100%;
    }

    .mdc-table tr {
        margin-bottom: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 12px;
    }

    .mdc-table td {
        padding: 6px 10px;
        border: none;
        position: relative;
        text-align: right;
        font-size: 0.85rem;
    }

    .mdc-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        color: #64748b;
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .mdc-actions-cell {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .mdc-stats-grid {
        grid-template-columns: 1fr;
    }

    .mdc-product-filters {
        flex-direction: column;
    }

    .mdc-product-filters input,
    .mdc-product-filters select {
        width: 100%;
    }
}

/* ---------- Animations ---------- */
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mdc-subtab-pane.active {
    animation: fadeInTab 0.3s ease;
}

/* ---------- Clean reset for unused styles ---------- */
.mdc-form-group .dokan-info {
    color: #1e40af;
    background-color: #dbeafe;
    padding: 12px;
    border-radius: 8px;
    border-right: 4px solid #2563eb;
}


/* ========== Fix product subtabs to match profile ========== */
#product-subtabs.mdc-sub-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
#product-subtabs .mdc-sub-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
#product-subtabs .mdc-sub-tab-btn:hover {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
#product-subtabs .mdc-sub-tab-btn.active {
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2) !important;
}/* سه ستونه برای ابعاد */
.form-group.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
@media (max-width: 768px) {
    .form-group.three-col {
        grid-template-columns: 1fr;
    }
}/* دکمه‌های فیلتر وضعیت پیام‌ها */
button.mdc-filter-button {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    line-height: 1.4 !important;
}
button.mdc-filter-button:hover {
    background: #e2e8f0 !important;
}
button.mdc-filter-button.active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}
.mdc-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 6px;
    margin: 2px;
    font-size: 0.85rem;
}
.remove-seller {
    font-weight: bold;
    color: #ef4444;
}.mdc-tag-all {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.remove-all-sellers {
    font-weight: bold;
    color: #dc2626;
    cursor: pointer;
}
a.mdc-btn-view:hover
 {
    color: #fff;
}

/* ----- یکسان‌سازی ارتفاع، پدینگ و راست‌چین‌سازی تمام فیلدهای ورودی ----- */
.mdc-dashboard-container input[type="text"],
.mdc-dashboard-container input[type="number"],
.mdc-dashboard-container input[type="email"],
.mdc-dashboard-container input[type="url"],
.mdc-dashboard-container input[type="tel"],
.mdc-dashboard-container input[type="date"],
.mdc-dashboard-container input[type="password"],
.mdc-dashboard-container textarea,
.mdc-dashboard-container select,
.mdc-dashboard-container .select2-container--default .select2-selection--single,
.mdc-dashboard-container .select2-container--default .select2-selection--multiple,
.mdc-dashboard-container .select2-container--default .select2-search__field {
    height: 46px !important;                       /* ارتفاع یکسان */
    padding: 8px 14px !important;                  /* پدینگ داخلی یکسان */
    line-height: 1.5 !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    text-align: right !important;                  /* راست‌چین */
    direction: rtl !important;
}

/* ----- textarea را بلندتر ولی با پدینگ یکسان قرار دهید (اختیاری) ----- */
.mdc-dashboard-container textarea {
    height: auto !important;                       /* ارتفاع خودکار برای متن طولانی */
    min-height: 46px !important;
    resize: vertical !important;
}

/* ----- select (عادی) آیکون فلش راست‌چین شود ----- */
.mdc-dashboard-container select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path d='M5.25 7.5l4.5 4.5 4.5-4.5'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: left 10px center !important;   /* آیکون سمت چپ */
    background-size: 16px !important;
    padding-left: 36px !important;                      /* فضا برای آیکون */
}

/* ----- Select2: حذف افکت‌های اضافی و هماهنگ‌سازی ----- */
.mdc-dashboard-container .select2-container .select2-selection--single,
.mdc-dashboard-container .select2-container .select2-selection--multiple {
    min-height: 46px !important;
    border: 1px solid #cbd5e1 !important;
}

.mdc-dashboard-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 27px !important;
    padding-right: 0 !important;
    padding-left: 20px !important;
}
.mdc-dashboard-container .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
    left: 11px !important;
}
.mdc-dashboard-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 10px !important;
}

.mdc-dashboard-container .select2-container--default .select2-selection--multiple .select2-selection__clear {
    display: none !important;
}
.mdc-dashboard-container .select2-container .select2-selection--multiple .select2-selection__rendered{
        display: block!important;

}
.mdc-dashboard-container .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0 0 0 14px !important;
}
.mdc-dashboard-container .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
    min-height: 22px !important;
}
.mdc-dashboard-container .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 6px !important;
}

.mdc-dashboard-container .select2-container--default .select2-search--inline .select2-search__field {
    height: 30px !important;
    margin-top: 8px !important;
}
.mdc-dashboard-container :is(.btn,.button,button,[type=submit],[type=button]):hover{
    color: #fff;
}
/* ----- فوکوس یکسان ----- */
.mdc-dashboard-container input:focus,
.mdc-dashboard-container textarea:focus,
.mdc-dashboard-container select:focus,
.mdc-dashboard-container .select2-container--default.select2-container--focus .select2-selection--single,
.mdc-dashboard-container .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
}

/* ----- Select2 dropdown RTL ----- */
.mdc-dashboard-container .select2-dropdown {
    direction: rtl !important;
    text-align: right !important;
}

/* ==========================================================
   اصلاحات درخواستی: دکمه‌ها، ارتفاع Select2 و رنگ‌های داشبورد
========================================================== */

/* --- 1. استانداردسازی و زیباسازی دکمه‌های افزودن (ویژگی و فایل) --- */
button#add-attribute, 
button#mdc-add-attribute, 
button#mdc-add-download {
    background-color: #f8fafc !important;
    color: #2563eb !important;
    border: 1px dashed #2563eb !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 15px !important;
    width: 100% !important; /* دکمه به صورت تمام عرض نمایش داده می‌شود تا فرم زیباتر شود */
}

button#add-attribute:hover, 
button#mdc-add-attribute:hover, 
button#mdc-add-download:hover {
    background-color: #eff6ff !important;
    border-style: solid !important;
}

/* استایل دکمه‌های حذف (علامت ضربدر/منها) برای هماهنگی با دکمه جدید */
button.remove-row.button, 
button.mdc-remove-attribute, 
button.mdc-remove-download {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 8px !important;
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
}

button.remove-row.button:hover, 
button.mdc-remove-attribute:hover, 
button.mdc-remove-download:hover {
    background-color: #ef4444 !important;
    color: #fff !important;
}


.mdc-dashboard-container select[multiple] {
    height: auto !important;
}

.mdc-dashboard-container .select2-container .select2-selection--multiple,
.mdc-dashboard-container .select2-container--default .select2-selection--multiple {
    height: auto !important; 
    min-height: 46px !important;
    padding-bottom: 15px !important;
}

.mdc-dashboard-container .select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 6px !important;
    height: auto !important;    width: 100% !important;

}


.mdc-stat-card .info h4,
.mdc-stat-card .info strong,
.mdc-stat-card .info span,
.mdc-stat-card .info strong span.woocommerce-Price-amount,
.mdc-stat-card .info strong span.woocommerce-Price-currencySymbol {
    color: #1e293b !important; 
}