*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background-color:#f5f5f5;color:#333;line-height:1.6}.app{min-height:100vh}.header{background:linear-gradient(135deg,#1a1a2e,#16213e);color:#fff;padding:1rem 2rem;box-shadow:0 2px 10px #0000001a}.header h1{font-size:1.5rem;font-weight:600}.header .subtitle{font-size:.875rem;opacity:.8;margin-top:.25rem}.main{max-width:1200px;margin:0 auto;padding:2rem}.stepper{display:flex;justify-content:space-between;margin-bottom:2rem;padding:1rem;background:#fff;border-radius:12px;box-shadow:0 2px 8px #0000000d}.step{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-radius:8px;transition:all .3s ease}.step.active{background:#e3f2fd}.step.completed{background:#e8f5e9}.step-number{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:.875rem;background:#e0e0e0;color:#666}.step.active .step-number{background:#1976d2;color:#fff}.step.completed .step-number{background:#4caf50;color:#fff}.step-title{font-weight:500;font-size:.875rem}.card{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 2px 8px #0000000d;margin-bottom:1.5rem}.card-title{font-size:1.125rem;font-weight:600;margin-bottom:1rem;color:#1a1a2e}.file-upload{border:2px dashed #ddd;border-radius:8px;padding:2rem;text-align:center;cursor:pointer;transition:all .3s ease}.file-upload:hover{border-color:#1976d2;background:#f5f9ff}.file-upload.has-file{border-color:#4caf50;background:#f5fff5}.file-upload input{display:none}.file-upload-icon{font-size:2.5rem;margin-bottom:.5rem}.file-upload-text{color:#666;font-size:.875rem}.file-info{margin-top:1rem;padding:.75rem;background:#f5f5f5;border-radius:6px;font-size:.875rem}.btn{padding:.75rem 1.5rem;border:none;border-radius:8px;font-weight:500;font-size:.875rem;cursor:pointer;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.btn-primary{background:#1976d2;color:#fff}.btn-primary:hover:not(:disabled){background:#1565c0}.btn-success{background:#4caf50;color:#fff}.btn-success:hover:not(:disabled){background:#43a047}.btn-warning{background:#ff9800;color:#fff}.btn-warning:hover:not(:disabled){background:#f57c00}.btn-danger{background:#f44336;color:#fff}.btn-group{display:flex;gap:1rem;margin-top:1.5rem}.validation-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem;margin-bottom:1.5rem}.summary-item{padding:1rem;border-radius:8px;text-align:center}.summary-item.errors{background:#ffebee;color:#c62828}.summary-item.warnings{background:#fff3e0;color:#e65100}.summary-item.success{background:#e8f5e9;color:#2e7d32}.summary-item.info{background:#e3f2fd;color:#1565c0}.summary-value{font-size:1.5rem;font-weight:700}.summary-label{font-size:.75rem;margin-top:.25rem}.error-list{max-height:300px;overflow-y:auto}.error-item{padding:.75rem;border-radius:6px;margin-bottom:.5rem;font-size:.875rem}.error-item.error{background:#ffebee;border-left:3px solid #f44336}.error-item.warning{background:#fff3e0;border-left:3px solid #ff9800}.error-item.info{background:#e3f2fd;border-left:3px solid #2196f3}.error-meta{font-size:.75rem;color:#666;margin-top:.25rem}.progress-container{margin-bottom:1.5rem}.progress-bar{height:8px;background:#e0e0e0;border-radius:4px;overflow:hidden}.progress-fill{height:100%;background:linear-gradient(90deg,#1976d2,#42a5f5);transition:width .3s ease}.progress-fill.completed{background:linear-gradient(90deg,#4caf50,#81c784)}.progress-fill.failed{background:linear-gradient(90deg,#f44336,#e57373)}.progress-text{display:flex;justify-content:space-between;margin-top:.5rem;font-size:.875rem;color:#666}.steps-list{max-height:400px;overflow-y:auto}.step-item{display:flex;align-items:center;gap:1rem;padding:.75rem;border-radius:6px;margin-bottom:.5rem;background:#f5f5f5}.step-item.success{background:#e8f5e9}.step-item.failed{background:#ffebee}.step-item.processing{background:#e3f2fd}.step-status{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.75rem}.step-status.pending{background:#e0e0e0}.step-status.success{background:#4caf50;color:#fff}.step-status.failed{background:#f44336;color:#fff}.step-status.processing{background:#1976d2;color:#fff;animation:pulse 1s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.step-info{flex:1}.step-type{font-weight:500;font-size:.875rem}.step-entity{font-size:.75rem;color:#666}.table-container{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:.875rem}th,td{padding:.75rem;text-align:left;border-bottom:1px solid #eee}th{background:#f5f5f5;font-weight:600}tr:hover{background:#f9f9f9}.status-badge{display:inline-block;padding:.25rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500}.status-badge.pending{background:#e0e0e0;color:#666}.status-badge.processing{background:#e3f2fd;color:#1565c0}.status-badge.completed{background:#e8f5e9;color:#2e7d32}.status-badge.failed{background:#ffebee;color:#c62828}.config-info{display:flex;gap:2rem;padding:1rem;background:#f5f5f5;border-radius:8px;font-size:.875rem}.config-item{display:flex;gap:.5rem}.config-label{color:#666}.config-value{font-weight:500}.config-value.test{color:#ff9800}.config-value.production{color:#4caf50}.loading{display:flex;align-items:center;justify-content:center;padding:2rem}.spinner{width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#1976d2;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 768px){.stepper{flex-direction:column;gap:.5rem}.main{padding:1rem}.btn-group{flex-direction:column}.config-info{flex-direction:column;gap:.5rem}}.module-tabs{display:flex;gap:0;background:#fff;padding:0;margin:0 auto;max-width:1200px;border-bottom:2px solid #e9ecef}.module-tab{flex:1;padding:16px 24px;border:none;background:transparent;font-size:15px;font-weight:500;color:#6c757d;cursor:pointer;transition:all .3s ease;border-bottom:3px solid transparent;margin-bottom:-2px}.module-tab:hover{background:#f8f9fa;color:#333}.module-tab.active{color:#007bff;border-bottom-color:#007bff;background:#f8f9fa}.success-card{background:#d4edda!important;border-left:4px solid #28a745!important;text-align:center}.success-card h2{color:#155724}.b2b-contracts,.b2b-invoices{padding:20px;max-width:1400px;margin:0 auto}.b2b-contracts h2,.b2b-invoices h2{color:#333;margin-bottom:24px;font-size:24px}.steps-progress{display:flex;justify-content:space-between;margin-bottom:32px;padding:16px;background:#f8f9fa;border-radius:8px}.step{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:4px;transition:all .3s ease}.step.completed{background:#d4edda;color:#155724}.step.active{background:#cce5ff;color:#004085;font-weight:600}.step-number{width:24px;height:24px;border-radius:50%;background:#6c757d;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px}.step.completed .step-number{background:#28a745}.step.active .step-number{background:#007bff}.step-title{font-size:13px}.upload-section{display:flex;flex-direction:column;align-items:center;gap:16px;padding:40px;border:2px dashed #dee2e6;border-radius:8px;background:#f8f9fa;margin-bottom:24px}.upload-section input[type=file]{display:none}.file-label{padding:12px 24px;background:#e9ecef;border-radius:4px;cursor:pointer;transition:background .3s ease}.file-label:hover{background:#dee2e6}.action-section{display:flex;justify-content:center;margin-bottom:24px}.btn{padding:12px 24px;border:none;border-radius:4px;font-size:14px;font-weight:600;cursor:pointer;transition:all .3s ease}.btn:disabled{opacity:.6;cursor:not-allowed}.btn.primary{background:#007bff;color:#fff}.btn.primary:hover:not(:disabled){background:#0056b3}.btn.success{background:#28a745;color:#fff}.btn.success:hover:not(:disabled){background:#1e7e34}.message{padding:12px 16px;border-radius:4px;margin-bottom:16px}.message.info{background:#d1ecf1;color:#0c5460;border:1px solid #bee5eb}.message.error{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.result-section{text-align:center;padding:24px;background:#d4edda;border-radius:8px;margin-bottom:24px}.success-message{font-size:18px;color:#155724;margin-bottom:16px}.summary-section{background:#fff;border:1px solid #dee2e6;border-radius:8px;padding:20px;margin-bottom:24px}.summary-section h3{margin-bottom:16px;color:#333}.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}.summary-item{display:flex;flex-direction:column;padding:12px;background:#f8f9fa;border-radius:4px}.summary-item.wide{grid-column:span 2}.summary-item .label{font-size:12px;color:#6c757d;margin-bottom:4px}.summary-item .value{font-size:20px;font-weight:600;color:#333}.summary-item .value.success{color:#28a745}.summary-item .value.error{color:#dc3545}.data-table{width:100%;border-collapse:collapse;font-size:13px}.data-table th,.data-table td{padding:10px 12px;text-align:left;border-bottom:1px solid #dee2e6}.data-table th{background:#f8f9fa;font-weight:600;color:#495057}.data-table tr:hover{background:#f8f9fa}.data-table .row-error{background:#fff5f5}.data-table .row-error:hover{background:#fee}.status-pending{color:#6c757d}.status-validated{color:#28a745}.status-registered{color:#007bff}.status-error{color:#dc3545}.error-tooltip{cursor:help;margin-left:4px}.organizations-section,.contracts-section,.invoices-section{background:#fff;border:1px solid #dee2e6;border-radius:8px;padding:20px;margin-bottom:24px;overflow-x:auto}.organizations-section h3,.contracts-section h3,.invoices-section h3{margin-bottom:16px;color:#333}.more-info{text-align:center;color:#6c757d;font-style:italic;margin-top:12px}.invoices-list{display:flex;flex-direction:column;gap:12px}.invoice-card{border:1px solid #dee2e6;border-radius:8px;overflow:hidden}.invoice-card.error{border-color:#f5c6cb;background:#fff5f5}.invoice-header{display:flex;justify-content:space-between;align-items:center;padding:16px;background:#f8f9fa;cursor:pointer;transition:background .3s ease}.invoice-header:hover{background:#e9ecef}.invoice-info{display:flex;gap:24px;align-items:center}.invoice-number{font-weight:600;color:#333}.invoice-date{color:#6c757d}.invoice-amount{font-weight:600;color:#28a745}.invoice-status{padding:4px 8px;border-radius:4px;font-size:12px;font-weight:600}.invoice-status.status-pending{background:#e9ecef}.invoice-status.status-validated{background:#d4edda;color:#155724}.invoice-status.status-registered{background:#cce5ff;color:#004085}.invoice-status.status-error{background:#f8d7da;color:#721c24}.expand-icon{color:#6c757d;font-size:12px}.invoice-details{padding:16px;border-top:1px solid #dee2e6}.invoice-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;margin-bottom:16px}.invoice-meta p{margin:0;font-size:13px}.validation-errors{background:#f8d7da;padding:12px;border-radius:4px;margin-bottom:16px}.validation-errors ul{margin:8px 0 0 20px;padding:0}.validation-errors li{font-size:13px;color:#721c24}.allocations{margin-top:16px}.allocations h4{margin-bottom:12px;color:#495057}.allocation-table{width:100%;border-collapse:collapse;font-size:12px}.allocation-table th,.allocation-table td{padding:8px;text-align:left;border:1px solid #dee2e6}.allocation-table th{background:#f8f9fa}@media (max-width: 768px){.steps-progress{flex-direction:column;gap:8px}.step{width:100%}.invoice-info{flex-direction:column;align-items:flex-start;gap:8px}.summary-grid{grid-template-columns:1fr}.summary-item.wide{grid-column:span 1}}.error-details{text-align:left}.error-item{color:#dc3545;font-size:.85em;padding:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:300px}.status-ok{color:#28a745;font-weight:500}.data-table td{vertical-align:top}
