.sf-overlay { position: fixed; inset: 0; z-index: 2147483000; display: none; }
.sf-overlay.sf-open { display: block; }

.sf-backdrop {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(160,10,20,0.35), rgba(0,0,0,0.92) 70%);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.sf-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    max-height: 92vh; display: flex; flex-direction: column;
    margin: 0 auto; width: 100%; max-width: 520px;
    background: linear-gradient(170deg, rgba(18,10,12,0.97), rgba(6,6,8,0.98));
    border: 1px solid rgba(255,70,70,0.3); border-bottom: none;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 50px rgba(255,0,40,0.18);
    font-family: Vazirmatn, Tahoma, sans-serif; color: #f2f2f2; direction: rtl;
    animation: sf-rise 0.35s cubic-bezier(.2,.8,.2,1);
}

@keyframes sf-rise { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sf-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sf-head-title { font-size: 13px; letter-spacing: 3px; color: #ff8a80; font-weight: 700; }
.sf-close {
    background: rgba(255,255,255,0.07); border: none; color: #eee;
    width: 30px; height: 30px; border-radius: 50%; font-size: 14px; cursor: pointer;
}

.sf-progress { height: 3px; background: rgba(255,255,255,0.06); }
.sf-progress-bar {
    height: 100%; width: 0%; background: linear-gradient(90deg, #b3001b, #ff4d4d);
    box-shadow: 0 0 10px rgba(255,60,60,0.6); transition: width 0.3s ease;
}

.sf-body { padding: 18px 18px 26px; overflow-y: auto; }

.sf-stack { display: flex; flex-direction: column; gap: 12px; }
.sf-center { align-items: center; text-align: center; }

.sf-title { font-size: 19px; font-weight: 800; color: #ff8a80; margin: 4px 0; }
.sf-text { font-size: 13.5px; line-height: 1.9; color: rgba(255,255,255,0.8); margin: 0; }
.sf-hint { font-size: 12px; color: rgba(255,255,255,0.5); margin: 0; line-height: 1.7; }

.sf-field { display: flex; flex-direction: column; gap: 6px; }
.sf-label { font-size: 12px; color: rgba(255,255,255,0.6); }

.sf-input {
    width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
    padding: 11px 13px; color: #fff; font-size: 14px; font-family: inherit; outline: none;
}
.sf-input:focus { border-color: rgba(255,80,80,0.6); box-shadow: 0 0 0 3px rgba(255,60,60,0.12); }
.sf-area { resize: vertical; min-height: 60px; }

.sf-check {
    display: flex; align-items: center; gap: 10px; font-size: 13px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.sf-check input { width: 18px; height: 18px; accent-color: #ff4d4d; }

.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px; padding: 8px 14px; font-size: 12.5px;
}
.sf-chip:has(input:checked) { background: rgba(255,60,60,0.18); border-color: rgba(255,80,80,0.6); }
.sf-chk { accent-color: #ff4d4d; }

.sf-file {
    width: 100%; box-sizing: border-box; padding: 14px; border-radius: 12px;
    border: 1px dashed rgba(255,80,80,0.5); background: rgba(255,60,60,0.06);
    color: #ffd0cc; font-size: 13px; font-family: inherit;
}
.sf-files { display: flex; flex-direction: column; gap: 6px; }
.sf-file-row {
    display: flex; align-items: center; gap: 8px; font-size: 12px;
    background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 10px;
}
.sf-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; }
.sf-file-size { color: rgba(255,255,255,0.5); }

.sf-sum-row {
    display: flex; justify-content: space-between; gap: 10px; font-size: 13px;
    padding: 9px 2px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sf-sum-label { color: rgba(255,255,255,0.55); }
.sf-sum-value { color: #fff; text-align: left; }

.sf-nav { display: flex; gap: 10px; margin-top: 8px; }
.sf-btn {
    flex: 1; border: none; border-radius: 14px; padding: 13px 10px;
    font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
    color: #fff; transition: transform 0.15s ease;
}
.sf-btn:active { transform: scale(0.98); }
.sf-btn:disabled { opacity: 0.5; }
.sf-btn-main { background: linear-gradient(135deg, #b3001b, #7a0012); box-shadow: 0 6px 20px rgba(255,0,40,0.3); }
.sf-btn-danger { background: linear-gradient(135deg, #ff1f3d, #9a0014); box-shadow: 0 6px 24px rgba(255,0,40,0.45); }
.sf-btn-ghost { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); }
.sf-btn-small { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }

.sf-error {
    margin-top: 6px; font-size: 13px; color: #ffb3ad; text-align: center;
    background: rgba(255,40,60,0.12); border: 1px solid rgba(255,60,60,0.3);
    border-radius: 12px; padding: 10px;
}
.sf-note { font-size: 12.5px; color: #9be89b; text-align: center; padding-top: 6px; }

.sf-done-icon {
    width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #5dffc0; border: 1px solid rgba(93,255,192,0.5);
    background: rgba(93,255,192,0.12); box-shadow: 0 0 24px rgba(93,255,192,0.25);
}
.sf-case {
    font-family: 'Courier New', monospace; font-size: 22px; font-weight: 800; letter-spacing: 2px;
    color: #5dffc0; border: 1px solid rgba(93,255,192,0.4); border-radius: 12px; padding: 10px 18px;
    text-shadow: 0 0 10px rgba(93,255,192,0.5); direction: ltr;
}

