﻿/* ========== استایل‌های عمومی ========== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    margin: 0;
    padding: 20px;
    background: white;
    color: #333;
}

/* ========== کارت‌ها ========== */
.card {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.summary-card {
    border: 1px solid #eef2f7;
    transition: transform 0.3s ease;
    height: 100%;
}

    .summary-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .summary-card .icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.project-info-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease;
}

.section-title {
    border-bottom: 2px solid #4361ee;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.status-card {
    transition: all 0.3s ease;
    border: none;
}

    .status-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

.expandable-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.expandable-header {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .expandable-header:hover {
        background-color: #f8f9fa !important;
    }

    .expandable-header .expandable-icon {
        transition: transform 0.3s ease;
    }

    .expandable-header[aria-expanded="true"] .expandable-icon {
        transform: rotate(180deg);
    }

.estimate-form-section,
.estimate-table-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #eef2f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.report-chart-section {
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ========== جداول ========== */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #4361ee, #3a56d4);
    color: white;
}

.table th {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s ease;
}

    .table tbody tr:hover,
    .table-hover tbody tr:hover {
        background-color: rgba(67, 97, 238, 0.05);
    }

#estimateTable {
    border-radius: 10px;
    overflow: hidden;
}

    #estimateTable thead th {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        font-weight: 600;
    }

    #estimateTable tbody tr:hover {
        background-color: #f8fafc;
        transform: translateY(-1px);
        transition: all 0.2s ease;
    }

    #estimateTable tbody td {
        vertical-align: middle;
    }

.no-data-row {
    background-color: #f9fafb;
}

.income-row {
    background-color: rgba(16, 185, 129, 0.05);
}

.expense-row {
    background-color: rgba(239, 68, 68, 0.05);
}

.revenue-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 12px;
}

    .revenue-table thead {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
    }

    .revenue-table th {
        padding: 12px 8px;
        text-align: center;
        border: 1px solid #ddd;
        font-weight: bold;
    }

    .revenue-table td {
        padding: 10px 8px;
        border: 1px solid #ddd;
        text-align: center;
    }

    .revenue-table tfoot {
        background-color: #f0fff4;
        font-weight: bold;
    }

