/* Custom Styles for Financial System */

html, body {
    height: 100%; /* Ensure html and body take full height */
    min-height: 100vh; /* Ensure at least viewport height */
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background-color: #f8f9fa;
}

/* Auto-refresh notification animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.auto-refresh-notification {
    animation: slideDown 0.3s ease-out;
}

/* RTL Support */
.navbar-nav .dropdown-menu {
    right: 0;
    left: auto;
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

/* Number Formatting */
.number-input {
    text-align: left;
    direction: ltr;
}

/* Payment Checkbox Styles */
.payment-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    vertical-align: middle;
}

.payment-checked {
    background-color: #d4edda !important;
    border-right: 4px solid #28a745 !important;
    font-weight: 500;
}

.payment-checked:hover {
    background-color: #c3e6cb !important;
}

/* Animation for checking */
@keyframes checkPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.payment-checkbox:checked {
    animation: checkPulse 0.3s ease;
}

/* Context Menu Styles */
.creditor-context-menu {
    position: fixed;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    min-width: 200px;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background-color: #f0f0f0;
}

.context-menu-item i {
    margin-left: 8px;
}

/* TreeView Customization */
.jstree-default .jstree-themeicon {
    display: none;
}

.jstree-default .jstree-node {
    margin-right: 0;
    margin-left: 0;
}

.jstree-default .jstree-children {
    margin-right: 0;
    margin-left: 0;
}

