﻿/* ==========================================================================
   فایل استایل اصلی سایت (Main Stylesheet)
   شامل: متغیرها، ریست، تایپوگرافی، کامپوننت‌ها و کلاس‌های کمکی
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. متغیرهای رنگ و اندازه (CSS Variables)
   -------------------------------------------------------------------------- */
:root {
    /* رنگ‌های اصلی */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #6c8aff;
    --secondary: #7209b7;
    --secondary-dark: #5f0a9e;
    --secondary-light: #9d4edd;
    --accent: #f72585;
    --accent-dark: #d61f6e;
    --accent-light: #ff5ca8;
    /* رنگ‌های وضعیت */
    --success: #06d6a0;
    --success-dark: #05b586;
    --warning: #ffb703;
    --warning-dark: #e0a102;
    --danger: #e63946;
    --danger-dark: #c92c39;
    --info: #48cae4;
    --info-dark: #168aad;
    /* رنگ‌های خنثی */
    --dark: #212529;
    --gray-dark: #343a40;
    --gray: #6c757d;
    --gray-light: #adb5bd;
    --gray-lighter: #e9ecef;
    --light: #f8f9fa;
    --white: #ffffff;
    /* زمینه و متن */
    --body-bg: #f4f7fc;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --manager-area-background: url('/img/headers/manager-default.svg');
    --navbar-height: 64px;
    --font-body: "B Nazanin", "Nazanin", "Tahoma", "Vazirmatn", "Segoe UI", system-ui, sans-serif;
    --font-heading: "B Titr", "BTitr", "B Nazanin", "Nazanin", "Tahoma", sans-serif;
    --font-action: "B Yekan", "BYekan", "B Nazanin", "Nazanin", "Tahoma", sans-serif;
    /* فاصله‌ها */
    --spacer: 1rem;
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 1rem;
    /* سایه‌ها */
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    /* انیمیشن */
    --transition: all 0.2s ease-in-out;
}
@font-face {
    font-family: "B Nazanin";
    src: url("../fonts/B-NAZANIN.TTF") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nazanin";
    src: url("../fonts/B-NAZANIN.TTF") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* --------------------------------------------------------------------------
   2. ریست و تنظیمات پایه
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    position: relative;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--manager-area-background);
    background-repeat: no-repeat;
    background-position: top right;
    background-size: cover;
    opacity: 0.07;
    filter: saturate(1.1) contrast(1.05);
    -webkit-mask-image: linear-gradient(225deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.38) 45%, rgba(0, 0, 0, 0) 82%);
    mask-image: linear-gradient(225deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.38) 45%, rgba(0, 0, 0, 0) 82%);
    transition: opacity 180ms ease, background-image 180ms ease;
}

body:has(.hero.hero-fading)::before {
    opacity: 0.02;
}

.navbar,
.main-content,
.manager-footer,
#message-container,
.modal {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   3. تایپوگرافی
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* --------------------------------------------------------------------------
   4. دکمه‌ها (Buttons)
   -------------------------------------------------------------------------- */
.btn {
    font-family: var(--font-action);
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    background-color: transparent;
}

    .btn:focus {
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
    }

    .btn:disabled {
        opacity: 0.65;
        pointer-events: none;
    }

/* انواع دکمه */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
        color: var(--white);
    }

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

    .btn-secondary:hover {
        background-color: var(--secondary-dark);
        border-color: var(--secondary-dark);
    }

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: var(--white);
}

    .btn-success:hover {
        background-color: var(--success-dark);
        border-color: var(--success-dark);
    }

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

    .btn-danger:hover {
        background-color: var(--danger-dark);
        border-color: var(--danger-dark);
    }

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
    color: var(--dark);
}

    .btn-warning:hover {
        background-color: var(--warning-dark);
        border-color: var(--warning-dark);
    }

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
    color: var(--dark);
}

    .btn-info:hover {
        background-color: var(--info-dark);
        border-color: var(--info-dark);
        color: var(--white);
    }

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

    .btn-outline-primary:hover {
        background-color: var(--primary);
        color: var(--white);
    }

/* اندازه‌های دکمه */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius);
}

/* --------------------------------------------------------------------------
   5. فرم‌ها
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-dark);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

    .form-control:focus {
        border-color: var(--primary-light);
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
    }

    .form-control::placeholder {
        color: var(--gray-light);
        opacity: 1;
    }

textarea.form-control {
    resize: vertical;
}

/* --------------------------------------------------------------------------
   6. کارت‌ها (Cards)
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    /* margin-bottom: 1rem;*/
    margin-bottom: 0;
    overflow: hidden;
}

.card-header {
    padding: 0.75rem 1.25rem;
    background-color: var(--gray-lighter);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: var(--gray-lighter);
    border-top: 1px solid var(--border-color);
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 500;
}

.card-text {
    color: var(--text-secondary);
}

.card-img-top {
    width: 100%;
    height: 180px; /* ارتفاع ثابت برای همه تصاویر */
    object-fit: cover; /* تصویر را بدون کشیدگی برش می‌دهد تا فیت شود */
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

/*Cart viewer style*/
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* --------------------------------------------------------------------------
   7. مودال (Modal) - همان استایل قبلی با بهبود
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    z-index: 1050;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.modal-box {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.7);
    transition: transform 0.3s ease;
    overflow-y:scroll;
    position: relative;
}

.custom-modal-box {
    text-align: right;
}

