/* ════════════════════════════════════════════════════════════════
   Omid Stories — Complete Stylesheet v4.0 (Categories + Fixed)
   ✅ راست‌چین واقعی
   ✅ فونت سایت (inherit)
   ✅ نوار دسته‌بندی با آیکون اختصاصی
   ✅ دکمه بستن در سمت چپ
   ✅ بَج بالا در سمت راست
   ✅ نوار progress از راست
   ✅ نوارهای دیده‌شده کم‌رنگ
   ✅ Tap zones درست
   ✅ مدال آپلود انیمیشن صحیح
   ════════════════════════════════════════════════════════════════ */

:root {
    --om-brand:        #004851;
    --om-brand-hover:  #005a65;
    --om-brand-light:  #00707e;
    --om-accent:       #92842c;
    --om-accent-hover: #a8983a;
    --om-accent-light: #d4a843;

    --om-text-dark:    #1a1a1a;
    --om-text-gray:    #666666;
    --om-text-light:   #999999;
    --om-bg-light:     #f5f5f5;
    --om-bg-lighter:   #fafafa;
    --om-border:       #e0e0e0;
    --om-white:        #ffffff;

    --om-success:      #2d8659;
    --om-warning:      #b08600;
    --om-error:        #c0392b;

    --om-radius:       14px;
    --om-radius-sm:    10px;
    --om-radius-lg:    20px;
    --story-size:      68px;
    --cat-size:        64px;

    --om-shadow-sm:    0 2px 8px rgba(0, 72, 81, 0.08);
    --om-shadow-md:    0 4px 16px rgba(0, 72, 81, 0.12);
    --om-shadow-lg:    0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ─── جلوگیری از scroll هنگام modal/viewer ─── */
body.omid-no-scroll {
    overflow: hidden !important;
}

/* ════════════════════════════════════════════════════════════════
   ⚠️ فونت از سایت ارث می‌برد
   ════════════════════════════════════════════════════════════════ */

.omid-stories-section,
.omid-stories-section *,
.omid-cats-section,
.omid-cats-section *,
.omid-sv,
.omid-sv *,
.omid-upload-modal,
.omid-upload-modal * {
    font-family: inherit !important;
}

/* ════════════════════════════════════════════════════════════════
   ⚠️ Pause indicator همیشه مخفی
   ════════════════════════════════════════════════════════════════ */

.omid-sv-paused-indicator,
.omid-sv-paused-indicator.show {
    display: none !important;
}

/* ════════════════════════════════════════════════════════════════
   ⭐⭐⭐ 1. نوار دسته‌بندی استوری‌ها (جدید)
   ════════════════════════════════════════════════════════════════ */

.omid-cats-section {
    background: var(--om-white);
    padding: 14px 0;
    border-bottom: 1px solid var(--om-border);
    direction: rtl;
}

.omid-cats-bar {
    display: flex;
    flex-direction: row;
    gap: 14px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    direction: rtl;
    justify-content: flex-start;
}

.omid-cats-bar::-webkit-scrollbar {
    display: none;
}

.omid-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    width: calc(var(--cat-size) + 12px);
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    direction: rtl;
    text-decoration: none !important;
}

.omid-cat-item:active {
    transform: scale(0.92);
}

.omid-cat-ring {
    width: var(--cat-size);
    height: var(--cat-size);
    border-radius: 50%;
    padding: 2.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--om-brand) 0%, var(--om-accent) 100%);
    transition: all 0.3s ease;
}

.omid-cat-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--om-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--om-brand);
}

.omid-cat-icon img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    display: block;
}

.omid-cat-icon svg {
    width: 28px;
    height: 28px;
}

