/* ===================================================
   GHARZI.COM — Mobile-First CSS (Clean, No Duplication)
   =================================================== */

/* --- Variables --- */
:root {
    --primary:    #143648;
    --secondary:  #f8edd5;
    --accent:     #f4a261;
    --hover:      #E9C46A;
    --white:      #ffffff;
    --text:       #1f2937;
    --muted:      #6b7280;
    --border:     #e5e7eb;
    --shadow:     0 10px 30px rgba(0,0,0,.08);
    --shadow-soft:0 8px 24px rgba(20,54,72,0.08);
    --radius:     18px;
    --glass:      rgba(255,255,255,0.55);

    --nav-h:      64px;      /* ارتفاع navbar بالا */
    --bottom-h:   90px;      /* ارتفاع bottom nav موبایل */
    --safe-bottom:env(safe-area-inset-bottom, 0px);
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family:'Vazirmatn',sans-serif;
    background:var(--secondary);
    color:var(--text);
    min-height:100vh;
    overflow-x:hidden;
    display:flex;
    flex-direction:column;
}
#mainContainer { flex: 1 0 auto; }

/* iOS zoom fix — همه input‌ها حداقل 16px */
input, textarea, select {
    font-family:inherit;
    font-size:16px;
    width:100%;
    padding:12px;
    box-sizing:border-box;
}
input:focus, textarea:focus, select:focus {
    outline:none;
    box-shadow:0 0 0 3px rgba(20,54,72,0.12);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.18); border-radius:20px; }

/* ===========================================
   NAVBAR (بالا)
=========================================== */
.navbar {
    height:var(--nav-h);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    gap:10px;
    position:sticky;
    top:0;
    z-index:900;
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(20,54,72,0.08);
}

.navRight, .navLeft, .mobileActions {
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

.navLogo { width:100px; height: 44px; object-fit:fill; }

.siteTitle {
    font-size:20px;
    font-weight:800;
    color:var(--primary);
    white-space:nowrap;
}

.navCenter {
    flex:1;
    display:flex;
    justify-content:center;
    padding:0 12px;
}

.searchInput {
    width:100%;
    max-width:420px;
    height:42px;
    border:1px solid rgba(20,54,72,0.1);
    border-radius:14px;
    background:rgba(255,255,255,0.9);
    padding:0 14px;
    font-size:15px;
    transition:0.2s;
}
.searchInput:focus {
    background:white;
    box-shadow:0 0 0 3px rgba(20,54,72,0.1);
}

.navBtn {
    border:none;
    background:var(--primary);
    color:white;
    height:42px;
    min-width:42px;
    padding:0 14px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    transition:0.25s;
    white-space:nowrap;
}
.navBtn:hover { background:var(--hover); color:var(--primary); transform:translateY(-1px); }

/* موبایل: جستجو داخل navbar، دکمه‌ها آیکن‌شکل */
@media (max-width:768px) {
    .navCenter { display:none; } /* جستجو در .mobileSearchWrapper جداگانه‌ست */
    .desktopOnly { display:none !important; }

    .mobileSearchWrapper {
        flex:1;
        min-width:0;
        display:flex;
    }
    .mobileSearchWrapper .searchInput {
        max-width:none;
        height:40px;
        border-radius:12px;
        font-size:14px;
    }

    .navBtn {
        width:42px;
        height:42px;
        padding:0;
        font-size:18px;
        border-radius:12px;
    }
    /* متن نوشتاری نباشه، فقط آیکن */
    .navBtn span.btnText { display:none; }
}

@media (min-width:769px) {
    .mobileSearchWrapper { display:none !important; }
    .mobileActions { display:none !important; }
}

/* Drawer */
.drawer {
    position:fixed;
    top:0; right:-280px;
    width:280px;
    height:100%;
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    z-index:2000;
    display:flex;
    flex-direction:column;
    padding:80px 20px 30px;
    gap:8px;
    transition:right 0.3s ease;
    box-shadow:-4px 0 20px rgba(0,0,0,0.1);
}
.drawer.open { right:0; }
#drawerOverlay {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.4);
    z-index:1999;
    display:none;
}
#drawerOverlay.show { display:block; }

.drawerItem {
    width:100%;
    height:52px;
    border:none;
    background:rgba(20,54,72,0.06);
    color:var(--text);
    border-radius:14px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    padding:0 16px;
    gap:10px;
    transition:0.2s;
    font-family:inherit;
}
.drawerItem:hover { background:var(--primary); color:white; }

/* ===========================================
   BOTTOM NAV (فقط موبایل)
=========================================== */
.bottomNav {
    display:none;
}

@media (max-width:768px) {
    .bottomNav {
        display:flex;
        position:fixed;
        bottom:16px;
        left:50%;
        transform:translateX(-50%);
        width:calc(100% - 32px);
        max-width:420px;
        height:64px;
        background:rgba(20,54,72,0.75);
        backdrop-filter:blur(24px) saturate(180%);
        -webkit-backdrop-filter:blur(24px) saturate(180%);
        border-radius:32px;
        border:1px solid rgba(255,255,255,0.12);
        z-index:900;
        align-items:center;
        justify-content:space-around;
        padding:0 8px;
        box-shadow:0 8px 32px rgba(20,54,72,0.35);
        padding-bottom:0;
    }

    .bottomNavBtn {
        flex:1;
        height:100%;
        border:none;
        background:transparent;
        color:rgba(255,255,255,0.5);
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:2px;
        cursor:pointer;
        font-size:9px;
        font-weight:600;
        padding:6px 0;
        transition:0.2s;
        min-height:unset;
        border-radius:24px;
    }
    .bottomNavBtn .navIcon { font-size:20px; line-height:1; transition:0.2s; width:24px; height:24px; display:flex; align-items:center; justify-content:center; }
    .bottomNavBtn .navIcon svg { width:22px; height:22px; }
    .bottomNavBtn.activeNav { color:white; }
    .bottomNavBtn.activeNav .navIcon {
        transform:scale(1.15);
        filter:drop-shadow(0 0 6px rgba(255,255,255,0.4));
    }

    .bottomNavBtn.navCenter-btn { color:white; }
    .bottomNavBtn.navCenter-btn .navIcon {
        width:46px;
        height:46px;
        background:var(--accent);
        border-radius:50%;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:24px;
        box-shadow:0 4px 14px rgba(244,162,97,0.5);
        margin-top:0;
        transition:0.2s;
    }
    .bottomNavBtn.navCenter-btn.activeNav .navIcon { background:var(--hover); }
    .bottomNavBtn.navCenter-btn span { color:rgba(255,255,255,0.5); font-size:9px; }
}

/* ===========================================
   CONTAINER & LAYOUT
=========================================== */
.container {
    width:95%;
    max-width:1400px;
    margin:auto;
    padding:20px;
}

/* صفحه‌ها */
.mobilePage { display:none; }
.mobilePage.active { display:block; }

#messagesPage { display:none; }
#messagesPage.active { display:block; }

#explorePage { display:none; }

@media (max-width:768px) {
    body { padding-bottom:calc(var(--bottom-h) + var(--safe-bottom) + 10px); }
    .container { padding:16px; padding-bottom:0; }
    #explorePage.active { display:block; }
}
@media (min-width:769px) {
    #explorePage { display:none !important; }
}

/* ===========================================
   AUTH
=========================================== */
#authBox {
    display:none;
    position:fixed;
    inset:0;
    z-index:9999;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,0.5);
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
}
#authBox.open {
    display:flex;
}

