/* استایل‌های کیف پول */
.wallet-section {
    margin-top: 20px;
}

.wallet-section .card {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.wallet-section .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.wallet-section .card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

.wallet-section .alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 15px;
}

.wallet-section .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.wallet-section .alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.wallet-section .alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    color: #0f5132;
    border-radius: 10px;
}

.wallet-section .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.wallet-section .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.wallet-section .form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.wallet-section .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 5px;
}

.wallet-section .bi {
    font-size: 1.1em;
}

/* انیمیشن‌های کیف پول */
@keyframes walletSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wallet-section.show {
    animation: walletSlideIn 0.5s ease-out;
}

/* Responsive برای کیف پول */
@media (max-width: 768px) {
    .wallet-section .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .wallet-section .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .wallet-section .alert {
        font-size: 0.9rem;
    }
}

/* طراحی مدرن و کاربرپسند */
.step {
    display: none;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.step.active {
    display: block;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* هدر مراحل */
.step h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.step h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 2px;
}

/* جستجوی بیمار */
#patientSearch {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#patientSearch:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

#patientSearch::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.patient-option {
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.patient-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.patient-option:hover {
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.patient-option:hover::before {
    left: 100%;
}

.service-box {
    border: 2px solid #e1e8ed;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.service-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #2980b9);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.service-box:hover {
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.service-box:hover::before {
    transform: scaleY(1);
}

.service-content {
    flex: 1;
}

.service-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.service-actions .btn {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.service-actions .btn:hover::before {
    left: 100%;
}

.service-actions .btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    color: white;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.service-actions .btn-primary:hover {
    background: linear-gradient(45deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.service-actions .btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.service-actions .btn-danger:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.service-actions .btn i {
    font-size: 14px;
}

/* دکمه‌های مدرن */
.btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background: linear-gradient(45deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(45deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 18px;
    border-radius: 30px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 20px;
}

/* فیلدهای فرم مدرن */
.form-control {
    border: 2px solid #e1e8ed;
    border-radius: 15px;
    padding: 12px 18px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* انتخابگرهای تاریخ */
.row .col select.form-control {
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 13px;
    text-align: center;
}

.row .col select.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* فیلد تخفیف */
#discount {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #e1e8ed;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

#discount:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

#discountWords {
    color: #e74c3c;
    font-weight: 600;
    font-size: 14px;
}

.modal-lg {
    max-width: 800px;
}

#servicesTable {
    margin-top: 15px;
}

.form-label.required:after {
    content: "*";
    color: red;
    margin-right: 5px;
}

#finalServicesList {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#finalServicesList > div {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#finalServicesList > div:last-child {
    border-bottom: none;
}

.btn-add {
    margin-bottom: 20px;
}

/* استایل برای انتخاب چندگانه محصولات */
#productSelect[multiple] {
    min-height: 150px;
    max-height: 200px;
}

#productSelect[multiple] option {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

#productSelect[multiple] option:checked {
    background-color: #007bff;
    color: white;
}

#productSelect[multiple] option:hover {
    background-color: #f8f9fa;
}

/* استایل برای نمایش محصولات انتخاب شده */
.selected-products {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.selected-product-item {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 15px;
    font-size: 12px;
}

/* استایل برای محصولات با تعداد جداگانه */
.product-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.product-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-item.selected {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.product-item.hidden {
    display: none;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.product-name {
    font-weight: bold;
    color: #333;
    flex: 1;
}

.product-price {
    color: #28a745;
    font-weight: bold;
    margin-left: 10px;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
}

.product-total {
    font-weight: bold;
    color: #007bff;
    margin-top: 8px;
    text-align: right;
    font-size: 14px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* استایل برای جستجو */
#productSearch {
    border-radius: 20px;
    padding: 8px 15px;
    border: 1px solid #ced4da;
}

#productSearch:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* استایل برای دکمه‌های انتخاب همه */
.btn-group-products {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-group-products .btn {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
}

/* استایل برای اسکرول */
#productsContainer::-webkit-scrollbar {
    width: 6px;
}

#productsContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#productsContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#productsContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* استایل برای نمایش تعداد محصولات انتخاب شده */
.selected-count {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

/* استایل برای فاکتور مدرن */
.invoice-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #3498db;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
    position: relative;
    overflow: hidden;
}

.invoice-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2980b9, #3498db);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.invoice-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.invoice-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-radius: 2px;
}

.invoice-header h3 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.invoice-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.invoice-info p {
    margin: 0;
    font-size: 14px;
    color: #495057;
    font-weight: 600;
}

.invoice-items table {
    margin-bottom: 25px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: none;
}

.invoice-items th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-align: center;
    font-weight: 700;
    padding: 15px 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.invoice-items td {
    text-align: center;
    padding: 12px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    font-weight: 500;
}

.invoice-items tbody tr {
    transition: all 0.3s ease;
}

.invoice-items tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.invoice-items tbody tr:hover {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.invoice-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #dee2e6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.invoice-summary p {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.total-amount {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #27ae60 !important;
    text-align: right;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #27ae60;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.2);
}

.invoice-summary .row {
    align-items: center;
}

/* استایل برای محصولات در فاکتور - حذف شده چون هر محصول ردیف جداگانه دارد */

/* استایل برای دکمه‌های عملیات فاکتور */
.invoice-actions {
    padding: 20px;
    border-top: 2px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0 0 15px 15px;
    margin-top: 20px;
}

.invoice-actions .btn {
    margin: 0 8px;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.invoice-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.invoice-actions .btn i {
    margin-left: 8px;
    font-size: 16px;
}

/* استایل‌های پرینت */
@media print {
    body * {
        visibility: hidden;
    }
    
    .invoice-container, .invoice-container * {
        visibility: visible;
    }
    
    .invoice-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }
    
    .invoice-actions {
        display: none !important;
    }
    
    .step {
        display: block !important;
    }
    
    .step:not(#step3) {
        display: none !important;
    }
    
    .invoice-header h3 {
        font-size: 28px !important;
        margin-bottom: 20px !important;
    }
    
    .invoice-items table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .invoice-items th,
    .invoice-items td {
        border: 1px solid #333 !important;
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    .invoice-items th {
        background-color: #333 !important;
        color: white !important;
    }
    
    .invoice-summary {
        margin-top: 20px !important;
        border: 2px solid #333 !important;
    }
    
    .total-amount {
        font-size: 20px !important;
        font-weight: bold !important;
    }
    
    /* حذف رنگ‌ها در پرینت - استایل محصولات حذف شده */
    
    .invoice-items tbody tr:nth-child(even) {
        background-color: #f5f5f5 !important;
    }
    
    /* تنظیمات صفحه */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    /* تنظیمات فونت برای پرینت */
    .invoice-container {
        font-family: 'Tahoma', 'Arial', sans-serif !important;
        direction: rtl !important;
    }
}

/* استایل برای حالت آماده پرینت */
.print-ready {
    background: white !important;
    color: black !important;
}

.print-ready .invoice-container {
    border: 2px solid #000 !important;
    box-shadow: none !important;
}

.print-ready .invoice-actions {
    display: none !important;
}

/* استایل برای دکمه تولید فاکتور */
#generateInvoice {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#generateInvoice::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

#generateInvoice:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.5);
    background: linear-gradient(45deg, #2980b9, #1f618d);
}

#generateInvoice:hover::before {
    left: 100%;
}

#generateInvoice:active {
    transform: translateY(-1px);
}

/* انیمیشن برای نمایش فاکتور */
.invoice-container {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل برای فاکتور نهایی */
#finalInvoiceContainer {
    border: 3px solid #27ae60 !important;
    background: linear-gradient(135deg, #f8fff8, #ffffff) !important;
    animation: slideInUp 0.8s ease-out;
    box-shadow: 0 15px 40px rgba(39, 174, 96, 0.2) !important;
}

#finalInvoiceContainer::before {
    background: linear-gradient(90deg, #27ae60, #229954, #27ae60) !important;
}

#finalInvoiceContainer .invoice-header h3 {
    color: #27ae60 !important;
    font-size: 30px !important;
    text-shadow: 0 2px 4px rgba(39, 174, 96, 0.3) !important;
}

#finalInvoiceContainer .invoice-header {
    border-bottom-color: #27ae60 !important;
}

#finalInvoiceContainer .invoice-header::after {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
}

#finalInvoiceContainer .invoice-items th {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
}