.omid-cat-name {
    font-size: 12px;
    color: var(--om-text-dark);
    text-align: center;
    max-width: calc(var(--cat-size) + 14px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    direction: rtl;
}

/* ─── دسته دیده‌شده (همه استوری‌هایش دیده شده) ─── */
.omid-cat-item.viewed .omid-cat-ring {
    background: linear-gradient(135deg, #c4c4c4 0%, #999999 100%);
    opacity: 0.75;
}

.omid-cat-item.viewed .omid-cat-name {
    color: var(--om-text-gray);
}

/* ─── دسته فعال (هایلایت) ─── */
.omid-cat-item.active .omid-cat-ring {
    background: linear-gradient(135deg, var(--om-accent) 0%, var(--om-accent-light) 50%, var(--om-accent) 100%);
}

.omid-cat-item.active .omid-cat-name {
    color: var(--om-brand);
    font-weight: 700;
}

/* ─── Hover برای دسکتاپ ─── */
@media (hover: hover) {
    .omid-cat-item:hover .omid-cat-ring {
        transform: scale(1.05);
    }
}

/* ─── پیام «دسته‌ای موجود نیست» ─── */
.omid-no-cats {
    color: var(--om-text-light);
    font-size: 13px;
    text-align: center;
    padding: 20px;
    width: 100%;
    direction: rtl;
}

/* ════════════════════════════════════════════════════════════════
   2. نوار استوری‌ها (در صورت استفاده هنوز)
   ════════════════════════════════════════════════════════════════ */

.omid-stories-section {
    background: var(--om-white);
    border-bottom: 1px solid var(--om-border);
    direction: rtl;
}

.omid-stories-bar {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 14px 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    direction: rtl;
    justify-content: flex-start;
}

.omid-stories-bar::-webkit-scrollbar { display: none; }

.omid-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    width: calc(var(--story-size) + 8px);
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    direction: rtl;
}

.omid-story-item:active { transform: scale(0.95); }

.omid-story-ring {
    width: calc(var(--story-size) + 6px);
    height: calc(var(--story-size) + 6px);
    border-radius: 50%;
    padding: 2.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--om-brand) 0%, var(--om-accent) 100%);
}

.omid-ring-admin {
    background: linear-gradient(135deg, var(--om-accent) 0%, var(--om-accent-light) 50%, var(--om-accent) 100%);
}

.omid-ring-user {
    background: linear-gradient(135deg, var(--om-brand) 0%, var(--om-brand-light) 100%);
}

