/* ── ادمین ── */
.sfb-wrap { direction: rtl; font-family: Tahoma, sans-serif; }
.sfb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.sfb-title-input { font-size: 18px !important; padding: 8px 12px !important; flex: 1; min-width: 200px; border-radius: 8px !important; }
.sfb-check { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.sfb-layout { display: grid; grid-template-columns: 1fr 200px; gap: 20px; }
.sfb-canvas { background: #f9f9f9; border: 1px solid #ddd; border-radius: 10px; padding: 20px; min-height: 300px; }
.sfb-canvas h3, .sfb-sidebar h3 { margin: 0 0 14px; font-size: 14px; color: #555; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.sfb-sidebar { background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 16px; }
.sfb-field-types { display: flex; flex-direction: column; gap: 6px; }
.sfb-add-field { background: #f0f6ff; border: 1px solid #c5d8f5; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; text-align: right; transition: all .15s; }
.sfb-add-field:hover { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.sfb-empty { color: #aaa; text-align: center; margin-top: 40px; }
.sfb-hint { font-size: 12px; color: #aaa; margin-top: 10px; }

.sfb-field-item { background: #fff; border: 1.5px solid #e0e0e0; border-radius: 10px; margin-bottom: 10px; overflow: hidden; transition: border-color .2s; }
.sfb-field-item:hover { border-color: #1a73e8; }
.sfb-field-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f9f9f9; border-bottom: 1px solid #eee; }
.sfb-field-icon { font-size: 16px; }
.sfb-field-label { flex: 1; border: none; background: transparent; font-size: 14px; font-weight: 600; outline: none; font-family: inherit; }
.sfb-field-actions { display: flex; gap: 4px; }
.sfb-field-actions button { background: #eee; border: none; border-radius: 5px; padding: 4px 8px; cursor: pointer; font-size: 12px; }
.sfb-remove { background: #ffebee !important; color: #c62828 !important; }
.sfb-move-up, .sfb-move-down { background: #e8f0fe !important; color: #1a73e8 !important; }
.sfb-field-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.sfb-field-body label { font-size: 12px; color: #555; display: flex; flex-direction: column; gap: 4px; }
.sfb-field-body input[type=text], .sfb-field-body textarea { border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; font-size: 13px; font-family: inherit; direction: rtl; }
.sfb-field-body textarea { min-height: 80px; resize: vertical; }
.sfb-req-label { flex-direction: row !important; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #333 !important; }

.sfb-table { direction: rtl; }
.sfb-table th, .sfb-table td { text-align: right !important; padding: 10px 14px !important; }

/* ── فرانت ── */
.sfb-form { max-width: 680px; margin: 0 auto; }
.sfb-form * { box-sizing: border-box; }
.sfb-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.sfb-field label { font-size: 13px; font-weight: 600; color: #444; }
.sfb-field label em { color: #e53935; font-style: normal; }
.sfb-field input[type=text],
.sfb-field input[type=tel],
.sfb-field input[type=email],
.sfb-field input[type=number],
.sfb-field input[type=date],
.sfb-field select,
.sfb-field textarea { width: 100%; padding: 10px 13px; border: 1.5px solid #ddd; border-radius: 9px; font-size: 14px; color: #222; background: #fafafa; outline: none; direction: rtl; transition: border .2s, box-shadow .2s; font-family: inherit; }
.sfb-field input:focus, .sfb-field select:focus, .sfb-field textarea:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.1); background: #fff; }
.sfb-field textarea { resize: vertical; min-height: 100px; }
.sfb-options { display: flex; flex-direction: column; gap: 8px; }
.sfb-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.sfb-upload { border: 2px dashed #ccc; border-radius: 11px; padding: 24px; text-align: center; cursor: pointer; background: #fafafa; transition: all .2s; margin-bottom: 8px; }
.sfb-upload:hover { border-color: #1a73e8; background: #f0f6ff; }
.sfb-upload div { font-size: 28px; margin-bottom: 6px; }
.sfb-upload strong { display: block; font-size: 14px; color: #333; margin-bottom: 3px; }
.sfb-upload span { font-size: 12px; color: #888; }
.sfb-prev { display: flex; flex-wrap: wrap; gap: 8px; }
.sfb-btn { width: 100%; background: linear-gradient(135deg,#1a73e8,#0d47a1); color: #fff; border: none; border-radius: 11px; padding: 14px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: opacity .2s; font-family: inherit; }
.sfb-btn:hover { opacity: .9; }
.sfb-success { text-align: center; padding: 50px 20px; }
.sfb-success h3 { color: #2e7d32; font-size: 20px; margin: 0 0 8px; }
.sfb-success p { color: #666; font-size: 14px; }
.sfb-errors { background: #fff3f3; border: 1px solid #fcc; color: #c62828; padding: 12px 16px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.sfb-errors p { margin: 4px 0; }