.authCard {
    width:420px;
    max-width:100%;
    position:relative;
    overflow:hidden;
    background:linear-gradient(165deg, rgba(255,255,255,0.92), rgba(248,237,213,0.88));
    backdrop-filter:blur(24px);
    -webkit-backdrop-filter:blur(24px);
    border:1px solid rgba(255,255,255,0.5);
    border-radius:28px;
    padding:34px 28px 30px;
    box-shadow:0 24px 60px rgba(20,54,72,0.25), 0 2px 10px rgba(20,54,72,0.08);
    animation:authOpen 0.45s cubic-bezier(.2,.8,.2,1);
}
@keyframes authOpen {
    from { opacity:0; transform:translateY(24px) scale(0.98); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

/* بلاب‌های تزئینی پشت فرم — عمق و حس زنده بودن می‌دهند */
.authBlobs { position:absolute; inset:0; z-index:-1; overflow:hidden; border-radius:inherit; pointer-events:none; }
.authBlob { position:absolute; border-radius:50%; filter:blur(38px); }
.authBlob.b1 { width:190px; height:190px; background:var(--accent); opacity:0.30; top:-70px; left:-50px; }
.authBlob.b2 { width:170px; height:170px; background:var(--primary); opacity:0.16; bottom:-80px; right:-50px; }

.authCloseBtn {
    position:absolute;
    top:14px; left:14px;
    width:30px; height:30px;
    border-radius:50%;
    background:rgba(20,54,72,0.06);
    border:none;
    color:var(--muted);
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:0.2s;
    min-height:unset;
}
.authCloseBtn:hover { background:rgba(20,54,72,0.12); color:var(--primary); transform:rotate(90deg); }

.authBrand { text-align:center; margin-bottom:20px; }
.authBrandMark {
    width:54px; height:54px;
    border-radius:16px;
    background:linear-gradient(145deg, var(--primary), #1a4a6b);
    color:var(--accent);
    display:flex; align-items:center; justify-content:center;
    margin:0 auto 12px;
    box-shadow:0 10px 22px rgba(20,54,72,0.32);
    overflow:hidden;
}
.authBrandLogo { width:70%; height:70%; object-fit:contain; }
.authTitle {
    text-align:center;
    font-size:24px;
    font-weight:800;
    margin-bottom:3px;
    color:var(--primary);
}
.authSubtitle {
    text-align:center;
    font-size:12.5px;
    color:var(--muted);
    font-weight:500;
}

.authTabs {
    display:flex;
    background:rgba(255,255,255,0.3);
    border-radius:16px;
    padding:4px;
    margin-bottom:20px;
    gap:4px;
}
.authTabs button {
    flex:1;
    height:46px;
    border:none;
    border-radius:12px;
    background:transparent;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:0.25s;
    color:var(--text);
    min-height:unset;
}
.authTabs button.activeAuth { background:var(--primary); color:white; }
.authTabsCompact { padding:3px; border-radius:11px; margin-bottom:14px; }
.authTabsCompact button { height:32px; font-size:12px; border-radius:8px; }
.authCard input,
.authCard textarea {
    width:100%;
    border:1.5px solid transparent;
    background:rgba(255,255,255,0.65);
    height:50px;
    border-radius:14px;
    padding:0 14px;
    font-size:16px;
    margin-bottom:12px;
    margin-top:0;
    transition:0.2s;
}
.authCard input:focus,
.authCard textarea:focus {
    background:white;
    border-color:rgba(20,54,72,0.15);
    box-shadow:0 0 0 4px rgba(20,54,72,0.1);
}
.authCard textarea {
    height:100px;
    padding:12px 14px;
    resize:none;
}

/* اینپوت‌هایی با آیکن داخلشون — سریع‌تر قابل تشخیصن */
.authInputWrap { position:relative; margin-bottom:12px; }
.authInputWrap input { margin-bottom:0; padding-right:42px; }
.authInputWrap .authInputIcon {
    position:absolute;
    top:50%; right:14px;
    transform:translateY(-50%);
    color:var(--muted);
    display:flex;
    pointer-events:none;
    transition:color 0.2s;
}
.authInputWrap:focus-within .authInputIcon { color:var(--primary); }

.authHint {
    font-size:13px;
    color:var(--muted);
    margin-bottom:12px;
    text-align:center;
    line-height:1.7;
}
.authLinkSmall {
    font-size:12.5px;
    color:var(--primary);
    text-align:left;
    margin-top:6px;
    cursor:pointer;
    font-weight:600;
    transition:0.2s;
}
.authLinkSmall:hover { color:var(--accent); }
.authLinkCenter { text-align:center; }

.authSubmit {
    width:100%;
    height:52px;
    border:none;
    border-radius:16px;
    background:linear-gradient(135deg, var(--primary), #1a4a6b);
    color:white;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:0.25s;
    margin-top:4px;
    box-shadow:0 12px 26px rgba(20,54,72,0.3);
}
.authSubmit:hover {
    background:linear-gradient(135deg, var(--hover), var(--accent));
    color:var(--primary);
    box-shadow:0 12px 26px rgba(244,162,97,0.4);
    transform:translateY(-1px);
}
.authSubmit:active { transform:translateY(0) scale(0.98); }

.authBoxSection { display:none; animation:fadeAuth 0.3s ease; }
.authBoxSection.active { display:block; }
@keyframes fadeAuth {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}

@media (max-width:768px) {
    .authCard { padding:24px 18px; }
}

/* ===========================================
   BUTTONS (Global)
=========================================== */
button {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:44px;
    font-family:'Vazirmatn',sans-serif;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:transform 0.2s, background 0.2s, opacity 0.2s;
}
button:active { transform:scale(0.97); }
button:disabled { opacity:0.5; cursor:not-allowed; }

.mainActionBtn {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    transition: 0.2s;
}
.mainActionBtn:hover { background: #1a4a6b; transform: translateY(-1px); }

.backBtn {
    background:var(--primary);
    color:white;
    border:none;
    padding:0 16px;
    height:42px;
    border-radius:12px;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
}
.backBtn:hover { background:var(--hover); color:var(--primary); }

.addPostBtn {
    background:var(--primary);
    color:white;
    border:none;
    padding:12px 20px;
    border-radius:12px;
    cursor:pointer;
    margin-bottom:18px;
}
.addPostBtn:hover { background:var(--hover); color:var(--primary); }

/* Floating Add Button (دسکتاپ) */
.floatingAddBtn {
    display:none;
    position:fixed;
    left:24px;
    bottom:24px;
    width:60px;
    height:60px;
    border-radius:50%;
    border:none;
    background:var(--primary);
    color:white;
    font-size:32px;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:800;
    box-shadow:0 8px 24px rgba(0,0,0,0.2);
    transition:0.25s;
}
.floatingAddBtn:hover { background:var(--hover); color:var(--primary); transform:translateY(-3px); }

/* ===========================================
   POSTS GRID
=========================================== */
.postsGrid {
    display:grid;
    grid-template-columns:repeat(4, minmax(0,1fr));
    gap:16px;
    margin-top:20px;
}
@media (max-width:1100px) { .postsGrid { grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:768px)  { .postsGrid { grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; } }

/* POST CARD */
.postCard {
    background:rgba(248,237,213,0.85);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border:1px solid rgba(20,54,72,0.08);
    border-radius:18px;
    overflow:hidden;
    transition:transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s cubic-bezier(.2,.8,.2,1);
    cursor:pointer;
    box-shadow:0 4px 16px rgba(31,38,135,0.08);
}
.postCard:hover { transform:translateY(-6px); box-shadow:0 16px 36px rgba(20,54,72,0.18); }
.pinnedSection {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 4px 2px 16px 2px;
    margin-bottom: 4px;
    scrollbar-width: thin;
}
.pinnedSection:empty { display: none; margin: 0; padding: 0; }
.pinnedSection::-webkit-scrollbar { height: 4px; }
.pinnedSection::-webkit-scrollbar-thumb { background: rgba(20,54,72,0.2); border-radius: 4px; }

.pinnedSectionLabel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 4px;
}

/* دقیقاً هم‌شکل کارت معمولی سایت، فقط کوچیک‌تر و تو یه ردیف اسکرول‌شونده */
.pinnedCard {
    position: relative;
    flex: 0 0 168px;
    background: rgba(248,237,213,0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(20,54,72,0.08);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(31,38,135,0.08);
    transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s cubic-bezier(.2,.8,.2,1);
}
.pinnedCard:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(20,54,72,0.18); }

.pinnedCard .pinnedImgWrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #e8e0d5;
    overflow: hidden;
}
.pinnedCard .pinnedImgWrap img,
.pinnedCard .pinnedImgWrap video { width:100%; height:100%; object-fit:cover; display:block; }

/* امضای بصری این کارت: یه روبان گوشه، نه رنگ‌آمیزی کل کارت */
.pinnedRibbon {
    position: absolute;
    top: 11px;
    right: -32px;
    width: 130px;
    transform: rotate(45deg);
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    padding: 3px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 2;
}

.pinnedCard .pinnedBody { padding: 10px 12px 12px; }
.pinnedCard .pinnedTitle {
    font-size: 13px; font-weight: 700; color: var(--primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px;
}
.pinnedCard .pinnedMeta {
    font-size: 11px; color: var(--muted);
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    margin-bottom: 6px;
}
.pinnedCard .pinnedPrice {
    font-size: 12px; font-weight: 800; color: var(--primary);
}

/* بج پونزِ روی کارت‌های معمولیِ لیست (همون‌جایی که قبلاً طلایی بود) — الان ساده و آرومه */
.postPinBadge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.postImage {
    position:relative;
    width:100%;
    aspect-ratio:1/1;
    background:#e8e0d5;
    overflow:hidden;
}
.postImage img,
.postImage video { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.5s ease; }
.postCard:hover .postImage img,
.postCard:hover .postImage video { transform:scale(1.06); }

/* سایه‌ی ملایم پایین عکس تا بج‌ها همیشه خوانا بمونن */
.postImageOverlay {
    position:absolute; inset:0;
    background:linear-gradient(to top, rgba(15,45,68,0.45) 0%, rgba(15,45,68,0) 35%);
    pointer-events:none;
}

.postContent { padding:12px; }
.postContent h3 {
    font-size:14px;
    font-weight:700;
    line-height:1.5;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    flex:1;
}

.postTop {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
    gap:6px;
}

.postType {
    display:inline-flex;
    align-items:center;
    background:var(--primary);
    color:white;
    padding:5px 12px;
    border-radius:20px;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
}
/* فقط وقتی رو عکس کارته که باید شناور باشه */
.postImage .postType {
    position:absolute;
    top:10px; right:10px;
    z-index:1;
    box-shadow:0 4px 10px rgba(0,0,0,0.18);
}
.postType-give { background:var(--accent); color:var(--primary); }
.postType-take { background:var(--primary); color:white; }

.postPinBadge {
    position:absolute;
    top:10px; left:10px;
    z-index:1;
    background:var(--hover);
    color:var(--primary);
    padding:4px 10px;
    border-radius:20px;
    font-size:11px;
    font-weight:700;
    box-shadow:0 4px 10px rgba(0,0,0,0.18);
}

.postStatus {
    background:rgba(107,114,128,0.14);
    color:var(--muted);
    padding:4px 10px;
    border-radius:20px;
    font-size:11px;
    white-space:nowrap;
    flex-shrink:0;
    font-weight:600;
}
.postStatus.status-pending { background:rgba(59,130,246,0.14); color:#2563eb; }
.postStatus.status-expired,
.postStatus.status-rejected { background:rgba(216,90,48,0.14); color:#D85A30; }
.postStatus.status-needs_correction { background:rgba(233,196,106,0.3); color:#8a6d1f; }

.postDesc {
    color:var(--muted);
    font-size:13px;
    line-height:1.7;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    margin-bottom:10px;
}

.postMeta {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.postMeta span {
    display:flex;
    align-items:center;
    gap:4px;
    background:rgba(20,54,72,0.07);
    color:var(--primary);
    padding:3px 9px;
    border-radius:14px;
    font-size:11.5px;
    font-weight:600;
}

.postBottomRow { display:flex; align-items:center; justify-content:space-between; }
.postPrice {
    font-size:14px;
    font-weight:800;
    color:var(--primary);
}
.postPrice span { font-size:11px; font-weight:500; color:var(--muted); margin-right:2px; }
.postPrice.postPriceNA { color:var(--muted); font-weight:600; font-size:12.5px; }

.postBottom {
    margin-top:12px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.profileBtn {
    border:none;
    background:rgba(248,237,213,0.8);
    color:var(--primary);
    padding:8px 12px;
    border-radius:10px;
    cursor:pointer;
    font-size:13px;
    font-weight:600;
    transition:0.2s;
    min-height:unset;
}
.profileBtn:hover { background:var(--hover); }

/* موبایل: کارت ساده‌تر، ولی قیمت و نوع آگهی همچنان دیده میشن */
@media (max-width:768px) {
    .postContent { padding:8px; }
    .postContent h3 { font-size:13px; white-space:normal; -webkit-line-clamp:2; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }
    .postDesc, .postMeta { display:none; }
    .postTop { margin-bottom:4px; }
    .postType { font-size:10px; padding:4px 9px; top:8px; right:8px; }
    .postStatus { display:none; }
    .postPrice { font-size:12.5px; }
    .postBottomRow { margin-top:4px; }
}

/* ===========================================
   DASHBOARD
=========================================== */
#dashboard {
    width:95%;
    max-width:1400px;
    padding-top:20px;
    margin:auto;
    animation:fadePage 0.3s ease;
}
@keyframes fadePage {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* TOGGLE TAB */
.toggleWrapper {
    display:flex;
    justify-content:center;
    margin:20px 0;
}
.toggleBox {
    position:relative;
    display:flex;
    background:#e8e8e8;
    border-radius:50px;
    overflow:hidden;
    width:280px;
    height:50px;
}
.toggleBox button {
    flex:1;
    border:none;
    background:transparent;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    z-index:2;
    color:var(--text);
    transition:0.3s;
    min-height:unset;
    border-radius:0;
}
#toggleIndicator {
    position:absolute;
    width:50%;
    height:100%;
    background:var(--primary);
    border-radius:50px;
    transition:0.35s;
    right:0;
}
.toggleActive { color:white !important; }

.pageSection { display:none; opacity:0; transform:translateY(12px); transition:0.3s; }
.pageSection.active { display:block; opacity:1; transform:translateY(0); }

/* ===========================================
   MODAL
=========================================== */
.modal {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    display:none;
    align-items:flex-end;   /* از پایین باز بشه در موبایل */
    justify-content:center;
    z-index:9999;
    -webkit-overflow-scrolling:touch;
}

.modalContent {
    width:500px;
    max-width:100%;
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border-radius:24px 24px 0 0;  /* موبایل: فقط بالا گرد */
    padding:24px;
    position:relative;
    animation:slideUp 0.3s ease;
    max-height:90vh;
    overflow-y:auto;
}
@keyframes slideUp {
    from { transform:translateY(40px); opacity:0; }
    to   { transform:translateY(0); opacity:1; }
}

@media (min-width:769px) {
    .modal { align-items:center; }
    .modalContent { border-radius:24px; max-height:88vh; }
    @keyframes slideUp {
        from { transform:scale(0.92); opacity:0; }
        to   { transform:scale(1); opacity:1; }
    }
}

.modalContent input,
.modalContent textarea,
.modalContent select {
    width:100%;
    border:1.5px solid rgba(20,54,72,0.12);
    border-radius:12px;
    padding:12px 14px;
    font-size:16px;
    margin-bottom:12px;
    background:rgba(255,255,255,0.8);
    transition:0.2s;
}
.modalContent input:focus,
.modalContent textarea:focus,
.modalContent select:focus {
    border-color:var(--primary);
    background:white;
    box-shadow:0 0 0 3px rgba(20,54,72,0.08);
}
.modalContent textarea { height:100px; resize:none; }

.modalContent button[onclick^="submit"],
.modalContent > button:last-of-type {
    width:100%;
    height:50px;
    background:var(--primary);
    color:white;
    border:none;
    border-radius:14px;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    margin-top:4px;
    transition:0.2s;
}
.modalContent > button:last-of-type:hover { background:var(--hover); color:var(--primary); }

.closeModal {
    position:absolute;
    top:14px;
    left:14px;
    width:34px;
    height:34px;
    background:rgba(20,54,72,0.08);
    color:var(--text);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    cursor:pointer;
    transition:0.2s;
    z-index:10;
    border:none;
    min-height:unset;
}
.closeModal:hover { background:var(--primary); color:white; }
/* روی پس‌زمینه‌ی تیره‌ی پروفایل، دکمه بستن سفید و قابل دیدن باشد */
.profileModal .closeModal {
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}
.profileModal .closeModal:hover {
    background: rgba(255,255,255,0.32);
    color: #ffffff;
}
/* POST TYPE TOGGLE داخل مودال */
.postTypeToggle {
    display:flex;
    gap:8px;
    margin-bottom:12px;
}
.typeBtn {
    flex:1;
    height:46px;
    border:2px solid rgba(20,54,72,0.15);
    border-radius:12px;
    background:transparent;
    color:var(--primary);
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:0.2s;
    min-height:unset;
}
.typeBtn.active { background:var(--primary); color:white; border-color:var(--primary); }

/* PRICING ROWS */
.pricingSection { margin:12px 0; }
.pricingLabel { font-size:13px; font-weight:700; color:var(--muted); display:block; margin-bottom:8px; }






.pricingDuration { width:70px !important; flex-shrink:0; }
.pricingUnit     { width:90px !important; flex-shrink:0; }
.pricingPrice    { flex:1; }
.removePricingRow {
    width:34px; height:34px;
    border-radius:10px;
    background:rgba(20,54,72,0.08);
    border:none;
    font-size:18px;
    cursor:pointer;
    flex-shrink:0;
    color:var(--text);
    min-height:unset;
    padding:0;
}
.removePricingRow:hover { background:var(--primary); color:white; }













.addPricingRowBtn:hover { background:var(--primary); color:white; }

@media (max-width:480px) {
    .pricingRow { flex-wrap:wrap; }
    .pricingDuration { width:60px !important; }
    .pricingUnit     { width:75px !important; }
}

/* ===========================================
   PROFILE MODAL
=========================================== */



.profileModal {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    margin: 0 !important;
    background: #f8edd5 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
@media (min-width: 769px) {
    .profileModal { 
        border-radius: 28px !important;
        width: 480px !important;
        max-width: 480px !important;
    }
}

.profileTop {
    padding: 16px 56px 14px 20px;
    background: linear-gradient(145deg, #143648 0%, #1a4a6b 100%);
    border-radius: 28px 28px 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: right;
    gap: 14px;
}
.profileAvatarWrap { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; }
.profileAvatar { width: 70px; height: 70px; border: 3px solid rgba(255,255,255,0.4); border-radius: 50%; object-fit: cover; }

.profileAvatarOverlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: 0.2s;
}
.profileAvatarWrap:hover .profileAvatarOverlay { opacity: 1; }
.profileTopInfo h2 { font-size: 17px; font-weight: 800; color: white; margin: 0; }
.profileTopInfo p  { font-size: 12px; color: rgba(255,255,255,0.55); margin: 2px 0 0; }

.profileInfo {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(20,54,72,0.08);
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8edd5;
}
.profileInfoRow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    padding: 7px 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
    margin-bottom: 5px;
}
.profileInfoRow:last-child { margin-bottom: 0; }

.profileSectionTitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    padding: 14px 18px 6px;
}
.profilePostCard:hover { border-color: rgba(20,54,72,0.15); }

.postCardActions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
    width: 110px;
    justify-content: flex-end;
}
.postCardBtn {
    font-size: 10px;
    padding: 3px 7px;
    border: 1px solid rgba(20,54,72,0.15);
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--primary);
    white-space: nowrap;
    transition: 0.15s;
}
.postCardBtn:hover { background: rgba(20,54,72,0.06); }
.postCardBtn.archive {
    border-color: rgba(20,54,72,0.2);
    color: var(--muted);
}

#profileActions {
    padding: 12px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.logoutBtn {
    background: transparent !important;
    border: 1.5px solid rgba(20,54,72,0.2) !important;
    color: var(--muted) !important;
    font-weight: 500 !important;
}
.logoutBtn:hover {
    background: rgba(20,54,72,0.06) !important;
    color: var(--primary) !important;
}

/* ===========================================
   POST DETAILS MODAL
=========================================== */
.postDetailsContent {
    max-width:700px;
    border-radius:24px 24px 0 0;
}
@media (min-width:769px) {
    .postDetailsContent { border-radius:24px; }
}

.postDetailHeader {
    display:flex;
    gap:20px;
    margin-bottom:20px;
}
.postDetailImg {
    width:160px;
    height:160px;
    border-radius:16px;
    object-fit:cover;
    flex-shrink:0;
    background:#e8e0d5;
}
.postDetailBadges {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:10px;
}
.postDeliveryRow { margin-top:10px; }
@media (max-width:600px) {
    .postDetailHeader { flex-direction:column; }
    .postDetailImg { width:100%; height:200px; }
}

.detailsActions {
    display:flex;
    gap:10px;
    margin-top:18px;
}

/* ===========================================
   REQUEST MODAL
=========================================== */
.requestModalContent {
    max-width:800px;
    padding:0;
    overflow:hidden;
}
.requestLayout {
    display:flex;
    max-height:85vh;
}
.requestForm {
    flex:1;
    padding:24px;
    overflow-y:auto;
    border-left:1px solid var(--border);
}
.requestChat {
    width:300px;
    display:flex;
    flex-direction:column;
    flex-shrink:0;
}
.requestChatHeader {
    padding:14px 16px;
    font-weight:700;
    border-bottom:1px solid var(--border);
    font-size:14px;
    background:rgba(20,54,72,0.04);
}
.requestChatMessages {
    flex:1;
    overflow-y:auto;
    padding:14px;
    display:flex;
    flex-direction:column;
    gap:8px;
}
.requestChatInput {
    display:flex;
    gap:8px;
    padding:10px 12px;
    border-top:1px solid var(--border);
}
.requestChatInput input {
    flex:1;
    height:40px;
    border:1px solid rgba(255,255,255,0.7);
    border-radius:20px;
    padding:0 16px;
    font-size:14px;
    margin:0;
    background:rgba(255,255,255,0.65);
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    box-shadow:inset 0 1px 3px rgba(20,54,72,0.06);
}
.requestChatInput button {
    width:40px; height:40px;
    border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #ffcb8f, #f4a261 55%, #D85A30);
    box-shadow:0 0 0 4px rgba(244,162,97,0.18), 0 6px 16px rgba(216,90,48,0.4);
    color:white;
    border:none;
    font-size:18px;
    cursor:pointer;
    flex-shrink:0;
    min-height:unset;
    transition:transform 0.15s ease, box-shadow 0.15s ease;
}
.requestChatInput button:hover {
    transform:scale(1.06);
    box-shadow:0 0 0 6px rgba(244,162,97,0.24), 0 8px 20px rgba(216,90,48,0.5);
}

/* موبایل: چت پنهان بشه */
@media (max-width:600px) {
    .requestLayout { flex-direction:column; }
    .requestChat { width:100%; height:250px; flex-shrink:0; }
    .requestForm { border-left:none; border-bottom:1px solid var(--border); }
}

/* PRICING TABLE در request modal */
.pricingPlan {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 14px;
    border-radius:12px;
    border:2px solid rgba(20,54,72,0.1);
    cursor:pointer;
    margin-bottom:8px;
    transition:0.2s;
}
.pricingPlan:hover { border-color:var(--primary); background:rgba(20,54,72,0.04); }
.pricingPlan.selected { border-color:var(--primary); background:rgba(20,54,72,0.06); }
.selectedPlanBox {
    background:rgba(20,54,72,0.06);
    border-radius:12px;
    padding:12px 14px;
    display:flex;
    justify-content:space-between;
    margin:12px 0;
}
.selectedPlanPrice { font-weight:800; color:var(--primary); }

/* ===========================================
   MESSAGES PAGE
=========================================== */
.messagesHeader {
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:20px;
    padding-top:10px;
}
.conversationCard {
    display:flex;
    align-items:center;
    gap:12px;
    background:rgba(255,255,255,0.75);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-radius:16px;
    padding:12px 14px;
    margin-bottom:10px;
    cursor:pointer;
    border:1px solid rgba(255,255,255,0.6);
    box-shadow:0 4px 14px rgba(20,54,72,0.08);
    transition:transform 0.2s ease, box-shadow 0.2s ease;
}
.conversationCard:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(20,54,72,0.13); }
.conversationCardAvatar {
    width:44px; height:44px; border-radius:50%;
    object-fit:cover; flex-shrink:0;
    box-shadow:0 0 0 2px rgba(255,255,255,0.6);
}
.conversationCardBody { flex:1; min-width:0; }
.conversationCard:hover { transform:translateY(-2px); box-shadow:var(--shadow-soft); }
.conversationName { font-size:14px; font-weight:700; margin-bottom:3px; }
.conversationLast { color:var(--muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conversationTime  { color:#999; font-size:11px; flex-shrink:0; }

/* CHAT MODAL */
#chatMessages {
    height:280px;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:10px 0;
}
.chatBubble {
    max-width:78%;
    padding:10px 14px;
    border-radius:18px;
    font-size:14px;
    line-height:1.7;
    word-break:break-word;
}
.myMessage {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #1c4560, #0f2d44 55%, #143648);
    color: white;
    align-self: flex-start;
    border-radius: 4px 18px 18px 18px;
    box-shadow: 0 6px 18px rgba(20,54,72,0.3);
}
.myMessage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.14) 48%, transparent 58%);
    pointer-events: none;
}
.otherMessage {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    color: var(--text);
    align-self: flex-end;
    border-radius: 18px 4px 18px 18px;
    box-shadow: 0 4px 14px rgba(20,54,72,0.08);
}

/* ===========================================
   ADMIN PANELS
=========================================== */
#adminPosts {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(300px,1fr));
    gap:16px;
    margin-top:16px;
}
.adminPostCard {
    background:rgba(248,237,213,0.85);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border:1px solid rgba(20,54,72,0.08);
    border-radius:18px;
    padding:16px;
    transition:0.25s;
    display:flex;
    flex-direction:column;
    gap:10px;
    position:relative;
    overflow:visible;
    z-index:1;
}
.adminPostCard:has(.actionsMenu.showMenu),
.adminPostCard.menuOpen {
    z-index:1000;
}
.adminPostTop {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
}
.adminPostTop h3 {
    font-size:16px;
    margin:0;
    flex:1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.adminStatus {
    background:rgba(20,54,72,0.08);
    color:var(--primary);
    padding:4px 10px;
    border-radius:16px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}
.adminMeta { display:flex; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:13px; }
.adminDesc {
    font-size:13px;
    line-height:1.8;
    color:#555;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* Actions menu */
.adminActions {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    position:relative;
}
.moreBtn {
    width:40px; height:40px;
    border:none;
    border-radius:12px;
    background:rgba(20,54,72,0.07);
    font-size:20px;
    cursor:pointer;
    min-height:unset;
    color:var(--text);
    transition:0.2s;
}
.moreBtn:hover { background:rgba(20,54,72,0.14); }
.actionsMenu {
    position:absolute;
    top:calc(100% - 8px);
    right:16px;
    left:auto;
    min-width:170px;
    background:rgba(255,255,255,0.98);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-radius:16px;
    padding:8px;
    display:none;
    flex-direction:column;
    gap:6px;
    z-index:9999;
    box-shadow:0 12px 32px rgba(0,0,0,0.18);
    border:1px solid rgba(20,54,72,0.08);
}
.actionsMenu.showMenu { display:flex; }
.actionsMenu button {
    width:100%;
    justify-content:flex-start;
    background:var(--primary);
    border:none;
    padding:10px 14px;
    border-radius:10px;
    color:white;
    font-size:13px;
    min-height:unset;
    height:40px;
    transition:0.2s;
}
.actionsMenu button:hover { background:var(--hover); color:var(--primary); }

.approveBtn {
    flex:1; height:40px; border:none; border-radius:12px;
    background:var(--hover); color:var(--primary);
    font-size:13px; cursor:pointer; font-weight:700; transition:0.2s;
}
.disableBtn {
    flex:1; height:40px; border:none; border-radius:12px;
    background:var(--primary); color:white;
    font-size:13px; cursor:pointer; font-weight:700; transition:0.2s;
}
.approveBtn:hover, .disableBtn:hover { opacity:0.85; transform:translateY(-1px); }

/* جدول کاربران */
#usersList { overflow-x:auto; margin-top:16px; }
.usersTable { width:100%; border-collapse:collapse; min-width:600px; }
.usersTable th {
    background:var(--primary);
    color:white;
    padding:12px;
    font-size:13px;
    text-align:center;
    border:1px solid rgba(255,255,255,0.1);
}
.usersTable td {
    padding:10px;
    font-size:13px;
    text-align:center;
    border:1px solid rgba(20,54,72,0.08);
}
.usersTable tr:nth-child(even) { background:rgba(248,237,213,0.3); }
.usersTable button {
    background:var(--primary);
    color:white;
    border:none;
    padding:6px 12px;
    border-radius:8px;
    cursor:pointer;
    font-size:12px;
    height:auto;
    min-height:unset;
}

/* ===========================================
   SUPPORT WIDGET
=========================================== */
#supportWidget {
    position:fixed;
    bottom: 24px;
    left:16px;
    z-index:800;
    display:flex;
    flex-direction:column-reverse;
    align-items:flex-start;
    gap:10px;
}
@media (display-mode: standalone) {
    #supportWidget {
        bottom: calc(var(--bottom-h) + 26px);
    }
}
@media (min-width:769px) {
    #supportWidget { bottom:24px; left:24px; right:auto; }
}

#supportToggleBtn {
    width:56px; height:56px;
    border-radius:50%;
    border:none;
    background:var(--primary);
    color:white;
    font-size:24px;
    cursor:pointer;
    box-shadow:0 8px 24px rgba(20,54,72,0.35);
    transition:0.25s;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:unset;
}
#supportToggleBtn:hover { background:var(--accent); color:var(--primary); transform:translateY(-2px); }

#supportPanel {
    position:absolute;
    bottom:68px;
    left:0;
    width:300px;
    max-height:0;
    overflow:hidden;
    background:rgba(255,255,255,0.97);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
    border-radius:20px;
    box-shadow:0 16px 48px rgba(20,54,72,0.2);
    border:1px solid rgba(20,54,72,0.08);
    transition:max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
    opacity:0;
    pointer-events:none;
}
#supportPanel.open { max-height:500px; opacity:1; pointer-events:all; }
@media (max-width:768px) {
    #supportPanel { width:calc(100vw - 32px); left:0; }
}

.supportHeader {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--primary);
    padding:12px 14px;
    border-radius:20px 20px 0 0;
    color:white;
}
.supportAgentInfo { display:flex; align-items:center; gap:10px; }
.supportAvatar {
    width:36px; height:36px;
    background:rgba(255,255,255,0.15);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
}
.supportAgentName  { font-weight:700; font-size:13px; color:white; }
.supportAgentStatus {
    font-size:11px; color:rgba(255,255,255,0.75);
    display:flex; align-items:center; gap:4px; margin-top:2px;
}
.onlineDot {
    display:inline-block;
    width:7px; height:7px;
    background:#4ade80;
    border-radius:50%;
    animation:pulse 1.8s infinite;
}
@keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:0.6; transform:scale(1.3); }
}
.supportCloseBtn {
    background:rgba(255,255,255,0.15) !important;
    color:white !important;
    width:30px !important; height:30px !important;
    min-height:unset !important;
    border-radius:8px !important;
    border:none !important;
    font-size:16px;
    cursor:pointer;
    padding:0;
}
.supportCloseBtn:hover { background:rgba(255,255,255,0.28) !important; }