/* ─── حلقه استوری دیده‌شده ─── */
.omid-story-ring.viewed,
.omid-story-item.viewed .omid-story-ring {
    background: linear-gradient(135deg, #c4c4c4 0%, #999999 100%) !important;
    opacity: 0.65;
}

.omid-story-item.viewed .omid-story-avatar {
    opacity: 0.85;
}

.omid-story-item.viewed .omid-story-name {
    color: var(--om-text-gray);
}

.omid-story-ring-add {
    background: var(--om-bg-light);
    border: 2px dashed #c0c0c0;
    padding: 0;
}

.omid-story-avatar {
    width: var(--story-size);
    height: var(--story-size);
    border-radius: 50%;
    overflow: hidden;
    background: var(--om-bg-light);
    border: 2.5px solid var(--om-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.omid-story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.omid-video-thumb {
    width: 100%;
    height: 100%;
    background: var(--om-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--om-white);
    font-size: 22px;
}

.omid-add-icon {
    font-size: 30px;
    color: var(--om-text-gray);
    line-height: 1;
    font-weight: 300;
}

.omid-story-name {
    font-size: 11px;
    color: var(--om-text-dark);
    text-align: center;
    max-width: calc(var(--story-size) + 8px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: rtl;
}

.omid-story-badge {
    color: var(--om-brand);
    font-size: 9px;
    font-weight: bold;
    margin-right: 2px;
}

.omid-no-stories {
    color: var(--om-text-light);
    font-size: 13px;
    align-self: center;
    margin: 0;
    direction: rtl;
}

/* ════════════════════════════════════════════════════════════════
   3. STORY VIEWER
   ════════════════════════════════════════════════════════════════ */

.omid-sv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99990;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.omid-sv {
    position: fixed;
    inset: 0;
    z-index: 99995;
    background: #000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
}

@media (min-width: 768px) {
    .omid-sv {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: min(420px, 95vw);
        height: min(90vh, 820px);
        border-radius: 24px;
        box-shadow: var(--om-shadow-lg);
    }
}

/* ════════════════════════════════════════════════════════════════
   ⚠️ Progress Bars
   ════════════════════════════════════════════════════════════════ */

.omid-sv .omid-sv-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 10px 14px 8px;
    z-index: 15;
    background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
    direction: rtl;
}

.omid-sv .omid-sv-pb-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.omid-sv .omid-sv-pb-track .omid-sv-pb-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: #ffffff;
    will-change: width;
}

.omid-sv .omid-sv-pb-track .omid-sv-pb-fill.active {
    background: #ffffff;
}

.omid-sv .omid-sv-pb-track .omid-sv-pb-fill.done,
.omid-sv .omid-sv-progress .omid-sv-pb-fill.done,
#omid-sv-progress .omid-sv-pb-fill.done {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    animation: none !important;
    -webkit-animation: none !important;
    animation-name: none !important;
    -webkit-animation-name: none !important;
    animation-duration: 0s !important;
    -webkit-animation-duration: 0s !important;
}

@keyframes omidProg {
    from { width: 0%; }
    to   { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════
   ⚠️ دکمه بستن — ⭐ سمت چپ
   ════════════════════════════════════════════════════════════════ */

.omid-sv-close {
    position: absolute;
    top: 24px;
    left: 16px;       /* ⭐ تغییر یافت: قبلا right بود */
    right: auto;
    z-index: 30;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--om-text-dark);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s, background 0.2s;
    padding: 0;
}

.omid-sv-close:hover {
    transform: scale(1.1);
    background: var(--om-white);
}

.omid-sv-close:active {
    transform: scale(0.92);
}

/* ════════════════════════════════════════════════════════════════
   ⚠️ بَج بالا — ⭐ سمت راست
   ════════════════════════════════════════════════════════════════ */

.omid-sv-top-badge {
    position: absolute;
    top: 24px;
    right: 16px;      /* ⭐ تغییر یافت: قبلا left بود */
    left: auto;
    z-index: 16;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 6px 8px 6px 14px;
    box-shadow: var(--om-shadow-md);
    direction: rtl;
}

.omid-sv-badge-content {
    text-align: right;
    line-height: 1.3;
}

.omid-sv-badge-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--om-text-dark);
}

.omid-sv-badge-sub {
    font-size: 10px;
    color: var(--om-text-gray);
    margin-top: 2px;
}

.omid-sv-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-brand), var(--om-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--om-white);
    font-size: 16px;
    flex-shrink: 0;
}

/* ─── میدیا اصلی ─── */
.omid-sv-media {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.omid-sv-media img,
.omid-sv-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── متن روی استوری ─── */
.omid-sv-text {
    position: absolute;
    top: 80px;
    right: 20px;
    left: 20px;
    z-index: 12;
    color: var(--om-white);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.9;
    text-align: right;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    max-height: 45vh;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: var(--om-radius);
    backdrop-filter: blur(2px);
    direction: rtl;
}

.omid-sv-text::-webkit-scrollbar { display: none; }

.omid-sv-text .highlight {
    color: var(--om-accent-light);
    background: none;
    font-weight: 700;
}

.omid-sv-text .highlight-gold {
    color: var(--om-accent);
    background: none;
    font-weight: 700;
}

.omid-sv-text .highlight-brand {
    color: #5DD9E5;
    background: none;
    font-weight: 700;
}

/* ─── کارت پروژه ─── */
.omid-sv-project-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 48px);
    max-width: 340px;
    z-index: 12;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--om-shadow-lg);
    backdrop-filter: blur(10px);
    direction: rtl;
}

