﻿@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 400;
    src: url("../../Assets/WebFonts/IRANSansWeb_Regular.woff2") format("woff2");
}

/* --- پالت رنگی و متغیرهای اختصاصی پنل --- */
:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --info-gradient: linear-gradient(135deg, #0dcaf0 0%, #0dcaf091 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #dc3545b1 100%);
    --sidebar-bg: #334155;
    --sidebar-color: #94a3b8;
    --sidebar-active-bg: rgba(255, 255, 255, 0.15);
    --sidebar-active-color: #3b82f6;
    --body-bg: #f0f2f5;
    --card-border-radius: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --margin-right-sidebar: 250px;
    --bg-patern-main: url(../../Assets/bg/pattern-white.png);
}
table, td {
    text-align:center;
    vertical-align:middle;
}
.bi::before {
    line-height : unset !important;
}
.attrValueColor {
    border: 2px solid #94a3b8;
    border-radius: 50%;
    display: inline-block;
    width: 19px;
    height: 19px;
    line-height: 1;
}
body {
    background-image: var(--bg-patern-main);
    background-color: var(--body-bg);
    background-repeat: repeat;
    /*font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;*/
    font-family: IRANSans, sans-serif;
    overflow-x: hidden;
}

.bg-dark-costum {
    background-color:var(--sidebar-bg);
}
/* --- هدر موبایل --- */
.mobile-header {
    display: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

/* --- سایدبار سیستم دسکتاپ و موبایل --- */
.sidebar {
    width: var(--margin-right-sidebar);
    height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    /*    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);*/
}
.sidebar .nav{
    background: linear-gradient(0deg, var(--sidebar-bg) 0%, #4469ad 25%, var(--sidebar-bg) 100%);
}
.back-drop {
    position: absolute;
    height: 100%;
    width: 100%;
    inset: 0px;
    color: transparent;
    object-fit: contain;
    display: block;
    pointer-events: none;
    top:80px
}
.text-light-sidebar {
    color: var(--sidebar-color);
    font-size: 0.75rem;
}
.brand-zone {
    padding: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-icon-box {
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar .nav-link {
    color: var(--sidebar-color);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border-right: 4px solid transparent;
    transition: var(--transition-smooth);
}

.sidebar .nav-link i {
    transition: var(--transition-smooth);
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius:50px 10px 10px 50px;
    margin-left:20px;
    border-right-color: rgb(255, 0, 110);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--sidebar-active-bg);
    border-right-color: #3b82f6;
    border-radius:50px 10px 10px 50px;
    margin-left:20px;
}

.sidebar .nav-link.active i {
    color: #54affa;
    transform: scale(1.1);
}

/* --- محتوای اصلی سیستم --- */
.main {
    margin-right: var(--margin-right-sidebar);
    background-color: var(--sidebar-bg);
}
.main-content {
    background-image: var(--bg-patern-main);
    background-color: var(--body-bg);
    background-repeat: repeat;
    padding: 30px;
    transition: var(--transition-smooth);
    border-top-right-radius: 2rem;
}
.desktop-header {
    background-color: var(--sidebar-bg);
}
.active-section div {
    -webkit-animation: show 0.5s ease-in-out normal forwards;
    animation: show 0.5s ease-in-out normal forwards;
}

@-webkit-keyframes show {
    from {
        opacity: 0.5;
        transform: scale(0.99);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes show {
    from {
        opacity: 0.5;
        transform: scale(0.99);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* --- سکشن‌های اصلی --- */
.app-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.app-section.active-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.border-radius-10{
    border-radius: 10px;
}
.border-radius-top-10{
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}
.border-radius-bottom-10 {
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}
.border-radius-20{
    border-radius: 20px;
}
.border-radius-top-20{
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
}
.border-radius-bottom-20 {
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
}
/* --- کارت‌ها و دکمه‌های مدرن --- */
.card-custom {
    background: linear-gradient(180deg, rgb(234, 240, 252) 0%, rgb(255, 255, 255) 100%);
    border: 1px solid #a5c0e5;
    border-radius: var(--card-border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: 24px;
}

.btn-custom-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: var(--transition-smooth);
}

.btn-custom-primary:hover {
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
    color: white;
}

.btn-custom-danger {
    background: var(--danger-gradient);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: var(--transition-smooth);
}

.btn-custom-danger:hover {
    box-shadow: 0 6px 20px rgba(229, 80, 70, 0.45);
    transform: translateY(-1px);
    color: white;
}

.btn-custom-info {
    background: var(--info-gradient);
    border: none;
    color: #334155;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    transition: var(--transition-smooth);
}

.btn-custom-info:hover {
    box-shadow: 0 6px 20px rgba(70, 185, 229, 0.45);
    transform: translateY(-1px);
    color: #334155;
}

/* --------------------------- طراحی نوین و تمیز جداول کالا ------------------------ */
.table-custom {
    margin-bottom: 0;
}
.w-fit-content{
    display:inline-block !important;
    width:fit-content;
}
.table-custom thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.img {
    width:48px;
}
#image-preview {
    position: fixed;
    top: 0px;
    left: 0px;
    z-index: 9999;
    display: none;
    border: 2px solid #fff;
    box-shadow: 15px 15px 30px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
    max-width: 400px;
}
#AttrValueList .table-custom td:nth-child(2n+1){
    direction:ltr;
}
#brandsBody .table-custom td:first-child {
    direction: ltr;
}
.table-custom tbody td {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr {
    transition: var(--transition-smooth);
}

.table-custom tbody tr:hover > * {
    background: linear-gradient(180deg, rgb(234, 240, 252) 0%, rgb(255, 255, 255) 100%);
}

.table-custom thead tr > *, .modal-body {
    background: linear-gradient(180deg, rgb(234, 240, 252) 0%, rgb(255, 255, 255) 100%);
}
/* --- طراحی اینپوت‌ها و المنت‌های فرم --- */
.form-control, .form-select {
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background-color: #fff;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: var(--transition-smooth);
    background-color: #fff;
    padding: 10px 14px;
    min-height: calc(1.8em + .75rem + 2px);
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background-color: #fff;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background-color: #fff;
}

.form-label {
    color: #475569;
    font-size: 0.88rem;
    font-weight:600;
    margin-bottom: 6px;
}

.form-check, .form-check-input, .form-check-label {
    cursor: pointer;
}
/* --- اورلی موبایل --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    transition: var(--transition-smooth);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/*----------------------- استایل لایه پوششی در زمان لودینگ --------------------------*/
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* پس‌زمینه نیمه‌شفاف سفید */
    display: none; /* در حالت عادی مخفی */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    color:orangered;
    z-index: 9999; /* قرارگیری روی تمام المان‌ها */
    backdrop-filter: blur(1px); /* افکت مات کردن پس‌زمینه (بسیار مدرن) */
}

/* طراحی اسپینر مدرن */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db; /* رنگ اصلی لودینگ */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* انیمیشن چرخش */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- واکنش‌گرایی (Responsive) --- */
@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        right: calc(var(--margin-right-sidebar) * -1);
    }

    .sidebar.show {
        right: 0px;
    }

    .main-content {
        padding: 10px;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }
    .main {
        margin-right: 0;
        margin-top :77px;
    }

    .w-sm-100 {
        width: 100% !important;
    }
}

/* حذف فلش‌ها در کروم، سافاری، اج و اپرا */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* حذف فلش‌ها در فایرفاکس */
input[type=number] {
    -moz-appearance: textfield;
}

.table-responsive .dataTable thead .dt-column-header {
    text-align: start;
    flex-direction: row-reverse;
}

.table-responsive .dataTable tr {
    text-wrap: nowrap;
}

.table-responsive .dataTable td {
    text-align: start !important;
}
div.dt-container div.dt-length select{
    width:100px;
}
.dt-length .input-group-text {
    border-radius:10px;
}
/************************************* مربوط به افزودن تصویر محصول ***************************************/
.image-upload-card {
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.image-upload-card:hover {
    border-color: #b2935c;
    background-color: #f0f7ff;
    transform: translateY(-5px);
}

.preview-img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    display: none;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
}

/* استایل سفارشی برای Input File */
.file-input, .pic-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.action-buttons {
    display: none;
    gap: 10px;
    z-index: 10;
}

.btn-action {
    padding: 5px 15px;
    font-size: 0.85rem;
    border-radius: 20px;
}

/* حالت فعال (زمانی که تصویر انتخاب شده) */
.has-image {
    border-style: solid;
    border-color: #e9ecef;
}

.has-image .bi-cloud-arrow-up-fill,
.has-image .upload-text {
    display: none;
}

.has-image .preview-img,
.has-image .action-buttons {
    display: flex;
}
/************************************** موبایل: تبدیل ردیف‌ها به کارت بدون نیاز به پلاگین *************************************/
@media (max-width: 768px) {
    /* مخفی کردن هدر اصلی جدول */
    .table-mobile thead {
        display: none;
    }
    #AttrValueList, #brandsBody, #section-products .card {
        background: none;
        border: none;
        box-shadow: none;
    }
    .table-mobile, .table-mobile tbody, .table-mobile tr, .table-mobile td {
        display: block;
        width: 100%;
    }
    .table-mobile tbody tr:last-child td {
        border-bottom: 1px solid #f1f5f9;
    }
    .table-mobile td {
        direction: rtl;
    }
    .table-mobile td span {
        direction: ltr;
    }
    .table-mobile tbody tr:last-child td:last-child {
        border-bottom: none;
    }

    .table-mobile tr {
        margin-bottom: 1.5rem;
        border: 1px solid #bed9f4;
        border-radius: 12px;
        padding: 1rem;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }

    .table-mobile td {
        text-align: left; /* برای نمایش لیبل در سمت راست و مقدار در سمت چپ */
        padding: 0.5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        gap: .3rem;
        align-items: center;
        border-bottom: 1px dashed #d5d5d5;
        text-wrap: balance;
        box-shadow: none !important;
    }
    .table-mobile td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 1rem;
    }

    /* اضافه کردن لیبل‌ها به صورت خودکار با استفاده از data-label */
    .table-mobile td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #8898aa;
        margin-left: auto; /* کشیدن لیبل به سمت راست در RTL */
        text-align: right;
    }
    .variant-row td:first-child{
        display:inline-block !important;
        width:fit-content;
        text-align:center;
    }
    .modal .table-responsive{
        border:none !important;
    }
    #AttrValueList .table-custom td:nth-child(2n+1) {
        direction: rtl;
    }
    #brandsBody .table-custom td:first-child {
        direction: rtl;
    }
}

/* ------------------- برای طراحی نقاط متحرک پراکنده روی دکمه --------------- */
.vsl-btn {
    position: relative;
    overflow:hidden;
    transition: all 0.3s;
}
/* استایل نقاط (Particles) */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none; /* از تداخل با موس جلوگیری می‌کند */
    z-index: 10;
}

.hidden {
    display: none;
}

.tox .tox-promotion{
    display:none;
}