/* ========== تب‌ها ========== */
.nav-tabs .nav-link {
    color: #64748b;
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .nav-tabs .nav-link:hover {
        color: #3b82f6;
        background-color: #f1f5f9;
    }

    .nav-tabs .nav-link.active {
        color: #3b82f6;
        background-color: white;
        border-bottom: 3px solid #3b82f6;
    }

/* ========== تگ‌ها و بج‌ها ========== */
.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-design {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-development {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-content {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-hosting {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.badge-marketing {
    background-color: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.badge-other {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.revenue-status-received {
    background-color: #d1f7c4;
    color: #22543d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.revenue-status-pending {
    background-color: #feebc8;
    color: #744210;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.tags-container .badge {
    transition: all 0.2s ease;
}

    .tags-container .badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

/* ========== صفحه جزئیات پروژه ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 1fr);
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

/* ========== پایان صفحه جزئیات پروژه ========== */
.financial-summary .financial-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

    .financial-summary .financial-item:not(:first-child) {
        margin-top: 1rem;
    }

.description-box {
    border-right: 3px solid #4361ee;
}

.description-content {
    line-height: 1.8;
    text-align: justify;
}

.progress-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.milestones-container {
    position: relative;
}

.milestones-list {
    scrollbar-width: thin;
    scrollbar-color: #4361ee #f1f1f1;
    max-height: 480px;
    overflow-y: auto;
}

    .milestones-list::-webkit-scrollbar {
        width: 6px;
    }

    .milestones-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .milestones-list::-webkit-scrollbar-thumb {
        background: #4361ee;
        border-radius: 3px;
    }

.milestone-item {
    transition: all 0.2s ease;
    background: white;
}

    .milestone-item:hover {
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
        transform: translateX(2px);
    }

.milestone-status i {
    transition: all 0.3s ease;
}

.contract-amount-updated {
    animation: highlightUpdate 2s ease;
}

/* ========== تایم‌لاین ========== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #dee2e6;
    }

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

    .timeline-item:last-child {
        margin-bottom: 0;
    }

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item.completed .timeline-marker {
    border-color: #28a745;
    color: #28a745;
}

.timeline-content {
    background: #fff;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

.timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

/* ========== دکمه‌ها و فرم‌ها ========== */
.action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

#contractAmountModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#contractAmountModal .modal-header {
    background: linear-gradient(135deg, #4361ee, #3a56d4);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.2rem 1.5rem;
}

    #contractAmountModal .modal-header .btn-close {
        filter: invert(1) brightness(100%);
        opacity: 0.8;
    }

#contractAmountModal .modal-body {
    padding: 1.5rem;
}

#contractAmountModal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

#contractAmountModal .input-group {
    border-radius: 8px;
    overflow: hidden;
}

    #contractAmountModal .input-group .form-control {
        border-right: none;
        padding: 0.75rem 1rem;
    }

    #contractAmountModal .input-group .input-group-text {
        background-color: #f8f9fa;
        border-left: none;
        color: #6c757d;
        font-weight: 500;
    }

#contractAmountModal .form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

#contractAmountModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

#contractAmountModal .btn-primary {
    background: linear-gradient(135deg, #4361ee, #3a56d4);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

    #contractAmountModal .btn-primary:hover {
        background: linear-gradient(135deg, #3a56d4, #2e44b8);
    }

#newTransactionForm {
    animation: slideDown 0.3s ease-out;
}

/* ========== رنگ‌ها و افکت‌ها ========== */
.bg-primary-light {
    background-color: rgba(59, 130, 246, 0.1);
}

.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-info-light {
    background-color: rgba(6, 182, 212, 0.1);
}

.footer-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(13, 110, 253, 0.25), rgba(0, 0, 0, 0));
    margin-bottom: 16px;
}

.summary-item {
    border: 1px solid #eef2f7;
    transition: all 0.3s ease;
}

    .summary-item:hover {
        background-color: #f8fafc;
        transform: translateX(3px);
    }

.period-card {
    transition: all 0.3s ease;
    text-align: center;
}

    .period-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

/* ========== چاپ ========== */
@media print {
    body * {
        visibility: hidden;
    }

    .print-section,
    .print-section *,
    .revenue-print-container {
        visibility: visible;
    }

    .print-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        background: white;
    }

    .no-print {
        display: none !important;
    }

    .table {
        border-collapse: collapse;
    }

        .table th,
        .table td {
            border: 1px solid #dee2e6;
            padding: 8px;
        }

        .table thead th {
            background-color: #f8f9fa;
            border-bottom: 2px solid #dee2e6;
        }

    .badge {
        border: 1px solid #ccc;
    }

    body {
        padding: 10px !important;
        margin: 0 !important;
    }

    .revenue-print-container {
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .revenue-stat-box {
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .revenue-table,
    .revenue-print-footer {
        page-break-inside: avoid;
    }

    @page {
        margin: 15mm;
    }
}

.print-header {
    border-bottom: 3px solid #4e73df;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.company-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.project-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-right: 4px solid #4e73df;
}

.revenue-print-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
}

.revenue-print-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #28a745;
}

.revenue-company-info {
    margin-bottom: 30px;
}

    .revenue-company-info h1 {
        font-size: 24px;
        color: #28a745;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .revenue-company-info p {
        margin: 2px 0;
        font-size: 13px;
        color: #666;
    }

.revenue-project-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid #28a745;
}

.revenue-project-title {
    font-size: 18px;
    color: #2d3748;
    font-weight: bold;
    margin-bottom: 10px;
}

.revenue-project-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    font-size: 13px;
}