.custom-modal-close {
    position: absolute;
    top: 0.55rem;
    left: 0.8rem;
    z-index: 4;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
    font-size: 1.45rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.custom-modal-close:hover {
    color: var(--danger);
    background: #ffffff;
}

.modal-form-box .custom-modal-body {
    padding: 0;
}

.modal-form-box.custom-modal-box {
    max-width: 460px;
    overflow: scroll;
    border: 1px solid rgba(67, 97, 238, 0.16);
    padding:10px;

}

.modal-form-box.custom-modal-box.market-user-modal-box {
    max-width: min(720px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
}

.market-user-modal-box .custom-modal-body {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.market-user-modal-content form {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-bottom: 1rem;
}

.market-user-modal-content .form-buttons {
    position: sticky;
    bottom: 0;
    margin: 1rem -1rem -1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), #ffffff 38%);
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    z-index: 2;
}

.domain-image-preview {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.domain-image-preview-title {
    font-weight: 700;
    color: #334155;
}

.domain-image-preview img {
    display: block;
    width: min(100%, 420px);
    max-height: 220px;
    object-fit: contain;
    padding: 0.65rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.domain-image-empty {
    width: min(100%, 420px);
    padding: 1rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed rgba(100, 116, 139, 0.42);
    border-radius: 8px;
}

.modal-form-box.custom-modal-box.formula-designer-modal-box {
    width: min(1180px, calc(100vw - 2rem));
    max-width: min(1180px, calc(100vw - 2rem));
}

.modal-form-box.auth-modal-box {
    width: min(880px, calc(100vw - 2rem));
    max-width: min(880px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.auth-modal-box .custom-modal-body {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-modal-box .auth-shell {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.auth-modal-box form {
    min-height: 0;
}

.modal-form-box .auth-shell {
    margin: 0;
}

.custom-free-modal-overlay {
    padding: 1rem;
}

.custom-free-modal-box {
    position: relative;
    width: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: var(--border-radius-lg);
    background: transparent;
    box-shadow: none;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.modal-overlay.active .custom-free-modal-box {
    transform: scale(1);
}

.custom-free-modal-body {
    min-width: min(24rem, calc(100vw - 2rem));
}

.custom-free-modal-body > * {
    max-width: 100%;
}

.custom-free-modal-close {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 5;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.custom-free-modal-close:hover {
    color: var(--danger);
    background: #ffffff;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition);
}

    .modal-close:hover {
        color: var(--dark);
    }

.modal-body {
    padding: 1.5rem;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(17rem, 0.95fr) minmax(22rem, 1fr);
    min-height: 34rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    direction: ltr;
}

.auth-visual {
    position: relative;
    min-height: 100%;
    direction: rtl;
    background:
        linear-gradient(150deg, rgba(2, 6, 23, 0.08), rgba(15, 23, 42, 0.02)),
        url('/img/auth/login-nexavari.png');
    background-size: cover;
    background-position: center center;
    overflow: hidden;
}

.auth-visual-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.72;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.1), transparent 15rem),
        linear-gradient(140deg, rgba(2, 6, 23, 0.58), rgba(15, 23, 42, 0.08) 54%, rgba(2, 6, 23, 0.26));
}

.auth-visual::after {
    content: "";
    position: absolute;
    inset: auto -20% -18% -20%;
    height: 11rem;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(-7deg);
}

.auth-visual-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 34rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: #ffffff;
}

.auth-brand-mark {
    width: 5.7rem;
    height: 5.7rem;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 1.25rem 2.1rem rgba(0, 21, 52, 0.34));
}

.auth-brand-mark-inline {
    width: 3.15rem;
    height: 3.15rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0.7rem 1.1rem rgba(37, 99, 235, 0.2));
}

.auth-brand-orbit {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 1.25rem 2.1rem rgba(0, 21, 52, 0.34));
}

.auth-brand-orbit .brand-orbit-letter {
    font-size: 3rem;
}

.auth-brand-orbit-inline {
    width: 3.35rem;
    height: 3.35rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0.7rem 1.1rem rgba(37, 99, 235, 0.2));
}

.auth-brand-orbit-inline .brand-orbit-letter {
    font-size: 1.85rem;
}

.auth-visual h3 {
    max-width: 20rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-size: 1.65rem;
    line-height: 1.45;
}

.auth-visual p {
    max-width: 21rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.auth-content {
    min-width: 0;
    direction: rtl;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.auth-hero {
    position: relative;
    padding: 1.55rem 1.6rem 0.8rem;
    color: #14213d;
    background: transparent;
    overflow: hidden;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -45% -12%;
    height: 6rem;
    background: rgba(67, 97, 238, 0.05);
    transform: rotate(-4deg);
}

.auth-hero > * {
    position: relative;
    z-index: 1;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.1rem 0.6rem;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(67, 97, 238, 0.18);
    border-radius: 999px;
    background: rgba(67, 97, 238, 0.08);
    color: #3151c8;
    font-family: var(--font-action);
    font-size: 0.82rem;
}

.auth-visual .auth-badge {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.auth-hero h3 {
    margin-bottom: 0.35rem;
    color: #14213d;
    font-size: 1.55rem;
}

.auth-hero p {
    max-width: 22rem;
    margin: 0;
    color: #64748b;
    font-size: 0.98rem;
}

.auth-form {
    padding: 1.35rem 1.5rem 0.8rem;
    background: transparent;
    border: 0;
}

.auth-form .form-group {
    margin-bottom: 0.75rem;
}

.auth-register-form {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
    padding-bottom: 1rem;
}

.auth-register-form fieldset {
    margin-bottom: 0.85rem !important;
    border-color: rgba(67, 97, 238, 0.16) !important;
    background: rgba(255, 255, 255, 0.72);
}

.auth-register-form legend {
    width: auto;
    padding: 0 0.55rem;
    color: #20324d;
    font-size: 0.92rem;
}

.auth-register-form iframe {
    border-radius: 0.5rem;
}

.auth-forget-form {
    padding-top: 1rem;
}

.auth-terms-modal-box.modal-form-box {
    max-width: min(980px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.auth-terms-modal-box .custom-modal-body {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 0;
}

.auth-terms-modal {
    background: #ffffff;
    direction: rtl;
}

.auth-terms-form {
    padding: 1.2rem 1.35rem 0.5rem;
    border: 0;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96), #ffffff 12rem),
        radial-gradient(circle at 100% 0, rgba(31, 122, 140, 0.08), transparent 18rem);
}

.auth-terms-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(199, 210, 229, 0.78);
}

.auth-terms-head img {
    width: 3.4rem;
    height: 3.4rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-terms-head h3 {
    margin: 0 0 0.2rem;
    color: #14213d;
    font-size: 1.25rem;
    font-weight: 800;
}

.auth-terms-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
}

.auth-terms-frame-wrap {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.6rem;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-terms-frame-wrap iframe {
    display: block;
    width: 100%;
    height: min(58vh, 34rem);
    border: 0;
    background: #ffffff;
}

.auth-terms-links {
    justify-content: center;
    padding-top: 0.7rem;
}

.auth-note {
    margin-bottom: 0.9rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(31, 122, 140, 0.18);
    border-radius: 0.55rem;
    background: rgba(31, 122, 140, 0.08);
    color: #31505c;
    font-size: 0.9rem;
    line-height: 1.8;
}

.auth-secondary-shell .auth-visual::before {
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.16), transparent 13rem),
        linear-gradient(140deg, rgba(2, 6, 23, 0.62), rgba(13, 148, 136, 0.14) 55%, rgba(15, 23, 42, 0.3));
}

.auth-input .form-label,
.auth-remember .form-label {
    color: #26364f;
    font-weight: 700;
}

.auth-input .form-control {
    min-height: 2.75rem;
    border-color: #d5deee;
    border-radius: 0.45rem;
    background: #ffffff;
}

.auth-input .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.18rem rgba(67, 97, 238, 0.16);
}

.auth-remember {
    margin-top: -0.15rem;
    margin-bottom: 0.25rem;
    color: #334155;
}

.auth-captcha {
    padding: 0.7rem;
    margin-top: 0.35rem;
    border: 1px solid #dbe4f2;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.82);
}

.captcha-control {
    display: grid;
    grid-template-columns: minmax(9.5rem, 12.5rem) minmax(0, 1fr);
    align-items: end;
    gap: 0.75rem;
    width: 100%;
}

.captcha-image-wrap {
    position: relative;
    display: block;
    min-height: 4.35rem;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.18);
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.captcha-image {
    display: block;
    width: 100%;
    height: 4.35rem;
    object-fit: cover;
}

.captcha-refresh-hint {
    position: absolute;
    right: 0.45rem;
    bottom: 0.35rem;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    color: #ffffff;
    font-family: var(--font-action);
    font-size: 0.72rem;
    line-height: 1.45;
    opacity: 0.78;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.captcha-image-wrap:hover .captcha-refresh-hint {
    opacity: 1;
    transform: translateY(-1px);
}

.captcha-input {
    margin: 0;
}

.captcha-input .mb-3 {
    margin-bottom: 0;
}

.captcha-input .form-label {
    color: #26364f;
    font-weight: 700;
}

.captcha-input .form-control {
    min-height: 2.7rem;
    letter-spacing: 0.08em;
    text-align: center;
    direction: ltr;
}

@media (max-width: 520px) {
    .captcha-control {
        grid-template-columns: 1fr;
    }
}

.auth-submit {
    width: 100%;
    min-height: 2.75rem;
    margin: 0.35rem 0 0;
    font-weight: 700;
    border-radius: 0.45rem;
    box-shadow: 0 8px 18px rgba(67, 97, 238, 0.22);
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(199, 210, 229, 0.72);
    color: #475569;
    font-size: 0.92rem;
}

.auth-links a {
    font-family: var(--font-action);
    font-weight: 700;
}

@media (max-width: 576px) {
    .auth-links {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 820px) {
    .modal-form-box.auth-modal-box {
        width: min(460px, calc(100vw - 2rem));
        max-width: min(460px, calc(100vw - 2rem));
    }

    .auth-shell {
        display: block;
        min-height: 0;
    }

    .auth-visual {
        display: none;
    }
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   8. جداول
   -------------------------------------------------------------------------- */
.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

    .table th,
    .table td {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 1px solid var(--border-color);
        text-align: right;
    }

    .table thead th {
        vertical-align: bottom;
        border-bottom: 2px solid var(--border-color);
        background-color: var(--gray-lighter);
        font-weight: 600;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

    .table-bordered th,
    .table-bordered td {
        border: 1px solid var(--border-color);
    }

/* --------------------------------------------------------------------------
   9. نوار ناوبری (Navbar)
   -------------------------------------------------------------------------- */
.navbar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    min-height: var(--navbar-height);
    padding: 0.62rem 1.25rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.88)),
        radial-gradient(circle at 8% 50%, rgba(67, 97, 238, 0.1), transparent 18rem);
    box-shadow: 0 0.65rem 1.8rem rgba(15, 23, 42, 0.08);
    margin-bottom: 0;
    backdrop-filter: blur(12px);
    transition: min-height 180ms ease, padding 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.navbar.navbar-compact {
    min-height: 42px;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    background:
        linear-gradient(135deg, rgba(9, 18, 36, 0.88), rgba(20, 33, 61, 0.8)),
        radial-gradient(circle at 12% 50%, rgba(34, 211, 238, 0.2), transparent 14rem);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    transition: font-size 180ms ease;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    max-width: min(34vw, 30rem);
    text-decoration: none;
    flex: 0 1 auto;
}

.brand-lockup:hover {
    text-decoration: none;
}

.brand-logo {
    width: 2.35rem;
    height: 2.35rem;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 3px 8px rgba(67, 97, 238, 0.18));
    transition: width 180ms ease, height 180ms ease;
}

.brand-orbit-logo {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    overflow: visible;
    transition: width 180ms ease, height 180ms ease;
}

.brand-orbit-canvas {
    position: absolute;
    inset: -0.25rem;
    width: calc(100% + 0.5rem);
    height: calc(100% + 0.5rem);
    pointer-events: none;
}

.brand-orbit-letter {
    position: relative;
    z-index: 1;
    font-family: Arial, sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    background: linear-gradient(135deg, #09b9ff 10%, #2363f4 52%, #6f2df5 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0.4rem 1rem rgba(37, 99, 235, 0.18);
}

.command-loader {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 140ms ease, visibility 140ms ease;
}

.command-loader.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.command-loader-box {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    min-width: 9rem;
    padding: 1.1rem 1.25rem 1rem;
    border: 1px solid rgba(186, 230, 253, 0.36);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.18);
}

.command-loader-logo {
    width: 4.6rem;
    height: 4.6rem;
    filter: drop-shadow(0 0.75rem 1.4rem rgba(37, 99, 235, 0.22));
    animation: command-loader-pulse 1.25s ease-in-out infinite;
}

.command-loader-logo .brand-orbit-letter {
    font-size: 2.6rem;
}

.command-loader-text {
    color: #14213d;
    font-family: var(--font-action);
    font-size: 0.96rem;
    white-space: nowrap;
}

@keyframes command-loader-pulse {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.82;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

.brand-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar.navbar-compact .navbar-brand {
    font-size: 0.9rem;
    color: #e0f2fe;
}

.navbar.navbar-compact .brand-text {
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
}

.navbar.navbar-compact .brand-logo {
    width: 1.65rem;
    height: 1.65rem;
}

.navbar.navbar-compact .brand-orbit-logo {
    width: 1.95rem;
    height: 1.95rem;
}

.navbar.navbar-compact .brand-orbit-letter {
    font-size: 1.15rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    list-style: none;
    margin-right: auto;
    margin-bottom: 0;
    padding: 0;
    gap: 1rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(67, 97, 238, 0.25) transparent;
}

.navbar-menu > li {
    flex: 0 0 auto;
}

.navbar-item {
    font-family: var(--font-action);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    border-radius: 999px;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.command-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.35rem;
    background: rgba(67, 97, 238, 0.08);
    color: var(--primary);
    font-size: 0.9rem;
    line-height: 1;
    flex: 0 0 auto;
}

#DIV_CategoryBox .btn,
#DIV_CategoryBox a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

#div_UserInformation .form-select {
    min-width: 11rem;
}

.navbar.navbar-compact .navbar-item {
    min-height: 1.85rem;
    padding: 0.16rem 0.48rem;
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(186, 230, 253, 0.14);
    max-width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar.navbar-compact .command-icon {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.3rem;
    font-size: 0.76rem;
    background: rgba(34, 211, 238, 0.14);
    color: #bae6fd;
}

.navbar.navbar-compact .navbar-menu {
    gap: 0.45rem;
    padding: 0.1rem 0.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.navbar.navbar-compact #div_UserInformation select,
.navbar.navbar-compact #div_UserInformation .form-select,
.navbar.navbar-compact #div_UserInformation .form-control {
    min-height: 1.8rem;
    padding-top: 0.12rem;
    padding-bottom: 0.12rem;
    font-size: 0.82rem;
    max-width: 10rem;
    border-color: rgba(186, 230, 253, 0.28);
    background-color: rgba(255, 255, 255, 0.92);
}

.navbar-item:hover,
.navbar-item.active {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
    text-decoration: none;
}

.navbar.navbar-compact .navbar-item:hover,
.navbar.navbar-compact .navbar-item.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.18);
}

/* --------------------------------------------------------------------------
   10. نوار کناری (Sidebar) - مناسب برای پنل ادمین و کاربر
   -------------------------------------------------------------------------- */
.sidebar {
    width: 260px;
    background-color: var(--white);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

    .sidebar-menu li {
        margin-bottom: 0.25rem;
    }

    .sidebar-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
        color: var(--text-secondary);
        border-right: 3px solid transparent;
        transition: var(--transition);
    }

        .sidebar-menu a:hover,
        .sidebar-menu a.active {
            background-color: rgba(67, 97, 238, 0.05);
            color: var(--primary);
            border-right-color: var(--primary);
        }

.main-content {
    margin-right: 260px;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   11. کلاس‌های کمکی (Utilities)
   -------------------------------------------------------------------------- */
/* رنگ‌های متنی */
.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--gray);
}

.text-white {
    color: var(--white);
}

/* رنگ‌های پس‌زمینه */
.bg-primary {
    background-color: var(--primary);
}

.bg-secondary {
    background-color: var(--secondary);
}

.bg-success {
    background-color: var(--success);
}

.bg-danger {
    background-color: var(--danger);
}

.bg-warning {
    background-color: var(--warning);
}

.bg-light {
    background-color: var(--light);
}

.bg-white {
    background-color: var(--white);
}

/* حاشیه و فاصله */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mr-1 {
    margin-left: 0.25rem;
}
/* برای RTL راست */
.mr-2 {
    margin-left: 0.5rem;
}

.mr-3 {
    margin-left: 1rem;
}

.ml-1 {
    margin-right: 0.25rem;
}

.ml-2 {
    margin-right: 0.5rem;
}

.ml-3 {
    margin-right: 1rem;
}

.p-0 {
    padding: 0;
}

.pt-1 {
    padding-top: 0.25rem;
}

.pt-2 {
    padding-top: 0.5rem;
}

.pt-3 {
    padding-top: 1rem;
}

.pt-4 {
    padding-top: 1.5rem;
}

.pt-5 {
    padding-top: 3rem;
}

.pb-1 {
    padding-bottom: 0.25rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.pb-3 {
    padding-bottom: 1rem;
}

.pb-4 {
    padding-bottom: 1.5rem;
}

.pb-5 {
    padding-bottom: 3rem;
}

/* متن‌چین */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* نمایش و پنهان‌سازی */
.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* عرض و ارتفاع */
.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* --------------------------------------------------------------------------
   12. واکنش‌گرایی (Responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .sidebar {
        right: -260px;
    }

        .sidebar.active {
            right: 0;
        }

    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .navbar {
        gap: 0.45rem;
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .navbar-menu {
        flex-direction: row;
        width: auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .navbar-item {
        padding-right: 0.45rem;
        padding-left: 0.45rem;
    }

    .modal-box {
        width: 95%;
    }

    .brand-lockup {
        max-width: 3rem;
    }

    .brand-text {
        display: none;
    }

    .brand-logo {
        width: 2rem;
        height: 2rem;
    }

    .brand-orbit-logo {
        width: 2.15rem;
        height: 2.15rem;
    }

    .brand-orbit-letter {
        font-size: 1.25rem;
    }

    #div_UserInformation select,
    #div_UserInformation .form-select,
    #div_UserInformation .form-control {
        min-width: 7.5rem;
        max-width: 8.5rem;
    }
}
/*----------------------------------------------------------
    تنظیمات دستی اظافه شده
    --------------------------------------------------------
*/
/* تنظیمات اختصاصی برای این صفحه (اختیاری) */
.hero {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: linear-gradient(135deg, rgba(4, 18, 37, 0.94) 0%, rgba(37, 99, 235, 0.78) 54%, rgba(6, 21, 38, 0.9) 100%);
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 3.25rem 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    opacity: 1;
    filter: none;
    transition: opacity 180ms ease, filter 180ms ease;
}

.hero.hero-fading {
    opacity: 0.08;
    filter: blur(2px);
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        background:
            radial-gradient(circle at 78% 48%, rgba(34, 211, 238, 0.08), transparent 21rem),
            linear-gradient(90deg, rgba(4, 12, 27, 0.82), rgba(4, 12, 27, 0.48) 52%, rgba(4, 12, 27, 0.32));
    }

    .hero::after {
        content: none;
    }

.hero-network-canvas {
    position: absolute;
    inset: -15px;
    z-index: 1;
    width: calc(100% + 30px);
    height: calc(100% + 30px);
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.94;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%),
                        linear-gradient(to bottom, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%),
                linear-gradient(to bottom, transparent 0, #000 15px, #000 calc(100% - 15px), transparent 100%);
    mask-composite: intersect;
}

@media (prefers-reduced-motion: reduce) {
    .hero-network-canvas {
        opacity: 0.62;
    }
}

    .hero > :not(.hero-network-canvas) {
        position: relative;
        z-index: 2;
    }

    .hero h1 {
        font-family: var(--font-heading);
        font-size: 2.5rem;
        margin-bottom: 1rem;
        color: #ffffff;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    }

    .hero p {
        font-family: var(--font-body);
        color: rgba(255, 255, 255, 0.92);
        max-width: 48rem;
        margin-right: auto;
        margin-left: auto;
    }

.product-img {
    width: 100%;
    height: 160px;
    background-color: var(--gray-lighter);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.9rem;
}


.mk-simple-alert-box {
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 5px solid;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mk-simple-alert-box-info {
    background-color: #bfdcef;
    color: #457389;
    border-color: #31708f;
}

.mk-simple-alert-box-warning {
    background-color: #f5eecb;
    color: #8a6d3b;
    border-color: #b88d42;
}

.mk-simple-alert-box-success {
    background-color: #d1f2c4;
    color: #3c763d;
    border-color: #53a354;
}

.mk-simple-alert-box-error {
    background-color: #f0cccc;
    color: #a94442;
    border-color: #db5552;
}
/*------------------------------------------
    ارسال پیام ها
---------------------------------------------*/

/* استایل کانتینر پیام‌ها */
#message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* کلیک روی فضای خالی به المان‌های زیر منتقل شود */
}

.toast-message {
    pointer-events: auto; /* خود پیام قابل کلیک باشد */
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

    .toast-message.fade-out {
        animation: slideOut 0.3s ease forwards;
    }

    .toast-message .message-text {
        flex: 1;
        font-size: 0.95rem;
    }

    .toast-message .close-btn {
        background: none;
        border: none;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        color: inherit;
        opacity: 0.7;
        transition: opacity 0.2s;
        padding: 0 5px;
    }

        .toast-message .close-btn:hover {
            opacity: 1;
        }

/* رنگ‌بندی بر اساس کلاس‌های alert موجود */
.toast-success {
    background-color: var(--success);
    color: white;
}

.toast-error {
    background-color: var(--danger);
    color: white;
}

.toast-warning {
    background-color: var(--warning);
    color: var(--dark);
}

.toast-info {
    background-color: var(--info);
    color: white;
}

/* انیمیشن‌ها */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}




/* استایل های اظافه شدن به سامانه جهت سیسام تیکت ها*/
.badge-priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background-color: var(--gray-lighter);
    color: var(--gray-dark);
}

    .badge-priority.critical {
        background-color: var(--danger);
        color: white;
    }

    .badge-priority.high {
        background-color: var(--warning);
        color: var(--dark);
    }

    .badge-priority.medium {
        background-color: var(--info);
        color: white;
    }

    .badge-priority.low {
        background-color: var(--success);
        color: white;
    }

.badge-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background-color: var(--gray-lighter);
    color: var(--gray-dark);
}

    .badge-status.open {
        background-color: var(--primary-light);
        color: white;
    }

    .badge-status.in_progress {
        background-color: var(--secondary);
        color: white;
    }

    .badge-status.waiting {
        background-color: var(--warning);
        color: var(--dark);
    }

    .badge-status.closed {
        background-color: var(--success-dark);
        color: white;
    }

    .badge-status.rejected {
        background-color: var(--danger);
        color: white;
    }

/* تنظیم محدودیت متن توضیحات (دو خط) */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}



/********************************************************/
/*                       تیکت ها                        */
/********************************************************/

/* متمایز کردن پست‌های کارشناس و کاربر */
.ticket-timeline {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.agent-post {
    margin-right: 15%; /* هل دادن به سمت چپ */
    border-right: 4px solid #17a2b8;
}

.user-post {
    margin-left: 15%; /* هل دادن به سمت راست */
    border-left: 4px solid #6c757d;
}

.ticket-description {
    line-height: 1.8;
    white-space: pre-wrap; /* حفظ اینترهای کاربر */
}

.attachments-section a {
    text-decoration: none;
    margin-left: 5px;
}

    .attachments-section a i {
        margin-left: 3px;
    }


    /*  Drop Down List CSS  */
.dropdown-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-search-input {
    font-size: 0.9rem;
}
/* End Drop Down List CSS  */

/* --------------------------------------------------------------------------
   GridView
   -------------------------------------------------------------------------- */
#div_PlaceHolder {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

#div_PlaceHolder > * {
    max-width: 100%;
    min-width: 0;
}

#div_PlaceHolder.contains-grid {
    display: block !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

#div_PlaceHolder.contains-grid > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#div_PlaceHolder [id^="Panel_"],
#div_PlaceHolder [id^="Form_"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#div_PlaceHolder > *:has(.grid-card) {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.grid-card {
    flex: 1 1 100%;
    width: 100%;
    inline-size: 100%;
    max-width: 100%;
    max-inline-size: 100%;
    min-width: 0;
    min-inline-size: 0;
    margin: 1rem 0;
    background: var(--card-bg);
    color: #1f2937;
    border: 1px solid rgba(67, 97, 238, 0.14);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #e7eefc 0%, #f8fbff 100%);
    border-bottom: 1px solid rgba(67, 97, 238, 0.16);
}

.grid-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
    min-width: 8rem;
}