.supportTabs { display:flex; border-bottom:1px solid rgba(20,54,72,0.08); }
.supportTabBtn {
    flex:1; height:38px;
    border:none; background:rgba(20,54,72,0.04);
    color:var(--muted); font-size:12px; font-weight:700;
    cursor:pointer; transition:0.2s; min-height:unset; border-radius:0;
}
.supportTabBtn.active { background:white; color:var(--primary); border-bottom:2px solid var(--primary); }

#supportMessages {
    height:200px; overflow-y:auto;
    padding:12px; display:flex;
    flex-direction:column; gap:6px;
}
.supportBubble {
    max-width:82%; padding:9px 13px;
    border-radius:14px; font-size:13px; line-height:1.7; word-break:break-word;
}
.agentBubble { background:rgba(20,54,72,0.07); color:var(--text); align-self:flex-start; border-radius:4px 14px 14px 14px; }
.userBubble  { background:var(--primary); color:white; align-self:flex-end; border-radius:14px 4px 14px 14px; }

.supportInputRow {
    display:flex; gap:8px;
    padding:10px 12px;
    border-top:1px solid rgba(20,54,72,0.08);
    background:rgba(255,255,255,0.6);
    border-radius:0 0 20px 20px;
}
.supportInputRow input {
    flex:1; height:36px;
    border:1.5px solid rgba(20,54,72,0.12);
    border-radius:10px; padding:0 12px;
    font-size:14px; margin:0; background:white; width:auto;
}
.supportInputRow button {
    width:36px; height:36px;
    min-height:unset; border-radius:10px;
    background:var(--primary); color:white;
    border:none; font-size:16px; cursor:pointer; flex-shrink:0; transition:0.2s;
}
.supportInputRow button:hover { background:var(--accent); color:var(--primary); }

