/* استایل‌های سفارشی برای داشبورد ادمین */

/* تعریف فونت‌های Dana */
@font-face {
    font-family: 'Dana';
    src: url('../../fonts/Dana/woff2/DanaFaNum-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../../fonts/Dana/woff2/DanaFaNum-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Dana';
    src: url('../../fonts/Dana/woff2/DanaFaNum-DemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* استایل‌های عمومی */
body {
    font-family: 'Dana', 'Vazirmatn', 'Tahoma', sans-serif;
}

.is-rtl {
    direction: rtl;
    text-align: right;
}

/* استایل‌های سایدبار */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

.sidebar-overlay.show {
    display: block;
}

/* استایل‌های اعلان‌ها */
.bdr-notify-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: calc(0.35rem - 1px);
    border-top-right-radius: calc(0.35rem - 1px);
}

.bdr-notify-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.bdr-notify-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 1rem;
    border-radius: 100%;
    font-size: 1rem;
    color: #fff;
}

.bdr-notify-item-content p {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.bdr-notify-item-content small {
    color: #a7aeb8;
}

.bdr-notify-footer {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #0061f2;
}

/* استایل‌های کاربر */
.dropdown-user-img {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 100%;
    margin-left: 1rem;
}

.dropdown-user-details {
    font-weight: 500;
}

.dropdown-user-details-name {
    color: #363d47;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.dropdown-user-details-email {
    font-size: 0.75rem;
    line-height: 1;
    color: #a7aeb8;
}

.dropdown-item-icon {
    display: inline-flex;
    padding-left: 0.5rem;
}

/* استایل‌های موبایل */
@media (max-width: 768px) {
    .navbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.25rem 0.5rem !important;
    }
    
    #sidebarToggle {
        display: block !important;
        order: 1;
        margin-right: 0 !important;
        font-size: 2rem !important;
        z-index: 1051;
    }
    
    .navbar-brand {
        order: 2;
        font-size: 1rem !important;
        margin: 0 4px !important;
        padding: 0 !important;
        white-space: nowrap;
    }
    
    .logo {
        order: 3;
        max-height: 30px !important;
        margin: 0 4px !important;
    }
    
    .navbar-nav {
        order: 4;
        gap: 0.2rem !important;
    }
    
    /* مخفی کردن برخی آیتم‌ها در موبایل؛ دسترسی سریع، منوی کاربر و دکمه تم بمانند */
    .navbar-nav .nav-item:not(.dropdown-user):not(#quickAccessDropdown):not(#themeToggleItem) {
        display: none !important;
    }

    #quickAccessDropdown {
        flex-shrink: 0;
    }

    #quickAccessDropdown .btn {
        padding: 0.35rem 0.45rem;
    }

    /* دراپ‌داون navbar روی موبایل: بدون بریده شدن توسط overflow والد */
    .topnav.navbar {
        overflow: visible !important;
    }

    .topnav .dropdown-menu.quick-access-dropdown {
        z-index: 1060 !important;
    }

    /* animated--fade-in-up روی dropdown top:0.125rem می‌گذارد و زیر قانون موبایل را می‌شکند — منو بیرون از دید می‌رود */
    .topnav .dropdown-menu.animated--fade-in-up {
        top: 60px !important;
    }
    
    /* Mobile Menu Button */
    #sidebarToggle {
        display: block !important;
        margin: 0;
        padding: 0.5rem;
        border: none;
        background: transparent;
        color: #333;
        font-size: 1.5rem;
    }
    
    /* Mobile Navigation Items */
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-item {
        margin: 0;
    }
    
    /* Mobile Dropdown Adjustments */
    .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    /* Mobile User Profile */
    .dropdown-user .btn {
        padding: 0.25rem;
        width: 40px;
        height: 40px;
    }
    
    .dropdown-user img {
        width: 35px;
        height: 35px;
        object-fit: cover;
        border-radius: 50%;
    }
    
    /* Mobile Sidebar */
    .snav {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .snav.show {
        transform: translateX(0);
    }
    
    /* Mobile Content Area */
    #layoutSidenav_content {
        margin-right: 0;
        width: 100%;
    }
}