.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.grid-toolbar .input,
.grid-toolbar .select,
.grid-card .filter-row input,
.grid-card .filter-row select {
    font-family: var(--font-body);
    min-height: 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    color: #111827;
    padding: 0.35rem 0.6rem;
}

.table-wrap {
    display: block;
    width: 100%;
    inline-size: 100%;
    max-width: 100%;
    max-inline-size: 100%;
    min-width: 0;
    min-inline-size: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    font-family: var(--font-body);
    width: max-content;
    min-width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
    color: #1f2937;
}

.table-wrap th,
.table-wrap td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--gray-lighter);
    vertical-align: middle;
    color: #1f2937;
}

.table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #dfe8fb;
    color: #14213d;
    font-weight: 700;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.table-wrap thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.table-wrap thead th,
.table-wrap thead th * {
    cursor: pointer;
}

.table-wrap thead th.sortable:hover {
    background: #e4ecff;
    color: var(--primary-dark);
}

.table-wrap thead th .sort {
    display: inline-block;
    margin-right: 0.35rem;
    color: var(--primary);
    font-weight: 700;
}

.table-wrap thead .filter-row th,
.table-wrap thead .filter-row td {
    background: #f6f9ff;
    color: #1f2937;
}

.table-wrap tbody tr:nth-child(odd) {
    background: #ffffff;
}