.omid-sv-pcard-image {
    width: 100%;
    height: 180px;
    background: var(--om-bg-light);
    position: relative;
    overflow: hidden;
}

.omid-sv-pcard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.omid-sv-pcard-info {
    padding: 16px;
    text-align: right;
    direction: rtl;
}

.omid-sv-pcard-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--om-text-dark);
    margin: 0 0 14px;
    line-height: 1.7;
    text-align: right;
}

.omid-sv-pcard-progress {
    margin-bottom: 10px;
}

.omid-sv-pcard-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    direction: ltr;
}

.omid-sv-pcard-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--om-brand), var(--om-accent));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.omid-sv-pcard-amount {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--om-text-gray);
    flex-wrap: wrap;
    direction: rtl;
}

.omid-sv-pcard-raised {
    color: var(--om-brand);
    font-weight: 700;
    font-size: 13px;
}

.omid-sv-pcard-goal {
    font-weight: 600;
    color: var(--om-text-dark);
}

.omid-sv-pcard-sep {
    color: var(--om-text-light);
}

/* ════════════════════════════════════════════════════════════════
   دکمه‌های پایین
   ════════════════════════════════════════════════════════════════ */

.omid-sv-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25 !important;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
    background: linear-gradient(to top, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.3) 80%, transparent);
    direction: rtl;
    pointer-events: auto !important;
}

.omid-sv-btn {
    flex: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.12s, background 0.2s, color 0.2s;
    min-height: 50px;
    box-sizing: border-box;
    position: relative;
    z-index: 26;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.omid-sv-btn:active { transform: scale(0.97); }

.omid-sv-btn-primary {
    background: var(--om-brand) !important;
    color: var(--om-white) !important;
    box-shadow: 0 6px 20px rgba(0, 72, 81, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.omid-sv-btn-primary:hover,
.omid-sv-btn-primary:visited {
    background: var(--om-brand-hover) !important;
    color: var(--om-white) !important;
}

.omid-sv-btn-secondary {
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--om-text-dark) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.omid-sv-btn-secondary:hover,
.omid-sv-btn-secondary:visited {
    background: var(--om-white) !important;
    color: var(--om-brand) !important;
}

/* ─── ناوبری Desktop ─── */
.omid-sv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 18;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--om-white);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(6px);
    padding: 0;
}

.omid-sv-nav:hover { background: rgba(255, 255, 255, 0.3); }
.omid-sv-nav-prev { right: -50px; }
.omid-sv-nav-next { left: -50px; }

@media (min-width: 1024px) {
    .omid-sv-nav { display: flex; }
}

/* ════════════════════════════════════════════════════════════════
   Tap Zones — RTL
   ════════════════════════════════════════════════════════════════ */

.omid-sv-tap {
    position: absolute;
    top: 100px;
    bottom: 140px;
    width: 30%;
    z-index: 8;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
}

.omid-sv-tap-prev,
.omid-sv-tap-right {
    right: 0 !important;
    left: auto !important;
}

.omid-sv-tap-next,
.omid-sv-tap-left {
    left: 0 !important;
    right: auto !important;
}

/* ════════════════════════════════════════════════════════════════
   4. UPLOAD MODAL
   ════════════════════════════════════════════════════════════════ */

.omid-upload-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99996;
    max-height: 92dvh;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: var(--om-radius-lg) var(--om-radius-lg) 0 0;
    background: var(--om-white);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    direction: rtl;
    text-align: right;
    animation: omidSlideFromBottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom center;
}

@keyframes omidSlideFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .omid-upload-modal {
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        max-width: 480px;
        width: 90%;
        border-radius: var(--om-radius-lg);
        animation: omidModalDesktop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes omidModalDesktop {
        from {
            transform: translate(-50%, -45%) scale(0.92);
            opacity: 0;
        }
        to {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }
    }
}