/* استایل‌های داشبورد */
.page-header {
    position: relative;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    background-color: #008374;
    background-image: none;
    z-index: 1;
}

/* اطمینان از اینکه محتوای فرم روی هدر نیاد */
.container-xl.mt-n10 {
    position: relative;
    z-index: 2;
}

.page-header-dark {
    color: #fff;
}

.page-header-dark .page-header-title {
    color: #fff;
}

.page-header-dark .page-header-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* استایل‌های کارت‌ها */
.card-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header {
    padding: 1rem 1.35rem;
    margin-bottom: 0;
    background-color: rgba(33, 40, 50, 0.03);
    border-bottom: 1px solid rgba(33, 40, 50, 0.125);
}

.dataTable-wrapper .dataTable-top {
    padding: 0 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dataTable-dropdown {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dataTable-selector {
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    margin-right: 0.5rem;
}

.dataTable-search {
    position: relative;
}

/* استایل‌های جداول */
.dataTable-table {
    width: 100%;
    border-collapse: collapse;
}

.dataTable-table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e3e6f0;
    padding: 0.75rem;
}

.dataTable-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid #e3e6f0;
}

.dataTable-bottom {
    padding: 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dataTable-pagination {
    display: flex;
    justify-content: flex-end;
}

.dataTable-pagination .pagination {
    display: flex;
    padding-right: 0;
    list-style: none;
    border-radius: 0.35rem;
}

/* استایل‌های فرم‌ها */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* استایل‌های دکمه‌ها */
.btn-icon {
    padding: 0;
    justify-content: center;
    overflow: hidden;
    border-radius: 100%;
    flex-shrink: 0;
    height: calc(1.5em + 1rem + 2px);
    width: calc(1.5em + 1rem + 2px);
    display: inline-flex;
    align-items: center;
}

.btn-transparent-dark {
    color: rgba(33, 40, 50, 0.5);
    background-color: transparent;
    border-color: transparent;
}

.btn-transparent-dark:hover {
    color: rgba(33, 40, 50, 0.7);
    background-color: rgba(33, 40, 50, 0.1);
    border-color: transparent;
}

/* استایل‌های پیام‌های فلش */
.flash-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.35rem;
}

/* استایل‌های حالت خالی */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    text-align: center;
}

.empty-state svg {
    color: #d1d3e2;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #858796;
    margin-bottom: 0;
}

/* استایل‌های مودال */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e3e6f0;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #e3e6f0;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

/* استایل‌های پیشرفت */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #eaecf4;
    border-radius: 0.35rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #4e73df;
    transition: width 0.6s ease;
}

/* استایل‌های رنگ‌ها */
.bg-primary-soft {
    background-color: #dae7fb !important;
}

.bg-secondary-soft {
    background-color: #d6d8db !important;
}

.bg-success-soft {
    background-color: #daefed !important;
}

.bg-info-soft {
    background-color: #daf2f8 !important;
}

.bg-warning-soft {
    background-color: #f8ecd9 !important;
}

.bg-danger-soft {
    background-color: #f8dad9 !important;
}

.text-primary {
    color: #4e73df !important;
}

.text-secondary {
    color: #858796 !important;
}

.text-success {
    color: #1cc88a !important;
}

.text-info {
    color: #36b9cc !important;
}

.text-warning {
    color: #f6c23e !important;
}

.text-danger {
    color: #e74a3b !important;
}

/* استایل‌های فوتر */
.footer-admin {
    height: 5rem;
    display: flex;
    align-items: center;
}

/* استایل‌های سفارشی برای داشبورد ادمین */
.dropdown-menu-w15 {
    min-width: 15rem !important;
}

/* —— وضعیت تیکت‌های پشتیبانی (پشتیبانی / support) —— */
.support-ticket-status-badge {
    white-space: nowrap;
    max-width: 100%;
}
.support-ticket-status-badge .bx {
    font-size: 1.05em;
    line-height: 1;
    flex-shrink: 0;
}
.support-ticket-status-badge--lg .bx {
    font-size: 1.25em;
}
.support-ticket-status-badge span:last-child {
    line-height: 1.25;
}