.revenue-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.revenue-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.revenue-stat-box {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.revenue-stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.revenue-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.revenue-print-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #c6f6d5;
    font-size: 11px;
    color: #666;
}

.revenue-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.revenue-signature-box {
    height: 80px;
    border: 1px dashed #a0aec0;
    margin-top: 10px;
}

/* ========== استایل‌های عمومی اضافی ========== */
.toast-container {
    max-width: 350px;
}

.toast {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .toast.bg-success .toast-body {
        color: #155724;
    }

    .toast.bg-danger .toast-body {
        color: #721c24;
    }

    .toast.bg-warning .toast-body {
        color: #856404;
    }

    .toast.bg-info .toast-body {
        color: #0c5460;
    }

    .toast .ti {
        font-size: 1.25rem;
    }

.rounded-top-3 {
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}

.rounded-bottom-3 {
    border-bottom-left-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
}

/* ========== جدول‌های عمومی ========== */
.table {
    margin-bottom: 0;
}

    .table thead th {
        font-weight: 600;
        color: var(--bs-gray-700);
        border-bottom: 2px solid rgba(0,0,0,.1);
    }

    .table tbody tr {
        border-color: rgba(0,0,0,.04);
    }

        .table tbody tr:hover {
            background-color: rgba(var(--bs-primary-rgb), 0.02);
        }

    .table tfoot {
        background-color: rgba(0,0,0,.02);
    }

/* ========== دکمه‌های عملیات ========== */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.btn-outline-primary, .btn-outline-danger {
    border-width: 1px;
}

/* ========== مدال ========== */
.modal-dialog-centered {
    max-width: 500px;
}

.modal-content {
    border-radius: 0.75rem;
    overflow: hidden;
}

.text-muted-50 {
    color: rgba(108, 117, 125, 0.5) !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.border {
    border-color: rgba(0,0,0,.1) !important;
}

/* ========== انیمیشن‌ها ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes highlightUpdate {
    0% {
        background-color: rgba(40, 167, 69, 0.2);
        transform: scale(1);
    }

    50% {
        background-color: rgba(40, 167, 69, 0.4);
        transform: scale(1.02);
    }

    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* ========== استایل‌های مدال عمومی ========== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 2rem;
}

    .modal-header .btn-close {
        filter: brightness(0) invert(1);
        opacity: 0.8;
    }

        .modal-header .btn-close:hover {
            opacity: 1;
        }

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #f1f3f9;
    padding: 1.5rem 2rem;
}

/* ========== فرم‌ها و اینپوت‌ها ========== */
.form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.input-group-text {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

/* ========== آیکون‌های تماس ========== */
.contact-icon {
    color: #64748b;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 4px;
}

    .contact-icon:hover {
        color: #3b82f6;
        background-color: #f1f5f9;
    }

/* ========== دسته‌بندی‌ها ========== */
.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-label {
    color: #475569;
    cursor: pointer;
    user-select: none;
}

/* ========== نوار پیشرفت وضعیت ========== */
.progress {
    border-radius: 4px;
    background-color: #f1f5f9;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========== رنگ‌های پروژه ========== */
.color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .color-option:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .color-option.active {
        border-color: #1e293b;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* ========== تگ‌ها ========== */
#tagsContainer .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 20px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

    #tagsContainer .badge .btn-close {
        font-size: 0.6em;
        padding: 0.5em;
        margin-left: 0.25em;
    }

/* ========== دکمه‌ها ========== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    }

.btn-outline-secondary {
    border-color: #e2e8f0;
    color: #64748b;
}

    .btn-outline-secondary:hover {
        background-color: #f8fafc;
        border-color: #cbd5e1;
        color: #475569;
    }

/* ========== دکمه‌های ایکون ========== */
.client-tab-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

    .client-tab-btn.active {
        background-color: #3b82f6 !important;
        color: white !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
        transform: scale(1.05);
    }

    .client-tab-btn:not(.active):hover {
        background-color: #f8f9fa !important;
        transform: translateY(-1px);
    }

    .client-tab-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none !important;
    }

        .client-tab-btn:disabled::after {
            content: "🔒";
            position: absolute;
            font-size: 8px;
            bottom: -5px;
            right: -5px;
        }

/* ========== پیش‌نمایش ========== */
#clientInfoPreview {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-height: 40px;
    margin-top: 8px;
}

#previewText {
    color: #6c757d;
}

.client-tab-btn i {
    font-size: 1.1rem;
}

/* ========== اولویت‌ها ========== */
select#Priority option[value="normal"] {
    color: #10b981;
}

