﻿/* === تنظیمات عمومی و فارسی === */
:root {
    --primary-color: #b2935c; /* #007bff رنگ اصلی */
    --accent-color: #5d6770; /* رنگ خاکستری تیره برای متن */
    --sidebar-width: 250px;
    --collapsed-width: 70px;
    --bg-pattern: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="20" height="20" fill="%23f0f2f5"/><path d="M0 0h10v10H0zm10 10h10v10H10z" fill="%23e9ecef"/></svg>'); /* پترن ظریف پس‌زمینه */
    --bg-pattern2: url(../Assets/Icon/pattern-white.png);
    --primary-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-grad: linear-gradient(135deg, #2af598 0%, #009efd 100%);
    --warning-grad: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}
@font-face {
    font-family: "iransans";
    src: url("../fonts/IRANSansXFaNum-Regular.woff2") format('woff');
}

body, html {

    font-family: iransans, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    background-image: var(--bg-pattern2);
    background-repeat: repeat;
}

* {
    box-sizing: border-box;
}

.vazir-font {
    font-family: iransans, sans-serif !important;
}

/* === استایل‌های سایدبار (Sidebar) === */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #212529; /* رنگ تیره */
    color: #f8f9fa;
    transition: all 0.3s;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1050;
}
/* حالت کوچک شده سایدبار در دسکتاپ */
#sidebar.collapsed {
    width: var(--collapsed-width);
    min-width: var(--collapsed-width);
}

#sidebar .nav-link {
    color: #adb5bd;
    padding: 15px 10px;
    border-radius: 5px;
    margin: 5px 10px;
    transition: background-color 0.2s, color 0.2s;
    /* اطمینان از قرارگیری آیکون‌ها و متن در یک خط */
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#sidebar .nav-link:hover, #sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

#sidebar .nav-link i {
    width: 30px;
    text-align: center;
    /* مارجین آیکون در حالت باز */
    margin-left: 10px;
}

#sidebar .nav-link span {
    display: inline-block;
    opacity: 1;
    transition: opacity 0.3s, max-width 0.3s;
    overflow: hidden;
    max-width: 100%; /* برای انیمیشن عرض */
}
/* پنهان کردن متن در حالت کوچک شده سایدبار */
#sidebar.collapsed .nav-link span {
    opacity: 0;
    max-width: 0;
    padding: 0;
    margin: 0;
}

#sidebar.collapsed .nav-link i {
    margin-left: 0; /* حذف مارجین در حالت کوچک شده برای مرکز قرارگیری آیکون */
}

.sidebar-header {
    padding: 20px 10px;
    text-align: center;
    overflow: hidden;
    transition: all 0.3s;
}

#sidebar.collapsed .sidebar-header h4 {
    font-size: 0;
}

#sidebar.collapsed .sidebar-header i {
    font-size: 1.5rem;
}

/* === استایل‌های محتوای اصلی (Content) === */
#content {
    margin-right: var(--sidebar-width); /* فضای کنار برای سایدبار باز */
    transition: all 0.3s;
    padding: 20px;
}
    /* افزایش عرض محتوا در حالت کوچک شدن سایدبار */
    #content.collapsed {
        margin-right: var(--collapsed-width);
    }
/* کلاس برای بخش‌هایی که باید مخفی باشند */
.view2 {
    background: none !important;
    box-shadow: none  !important;
}

.view-section {
    display: none;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}
.active div {
    -webkit-animation: show 0.7s ease-in-out normal forwards;
    animation: show 0.7s ease-in-out normal forwards;
}
@-webkit-keyframes show {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes show {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* === کارت‌های آماری (Stats Cards) === */
.stat-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    overflow: hidden;
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

.card-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

/* === هدر اصلی و دکمه تاگل === */
#topbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    z-index: 1000;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === Overlay برای بستن منو در موبایل === */
#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    transition: opacity 0.3s;
}
.text-center{
    vertical-align: middle;
}

table.dataTable thead .dt-column-header {
    text-align:start;
    flex-direction: row-reverse;
}
table.dataTable tr{
    text-wrap:nowrap;
}
table.dataTable td{
    text-align: start !important;
}
.dt-search label {
    margin-left: 10px;
}
.form-control:focus {
    border-color: #66afe9;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}
.page-link:focus {
    box-shadow: none;
}
.form-select:focus {
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}

/* === رسپانسیو بودن (Responsive) و رفع مشکل موبایل === */
@media (max-width: 992px) {
    #sidebar {
        /* در موبایل، منو در ابتدا کاملا خارج از دید است */
        right: calc(-1 * var(--sidebar-width));
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* سایه بزرگتر برای حالت موبایل */
    }
        /* این کلاس توسط جاوااسکریپت برای باز کردن منو در موبایل اضافه می‌شود */
        #sidebar.sidebar-open-mobile {
            right: 0;
        }
    /* در موبایل، محتوا همیشه عرض کامل دارد و margin-right صفر است */
    #content {
        margin-right: 0 !important; /* مهم: نادیده گرفتن حالت collapsed دسکتاپ */
    }
        /* کلاس collapsed در موبایل تاثیری ندارد */
        #content.collapsed {
            margin-right: 0;
        }
}