.table-wrap tbody tr:nth-child(even) {
    background: #f8fafc;
}

.table-wrap tbody tr:hover {
    background: #eef6ff;
}

.table-wrap tbody td,
.table-wrap tbody td *,
.grid-card label,
.grid-card .muted {
    color: #1f2937;
}

.grid-card .btn,
.form-buttons .btn,
.modal-footer .btn {
    margin: 0.2rem;
}

.grid-card .btn-xs {
    padding: 0.28rem 0.55rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.grid-card .btn-xs:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):not([class*="btn-outline-"]) {
    background: linear-gradient(135deg, #f8fbff 0%, #e8f0ff 100%);
    border-color: rgba(67, 97, 238, 0.28);
    color: var(--primary-dark);
    box-shadow: 0 0.18rem 0.45rem rgba(67, 97, 238, 0.12);
}

.grid-card .btn-xs:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):not([class*="btn-outline-"]):hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

#GV_ProductStructureValidation .table-wrap table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    white-space: normal;
}

#GV_ProductStructureValidation .table-wrap th,
#GV_ProductStructureValidation .table-wrap td {
    padding: 0.45rem 0.5rem;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

#GV_ProductStructureValidation .table-wrap th:nth-child(1),
#GV_ProductStructureValidation .table-wrap td:nth-child(1) {
    width: 78px;
}