.omid-upload-modal-inner {
    padding: 24px 20px 32px;
    direction: rtl;
    text-align: right;
}

.omid-upload-modal-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--om-bg-light);
}

.omid-upload-modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: var(--om-brand);
    font-weight: 700;
    text-align: right;
}

.omid-modal-close {
    background: var(--om-bg-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--om-text-gray);
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.omid-modal-close:hover {
    background: var(--om-brand);
    color: var(--om-white);
}

/* ─── Drop area ─── */
.omid-drop-area {
    border: 2px dashed #d0d5dd;
    border-radius: var(--om-radius);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--om-bg-lighter);
    margin-bottom: 16px;
    direction: rtl;
}

.omid-drop-area.drag-over {
    border-color: var(--om-brand);
    background: rgba(0, 72, 81, 0.05);
}

.omid-drop-icon {
    color: var(--om-brand);
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.omid-drop-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--om-text-dark);
    margin: 0 0 8px;
    text-align: center;
}

.omid-drop-hint {
    font-size: 12px;
    color: var(--om-text-gray);
    margin: 0 0 16px;
    line-height: 1.7;
    text-align: center;
}

.omid-file-preview {
    border-radius: var(--om-radius);
    overflow: hidden;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.omid-file-preview img,
.omid-file-preview video {
    max-height: 260px;
    max-width: 100%;
    object-fit: contain;
}

/* ─── Progress bar آپلود ─── */
.omid-progress-bar-wrap {
    background: var(--om-bg-light);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    direction: ltr;
}

.omid-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--om-brand), var(--om-accent));
    border-radius: 8px;
    transition: width 0.3s ease;
}

#omid-upload-percent {
    text-align: center;
    font-size: 13px;
    color: var(--om-brand);
    font-weight: 600;
    margin: 0;
}

/* ─── فیلدها ─── */
.omid-field-group {
    margin-bottom: 16px;
    direction: rtl;
    text-align: right;
}

.omid-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--om-text-dark);
    margin-bottom: 6px;
    text-align: right;
}

.omid-field-group textarea,
.omid-field-group input[type="url"],
.omid-field-group input[type="text"],
.omid-field-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--om-border);
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--om-white);
    color: var(--om-text-dark);
    text-align: right;
    direction: rtl;
}

.omid-field-group input[type="url"] {
    direction: ltr;
    text-align: left;
}

.omid-field-group textarea:focus,
.omid-field-group input:focus,
.omid-field-group select:focus {
    outline: none;
    border-color: var(--om-brand);
    box-shadow: 0 0 0 3px rgba(0, 72, 81, 0.1);
}

.omid-char-count {
    font-size: 11px;
    color: var(--om-text-light);
    display: block;
    margin-top: 4px;
    text-align: left;
}

.omid-field-hint {
    font-size: 11px;
    color: var(--om-text-light);
    margin: 4px 0 0;
    line-height: 1.6;
    text-align: right;
}

/* ─── پیام وضعیت ─── */
.omid-story-status-note {
    margin-top: 12px;
    direction: rtl;
}

.status-admin {
    background: rgba(45, 134, 89, 0.1);
    color: var(--om-success);
    border: 1px solid rgba(45, 134, 89, 0.25);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}

.status-user {
    background: rgba(176, 134, 0, 0.1);
    color: var(--om-warning);
    border: 1px solid rgba(176, 134, 0, 0.25);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}

/* ─── دکمه‌های مدال ─── */
.omid-upload-modal-footer {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
    direction: rtl;
}

.omid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s, color 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
}

.omid-btn:active { transform: scale(0.97); }

.omid-btn-primary {
    flex: 1;
    background: var(--om-brand);
    color: var(--om-white);
}

.omid-btn-primary:hover:not(:disabled) {
    background: var(--om-brand-hover);
    color: var(--om-white);
}

.omid-btn-primary:disabled {
    background: #b0c4c7;
    cursor: not-allowed;
}