.bi-arrow-repeat {
    display:inline-block;
    animation: 0.75s linear infinite spinner-border;
}
.bi::before {
    vertical-align:middle !important;
}
tr {
    cursor:pointer;
}
.inherit{
    width:inherit;
    padding:10px;
}
/*********************************** Modal Custom Styles **************************************/
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #bfa26d 0%, #b2935c 100%);
    color: white;
    border-bottom: none;
    padding: 1rem;
}

.modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1rem 2rem;
    background-color: #fff;
}

/* Form Styling */
.modal-content .form-label {
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.modal-content .input-group-text {
    background-color: #f8f9fa;
    border-left: none;
    color: #6c757d;
}

.modal-content .form-control, .modal-content .form-select {
    border-radius: 10px;
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.modal-content .form-control:focus, .modal-content .form-select:focus {
    border-color: #b2935c;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.1);
}

.modal-content .input-icon-wrapper {
    position: relative;
}

/* Footer & Buttons */
.modal-footer {
    border-top: 1px solid #f1f1f1;
    padding: 1.2rem 2rem;
    background-color: #f8f9fa;
}

.modal-content .btn-save {
    background: #b2935c;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-content .btn-save:hover {
    background: #977a47;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(190, 117, 28, 0.30);
}

.modal-content .btn-cancel {
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    color: #6c757d;
    font-weight: 600;
}

/* Image Upload Area Placeholder */
.image-upload-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-placeholder:hover {
    border-color: #b2935c;
    color: #b2935c;
    background-color: rgba(78, 115, 223, 0.02);
}

.img-fluid{
    width:30%;
}
.show-m {
    display:none;
}
@media (max-width: 991px) {
    .img-fluid {
        width: 50%;
    }
    .show-m {
        display:block;
    }
}
/******************************************************************************/
/* استایل اختصاصی کارت‌ها */
.category-wrapper {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    padding: 25px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-wrapper:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.category-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.card-level-1::before {
    background: var(--primary-grad);
}

.card-level-2::before {
    background: var(--success-grad);
}

.card-level-3::before {
    background: var(--warning-grad);
}

.btn-submit-1 {
    background: var(--primary-grad);
    color: white;
}

.btn-submit-2 {
    background: var(--success-grad);
    color: white;
}

.btn-submit-3 {
    background: var(--warning-grad);
    color: white;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
}

.category-header .icon-box {
    width: 40px;
    height: 40px;
    background: #e7f0ff;
    color: #0d6efd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    font-weight: bold;
}

.category-header h6 {
    margin: 0;
    font-weight: 700;
    color: #2d3436;
}

/* شخصی‌سازی کنترل‌های فرم */
.form-control-c, .form-select-c {
    border-radius: 12px 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    background-color: #fdfdfd;
    transition: all 0.2s;
}

.input-group .form-control-c, .input-group .form-select-c {
    border-radius: 12px 0 0 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    background-color: #fdfdfd;
    transition: all 0.2s;
}

.form-control-c:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    background-color: #fff;
}

.input-group-text-c {
    border-radius: 0 12px 12px 0 !important;
    background-color: #f8f9fa;
    border-color: #e0e0e0;
    color: #636e72;
    font-size: 0.9rem;
}

.form-control-c.old {
    background-color: #fff9e6;
    color: #856404;
    font-weight: bold;
    border-color: #ffeeba;
}

/* دکمه‌ها */
.btn-custom {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-success-custom {
    border: none;
}

.btn-success-custom:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-outline-danger-custom {
    border-width: 2px;
}

/* انیمیشن برای بخش ویرایش */
.lbl-2 {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-divider {
    height: 1px;
    background: linear-gradient(to left, transparent, #dee2e6, transparent);
    margin: 20px 0;
}

/************************************* مربوط به افزودن تصویر محصول ***************************************/
.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);
}

.upload-icon {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 10px;
}

.card-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
}

/* استایل سفارشی برای Input File */
.file-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 .upload-icon, 
.has-image .upload-text {
    display: none;
}

.has-image .preview-img, 
.has-image .action-buttons {
    display: flex;
}

/***********************************انواع محصول******************************/
:root {
    --brand-primary: #bfa26d;
    --brand-secondary: #b2935c;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 10px 30px -5px rgba(0,0,0,0.08);
    --input-bg: #fdfdfd;
    --text-main: #2b2d42;
    --text-muted: #8d99ae;
}

.main-wrapper {
    background-color: #f1f4f9;
    background-image: radial-gradient(at 0% 0%, rgba(67, 97, 238, 0.05) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(76, 201, 240, 0.05) 0px, transparent 50%);
}

/* Header Styling */
.dashboard-title {
    margin-bottom: 35px;
    border-right: 5px solid var(--brand-primary);
    padding-right: 15px;
}

.dashboard-title h2 {
    font-weight: 900;
    color: var(--text-main);
    margin: 0;
}

/* Glass Card Design */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

/* Premium Form Controls */
.form-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.custom-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 2px solid #e9ecef;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.custom-input-group:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    background: #fff;
}

.input-icon {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    border-left: 1px solid #eee;
}

.custom-input-group:focus-within .input-icon {
    color: var(--brand-primary);
}

.form-control-custom {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 12px 15px;
    width: 100%;
    font-weight: 500;
    outline: none;
}

select.form-control-custom {
    cursor: pointer;
    padding-left: 40px;
}

/* Button Styling */
.btn-add-item {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -6px rgba(190, 117, 28, 0.5);
}

.btn-add-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px -6px rgba(190, 117, 28, 0.6);
    color: #fff;
}

