﻿html, body {
    font-family: 'Tahoma','Helvetica Neue', Helvetica, Arial, sans-serif;
    direction: rtl;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* درختواره‌ها - عمومی */
.tree-view ul {
    list-style-type: none;
    padding-left: 20px;
}

.tree-view li {
    margin: 5px 0;
}

.tree-view button {
    margin-left: 10px;
}

/* ===== استایل‌های سفارشی برای صفحات دریافت و پرداخت ===== */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

.breadcrumb-item a {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ===== استایل‌های کارت ===== */
.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%) !important;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

/* ===== استایل‌های جدول ===== */
.table-sm th, .table-sm td {
    padding: 0.5rem;
}

.table-borderless tbody tr:not(:last-child) td {
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-success-light {
    background-color: rgba(25, 135, 84, 0.05) !important;
}

    .table-success-light:hover {
        background-color: rgba(25, 135, 84, 0.1) !important;
    }

.table-danger-light {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

    .table-danger-light:hover {
        background-color: rgba(220, 53, 69, 0.1) !important;
    }

/* ===== استایل‌های دکمه‌ها ===== */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border: none;
}

    .btn-success:hover, .btn-danger:hover {
        opacity: 0.9;
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }

.btn {
    font-weight: 500;
}

/* ===== استایل‌های فرم ===== */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    font-weight: 500;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* ===== استایل‌های کارت‌ها ===== */
.card.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.card.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.card.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%);
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.card-header {
    font-weight: 600;
}

/* ===== استایل‌های صفحه‌بندی (Pagination) ===== */
.pagination .page-link {
    border-radius: 5px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ===== استایل‌های Modal ===== */
.modal.show {
    animation: fadeIn 0.2s ease-in;
}

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== استایل‌های رنگ‌ها ===== */
.text-success {
    color: #198754 !important;
    font-weight: 600;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

/* ===== استایل‌های Badge ===== */
.badge {
    font-size: 0.85em;
    padding: 0.35em 0.65em;
}

/* ===== استایل‌های Hover برای جدول ===== */
.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

    .table-hover tbody tr:hover {
        background-color: rgba(13, 110, 253, 0.075);
    }

/* ===== استایل‌های راهنما ===== */
.text-muted small {
    font-size: 0.875em;
}

/* ===== استایل‌های ریسپانسیو ===== */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
}























/* ===== آیتم‌های دارای زیرمنو ===== */
.nav-item.has-submenu {
    position: relative;
}

.menu-parent {
    position: relative;
    user-select: none;
    cursor: pointer;
    color: #adca0a;
}

.menu-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.6);
    margin-right: 0.5rem;
}

    .menu-arrow.rotate {
        transform: rotate(-90deg);
    }

/* حالت expanded - مهم */
.nav-item.expanded {
    background: rgba(0,0,0,0.2);
}

    .nav-item.expanded > .menu-parent {
        background: rgba(0,0,0,0.1);
    }

        .nav-item.expanded > .menu-parent .nav-icon,
        .nav-item.expanded > .menu-parent .nav-text {
            color: #fff;
            font-weight: 500;
        }

/* ===== زیرمنوها ===== */
/* استایل اختصاصی برای لینک‌های سایدبار */
::deep .sidebar-nav-link {
    display: flex !important;
    align-items: center;
    padding: 0.75rem 1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    background-color: transparent !important;
    border-right: 3px solid transparent;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
}

    ::deep .sidebar-nav-link:hover {
        color: #fff !important;
        background-color: rgba(255, 255, 255, 0.15) !important;
    }

    ::deep .sidebar-nav-link.active {
        color: #fff !important;
        background-color: rgba(255, 255, 255, 0.2) !important;
        border-right-color: #ffd700 !important;
    }

    /* آیکون‌ها */
    ::deep .sidebar-nav-link .nav-icon,
    ::deep .sidebar-nav-link .sub-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 0.75rem;
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.7);
    }

    ::deep .sidebar-nav-link:hover .nav-icon,
    ::deep .sidebar-nav-link:hover .sub-icon,
    ::deep .sidebar-nav-link.active .nav-icon,
    ::deep .sidebar-nav-link.active .sub-icon {
        color: #fff;
    }