/* ===========================================
   EXPLORE PAGE (ریلز موبایل)
=========================================== */







    



























.reelContent h2 { font-size:22px; margin-top:16px; margin-bottom:8px; }








/* ===========================================
   EMPTY STATE
=========================================== */
.emptyState {
    background:var(--glass);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(255,255,255,0.2);
    border-radius:20px;
    padding:32px 20px;
    text-align:center;
    margin-top:16px;
    color:#444;
}
.emptyState h3 { font-size:20px; margin-bottom:8px; }
.emptyState p  { color:var(--muted); line-height:1.8; }

/* ===========================================
   ACTIVITY CARD (پنل‌ها)
=========================================== */
.activityCard {
    background:rgba(255,255,255,0.7);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    border-radius:16px;
    padding:16px;
    margin-bottom:16px;
    box-shadow:var(--shadow-soft);
    transition:0.25s;
}
.activityCard:hover { transform:translateY(-3px); }
.activityCard h3 { margin-top:0; color:var(--text); }
.activityCard p  { color:#555; line-height:1.8; }

/* ===========================================
   FOOTER
=========================================== */
.footer {
    margin-top:auto;
    background:var(--primary);
    color:white;
    padding:40px 20px 20px;
    border-top:4px solid var(--accent);
    border-radius:24px 24px 0 0;
}
.footerGrid {
    max-width:1400px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
    gap:24px;
}
.footer h3, .footer h4 { margin-bottom:12px; color:var(--hover); }
.footer p, .footer a {
    color:rgba(255,255,255,0.8);
    text-decoration:none;
    display:block;
    margin-bottom:8px;
    line-height:1.8;
    font-size:14px;
}
.footer a {
    transition: color 0.2s, padding-right 0.2s;
}
.footer a:hover {
    color:var(--hover);
    padding-right:4px;
}
.footerBottom {
    margin-top:24px;
    padding-top:16px;
    border-top:1px solid rgba(255,255,255,0.15);
    text-align:center;
    font-size:13px;
}

/* در موبایل footer کوچک‌تر */
@media (max-width:768px) {
    .footer { margin-top:auto; }
    .footerGrid { grid-template-columns:repeat(2,1fr); gap:16px; }
}

/* ===========================================
   TICKET MODAL
=========================================== */
#ticketMessages {
    max-height:260px;
    overflow-y:auto;
    padding:10px 0;
    display:flex;
    flex-direction:column;
    gap:8px;
}