/* List Header */
.list-header {
    background: #2b2d42;
    color: white;
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.95;
    grid-template-columns: 1.5fr 1.5fr 1.5fr 1.5fr 2fr 100px;
}

/* Item Row Design */
.item-row {
    background: white;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1.5fr 1.5fr 2fr 100px;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.item-row:hover {
    border-color: #dee2e6;
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

.title-col { font-weight: 700; color: #1a1c23; }
.sub-text { font-size: 0.78rem; color: var(--text-muted); display: block; margin-top: 2px;}
        
.stock-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stock-high { background: #eefdf5; color: #10b981; }
.stock-low { background: #fff1f2; color: #f43f5e; }

.price-tag {
    font-weight: 900;
    color: #1a1c23;
    font-size: 1.1rem;
}

.price-currency {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.action-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #eee;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-circle:hover {
    background: #2b2d42;
    color: #fff;
}

/* Success Animation Classes */
.btn-success-state {
    background: #10b981 !important;
}

@media (max-width: 991px) {
    .item-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .list-header { display: none; }
    .action-circle { width: 100%; border-radius: 8px; }
}

.modal-body .btn-info {
    border-radius: 12px;
    padding: 10px 20px;
}
/***********************************خصوصیات محصول*******************************/
.modal-body {
    background-color: #f4f7fa;
}
/* Container Styling */
.attribute-section {
    background: #fff;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

/* Action Panel Styling */
.action-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.input-label-custom {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    display: block;
    margin-right: 5px;
}

.form-select-custom {
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-select-custom:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Buttons Styling */
.btn-add-attr {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-attr:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-default-attr {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-default-attr:hover {
    background: #dbeafe;
}

/* Features List Styling */
.group-title-modern {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-title-modern::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #3b82f6;
    border-radius: 10px;
}

.feature-item-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.feature-item-card:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    background: #fdfdfd;
}

.feature-info {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-grow: 1;
}

.feature-name {
    color: #64748b;
    font-size: 0.85rem;
    min-width: 100px;
}

.feature-value {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.95rem;
}

.btn-delete-feature {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    background: #fef2f2;
    border: none;
    transition: all 0.2s;
}

.btn-delete-feature:hover {
    background: #fee2e2;
    color: #dc2626;
}

/********************************* برای نمایش برچسب‌های محصول******************************/
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 40px;
    padding: 8px;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #b2935c;
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tag-badge:hover {
    background-color: #b58b40;
}

.remove-tag {
    margin-right: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
}

.remove-tag:hover {
    opacity: 1;
    color: #ffc107;
}

/* انیمیشن برای ورود تگ‌ها */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-tag {
    animation: fadeIn 0.3s ease-out;
}

/******************************** User Modal *******************************************/
:root {
    --primary: #6366f1;       /* Indigo */
    --primary-soft: #e0e7ff;
    --secondary: #64748b;     /* Slate */
    --success: #10b981;       /* Emerald */
    --warning: #f59e0b;       /* Amber */
    --danger: #ef4444;        /* Red */
    --surface: #ffffff;
    --bg-body: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* --- Modal Base --- */
.modal-content-c {
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    overflow: hidden;
    max-height: 92vh;
}

.modal-header-c {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 32px;
    align-items: center;
}

.modal-body-c {
    padding: 0;
    background-color: var(--bg-body);
    height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
}

/* --- Header Profile --- */
.profile-avatar {
    width: 57px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-md);
}

.user-meta h5 {
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.user-badges .badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
}

/* --- Navigation Tabs --- */
.sidebar-tabs {
    padding: 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap; /* جلوگیری از شکستن خط */
    -webkit-overflow-scrolling: touch; /* اسکرول نرم در موبایل */
    scrollbar-width: none;
}
        
.sidebar-tabs::-webkit-scrollbar { display: none; }

.sidebar-tabs .nav-pills {
    display: flex;
    flex-wrap: nowrap !important; /* اجباری کردن عدم شکست خط */
    gap: 10px;
}

.nav-pills .nav-link {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-pills .nav-link i {
    font-size: 1.1rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.nav-pills .nav-link:hover {
    background-color: #f1f5f9;
    color: #334155;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.1);
}

.nav-pills .nav-link.active i {
    color: var(--primary);
}

/* --- Content Area --- */
.tab-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 32px;
}
@media (max-width: 768px) {
    .tab-content-area {
        padding: 15px 12px;
    }
} 
/* --- Custom Cards --- */
.info-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.label-text {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.value-text {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Cart & Wishlist Items --- */
.product-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
        
.product-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.product-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
}

/* --- Timeline for Orders --- */
.timeline-item {
    position: relative;
    padding-right: 24px;
    margin-bottom: 24px;
    border-right: 2px solid #e2e8f0;
}
        
.timeline-item:last-child {
    margin-bottom: 0;
    border-right-color: transparent;
}

.timeline-dot {
    position: absolute;
    right: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px white;
}

.timeline-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

       
/* Utility Classes */
.text-price { font-weight: 800; }
.bg-soft-success { background-color: #dcfce7; color: #166534; }
.bg-soft-warning { background-color: #fef3c7; color: #b45309; }
.bg-soft-danger { background-color: #fee2e2; color: #b91c1c; }
        
/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

#modalLoader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1056;
    display: none;
    align-items: center;
    justify-content: center;
}
.wrap-text {
  display: -webkit-box;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.wh-60 {
    width:50px;
    height:50px;
}
.empty-state {
    text-align: center;
    padding: 50px;
    color: #94a3b8;
}
.table-mobile td span{
    float:right;
}
#order_user_list td:nth-child(2), #user_list td:nth-child(2) {
    direction: ltr;
}
.table-mobile td span::before {
    content: '#_';
    font-weight: bold;
}
.smallest {
    font-size : 0.6em;
}
.img-product{
    width:30%;
    background-color:#fff;
    padding:15px;
    border-radius:10px;
}

/******************************** Media *******************************************/
:root {
    --primary-color2: #4a90e2;
    --border-color2: #e1e1e1;
    --bg-hover: #f8f9fa;
}

.custom-select-container {
    position: relative;
    user-select: none;
}

/* The Main Display Box */
.select-button {
    background-color: #fff;
    border: 1px solid var(--border-color2);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .select-button:hover {
        border-color: var(--primary-color2);
    }

.selected-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-button i.arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* The Dropdown List */
.options-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color2);
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
}

    .options-list.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

.option-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

    .option-item:hover {
        background-color: var(--bg-hover);
    }

    .option-item i {
        width: 20px;
        text-align: center;
        color: #555;
    }

/* Custom Scrollbar */
.options-list::-webkit-scrollbar {
    width: 6px;
}

.options-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Rotation of arrow when open */
.custom-select-container.open .arrow {
    transform: rotate(180deg);
}

/******************************** Media *******************************************/
/* Mobile Optimization */
@media (max-width: 992px) {
    .feature-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .feature-item-card {
        padding: 12px;
    }

    .action-panel .row > div {
        margin-bottom: 15px;
    }

    .mobile {
        flex-direction: column;
    }
}

/* موبایل: تبدیل ردیف‌ها به کارت بدون نیاز به پلاگین */
@media (max-width: 768px) {
    /* مخفی کردن هدر اصلی جدول */
    .table-mobile thead {
        display: none;
    }

    .table-mobile, .table-mobile tbody, .table-mobile tr, .table-mobile td {
        display: block;
        width: 100%;
    }

    .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 span{
        direction:ltr;
    }
    #order_user_list td:nth-child(2), #user_list td:nth-child(2) {
        direction: rtl;
    }

    .table-mobile td {
        text-align: left; /* برای نمایش لیبل در سمت راست و مقدار در سمت چپ */
        padding: 0.5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed #d5d5d5;
        text-wrap: balance;
        box-shadow:none !important;
    }
    #table_products td:nth-child(3) {
        display: block;
    }
    .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;
    }
    #productsView .desktop .btn {
        flex: 1 1 calc(50% - 1.5rem);
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;    
    }
    .mt-ss-3{
        margin-top :1rem;
    }
}

.hide_btn_active {
    display: none !important;
}

