/* ============================================
   UNIFIED DESIGN SYSTEM
   Stiluri unificate pentru toate paginile
   ============================================ */

/* Icon Sizes - Unified */
i.fas, i.fa {
    font-size: var(--icon-size-base);
}

h2 i, h3 i, h4 i, .card-header i {
    font-size: var(--icon-size-lg);
    color: var(--color-brand-500);
}

/* Button Sizes - Unified */
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.7rem 1.8rem;
    font-size: var(--font-size-lg);
}

/* Card Headers with Gradients - Unified */
.card-header[style*="gradient"] {
    color: white !important;
    border-bottom: none !important;
}

.card-header[style*="gradient"] i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Table Improvements - Unified */
.table thead th {
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: 0.05em;
    padding: var(--space-md);
}

.table tbody td {
    padding: var(--space-md);
    vertical-align: middle;
}

/* Badge/Status Chip - Unified */
.badge, .status-chip {
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.85rem;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-xs);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Section Headers - Unified */
.content-section h2 {
    font-size: 1.35rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
}

.content-section h2 i {
    font-size: var(--icon-size-lg);
    color: var(--color-brand-500);
}

/* Spacing Utilities - Unified */
.section-spacing {
    margin-bottom: var(--space-xl);
}

.card-spacing {
    margin-bottom: var(--space-lg);
}

/* Empty States - Unified */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--color-brand-400);
    opacity: 0.6;
}

/* Responsive Improvements */
@media (max-width: 991px) {
    .btn {
        padding: 0.5rem 1.2rem;
        font-size: var(--font-size-sm);
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .content-section h2 {
        font-size: 1.15rem;
    }
}

@media (max-width: 767px) {
    .card-body {
        padding: var(--space-md);
    }
    
    .btn-sm {
        padding: 0.35rem 0.85rem;
    }
}

/* ============================================
   PAYMENTS PAGE - Improved Design
   ============================================ */

/* Payment Statistics Cards - Redesigned */
.payment-stat-card {
    background: var(--surface-card);
    border: none;
    border-radius: var(--radius-md);
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    cursor: default;
}

.payment-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    transition: height var(--transition-base);
}

.payment-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-stat-card:hover::before {
    height: 4px;
}

.payment-stat-card-inner {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.payment-stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.payment-stat-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.payment-stat-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    opacity: 0.1;
    background: currentColor;
}

.payment-stat-icon {
    position: relative;
    z-index: 1;
}

.payment-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.payment-stat-value-wrapper {
    margin-bottom: 0;
}

.payment-stat-value {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.payment-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-xxs);
}

.payment-stat-trend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

/* Payment Stat Card Variants - Redesigned */
.payment-stat-primary::before {
    background: linear-gradient(135deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
}

.payment-stat-primary .payment-stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--color-brand-600);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.payment-stat-primary:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.payment-stat-success::before {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
}

.payment-stat-success .payment-stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: var(--color-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.payment-stat-success:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.payment-stat-warning::before {
    background: linear-gradient(135deg, var(--color-warning) 0%, #d97706 100%);
}

.payment-stat-warning .payment-stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--color-warning);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.payment-stat-warning:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.payment-stat-danger::before {
    background: linear-gradient(135deg, var(--color-danger) 0%, #dc2626 100%);
}

.payment-stat-danger .payment-stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--color-danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.payment-stat-danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.payment-stat-info::before {
    background: linear-gradient(135deg, var(--color-info) 0%, #0891b2 100%);
}

.payment-stat-info .payment-stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(8, 145, 178, 0.15) 100%);
    color: var(--color-info);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.payment-stat-info:hover {
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

/* Payment Progress Card */
.payment-progress-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.payment-progress {
    border-radius: var(--radius-pill);
    background: var(--surface-muted);
    overflow: hidden;
}

.payment-progress .progress-bar {
    font-weight: var(--font-weight-semibold);
    transition: width var(--transition-slow);
}

/* Project Info Card */
.project-info-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.project-info-card .info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
    padding: var(--space-sm) 0;
}

.project-info-card .info-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-info-card .info-value {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
}

/* Project Payment Card (List Item) */
.project-payment-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--surface-card);
}

.project-payment-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-brand-300);
}

.project-payment-card .project-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.project-payment-card .project-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: 1rem;
}

/* Payment Mini Stats */
.payment-mini-stat {
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    text-align: center;
    border: 1px solid var(--border-color);
}

.payment-mini-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xxs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.payment-mini-value {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    word-break: break-word;
}

.payment-mini-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.payment-mini-success .payment-mini-value {
    color: var(--color-success);
}

.payment-mini-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.payment-mini-warning .payment-mini-value {
    color: var(--color-warning);
}

