:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #4cc9f0;
    --secondary-hover: #32b8df;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.drop-area:hover, .drop-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.drop-area .fa-file-pdf {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.template-area .fa-file-excel {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.drop-message p {
    margin: 1rem 0;
    color: var(--text-light);
}

.file-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 8px;
}

.file-info .fa-file-pdf, .file-info .fa-file-excel {
    margin-right: 1rem;
}

.file-details {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.file-size {
    color: var(--text-light);
    font-size: 0.9rem;
}

.template-section {
    margin-top: 2rem;
}

.template-section h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.template-area {
    padding: 1.5rem;
}

.action-section {
    margin-top: 2rem;
    text-align: center;
}

/* Processing Section */
.processing-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.loading-spinner {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.progress-bar-container {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.processing-step {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    text-align: left;
    padding: 0.5rem;
    border-radius: 5px;
}

.processing-step .step-icon {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.processing-step .fa-check-circle {
    color: var(--success-color);
}

.processing-step .fa-circle {
    color: var(--text-light);
}

/* Result Section */
.result-section, .error-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon {
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.error-icon {
    color: var(--error-color);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-convert, .btn-download {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-convert {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-convert:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-convert:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-download {
    background-color: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.btn-download:hover {
    background-color: #27ae60;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
}

.btn-icon:hover {
    color: var(--error-color);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-light);
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

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

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
}

.modal h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.input-group {
    margin: 1.5rem 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.modal-buttons {
    margin-top: 1.5rem;
    text-align: right;
}

.modal-info {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-section, .processing-section, .result-section, .error-section {
        padding: 1.5rem;
    }
    
    .drop-area {
        padding: 1.5rem;
    }
    
    .btn-convert, .btn-download {
        width: 100%;
    }
}

/* Stile per la sezione informativa */
.info-section {
    margin-top: 2rem;
}

.info-box {
    background-color: #e8f4f8;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-box h3 i {
    margin-right: 0.5rem;
}

.fields-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    list-style-type: none;
    padding: 0;
    margin-top: 1rem;
}

.fields-list li {
    background-color: rgba(67, 97, 238, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
} 