/* منوی والد */
::deep .menu-parent {
    position: relative;
    user-select: none;
}

::deep .menu-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 0.5rem;
}

    ::deep .menu-arrow.rotate {
        transform: rotate(-90deg);
    }

/* زیرمنوها */
::deep .sub-menu {
    display: none;
    list-style-type: none;
    padding-right: 20px;
    margin: 0;
    background: rgba(0, 0, 0, 0.15);
    color: #adca0a;
}

    ::deep .sub-menu.show {
        display: block;
    }

::deep .sub-nav-item {
    margin: 2px 0;
}

    ::deep .sub-nav-item .sidebar-nav-link {
        padding: 0.6rem 1rem 0.6rem 1rem !important;
        font-size: 0.85rem;
    }

/* آیتم‌های داخل زیرمنو */
.sub-nav-item {
    margin: 2px 0;
}

    .sub-nav-item .nav-link {
        padding: 0.6rem 1rem 0.6rem 3rem;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.8);
        transition: all 0.2s ease;
    }

        .sub-nav-item .nav-link:hover {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }

        .sub-nav-item .nav-link.active {
            background: rgba(255,215,0,0.15);
            border-left-color: #ffd700;
            color: #fff;
        }

.sub-icon {
    width: 20px;
    height: 20px;
    font-size: 1rem;
    margin-left: 0.5rem;
    color: rgba(255,255,255,0.6);
}

/* زیرمنوها با انیمیشن */
.sub-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    list-style-type: none;
    padding-left: 20px;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

    .sub-menu.show {
        max-height: 500px; /* ارتفاع کافی برای نمایش محتوا */
        opacity: 1;
    }

        /* آیتم‌های زیرمنو با انیمیشن */
        .sub-menu.show .sub-nav-item {
            animation: slideIn 0.2s ease forwards;
            opacity: 0;
            transform: translateX(-10px);
        }


/* استفاده از ترکیب کلاس‌ها برای افزایش Specificity */
.sidebar-menu .nav-link {
    display: flex !important;
    padding: 0.75rem 1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: transparent !important;
    /* بقیه استایل‌ها */
}

    .sidebar-menu .nav-link:hover {
        color: #fff !important;
        background-color: rgba(255, 255, 255, 0.15) !important;
    }

    .sidebar-menu .nav-link.active {
        color: #fff !important;
        background-color: rgba(255, 255, 255, 0.2) !important;
        border-right-color: #ffd700 !important;
    }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sub-menu.show .sub-nav-item:nth-child(1) {
    animation-delay: 0.05s;
}

.sub-menu.show .sub-nav-item:nth-child(2) {
    animation-delay: 0.1s;
}

.sub-menu.show .sub-nav-item:nth-child(3) {
    animation-delay: 0.15s;
}

.sub-menu.show .sub-nav-item:nth-child(4) {
    animation-delay: 0.2s;
}

.sub-menu.show .sub-nav-item:nth-child(5) {
    animation-delay: 0.25s;
}


nav-section-header {
    color: #d4dc8c;
}

.nav-link {
    display: block;
    padding: .5rem 1rem;
    color: #fded0d;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.invoice-item-row {
    overflow: visible !important;
   
}

.invoice-item-search-container {
    position: relative;
    overflow: visible;
 
}

 

.invoice-item-search-root {
    position: relative;
    overflow: visible !important;
 
}

.invoice-item-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  
    background: white;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}


.btn-close-modal
Specificity: (0,2,0) {
    padding: .5rem .5rem;
    margin: -.5rem -.5rem -.5rem;
}

.modal-header .btn-close {
    padding: .5rem .5rem;
    margin: -.5rem -.5rem -.5rem;
}


.bg-purple {
    background-color: #6f42c1 !important;
}


/* مخفی کردن کامل پیام‌های پیش‌فرض reconnect */
#components-reconnect-modal,
.components-reconnect-modal,
.blazor-error-ui {
    display: none !important;
}

/* اطمینان از نمایش مودال سفارشی در بالاترین لایه */
#custom-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}