select#Priority option[value="urgent"] {
    color: #f59e0b;
}

select#Priority option[value="very-urgent"] {
    color: #ef4444;
}

/* ========== متن‌های کمکی ========== */
.form-text {
    color: #94a3b8;
    font-size: 0.875em;
}

/* ========== اسکرول‌بار سفارشی ========== */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    textarea::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* ========== highlight جمع کل ========== */
.highlight {
    animation: highlightPulse 0.6s ease-in-out;
}

.total-amount {
    transition: all 0.3s ease;
}

/* ========== وضعیت‌های progress bar ========== */
.progress-bar.bg-secondary {
    background-color: #94a3b8 !important;
}

.progress-bar.bg-info {
    background-color: #0ea5e9 !important;
}

.progress-bar.bg-primary {
    background-color: #3b82f6 !important;
}

.progress-bar.bg-warning {
    background-color: #f59e0b !important;
}

.progress-bar.bg-success {
    background-color: #10b981 !important;
}

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .milestones-list {
        max-height: 300px;
    }

    .estimate-form-section,
    .estimate-table-section {
        padding: 1rem;
    }

    .summary-card,
    .financial-summary-section .col-md-3 {
        margin-bottom: 1rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .expandable-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

        .expandable-header > div:last-child {
            margin-top: 0.5rem;
            align-self: flex-end;
        }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
        width: 1.25rem;
        height: 1.25rem;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .row.g-4 {
        gap: 1rem !important;
    }

    .color-option {
        width: 28px;
        height: 28px;
    }

    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }
}

/* ========== انیمیشن‌های اضافی ========== */
.tab-pane {
    animation: fadeIn 2.3s ease;
}
.loader-text {
    --text: "ANAMORPHIC";
    --char-count: 10; /* تعداد کاراکترهای متن */
    --char-width: 1ch; /* عرض هر کاراکتر */
    --total-width: calc(var(--char-count) * var(--char-width));
    font-weight: bold;
    font-family: monospace;
    font-size: 30px;
    letter-spacing: var(--total-width);
    width: var(--char-width);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    --shadow-base: calc(-1 * var(--total-width)) 0;
    text-shadow: var(--shadow-base);
}

    .loader-text::before {
        content: var(--text);
    }

    .loader-text::after {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent 0%, rgb(var(--primary)) 20%, rgb(var(--success)) 40%, rgb(var(--warning)) 60%, rgb(var(--danger)) 80%, transparent 100% );
        animation: color-sweep 2s infinite linear;
        mix-blend-mode: multiply;
    }

@keyframes color-sweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(calc(var(--char-count) * 100%));
    }
}
/* ==================== */
/* پایه و تنظیمات ارتفاع */
/* ==================== */
.h-100 {
    height: 80% !important;
    max-height: 500px;
}

.h-101 {
    height: 100% !important;
    max-height: 500px;
}

.align-items-stretch {
    align-items: stretch !important;
}

/* ==================== */
/* کارت‌ها و layout */
/* ==================== */
.card {
    display: flex;
    flex-direction: column;
}

.card-body.d-flex.flex-column {
    flex: 1 1 auto;
}