/* ===========================================
   MISC
=========================================== */
.cardActions { display:flex; gap:10px; margin-top:12px; }
.postMeta    { display:flex; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:13px; }

/* will-change برای animation‌های مهم */
.postCard, .modalContent, .conversationCard, .profileModal { will-change:transform; }

/* اطمینان از نمایش صحیح در Safari iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottomNav {
        padding-bottom:env(safe-area-inset-bottom);
        height:calc(var(--bottom-h) + env(safe-area-inset-bottom));
    }
}

/* ===========================================
   MEDIA UPLOAD
=========================================== */
.mediaUploadBox {
    margin-bottom: 14px;
}
.mediaUploadBtn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed rgba(20,54,72,0.2);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: 0.2s;
    background: rgba(248,237,213,0.4);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
}
.mediaUploadBtn:hover {
    border-color: var(--primary);
    background: rgba(20,54,72,0.05);
}
.mediaPreviewList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.mediaPreviewItem {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(20,54,72,0.1);
    flex-shrink: 0;
}
.mediaPreviewItem img,
.mediaPreviewItem video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}
.mediaPreviewItem .removeMedia {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
    min-height: unset;
    padding: 0;
}
.mediaVideoThumb {
    position: relative;
}
.mediaVideoThumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: rgba(0,0,0,0.3);
}

/* ===========================================
   PROFILE AVATAR UPLOAD
=========================================== */
.profileAvatarWrap {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.profileAvatarOverlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: 0.2s;
}
.profileAvatarWrap:hover .profileAvatarOverlay { opacity: 1; }

.editAvatarWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.editAvatarImg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(20,54,72,0.15);
    margin: 0;
    padding: 0;
}
.editAvatarLabel {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

/* ===========================================
   POST CARD MEDIA (کارت آگهی با عکس/فیلم)
=========================================== */
.postMediaSlider {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #e8ddd0;
}
.postMediaSlider img,
.postMediaSlider video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mediaDotsWrap {
    position: absolute;
    bottom: 6px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
}
.mediaDot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: 0.2s;
}
.mediaDot.active { background: white; }

/* ===========================================
   REELS (اکسپلور ریلز)
=========================================== */
#explorePage.active {
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    bottom: var(--bottom-h);
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    z-index: 100;
    display: block !important;
}
@media (max-width: 768px) {
    #explorePage {
        bottom: calc(var(--bottom-h) + var(--safe-bottom));
    }
}
.reelImageWrap {
    width: 100%;
    height: 45%;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, #0d2030 100%);
    flex-shrink: 0;
}
.reelImageWrap .reelBg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.reelImageWrap .reelBgPlaceholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reelTypeBadge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--accent);
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.reelContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 12px;
    justify-content: space-between;
    background: var(--bg);
    color: var(--text);
    overflow-y: auto;
}

.reelOwnerRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reelOwnerAvatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.reelOwnerName { font-size: 13px; font-weight: 700; color: var(--text); }
.reelOwnerCity { font-size: 11px; color: var(--subtext); }

.reelTitle { font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--text); }
.reelDesc  { font-size: 13px; color: var(--text); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.reelMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.reelMeta span {
    background: rgba(20,54,72,0.07);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
}

.reelBtns {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.reelDetailBtn {
    flex: 1;
    height: 46px;
    border: 2px solid var(--primary);
    border-radius: 14px;
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reelRequestBtn {
    flex: 2;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.reelActions { display: none; }
.reelGradient { display: none; }

/* نوار پیشرفت ویدیو */
.reelVideoProgress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 4;
    transition: width 0.5s linear;
}
/* ===== ADMIN PANEL ===== */
.adminLayout {
    display: flex;
    min-height: calc(100vh - 60px);
    gap: 0;
}

.adminSidebar {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(165deg, var(--primary), #0d2438);
    color: #fff;
    padding: 16px 0;
    border-radius: 18px;
    margin: 8px 0 8px 8px;
    position: sticky;
    top: 70px;
    height: fit-content;
    box-shadow: 0 16px 40px rgba(13,36,56,0.28);
}

.adminSidebarHeader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
    color: #fff;
}

.adminSidebarLogo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.adminNav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
}

.adminNavBtn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: rgba(255,255,255,0.7);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    width: 100%;
    transition: all 0.2s;
    position: relative;
}

.adminNavBtn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.adminNavBtn.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 700;
    box-shadow: inset -3px 0 0 var(--accent);
}
.adminNavBtn.active .adminNavIcon { color: var(--accent); }

.adminNavIcon { font-size: 16px; }

.adminNavBadge {
    margin-right: auto;
    background: #D85A30;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.adminNavBadge.show { display: inline-block; }

.adminMain {
    flex: 1;
    padding: 16px;
    min-width: 0;
}

.adminTab { display: none; }
.adminTab.active { display: block; }

.adminTabTitle {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary);
}

.statsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.statCard {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(20,54,72,0.08);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(20,54,72,0.06);
    transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s cubic-bezier(.2,.8,.2,1);
}
.statCard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,54,72,0.14); }

