/* INCON Zahlungsdaten Portal - Hauptstyles */

/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo img {
    height: 50px;
    width: auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-info span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.upload-section p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #007bff;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 2rem 0;
}

.upload-zone:hover {
    border-color: #0056b3;
    background: #e3f2fd;
}

.upload-zone.dragover {
    border-color: #28a745;
    background: #d4edda;
}

.upload-zone.has-files {
    border-color: #28a745;
    background: #d4edda;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-zone h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.upload-zone p {
    color: #666;
    margin: 0;
}

/* File List */
.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
}

.file-info div {
    display: flex;
    flex-direction: column;
}

.file-info strong {
    color: #333;
    font-size: 1rem;
}

.file-info div div:last-child {
    color: #666;
    font-size: 0.9rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #007bff;
}

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

/* Upload Actions */
.upload-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.process-icon {
    margin-right: 0.5rem;
}

/* Progress Container */
.progress-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.progress-container h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.log-container {
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #dee2e6;
}

.log-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
}

.log-entry:last-child {
    border-bottom: none;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-section h2 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.results-info p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Match Results */
.match-results {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid #007bff;
}

.match-results h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.match-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.match-rate {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Failed Tickets */
.failed-tickets {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.failed-tickets h4 {
    color: #721c24;
    margin-bottom: 0.5rem;
}

.failed-tickets ul {
    margin: 0;
    padding-left: 1.2rem;
}

.failed-tickets li {
    color: #721c24;
    margin-bottom: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #666;
}

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

.info-section li strong {
    color: #333;
}

/* Footer */
.footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    margin: 0 1rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #007bff;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

/* Results Container */
.results-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #007bff;
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-card.success .stat-number {
    color: #28a745;
}

.stat-card.warning .stat-number {
    color: #ffc107;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.download-icon, .new-icon {
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .match-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .step-indicator {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .upload-section, .results-section, .info-section {
        padding: 1rem;
    }
    
    .upload-zone {
        padding: 1.5rem 0.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-info {
        width: 100%;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-section, .results-section, .info-section {
    animation: fadeIn 0.5s ease-out;
}

/* Hover-Effekte */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Focus States */
.btn:focus, .form-group input:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.modal-body input, .modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-body input:focus, .modal-body textarea:focus {
    outline: none;
    border-color: #007bff;
}

.modal-body textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    margin: 0;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.results-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.email-icon {
    margin-right: 0.5rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