.mt-auto {
    margin-top: auto !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* ==================== */
/* جداکننده بخش‌ها */
/* ==================== */
.section-separator {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.separator-line {
    flex: 1;
    height: 5px;
    background: linear-gradient(90deg, #e5e7eb, #3b82f6, #e5e7eb);
    border-radius: 1px;
}

.separator-content {
    padding: 0 5.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.separator-icon {
    font-size: 1.25rem;
}

.separator-text {
    font-weight: 600;
    color: #4b5563;
}

/* ==================== */
/* نمودار دایره‌ای */
/* ==================== */
.donut-chart {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.chart-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* ==================== */
/* پروگرس بار سفارشی */
/* ==================== */
.custom-progress-container {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    display: flex;
    overflow: hidden;
    margin-top: 10px;
}

.progress-container {
    min-width: 120px;
}

.progress {
    overflow: hidden;
    background-color: #e5e7eb;
    border-radius: 3px;
    height: 6px;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

    .progress-bar.productive {
        background-color: #10b981;
    }

    .progress-bar.idle {
        background-color: #ef4444;
    }

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    margin-top: 5px;
}

/* ==================== */
/* اسکرول بار زیبا */
/* ==================== */
.overflow-auto {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

    .overflow-auto::-webkit-scrollbar {
        width: 6px;
    }

    .overflow-auto::-webkit-scrollbar-track {
        background: transparent;
    }

    .overflow-auto::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

/* ==================== */
/* جدول - استایل هدر */
/* ==================== */
.table-light {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 3px solid #3b82f6;
}

    .table-light th {
        border-bottom: 2px solid #e2e8f0;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

/* ==================== */
/* جدول - استایل سطرها */
/* ==================== */
.hover-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

    .hover-row:hover {
        background-color: #f8fafc;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

/* ==================== */
/* بج‌ها (Badges) */
/* ==================== */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    border-radius: 6px;
}

/* ==================== */
/* رنگ‌بندی */
/* ==================== */
/* پس‌زمینه */
.bg-success {
    background-color: #10b981 !important;
}

.bg-primary {
    background-color: #3b82f6 !important;
}

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

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

.bg-secondary {
    background-color: #6b7280 !important;
}

/* متن */
.text-success {
    color: #10b981 !important;
}

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

.text-primary {
    color: #3b82f6 !important;
}

/* ==================== */
/* آواتار و نشانگر رنگ */
/* ==================== */
.color-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ==================== */
/* حاشیه‌ها */
/* ==================== */
.border-0 {
    border: 0 !important;
}

/* ==================== */
/* متن‌های کوچک */
/* ==================== */
.smaller {
    font-size: 11px;
}
/* ==================== */
/* استایل اسکرول بار زیبا */
/* ==================== */
.order-content-list::-webkit-scrollbar {
    width: 5px;
}

.order-content-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.order-content-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

    .order-content-list::-webkit-scrollbar-thumb:hover {
        background: #555;
    }


/* ==================== */
/* آواتار کوچکتر */
/* ==================== */

.h-40 {
    height: 40px !important;
}

.w-40 {
    width: 40px !important;
}

/* لیست با اسکرول */
.overflow-hidden {
    overflow: hidden !important;
}

/* استایل اسکرول بار */
.overflow-auto::-webkit-scrollbar {
    width: 4px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

/* رنگ‌های آواتار */
.bg-primary-100 {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-success-100 {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-warning-100 {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

.bg-danger-100 {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.bg-info-100 {
    background-color: rgba(6, 182, 212, 0.1) !important;
}

.bg-purple-100 {
    background-color: rgba(139, 92, 246, 0.1) !important;
}

.bg-primary-50 {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #1d4ed8 !important;
}

.bg-success-50 {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #047857 !important;
}

.bg-warning-50 {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #b45309 !important;
}

.bg-danger-50 {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c !important;
}

.bg-info-50 {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #0e7490 !important;
}

.bg-purple-50 {
    background-color: rgba(139, 92, 246, 0.15) !important;
    color: #6d28d9 !important;
}

/* hover effect */
.client-list-item {
    transition: all 0.2s ease;
}

    .client-list-item:hover {
        transform: translateX(2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

/* متن truncate */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
