/* ===== BizPlan Forms — استایل اپلیکیشن ===== */

.bizplan-app {
    --bp-primary: #1a56db;
    --bp-primary-dark: #1e40af;
    --bp-success: #059669;
    --bp-danger: #dc2626;
    --bp-bg: #f8fafc;
    --bp-surface: #ffffff;
    --bp-border: #e2e8f0;
    --bp-text: #1e293b;
    --bp-muted: #64748b;
    --bp-radius: 12px;

    font-family: "Vazirmatn", system-ui, sans-serif;
    direction: rtl;
    text-align: right;
    color: var(--bp-text);
    background: var(--bp-bg);
    padding: 20px;
    border-radius: var(--bp-radius);
    min-height: 500px;
    line-height: 1.8;
}

/* حالت شب — هماهنگ با سوییچ روز/شب قالب (data-theme روی <html>)
   اگر متغیرهای قالب (--bt-*) موجود باشند از همان‌ها استفاده می‌شود تا با تنظیمات
   سفارشی‌ساز هماهنگ بماند؛ در غیر این صورت مقادیر پیش‌فرض مناسب اعمال می‌شوند. */
html[data-theme="dark"] .bizplan-app {
    --bp-bg: var(--bt-bg, #0b1120);
    --bp-surface: var(--bt-surface, #111c33);
    --bp-text: var(--bt-text, #e2e8f0);
    --bp-border: var(--bt-border, #1e293b);
    --bp-muted: #94a3b8;
}
html[data-theme="dark"] .bp-custom-field { background: rgba(253,230,138,0.1); border-color: rgba(253,230,138,0.3); }

/* خنثی‌سازی پس‌زمینه‌های روشن ثابت در حالت شب — این سطوح خنثی هستند و باید با محیط تاریک هماهنگ شوند */
html[data-theme="dark"] .bp-btn:hover,
html[data-theme="dark"] .bp-card-progress,
html[data-theme="dark"] .bp-progress-bar,
html[data-theme="dark"] .bp-section-guide,
html[data-theme="dark"] .bp-group,
html[data-theme="dark"] .bp-ai-result,
html[data-theme="dark"] .bp-dyn-table th,
html[data-theme="dark"] .bp-add-custom-field:hover,
html[data-theme="dark"] .bp-template-opt.active,
html[data-theme="dark"] .bp-output-preview {
    background: var(--bp-bg);
}

/* نشان‌های وضعیت (badge) — نسخه کم‌کنتراست‌تر برای پس‌زمینه تیره به‌جای رنگ پررنگ روشن اصلی */
html[data-theme="dark"] .bp-badge-draft { background: rgba(254,243,199,0.15); color: #fcd34d; }
html[data-theme="dark"] .bp-badge-completed { background: rgba(209,250,229,0.12); color: #6ee7b7; }
html[data-theme="dark"] .bp-badge-pro { background: rgba(237,233,254,0.15); color: #c4b5fd; }
html[data-theme="dark"] .bp-feat-yes .bp-feat-mark { background: rgba(220,252,231,0.12); color: #4ade80; }

.bizplan-app * { box-sizing: border-box; }

/* ===== دکمه‌ها ===== */
.bp-btn {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 18px;
    border: 1px solid var(--bp-border);
    background: var(--bp-surface);
    color: var(--bp-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-weight: 500;
}
.bp-btn:hover { background: #f1f5f9; transform: translateY(-1px); }
.bp-btn-primary { background: var(--bp-primary); color: #fff; border-color: var(--bp-primary); }
.bp-btn-primary:hover { background: var(--bp-primary-dark); }
.bp-btn-success { background: var(--bp-success); color: #fff; border-color: var(--bp-success); }
.bp-btn-success:hover { filter: brightness(1.08); }
.bp-btn-sm { padding: 6px 12px; font-size: 13px; }
.bp-btn-upgrade { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* ===== نوار اشتراک ===== */
.bp-sub-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 20px;
}
.bp-plan-name { font-weight: 700; color: var(--bp-primary); }
.bp-quota { color: var(--bp-muted); font-size: 13px; }
.bp-sub-bar .bp-btn-upgrade { margin-right: auto; }

/* ===== هدر ردیف ===== */
.bp-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.bp-title { font-size: 22px; font-weight: 700; margin: 0; }

/* ===== گرید فرم‌ها و نمونه‌ها ===== */
.bp-instances-grid, .bp-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.bp-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.bp-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--bp-primary);
}
.bp-card-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.bp-card-desc { font-size: 13px; color: var(--bp-muted); margin: 0 0 12px; line-height: 1.7; }
.bp-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--bp-muted); }

.bp-card-progress {
    height: 6px;
    background: #eef2f7;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}
.bp-card-progress span { display: block; height: 100%; background: var(--bp-success); }

.bp-badge { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.bp-badge-draft { background: #fef3c7; color: #92400e; }
.bp-badge-completed { background: #d1fae5; color: #065f46; }
.bp-badge-pro { background: #ede9fe; color: #5b21b6; }

/* ===== ویرایشگر ===== */
.bp-editor-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.bp-editor-main {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 22px;
}
.bp-editor-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.bp-progress { display: flex; align-items: center; gap: 8px; flex: 1; }
.bp-progress-bar { flex: 1; height: 8px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.bp-progress-bar span { display: block; height: 100%; width: 0; background: var(--bp-success); transition: width 0.3s; }
.bp-progress-text { font-size: 13px; color: var(--bp-muted); font-weight: 600; }
.bp-save-status { font-size: 12px; color: var(--bp-success); }

.bp-editor-title { font-size: 20px; font-weight: 700; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 2px solid var(--bp-border); }

/* ===== بخش‌ها و فیلدها ===== */
.bp-section { margin-bottom: 28px; }
.bp-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--bp-primary);
    margin: 0 0 6px;
    padding-right: 10px;
    border-right: 4px solid var(--bp-primary);
}
.bp-section-guide { font-size: 13px; color: var(--bp-muted); margin: 0 0 16px; background: #f8fafc; padding: 8px 12px; border-radius: 6px; }

.bp-field { margin-bottom: 18px; }
.bp-field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bp-field-required { color: var(--bp-danger); margin-right: 3px; }

.bp-field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: var(--bp-muted);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    margin-right: 6px;
}

.bp-input, .bp-textarea, .bp-select {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-surface);
    color: var(--bp-text);
    transition: border 0.18s;
}
.bp-input:focus, .bp-textarea:focus, .bp-select:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.bp-textarea { min-height: 100px; resize: vertical; line-height: 1.8; }

.bp-field-guide-text { font-size: 12px; color: var(--bp-muted); margin-top: 4px; }
.bp-field-example {
    font-size: 12px;
    color: var(--bp-muted);
    margin-top: 6px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-right: 3px solid var(--bp-border);
    display: none;
}
.bp-field-example.show { display: block; }
.bp-example-toggle { font-size: 12px; color: var(--bp-primary); cursor: pointer; background: none; border: none; padding: 0; margin-top: 4px; }

/* AI button */
.bp-ai-btn {
    font-size: 12px;
    color: var(--bp-primary);
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    margin-top: 6px;
}
.bp-ai-btn:hover { background: #dbeafe; }

/* جداول پویا */
.bp-table-wrap { overflow-x: auto; }
.bp-dyn-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.bp-dyn-table th, .bp-dyn-table td { border: 1px solid var(--bp-border); padding: 4px; }
.bp-dyn-table th { background: #f1f5f9; font-weight: 600; font-size: 12px; }
.bp-dyn-table input { width: 100%; border: none; padding: 6px; font-family: inherit; font-size: 13px; background: transparent; }
.bp-dyn-table input:focus { outline: 1px solid var(--bp-primary); }
.bp-row-remove { color: var(--bp-danger); cursor: pointer; border: none; background: none; font-size: 16px; }
.bp-add-row { font-size: 13px; color: var(--bp-primary); background: none; border: 1px dashed var(--bp-primary); border-radius: 6px; padding: 6px 12px; cursor: pointer; }

/* فهرست و چندتایی */
.bp-list-item, .bp-multi-item { display: flex; gap: 8px; margin-bottom: 6px; }
.bp-list-item input, .bp-multi-item input { flex: 1; }
.bp-item-remove { color: var(--bp-danger); cursor: pointer; border: none; background: none; font-size: 18px; }
.bp-add-item { font-size: 13px; color: var(--bp-primary); background: none; border: 1px dashed var(--bp-primary); border-radius: 6px; padding: 6px 12px; cursor: pointer; }

/* گروه */
.bp-group { background: #f8fafc; border: 1px solid var(--bp-border); border-radius: 8px; padding: 14px; }
.bp-group .bp-field:last-child { margin-bottom: 0; }

.bp-editor-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--bp-border); }

/* پیش‌نمایش */
.bp-editor-preview {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 18px;
    position: sticky;
    top: 20px;
    max-height: 80vh;
    overflow-y: auto;
}
.bp-preview-title { font-size: 14px; font-weight: 700; color: var(--bp-muted); margin: 0 0 14px; }
.bp-preview-content { font-size: 12px; line-height: 1.7; }
.bp-preview-content h4 { color: var(--bp-primary); font-size: 13px; margin: 12px 0 4px; }
.bp-preview-content p { margin: 0 0 8px; color: var(--bp-muted); }

/* خروجی */
.bp-output-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
.bp-output-controls { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: var(--bp-radius); padding: 18px; }
.bp-output-controls h3 { font-size: 15px; margin: 0 0 12px; }
.bp-templates-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.bp-template-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-muted);
    margin: 10px 0 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--bp-border);
}
.bp-template-opt {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; border: 2px solid var(--bp-border); border-radius: 8px; cursor: pointer;
}
.bp-template-opt.active { border-color: var(--bp-primary); background: #eff6ff; }
.bp-template-opt.locked { opacity: 0.55; cursor: not-allowed; }
.bp-custom-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.bp-custom-fields label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.bp-color { width: 100%; height: 40px; border: 1px solid var(--bp-border); border-radius: 8px; cursor: pointer; }
.bp-color-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bp-color-row label { font-size: 11px; }
.bp-field-hint { display: block; font-size: 11.5px; color: #94a3b8; font-weight: 400; line-height: 1.6; margin-top: -4px; margin-bottom: 4px; }
.bp-output-buttons { display: flex; flex-direction: column; gap: 10px; }
.bp-output-preview { background: #e9eef5; border-radius: var(--bp-radius); padding: 10px; }
.bp-output-preview-wrap { position: relative; }
.bp-output-frame { width: 100%; height: 700px; border: none; border-radius: 8px; background: #fff; display: block; }

/* اوورلی خرید روی پیش‌نمایش */
.bp-preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(241,245,249,0.35) 0%, rgba(30,41,59,0.78) 55%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    backdrop-filter: blur(1px);
    padding: 20px;
}
.bp-overlay-card {
    background: var(--bp-surface);
    border-radius: 16px;
    padding: 30px 26px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.bp-overlay-icon { font-size: 38px; margin-bottom: 10px; }
.bp-overlay-card h3 { font-size: 19px; margin: 0 0 10px; color: var(--bp-text); }
.bp-overlay-card p { font-size: 14px; color: var(--bp-muted); margin: 0 0 20px; line-height: 1.8; }
.bp-overlay-actions { display: flex; flex-direction: column; gap: 10px; }

.bp-btn-lg { padding: 13px 22px; font-size: 15px; font-weight: 700; }
.bp-btn-outline {
    background: var(--bp-surface);
    color: var(--bp-primary);
    border: 2px solid var(--bp-primary);
}
.bp-btn-outline:hover { background: var(--bp-bg); }

/* مدال */
.bp-modal {
    position: fixed; inset: 0; background: rgba(15,23,42,0.55);
    display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 20px;
}
.bp-modal-box {
    background: var(--bp-surface); border-radius: 16px; padding: 28px;
    max-width: 760px; width: 100%; max-height: 86vh; overflow-y: auto; position: relative;
}
.bp-modal-close { position: absolute; top: 16px; left: 16px; border: none; background: none; font-size: 28px; cursor: pointer; color: var(--bp-muted); line-height: 1; }
.bp-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.bp-versions-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bp-share-box {
    margin-top: 14px; padding: 14px 16px; border: 1px solid var(--bp-border);
    border-radius: 10px; background: var(--bp-bg);
}
.bp-share-link-row { display: flex; gap: 8px; margin: 8px 0; }
.bp-share-link-row .bp-input { flex: 1; font-family: monospace; font-size: 12px; direction: ltr; text-align: left; }
.bp-version-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid var(--bp-border); border-radius: 10px; padding: 12px 16px;
}
.bp-version-info { display: flex; flex-direction: column; gap: 3px; }
.bp-version-date { font-size: 13px; font-weight: 600; color: var(--bp-text); }
.bp-version-note { font-size: 12px; color: var(--bp-muted); }
.bp-plan-card { border: 2px solid var(--bp-border); border-radius: 12px; padding: 20px; text-align: center; }
.bp-plan-card h3 { font-size: 18px; margin: 0 0 8px; }
.bp-plan-price { font-size: 22px; font-weight: 800; color: var(--bp-primary); margin: 10px 0; }
.bp-plan-features { list-style: none; padding: 0; margin: 14px 0; font-size: 13px; text-align: right; }
.bp-plan-features li { padding: 5px 0; color: var(--bp-muted); display: flex; align-items: flex-start; gap: 7px; }
.bp-feat-mark { flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; margin-top: 2px; }
.bp-feat-yes .bp-feat-mark { background: #dcfce7; color: #16a34a; }
.bp-feat-no .bp-feat-mark { background: #f1f5f9; color: #94a3b8; }
.bp-feat-no { color: #94a3b8; }

/* AI modal */
.bp-ai-modes { display: flex; gap: 10px; margin-bottom: 18px; }
.bp-ai-mode.active { background: var(--bp-primary); color: #fff; border-color: var(--bp-primary); }
.bp-ai-result { min-height: 120px; padding: 16px; background: #f8fafc; border-radius: 10px; font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.bp-ai-actions { display: flex; gap: 12px; margin-top: 16px; }
.bp-ai-loading { text-align: center; color: var(--bp-muted); padding: 30px; }

/* Toast */
.bp-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 99999;
    background: var(--bp-text); color: #fff; padding: 14px 22px; border-radius: 10px;
    font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.bp-toast.success { background: var(--bp-success); }
.bp-toast.error { background: var(--bp-danger); }

/* وضعیت‌ها */
.bp-loading, .bp-empty { text-align: center; color: var(--bp-muted); padding: 40px; grid-column: 1 / -1; }
.bp-login-notice { text-align: center; padding: 50px 20px; }
.bp-login-notice .bizplan-btn, .bizplan-login-notice .bizplan-btn {
    display: inline-block; margin-top: 16px; padding: 12px 28px;
    background: var(--bp-primary, #1a56db); color: #fff; border-radius: 8px; text-decoration: none;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 900px) {
    .bp-editor-layout { grid-template-columns: 1fr; }
    .bp-editor-preview { display: none; }
    .bp-output-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .bizplan-app { padding: 12px; }
    .bp-header-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .bp-instances-grid, .bp-forms-grid { grid-template-columns: 1fr; }
    .bp-sub-bar { flex-wrap: wrap; }
    .bp-sub-bar .bp-btn-upgrade { margin-right: 0; width: 100%; }
    .bp-editor-actions { flex-direction: column; }
    .bp-ai-modes { flex-direction: column; }
}

/* ===== نسخه مهمان ===== */
.bizplan-guest { padding: 0; }
.bp-guest-hero {
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-primary-dark));
    color: #fff;
    border-radius: var(--bp-radius);
    padding: 50px 30px;
    text-align: center;
    margin-bottom: 30px;
}
.bp-guest-title { font-size: 28px; font-weight: 800; margin: 0 0 14px; color: #fff; }
.bp-guest-sub { font-size: 16px; opacity: 0.95; max-width: 600px; margin: 0 auto 26px; line-height: 1.9; }
.bp-guest-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bp-guest-actions .bp-btn { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.4); }
.bp-guest-actions .bp-btn-primary { background: #fff; color: var(--bp-primary); border-color: #fff; }
.bp-guest-section-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; }
.bp-card-highlight { border-color: var(--bp-primary); box-shadow: 0 8px 24px rgba(26,86,219,0.18); }
.bp-card-cta { color: var(--bp-primary); font-weight: 600; text-decoration: none; }
.bp-guest-cta-bottom {
    text-align: center;
    margin-top: 30px;
    padding: 26px;
    background: var(--bp-surface);
    border: 1px dashed var(--bp-border);
    border-radius: var(--bp-radius);
}
.bp-guest-cta-bottom p { margin: 0 0 14px; color: var(--bp-muted); }

/* ===== راهنمای مستقل ===== */
.bizplan-guide-standalone { padding: 0; }
.bp-guide-box {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 30px 34px;
}
.bp-guide-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--bp-primary);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--bp-border);
}
.bp-guide-content { line-height: 2; color: var(--bp-text); }
.bp-guide-content h2 { font-size: 20px; color: var(--bp-primary); margin: 26px 0 12px; }
.bp-guide-content h3 { font-size: 17px; color: var(--bp-text); margin: 20px 0 10px; }
.bp-guide-content h4 { font-size: 15px; color: var(--bp-primary-dark); margin: 16px 0 6px; }
.bp-guide-content ul { padding-right: 22px; margin: 10px 0; }
.bp-guide-content li { margin-bottom: 8px; }
.bp-guide-content p { margin: 0 0 12px; }
.bp-guide-content hr { border: none; border-top: 1px solid var(--bp-border); margin: 20px 0; }
.bp-guide-content strong { color: var(--bp-primary-dark); }

/* ===== کنترل صفحه‌بندی و فونت ===== */
.bp-hint-text { font-size: 12px; color: var(--bp-muted); margin: 0 0 10px; }
.bp-page-breaks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.bp-pagebreak-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; padding: 6px 10px;
    background: var(--bp-bg); border-radius: 6px; cursor: pointer;
}
.bp-pagebreak-row input { margin: 0; }
.bp-logo-field { position: relative; }
.bp-logo-field .bp-btn-sm { margin-top: 6px; }

/* ===== نمایش مرحله‌به‌مرحله ===== */
.bp-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    flex-wrap: wrap;
}
.bp-step-indicator { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.bp-step-dots { display: flex; gap: 6px; }
.bp-step-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--bp-border); transition: all 0.2s;
}
.bp-step-dot.active { background: var(--bp-primary); transform: scale(1.3); }
.bp-step-dot.done { background: var(--bp-success); }
.bp-step-label { font-size: 13px; color: var(--bp-muted); font-weight: 600; }

/* فیلد دلخواه */
.bp-add-custom-field {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: none;
    border: 1px dashed var(--bp-primary);
    border-radius: 8px;
    color: var(--bp-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.18s;
}
.bp-add-custom-field:hover { background: #eff6ff; }
.bp-custom-field { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 12px; }
.bp-cf-remove {
    border: none; background: none; color: var(--bp-danger);
    font-size: 16px; cursor: pointer; float: left;
}

/* ===== داشبورد بهبودیافته ===== */
.bp-welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-primary-dark));
    color: #fff;
    border-radius: var(--bp-radius);
    padding: 28px 30px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.bp-welcome-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.bp-welcome-sub { font-size: 14px; opacity: 0.92; margin: 0; }
.bp-welcome-banner .bp-btn-primary { background: #fff; color: var(--bp-primary); border-color: #fff; }

.bp-section-heading { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.bp-quick-forms { margin-bottom: 30px; }
.bp-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.bp-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 14px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.18s;
}
.bp-quick-card:hover {
    border-color: var(--bp-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.bp-quick-icon { font-size: 26px; }
.bp-quick-name { font-size: 13px; font-weight: 600; color: var(--bp-text); line-height: 1.5; }

/* ---------- جستجوی فرم‌ها در فرم‌ساز ---------- */
.bp-forms-search { max-width: 700px; margin: 0 0 22px; }
.bp-forms-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--bp-surface, #fff); border: 1px solid var(--bp-border, #e2e8f0);
    border-radius: 12px; padding: 10px 16px;
}
.bp-forms-search-bar svg { color: var(--bp-muted, #64748b); flex-shrink: 0; }
.bp-forms-search-bar input {
    flex: 1; border: none; background: none; outline: none;
    font-family: inherit; font-size: 14px; color: var(--bp-text, #1e293b); min-width: 0;
}
.bp-forms-search-advanced { display: none; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.bp-forms-search-advanced.open { display: flex; }
.bp-forms-search-advanced select {
    flex: 1; min-width: 150px; padding: 9px 12px; border: 1px solid var(--bp-border, #e2e8f0);
    border-radius: 8px; background: var(--bp-surface, #fff); color: var(--bp-text, #1e293b); font-family: inherit; font-size: 13px;
}