.statCard.statWarn  { border-color: rgba(245,166,35,0.35); background: rgba(245,166,35,0.08); }
.statCard.statDanger { border-color: rgba(216,90,48,0.35);  background: rgba(216,90,48,0.08); }
.statHero {
    position: relative;
    overflow: hidden;
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary), #1f4d68);
    border: none;
    border-radius: 20px;
    padding: 22px 24px;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(20,54,72,0.25);
}
/* بلاب‌های تزئینی، همون امضای بصری فرم لاگین، اینجا هم تکرار میشه */
.statHero::before,
.statHero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(36px);
    pointer-events: none;
}
.statHero::before { width: 160px; height: 160px; background: var(--accent); opacity: 0.22; top: -60px; left: -40px; }
.statHero::after  { width: 140px; height: 140px; background: #fff; opacity: 0.06; bottom: -60px; right: 10%; }
.statHero .statHeroLabel {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 6px;
}
.statHero .statHeroNum {
    font-size: 32px;
    font-weight: 800;
    color: var(--hover);
    font-variant-numeric: tabular-nums;
}
.statHero .statHeroSub {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.statHero .statHeroSubItem {
    text-align: center;
}
.statHero .statHeroSubItem .n {
    font-size: 18px;
    font-weight: 700;
    color: white;
}
.statHero .statHeroSubItem .l {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.statSectionLabel {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin-top: 4px;
    margin-bottom: -4px;
}
.statNum {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.statLabel {
    font-size: 12px;
    color: var(--muted);
}

.adminFilterBar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* جدول‌های داخل پنل‌ها — یه‌بار تعریف، همه‌جا استفاده میشه */
.dataTableWrap {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(20,54,72,0.08);
    border-radius: 18px;
    overflow: auto;
    box-shadow: 0 6px 20px rgba(20,54,72,0.07);
}
.dataTable { width: 100%; border-collapse: collapse; font-size: 13px; }

.dataTable thead th {
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 11.5px;
    padding: 15px 18px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1.5px solid rgba(20,54,72,0.1);
}

.dataTable tbody tr {
    border-bottom: 1px solid rgba(20,54,72,0.06);
    cursor: pointer;
    transition: background 0.15s ease;
}
.dataTable tbody tr:last-child { border-bottom: none; }
.dataTable tbody tr:nth-child(even) { background: rgba(20,54,72,0.02); }
.dataTable tbody tr:hover { background: rgba(233,196,106,0.14); }

.dataTable td {
    padding: 14px 18px;
    white-space: nowrap;
}
.dataTable td:first-child { font-weight: 600; color: var(--primary); }

.dataBadge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.dataBadge.badge-ok { background: rgba(99,153,34,0.12); color: #3B6D11; }
.dataBadge.badge-pending { background: rgba(216,90,48,0.12); color: #D85A30; }
.dataBadge.badge-warn { background: rgba(245,166,35,0.14); color: #BA7517; }
.dataBadge.badge-danger { background: rgba(216,90,48,0.12); color: #D85A30; }
.dataBadge.badge-neutral { background: rgba(20,54,72,0.08); color: var(--muted); }
.dataBadge.badge-info { background: rgba(59,130,246,0.12); color: #2563eb; }
.dataBadge.badge-purple { background: rgba(123,47,190,0.12); color: #7B2FBE; }

.dataActionRow { display: flex; gap: 6px; flex-wrap: wrap; }
.dataActionBtn {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    background: rgba(20,54,72,0.07);
    color: var(--primary);
    white-space: nowrap;
}
.dataActionBtn:hover { background: rgba(20,54,72,0.13); }
.dataActionBtn.action-success { background: rgba(99,153,34,0.12); color: #3B6D11; }
.dataActionBtn.action-success:hover { background: rgba(99,153,34,0.22); }
.dataActionBtn.action-danger { background: rgba(216,90,48,0.12); color: #D85A30; }
.dataActionBtn.action-danger:hover { background: rgba(216,90,48,0.22); }

.dataSelect {
    padding: 6px 10px;
    border: 1.5px solid rgba(20,54,72,0.14);
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
}
.dataUserCell { display: flex; align-items: center; gap: 10px; }
.dataAvatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), #1a4a6b);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
    flex-shrink: 0;
}

/* موبایل سایدبار */
@media (max-width: 700px) {
    .adminLayout { flex-direction: column; }
    .adminSidebar {
        width: 100%;
        min-width: unset;
        margin: 8px 0 0;
        border-radius: 12px;
        position: static;
    }
    .adminNav { flex-direction: row; flex-wrap: wrap; }
    .adminNavBtn { flex: 1; min-width: 80px; flex-direction: column; gap: 4px; font-size: 11px; padding: 8px 6px; }
    .adminNavIcon { font-size: 18px; }
}
/* === REQUESTS BADGE === */
.navBtnRequests { position: relative; }
.requestsBadge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #D85A30;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    pointer-events: none;
}
.mobileOnly { display: none !important; }
@media (max-width:768px) {
    .mobileOnly { display: flex !important; }
    .modalContent {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
    }
    .modal { align-items: flex-end !important; }
    .modal:has(.profileModal) {
    align-items: flex-end !important;
    padding: 0 !important;
    background: rgba(0,0,0,0.6) !important;
}
}

/* === REQUESTS MODAL LIST === */
.reqItem {
    background: rgba(20,54,72,0.03);
    border: 1px solid rgba(20,54,72,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.reqItemTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.reqItemTitle { font-weight: 700; font-size: 14px; color: var(--primary); }
.reqItemBadge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(244,162,97,0.15);
    color: #BA7517;
    white-space: nowrap;
}
.reqItemBadge.new {
    background: rgba(74,222,128,0.15);
    color: #3B6D11;
}
.reqItemMeta { font-size: 12px; color: var(--muted); }
.reqItemActions { display: flex; gap: 8px; margin-top: 4px; }
.reqActionBtn {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
}
.reqActionBtn.accept { background: var(--primary); color: white; }
.reqActionBtn.accept:hover { background: #0f2d44; }
.reqActionBtn.chat { background: rgba(20,54,72,0.08); color: var(--primary); }
.reqActionBtn.chat:hover { background: rgba(20,54,72,0.15); }
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottomNav {
        bottom:calc(16px + env(safe-area-inset-bottom));
    }
}
/* === POST MODAL === */
#dateSection input[type="date"] {
    font-size: 14px;
    padding: 10px 12px;
    border: 1.5px solid rgba(20,54,72,0.15);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    width: 100%;
}
#dateSection input[type="date"]:focus {
    box-shadow: 0 0 0 3px rgba(20,54,72,0.1);
    border-color: var(--primary);
}
.pricingRow {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.pricingRow .pricingDuration { flex: 1; min-width: 60px; }
.pricingRow .pricingUnit     { flex: 1.5; min-width: 80px; }
.pricingRow .pricingPrice    { flex: 2; min-width: 100px; }
.pricingRow .removePricingRow {
    width: 32px; height: 32px;
    border: none;
    background: rgba(216,90,48,0.1);
    color: #D85A30;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: unset;
    padding: 0;
}
.addPricingRowBtn {
    width: 100%;
    height: 38px;
    border: 1.5px dashed rgba(20,54,72,0.2);
    background: transparent;
    border-radius: 10px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: 0.2s;
}
.addPricingRowBtn:hover {
    background: rgba(20,54,72,0.05);
    border-color: var(--primary);
}
/* === OWNER PANEL === */
#ownerPanel h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}
#ownerPanel .statsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}
/* ============================================
   REQUEST MODAL — بازطراحی کامل
============================================ */

/* modal اصلی */
.requestModalContent {
    max-width: 560px !important;
    padding: 0 !important;
    border-radius: 24px;
    overflow: hidden;
}

/* header modal */
.requestModalHeader {
    background: var(--primary);
    color: white;
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* layout — یه ستونه بشه، چت برداشته بشه */
.requestLayout {
    flex-direction: column !important;
    max-height: 85vh;
    overflow-y: auto;
}

/* فرم */
.requestForm {
    flex: 1;
    padding: 20px;
    border-left: none !important;
    border-bottom: none !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.requestForm h2 {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* چت رو مخفی کن — چت جداگانه هست */
.requestChat {
    display: none !important;
}

/* کارت صاحب آگهی */
.ownerCardInline {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20,54,72,0.04);
    border: 1px solid rgba(20,54,72,0.08);
    border-radius: 14px;
    padding: 12px 14px;
}
.ownerAvatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20,54,72,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* جدول بازه‌های قیمت */
.pricingTableTitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.pricingTableRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border: 2px solid rgba(20,54,72,0.1);
    border-radius: 12px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 13px;
    background: white;
}
.pricingTableRow:hover {
    border-color: var(--primary);
    background: rgba(20,54,72,0.03);
}
.pricingTableRow.selected {
    border-color: var(--primary);
    background: rgba(20,54,72,0.06);
}
.pricingTablePrice {
    font-weight: 800;
    color: var(--primary);
}

/* بخش تاریخ‌ها */
#requestDatesSection {
    background: rgba(20,54,72,0.03);
    border: 1.5px solid rgba(20,54,72,0.1);
    border-radius: 14px;
    padding: 14px;
    margin: 0;
}
#requestDatesSection label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
    width: auto;
    padding: 0;
}
#requestDatesSection input[type="date"] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid rgba(20,54,72,0.15);
    border-radius: 10px;
    font-size: 13px;
    background: white;
    box-sizing: border-box;
}
#requestDaysCalc {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    text-align: center;
    background: rgba(244,162,97,0.1);
    border-radius: 8px;
    padding: 5px;
}

/* پلن انتخاب‌شده */
.selectedPlanBox {
    background: rgba(20,54,72,0.06);
    border: 1.5px solid rgba(20,54,72,0.15);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 0;
}
.selectedPlanPrice {
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
}

/* textarea توضیحات */
#requestNote {
    border: 1.5px solid rgba(20,54,72,0.15);
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    resize: none;
    height: 80px;
    background: white;
}
#requestNote:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20,54,72,0.08);
}

/* دکمه ارسال */
#submitRequestBtn {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    margin-top: 0;
}
#submitRequestBtn:disabled {
    background: rgba(20,54,72,0.25);
    cursor: not-allowed;
}
#submitRequestBtn:not(:disabled):hover {
    background: #0f2d44;
    transform: translateY(-1px);
}
/* ── Category Manager ── */
.catManageBox {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(15,45,68,0.08);
    max-width: 560px;
}
.catAddRow {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.catInput {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid rgba(15,45,68,0.15);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.catInput:focus {
    border-color: var(--primary);
}
.catAddBtn {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.catAddBtn:hover { opacity: 0.85; }
.catList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.catItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(15,45,68,0.03);
    border-radius: 12px;
    border: 1.5px solid rgba(15,45,68,0.07);
    transition: background 0.15s;
}
.catItem:hover { background: rgba(15,45,68,0.06); }
.catItemName {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}
.catEditInput {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.catEditBtn {
    padding: 6px 12px;
    background: rgba(15,45,68,0.08);
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.catEditBtn:hover { background: rgba(15,45,68,0.15); }
.catDeleteBtn {
    padding: 6px 12px;
    background: rgba(216,90,48,0.1);
    color: #D85A30;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}
.catDeleteBtn:hover { background: rgba(216,90,48,0.2); }
/* ── Date Display ── */
.dateFA {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
}
.dateDivider {
    margin: 0 5px;
    color: var(--muted);
    font-size: 11px;
}
.dateEN {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    direction: ltr;
    display: inline-block;
}
.dateChip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15,45,68,0.04);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}
.dateRange {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.dateRangeArrow {
    color: var(--muted);
    font-size: 11px;
    margin: 0 3px;
}
.dateRangeDays {
    font-weight: 400;
    color: var(--muted);
    font-size: 11px;
}
.dateRangeChip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15,45,68,0.05);
    border: 1px solid rgba(15,45,68,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}
/* ── Permission Manager ── */
.permCard {
    background:#fff;
    border-radius:16px;
    padding:20px;
    margin-bottom:16px;
    box-shadow:0 2px 12px rgba(15,45,68,0.08);
    border:1.5px solid rgba(15,45,68,0.07);
}
.permCardHeader {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
    flex-wrap:wrap;
    gap:8px;
}
.permCardName { font-weight:700; font-size:14px; margin-left:8px; }
.permCardUsername { font-size:12px; color:var(--muted); }
.permCardRole {
    font-size:11px;
    padding:3px 10px;
    border-radius:20px;
    background:rgba(15,45,68,0.07);
    color:var(--primary);
    font-weight:600;
}
.permToggles {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:10px;
}
.permToggle {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 12px;
    background:rgba(15,45,68,0.03);
    border-radius:10px;
    cursor:pointer;
}
.permToggleLabel { font-size:13px; }
.toggleSwitch { position:relative; width:36px; height:20px; flex-shrink:0; }
.toggleSwitch input { opacity:0; width:0; height:0; }
.toggleSlider {
    position:absolute;
    inset:0;
    background:rgba(15,45,68,0.15);
    border-radius:20px;
    transition:background 0.2s;
    cursor:pointer;
}
.toggleSlider:before {
    content:"";
    position:absolute;
    width:14px; height:14px;
    left:3px; top:3px;
    background:#fff;
    border-radius:50%;
    transition:transform 0.2s;
}
.toggleSwitch input:checked + .toggleSlider { background:var(--primary); }
.toggleSwitch input:checked + .toggleSlider:before { transform:translateX(16px); }
/* ── Request Cards ── */
.requestCard {
    border: 1.5px solid rgba(15,45,68,0.1);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    background: #fff;
}
.requestCardHeader {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}
.requestCardTitle {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
}
.requestStatusBadge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.requestCardMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.requestCardDate {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}
.requestCardActions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.reqAcceptBtn {
    flex: 1;
    padding: 8px;
    background: rgba(99,153,34,0.1);
    color: #3B6D11;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.reqAcceptBtn:hover { background: rgba(99,153,34,0.2); }
.reqRejectBtn {
    flex: 1;
    padding: 8px;
    background: rgba(216,90,48,0.1);
    color: #D85A30;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.reqRejectBtn:hover { background: rgba(216,90,48,0.2); }
.reqReturnBtn {
    flex: 1;
    padding: 8px;
    background: rgba(15,45,68,0.07);
    color: var(--primary);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.reqReturnBtn:hover { background: rgba(15,45,68,0.12); }
/* ── Notification ── */
.notifWrapper {
    position: relative;
}
.notifBtn {
    position: relative;
    font-size: 18px;
    padding: 6px 10px;
}
.notifBadge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #D85A30;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notifPanel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15,45,68,0.15);
    z-index: 9999;
    overflow: hidden;
    border: 1.5px solid rgba(15,45,68,0.08);
}
.notifPanelHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15,45,68,0.08);
    font-weight: 700;
    font-size: 13px;
}
.notifMarkAll {
    font-size: 11px;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}
.notifItem {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15,45,68,0.05);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
}
.notifItem:hover { background: rgba(15,45,68,0.03); }
.notifItem.unread { background: rgba(15,45,68,0.04); }
.notifIcon { font-size: 20px; flex-shrink: 0; }
.notifText { flex: 1; line-height: 1.5; }
.notifTime { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notifEmpty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* موبایل — notif page */
.notifPage {
    position: fixed;
    inset: 0;
    background: #f5f5f5;
    z-index: 9998;
    overflow-y: auto;
    padding: 16px;
}
.notifPageHeader {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width:480px) {
    #authBox { align-items: flex-start; padding-top: 20px; overflow-y: auto; }
    .authCard { margin-bottom: 20px; }
    .pricingRow .pricingPrice {
        width: 100% !important;
        flex-basis: 100%;
    }
}
/* ===== ICON SYSTEM — یکدست‌سازی آیکن‌ها ===== */
.iconInline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.iconInline svg {
    flex-shrink: 0;
}
[data-icon] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pricingTableDetail {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.pricingTableDetail th,
.pricingTableDetail td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: right;
}

.pricingTableDetail th {
    color: var(--muted);
    font-weight: 600;
    background: rgba(15,45,68,0.03);
}

.postDetailInfo {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
}
.postCard > button {
    border-radius: 0 0 18px 18px;
    margin: 0;
}
/* ===== TOAST NOTIFICATION ===== */
#toastContainer {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: #1f2937;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    max-width: 320px;
    text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #1a6b3a; }
.toast.error   { background: #b91c1c; }
.toast.warning { background: #b45309; }
/* ===== CONFIRM MODAL ===== */
#confirmModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    display: none;
    justify-content: center;
    align-items: center;
}
#confirmModal.show { display: flex; }
.confirmBox {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 20px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    font-family: inherit;
}
.confirmBox p {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
}
.confirmBtns {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirmBtns button {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    font-weight: 600;
}
.confirmOkBtn  { background: var(--primary); color: #fff; }
.confirmCancelBtn { background: #f3f4f6; color: var(--text); }
/* ===== EXPLORE / REELS ===== */
.reelCard {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - var(--nav-h) - var(--bottom-h));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    background: #f0e8d8;
    padding: 12px 12px calc(var(--bottom-h) + 12px);
    gap: 10px;
    box-sizing: border-box;
}

.reelImg {
    width: 100%;
    flex: 1.8;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: var(--primary);
    min-height: 0;
}

.reelImg img,
.reelImg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reelImgPlaceholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #143648 0%, #1e5070 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reelImgPlaceholder::after {
    content: '';
    width: 80px;
    height: 80px;
    background: url('assets/logo.png') center/contain no-repeat;
    opacity: 0.25;
}

.reelBadge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}
.reelBadge.give { background: var(--accent); color: var(--primary); }
.reelBadge.take { background: var(--primary); color: white; }

.reelOwnerBadge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 10px 6px 12px;
    border-radius: 30px;
}
.reelOwnerBadge img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}
.reelOwnerName { font-size: 12px; font-weight: 700; color: white; }
.reelOwnerCity { font-size: 10px; color: rgba(255,255,255,0.75); }

.reelBody {
    background: white;
    border-radius: 20px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    color: var(--text);
}

.reelBodyTop { display: flex; flex-direction: column; gap: 6px; }

.reelTitle {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
}

.reelDesc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reelMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.reelMeta span {
    background: rgba(20,54,72,0.07);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reelBtns {
    display: flex;
    gap: 8px;
}

.reelDetailBtn {
    flex: 1;
    height: 44px;
    border: 2px solid var(--primary);
    border-radius: 14px;
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}

.reelRequestBtn {
    flex: 2;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.reelActions { display: none; }
.reelGradient { display: none; }
@media (min-width:769px) {
    .bottomNav { display:none !important; }
}
@media (display-mode: browser) and (max-width:768px) {
    .bottomNav { display:none !important; }
}
.filterDropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border: 1.5px solid rgba(20,54,72,0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(20,54,72,0.12);
    padding: 6px;
    z-index: 999;
    min-width: 150px;
    max-height: 220px;
    overflow-y: auto;
}

.filterDropdown div {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #143648;
    transition: background .15s;
}

.filterDropdown div:hover {
    background: #f8edd5;
}

.filterBtn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(20,54,72,0.2);
    background: #fff;
    color: #143648;
    font-family: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background .15s, color .15s;
}

.filterBtn.active {
    background: #143648;
    color: #fff;
    border-color: #143648;
}
/* === PENDING USERS REVIEW (تایید کاربران) === */
.pendingFilterBar {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:14px;
}
.pendingFilterBar .searchInput {
    flex:1;
    min-width:160px;
    max-width:none;
    height:40px;
}
.pendingCompleteBadge {
    margin-right:8px;
    padding:3px 10px;
    border-radius:20px;
    font-size:11px;
    background:rgba(244,162,97,0.22);
    color:var(--primary);
}
.pendingCompleteBadge.full {
    background:rgba(20,54,72,0.08);
}
.pendingStatusBadge {
    margin-right:6px;
    padding:3px 10px;
    border-radius:20px;
    font-size:11px;
    font-weight:600;
    background:rgba(244,162,97,0.32);
    color:var(--primary);
}
.pendingStatusBadge.rechecked {
    background:var(--hover);
    color:var(--primary);
}
/* === COMMENTS === */
.commentInput {
    width:100%;
    border:none;
    background:rgba(255,255,255,0.6);
    border-radius:14px;
    padding:12px 14px;
    font-size:14px;
    font-family:'Vazirmatn',sans-serif;
    resize:none;
    height:80px;
    margin-bottom:10px;
    transition:0.2s;
    box-sizing:border-box;
    display:block;
}
.commentInput:focus {
    background:white;
    box-shadow:0 0 0 3px rgba(20,54,72,0.1);
    outline:none;
}
@media (min-width: 769px) {
    .mobileOnly { display: none !important; }
}
/* ===========================================
   ADMIN PROFILE MODAL
=========================================== */
.adminProfileModal {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    margin: 0 !important;
    background: #f8edd5 !important;
}
@media (min-width: 769px) {
    .adminProfileModal {
        border-radius: 28px !important;
        width: 420px !important;
        max-width: 420px !important;
    }
}
.adminProfHeader {
    position: relative;
    background: linear-gradient(145deg, #143648 0%, #1a4a6b 100%);
    border-radius: 24px 24px 0 0;
    padding: 28px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.adminProfClose {
    position: absolute;
    top: 14px;
    left: 16px;
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
}
.adminProfClose:hover {
    background: rgba(255,255,255,0.28) !important;
}
.adminProfAvatarWrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.4);
    margin-bottom: 6px;
}
.adminProfAvatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.adminProfName {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin: 0;
}
.adminProfRole {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.12);
    padding: 3px 12px;
    border-radius: 20px;
    margin: 0;
}
.adminProfBody {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.adminProfInfo {
    background: white;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
}
.adminProfInfo div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(20,54,72,0.06);
}
.adminProfInfo div:last-child {
    border-bottom: none;
}
.adminProfPerms {
    background: white;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 13px;
}
.adminProfActions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 6px;
}
.bannerCarousel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(31,38,135,0.08);
    border: 1px solid rgba(20,54,72,0.08);
}
.bannerSlide {
    width: 100%;
    aspect-ratio: 21/9;
    cursor: pointer;
    background: #e8e0d5;
}
.bannerSlide img { width:100%; height:100%; object-fit:cover; display:block; }
.bannerDots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}
.bannerDot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.bannerDot.active { background: #fff; width: 16px; border-radius: 3px; }
.bannerCarousel {
    max-width: 900px;
    margin: 0 auto 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
}
.bannerSlide {
    position: relative;
    cursor: pointer;
    aspect-ratio: 3 / 1;
    background: var(--primary);
}
.bannerSlide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bannerDots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.bannerDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.bannerDot.active {
    background: var(--hover);
}
.bannerTextSlide {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding: 24px 40px;
    box-sizing: border-box;
}
.bannerTextSlide.style-primary  { background: linear-gradient(135deg, var(--primary), #1f4d68); }
.bannerTextSlide.style-accent   { background: linear-gradient(135deg, #D85A30, var(--accent)); }
.bannerTextSlide.style-gradient { background: linear-gradient(135deg, var(--primary), #D85A30); }
.bannerTextSlide h3 {
    color: var(--hover);
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
}
.bannerTextSlide p {
    color: white;
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}
.staffMsgItem, .staffMsgItem.announcement { display: none; } /* دیگه استفاده نمی‌شن */

#staffThreadMessages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 2px;
}
.staffThreadModalContent {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    height: min(72vh, 620px);
    max-height: min(72vh, 620px);
    overflow: hidden !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, rgba(248,237,213,0.5), rgba(255,255,255,0.92)) !important;
}
.staffThreadHeader::before {
    content: "";
    position: absolute;
    z-index: 0;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.18;
    top: -60px; left: -30px;
}
.staffThreadHeader h2 {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 16px;
    margin: 0;
}
.staffThreadModalContent .closeModal {
    background: rgba(255,255,255,0.18);
    color: #fff;
}
.staffThreadModalContent .closeModal:hover { background: rgba(255,255,255,0.32); color:#fff; }

.staffThreadModalContent .staffThreadMessagesBox {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.staffThreadModalContent .requestChatInput {
    flex-shrink: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.staffBubble {
    position: relative;
    cursor: pointer;
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 14px rgba(20,54,72,0.08);
    align-self: flex-end;
    border-bottom-right-radius: 16px;
    border-bottom-left-radius: 4px;
    transition: filter 0.15s ease;
}
.staffBubble:hover { filter: brightness(0.97); }
.staffBubble.mine {
    overflow: hidden;
    color: white;
    background: linear-gradient(150deg, #1c4560, #0f2d44 55%, #143648);
    align-self: flex-start;
    box-shadow: 0 6px 18px rgba(20,54,72,0.3);
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 16px;
}
.staffBubble.mine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.14) 48%, transparent 58%);
    pointer-events: none;
}
.staffBubble.mine:hover { filter: brightness(1.12); }
.staffBubbleSender {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 3px;
}
.staffBubble.mine .staffBubbleSender { display: none; }

.conversationItem {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(20,54,72,0.06);
    box-shadow: 0 3px 10px rgba(20,54,72,0.06);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s cubic-bezier(.2,.8,.2,1);
}
.conversationItem:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,54,72,0.13); }
.conversationItem .conversationName { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.conversationItemAvatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
/* ===========================================
   گفتگوی تیم — چیدمان دو‌ستونه (دسکتاپ)
=========================================== */
@media (min-width:769px) {
    #staffInboxPage .container {
        display: flex;
        align-items: flex-start;
        gap: 20px;
    }
    #staffInboxPage .staffChatListCol {
        width: 340px;
        flex-shrink: 0;
    }

    /* مودال دیگه overlay نیست، ستون دوم می‌شه */
    #staffThreadModal {
        position: static !important;
        display: block !important;
        background: none !important;
        inset: auto !important;
        flex: 1;
        min-width: 0;
        padding: 0;
    }
    #staffThreadModal .staffThreadModalContent {
        width: 100%;
        height: min(78vh, 660px);
        max-height: none;
        animation: none;
    }
    /* دکمه‌ی × دیگه لازم نیست، پنل همیشه بازه */
    #staffThreadModal .closeModal { display: none; }

    /* حالتی که هنوز هیچ گفتگویی انتخاب نشده */
    .staffChatEmptyState {
        display: flex;
        align-items: center;
        justify-content: center;
        height: min(78vh, 660px);
        border-radius: 24px;
        background: rgba(255,255,255,0.5);
        border: 1.5px dashed rgba(20,54,72,0.15);
        color: var(--muted);
        font-size: 14px;
    }
    #staffThreadModal.hasThread ~ .staffChatEmptyState,
    .staffChatContainerHasThread .staffChatEmptyState { display: none; }
}
/* توی موبایل، empty-state اصلاً لازم نیست دیده بشه */
.staffChatEmptyState { display: none; }

/* هایلایت مکالمه‌ی انتخاب‌شده، مثل تلگرام */
.conversationItem.active {
    background: rgba(20,54,72,0.08);
    border-color: var(--primary);
}
/* هدر گفتگو با آواتار */
.staffThreadHeader { display:flex; align-items:center; gap:10px; }
.staffThreadAvatar {
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:13px; flex-shrink:0;
    position:relative; z-index:1;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.18), 0 4px 12px rgba(216,90,48,0.35);
}