#finalInvoiceContainer .total-amount {
    color: #27ae60 !important;
    font-size: 22px !important;
    background: linear-gradient(135deg, #d4edda, #c3e6cb) !important;
    border-color: #27ae60 !important;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3) !important;
}

/* دکمه خدمت جدید */
#newService {
    background: linear-gradient(45deg, #6c757d, #495057);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(108,117,125,0.3);
}

#newService:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,117,125,0.4);
    background: linear-gradient(45deg, #495057, #343a40);
}

#newService i {
    margin-left: 8px;
    font-size: 16px;
}

/* استایل‌های پاپ‌آپ مدرن */
.modern-modal {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}

.modern-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 25px 30px;
    position: relative;
}

.modern-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #c0392b, #e74c3c);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.header-content {
    flex: 1;
}

.modern-header .modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-subtitle {
    font-size: 14px;
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-weight: 400;
}

.modern-close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.modern-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.modern-body {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

/* بخش جستجو */
.search-section {
    margin-bottom: 25px;
}

.search-container {
    margin-bottom: 15px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 15px;
    color: #6c757d;
    font-size: 16px;
    z-index: 2;
}

.modern-search {
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.modern-search:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.search-clear {
    position: absolute;
    left: 15px;
    background: #e74c3c;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    color: white;
    font-size: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.modern-btn {
    border-radius: 20px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-counter {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 10px 15px;
    border-radius: 15px;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* بخش محصولات */
.products-section {
    margin-bottom: 25px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.selected-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
}

.products-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    background: white;
    padding: 15px;
}

.products-container::-webkit-scrollbar {
    width: 8px;
}

.products-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.products-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.products-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* کارت محصول */
.product-item {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #2980b9);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.product-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.product-item:hover::before {
    transform: scaleY(1);
}

.product-item.selected {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.product-item.selected::before {
    background: linear-gradient(180deg, #27ae60, #229954);
    transform: scaleY(1);
}

.product-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #6c757d;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-checkbox:checked {
    background: #27ae60;
    border-color: #27ae60;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.product-price {
    font-size: 14px;
    color: #27ae60;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-input {
    width: 80px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #3498db;
    color: white;
    transform: scale(1.1);
}

/* خلاصه قیمت */
.price-summary {
    margin-top: 25px;
}

.summary-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.summary-header {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 15px 20px;
}

.summary-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.summary-content {
    padding: 20px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.price-label {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.price-value {
    font-size: 20px;
    font-weight: 700;
    color: #27ae60;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid #27ae60;
}

/* فوتر پاپ‌آپ */
.modern-footer {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 2px solid #dee2e6;
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modern-footer .modern-btn {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 700;
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-item {
    animation: fadeInUp 0.3s ease-out;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .modern-modal .modal-dialog {
        margin: 10px;
    }
    
    .modern-body {
        padding: 20px;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .modern-footer {
        flex-direction: column;
    }
}

/* استایل‌های پاپ‌آپ انتخاب خدمات */
.services-section {
    margin-bottom: 25px;
}

.services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.services-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    background: white;
    padding: 15px;
}

.services-container::-webkit-scrollbar {
    width: 8px;
}

.services-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.services-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.services-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.modern-table {
    margin-bottom: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: none;
}

.modern-table th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-align: center;
    font-weight: 700;
    padding: 15px 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.modern-table td {
    text-align: center;
    padding: 12px;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    font-weight: 500;
}

.modern-table tbody tr {
    transition: all 0.3s ease;
}

.modern-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.modern-table tbody tr:hover {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.service-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-checkbox:checked {
    background: #27ae60;
    border-color: #27ae60;
}

.service-name {
    font-weight: 700;
    color: #2c3e50;
}

.service-unit {
    color: #6c757d;
    font-weight: 600;
}

.service-base-price {
    color: #27ae60;
    font-weight: 600;
}

/* استایل‌های ویرایش قیمت محصولات */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-price-display {
    font-size: 14px;
    color: #27ae60;
    font-weight: 600;
}

.product-price-input {
    width: 120px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 14px;
    color: #27ae60;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.product-price-input:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
    background: white;
}

.product-price-input:hover {
    border-color: #27ae60;
    background: white;
}

.price-edit-btn {
    background: #17a2b8;
    border: none;
    border-radius: 6px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.price-edit-btn:hover {
    background: #138496;
    transform: scale(1.05);
}

.price-save-btn {
    background: #27ae60;
    border: none;
    border-radius: 6px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.price-save-btn:hover {
    background: #229954;
    transform: scale(1.05);
}

.price-cancel-btn {
    background: #6c757d;
    border: none;
    border-radius: 6px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.price-cancel-btn:hover {
    background: #5a6268;
    transform: scale(1.05);
}

/* انیمیشن‌های اضافی */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.product-item.editing {
    animation: pulse 0.5s ease-in-out;
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

/* ریسپانسیو برای پاپ‌آپ انتخاب خدمات */
@media (max-width: 768px) {
    .services-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .product-price-input {
        width: 100px;
        font-size: 12px;
    }
    
    .service-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .service-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* استایل‌های مخصوص چاپ */
@media print {
    body * {
        visibility: hidden;
    }
    #invoiceContainer, #invoiceContainer *,
    #finalInvoiceContainer, #finalInvoiceContainer * {
        visibility: visible;
    }
    #invoiceContainer, #finalInvoiceContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }
    .invoice-actions, .invoice-actions *, .btn, .no-print {
        display: none !important;
    }
    .invoice-header {
        border-bottom: 2px solid #000 !important;
        margin-bottom: 20px !important;
    }
    .invoice-header h3 {
        color: #000 !important;
    }
    .invoice-info {
        background: none !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }
    .invoice-items th {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    .invoice-items td {
        border: 1px solid #000 !important;
        color: #000 !important;
    }
    .invoice-summary {
        background: none !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }
    .total-amount {
        font-size: 20px !important;
        color: #000 !important;
    }
} 