*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:#f4f6f8;
    font-family:Tahoma,Arial,sans-serif;
    color:#111827;
}

.sidebar{
    position:fixed;
    right:0;
    top:0;
    bottom:0;
    width:230px;
    padding:25px 18px;
    background:#111827;
    color:#fff;
}

.logo{
    font-size:26px;
    font-weight:bold;
    margin-bottom:35px;
    direction:ltr;
    text-align:center;
}

.sidebar a{
    display:block;
    padding:12px 15px;
    margin-bottom:8px;
    border-radius:9px;
    text-decoration:none;
    color:#d1d5db;
}

.sidebar a:hover,
.sidebar a.active{
    background:#273244;
    color:#fff;
}

.main{
    margin-right:230px;
    padding:30px;
}

.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.role-badge{
    background:#111827;
    color:#fff;
    padding:8px 15px;
    border-radius:20px;
    font-size:12px;
}

.stat-card,
.table-card{
    background:#fff;
    border-radius:14px;
    padding:22px;
    box-shadow:0 3px 14px rgba(0,0,0,.05);
}

.stat-title{
    font-size:14px;
    color:#6b7280;
}

.stat-number{
    font-size:36px;
    font-weight:bold;
    margin-top:8px;
}

.login-body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#eef1f5;
}

.login-box{
    width:390px;
    max-width:calc(100% - 30px);
    background:#fff;
    padding:35px;
    border-radius:18px;
    box-shadow:0 10px 35px rgba(0,0,0,.09);
}

.login-box .brand{
    font-size:32px;
    font-weight:700;
    direction:ltr;
    margin-bottom:5px;
}

@media(max-width:800px){

    .sidebar{
        width:70px;
        padding:20px 8px;
    }

    .sidebar a{
        font-size:0;
        height:45px;
    }

    .logo{
        font-size:0;
    }

    .logo:after{
        content:"C";
        font-size:26px;
    }

    .main{
        margin-right:70px;
        padding:15px;
    }
}

/* ==========================================================
   CarIntel unified admin sidebar
   ========================================================== */

.sidebar{
    width:245px;
    min-width:245px;
    background:#111b2b;
    color:#fff;
    min-height:100vh;
    padding:26px 16px;
    box-sizing:border-box;
}

.sidebar-brand{
    text-align:center;
    font-size:29px;
    font-weight:900;
    margin-bottom:28px;
    direction:ltr;
}

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

.sidebar-nav a{
    display:block;
    color:#fff;
    text-decoration:none;
    padding:14px 16px;
    border-radius:10px;
    font-size:15px;
    transition:.15s ease;
}

.sidebar-nav a:hover{
    background:#1d2b40;
}

.sidebar-nav a.active{
    background:#27364b;
    font-weight:800;
}

@media(max-width:900px){

    .sidebar{
        width:210px;
        min-width:210px;
    }

    .sidebar-nav a{
        padding:11px 12px;
        font-size:13px;
    }
}


/* =========================================================
   GLOBAL CARINTEL ADMIN SIDEBAR
   ========================================================= */

.global-carintel-sidebar{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    width:245px;
    z-index:9999;
    background:#111b2b;
    color:#fff;
    padding:26px 16px;
    box-sizing:border-box;
    overflow-y:auto;
}

.global-carintel-logo{
    font-size:30px;
    font-weight:900;
    text-align:center;
    direction:ltr;
    margin-bottom:28px;
}