#GV_ProductStructureValidation .table-wrap th:nth-child(2),
#GV_ProductStructureValidation .table-wrap td:nth-child(2) {
    width: 110px;
}

#GV_ProductStructureValidation .table-wrap th:nth-child(4),
#GV_ProductStructureValidation .table-wrap td:nth-child(4) {
    width: 220px;
}

#GV_ProductStructureValidation .table-wrap th:nth-child(5),
#GV_ProductStructureValidation .table-wrap td:nth-child(5) {
    width: 130px;
}

#GV_ProductStructureValidation .badge,
#GV_ProductStructureValidation .btn {
    white-space: normal;
}

.grid-card .actions {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.grid-action-menu {
    position: relative;
    display: inline-flex;
    justify-content: center;
}

.grid-action-menu-toggle {
    min-width: 4.75rem;
}

.grid-action-menu-items {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 1060;
    display: none;
    min-width: 9rem;
    padding: 0.35rem;
    border: 1px solid rgba(57, 89, 153, 0.18);
    border-radius: 0.45rem;
    background: #ffffff;
    box-shadow: 0 0.8rem 1.8rem rgba(15, 23, 42, 0.16);
}

.grid-action-menu.open .grid-action-menu-items,
.grid-action-menu-items.open {
    display: grid;
    gap: 0.25rem;
}

.grid-action-menu-items.floating {
    position: fixed;
    top: auto;
    right: auto;
    z-index: 5000;
}

.grid-action-menu-items .btn {
    width: 100%;
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

.grid-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 1.5rem;
}

.grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, #f1f5fb 0%, #ffffff 100%);
    border-top: 1px solid var(--border-color);
}