.payment-mini-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.payment-mini-danger .payment-mini-value {
    color: var(--color-danger);
}

/* Responsive Payments - Redesigned */
@media (max-width: 991px) {
    .payment-stat-card {
        min-height: 95px;
    }
    
    .payment-stat-card-inner {
        padding: var(--space-xs);
    }
    
    .payment-stat-icon-wrapper {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .payment-stat-value {
        font-size: 1.2rem;
    }
    
    .payment-stat-header {
        margin-bottom: var(--space-xs);
    }
    
    .project-payment-card .col-md-2 {
        margin-top: var(--space-sm);
    }
}

@media (max-width: 767px) {
    .payment-stat-card {
        min-height: 85px;
    }
    
    .payment-stat-card-inner {
        padding: var(--space-xs);
    }
    
    .payment-stat-header {
        margin-bottom: var(--space-xxs);
    }
    
    .payment-stat-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .payment-stat-value {
        font-size: 1.1rem;
    }
    
    .payment-stat-label {
        font-size: 0.65rem;
    }
    
    .payment-mini-stat {
        padding: var(--space-xs);
    }
    
    .payment-mini-value {
        font-size: var(--font-size-xs);
    }
}

/* ============================================
   PAGINA DETALII PROIECT - DESIGN MODERN
   ============================================ */

/* Header proiect */
.project-details-header {
    padding: var(--space-lg);
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    margin-bottom: var(--space-xl);
}

.project-details-header h3 {
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-sm);
}

/* Info cards moderne - Compact */
.project-info-compact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md) var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.info-item-compact {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
}

