.wizard-container {
    position: relative;
}

/* Stepper Progress Bar */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0 3rem 0;
    position: relative;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    z-index: 0;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    flex: 1;
    z-index: 1;
}

.step-counter {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.stepper-item.active .step-counter {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.stepper-item.completed .step-counter {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.stepper-item.completed .step-counter::after {
    content: '✓';
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
}

.stepper-item.completed .step-counter i {
    display: none;
}

.step-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s ease;
}

.stepper-item.active .step-name {
    color: var(--color-primary);
    font-weight: 700;
}

.stepper-item.completed .step-name {
    color: var(--color-success);
}

/* Contenido de los pasos */
.step-content {
    display: none;
    animation: fadeInStep 0.4s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Header de cada paso */
.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(7, 50, 96, 0.05) 0%, rgba(64, 138, 217, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
}

.step-header i {
    font-size: 2.5rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.step-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Botones de navegación del wizard */
.wizard-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-secondary-modern {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary-modern:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Card de resumen */
/* ========================================
   ESTILOS PARA RESUMEN MEJORADO
   ======================================== */

/* Secciones del resumen con mejor diseño */
.resumen-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.resumen-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.resumen-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resumen-section h4 i {
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* Contenedor de datos dentro del resumen */
.resumen-data {
    font-size: 0.95rem;
}

.resumen-data p {
    margin: 0.75rem 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.resumen-data p strong {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.resumen-data p strong i {
    font-size: 0.9rem;
}

/* Badge para indicar nuevo registro */
.badge-nuevo {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-existente {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animación de entrada para el resumen */
@keyframes slideInResumen {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resumen-card {
    animation: slideInResumen 0.5s ease;
}

/* Separadores visuales en el resumen */
.resumen-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: 1rem 0;
}

/* Responsive para resumen */
@media (max-width: 768px) {
    .resumen-section h4 {
        font-size: 1rem;
    }

    .resumen-data p {
        flex-direction: column;
        gap: 0.25rem;
    }

    .resumen-data p strong {
        min-width: auto;
    }
}

/* Tarjeta informativa */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin: 1.5rem 0;
    animation: fadeIn 0.3s ease;
}

.info-card i {
    font-size: 1.5rem;
    color: var(--color-info);
    flex-shrink: 0;
}

.info-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Campo requerido */
.required {
    color: var(--color-danger);
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Full width para campos especiales */
.form-group-modern.full-width {
    grid-column: 1 / -1;
}

/* Animación de pulso para paso activo */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.stepper-item.active .step-counter {
    animation: pulse 2s infinite;
}

/* ========================================
   RESPONSIVE - COMPREHENSIVE
   ======================================== */

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .stepper-wrapper {
        margin: 1.5rem 0 2.5rem 0;
    }

    .step-counter {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }

    .step-name {
        font-size: 0.8rem;
    }

    .step-header {
        padding: 1.25rem;
    }

    .step-header i {
        font-size: 2.25rem;
    }

    .step-header h3 {
        font-size: 1.375rem;
    }

    .wizard-buttons {
        gap: 0.875rem;
    }

    .resumen-section {
        padding: 1.25rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {

    /* Wizard container */
    .wizard-container {
        padding: 0;
    }

    /* Stepper responsive */
    .stepper-wrapper {
        flex-wrap: wrap;
        gap: 1.5rem;
        margin: 1.5rem 0 2rem 0;
        justify-content: center;
    }

    .stepper-wrapper::before {
        display: none;
    }

    .stepper-item {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: 120px;
    }

    .step-counter {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }

    .step-name {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.3;
    }

    /* Step header */
    .step-header {
        padding: 1.25rem 1rem;
        margin-bottom: 1.5rem;
    }

    .step-header i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .step-header h3 {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }

    .step-header p {
        font-size: 0.875rem;
    }

    /* Wizard buttons */
    .wizard-buttons {
        flex-direction: column-reverse;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .wizard-buttons button {
        width: 100%;
        justify-content: center;
    }

    .btn-secondary-modern,
    .btn-primary-modern {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Resumen sections */
    .resumen-section {
        padding: 1.25rem;
    }

    .resumen-section h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.625rem;
    }

    .resumen-section h4 i {
        font-size: 1.125rem;
    }

    .resumen-data {
        font-size: 0.875rem;
    }

    .resumen-data p {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin: 0.625rem 0;
    }

    .resumen-data p strong {
        min-width: auto;
        font-size: 0.875rem;
    }

    /* Badges */
    .badge-nuevo,
    .badge-existente {
        font-size: 0.75rem;
        padding: 0.2rem 0.625rem;
    }

    /* Info card */
    .info-card {
        padding: 1rem;
        gap: 0.875rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .info-card i {
        font-size: 1.25rem;
    }

    .info-card strong {
        font-size: 0.95rem;
    }

    .info-card p {
        font-size: 0.85rem;
    }

    /* Form fields */
    .form-group-modern.full-width {
        grid-column: 1;
    }

    /* Progress indicator */
    .progress-indicator {
        height: 3px;
    }

    /* Info tooltip */
    .info-tooltip {
        width: 16px;
        height: 16px;
        font-size: 0.7rem;
    }

    /* Validation messages */
    .validation-message {
        font-size: 0.75rem;
    }
}

/* Extra small mobile (< 480px) */
@media (max-width: 480px) {
    .stepper-wrapper {
        gap: 1rem;
        margin: 1rem 0 1.5rem 0;
    }

    .stepper-item {
        flex: 0 0 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .step-counter {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-name {
        font-size: 0.7rem;
        text-align: left;
    }

    .step-header {
        padding: 1rem 0.875rem;
    }

    .step-header i {
        font-size: 1.75rem;
    }

    .step-header h3 {
        font-size: 1.125rem;
    }

    .step-header p {
        font-size: 0.8rem;
    }

    .wizard-buttons button {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .resumen-section {
        padding: 1rem;
    }

    .resumen-section h4 {
        font-size: 0.95rem;
    }

    .resumen-data {
        font-size: 0.8rem;
    }

    .resumen-data p strong {
        font-size: 0.8rem;
    }

    .info-card {
        padding: 0.875rem;
    }

    .info-card i {
        font-size: 1.125rem;
    }

    .info-card strong {
        font-size: 0.9rem;
    }

    .info-card p {
        font-size: 0.8rem;
    }
}

/* Mejora visual para campos deshabilitados */
.form-control-modern:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Indicador de progreso visual */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transition: width 0.3s ease;
}

/* Tooltip para información adicional */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-info);
    color: white;
    font-size: 0.75rem;
    cursor: help;
    margin-left: 0.5rem;
}

/* Estado de validación visual (opcional para futuro) */
.form-control-modern.valid {
    border-color: var(--color-success);
}

.form-control-modern.invalid {
    border-color: var(--color-danger);
}

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-message.error {
    color: var(--color-danger);
}

.validation-message.success {
    color: var(--color-success);
}