.grid-footer .muted {
    color: #334155;
    font-size: 0.95rem;
}

.grid-footer .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.page-btn {
    min-width: 2.15rem;
    min-height: 2.15rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover {
    background: #eef3ff;
    border-color: var(--primary-light);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.column-setting-group-filter {
    max-width: 22rem;
    margin-bottom: 1rem;
}

.column-setting-group-filter .input-group {
    box-shadow: 0 0.4rem 1.2rem rgba(15, 23, 42, 0.06);
}

.column-setting-item {
    min-width: 0;
}

.column-setting-tabs {
    width: 100%;
}

.site-setting-tab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: start;
}

.column-setting-tab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: start;
}

.column-setting-report-tabs {
    margin-top: 0.25rem;
}

.column-setting-report-tabs > .tab-control-nav {
    padding: 0.35rem;
    border: 1px solid rgba(67, 97, 238, 0.12);
    border-radius: var(--border-radius-sm);
    background: rgba(248, 251, 255, 0.78);
}

.column-setting-report-tabs > .tab-control-nav > .tab-control-button {
    padding: 0.32rem 0.7rem;
    font-size: 0.9rem;
}

.column-setting-report-tab-grid {
    padding-top: 0.75rem;
}

.column-setting-report-subtab-title {
    grid-column: 1 / -1;
}

