/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Main */
main {
    flex: 1;
}

/* Steps */
.step {
    margin-bottom: 25px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step h2 {
    font-size: 1.1rem;
    color: #1e3a5f;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 4px solid #2d5a87;
    font-weight: 600;
}

/* Cards */
.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Formularios */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

select, input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

select:focus, input:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

select:hover, input:hover {
    border-color: #c5cdd8;
}

/* Botones */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2d5a87 0%, #1e3a5f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Info empresa */
.empresa-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2d5a87;
}

.empresa-info p {
    margin: 0;
    color: #555;
}

/* Progreso */
#progress-container {
    margin-top: 25px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d5a87 0%, #4a90c2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-message {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-top: 12px;
    font-size: 0.95rem;
}

/* Resultados */
#result-container {
    margin-top: 25px;
}

.result {
    padding: 20px;
    border-radius: 8px;
}

.result h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

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

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

.result code {
    background: rgba(0, 0, 0, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.result-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.result-details p {
    margin: 5px 0;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #2d5a87;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .card {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .btn-primary {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Animaciones */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.generating .progress-message {
    animation: pulse 1.5s infinite;
}