.jstree-default .jstree-anchor {
    padding: 8px 12px;
    border-radius: 4px;
    margin: 2px 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.jstree-default .jstree-anchor:hover {
    background-color: #e3f2fd;
    transform: translateX(-2px);
}

.jstree-default .jstree-clicked {
    background-color: #2196f3 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.jstree-default .jstree-selected {
    background-color: #1976d2 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

/* Prevent text selection on tree nodes */
.jstree-default .jstree-anchor {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Card Customization */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Sticky header for treeview */
.sticky-header-treeview {
    background-color: #28a745;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
}

.sticky-header-treeview > h5 {
    flex: 0 0 auto;
    margin: 0;
}

.sticky-header-treeview .dashboard-btns {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* کوچک کردن کادر جستجو */
.sticky-header-treeview .dashboard-btns .input-group:first-child {
    max-width: 180px;
    flex: 0 0 auto;
    min-width: 120px;
}

.sticky-header-treeview .dashboard-btns .input-group:first-child .form-control-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.sticky-header-treeview .dashboard-btns .input-group:first-child .btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

/* کوچک کردن شیوه نمایش */
.sticky-header-treeview .dashboard-btns .input-group:nth-child(2) {
    max-width: 250px;
    flex: 0 0 auto;
    min-width: 180px;
}

.sticky-header-treeview .dashboard-btns .input-group:nth-child(2) .input-group-text {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}

.sticky-header-treeview .dashboard-btns .input-group:nth-child(2) .form-select-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

/* دکمه‌ها */
.sticky-header-treeview .dashboard-btns .btn-group {
    flex: 0 0 auto;
    display: flex;
    gap: 0.4rem;
}

.sticky-header-treeview .dashboard-btns .btn-group .btn-sm {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
}

.sticky-header-treeview .dashboard-btns .btn-group .btn-sm i {
    font-size: 0.85rem;
}

/* Sticky فقط در دسکتاپ */
@media (min-width: 769px) {
    .sticky-header-treeview {
        position: sticky;
        top: 70px;
        z-index: 1020;
    }
}

/* Make the card body scrollable if content overflows */
.card-body-scrollable {
    max-height: calc(100vh - 200px); /* Adjust height as needed, considering navbar and other elements */
    overflow-y: auto;
}

.card-header {
    border-bottom: none;
    border-radius: 8px 8px 0 0 !important;
}

/* Button Customization */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Tree Toggle Button */
#btnToggleTree {
    min-width: 32px;
    padding: 0.375rem 0.5rem;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

#btnToggleTree:hover {
    transform: scale(1.05);
}

#toggleIcon {
    transition: transform 0.3s ease;
}

/* Tree expansion animation */
.jstree-children {
    transition: all 0.3s ease;
}

/* Form Customization */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

/* Modal Customization */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

/* Alert Customization */
.alert {
    border-radius: 6px;
    border: none;
}

/* Table Customization */
.table {
    border-radius: 6px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Persian Date Picker Customization */
.datepicker-plot-area {
    font-family: 'Tahoma', 'Arial', sans-serif;
}

.datepicker-plot-area .datepicker-day-view .table-days td span {
    border-radius: 4px;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status Indicators */
.status-completed {
    color: #28a745;
}

.status-pending {
    color: #ffc107;
}

.status-cancelled {
    color: #dc3545;
}

/* Document Status */
.document-status {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-left: 8px;
}

.document-status.completed {
    background-color: #28a745;
}

.document-status.pending {
    background-color: #ffc107;
}

/* Device-specific styles using data attributes */
body[data-device="mobile"] .desktop-only {
    display: none !important;
}

body[data-device="desktop"] .mobile-only {
    display: none !important;
}

body[data-device="tablet"] .desktop-only,
body[data-device="tablet"] .mobile-only {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav .dropdown-menu {
        position: relative !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* بهبود جداول در تبلت */
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    /* بهبود فرم‌ها در تبلت */
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.95rem;
    }
    
    /* بهبود مودال‌ها */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    /* بهبود ساختار card-header برای موبایل */
    .card-header.sticky-header-treeview {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0.75rem !important;
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
    
    .card-header.sticky-header-treeview h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    /* اطمینان از عدم شناور بودن */
    .sticky-header-treeview {
        position: static !important;
        top: auto !important;
    }
    
    /* دکمه‌های داشبورد زیبا در موبایل */
    .dashboard-btns {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Input Group زیبا - کوچکتر در موبایل */
    .dashboard-btns .input-group {
        flex-direction: row !important;
        width: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        padding: 0.15rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* کادر جستجو کوچکتر */
    .dashboard-btns .input-group:first-child {
        max-width: 140px;
    }
    
    /* شیوه نمایش کوچکتر */
    .dashboard-btns .input-group:nth-child(2) {
        max-width: 200px;
    }
    
    .dashboard-btns .input-group input {
        flex: 1;
        border: none !important;
        background: transparent !important;
        color: #333 !important;
        font-size: 0.8rem !important;
        padding: 0.4rem 0.5rem !important;
        min-width: 60px;
    }
    
    .dashboard-btns .input-group input::placeholder {
        color: #999 !important;
    }
    
    .dashboard-btns .input-group input:focus {
        box-shadow: none !important;
        outline: none !important;
    }
    
    .dashboard-btns .input-group .btn {
        width: auto !important;
        border: none !important;
        background: transparent !important;
        color: #666 !important;
        padding: 0.4rem 0.5rem !important;
    }
    
    .dashboard-btns .input-group .btn:hover {
        color: #dc3545 !important;
    }
    
    .dashboard-btns .input-group label {
        white-space: nowrap;
        background: transparent !important;
        border: none !important;
        color: #333 !important;
        font-weight: 500 !important;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    .dashboard-btns .input-group select {
        border: none !important;
        background: transparent !important;
        color: #333 !important;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.5rem !important;
        font-weight: 500 !important;
        min-width: 100px;
    }
    
    .dashboard-btns .input-group select:focus {
        box-shadow: none !important;
        outline: none !important;
    }
    
    /* Button Group زیبا با کارت‌های مدرن */
    .dashboard-btns .btn-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: auto !important;
        flex: 0 0 auto !important;
    }
    
    .dashboard-btns .btn-group .btn {
        width: auto !important;
        margin: 0 !important;
        border-radius: 8px !important;
        padding: 0.5rem 0.6rem !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        white-space: nowrap;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
        transition: all 0.3s ease !important;
        position: relative;
        overflow: hidden;
    }
    
    .dashboard-btns .btn-group .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .dashboard-btns .btn-group .btn:active::before {
        opacity: 1;
    }
    
    .dashboard-btns .btn-group .btn i {
        font-size: 0.85rem;
        margin-left: 0.3rem;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    }
    
    /* رنگ‌های زیبا برای دکمه‌ها */
    .dashboard-btns .btn-outline-light {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #28a745 !important;
    }
    
    .dashboard-btns .btn-light {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        color: #28a745 !important;
    }
    
    .dashboard-btns .btn-warning {
        background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-btns .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-btns .btn-info {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-btns .btn-success {
        background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-btns .btn-primary {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
        color: #fff !important;
    }
    
    .dashboard-btns .btn-secondary {
        background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
        color: #fff !important;
    }
    
    /* حالت غیرفعال زیبا */
    .dashboard-btns .btn-group .btn:disabled {
        opacity: 0.5 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
        filter: grayscale(0.3);
    }
    
    /* انیمیشن لمس */
    .dashboard-btns .btn-group .btn:active:not(:disabled) {
        transform: scale(0.96);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    }
    
    /* TreeView بهبود یافته */
    #treeView {
        overflow-x: auto;
        overflow-y: auto;
        min-height: 400px;
        max-height: none;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0.5rem;
        background: #fff;
        border-radius: 8px;
    }
    
    .card-body-scrollable {
        max-height: none !important;
        overflow-y: visible;
        padding: 0.75rem !important;
    }
    
    /* اطمینان از نمایش کامل محتوا */
    .card {
        margin-bottom: 2rem;
    }
    
    .jstree-default .jstree-anchor {
        font-size: 1rem;
        padding: 12px 8px;
        margin-bottom: 4px;
    }
    
    .jstree-default .jstree-icon {
        font-size: 1.2em;
    }
    
    /* Navbar mobile improvements */
    .navbar {
        min-height: 56px;
    }
    .navbar-toggler {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
        border: 2px solid rgba(255,255,255,0.5);
    }
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.3);
    }
    .navbar-nav {
        background: #1976d2;
        border-radius: 0 0 12px 12px;
        margin-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .navbar-nav .nav-link, .navbar-nav .dropdown-item {
        font-size: 1.1rem;
        padding: 0.75rem 1.2rem;
        color: #fff !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .navbar-nav .nav-link:active,
    .navbar-nav .dropdown-item:active {
        background: #1565c0;
    }
    .navbar-nav .dropdown-menu {
        background: #1565c0;
        border-radius: 0 0 12px 12px;
    }
    .navbar-nav .dropdown-item {
        color: #fff !important;
    }
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus {
        background: #2196f3;
        color: #fff;
    }
    .navbar .navbar-collapse {
        background: #1976d2;
        border-radius: 0 0 12px 12px;
        max-height: 70vh;
        overflow-y: auto;
    }
    .navbar .navbar-brand {
        font-size: 1.1rem;
    }
    .navbar .dropdown-toggle::after {
        margin-right: 0.5em;
    }
    
    /* بهبود کارت‌ها */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* بهبود جداول در موبایل */
    .table-responsive {
        border: 0;
        font-size: 0.85rem;
    }
    
    .table {
        margin-bottom: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 0.75rem;
        background: #fff;
    }
    
    .table tbody td {
        display: block;
        text-align: right !important;
        padding: 0.5rem 0;
        border: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table tbody td:last-child {
        border-bottom: 0;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        margin-left: 0.5rem;
        color: #495057;
    }
    
    /* بهبود دکمه‌ها در موبایل */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        min-height: 38px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 6px !important;
        margin-bottom: 0.5rem;
    }
    
    /* بهبود فرم‌ها */
    .form-label {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 44px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group > * {
        width: 100% !important;
        border-radius: 6px !important;
        margin-bottom: 0.5rem;
    }
    
    .input-group-text {
        border-radius: 6px !important;
    }
    
    /* بهبود مودال‌ها */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-content {
        height: 100%;
        border-radius: 0;
        border: 0;
    }
    
    .modal-header {
        padding: 1rem;
        border-radius: 0;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    /* بهبود Alert ها */
    .alert {
        font-size: 0.95rem;
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* بهبود Badge ها */
    .badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* بهبود Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-item {
        margin: 0.2rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* بهبود Select2 در موبایل */
    .select2-container {
        width: 100% !important;
    }
    
    .select2-container .select2-selection--single {
        height: 44px;
        padding: 0.5rem;
    }
    
    .select2-container .select2-selection--single .select2-selection__rendered {
        line-height: 32px;
        font-size: 1rem;
    }
    
    .select2-container .select2-selection--single .select2-selection__arrow {
        height: 42px;
    }
    
    /* بهبود Date Picker */
    .datepicker-plot-area {
        font-size: 1rem;
    }
    
    .datepicker-plot-area .datepicker-day-view .table-days td {
        padding: 0.75rem;
    }
    
    /* جلوگیری از overflow افقی */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* بهبود فاصله‌گذاری */
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* بهبود Login Page */
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        margin: 0;
        border-radius: 12px;
    }
    
    /* بهبود Dashboard Cards */
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    /* بهبود TreeView در موبایل */
    .jstree-default .jstree-node {
        min-height: 44px;
    }
    
    /* بهبود Dropdown Menu */
    .dropdown-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* بهبود Breadcrumb */
    .breadcrumb {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .breadcrumb-item {
        padding: 0.25rem;
    }
}

/* بهبودهای اضافی برای موبایل‌های بسیار کوچک */
@media (max-width: 375px) {
    .navbar .navbar-brand {
        font-size: 1rem;
    }
    
    .card-header h5,
    .card-header h6 {
        font-size: 0.95rem;
    }
    
    .btn {
        font-size: 0.95rem;
        padding: 0.45rem 0.9rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.95rem;
    }
}

/* بهبود تجربه لمسی */
@media (hover: none) and (pointer: coarse) {
    /* افزایش اندازه اهداف لمسی */
    .btn,
    .nav-link,
    .dropdown-item,
    .form-control,
    .form-select,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* بهبود فیدبک لمسی */
    .btn:active,
    .nav-link:active,
    .dropdown-item:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    /* حذف hover effects در دستگاه‌های لمسی */
    .btn:hover,
    .nav-link:hover,
    .dropdown-item:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    body {
        background-color: white;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* TreeView Node Types */
.tree-creditor {
    color: #2196f3;
}

.tree-debtor {
    color: #ff9800;
}

.tree-payment {
    color: #4caf50;
}

/* Document Status Icons */
.jstree-default .jstree-icon.fas.fa-check-circle {
    color: #28a745 !important;
    font-size: 1.1em;
}

.jstree-default .jstree-icon.fas.fa-user-plus {
    color: #2196f3 !important;
}

.jstree-default .jstree-icon.fas.fa-user-minus {
    color: #ff9800 !important;
}

.jstree-default .jstree-icon.fas.fa-money-bill-wave {
    color: #4caf50 !important;
}

/* Document Status Text */
.document-status-text {
    color: #28a745;
    font-weight: bold;
    margin-right: 5px;
}

/* Amount Formatting */
.amount {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.amount-positive {
    color: #28a745;
}

.amount-negative {
    color: #dc3545;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-right: 40px;
}

.search-box .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Filter Tags */
.filter-tag {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin: 2px;
}

.filter-tag .remove {
    margin-right: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* Tooltip Customization */
.tooltip {
    font-family: 'Tahoma', 'Arial', sans-serif;
}

.tooltip-inner {
    background-color: #333;
    border-radius: 4px;
    padding: 6px 10px;
}

/* Badge Customization */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
}

/* Pagination Customization */
.pagination .page-link {
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #2196f3;
    border-color: #2196f3;
}

/* Breadcrumb Customization */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Sidebar (if needed) */
.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    min-height: calc(100vh - 70px);
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 2px 0;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #212529;
}

.sidebar .nav-link.active {
    background-color: #2196f3;
    color: white;
}

/* Footer */
.footer {
    background-color: #343a40;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: #adb5bd;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

/* Multi-Select Styles - Minimal without highlighting */
.jstree-node {
    cursor: pointer;
}

.jstree-anchor {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Badge for selected count */
#selectedCount {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    vertical-align: middle;
    display: none !important;
}

#selectedCount.show {
    display: inline-block !important;
}