/* جداکننده‌ی تاریخ و پیام‌های جدید */
.staffDayDivider, .staffNewDivider { display:flex; align-items:center; justify-content:center; margin:14px 0 6px; }
.staffDayDivider span, .staffNewDivider span {
    font-size:11px; font-weight:600; padding:4px 14px; border-radius:20px;
    background:rgba(255,255,255,0.55);
    backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
    border:1px solid rgba(20,54,72,0.06);
    color:var(--muted);
}
.staffNewDivider span {
    background:rgba(244,162,97,0.22);
    border-color:rgba(244,162,97,0.35);
    color:#993c1d;
}

/* فاصله‌ی کمتر بین پیام‌های پشت‌سرهم یک نفر */
#staffThreadMessages { gap:4px; }
.staffBubble { margin-top:8px; }
.staffBubble.grouped { margin-top:0; }
.staffBubbleSender { font-size:11px; font-weight:700; margin-bottom:3px; opacity:0.75; }

/* باکس پیام چندخطی */
.requestChatInput {
    align-items:flex-end;
    background:rgba(255,255,255,0.5);
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
}
.requestChatInput textarea {
    flex:1; max-height:120px; min-height:38px;
    border:1px solid rgba(255,255,255,0.7);
    border-radius:20px;
    padding:10px 16px; font-size:14px; font-family:inherit;
    resize:none; line-height:1.5;
    background:rgba(255,255,255,0.65);
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    box-shadow:inset 0 1px 3px rgba(20,54,72,0.06);
}
/* تیک دیده/ارسال‌شده */
.staffTick { font-size:11px; opacity:0.85; }
.staffTick.seen { color:#8ecdf7; }

/* نقل‌قول پیامی که بهش پاسخ داده شده */
.staffReplyQuote {
    display:flex;
    flex-direction:column;
    gap:2px;
    font-size:11.5px;
    padding:6px 10px;
    border-right:3px solid var(--accent);
    background:rgba(0,0,0,0.06);
    border-radius:8px;
    margin-bottom:6px;
    opacity:0.9;
}
.staffReplyQuote b { color:var(--accent); font-size:11px; }
.staffBubble.mine .staffReplyQuote {
    border-right-color:rgba(255,255,255,0.65);
    background:rgba(255,255,255,0.15);
}
.staffBubble.mine .staffReplyQuote b { color:#fff; }

/* نوار پیش‌نمایش پاسخ بالای باکس پیام */
.staffReplyPreviewBar {
    display:flex; align-items:center; gap:8px;
    background:rgba(255,255,255,0.6);
    backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
    border:1px solid rgba(244,162,97,0.4);
    border-radius:12px;
    padding:8px 12px; margin:0 12px 8px; font-size:12.5px;
}
.staffReplyPreviewText { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.staffReplyPreviewText b { color:var(--accent); margin-left:4px; }
.staffReplyCancel {
    cursor:pointer; font-weight:700; font-size:16px; opacity:0.5;
    width:20px; height:20px; display:flex; align-items:center; justify-content:center;
    border-radius:50%;
}
.staffReplyCancel:hover { opacity:1; background:rgba(20,54,72,0.08); }
.staffThreadHeader {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a4a6b, #0f2d44 60%, #143648);
    padding: 18px 52px 16px 20px;
    flex-shrink: 0;
}
.staffThreadHeader::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.10) 45%, transparent 60%);
    pointer-events: none;
}
#chatModal .modalContent { border-radius: 24px; }
#chatModal .requestChatHeader {
    border-radius: 24px 24px 0 0;
    padding-left: 54px;
}