:root {
    --primary-color: #4361ee;
    --primary-dark: #3651d4;
    --success-color: #13a65d;
    --success-light: #e8f5e9;
    --error-color: #dc2626;
    --error-light: #fef2f2;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--gray-900);
    line-height: 1.6;
    padding: var(--spacing-lg);
}

.header {
    background: linear-gradient(135deg, #4361ee 0%, #764ba2 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.logo { max-width: 220px; height: auto; display: inline-block; }

.container {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
}

.header-section { text-align: center; margin-bottom: var(--spacing-xl); }

.title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.mensaje-alerta {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

.mensaje-alerta.ok {
    background: var(--success-light);
    color: #1b5e20;
    border-color: var(--success-color);
}

.mensaje-alerta.error {
    background: var(--error-light);
    color: #991b1b;
    border-color: var(--error-color);
}

.mensaje-alerta.warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: var(--warning-color);
}

.mensaje-alerta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.upload-section { margin-bottom: var(--spacing-xl); }


.politicas-texto {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.politicas-link {
    color: #00d4ff;
    font-weight: 600;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.politicas-link:hover {
    color: #00b8e6;
}
.file-input-wrapper { position: relative; }

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: var(--spacing-xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    cursor: pointer;
    transition: all var(--transition-base);
    gap: var(--spacing-md);
}

.file-label:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    transition: transform var(--transition-base);
}

.file-label:hover .upload-icon { transform: translateY(-4px); }

.file-label-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

.file-label-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.archivo-seleccionado {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: white;
    border: 2px solid var(--success-color);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-md);
    animation: slideIn 0.3s ease-out;
}

.file-icon {
    width: 24px;
    height: 24px;
    color: var(--success-color);
    flex-shrink: 0;
}

.nombre-archivo {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--gray-700);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-eliminar-archivo {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-eliminar-archivo:hover { background: var(--error-light); }

.btn-eliminar-archivo svg {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.btn-eliminar-archivo:hover svg { color: var(--error-color); }

.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(67, 97, 238, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.datos-container {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 2px solid var(--success-color);
}

.datos-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.check-icon {
    width: 32px;
    height: 32px;
    color: var(--success-color);
    flex-shrink: 0;
}

.datos-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-xs);
}

.datos-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.tabla-datos {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tabla-datos tr {
    border-bottom: 1px solid var(--gray-200);
}

.tabla-datos tr:last-child { border-bottom: none; }

.tabla-datos td {
    padding: 1rem;
    font-size: 0.9375rem;
}

.tabla-datos td.label {
    width: 40%;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
}

.tabla-datos td:not(.label) {
    color: var(--gray-900);
}

.btn-confirm {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--success-color) 0%, #0f8a4c 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(19, 166, 93, 0.4);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.footer p {
    color: white;
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    html { font-size: 17px; }
    body { padding: var(--spacing-md); }
    .logo { max-width: 180px; }
    .container { padding: var(--spacing-xl); max-width: 100%; }
    .title { font-size: 1.5rem; }
    .subtitle { font-size: 0.9375rem; }
}

@media (max-width: 480px) {
    html { font-size: 17px; }
    body { padding: var(--spacing-sm); }
    .header { padding: var(--spacing-lg) 0; margin-bottom: var(--spacing-lg); }
    .logo { max-width: 160px; }
    .container { padding: var(--spacing-lg); }
    .title { font-size: 1.375rem; }
    .file-label { min-height: 160px; padding: var(--spacing-lg); }
    .upload-icon { width: 40px; height: 40px; }
    
    .datos-container { padding: var(--spacing-lg); }
    .datos-header { gap: var(--spacing-sm); }
    .check-icon { width: 26px; height: 26px; }
    .datos-title { font-size: 1.125rem; }
    .datos-subtitle { font-size: 0.875rem; }
    
    .tabla-datos tr {
        display: flex;
        flex-direction: column;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--gray-200);
    }
    
    .tabla-datos td {
        display: block;
        width: 100%;
        padding: 0.375rem 0;
    }
    
    .tabla-datos td.label {
        width: 100%;
        padding-bottom: 0.25rem;
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        background: transparent;
    }
    
    .tabla-datos td:not(.label) {
        font-size: 1rem;
        font-weight: 500;
        padding-bottom: 0.625rem;
    }
    
    .archivo-seleccionado {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .file-icon { width: 20px; height: 20px; }
    .nombre-archivo { font-size: 0.875rem; }
    .btn-eliminar-archivo { width: 28px; height: 28px; }
    .mensaje-alerta { padding: var(--spacing-md); font-size: 0.875rem; }
    .politicas-texto { font-size: 0.75rem; margin-top: var(--spacing-sm); }
}
/* Modal de confirmación exitosa */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon-success {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, var(--success-color) 0%, #0f8a4c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease 0.2s backwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-icon-success svg {
    width: 50px;
    height: 50px;
    stroke: white;
    stroke-width: 3;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

.modal-message {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.modal-btn {
    width: 100%;
    max-width: 300px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--success-color) 0%, #0f8a4c 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(19, 166, 93, 0.4);
}

@media (max-width: 480px) {
    .modal-content {
        padding: var(--spacing-xl);
    }
    
    .modal-icon-success {
        width: 70px;
        height: 70px;
    }
    
    .modal-icon-success svg {
        width: 40px;
        height: 40px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-message {
        font-size: 1rem;
    }
    
    .modal-btn {
        font-size: 1rem;
    }
}