.global-carintel-sidebar nav{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.global-carintel-sidebar nav a{
    display:block;
    color:#fff;
    text-decoration:none;
    padding:14px 16px;
    border-radius:10px;
    font-size:15px;
}

.global-carintel-sidebar nav a:hover{
    background:#1d2b40;
}

.global-carintel-sidebar nav a.active{
    background:#29384d;
    font-weight:800;
}

/*
 * منوهای قدیمی صفحات را مخفی می‌کنیم
 * ولی منوی مرکزی جدید را نه
 */
body .sidebar:not(.global-carintel-sidebar),
body aside.sidebar:not(.global-carintel-sidebar){
    display:none !important;
}

body{
    padding-right:245px !important;
    box-sizing:border-box;
}

@media(max-width:850px){

    .global-carintel-sidebar{
        width:205px;
    }

    body{
        padding-right:205px !important;
    }

    .global-carintel-sidebar nav a{
        font-size:13px;
        padding:11px 12px;
    }
}


/* ===== CARINTEL CLEAN UI ===== */

/* حذف کامل سیستم رد از ظاهر */
.photo-reject-btn,
.inline-reject-btn,
.reject-inline-box,
.my-reject-box,
.remove-reject-btn {
    display: none !important;
}

/* حذف کامل باکس امتیاز پایین کارت */
.car-rating-box {
    display: none !important;
}



/* CARINTEL_MOBILE_FINAL_V1 */

/* جلوگیری از اسکرول افقی ناخواسته */
html,
body{
    max-width:100%;
    overflow-x:hidden;
}

/* موبایل و تبلت */
@media (max-width: 900px){

    html,
    body{
        width:100% !important;
        min-width:0 !important;
        padding-right:0 !important;
        margin:0 !important;
        overflow-x:hidden !important;
    }

    /*
     * منوی سمت راست در موبایل تبدیل به منوی پایین صفحه می‌شود
     */
    .global-carintel-sidebar{
        position:fixed !important;
        top:auto !important;
        bottom:0 !important;
        left:0 !important;
        right:0 !important;

        width:100% !important;
        height:68px !important;
        min-height:68px !important;

        padding:7px 8px !important;
        margin:0 !important;

        z-index:99999 !important;
        box-sizing:border-box !important;

        overflow-x:auto !important;
        overflow-y:hidden !important;

        border-radius:0 !important;
    }

    .global-carintel-logo{
        display:none !important;
    }

    .global-carintel-sidebar nav{
        display:flex !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;

        align-items:center !important;
        justify-content:flex-start !important;

        gap:5px !important;

        width:max-content !important;
        min-width:100% !important;

        margin:0 !important;
        padding:0 !important;
    }

    .global-carintel-sidebar nav a{
        flex:0 0 auto !important;

        display:flex !important;
        align-items:center !important;
        justify-content:center !important;

        min-height:48px !important;

        padding:8px 13px !important;
        margin:0 !important;

        font-size:13px !important;
        white-space:nowrap !important;

        border-radius:10px !important;
    }

    /*
     * محتوا در موبایل کل عرض صفحه را می‌گیرد
     */
    .main{
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;

        margin:0 !important;

        padding:
            16px
            12px
            90px
            12px !important;

        box-sizing:border-box !important;
    }

    .container,
    .container-fluid,
    .page-container,
    .content-container{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;

        margin-left:0 !important;
        margin-right:0 !important;

        padding-left:0 !important;
        padding-right:0 !important;

        box-sizing:border-box !important;
    }

    /*
     * گرید خودروها
     */
    .cars-grid,
    .car-grid,
    .cards-grid{
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:14px !important;
        width:100% !important;
    }

    .car-card{
        width:100% !important;
        max-width:none !important;
        min-width:0 !important;
        margin:0 !important;
    }

    .car-image{
        width:100% !important;
        max-width:100% !important;
        height:auto !important;
        aspect-ratio:16 / 9;
        object-fit:cover !important;
    }

    /*
     * فیلترها
     */
    .filters,
    .filter-grid,
    .filters-grid{
        width:100% !important;
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:8px !important;
    }

    input,
    select,
    textarea,
    button{
        max-width:100%;
        box-sizing:border-box;
    }

    /*
     * مشخصات خودرو
     */
    .info-grid{
        grid-template-columns:
            repeat(2,minmax(0,1fr))
            !important;
    }

    /*
     * داشبورد
     */
    .stats-grid,
    .dashboard-grid,
    .dashboard-cards,
    .stat-grid{
        display:grid !important;
        grid-template-columns:
            repeat(2,minmax(0,1fr))
            !important;
        gap:12px !important;
        width:100% !important;
    }

    /*
     * جداول
     */
    table{
        min-width:650px;
    }

    .table-responsive,
    .table-wrap,
    .table-container{
        overflow-x:auto !important;
        width:100% !important;
    }

}


/* موبایل کوچک */
@media (max-width: 560px){

    .main{
        padding:
            12px
            10px
            88px
            10px !important;
    }

    .stats-grid,
    .dashboard-grid,
    .dashboard-cards,
    .stat-grid{
        grid-template-columns:1fr !important;
    }

    .info-grid{
        grid-template-columns:1fr !important;
    }

    h1{
        font-size:25px !important;
    }

    h2{
        font-size:21px !important;
    }

}

/* END_CARINTEL_MOBILE_FINAL_V1 */

/* =========================================================
   CARINTEL ADMIN LAYOUT LOCK 2026
   فقط منوی مشترک + موبایل
   ========================================================= */

@media (min-width:851px){

    .global-carintel-sidebar{
        width:245px !important;
        right:0 !important;
        left:auto !important;
        top:0 !important;
        bottom:0 !important;
    }

    body{
        padding-right:245px !important;
    }
}


/* موبایل */
@media (max-width:850px){

    html,
    body{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        margin:0 !important;

        /* مهم: دیگر 205px سمت راست رزرو نشود */
        padding-right:0 !important;

        /* جا برای منوی پایین */
        padding-bottom:72px !important;

        overflow-x:hidden !important;
        box-sizing:border-box !important;
    }

    .global-carintel-sidebar{
        position:fixed !important;

        top:auto !important;
        right:0 !important;
        left:0 !important;
        bottom:0 !important;

        width:100% !important;
        height:66px !important;

        padding:7px 8px !important;
        margin:0 !important;

        overflow-x:auto !important;
        overflow-y:hidden !important;

        z-index:99999 !important;
        box-sizing:border-box !important;
    }

    .global-carintel-logo{
        display:none !important;
    }

    .global-carintel-sidebar nav{
        display:flex !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;
        align-items:center !important;

        width:max-content !important;
        min-width:100% !important;

        gap:5px !important;
        padding:0 !important;
        margin:0 !important;
    }

    .global-carintel-sidebar nav a{
        flex:0 0 auto !important;
        white-space:nowrap !important;

        padding:11px 13px !important;
        font-size:13px !important;
    }

    /* محتوای صفحه دیگر نباید جای منوی دسکتاپ را رزرو کند */
    .main{
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;

        margin-left:0 !important;
        margin-right:0 !important;

        padding-left:12px !important;
        padding-right:12px !important;

        box-sizing:border-box !important;
    }
}


/* =========================================================
   CARINTEL REMOVE DOUBLE SIDEBAR GAP
   ========================================================= */

/* دسکتاپ: جای منو قبلاً توسط body رزرو شده؛ main نباید دوباره فاصله بگیرد */
@media (min-width:851px){

    body{
        padding-right:245px !important;
    }

    .main{
        margin-right:0 !important;
        margin-left:0 !important;
        width:auto !important;
        max-width:none !important;
        box-sizing:border-box !important;
    }
}

/* موبایل: هیچ فضای سمت راست برای سایدبار دسکتاپ نماند */
@media (max-width:850px){

    body{
        padding-right:0 !important;
    }

    .main{
        margin-right:0 !important;
        margin-left:0 !important;
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }
}


/* =========================================================
   CARINTEL_TOP_HEADER_V1
   Desktop sidebar -> horizontal top header
========================================================= */

@media (min-width: 901px){

    html,
    body{
        overflow-x:hidden !important;
    }


    body{
        padding-right:0 !important;
        margin-right:0 !important;
    }


    .global-carintel-sidebar{
        position:sticky !important;

        top:0 !important;
        right:auto !important;
        left:auto !important;

        width:100% !important;
        max-width:none !important;

        height:72px !important;
        min-height:72px !important;

        padding:0 26px !important;
        margin:0 !important;

        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;

        gap:26px !important;

        background:#111c2d !important;

        border:0 !important;
        border-bottom:
            1px solid
            rgba(255,255,255,.08) !important;

        box-shadow:
            0 4px 18px
            rgba(15,23,42,.12) !important;

        z-index:10000 !important;
    }


    .global-carintel-logo{
        flex:0 0 auto !important;

        width:auto !important;

        margin:0 !important;
        padding:0 !important;

        font-size:27px !important;
        line-height:1 !important;

        font-weight:950 !important;

        color:#fff !important;

        white-space:nowrap !important;
    }


    .global-carintel-sidebar nav{
        flex:1 1 auto !important;

        width:auto !important;
        height:auto !important;

        margin:0 !important;
        padding:0 !important;

        display:flex !important;
        flex-direction:row !important;
        align-items:center !important;

        gap:5px !important;

        overflow-x:auto !important;
        overflow-y:hidden !important;

        scrollbar-width:none !important;
    }


    .global-carintel-sidebar nav::-webkit-scrollbar{
        display:none !important;
    }


    .global-carintel-sidebar nav a{
        width:auto !important;
        min-width:max-content !important;

        min-height:40px !important;

        margin:0 !important;
        padding:8px 14px !important;

        display:flex !important;
        align-items:center !important;
        justify-content:center !important;

        border-radius:8px !important;

        color:#eef4ff !important;

        background:transparent !important;

        font-size:14px !important;
        font-weight:700 !important;

        text-decoration:none !important;

        white-space:nowrap !important;
    }


    .global-carintel-sidebar nav a:hover{
        background:
            rgba(255,255,255,.08) !important;

        color:#fff !important;
    }


    .global-carintel-sidebar nav a.active{
        background:#2c405b !important;
        color:#fff !important;
    }


    /*
     * فضای خالی Sidebar قدیمی حذف شود
     */
    body .main,
    body main,
    body .content,
    body .content-wrapper,
    body .page-content,
    body .admin-content{
        margin-right:0 !important;
        padding-right:0 !important;
    }


    /*
     * صفحات مدیریتی از عرض واقعی Desktop استفاده کنند
     */
    body > .container,
    body main > .container,
    .admin-content > .container{
        max-width:1480px !important;
    }


    /*
     * دکمه موبایل در Desktop دیده نشود
     */
    .carintel-mobile-menu-btn{
        display:none !important;
    }

}

/* /CARINTEL_TOP_HEADER_V1 */

/* =========================================================
   CARINTEL_HEADER_ABSOLUTE_FINAL_V1
========================================================= */

@media (min-width:901px){

    html,
    body{
        margin:0 !important;
        padding-right:0 !important;
    }

    body{
        padding-top:72px !important;
    }

    .global-carintel-sidebar{
        position:fixed !important;

        top:0 !important;
        right:0 !important;
        left:0 !important;

        width:100% !important;
        height:72px !important;
        min-height:72px !important;

        margin:0 !important;
        padding:0 28px !important;

        display:flex !important;
        flex-direction:row !important;

        align-items:center !important;

        background:#111c2d !important;

        z-index:999999 !important;

        border-radius:0 !important;

        box-shadow:
            0 3px 14px
            rgba(15,23,42,.18) !important;
    }


    .global-carintel-logo{
        width:auto !important;
        flex:0 0 auto !important;

        margin:0 0 0 25px !important;
        padding:0 !important;

        color:#fff !important;

        font-size:28px !important;
        font-weight:900 !important;
    }


    .global-carintel-sidebar nav{
        position:static !important;

        display:flex !important;
        flex:1 1 auto !important;

        width:auto !important;
        height:auto !important;

        flex-direction:row !important;

        align-items:center !important;
        justify-content:flex-start !important;

        gap:4px !important;

        padding:0 !important;
        margin:0 !important;

        overflow-x:auto !important;
        overflow-y:hidden !important;
    }


    .global-carintel-sidebar nav a{
        width:auto !important;
        min-width:max-content !important;

        margin:0 !important;

        padding:10px 14px !important;

        color:#fff !important;

        border-radius:8px !important;

        white-space:nowrap !important;
    }


    .global-carintel-sidebar nav a.active{
        background:#2d425e !important;
    }


    .carintel-mobile-menu-btn{
        display:none !important;
    }


    body .main,
    body main,
    body .content,
    body .content-wrapper,
    body .page-content,
    body .admin-content{
        margin-right:0 !important;
        padding-right:0 !important;
    }

}

/* /CARINTEL_HEADER_ABSOLUTE_FINAL_V1 */
