﻿/* =========================================================
   CARPEEN TOPBAR
   ========================================================= */

:root {
    --cp-sidebar-width: 270px;
    --cp-topbar-height: 100px;
}

/* ---------- Topbar ---------- */

.cp-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: var(--cp-sidebar-width) !important;
    height: var(--cp-topbar-height) !important;
    z-index: 900 !important;
    padding: 9px 14px !important;
    direction: rtl !important;
    box-sizing: border-box !important;
    transition: right .25s ease !important;
}

.cp-topbar-inner {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    background: linear-gradient( 135deg, #164E63 0%, #124153 55%, #0E3442 100% ) !important;
    box-shadow: 0 8px 25px rgba(30, 64, 175, .20) !important;
    color: #fff !important;
}


/* ---------- Logo ---------- */

.cp-topbar-logo {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    height: 44px !important;
    padding: 0 7px !important;
    color: #fff !important;
    text-decoration: none !important;
    direction: rtl !important;
}

    .cp-topbar-logo img {
        width: 34px !important;
        height: 34px !important;
        object-fit: contain !important;
    }

.cp-topbar-logo-text {
    color: #fff !important;
    font-size: 18px !important;
    white-space: nowrap !important;
}


/* ---------- Divider ---------- */

.cp-topbar-divider {
    width: 1px !important;
    height: 28px !important;
    flex: 0 0 1px !important;
    background: rgba(255,255,255,.18) !important;
}


/* ---------- Breadcrumb ---------- */

.cp-topbar-breadcrumb {
    flex: 0 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    color: rgba(255,255,255,.72) !important;
    font-size: 12px !important;
    white-space: nowrap !important;
}

    .cp-topbar-breadcrumb a {
        color: rgba(255,255,255,.72) !important;
        text-decoration: none !important;
    }

        .cp-topbar-breadcrumb a:hover {
            color: #fff !important;
        }

.cp-topbar-breadcrumb-current {
    color: #fff !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* ---------- Garage ---------- */

.cp-topbar-garage {
    flex: 0 1 170px !important;
    min-width: 90px !important;
    max-width: 170px !important;
    margin-right: auto !important;
    overflow: hidden !important;
}

.cp-topbar-garage-label {
    display: block !important;
    color: rgba(255,255,255,.58) !important;
    font-size: 9px !important;
    line-height: 14px !important;
}

.cp-topbar-garage-name {
    display: block !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


/* ---------- Search ---------- */

.cp-topbar-search {
    flex: 0 1 270px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    border-radius: 11px !important;
    background: rgba(255,255,255,.13) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
}

    .cp-topbar-search i {
        flex: 0 0 auto !important;
        color: rgba(255,255,255,.75) !important;
        font-size: 14px !important;
    }

    .cp-topbar-search input {
        width: 100% !important;
        min-width: 0 !important;
        border: 0 !important;
        outline: 0 !important;
        background: transparent !important;
        color: #fff !important;
        padding: 0 9px !important;
        font-family: inherit !important;
        font-size: 11px !important;
        direction: rtl !important;
    }

        .cp-topbar-search input::placeholder {
            color: rgba(255,255,255,.62) !important;
        }

/* ---------- Actions ---------- */

.cp-topbar-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.cp-topbar-action {
    position: relative !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

    .cp-topbar-action:hover {
        background: rgba(255,255,255,.20) !important;
        color: #fff !important;
    }

    .cp-topbar-action i {
        font-size: 14px !important;
    }

.cp-topbar-notification-badge {
    position: absolute !important;
    top: -3px !important;
    left: -3px !important;
    min-width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    border-radius: 20px !important;
    background: #ef4444 !important;
    color: #fff !important;
    border: 2px solid #2563eb !important;
    font-size: 8px !important;
    font-weight: 700 !important;
}


/* ---------- Profile ---------- */

.cp-topbar-profile-wrapper {
    position: relative !important;
    flex: 0 0 auto !important;
    min-width:100px;
}

.cp-topbar-profile {
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 3px 5px 3px 9px !important;
    border-radius: 11px !important;
    background: rgba(255,255,255,.10) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

    .cp-topbar-profile:hover {
        background: rgba(255,255,255,.18) !important;
    }

.cp-topbar-profile-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255,255,255,.35) !important;
}

.cp-topbar-profile-info {
    max-width: 105px !important;
    overflow: hidden !important;
}

.cp-topbar-profile-name {
    color: #fff !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cp-topbar-profile-role {
    color: rgba(255,255,255,.60) !important;
    font-size: 10px !important;
    margin-top: 1px !important;
}

.cp-topbar-profile-arrow {
    color: rgba(255,255,255,.65) !important;
    font-size: 8px !important;
}


/* ---------- Mobile menu ---------- */

.cp-topbar-mobile-menu {
    display: none !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .cp-topbar {
        right: 0 !important;
        left: 0 !important;
        height: 100px !important;
        padding: 7px 9px !important;
    }

    .cp-topbar-inner {
        border-radius: 12px !important;
        padding: 0 7px !important;
        gap: 5px !important;
    }

    .cp-topbar-mobile-menu {
        flex: 0 0 38px !important;
        width: 38px !important;
        height: 38px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 0 !important;
        border-radius: 9px !important;
        background: rgba(255,255,255,.13) !important;
        color: #fff !important;
        cursor: pointer !important;
    }

        .cp-topbar-mobile-menu i {
            font-size: 15px !important;
        }

    .cp-topbar-logo {
        padding: 0 3px !important;
        margin-right: auto !important;
    }

    .cp-topbar-logo-text {
        display: none !important;
    }

    .cp-topbar-logo img {
        width: 32px !important;
        height: 32px !important;
    }

    .cp-topbar-divider,
    .cp-topbar-breadcrumb,
    .cp-topbar-search,
    .cp-topbar-garage-label {
        display: none !important;
    }

    .cp-topbar-garage {
        flex: 0 1 120px !important;
        max-width: 120px !important;
        margin-right: 0 !important;
    }

    .cp-topbar-garage-name {
        font-size: 10px !important;
    }

    .cp-topbar-actions {
        gap: 3px !important;
    }

    .cp-topbar-action {
        width: 36px !important;
        height: 36px !important;
    }

    .cp-topbar-profile-info,
    .cp-topbar-profile-arrow {
        display: none !important;
    }

    .cp-topbar-profile {
        padding: 2px !important;
        background: transparent !important;
    }

    .cp-topbar-upgrade {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        flex: 0 0 38px !important;
        border-radius: 10px !important;
    }

        .cp-topbar-upgrade span {
            display: none !important;
        }

        .cp-topbar-upgrade i {
            margin: 0 !important;
            font-size: 14px !important;
        }
}


/* =========================================================
   CONTENT OFFSET
   ========================================================= */

.cp-admin-content {
    margin-right: var(--cp-sidebar-width) !important;
    width: calc(100% - var(--cp-sidebar-width)) !important;
    padding-top: 82px !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {

    .cp-admin-content {
        margin-right: 0 !important;
        width: 100% !important;
        padding-top: 60px !important;
    }
    .cp-topbar-logo {
        display: none !important;
    }
    .cp-topbar-profile-wrapper {
        min-width: 0px;
    }
}

/* =========================================================
   LEFT TOPBAR ACTIONS
   ========================================================= */

.cp-topbar-left-actions {
    margin-left: 0 !important;
    margin-right: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
}


/* ==========================================
   CARPEEN GLASS TOPBAR
   فقط تغییر ظاهری؛ بدون تغییر در ساختار و منطق
   ========================================== */
.cp-topbar {
    position: relative;
    z-index: 1030;
    /* شیشه مات */
    background: rgba(255, 255, 255, 0.76) !important;
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    /* حاشیه و عمق */
    border-bottom: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 4px 24px rgba(20, 40, 30, 0.055), 0 1px 0 rgba(30, 80, 55, 0.045);
    transition: background-color .25s ease, box-shadow .25s ease;
}

.cp-topbar-inner {
    position: relative;
    min-width: 0;
}

/* لوگو */
.cp-topbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex-shrink: 0;
}

    .cp-topbar-logo img {
        object-fit: contain;
        transition: transform .2s ease;
    }

    .cp-topbar-logo:hover img {
        transform: scale(1.04);
    }

.cp-topbar-logo-text {
    font-weight: 900;
    letter-spacing: -.3px;
    transition: opacity .2s ease;
}

.cp-topbar-logo:hover .cp-topbar-logo-text {
    opacity: .82;
}

/* جداکننده */
.cp-topbar-divider {
    width: 1px;
    height: 30px;
    flex-shrink: 0;
    background: linear-gradient( to bottom, transparent, rgba(80, 110, 90, .25), transparent );
}

/* مسیر صفحه */
.cp-topbar-breadcrumb {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px;
    color: #87938b;
    font-size: 12px;
}

    .cp-topbar-breadcrumb a {
        color: #567263;
        text-decoration: none;
        white-space: nowrap;
        transition: color .2s ease;
    }

        .cp-topbar-breadcrumb a:hover {
            color: #176b4b;
        }

    .cp-topbar-breadcrumb > span:not(.cp-topbar-breadcrumb-current) {
        color: #bdc7c0;
    }

.cp-topbar-breadcrumb-current {
    color: #263e31;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* دکمه منوی موبایل */
.cp-topbar-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(70, 110, 85, .13);
    border-radius: 14px;
    background: rgba(255, 255, 255, .65);
    color: #245b40;
    box-shadow: 0 3px 12px rgba(20, 60, 35, .045);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

    .cp-topbar-mobile-menu:hover {
        background: rgba(224, 242, 230, .9);
        border-color: rgba(50, 120, 75, .22);
    }

    .cp-topbar-mobile-menu:active {
        transform: scale(.96);
    }

/* بخش عملیات سمت چپ */
.cp-topbar-left-actions {
    min-width: 0;
}

/* درخواست ارتقاء */
.cp-topbar-upgrade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    padding: 8px 13px;
    border: 1px solid rgba(207, 160, 62, .28);
    border-radius: 13px;
    background: linear-gradient( 135deg, rgba(255, 248, 225, .9), rgba(255, 239, 190, .65) );
    color: #90631a;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .cp-topbar-upgrade:hover {
        color: #795013;
        background: rgba(255, 239, 190, .95);
        box-shadow: 0 5px 15px rgba(180, 135, 45, .12);
        transform: translateY(-1px);
    }

/* آیکون‌های عملیات */
.cp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 41px;
    height: 41px;
    border: 1px solid rgba(70, 110, 85, .13);
    border-radius: 14px;
    background: rgba(255, 255, 255, .62);
    color: #426d55;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

    .cp-topbar-action:hover {
        background: rgba(225, 242, 230, .95);
        border-color: rgba(54, 125, 78, .2);
        color: #176b4b;
        transform: translateY(-1px);
    }

/* پروفایل */
.cp-topbar-profile-wrapper {
    position: relative;
    flex-shrink: 0;
}

.cp-topbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 47px;
    padding: 5px 9px;
    border: 1px solid rgba(70, 110, 85, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .60);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .cp-topbar-profile:hover,
    .cp-topbar-profile[aria-expanded="true"] {
        background: rgba(255, 255, 255, .92);
        border-color: rgba(60, 120, 80, .22);
        box-shadow: 0 5px 16px rgba(25, 65, 40, .065);
    }

.cp-topbar-profile-avatar {
    display: block;
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(20, 55, 35, .12);
}

.cp-topbar-profile-info {
    min-width: 0;
}

.cp-topbar-profile-name {
    max-width: 150px;
    overflow: hidden;
    color: #294334;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-topbar-profile-role {
    margin-top: 3px;
    color: #87938b;
    font-size: 10px;
}

.cp-topbar-profile-arrow {
    margin-right: 3px;
    color: #829187;
    font-size: 10px;
    transition: transform .2s ease;
}

.cp-topbar-profile[aria-expanded="true"] .cp-topbar-profile-arrow {
    transform: rotate(180deg);
}

/* منوی بازشونده پروفایل */
.cp-topbar-profile-wrapper .dropdown-menu {
    min-width: 235px;
    padding: 0;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 18px;
    background: rgba(22, 78, 99, .88);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    box-shadow: 0 18px 45px rgba(16, 40, 48, .20), 0 2px 8px rgba(16, 40, 48, .07);
}

.cp-topbar-profile-wrapper .dropdown-content {
    margin: 0;
    padding: 8px;
    background: transparent !important;
    color: #fff;
}

    .cp-topbar-profile-wrapper .dropdown-content > li:first-child {
        padding: 14px 12px !important;
    }

        .cp-topbar-profile-wrapper .dropdown-content > li:first-child .font-medium {
            color: #fff;
            font-size: 13px;
            font-weight: 800;
        }

        .cp-topbar-profile-wrapper .dropdown-content > li:first-child .text-xs {
            color: rgba(255, 255, 255, .68);
            direction: ltr;
            text-align: right;
        }

.cp-topbar-profile-wrapper .dropdown-divider {
    margin: 5px 8px;
    border-color: rgba(255, 255, 255, .12) !important;
}

.cp-topbar-profile-wrapper .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 41px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

    .cp-topbar-profile-wrapper .dropdown-item:hover,
    .cp-topbar-profile-wrapper .dropdown-item:focus {
        background: rgba(255, 255, 255, .13) !important;
        color: #fff;
    }

    .cp-topbar-profile-wrapper .dropdown-item i {
        width: 18px;
        text-align: center;
        opacity: .88;
    }

    .cp-topbar-profile-wrapper .dropdown-item:focus-visible {
        outline: 2px solid rgba(255, 255, 255, .75);
        outline-offset: -2px;
    }

/* موبایل */
@media (max-width: 767px) {
    .cp-topbar {
        background: rgba(255, 255, 255, .82) !important;
        -webkit-backdrop-filter: blur(20px) saturate(155%);
        backdrop-filter: blur(20px) saturate(155%);
    }

    .cp-topbar-profile {
        gap: 0;
        padding: 5px;
    }

    .cp-topbar-profile-info,
    .cp-topbar-profile-arrow {
        display: none;
    }

    .cp-topbar-profile-avatar {
        width: 34px;
        height: 34px;
    }

    .cp-topbar-breadcrumb {
        gap: 5px;
        font-size: 11px;
    }

    .cp-topbar-upgrade {
        min-height: 38px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .cp-topbar-action {
        width: 38px;
        height: 38px;
    }
}

/* گوشی‌های باریک: حفظ فضای عناصر */
@media (max-width: 420px) {
    .cp-topbar-breadcrumb > span:not(.cp-topbar-breadcrumb-current) {
        display: none;
    }

    .cp-topbar-upgrade span {
        display: none;
    }

    .cp-topbar-upgrade {
        width: 38px;
        padding: 0;
    }

        .cp-topbar-upgrade i {
            margin: 0;
        }
}

/* احترام به تنظیم کاهش حرکت سیستم */
@media (prefers-reduced-motion: reduce) {
    .cp-topbar *,
    .cp-topbar-profile-wrapper .dropdown-menu {
        transition: none !important;
    }
}

/* ==========================================
   CARPEEN — TRUE FROSTED GLASS TOPBAR
   حذف رنگ سبز از سطح اصلی نوار
   ========================================== */

.cp-topbar {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* سطح اصلی شیشه‌ای */
.cp-topbar-inner {
    background: rgba(255, 255, 255, 0.48) !important;
    -webkit-backdrop-filter: blur(28px) saturate(155%) !important;
    backdrop-filter: blur(28px) saturate(155%) !important;
    border: 1px solid #d2d2d2 !important;
    box-shadow: 0 8px 30px rgba(25, 45, 35, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
    color: #263e31 !important;
}

/* لوگو و عنوان */
.cp-topbar-logo,
.cp-topbar-logo-text {
    color: #263e31 !important;
}

/* جداکننده */
.cp-topbar-divider {
    background: rgba(60, 80, 68, 0.16) !important;
}

/* مسیر صفحه */
.cp-topbar-breadcrumb {
    color: #7b887f !important;
}

    .cp-topbar-breadcrumb a {
        color: #64766a !important;
    }

        .cp-topbar-breadcrumb a:hover {
            color: #176b4b !important;
        }

.cp-topbar-breadcrumb-current {
    color: #263e31 !important;
}

/* نام تعمیرگاه */
.cp-topbar-garage-label {
    color: #77867c !important;
}

.cp-topbar-garage-name {
    color: #263e31 !important;
}

/* کادر جستجو */
.cp-topbar-search {
    background: rgba(255, 255, 255, 0.42) !important;
    border-color: rgba(80, 100, 85, 0.14) !important;
}

    .cp-topbar-search i {
        color: #718176 !important;
    }

    .cp-topbar-search input {
        color: #263e31 !important;
    }

        .cp-topbar-search input::placeholder {
            color: #89968c !important;
        }

/* دکمه‌های عملیات */
.cp-topbar-action {
    background: rgba(255, 255, 255, 0.48) !important;
    border: 1px solid rgba(80, 100, 85, 0.13) !important;
    color: #496653 !important;
    box-shadow: 0 2px 8px rgba(30, 50, 35, 0.035) !important;
}

    .cp-topbar-action:hover {
        background: rgba(255, 255, 255, 0.78) !important;
        color: #176b4b !important;
    }

/* پروفایل */
.cp-topbar-profile {
    background: rgba(255, 255, 255, 0.42) !important;
    border-color: rgba(80, 100, 85, 0.13) !important;
}

    .cp-topbar-profile:hover,
    .cp-topbar-profile[aria-expanded="true"] {
        background: rgba(255, 255, 255, 0.78) !important;
    }

.cp-topbar-profile-name {
    color: #263e31 !important;
}

.cp-topbar-profile-role,
.cp-topbar-profile-arrow {
    color: #7b887f !important;
}

/* منوی موبایل */
.cp-topbar-mobile-menu {
    background: rgba(255, 255, 255, 0.55) !important;
    color: #315b40 !important;
    border-color: rgba(80, 100, 85, 0.14) !important;
}

/* حفظ خوانایی در موبایل */
@media (max-width: 767px) {
    .cp-topbar-inner {
        background: rgba(255, 255, 255, 0.56) !important;
        -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
        backdrop-filter: blur(24px) saturate(150%) !important;
    }
}

/* ==========================================
   CARPEEN — TOPBAR UPGRADE BUTTON
   ========================================== */

.cp-topbar-upgrade {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 40px !important;
    padding: 0 15px !important;
    background: linear-gradient(135deg, #176b4b, #10553b) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(23, 107, 75, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease !important;
}

    .cp-topbar-upgrade i {
        color: #ffdc83 !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
    }

    .cp-topbar-upgrade span {
        color: #ffffff !important;
    }

    .cp-topbar-upgrade:hover {
        background: linear-gradient(135deg, #1c8059, #146746) !important;
        color: #ffffff !important;
        box-shadow: 0 6px 16px rgba(23, 107, 75, 0.27) !important;
        transform: translateY(-1px);
        text-decoration: none !important;
    }

        .cp-topbar-upgrade:hover span,
        .cp-topbar-upgrade:hover i {
            color: #ffffff !important;
        }

    .cp-topbar-upgrade:focus-visible {
        outline: 3px solid rgba(23, 107, 75, 0.28) !important;
        outline-offset: 3px !important;
    }

/* موبایل: حفظ دکمه‌ی آیکونی */
@media (max-width: 420px) {
    .cp-topbar-upgrade {
        width: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        border-radius: 11px !important;
    }

        .cp-topbar-upgrade span {
            display: none !important;
        }

        .cp-topbar-upgrade i {
            color: #ffdc83 !important;
            margin: 0 !important;
        }
}

/* دکمه بلوری منوی اصلی کسب‌وکار */
.business-main-menu-button {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10970;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    padding: 13px 25px;
    color: #fff;
    font-family: "vazir";
    font-size: 14px;
    background: rgba(23, 105, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 8px 28px rgba(23, 105, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}


/* =========================================
   CARPEEN — GLASS BOTTOM MENU RIBBON
   Mobile only
   ========================================= */

.cp-main-menu-ribbon {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10970;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(290px, calc(100vw - 36px));
    min-height: 72px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 25px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.72), rgba(224, 239, 255, 0.34) 48%, rgba(190, 216, 255, 0.40) );
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    backdrop-filter: blur(22px) saturate(155%);
    box-shadow: 0 10px 32px rgba(18, 53, 105, 0.13), 0 2px 8px rgba(23, 105, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    isolation: isolate;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

    /* خط نور ظریف بالای ریبون */
    .cp-main-menu-ribbon::before {
        content: "";
        position: absolute;
        top: 0;
        left: 18%;
        right: 18%;
        height: 1px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        pointer-events: none;
    }

/* هاله نور پشت دکمه */
.cp-main-menu-ribbon-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(48, 125, 255, 0.16);
    filter: blur(22px);
    pointer-events: none;
    z-index: -1;
}

/* دکمه مرکزی */
.business-main-menu-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 178px;
    min-height: 50px;
    padding: 7px 17px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    color: #fff;
    font-family: "vazir";
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient( 135deg, #3988ff 0%, #1769ff 52%, #1556d8 100% );
    box-shadow: 0 6px 16px rgba(23, 105, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(0, 35, 120, 0.12);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

/* قاب شیشه‌ای آیکون */
.cp-main-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

    .cp-main-menu-icon i {
        font-size: 16px;
    }

.cp-main-menu-label {
    letter-spacing: -0.2px;
}

.cp-main-menu-chevron {
    margin-right: 2px;
    font-size: 10px;
    opacity: 0.78;
    transition: transform 0.18s ease;
}

/* واکنش هنگام لمس */
.business-main-menu-button:active {
    transform: scale(0.97);
    filter: brightness(1.05);
    box-shadow: 0 3px 9px rgba(23, 105, 255, 0.20), inset 0 1px 3px rgba(0, 35, 120, 0.12);
}

.business-main-menu-button:focus-visible {
    outline: 2px solid #1769ff;
    outline-offset: 3px;
}

/* مخفی شدن ریبون هنگام باز بودن سایدبار */
body:has(#CarpeenSidebar.open) .cp-main-menu-ribbon,
body:has(#CarpeenSidebar.active) .cp-main-menu-ribbon,
body:has(#CarpeenSidebar.show) .cp-main-menu-ribbon {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 16px);
}

/* فقط نمایش در موبایل */
@media (min-width: 768px) {
    .cp-main-menu-ribbon {
        display: none !important;
    }
}

/* موبایل‌های خیلی کوچک */
@media (max-width: 360px) {
    .cp-main-menu-ribbon {
        width: calc(100vw - 28px);
        min-height: 66px;
        padding: 8px 12px;
        border-radius: 22px;
    }

    .business-main-menu-button {
        min-width: 164px;
        min-height: 46px;
        font-size: 13px;
    }
}

/* احترام به تنظیم کاهش حرکت دستگاه */
@media (prefers-reduced-motion: reduce) {
    .cp-main-menu-ribbon,
    .business-main-menu-button,
    .cp-main-menu-chevron {
        transition: none !important;
    }
}

/* نوار شیشه‌ای منوی اصلی موبایل */
.cp-main-menu-ribbon {
    box-sizing: border-box;
    left: 50%;
    right: auto;
    width: min(270px, calc(100vw - 32px));
    min-height: 68px;
    padding: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

    /* دکمه کاملاً وسط نوار */
    .cp-main-menu-ribbon .business-main-menu-button {
        box-sizing: border-box;
        position: relative;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 48px;
        min-height: 48px;
        margin: 0;
        padding: 6px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border-radius: 17px;
        line-height: 1;
        text-align: center;
    }

    /* آیکون و متن با فاصله متعادل */
    .cp-main-menu-ribbon .cp-main-menu-icon {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .cp-main-menu-ribbon .cp-main-menu-label {
        flex: 0 0 auto;
        line-height: 1.5;
    }

    .cp-main-menu-ribbon .cp-main-menu-chevron {
        flex: 0 0 auto;
        margin: 0;
    }

/* موبایل‌های کوچک */
@media (max-width: 360px) {
    .cp-main-menu-ribbon {
        width: calc(100vw - 28px);
        min-height: 62px;
        padding: 7px;
    }

        .cp-main-menu-ribbon .business-main-menu-button {
            height: 46px;
            min-height: 46px;
            padding: 5px 10px;
        }
}

/* نوار شیشه‌ای منوی اصلی - فضای تعمیرگاه */
.cp-main-menu-ribbon {
    box-sizing: border-box;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(264px, calc(100vw - 32px));
    height: 68px;
    min-height: 68px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 23px;
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.76), rgba(220, 246, 228, 0.58), rgba(185, 230, 199, 0.42) );
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 8px 26px rgba(22, 101, 52, 0.12), 0 2px 8px rgba(22, 101, 52, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    isolation: isolate;
}

/* حذف نور تزئینی قبلی؛ جلوگیری از شلوغی نوار */
.cp-main-menu-ribbon-glow {
    display: none;
}

/* دکمه سبز با فاصله دقیق و یکسان از بالا و پایین */
.cp-main-menu-ribbon .business-main-menu-button {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: 50px;
    min-height: 50px;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient( 135deg, #35a765 0%, #218c4b 52%, #176d39 100% );
    box-shadow: 0 4px 12px rgba(25, 115, 58, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-family: "vazir";
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* آیکون */
.cp-main-menu-ribbon .cp-main-menu-icon {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
}

    .cp-main-menu-ribbon .cp-main-menu-icon i {
        font-size: 15px;
        line-height: 1;
    }

.cp-main-menu-ribbon .cp-main-menu-label {
    flex: 0 0 auto;
    margin: 0;
    line-height: 1.5;
}

.cp-main-menu-ribbon .cp-main-menu-chevron {
    flex: 0 0 auto;
    margin: 0;
    font-size: 10px;
    line-height: 1;
    opacity: 0.85;
}

/* واکنش دکمه به لمس */
.cp-main-menu-ribbon .business-main-menu-button:active {
    transform: scale(0.98);
}

.cp-main-menu-ribbon .business-main-menu-button:focus-visible {
    outline: 2px solid #218c4b;
    outline-offset: 3px;
}

/* هنگام باز بودن سایدبار، نوار مخفی شود */
body:has(#CarpeenSidebar.open) .cp-main-menu-ribbon,
body:has(#CarpeenSidebar.active) .cp-main-menu-ribbon,
body:has(#CarpeenSidebar.show) .cp-main-menu-ribbon {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 16px);
}

/* فقط موبایل */
@media (min-width: 768px) {
    .cp-main-menu-ribbon {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .cp-main-menu-ribbon {
        width: calc(100vw - 28px);
        height: 64px;
        min-height: 64px;
        padding: 7px;
    }

        .cp-main-menu-ribbon .business-main-menu-button {
            height: 48px;
            min-height: 48px;
            padding: 0 10px;
            gap: 8px;
            font-size: 13px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .cp-main-menu-ribbon,
    .cp-main-menu-ribbon .business-main-menu-button {
        transition: none !important;
    }
}

/* اصلاح نهایی تراز عمودی نوار منوی اصلی */
.cp-main-menu-ribbon {
    box-sizing: border-box !important;
    height: 68px !important;
    min-height: 68px !important;
    padding: 0 !important;
    display: block !important;
    position: fixed !important;
}

    /* قرارگیری دقیق دکمه در مرکز هندسی نوار */
    .cp-main-menu-ribbon .business-main-menu-button {
        box-sizing: border-box !important;
        position: absolute !important;
        left: 8px !important;
        right: 8px !important;
        top: 50% !important;
        width: auto !important;
        height: 50px !important;
        min-height: 50px !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 12px !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: normal !important;
    }

        /* حفظ افکت لمس بدون تغییر تراز عمودی */
        .cp-main-menu-ribbon .business-main-menu-button:active {
            transform: translateY(-50%) scale(0.98) !important;
        }

/* موبایل کوچک */
@media (max-width: 360px) {
    .cp-main-menu-ribbon {
        height: 64px !important;
        min-height: 64px !important;
    }

        .cp-main-menu-ribbon .business-main-menu-button {
            height: 48px !important;
            min-height: 48px !important;
        }
}

/* فضای تعمیرگاه: تم سبز */
.cp-main-menu-ribbon.cp-menu-garage {
    --menu-primary: #218c4b;
    --menu-secondary: #176d39;
    --menu-glow: rgba(33, 140, 75, 0.14);
    --menu-shadow: rgba(25, 115, 58, 0.23);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.78), rgba(220, 246, 228, 0.60), rgba(185, 230, 199, 0.44) );
    box-shadow: 0 8px 26px rgba(22, 101, 52, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* فضای کسب‌وکار: تم آبی */
.cp-main-menu-ribbon.cp-menu-business {
    --menu-primary: #1769ff;
    --menu-secondary: #124fc5;
    --menu-glow: rgba(23, 105, 255, 0.14);
    --menu-shadow: rgba(23, 105, 255, 0.23);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.78), rgba(224, 239, 255, 0.60), rgba(190, 216, 255, 0.44) );
    box-shadow: 0 8px 26px rgba(18, 53, 105, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* رنگ دکمه از تم والد گرفته می‌شود */
.cp-main-menu-ribbon .business-main-menu-button {
    background: linear-gradient( 135deg, var(--menu-primary), var(--menu-secondary) ) !important;
    box-shadow: 0 4px 12px var(--menu-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.cp-main-menu-ribbon .cp-main-menu-ribbon-glow {
    background: var(--menu-glow);
}

.cp-main-menu-ribbon .business-main-menu-button:focus-visible {
    outline-color: var(--menu-primary);
}

/* منوی شناور پایین صفحه فقط در موبایل */
@media screen and (min-width: 768px) {
    .cp-main-menu-ribbon {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}