.color-picker-setting {
    min-width: 0;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.color-picker-input.form-control-color {
    width: 3.4rem;
    min-width: 3.4rem;
    height: 2.35rem;
    padding: 0.2rem;
    cursor: pointer;
}

.color-picker-value {
    min-width: 5.5rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.78);
    color: var(--gray-dark);
    direction: ltr;
    text-align: center;
    font-size: 0.86rem;
}

.column-setting-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .site-setting-tab-grid,
    .column-setting-tab-grid {
        grid-template-columns: 1fr;
    }

    .color-picker-row {
        flex-wrap: wrap;
    }
}

.tree-view {
    direction: rtl;
    overflow-x: auto;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.86);
}

.tree-root,
.tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-children {
    margin-right: 1.5rem;
    padding-right: 1rem;
    border-right: 1px dashed rgba(57, 89, 153, 0.24);
}

.tree-node {
    margin: 0.35rem 0;
}

.tree-node-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 34rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(57, 89, 153, 0.14);
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 255, 0.9));
}

.tree-node-branch {
    color: var(--primary-light);
    font-weight: 700;
}

.tree-node-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: rgba(15, 97, 207, 0.1);
    color: var(--primary);
}

.tree-node-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.tree-node-text strong,
.tree-node-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-node-text small {
    color: #64748b;
}

.tree-node-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tree-empty {
    padding: 1rem;
    color: #64748b;
    text-align: center;
}

.query-builder-view {
    direction: rtl;
    margin-top: 1rem;
}

.query-designer-surface {
    position: relative;
    overflow-x: auto;
    min-height: 18rem;
    padding: 1rem;
    border: 1px solid rgba(57, 89, 153, 0.18);
    border-radius: var(--border-radius-sm);
    background:
        linear-gradient(rgba(57, 89, 153, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 89, 153, 0.06) 1px, transparent 1px),
        rgba(248, 251, 255, 0.92);
    background-size: 28px 28px;
}

