/* ========================================
   Estilos para Formulario de Registro
   - Layout compacto con grid
   - 4 columnas en desktop
   - Labels alineados a la izquierda
   ======================================== */

/* ========================================
   1. CONTENEDOR PRINCIPAL
   ======================================== */

#formContent.registro-container {
    max-width: 950px !important;
    width: 95%;
}

#formContent.registro-container .card-body {
    padding: 1.5rem 2rem;
}

.card-title-sign {
    padding: 0px !important;
}

.btn-close {
border: 0 !important;
border-radius: 0 !important;
left: auto !important;
    padding: 1px 1px 1px 1px !important;
}
/* ========================================
   2. TÍTULOS DE SECCIÓN
   ======================================== */

.section-title {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   3. SISTEMA DE GRID - FILAS DE CAMPOS
   ======================================== */

/* Fila de 4 columnas */
.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Fila de 2 columnas */
.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Fila de 3 columnas */
.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Campo individual */
.form-field {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-field:last-child {
    margin-bottom: 0;
}

/* ========================================
   4. LABELS E INPUTS
   ======================================== */

.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    text-align: left;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-field input::placeholder {
    color: #9ca3af;
}

/* Hint debajo del campo */
.field-hint {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ========================================
   5. INPUT CON ICONO (PASSWORD)
   ======================================== */

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 2.5rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #374151;
}

/* ========================================
   6. FILE UPLOAD
   ======================================== */

.file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #fafafa;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-content i {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.file-upload-content p {
    margin: 0.5rem 0 0.25rem;
    color: #374151;
    font-size: 0.9rem;
}

.file-name {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    color: #166534;
    font-size: 0.85rem;
}

.file-name:empty {
    display: none;
}

/* ========================================
   7. CHECKBOX PERSONALIZADO
   ======================================== */

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #3b82f6;
    flex-shrink: 0;
}

.custom-checkbox label {
    cursor: pointer;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
}

/* ========================================
   8. ALERTA INFORMATIVA
   ======================================== */

.info-alert {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    margin-top: 1rem;
}

.info-alert i {
    font-size: 1.25rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.info-alert strong {
    display: block;
    color: #1e40af;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.info-alert p {
    margin: 0;
    font-size: 0.8rem;
    color: #1e40af;
    line-height: 1.4;
}

/* ========================================
   9. SISTEMA DE PASOS
   ======================================== */

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding: 0 2rem;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    transition: all 0.3s ease;
    border: 3px solid #e2e8f0;
}

.step-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.step.active .step-number {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.step.active .step-label {
    color: #1e40af;
    font-weight: 700;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.step.completed .step-label {
    color: #059669;
}

/* ========================================
   10. SLIDES DEL FORMULARIO
   ======================================== */

.form-slides {
    position: relative;
    min-height: 200px;
}

.form-slide {
    display: none;
    animation: slideIn 0.35s ease-out;
}

.form-slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   11. BOTONES DE NAVEGACIÓN
   ======================================== */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    gap: 1rem;
}

.btn-nav {
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-prev {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-prev:hover {
    background: #e2e8f0;
}

.btn-next, .btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-next:hover, .btn-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.link-volver {
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.link-volver:hover {
    color: #1e40af;
}

/* ========================================
   12. VALIDACIÓN DE CAMPOS
   ======================================== */

.form-field input.is-valid,
.form-field select.is-valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 2.25rem;
}

.form-field input.is-invalid,
.form-field select.is-invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%23ef4444'/%3e%3cpath stroke='%23ef4444' stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 2.25rem;
}

/* ========================================
   13. NOTIFICACIONES
   ======================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   14. RESPONSIVE - TABLETS (768px - 950px)
   ======================================== */

@media (max-width: 950px) {
    #formContent.registro-container {
        max-width: 750px !important;
    }
    
    /* 4 columnas pasan a 2 */
    .form-row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   15. RESPONSIVE - TABLETS PEQUEÑAS (640px - 768px)
   ======================================== */

@media (max-width: 768px) {
    #formContent.registro-container {
        max-width: 100% !important;
        width: 100%;
    }
    
    #formContent.registro-container .card-body {
        padding: 1.25rem 1.5rem;
    }
    
    .steps-container {
        padding: 0 1rem;
    }
}

/* ========================================
   16. RESPONSIVE - MÓVILES (<640px)
   ======================================== */

@media (max-width: 640px) {
    #formContent.registro-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    #formContent.registro-container .card-body {
        padding: 1rem 1.25rem;
    }
    
    /* Todo en una columna */
    .form-row-4,
    .form-row-3,
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .form-field input,
    .form-field select {
        height: 46px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    /* Pasos compactos */
    .steps-container {
        padding: 0;
        margin-bottom: 1.25rem;
    }
    
    .step-number {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .steps-container::before {
        left: 8%;
        right: 8%;
    }
    
    /* Navegación en stack */
    .form-navigation {
        flex-wrap: wrap;
    }
    
    .btn-nav {
        flex: 1;
        justify-content: center;
        min-width: 130px;
    }
    
    .link-volver {
        order: -1;
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ========================================
   17. PASSWORD STRENGTH (existente)
   ======================================== */

.password-strength {
    display: none;
    margin-top: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.password-strength.show {
    display: block;
}

.password-strength.weak {
    background: #fef2f2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

.password-strength.medium {
    background: #fffbeb;
    color: #d97706;
    border-left: 3px solid #d97706;
}

.password-strength.strong {
    background: #ecfdf5;
    color: #059669;
    border-left: 3px solid #059669;
}

.password-match {
    display: none;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.password-match.show {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.password-match.match {
    color: #059669;
}

.password-match.no-match {
    color: #dc2626;
}

/* ========================================
   18. UTILIDADES
   ======================================== */

.text-red-500 { color: #ef4444; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.underline { text-decoration: underline; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.me-2 { margin-right: 0.5rem !important; }
.d-none { display: none !important; }
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }

/* ========================================
   19. ANIMACIONES
   ======================================== */

.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}