.info-item-compact i {
    color: var(--color-brand-500);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.info-label-compact {
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.info-value-compact {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    word-break: break-word;
}

/* Progress bars moderne */
.progress-card-modern {
    padding: var(--space-md);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.progress-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.progress-percentage {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
}

.progress-bar-modern {
    height: 12px;
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width var(--transition-slow);
}

/* Secțiuni moderne */
.section-modern {
    margin-bottom: var(--space-xl);
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
}

.section-header-modern h5 {
    color: white;
    font-weight: var(--font-weight-semibold);
    margin: 0;
}

.section-header-modern i {
    color: rgba(255, 255, 255, 0.9);
}

.badge-modern {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

.section-content-modern {
    padding: var(--space-lg);
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-xs);
}

/* Tabel modern */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: var(--surface-muted);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-md);
    border-bottom: 2px solid var(--border-color);
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.table-modern tbody tr:hover {
    background: var(--surface-muted);
}

.table-modern tbody td {
    padding: var(--space-md);
    color: var(--text-primary);
}

.badge-stage {
    background: var(--color-brand-100);
    color: var(--color-brand-700);
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

/* Butoane acțiuni moderne */
.btn-group-modern {
    display: flex;
    gap: var(--space-xs);
}

.btn-action-modern {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: var(--font-size-sm);
}

.btn-action-modern.btn-view {
    background: var(--color-info-soft);
    color: var(--color-info);
}

.btn-action-modern.btn-view:hover {
    background: var(--color-info);
    color: white;
}

.btn-action-modern.btn-download {
    background: var(--color-brand-50);
    color: var(--color-brand-600);
}

.btn-action-modern.btn-download:hover {
    background: var(--color-brand-600);
    color: white;
}

.btn-action-modern.btn-danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.btn-action-modern.btn-danger:hover {
    background: var(--color-danger);
    color: white;
}

/* Carduri etape moderne */
.stage-card-modern {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-base);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.stage-card-modern:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stage-card-modern.stage-completed {
    border-left: 4px solid var(--color-success);
}

.stage-header-modern {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: nowrap !important;
}

.stage-title-section {
    flex: 1;
    min-width: 150px;
    overflow: hidden;
    flex-shrink: 1;
}

.stage-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-controls-compact {
    display: inline-flex !important;
    align-items: center !important;
    gap: var(--space-md) !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.stage-status-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: var(--space-xs) !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

.stage-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.stage-status-badge.badge-success {
    background: var(--color-success-soft) !important;
    color: var(--color-success) !important;
}

.stage-status-badge.badge-pending {
    background: var(--color-warning-soft) !important;
    color: var(--color-warning) !important;
}

.stage-signatures-compact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.signature-check-compact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer;
    padding: 2px 6px !important;
    border-radius: 6px !important;
    transition: var(--transition-fast);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.signature-check-compact:hover {
    background: var(--surface-strong);
}

.signature-label-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--space-xxs);
}

.signature-label-text i {
    font-size: 0.85rem;
}

.stage-actions-top {
    display: flex;
    gap: var(--space-xs);
}

.btn-action-small {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.75rem !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.btn-action-small.btn-success {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.btn-action-small.btn-success:hover {
    background: var(--color-success);
    color: white;
}

.btn-action-small.btn-warning {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.btn-action-small.btn-warning:hover {
    background: var(--color-warning);
    color: white;
}

.form-check-input-modern {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--color-brand-500);
    margin: 0;
    flex-shrink: 0;
}

/* Body etapă */
.stage-body-modern {
    padding: var(--space-lg);
}

.stage-inputs-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.input-group-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-label-modern {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-modern,
.textarea-modern {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--surface-card);
    transition: var(--transition-base);
    font-family: var(--font-family-base);
}

.input-modern:focus,
.textarea-modern:focus {
    outline: none;
    border-color: var(--color-brand-500);
    box-shadow: 0 0 0 3px var(--color-brand-50);
}

.textarea-modern {
    resize: vertical;
    min-height: 80px;
}

/* Secțiuni în etapă */
.stage-section-modern {
    margin-bottom: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.section-subtitle-modern {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
}

/* Documente și fișiere */
.documents-list-modern,
.files-list-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.document-item-modern,
.file-item-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.document-item-modern:hover,
.file-item-modern:hover {
    background: var(--surface-strong);
    box-shadow: var(--shadow-xs);
}

.document-info,
.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.badge-document {
    background: var(--color-info-soft);
    color: var(--color-info);
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.document-name,
.file-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    word-break: break-word;
}

.document-amount {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-left: auto;
    white-space: nowrap;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
    min-width: 0;
    flex: 1;
}

.file-size {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.file-actions {
    display: flex;
    gap: var(--space-xs);
    margin-left: var(--space-md);
}

.empty-state-modern {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* Upload section */
.upload-section-modern {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.upload-form-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.upload-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-sm);
    align-items: end;
}

.upload-row:first-child {
    grid-template-columns: 2fr 1fr;
}

.input-file-modern {
    padding: var(--space-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    background: var(--surface-card);
    color: var(--text-primary);
    cursor: pointer;
}

.btn-upload-modern {
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-upload-modern:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.upload-hint {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
}

/* Responsive */
@media (max-width: 991px) {
    .stage-inputs-modern {
        grid-template-columns: 1fr;
    }
    
    .upload-row {
        grid-template-columns: 1fr;
    }
    
    .upload-row:first-child {
        grid-template-columns: 1fr;
    }
    
    .project-info-compact {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .stage-header-modern {
        flex-wrap: wrap !important;
    }
    
    .stage-controls-compact {
        width: 100%;
        justify-content: flex-start;
        margin-top: var(--space-xs);
    }
}

@media (max-width: 767px) {
    .project-details-header {
        padding: var(--space-md);
    }
    
    .stage-header-modern {
        flex-direction: column;
    }
    
    .file-item-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .file-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

/* Modal Detalii Proiect – wrapper: flex pentru scroll în body, înălțime limitată */
#projectDetailsModal .project-details-dialog,
.project-details-modal {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 1rem);
    background: var(--surface-app);
}

.project-details-modal-header {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-brand-500) 0%, var(--color-brand-600) 100%);
    color: white;
    border-bottom: none;
    padding: var(--space-lg);
}

.project-details-modal-header .modal-title {
    color: white;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

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

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

.project-details-modal-body {
    padding: var(--space-xl);
    background: var(--surface-app);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar personalizat pentru modal */
.project-details-modal-body::-webkit-scrollbar {
    width: 8px;
}

.project-details-modal-body::-webkit-scrollbar-track {
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
}

.project-details-modal-body::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-sm);
}

.project-details-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

.project-details-modal-footer {
    background: var(--surface-card);
    border-top: 1px solid var(--border-color);
    padding: var(--space-md) var(--space-lg);
}

/* Desktop: fără spațiu alb / bandă întunecată la baza modalului, scroll în body */
@media (min-width: 992px) {
    #projectDetailsModal .project-details-modal-body {
        padding-bottom: var(--space-xl);
    }
    #projectDetailsModal .project-details-dialog {
        border-radius: var(--radius-lg);
        max-height: 100vh;
    }
}

/* Modal Detalii Proiect deschis: fără scroll dublu, doar body-ul scrollează */
#projectDetailsModal.show {
    overflow: hidden;
}
#projectDetailsModal .project-details-dialog {
    pointer-events: auto;
}

/* Hover shadow effect pentru documente și fișiere */
.hover-shadow {
    transition: all 0.2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--color-brand-300) !important;
}

/* Optimizări pentru carduri de etape */
.stage-card-optimized {
    transition: all 0.3s ease;
}

.stage-card-optimized:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Spacing optimizat pentru secțiuni */
.section-spacing-optimized {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .section-spacing-optimized {
        margin-bottom: 1rem;
    }
}