.omid-btn-outline {
    background: transparent;
    border: 1.5px solid var(--om-brand);
    color: var(--om-brand);
}

.omid-btn-outline:hover {
    background: var(--om-brand);
    color: var(--om-white);
}

.omid-btn-ghost {
    background: var(--om-bg-light);
    color: var(--om-text-gray);
}

.omid-btn-ghost:hover {
    background: var(--om-border);
    color: var(--om-text-dark);
}

.omid-btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════
   پیام نتیجه — طراحی زیبا
   ════════════════════════════════════════════════════════════════ */

.omid-result-card {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(0, 72, 81, 0.03), rgba(146, 132, 44, 0.03));
    border-radius: var(--om-radius);
    border: 1px solid rgba(0, 72, 81, 0.1);
    direction: rtl;
}

.omid-result-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-brand), var(--om-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 72, 81, 0.25);
    position: relative;
    animation: omidPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.omid-result-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--om-brand), var(--om-accent));
    opacity: 0.2;
    z-index: -1;
    animation: omidPulse 2s ease-out infinite;
}

@keyframes omidPopIn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes omidPulse {
    0%   { transform: scale(1);   opacity: 0.4; }
    100% { transform: scale(1.5); opacity: 0; }
}

.omid-result-icon-wrap svg {
    color: white;
    width: 40px;
    height: 40px;
}

.omid-result-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--om-brand);
    margin: 0 0 12px;
    line-height: 1.4;
}

.omid-result-msg {
    font-size: 14px;
    color: var(--om-text-gray);
    margin: 0 0 24px;
    line-height: 1.9;
    padding: 0 12px;
}

.omid-result-info-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 72, 81, 0.12);
    border-radius: var(--om-radius-sm);
    padding: 12px 16px;
    margin: 0 0 20px;
    font-size: 12px;
    color: var(--om-text-gray);
    text-align: center;
    line-height: 1.7;
}

.omid-result-info-box strong {
    color: var(--om-brand);
}

.omid-result-error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: 10px;
    padding: 16px;
    color: var(--om-error);
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    direction: rtl;
}

.omid-upload-error-msg {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    border-radius: 8px;
    padding: 12px;
    color: var(--om-error);
    font-size: 13px;
    margin-bottom: 10px;
    text-align: right;
    direction: rtl;
}

/* ─── لاگین وال ─── */
.omid-login-wall {
    text-align: center;
    padding: 32px 20px;
    direction: rtl;
}

.omid-login-icon {
    color: var(--om-brand);
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.omid-login-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--om-brand);
    margin: 0 0 8px;
}

.omid-login-text {
    font-size: 13px;
    color: var(--om-text-gray);
    margin: 0 0 24px;
    line-height: 1.7;
}

.omid-login-wall .omid-btn {
    flex: none;
    padding: 12px 28px;
}

.omid-upload-trigger {
    display: inline-block;
}

/* ════════════════════════════════════════════════════════════════
   5. ریسپانسیو
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 380px) {
    :root {
        --story-size: 60px;
        --cat-size: 56px;
    }
    .omid-sv-text { font-size: 14px; right: 14px; left: 14px; }
    .omid-sv-project-card { max-width: 280px; }
    .omid-sv-btn { font-size: 13px; padding: 13px; }
    .omid-upload-modal-inner { padding: 20px 16px 28px; }
    .omid-cat-icon svg { width: 24px; height: 24px; }
    .omid-cat-name { font-size: 11px; }
}

@media (max-width: 480px) {
    .omid-sv-top-badge .omid-sv-badge-sub { display: none; }
}

/* iOS zoom fix */
@media (max-width: 768px) {
    .omid-field-group input,
    .omid-field-group textarea,
    .omid-field-group select {
        font-size: 16px !important;
    }
}

/* ════════════════════════════════════════════════════════════════
   END OF FILE
   ════════════════════════════════════════════════════════════════ */