.support-status-open {
    background: linear-gradient(135deg, #e8f2ff 0%, #dceafe 100%);
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.2);
}
.support-status-awaiting {
    background: linear-gradient(135deg, #fff7e8 0%, #fdecc8 100%);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.25);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
}
.support-status-seen {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #0e7490;
    border: 1px solid rgba(14, 116, 144, 0.22);
}
.support-status-progress {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    border: 1px solid rgba(67, 56, 202, 0.22);
}
.support-status-answered {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    border: 1px solid rgba(4, 120, 87, 0.22);
}
.support-status-done {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid rgba(6, 95, 70, 0.28);
}
.support-status-wontfix {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.35);
}
.support-status-closed {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid rgba(55, 65, 81, 0.25);
}
.support-status-unknown {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.support-ticket-msg-bubble:not(.support-ticket-msg-internal) {
    border-right: 3px solid rgba(78, 115, 223, 0.35);
}
.support-ticket-msg-internal {
    border-right: 3px solid rgba(217, 119, 6, 0.45);
}

.support-sidebar-status-hint .form-select option {
    font-weight: 500;
}

/* ========== دسترسی سریع هدر ========== */
.quick-access-item a.bg-transp {
    background-color: transparent !important;
}
.quick-access-item-main {
    display: flex;
    align-items: stretch;
    width: 100%;
}
.quick-access-confirm-row {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    box-sizing: border-box;
}
.quick-access-item.is-confirm .quick-access-item-main {
    display: none !important;
}
.quick-access-item.is-confirm .quick-access-confirm-row {
    display: flex !important;
}

.modal-content.qa-modal-shell {
    border-radius: 1rem !important;
}
#quickAccessAddModal .qa-modal-pills .nav-link {
    border-radius: 0.6rem !important;
    font-size: 0.8125rem !important;
    color: var(--bs-secondary-color, #64748b);
    padding-top: 0.6rem !important;
    padding-bottom: 0.55rem !important;
}
#quickAccessAddModal .qa-modal-pills .nav-link.active {
    color: #fff !important;
}
#quickAccessAddModal .qa-modal-pills .nav-link:not(.active):hover {
    background: rgba(13, 110, 253, 0.08);
    color: var(--bs-primary);
}

.qa-modal-bg-picker .form-control-color {
    width: 2.85rem !important;
    min-height: 2.375rem !important;
    padding: 0.2rem !important;
    cursor: pointer;
}

.qa-opt-ico {
    width: 2.1rem !important;
    height: 2.1rem !important;
    font-size: 1.08rem !important;
}
.qa-cat-badge {
    width: 2.35rem !important;
    height: 2.35rem !important;
    font-size: 1.1rem !important;
}
.qa-cat-card .card-header {
    background-color: rgba(248, 250, 252, 0.95) !important;
}

.qa-add-opt-btn:active {
    transform: scale(0.99);
}

#quickAccessList .quick-access-item {
    align-self: flex-start;
    max-width: 100%;
}

#quickAccessBundleFeedback {
    white-space: pre-wrap;
}

/* محدودیت عرض محتوای اصلی — admin + portal */
:root {
    --app-content-max-width: 1280px;
}

#layoutSidenav_content > main .app-content-shell,
#layoutSidenav_content > main > .app-content-shell {
    width: 100%;
    max-width: var(--app-content-max-width);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

@media (max-width: 575.98px) {
    #layoutSidenav_content > main .app-content-shell,
    #layoutSidenav_content > main > .app-content-shell {
        padding-inline: 1rem;
    }
}

#layoutSidenav_content .footer-admin .container-xl {
    max-width: var(--app-content-max-width);
    margin-inline: auto;
}

/* صفحات بدون shell (مثلاً callback پرداخت پورتال) */
main .app-content-shell--standalone {
    width: 100%;
    max-width: var(--app-content-max-width);
    margin-inline: auto;
    padding-inline: 1.5rem;
}