.query-builder-table-grid,
.query-builder-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
}

.query-designer-tables {
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 22rem));
}

.query-builder-table,
.query-builder-preview-grid section {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(57, 89, 153, 0.16);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.9);
}

.query-designer-table {
    box-shadow: 0 0.7rem 1.6rem rgba(15, 23, 42, 0.08);
}

.query-builder-table header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.query-builder-table header small {
    color: #64748b;
    direction: ltr;
}

.query-builder-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.query-builder-columns span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.35rem 0.55rem;
    border-radius: var(--border-radius-sm);
    background: rgba(15, 97, 207, 0.08);
    color: #1e293b;
}

.query-builder-columns em {
    color: #64748b;
    font-size: 0.78rem;
    font-style: normal;
}

.query-builder-preview-grid {
    margin-top: 1rem;
}

.query-designer-joins {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.query-designer-join {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) minmax(7rem, 12rem) minmax(8rem, 1fr);
    align-items: center;
    gap: 0.5rem;
    direction: ltr;
}

.query-designer-join .join-end {
    overflow: hidden;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(57, 89, 153, 0.18);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.query-designer-join .join-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    color: var(--primary);
}

.query-designer-join .join-line::before,
.query-designer-join .join-line::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(15, 97, 207, 0.18), rgba(15, 97, 207, 0.75));
}

.query-designer-join .join-line b {
    flex: 0 0 auto;
    margin: 0 0.45rem;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    background: rgba(15, 97, 207, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
}

.query-builder-preview-grid pre {
    direction: ltr;
    max-height: 24rem;
    overflow: auto;
    margin: 0;
    padding: 0.85rem;
    border-radius: var(--border-radius-sm);
    background: #0f172a;
    color: #dbeafe;
    text-align: left;
}

.query-builder-empty {
    padding: 1rem;
    border: 1px dashed rgba(57, 89, 153, 0.2);
    border-radius: var(--border-radius-sm);
    color: #64748b;
    text-align: center;
}

@media (max-width: 768px) {
    .grid-header,
    .grid-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .grid-toolbar {
        justify-content: stretch;
    }

    .grid-toolbar .input,
    .grid-toolbar .select {
        flex: 1 1 9rem;
    }

    .tree-node-row {
        align-items: flex-start;
        flex-wrap: wrap;
        min-width: 24rem;
    }

    .tree-node-actions {
        width: 100%;
    }
}



.grid-row-context-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 8px !important;
    min-width: 230px !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06) !important;
    backdrop-filter: blur(10px);
    direction: rtl;
    text-align: right;
    animation: GridContextMenuShow 0.14s ease-out;
}


/* گروه منو */
.grid-row-context-menu-group {
    padding: 3px !important;
}


/* عنوان */
.grid-row-context-menu-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    padding: 7px 9px 8px !important;
    margin: 0 0 5px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    letter-spacing: -0.1px;
}


/* محل دکمه‌ها */
.grid-row-context-menu-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}


    /* تمام دکمه‌های منو */
    .grid-row-context-menu-actions .btn {
        width: 100%;
        display: flex;
        align-items: center;
        min-height: 36px;
        padding: 7px 11px !important;
        border: none !important;
        border-radius: 8px !important;
        background: transparent !important;
        color: #334155 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-align: right !important;
        cursor: pointer;
        transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
    }


        /* Hover عمومی */
        .grid-row-context-menu-actions .btn:hover {
            background: #f1f5f9 !important;
            color: #0f172a !important;
        }


        /* کلیک */
        .grid-row-context-menu-actions .btn:active {
            transform: scale(0.985);
        }


    /* ویرایش */
    .grid-row-context-menu-actions .btn-edit {
        color: #2563eb !important;
    }

        .grid-row-context-menu-actions .btn-edit:hover {
            background: #eff6ff !important;
            color: #1d4ed8 !important;
        }


    /* فعال / غیرفعال */
    .grid-row-context-menu-actions .btn-del {
        color: #d97706 !important;
    }

        .grid-row-context-menu-actions .btn-del:hover {
            background: #fffbeb !important;
            color: #b45309 !important;
        }


    /* گزینه‌های معمولی */
    .grid-row-context-menu-actions .btn-secondary {
        color: #475569 !important;
    }

        .grid-row-context-menu-actions .btn-secondary:hover {
            background: #f8fafc !important;
            color: #0f172a !important;
        }


    /* Export */
    .grid-row-context-menu-actions .btn-info {
        color: #0891b2 !important;
    }

        .grid-row-context-menu-actions .btn-info:hover {
            background: #ecfeff !important;
            color: #0e7490 !important;
        }


    /* حذف */
    .grid-row-context-menu-actions .btn-danger {
        color: #dc2626 !important;
    }

        .grid-row-context-menu-actions .btn-danger:hover {
            background: #fef2f2 !important;
            color: #b91c1c !important;
        }


    /* جدا کردن دکمه حذف از بقیه */
    .grid-row-context-menu-actions .btn-danger {
        margin-top: 5px;
        padding-top: 9px !important;
        border-top: 1px solid #f1f5f9 !important;
    }


/* Scrollbar */
.grid-row-context-menu::-webkit-scrollbar {
    width: 6px;
}

.grid-row-context-menu::-webkit-scrollbar-track {
    background: transparent;
}

.grid-row-context-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

    .grid-row-context-menu::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }


/* انیمیشن باز شدن */
@keyframes GridContextMenuShow {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
